From e65069a01b9c8fdc0ddfa7f0eae5f93e26d4711d Mon Sep 17 00:00:00 2001 From: Daniel Kim Date: Fri, 4 Sep 2026 16:49:22 -0700 Subject: [PATCH 1/2] feat: add safe live file refresh --- src/commands/up.rs | 386 ++++++++- ui/dist/assets/index-DPOlf9u9.js | 1057 ------------------------- ui/dist/assets/index-QVaY9_5_.css | 1 + ui/dist/assets/index-wEP0FPnn.js | 1056 ++++++++++++++++++++++++ ui/dist/assets/index-ztXpeWfh.css | 1 - ui/dist/index.html | 4 +- ui/messages/en.json | 13 + ui/messages/fa.json | 13 + ui/messages/zh-CN.json | 13 + ui/src/App.tsx | 44 +- ui/src/api.ts | 73 +- ui/src/components/ArtifactsTab.tsx | 138 +++- ui/src/components/ClosableTab.tsx | 2 + ui/src/components/CodeEditor.tsx | 10 +- ui/src/components/FileTreeActions.tsx | 202 +++++ ui/src/components/FileViewer.tsx | 275 +++++-- ui/src/components/WorktreeTab.tsx | 125 +-- ui/src/components/codeTree.tsx | 64 +- ui/src/events.ts | 61 ++ ui/src/fileSync.ts | 42 + ui/tests/fileSync.test.mjs | 25 + 21 files changed, 2386 insertions(+), 1219 deletions(-) delete mode 100644 ui/dist/assets/index-DPOlf9u9.js create mode 100644 ui/dist/assets/index-QVaY9_5_.css create mode 100644 ui/dist/assets/index-wEP0FPnn.js delete mode 100644 ui/dist/assets/index-ztXpeWfh.css create mode 100644 ui/src/components/FileTreeActions.tsx create mode 100644 ui/src/fileSync.ts create mode 100644 ui/tests/fileSync.test.mjs diff --git a/src/commands/up.rs b/src/commands/up.rs index 3f845147..f145f8ca 100644 --- a/src/commands/up.rs +++ b/src/commands/up.rs @@ -447,7 +447,9 @@ fn router(state: AppState, remote_auth: Option) -> Router { .route("/api/projects/{id}/code-tree", get(project_code_tree)) .route( "/api/projects/{id}/file", - get(project_file).put(write_project_file), + get(project_file) + .put(write_project_file) + .patch(manage_project_file), ) .route("/api/projects/{id}/file/raw", get(project_raw_file)) .route("/api/projects/{id}/file/open", post(open_project_file)) @@ -481,7 +483,9 @@ fn router(state: AppState, remote_auth: Option) -> Router { ) .route( "/api/projects/{id}/files", - get(list_artifacts).delete(delete_artifact), + get(list_artifacts) + .patch(manage_artifact_file) + .delete(delete_artifact), ) .route("/api/projects/{id}/files/file", get(serve_artifact)) .route("/api/events", get(events)) @@ -2442,6 +2446,9 @@ async fn project_code_tree(Path(id): Path, Query(q): Query { let sha = local::git::resolve_branch_commit(&root, name)? @@ -2463,6 +2470,7 @@ async fn project_code_tree(Path(id): Path, Query(q): Query, } impl ProjectFileResponse { @@ -2508,6 +2517,7 @@ impl ProjectFileResponse { not_found: true, root, presentation, + version: None, } } @@ -2524,6 +2534,7 @@ impl ProjectFileResponse { not_found: false, root, presentation, + version: None, } } @@ -2534,6 +2545,7 @@ impl ProjectFileResponse { truncated: bool, binary: bool, presentation: local::files::FilePresentation, + version: Option, ) -> Self { Self { path, @@ -2543,10 +2555,34 @@ impl ProjectFileResponse { not_found: false, root, presentation, + version, } } } +fn file_version(bytes: &[u8]) -> String { + format!("{:x}", Sha256::digest(bytes)) +} + +fn file_version_on_disk(path: &std::path::Path) -> std::result::Result { + use std::io::Read as _; + + let mut file = std::fs::File::open(path) + .map_err(|error| ApiError::from(anyhow!("save failed: {error}")))?; + let mut hasher = Sha256::new(); + let mut buffer = [0_u8; 64 * 1024]; + loop { + let read = file + .read(&mut buffer) + .map_err(|error| ApiError::from(anyhow!("save failed: {error}")))?; + if read == 0 { + break; + } + hasher.update(&buffer[..read]); + } + Ok(format!("{:x}", hasher.finalize())) +} + fn validated_project_file_path( path: &str, ) -> std::result::Result<(String, std::path::PathBuf), ApiError> { @@ -2641,6 +2677,7 @@ async fn project_file( truncated, binary, presentation, + None, ))) } None => Ok(Json(ProjectFileResponse::missing( @@ -2697,6 +2734,7 @@ async fn project_file( let truncated = buf.len() as u64 > FILE_READ_LIMIT; buf.truncate(FILE_READ_LIMIT as usize); let (content, binary) = decode_project_file_text(buf, truncated); + let version = (!truncated && !binary).then(|| file_version(content.as_bytes())); let presentation = if binary { local::files::FilePresentation::Download } else { @@ -2709,6 +2747,7 @@ async fn project_file( truncated, binary, presentation, + version, ))) }) .await @@ -2735,6 +2774,178 @@ struct WriteProjectFileReq { content: String, /// Chat session whose worktree owns the file; absent writes the hub clone. session_id: Option, + /// Exact version returned by the read endpoint. Older clients may omit it. + expected_version: Option, +} + +enum WriteProjectFileOutcome { + Saved(Value), + Conflict { + current_version: Option, + exists: bool, + }, +} + +#[derive(Clone, Copy, Deserialize)] +#[serde(rename_all = "lowercase")] +enum FileAction { + Rename, + Duplicate, + Delete, +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +struct ManageFileReq { + path: String, + action: FileAction, + new_name: Option, + session_id: Option, +} + +fn validated_file_name(name: Option<&str>) -> std::result::Result<&str, ApiError> { + let name = name.map(str::trim).filter(|name| !name.is_empty()); + match name { + Some(name) + if name != "." && name != ".." && name.len() <= 255 && !name.contains(['/', '\\']) => + { + Ok(name) + } + _ => Err(bad_request("invalid file name")), + } +} + +fn duplicate_file_name(name: &str, number: usize) -> String { + let suffix = if number == 1 { + " copy".to_string() + } else { + format!(" copy {number}") + }; + match name.rsplit_once('.') { + Some((stem, extension)) if !stem.is_empty() => format!("{stem}{suffix}.{extension}"), + _ => format!("{name}{suffix}"), + } +} + +fn manage_local_file( + root: &std::path::Path, + rel: &str, + action: FileAction, + new_name: Option<&str>, + protect_git_dir: bool, +) -> std::result::Result { + let (rel, rel_path) = validated_project_file_path(rel)?; + if protect_git_dir && touches_git_dir(&rel_path) { + return Err(bad_request("cannot manage files under .git")); + } + let root = std::fs::canonicalize(root) + .map_err(|e| ApiError::from(anyhow!("file root unavailable: {e}")))?; + let source = root.join(&rel_path); + let resolved = std::fs::canonicalize(&source).map_err(|e| match e.kind() { + std::io::ErrorKind::NotFound => not_found("file"), + _ => ApiError::from(anyhow!("file unavailable: {e}")), + })?; + if !resolved.starts_with(&root) { + return Err(bad_request("path escapes file root")); + } + if protect_git_dir && resolved.strip_prefix(&root).is_ok_and(touches_git_dir) { + return Err(bad_request("cannot manage files under .git")); + } + if resolved.is_dir() { + return Err(bad_request("path is a directory")); + } + + let parent = source.parent().ok_or_else(|| bad_request("invalid path"))?; + let parent = std::fs::canonicalize(parent) + .map_err(|e| ApiError::from(anyhow!("parent directory unavailable: {e}")))?; + if !parent.starts_with(&root) { + return Err(bad_request("path escapes file root")); + } + if matches!(action, FileAction::Delete) { + std::fs::remove_file(&source).map_err(|e| ApiError::from(anyhow!("delete failed: {e}")))?; + return Ok(rel); + } + + if matches!(action, FileAction::Duplicate) + && std::fs::symlink_metadata(&source) + .map_err(|e| ApiError::from(anyhow!("file unavailable: {e}")))? + .file_type() + .is_symlink() + { + return Err(bad_request("cannot duplicate a symbolic link")); + } + let old_name = rel_path + .file_name() + .and_then(|name| name.to_str()) + .ok_or_else(|| bad_request("invalid file name"))?; + let destination_name = match action { + FileAction::Rename => validated_file_name(new_name)?.to_string(), + FileAction::Duplicate => { + let mut number = 1; + loop { + let candidate = duplicate_file_name(old_name, number); + match std::fs::symlink_metadata(parent.join(&candidate)) { + Ok(_) => number += 1, + Err(error) if error.kind() == std::io::ErrorKind::NotFound => break candidate, + Err(error) => { + return Err(ApiError::from(anyhow!( + "could not choose a copy name: {error}" + ))) + } + } + } + } + FileAction::Delete => unreachable!(), + }; + let destination_rel = rel_path.with_file_name(&destination_name); + if protect_git_dir && touches_git_dir(&destination_rel) { + return Err(bad_request("cannot manage files under .git")); + } + if destination_rel == rel_path { + return Ok(rel); + } + let destination = parent.join(&destination_name); + match std::fs::symlink_metadata(&destination) { + Ok(_) => match std::fs::canonicalize(&destination) { + Ok(path) if path == resolved => {} + Ok(_) | Err(_) => return Err(bad_request("a file with that name already exists")), + }, + Err(error) if error.kind() == std::io::ErrorKind::NotFound => {} + Err(error) => return Err(ApiError::from(anyhow!("destination unavailable: {error}"))), + } + match action { + FileAction::Rename => std::fs::rename(&source, &destination) + .map_err(|e| ApiError::from(anyhow!("rename failed: {e}")))?, + FileAction::Duplicate => { + std::fs::copy(&source, &destination) + .map_err(|e| ApiError::from(anyhow!("copy failed: {e}")))?; + } + FileAction::Delete => unreachable!(), + } + Ok(destination_rel.to_string_lossy().into_owned()) +} + +async fn manage_project_file( + State(state): State, + Path(id): Path, + Json(req): Json, +) -> ApiResult { + reject_if_moving(&state)?; + blocking_api(move || { + let store = Store::open()?; + let project = store + .get_local_project(&id)? + .ok_or_else(|| not_found("project"))?; + let (root, root_kind) = resolve_checkout_root(&store, &project, req.session_id.as_deref())?; + if req.session_id.is_some() && root_kind == "clone" { + return Err(bad_request( + "this session's worktree is no longer available — reload the files", + )); + } + let path = manage_local_file(&root, &req.path, req.action, req.new_name.as_deref(), true)?; + Ok(Json(json!({ "ok": true, "path": path }))) + }) + .await } /// Overwrite an existing text file in the project's live checkout with edited @@ -2742,10 +2953,12 @@ struct WriteProjectFileReq { /// `ref` path here and stay read-only. Traversal and symlink escapes are /// rejected by canonicalizing the target and confirming it stays under the root. async fn write_project_file( + State(state): State, Path(id): Path, Json(req): Json, -) -> ApiResult { - blocking_api(move || { +) -> std::result::Result { + reject_if_moving(&state)?; + let outcome = tokio::task::spawn_blocking(move || { let (rel, rel_path) = validated_project_file_path(&req.path)?; if touches_git_dir(&rel_path) { return Err(bad_request("cannot edit files under .git")); @@ -2775,7 +2988,15 @@ async fn write_project_file( // checkout; a missing file means the editor's copy is stale. let full = match std::fs::canonicalize(root.join(&rel_path)) { Ok(p) => p, - Err(e) if e.kind() == std::io::ErrorKind::NotFound => return Err(not_found("file")), + Err(e) if e.kind() == std::io::ErrorKind::NotFound => { + if req.expected_version.is_some() { + return Ok(WriteProjectFileOutcome::Conflict { + current_version: None, + exists: false, + }); + } + return Err(not_found("file")); + } Err(e) => return Err(ApiError::from(anyhow!("save failed: {e}"))), }; if !full.starts_with(&root) { @@ -2784,15 +3005,44 @@ async fn write_project_file( if full.is_dir() { return Err(bad_request("path is a directory")); } + // ponytail: external writers do not share a lock; add platform file coordination if this race becomes observable. + if let Some(expected) = req.expected_version.as_deref() { + let current = file_version_on_disk(&full)?; + if current != expected { + return Ok(WriteProjectFileOutcome::Conflict { + current_version: Some(current), + exists: true, + }); + } + } std::fs::write(&full, req.content.as_bytes()) .map_err(|e| ApiError::from(anyhow!("save failed: {e}")))?; - Ok(Json(json!({ + Ok(WriteProjectFileOutcome::Saved(json!({ "ok": true, "root": root_kind, "bytesWritten": req.content.len(), + "version": file_version(req.content.as_bytes()), }))) }) .await + .map_err(|e| ApiError::from(anyhow!("file task failed: {e}")))??; + + Ok(match outcome { + WriteProjectFileOutcome::Saved(value) => Json(value).into_response(), + WriteProjectFileOutcome::Conflict { + current_version, + exists, + } => ( + StatusCode::CONFLICT, + Json(json!({ + "error": "file changed on disk", + "code": "fileChanged", + "currentVersion": current_version, + "exists": exists, + })), + ) + .into_response(), + }) } #[derive(Deserialize)] @@ -3390,6 +3640,7 @@ async fn absolute_file( truncated, binary, presentation, + None, ))) }) .await @@ -3455,6 +3706,24 @@ async fn list_artifacts(Path(id): Path) -> ApiResult { .await } +async fn manage_artifact_file( + State(state): State, + Path(id): Path, + Json(req): Json, +) -> ApiResult { + reject_if_moving(&state)?; + blocking_api(move || { + let store = Store::open()?; + let project = store + .get_local_project(&id)? + .ok_or_else(|| not_found("project"))?; + let root = local::files::ensure_dir(&project)?; + let path = manage_local_file(&root, &req.path, req.action, req.new_name.as_deref(), false)?; + Ok(Json(json!({ "ok": true, "path": path }))) + }) + .await +} + #[derive(Deserialize)] struct ArtifactPathQuery { path: String, @@ -7181,6 +7450,30 @@ mod tests { assert!(!binary); } + #[test] + fn project_file_versions_track_exact_bytes() { + let first = file_version(b"same-size-a"); + let second = file_version(b"same-size-b"); + assert_ne!(first, second); + + let path = std::env::temp_dir().join(format!("orx-file-version-{}", uuid::Uuid::new_v4())); + std::fs::write(&path, b"same-size-a").unwrap(); + assert_eq!( + file_version_on_disk(&path) + .map_err(|error| error.1) + .unwrap(), + first + ); + std::fs::write(&path, b"same-size-b").unwrap(); + assert_eq!( + file_version_on_disk(&path) + .map_err(|error| error.1) + .unwrap(), + second + ); + std::fs::remove_file(path).unwrap(); + } + #[test] fn project_file_paths_reject_traversal() { assert_eq!( @@ -7198,6 +7491,87 @@ mod tests { } } + #[test] + fn local_file_actions_rename_duplicate_and_delete() { + let root = std::env::temp_dir().join(format!("orx-file-actions-{}", uuid::Uuid::new_v4())); + std::fs::create_dir_all(root.join("reports")).unwrap(); + std::fs::write(root.join("reports/result.md"), "result").unwrap(); + + let renamed = manage_local_file( + &root, + "reports/result.md", + FileAction::Rename, + Some("summary.md"), + true, + ) + .map_err(|error| error.1) + .unwrap(); + assert_eq!(renamed, "reports/summary.md"); + + let duplicated = manage_local_file(&root, &renamed, FileAction::Duplicate, None, true) + .map_err(|error| error.1) + .unwrap(); + assert_eq!(duplicated, "reports/summary copy.md"); + assert_eq!( + std::fs::read_to_string(root.join(&duplicated)).unwrap(), + "result" + ); + + manage_local_file(&root, &duplicated, FileAction::Delete, None, true) + .map_err(|error| error.1) + .unwrap(); + assert!(!root.join(duplicated).exists()); + assert!(manage_local_file( + &root, + &renamed, + FileAction::Rename, + Some("../escape.md"), + true, + ) + .is_err()); + std::fs::create_dir(root.join(".git")).unwrap(); + std::fs::write(root.join(".git/config"), "private").unwrap(); + assert!(manage_local_file(&root, ".git/config", FileAction::Delete, None, true,).is_err()); + #[cfg(unix)] + { + let outside = std::env::temp_dir() + .join(format!("orx-file-actions-outside-{}", uuid::Uuid::new_v4())); + std::fs::create_dir(&outside).unwrap(); + std::os::unix::fs::symlink(&outside, root.join("jump")).unwrap(); + std::os::unix::fs::symlink(root.join(&renamed), outside.join("back")).unwrap(); + assert!( + manage_local_file(&root, "jump/back", FileAction::Delete, None, true,).is_err() + ); + assert!(outside.join("back").exists()); + std::os::unix::fs::symlink(root.join(&renamed), root.join("summary-link")).unwrap(); + assert!( + manage_local_file(&root, "summary-link", FileAction::Duplicate, None, true,) + .is_err() + ); + std::os::unix::fs::symlink(root.join(".git"), root.join("git-link")).unwrap(); + assert!( + manage_local_file(&root, "git-link/config", FileAction::Delete, None, true,) + .is_err() + ); + std::fs::remove_dir_all(outside).unwrap(); + } + let case_renamed = manage_local_file( + &root, + &renamed, + FileAction::Rename, + Some("SUMMARY.md"), + true, + ) + .map_err(|error| error.1) + .unwrap(); + assert_eq!(case_renamed, "reports/SUMMARY.md"); + assert!(root.join(case_renamed).exists()); + assert!(std::fs::read_dir(root.join("reports")) + .unwrap() + .any(|entry| entry.unwrap().file_name() == "SUMMARY.md")); + std::fs::remove_dir_all(root).unwrap(); + } + // ApiError has no Debug, so `.unwrap()` on the Err path won't compile; drop // the error to its message string to make the Result assertion-friendly. fn abs_path(path: &str) -> std::result::Result<(String, std::path::PathBuf), String> { diff --git a/ui/dist/assets/index-DPOlf9u9.js b/ui/dist/assets/index-DPOlf9u9.js deleted file mode 100644 index 5d832b06..00000000 --- a/ui/dist/assets/index-DPOlf9u9.js +++ /dev/null @@ -1,1057 +0,0 @@ -var d6=e=>{throw TypeError(e)};var f6=(e,n,t)=>n.has(e)||d6("Cannot "+t);var Zn=(e,n,t)=>(f6(e,n,"read from private field"),t?t.call(e):n.get(e)),ui=(e,n,t)=>n.has(e)?d6("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),as=(e,n,t,r)=>(f6(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t);var h6=(e,n,t,r)=>({set _(s){as(e,n,s,t)},get _(){return Zn(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 a of s)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function t(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=t(s);fetch(s.href,a)}})();function kh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var V1={exports:{}},df={};/** - * @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 _6;function dO(){if(_6)return df;_6=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,s,a){var l=null;if(a!==void 0&&(l=""+a),s.key!==void 0&&(l=""+s.key),"key"in s){a={};for(var o in s)o!=="key"&&(a[o]=s[o])}else a=s;return s=a.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:a}}return df.Fragment=n,df.jsx=t,df.jsxs=t,df}var p6;function fO(){return p6||(p6=1,V1.exports=dO()),V1.exports}var f=fO(),W1={exports:{}},Ut={};/** - * @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 m6;function hO(){if(m6)return Ut;m6=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"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),m=Symbol.iterator;function g(B){return B===null||typeof B!="object"?null:(B=m&&B[m]||B["@@iterator"],typeof B=="function"?B:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function b(B,Y,V){this.props=B,this.context=Y,this.refs=v,this.updater=V||S}b.prototype.isReactComponent={},b.prototype.setState=function(B,Y){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,Y,"setState")},b.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function w(){}w.prototype=b.prototype;function x(B,Y,V){this.props=B,this.context=Y,this.refs=v,this.updater=V||S}var C=x.prototype=new w;C.constructor=x,k(C,b.prototype),C.isPureReactComponent=!0;var j=Array.isArray;function N(){}var T={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function D(B,Y,V){var se=V.ref;return{$$typeof:e,type:B,key:Y,ref:se!==void 0?se:null,props:V}}function O(B,Y){return D(B.type,Y,B.props)}function H(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function P(B){var Y={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(V){return Y[V]})}var F=/\/+/g;function W(B,Y){return typeof B=="object"&&B!==null&&B.key!=null?P(""+B.key):Y.toString(36)}function Z(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(N,N):(B.status="pending",B.then(function(Y){B.status==="pending"&&(B.status="fulfilled",B.value=Y)},function(Y){B.status==="pending"&&(B.status="rejected",B.reason=Y)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function G(B,Y,V,se,le){var ae=typeof B;(ae==="undefined"||ae==="boolean")&&(B=null);var re=!1;if(B===null)re=!0;else switch(ae){case"bigint":case"string":case"number":re=!0;break;case"object":switch(B.$$typeof){case e:case n:re=!0;break;case _:return re=B._init,G(re(B._payload),Y,V,se,le)}}if(re)return le=le(B),re=se===""?"."+W(B,0):se,j(le)?(V="",re!=null&&(V=re.replace(F,"$&/")+"/"),G(le,Y,V,"",function(ce){return ce})):le!=null&&(H(le)&&(le=O(le,V+(le.key==null||B&&B.key===le.key?"":(""+le.key).replace(F,"$&/")+"/")+re)),Y.push(le)),1;re=0;var q=se===""?".":se+":";if(j(B))for(var oe=0;oe>>1,L=G[$];if(0>>1;$s(V,J))ses(le,V)?(G[$]=le,G[se]=J,$=se):(G[$]=V,G[Y]=J,$=Y);else if(ses(le,J))G[$]=le,G[se]=J,$=se;else break e}}return X}function s(G,X){var J=G.sortIndex-X.sortIndex;return J!==0?J:G.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var c=[],d=[],_=1,h=null,m=3,g=!1,S=!1,k=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function C(G){for(var X=t(d);X!==null;){if(X.callback===null)r(d);else if(X.startTime<=G)r(d),X.sortIndex=X.expirationTime,n(c,X);else break;X=t(d)}}function j(G){if(k=!1,C(G),!S)if(t(c)!==null)S=!0,N||(N=!0,P());else{var X=t(d);X!==null&&Z(j,X.startTime-G)}}var N=!1,T=-1,z=5,D=-1;function O(){return v?!0:!(e.unstable_now()-DG&&O());){var $=h.callback;if(typeof $=="function"){h.callback=null,m=h.priorityLevel;var L=$(h.expirationTime<=G);if(G=e.unstable_now(),typeof L=="function"){h.callback=L,C(G),X=!0;break t}h===t(c)&&r(c),C(G)}else r(c);h=t(c)}if(h!==null)X=!0;else{var B=t(d);B!==null&&Z(j,B.startTime-G),X=!1}}break e}finally{h=null,m=J,g=!1}X=void 0}}finally{X?P():N=!1}}}var P;if(typeof x=="function")P=function(){x(H)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,W=F.port2;F.port1.onmessage=H,P=function(){W.postMessage(null)}}else P=function(){b(H,0)};function Z(G,X){T=b(function(){G(e.unstable_now())},X)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_forceFrameRate=function(G){0>G||125$?(G.sortIndex=J,n(d,G),t(c)===null&&G===t(d)&&(k?(w(T),T=-1):k=!0,Z(j,J-$))):(G.sortIndex=L,n(c,G),S||g||(S=!0,N||(N=!0,P()))),G},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(G){var X=m;return function(){var J=m;m=X;try{return G.apply(this,arguments)}finally{m=J}}}})(X1)),X1}var v6;function pO(){return v6||(v6=1,Y1.exports=_O()),Y1.exports}var Z1={exports:{}},_s={};/** - * @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 x6;function mO(){if(x6)return _s;x6=1;var e=Ch();function n(c){var d="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(),Z1.exports=mO(),Z1.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 w6;function gO(){if(w6)return ff;w6=1;var e=pO(),n=Ch(),t=dE();function r(i){var u="https://react.dev/errors/"+i;if(1L||(i.current=$[L],$[L]=null,L--)}function V(i,u){L++,$[L]=i.current,i.current=u}var se=B(null),le=B(null),ae=B(null),re=B(null);function q(i,u){switch(V(ae,u),V(le,i),V(se,null),u.nodeType){case 9:case 11:i=(i=u.documentElement)&&(i=i.namespaceURI)?D3(i):0;break;default:if(i=u.tagName,u=u.namespaceURI)u=D3(u),i=L3(u,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Y(se),V(se,i)}function oe(){Y(se),Y(le),Y(ae)}function ce(i){i.memoizedState!==null&&V(re,i);var u=se.current,p=L3(u,i.type);u!==p&&(V(le,i),V(se,p))}function _e(i){le.current===i&&(Y(se),Y(le)),re.current===i&&(Y(re),of._currentValue=J)}var ue,Ne;function ze(i){if(ue===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);ue=u&&u[1]||"",Ne=-1)":-1A||he[y]!==ye[A]){var Te=` -`+he[y].replace(" at new "," at ");return i.displayName&&Te.includes("")&&(Te=Te.replace("",i.displayName)),Te}while(1<=y&&0<=A);break}}}finally{Ie=!1,Error.prepareStackTrace=p}return(p=i?i.displayName||i.name:"")?ze(p):""}function $e(i,u){switch(i.tag){case 26:case 27:case 5:return ze(i.type);case 16:return ze("Lazy");case 13:return i.child!==u&&u!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return Pe(i.type,!1);case 11:return Pe(i.type.render,!1);case 1:return Pe(i.type,!0);case 31:return ze("Activity");default:return""}}function It(i){try{var u="",p=null;do u+=$e(i,p),p=i,i=i.return;while(i);return u}catch(y){return` -Error generating stack: `+y.message+` -`+y.stack}}var yt=Object.prototype.hasOwnProperty,qe=e.unstable_scheduleCallback,jt=e.unstable_cancelCallback,pt=e.unstable_shouldYield,ot=e.unstable_requestPaint,tt=e.unstable_now,Ft=e.unstable_getCurrentPriorityLevel,ke=e.unstable_ImmediatePriority,Re=e.unstable_UserBlockingPriority,Xe=e.unstable_NormalPriority,nt=e.unstable_LowPriority,st=e.unstable_IdlePriority,St=e.log,mt=e.unstable_setDisableYieldValue,Wt=null,fn=null;function hn(i){if(typeof St=="function"&&mt(i),fn&&typeof fn.setStrictMode=="function")try{fn.setStrictMode(Wt,i)}catch{}}var At=Math.clz32?Math.clz32:nr,jn=Math.log,nn=Math.LN2;function nr(i){return i>>>=0,i===0?32:31-(jn(i)/nn|0)|0}var lr=256,bn=262144,Je=4194304;function ht(i){var u=i&42;if(u!==0)return u;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function An(i,u,p){var y=i.pendingLanes;if(y===0)return 0;var A=0,R=i.suspendedLanes,K=i.pingedLanes;i=i.warmLanes;var ee=y&134217727;return ee!==0?(y=ee&~R,y!==0?A=ht(y):(K&=ee,K!==0?A=ht(K):p||(p=ee&~i,p!==0&&(A=ht(p))))):(ee=y&~R,ee!==0?A=ht(ee):K!==0?A=ht(K):p||(p=y&~i,p!==0&&(A=ht(p)))),A===0?0:u!==0&&u!==A&&(u&R)===0&&(R=A&-A,p=u&-u,R>=p||R===32&&(p&4194048)!==0)?u:A}function rr(i,u){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&u)===0}function Ge(i,u){switch(i){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 Bt(){var i=Je;return Je<<=1,(Je&62914560)===0&&(Je=4194304),i}function He(i){for(var u=[],p=0;31>p;p++)u.push(i);return u}function it(i,u){i.pendingLanes|=u,u!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function _n(i,u,p,y,A,R){var K=i.pendingLanes;i.pendingLanes=p,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=p,i.entangledLanes&=p,i.errorRecoveryDisabledLanes&=p,i.shellSuspendCounter=0;var ee=i.entanglements,he=i.expirationTimes,ye=i.hiddenUpdates;for(p=K&~p;0"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var ys=/[\n"\\]/g;function mr(i){return i.replace(ys,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Gi(i,u,p,y,A,R,K,ee){i.name="",K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?i.type=K:i.removeAttribute("type"),u!=null?K==="number"?(u===0&&i.value===""||i.value!=u)&&(i.value=""+ur(u)):i.value!==""+ur(u)&&(i.value=""+ur(u)):K!=="submit"&&K!=="reset"||i.removeAttribute("value"),u!=null?Ka(i,K,ur(u)):p!=null?Ka(i,K,ur(p)):y!=null&&i.removeAttribute("value"),A==null&&R!=null&&(i.defaultChecked=!!R),A!=null&&(i.checked=A&&typeof A!="function"&&typeof A!="symbol"),ee!=null&&typeof ee!="function"&&typeof ee!="symbol"&&typeof ee!="boolean"?i.name=""+ur(ee):i.removeAttribute("name")}function $s(i,u,p,y,A,R,K,ee){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(i.type=R),u!=null||p!=null){if(!(R!=="submit"&&R!=="reset"||u!=null)){Is(i);return}p=p!=null?""+ur(p):"",u=u!=null?""+ur(u):p,ee||u===i.value||(i.value=u),i.defaultValue=u}y=y??A,y=typeof y!="function"&&typeof y!="symbol"&&!!y,i.checked=ee?i.checked:!!y,i.defaultChecked=!!y,K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"&&(i.name=K),Is(i)}function Ka(i,u,p){u==="number"&&Bs(i.ownerDocument)===i||i.defaultValue===""+p||(i.defaultValue=""+p)}function ws(i,u,p,y){if(i=i.options,u){u={};for(var A=0;A"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Br=!1;if(ks)try{var es={};Object.defineProperty(es,"passive",{get:function(){Br=!0}}),window.addEventListener("test",es,es),window.removeEventListener("test",es,es)}catch{Br=!1}var gr=null,Lo=null,ts=null;function Oo(){if(ts)return ts;var i,u=Lo,p=u.length,y,A="value"in gr?gr.value:gr.textContent,R=A.length;for(i=0;i=Ho),Nd=" ",te=!1;function me(i,u){switch(i){case"keyup":return Kh.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ee(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var je=!1;function Ve(i,u){switch(i){case"compositionend":return Ee(u);case"keypress":return u.which!==32?null:(te=!0,Nd);case"textInput":return i=u.data,i===Nd&&te?null:i;default:return null}}function kt(i,u){if(je)return i==="compositionend"||!Wc&&me(i,u)?(i=Oo(),ts=Lo=gr=null,je=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:p,offset:u-i};i=y}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=En(p)}}function ba(i,u){return i&&u?i===u?!0:i&&i.nodeType===3?!1:u&&u.nodeType===3?ba(i,u.parentNode):"contains"in i?i.contains(u):i.compareDocumentPosition?!!(i.compareDocumentPosition(u)&16):!1:!1}function Er(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var u=Bs(i.document);u instanceof i.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)i=u.contentWindow;else break;u=Bs(i.document)}return u}function Uo(i){var u=i&&i.nodeName&&i.nodeName.toLowerCase();return u&&(u==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||u==="textarea"||i.contentEditable==="true")}var zs=ks&&"documentMode"in document&&11>=document.documentMode,Kc=null,ng=null,Td=null,rg=!1;function nw(i,u,p){var y=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;rg||Kc==null||Kc!==Bs(y)||(y=Kc,"selectionStart"in y&&Uo(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),Td&&Fo(Td,y)||(Td=y,y=H_(ng,"onSelect"),0>=K,A-=K,va=1<<32-At(u)+A|p<Qt?(ln=_t,_t=null):ln=_t.sibling;var gn=Se(be,_t,xe[Qt],Me);if(gn===null){_t===null&&(_t=ln);break}i&&_t&&gn.alternate===null&&u(be,_t),pe=R(gn,pe,Qt),mn===null?wt=gn:mn.sibling=gn,mn=gn,_t=ln}if(Qt===xe.length)return p(be,_t),cn&&eo(be,Qt),wt;if(_t===null){for(;QtQt?(ln=_t,_t=null):ln=_t.sibling;var dl=Se(be,_t,gn.value,Me);if(dl===null){_t===null&&(_t=ln);break}i&&_t&&dl.alternate===null&&u(be,_t),pe=R(dl,pe,Qt),mn===null?wt=dl:mn.sibling=dl,mn=dl,_t=ln}if(gn.done)return p(be,_t),cn&&eo(be,Qt),wt;if(_t===null){for(;!gn.done;Qt++,gn=xe.next())gn=Le(be,gn.value,Me),gn!==null&&(pe=R(gn,pe,Qt),mn===null?wt=gn:mn.sibling=gn,mn=gn);return cn&&eo(be,Qt),wt}for(_t=y(_t);!gn.done;Qt++,gn=xe.next())gn=Ae(_t,be,Qt,gn.value,Me),gn!==null&&(i&&gn.alternate!==null&&_t.delete(gn.key===null?Qt:gn.key),pe=R(gn,pe,Qt),mn===null?wt=gn:mn.sibling=gn,mn=gn);return i&&_t.forEach(function(uO){return u(be,uO)}),cn&&eo(be,Qt),wt}function On(be,pe,xe,Me){if(typeof xe=="object"&&xe!==null&&xe.type===k&&xe.key===null&&(xe=xe.props.children),typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case g:e:{for(var wt=xe.key;pe!==null;){if(pe.key===wt){if(wt=xe.type,wt===k){if(pe.tag===7){p(be,pe.sibling),Me=A(pe,xe.props.children),Me.return=be,be=Me;break e}}else if(pe.elementType===wt||typeof wt=="object"&&wt!==null&&wt.$$typeof===z&&tc(wt)===pe.type){p(be,pe.sibling),Me=A(pe,xe.props),Id(Me,xe),Me.return=be,be=Me;break e}p(be,pe);break}else u(be,pe);pe=pe.sibling}xe.type===k?(Me=Xl(xe.props.children,be.mode,Me,xe.key),Me.return=be,be=Me):(Me=r_(xe.type,xe.key,xe.props,null,be.mode,Me),Id(Me,xe),Me.return=be,be=Me)}return K(be);case S:e:{for(wt=xe.key;pe!==null;){if(pe.key===wt)if(pe.tag===4&&pe.stateNode.containerInfo===xe.containerInfo&&pe.stateNode.implementation===xe.implementation){p(be,pe.sibling),Me=A(pe,xe.children||[]),Me.return=be,be=Me;break e}else{p(be,pe);break}else u(be,pe);pe=pe.sibling}Me=ug(xe,be.mode,Me),Me.return=be,be=Me}return K(be);case z:return xe=tc(xe),On(be,pe,xe,Me)}if(Z(xe))return dt(be,pe,xe,Me);if(P(xe)){if(wt=P(xe),typeof wt!="function")throw Error(r(150));return xe=wt.call(xe),zt(be,pe,xe,Me)}if(typeof xe.then=="function")return On(be,pe,u_(xe),Me);if(xe.$$typeof===x)return On(be,pe,a_(be,xe),Me);d_(be,xe)}return typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint"?(xe=""+xe,pe!==null&&pe.tag===6?(p(be,pe.sibling),Me=A(pe,xe),Me.return=be,be=Me):(p(be,pe),Me=cg(xe,be.mode,Me),Me.return=be,be=Me),K(be)):p(be,pe)}return function(be,pe,xe,Me){try{Od=0;var wt=On(be,pe,xe,Me);return iu=null,wt}catch(_t){if(_t===su||_t===l_)throw _t;var mn=si(29,_t,null,be.mode);return mn.lanes=Me,mn.return=be,mn}finally{}}}var rc=Cw(!0),Ew=Cw(!1),Ko=!1;function wg(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sg(i,u){i=i.updateQueue,u.updateQueue===i&&(u.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Yo(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Xo(i,u,p){var y=i.updateQueue;if(y===null)return null;if(y=y.shared,(vn&2)!==0){var A=y.pending;return A===null?u.next=u:(u.next=A.next,A.next=u),y.pending=u,u=n_(i),cw(i,null,p),u}return t_(i,y,u,p),n_(i)}function Bd(i,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var y=u.lanes;y&=i.pendingLanes,p|=y,u.lanes=p,Nt(i,p)}}function kg(i,u){var p=i.updateQueue,y=i.alternate;if(y!==null&&(y=y.updateQueue,p===y)){var A=null,R=null;if(p=p.firstBaseUpdate,p!==null){do{var K={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};R===null?A=R=K:R=R.next=K,p=p.next}while(p!==null);R===null?A=R=u:R=R.next=u}else A=R=u;p={baseState:y.baseState,firstBaseUpdate:A,lastBaseUpdate:R,shared:y.shared,callbacks:y.callbacks},i.updateQueue=p;return}i=p.lastBaseUpdate,i===null?p.firstBaseUpdate=u:i.next=u,p.lastBaseUpdate=u}var Cg=!1;function $d(){if(Cg){var i=ru;if(i!==null)throw i}}function Hd(i,u,p,y){Cg=!1;var A=i.updateQueue;Ko=!1;var R=A.firstBaseUpdate,K=A.lastBaseUpdate,ee=A.shared.pending;if(ee!==null){A.shared.pending=null;var he=ee,ye=he.next;he.next=null,K===null?R=ye:K.next=ye,K=he;var Te=i.alternate;Te!==null&&(Te=Te.updateQueue,ee=Te.lastBaseUpdate,ee!==K&&(ee===null?Te.firstBaseUpdate=ye:ee.next=ye,Te.lastBaseUpdate=he))}if(R!==null){var Le=A.baseState;K=0,Te=ye=he=null,ee=R;do{var Se=ee.lane&-536870913,Ae=Se!==ee.lane;if(Ae?(on&Se)===Se:(y&Se)===Se){Se!==0&&Se===nu&&(Cg=!0),Te!==null&&(Te=Te.next={lane:0,tag:ee.tag,payload:ee.payload,callback:null,next:null});e:{var dt=i,zt=ee;Se=u;var On=p;switch(zt.tag){case 1:if(dt=zt.payload,typeof dt=="function"){Le=dt.call(On,Le,Se);break e}Le=dt;break e;case 3:dt.flags=dt.flags&-65537|128;case 0:if(dt=zt.payload,Se=typeof dt=="function"?dt.call(On,Le,Se):dt,Se==null)break e;Le=h({},Le,Se);break e;case 2:Ko=!0}}Se=ee.callback,Se!==null&&(i.flags|=64,Ae&&(i.flags|=8192),Ae=A.callbacks,Ae===null?A.callbacks=[Se]:Ae.push(Se))}else Ae={lane:Se,tag:ee.tag,payload:ee.payload,callback:ee.callback,next:null},Te===null?(ye=Te=Ae,he=Le):Te=Te.next=Ae,K|=Se;if(ee=ee.next,ee===null){if(ee=A.shared.pending,ee===null)break;Ae=ee,ee=Ae.next,Ae.next=null,A.lastBaseUpdate=Ae,A.shared.pending=null}}while(!0);Te===null&&(he=Le),A.baseState=he,A.firstBaseUpdate=ye,A.lastBaseUpdate=Te,R===null&&(A.shared.lanes=0),tl|=K,i.lanes=K,i.memoizedState=Le}}function Nw(i,u){if(typeof i!="function")throw Error(r(191,i));i.call(u)}function zw(i,u){var p=i.callbacks;if(p!==null)for(i.callbacks=null,i=0;iR?R:8;var K=G.T,ee={};G.T=ee,qg(i,!1,u,p);try{var he=A(),ye=G.S;if(ye!==null&&ye(ee,he),he!==null&&typeof he=="object"&&typeof he.then=="function"){var Te=JD(he,y);Ud(i,u,Te,ci(i))}else Ud(i,u,y,ci(i))}catch(Le){Ud(i,u,{then:function(){},status:"rejected",reason:Le},ci())}finally{X.p=R,K!==null&&ee.types!==null&&(K.types=ee.types),G.T=K}}function iL(){}function Fg(i,u,p,y){if(i.tag!==5)throw Error(r(476));var A=a5(i).queue;i5(i,A,u,J,p===null?iL:function(){return o5(i),p(y)})}function a5(i){var u=i.memoizedState;if(u!==null)return u;u={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:so,lastRenderedState:J},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:so,lastRenderedState:p},next:null},i.memoizedState=u,i=i.alternate,i!==null&&(i.memoizedState=u),u}function o5(i){var u=a5(i);u.next===null&&(u=i.alternate.memoizedState),Ud(i,u.next.queue,{},ci())}function Ug(){return rs(of)}function l5(){return yr().memoizedState}function c5(){return yr().memoizedState}function aL(i){for(var u=i.return;u!==null;){switch(u.tag){case 24:case 3:var p=ci();i=Yo(p);var y=Xo(u,i,p);y!==null&&(Vs(y,u,p),Bd(y,u,p)),u={cache:bg()},i.payload=u;return}u=u.return}}function oL(i,u,p){var y=ci();p={lane:y,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},y_(i)?d5(u,p):(p=og(i,u,p,y),p!==null&&(Vs(p,i,y),f5(p,u,y)))}function u5(i,u,p){var y=ci();Ud(i,u,p,y)}function Ud(i,u,p,y){var A={lane:y,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(y_(i))d5(u,A);else{var R=i.alternate;if(i.lanes===0&&(R===null||R.lanes===0)&&(R=u.lastRenderedReducer,R!==null))try{var K=u.lastRenderedState,ee=R(K,p);if(A.hasEagerState=!0,A.eagerState=ee,hs(ee,K))return t_(i,u,A,0),$n===null&&e_(),!1}catch{}finally{}if(p=og(i,u,A,y),p!==null)return Vs(p,i,y),f5(p,u,y),!0}return!1}function qg(i,u,p,y){if(y={lane:2,revertLane:w1(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},y_(i)){if(u)throw Error(r(479))}else u=og(i,p,y,2),u!==null&&Vs(u,i,2)}function y_(i){var u=i.alternate;return i===Kt||u!==null&&u===Kt}function d5(i,u){ou=__=!0;var p=i.pending;p===null?u.next=u:(u.next=p.next,p.next=u),i.pending=u}function f5(i,u,p){if((p&4194048)!==0){var y=u.lanes;y&=i.pendingLanes,p|=y,u.lanes=p,Nt(i,p)}}var qd={readContext:rs,use:g_,useCallback:fr,useContext:fr,useEffect:fr,useImperativeHandle:fr,useLayoutEffect:fr,useInsertionEffect:fr,useMemo:fr,useReducer:fr,useRef:fr,useState:fr,useDebugValue:fr,useDeferredValue:fr,useTransition:fr,useSyncExternalStore:fr,useId:fr,useHostTransitionStatus:fr,useFormState:fr,useActionState:fr,useOptimistic:fr,useMemoCache:fr,useCacheRefresh:fr};qd.useEffectEvent=fr;var h5={readContext:rs,use:g_,useCallback:function(i,u){return js().memoizedState=[i,u===void 0?null:u],i},useContext:rs,useEffect:Xw,useImperativeHandle:function(i,u,p){p=p!=null?p.concat([i]):null,v_(4194308,4,e5.bind(null,u,i),p)},useLayoutEffect:function(i,u){return v_(4194308,4,i,u)},useInsertionEffect:function(i,u){v_(4,2,i,u)},useMemo:function(i,u){var p=js();u=u===void 0?null:u;var y=i();if(sc){hn(!0);try{i()}finally{hn(!1)}}return p.memoizedState=[y,u],y},useReducer:function(i,u,p){var y=js();if(p!==void 0){var A=p(u);if(sc){hn(!0);try{p(u)}finally{hn(!1)}}}else A=u;return y.memoizedState=y.baseState=A,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:A},y.queue=i,i=i.dispatch=oL.bind(null,Kt,i),[y.memoizedState,i]},useRef:function(i){var u=js();return i={current:i},u.memoizedState=i},useState:function(i){i=Ig(i);var u=i.queue,p=u5.bind(null,Kt,u);return u.dispatch=p,[i.memoizedState,p]},useDebugValue:Hg,useDeferredValue:function(i,u){var p=js();return Pg(p,i,u)},useTransition:function(){var i=Ig(!1);return i=i5.bind(null,Kt,i.queue,!0,!1),js().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,u,p){var y=Kt,A=js();if(cn){if(p===void 0)throw Error(r(407));p=p()}else{if(p=u(),$n===null)throw Error(r(349));(on&127)!==0||Dw(y,u,p)}A.memoizedState=p;var R={value:p,getSnapshot:u};return A.queue=R,Xw(Ow.bind(null,y,R,i),[i]),y.flags|=2048,cu(9,{destroy:void 0},Lw.bind(null,y,R,p,u),null),p},useId:function(){var i=js(),u=$n.identifierPrefix;if(cn){var p=xa,y=va;p=(y&~(1<<32-At(y)-1)).toString(32)+p,u="_"+u+"R_"+p,p=p_++,0<\/script>",R=R.removeChild(R.firstChild);break;case"select":R=typeof y.is=="string"?K.createElement("select",{is:y.is}):K.createElement("select"),y.multiple?R.multiple=!0:y.size&&(R.size=y.size);break;default:R=typeof y.is=="string"?K.createElement(A,{is:y.is}):K.createElement(A)}}R[Sn]=u,R[Mn]=y;e:for(K=u.child;K!==null;){if(K.tag===5||K.tag===6)R.appendChild(K.stateNode);else if(K.tag!==4&&K.tag!==27&&K.child!==null){K.child.return=K,K=K.child;continue}if(K===u)break e;for(;K.sibling===null;){if(K.return===null||K.return===u)break e;K=K.return}K.sibling.return=K.return,K=K.sibling}u.stateNode=R;e:switch(is(R,A,y),A){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&ao(u)}}return Gn(u),s1(u,u.type,i===null?null:i.memoizedProps,u.pendingProps,p),null;case 6:if(i&&u.stateNode!=null)i.memoizedProps!==y&&ao(u);else{if(typeof y!="string"&&u.stateNode===null)throw Error(r(166));if(i=ae.current,eu(u)){if(i=u.stateNode,p=u.memoizedProps,y=null,A=ns,A!==null)switch(A.tag){case 27:case 5:y=A.memoizedProps}i[Sn]=u,i=!!(i.nodeValue===p||y!==null&&y.suppressHydrationWarning===!0||M3(i.nodeValue,p)),i||Vo(u,!0)}else i=P_(i).createTextNode(y),i[Sn]=u,u.stateNode=i}return Gn(u),null;case 31:if(p=u.memoizedState,i===null||i.memoizedState!==null){if(y=eu(u),p!==null){if(i===null){if(!y)throw Error(r(318));if(i=u.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Sn]=u}else Zl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Gn(u),i=!1}else p=_g(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),i=!0;if(!i)return u.flags&256?(ai(u),u):(ai(u),null);if((u.flags&128)!==0)throw Error(r(558))}return Gn(u),null;case 13:if(y=u.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(A=eu(u),y!==null&&y.dehydrated!==null){if(i===null){if(!A)throw Error(r(318));if(A=u.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(r(317));A[Sn]=u}else Zl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Gn(u),A=!1}else A=_g(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=A),A=!0;if(!A)return u.flags&256?(ai(u),u):(ai(u),null)}return ai(u),(u.flags&128)!==0?(u.lanes=p,u):(p=y!==null,i=i!==null&&i.memoizedState!==null,p&&(y=u.child,A=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(A=y.alternate.memoizedState.cachePool.pool),R=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(R=y.memoizedState.cachePool.pool),R!==A&&(y.flags|=2048)),p!==i&&p&&(u.child.flags|=8192),E_(u,u.updateQueue),Gn(u),null);case 4:return oe(),i===null&&E1(u.stateNode.containerInfo),Gn(u),null;case 10:return no(u.type),Gn(u),null;case 19:if(Y(xr),y=u.memoizedState,y===null)return Gn(u),null;if(A=(u.flags&128)!==0,R=y.rendering,R===null)if(A)Vd(y,!1);else{if(hr!==0||i!==null&&(i.flags&128)!==0)for(i=u.child;i!==null;){if(R=h_(i),R!==null){for(u.flags|=128,Vd(y,!1),i=R.updateQueue,u.updateQueue=i,E_(u,i),u.subtreeFlags=0,i=p,p=u.child;p!==null;)uw(p,i),p=p.sibling;return V(xr,xr.current&1|2),cn&&eo(u,y.treeForkCount),u.child}i=i.sibling}y.tail!==null&&tt()>T_&&(u.flags|=128,A=!0,Vd(y,!1),u.lanes=4194304)}else{if(!A)if(i=h_(R),i!==null){if(u.flags|=128,A=!0,i=i.updateQueue,u.updateQueue=i,E_(u,i),Vd(y,!0),y.tail===null&&y.tailMode==="hidden"&&!R.alternate&&!cn)return Gn(u),null}else 2*tt()-y.renderingStartTime>T_&&p!==536870912&&(u.flags|=128,A=!0,Vd(y,!1),u.lanes=4194304);y.isBackwards?(R.sibling=u.child,u.child=R):(i=y.last,i!==null?i.sibling=R:u.child=R,y.last=R)}return y.tail!==null?(i=y.tail,y.rendering=i,y.tail=i.sibling,y.renderingStartTime=tt(),i.sibling=null,p=xr.current,V(xr,A?p&1|2:p&1),cn&&eo(u,y.treeForkCount),i):(Gn(u),null);case 22:case 23:return ai(u),Ng(),y=u.memoizedState!==null,i!==null?i.memoizedState!==null!==y&&(u.flags|=8192):y&&(u.flags|=8192),y?(p&536870912)!==0&&(u.flags&128)===0&&(Gn(u),u.subtreeFlags&6&&(u.flags|=8192)):Gn(u),p=u.updateQueue,p!==null&&E_(u,p.retryQueue),p=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(p=i.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048),i!==null&&Y(ec),null;case 24:return p=null,i!==null&&(p=i.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),no(Nr),Gn(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function fL(i,u){switch(fg(u),u.tag){case 1:return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 3:return no(Nr),oe(),i=u.flags,(i&65536)!==0&&(i&128)===0?(u.flags=i&-65537|128,u):null;case 26:case 27:case 5:return _e(u),null;case 31:if(u.memoizedState!==null){if(ai(u),u.alternate===null)throw Error(r(340));Zl()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 13:if(ai(u),i=u.memoizedState,i!==null&&i.dehydrated!==null){if(u.alternate===null)throw Error(r(340));Zl()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 19:return Y(xr),null;case 4:return oe(),null;case 10:return no(u.type),null;case 22:case 23:return ai(u),Ng(),i!==null&&Y(ec),i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 24:return no(Nr),null;case 25:return null;default:return null}}function I5(i,u){switch(fg(u),u.tag){case 3:no(Nr),oe();break;case 26:case 27:case 5:_e(u);break;case 4:oe();break;case 31:u.memoizedState!==null&&ai(u);break;case 13:ai(u);break;case 19:Y(xr);break;case 10:no(u.type);break;case 22:case 23:ai(u),Ng(),i!==null&&Y(ec);break;case 24:no(Nr)}}function Wd(i,u){try{var p=u.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var A=y.next;p=A;do{if((p.tag&i)===i){y=void 0;var R=p.create,K=p.inst;y=R(),K.destroy=y}p=p.next}while(p!==A)}}catch(ee){zn(u,u.return,ee)}}function Jo(i,u,p){try{var y=u.updateQueue,A=y!==null?y.lastEffect:null;if(A!==null){var R=A.next;y=R;do{if((y.tag&i)===i){var K=y.inst,ee=K.destroy;if(ee!==void 0){K.destroy=void 0,A=u;var he=p,ye=ee;try{ye()}catch(Te){zn(A,he,Te)}}}y=y.next}while(y!==R)}}catch(Te){zn(u,u.return,Te)}}function B5(i){var u=i.updateQueue;if(u!==null){var p=i.stateNode;try{zw(u,p)}catch(y){zn(i,i.return,y)}}}function $5(i,u,p){p.props=ic(i.type,i.memoizedProps),p.state=i.memoizedState;try{p.componentWillUnmount()}catch(y){zn(i,u,y)}}function Kd(i,u){try{var p=i.ref;if(p!==null){switch(i.tag){case 26:case 27:case 5:var y=i.stateNode;break;case 30:y=i.stateNode;break;default:y=i.stateNode}typeof p=="function"?i.refCleanup=p(y):p.current=y}}catch(A){zn(i,u,A)}}function ya(i,u){var p=i.ref,y=i.refCleanup;if(p!==null)if(typeof y=="function")try{y()}catch(A){zn(i,u,A)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(A){zn(i,u,A)}else p.current=null}function H5(i){var u=i.type,p=i.memoizedProps,y=i.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&y.focus();break e;case"img":p.src?y.src=p.src:p.srcSet&&(y.srcset=p.srcSet)}}catch(A){zn(i,i.return,A)}}function i1(i,u,p){try{var y=i.stateNode;DL(y,i.type,p,u),y[Mn]=u}catch(A){zn(i,i.return,A)}}function P5(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&al(i.type)||i.tag===4}function a1(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||P5(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&al(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function o1(i,u,p){var y=i.tag;if(y===5||y===6)i=i.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(i,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(i),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=Hs));else if(y!==4&&(y===27&&al(i.type)&&(p=i.stateNode,u=null),i=i.child,i!==null))for(o1(i,u,p),i=i.sibling;i!==null;)o1(i,u,p),i=i.sibling}function N_(i,u,p){var y=i.tag;if(y===5||y===6)i=i.stateNode,u?p.insertBefore(i,u):p.appendChild(i);else if(y!==4&&(y===27&&al(i.type)&&(p=i.stateNode),i=i.child,i!==null))for(N_(i,u,p),i=i.sibling;i!==null;)N_(i,u,p),i=i.sibling}function F5(i){var u=i.stateNode,p=i.memoizedProps;try{for(var y=i.type,A=u.attributes;A.length;)u.removeAttributeNode(A[0]);is(u,y,p),u[Sn]=i,u[Mn]=p}catch(R){zn(i,i.return,R)}}var oo=!1,Ar=!1,l1=!1,U5=typeof WeakSet=="function"?WeakSet:Set,Yr=null;function hL(i,u){if(i=i.containerInfo,j1=K_,i=Er(i),Uo(i)){if("selectionStart"in i)var p={start:i.selectionStart,end:i.selectionEnd};else e:{p=(p=i.ownerDocument)&&p.defaultView||window;var y=p.getSelection&&p.getSelection();if(y&&y.rangeCount!==0){p=y.anchorNode;var A=y.anchorOffset,R=y.focusNode;y=y.focusOffset;try{p.nodeType,R.nodeType}catch{p=null;break e}var K=0,ee=-1,he=-1,ye=0,Te=0,Le=i,Se=null;t:for(;;){for(var Ae;Le!==p||A!==0&&Le.nodeType!==3||(ee=K+A),Le!==R||y!==0&&Le.nodeType!==3||(he=K+y),Le.nodeType===3&&(K+=Le.nodeValue.length),(Ae=Le.firstChild)!==null;)Se=Le,Le=Ae;for(;;){if(Le===i)break t;if(Se===p&&++ye===A&&(ee=K),Se===R&&++Te===y&&(he=K),(Ae=Le.nextSibling)!==null)break;Le=Se,Se=Le.parentNode}Le=Ae}p=ee===-1||he===-1?null:{start:ee,end:he}}else p=null}p=p||{start:0,end:0}}else p=null;for(A1={focusedElem:i,selectionRange:p},K_=!1,Yr=u;Yr!==null;)if(u=Yr,i=u.child,(u.subtreeFlags&1028)!==0&&i!==null)i.return=u,Yr=i;else for(;Yr!==null;){switch(u=Yr,R=u.alternate,i=u.flags,u.tag){case 0:if((i&4)!==0&&(i=u.updateQueue,i=i!==null?i.events:null,i!==null))for(p=0;p title"))),is(R,y,p),R[Sn]=i,Ze(R),y=R;break e;case"link":var K=Y3("link","href",A).get(y+(p.href||""));if(K){for(var ee=0;eeOn&&(K=On,On=zt,zt=K);var be=ga(ee,zt),pe=ga(ee,On);if(be&&pe&&(Ae.rangeCount!==1||Ae.anchorNode!==be.node||Ae.anchorOffset!==be.offset||Ae.focusNode!==pe.node||Ae.focusOffset!==pe.offset)){var xe=Le.createRange();xe.setStart(be.node,be.offset),Ae.removeAllRanges(),zt>On?(Ae.addRange(xe),Ae.extend(pe.node,pe.offset)):(xe.setEnd(pe.node,pe.offset),Ae.addRange(xe))}}}}for(Le=[],Ae=ee;Ae=Ae.parentNode;)Ae.nodeType===1&&Le.push({element:Ae,left:Ae.scrollLeft,top:Ae.scrollTop});for(typeof ee.focus=="function"&&ee.focus(),ee=0;eep?32:p,G.T=null,p=p1,p1=null;var R=rl,K=ho;if(Hr=0,_u=rl=null,ho=0,(vn&6)!==0)throw Error(r(331));var ee=vn;if(vn|=4,e3(R.current),Z5(R,R.current,K,p),vn=ee,ef(0,!1),fn&&typeof fn.onPostCommitFiberRoot=="function")try{fn.onPostCommitFiberRoot(Wt,R)}catch{}return!0}finally{X.p=A,G.T=y,b3(i,u)}}function x3(i,u,p){u=Mi(p,u),u=Kg(i.stateNode,u,2),i=Xo(i,u,2),i!==null&&(it(i,2),wa(i))}function zn(i,u,p){if(i.tag===3)x3(i,i,p);else for(;u!==null;){if(u.tag===3){x3(u,i,p);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(nl===null||!nl.has(y))){i=Mi(p,i),p=y5(2),y=Xo(u,p,2),y!==null&&(w5(p,y,u,i),it(y,2),wa(y));break}}u=u.return}}function v1(i,u,p){var y=i.pingCache;if(y===null){y=i.pingCache=new mL;var A=new Set;y.set(u,A)}else A=y.get(u),A===void 0&&(A=new Set,y.set(u,A));A.has(p)||(d1=!0,A.add(p),i=yL.bind(null,i,u,p),u.then(i,i))}function yL(i,u,p){var y=i.pingCache;y!==null&&y.delete(u),i.pingedLanes|=i.suspendedLanes&p,i.warmLanes&=~p,$n===i&&(on&p)===p&&(hr===4||hr===3&&(on&62914560)===on&&300>tt()-A_?(vn&2)===0&&pu(i,0):f1|=p,hu===on&&(hu=0)),wa(i)}function y3(i,u){u===0&&(u=Bt()),i=Yl(i,u),i!==null&&(it(i,u),wa(i))}function wL(i){var u=i.memoizedState,p=0;u!==null&&(p=u.retryLane),y3(i,p)}function SL(i,u){var p=0;switch(i.tag){case 31:case 13:var y=i.stateNode,A=i.memoizedState;A!==null&&(p=A.retryLane);break;case 19:y=i.stateNode;break;case 22:y=i.stateNode._retryCache;break;default:throw Error(r(314))}y!==null&&y.delete(u),y3(i,p)}function kL(i,u){return qe(i,u)}var I_=null,gu=null,x1=!1,B_=!1,y1=!1,il=0;function wa(i){i!==gu&&i.next===null&&(gu===null?I_=gu=i:gu=gu.next=i),B_=!0,x1||(x1=!0,EL())}function ef(i,u){if(!y1&&B_){y1=!0;do for(var p=!1,y=I_;y!==null;){if(i!==0){var A=y.pendingLanes;if(A===0)var R=0;else{var K=y.suspendedLanes,ee=y.pingedLanes;R=(1<<31-At(42|i)+1)-1,R&=A&~(K&~ee),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(p=!0,C3(y,R))}else R=on,R=An(y,y===$n?R:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(R&3)===0||rr(y,R)||(p=!0,C3(y,R));y=y.next}while(p);y1=!1}}function CL(){w3()}function w3(){B_=x1=!1;var i=0;il!==0&&OL()&&(i=il);for(var u=tt(),p=null,y=I_;y!==null;){var A=y.next,R=S3(y,u);R===0?(y.next=null,p===null?I_=A:p.next=A,A===null&&(gu=p)):(p=y,(i!==0||(R&3)!==0)&&(B_=!0)),y=A}Hr!==0&&Hr!==5||ef(i),il!==0&&(il=0)}function S3(i,u){for(var p=i.suspendedLanes,y=i.pingedLanes,A=i.expirationTimes,R=i.pendingLanes&-62914561;0ee)break;var Te=he.transferSize,Le=he.initiatorType;Te&&R3(Le)&&(he=he.responseEnd,K+=Te*(he"u"?null:document;function G3(i,u,p){var y=bu;if(y&&typeof u=="string"&&u){var A=mr(u);A='link[rel="'+i+'"][href="'+A+'"]',typeof p=="string"&&(A+='[crossorigin="'+p+'"]'),q3.has(A)||(q3.add(A),i={rel:i,crossOrigin:p,href:u},y.querySelector(A)===null&&(u=y.createElement("link"),is(u,"link",i),Ze(u),y.head.appendChild(u)))}}function GL(i){_o.D(i),G3("dns-prefetch",i,null)}function VL(i,u){_o.C(i,u),G3("preconnect",i,u)}function WL(i,u,p){_o.L(i,u,p);var y=bu;if(y&&i&&u){var A='link[rel="preload"][as="'+mr(u)+'"]';u==="image"&&p&&p.imageSrcSet?(A+='[imagesrcset="'+mr(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(A+='[imagesizes="'+mr(p.imageSizes)+'"]')):A+='[href="'+mr(i)+'"]';var R=A;switch(u){case"style":R=vu(i);break;case"script":R=xu(i)}Bi.has(R)||(i=h({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:i,as:u},p),Bi.set(R,i),y.querySelector(A)!==null||u==="style"&&y.querySelector(sf(R))||u==="script"&&y.querySelector(af(R))||(u=y.createElement("link"),is(u,"link",i),Ze(u),y.head.appendChild(u)))}}function KL(i,u){_o.m(i,u);var p=bu;if(p&&i){var y=u&&typeof u.as=="string"?u.as:"script",A='link[rel="modulepreload"][as="'+mr(y)+'"][href="'+mr(i)+'"]',R=A;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=xu(i)}if(!Bi.has(R)&&(i=h({rel:"modulepreload",href:i},u),Bi.set(R,i),p.querySelector(A)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(af(R)))return}y=p.createElement("link"),is(y,"link",i),Ze(y),p.head.appendChild(y)}}}function YL(i,u,p){_o.S(i,u,p);var y=bu;if(y&&i){var A=Un(y).hoistableStyles,R=vu(i);u=u||"default";var K=A.get(R);if(!K){var ee={loading:0,preload:null};if(K=y.querySelector(sf(R)))ee.loading=5;else{i=h({rel:"stylesheet",href:i,"data-precedence":u},p),(p=Bi.get(R))&&I1(i,p);var he=K=y.createElement("link");Ze(he),is(he,"link",i),he._p=new Promise(function(ye,Te){he.onload=ye,he.onerror=Te}),he.addEventListener("load",function(){ee.loading|=1}),he.addEventListener("error",function(){ee.loading|=2}),ee.loading|=4,U_(K,u,y)}K={type:"stylesheet",instance:K,count:1,state:ee},A.set(R,K)}}}function XL(i,u){_o.X(i,u);var p=bu;if(p&&i){var y=Un(p).hoistableScripts,A=xu(i),R=y.get(A);R||(R=p.querySelector(af(A)),R||(i=h({src:i,async:!0},u),(u=Bi.get(A))&&B1(i,u),R=p.createElement("script"),Ze(R),is(R,"link",i),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},y.set(A,R))}}function ZL(i,u){_o.M(i,u);var p=bu;if(p&&i){var y=Un(p).hoistableScripts,A=xu(i),R=y.get(A);R||(R=p.querySelector(af(A)),R||(i=h({src:i,async:!0,type:"module"},u),(u=Bi.get(A))&&B1(i,u),R=p.createElement("script"),Ze(R),is(R,"link",i),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},y.set(A,R))}}function V3(i,u,p,y){var A=(A=ae.current)?F_(A):null;if(!A)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=vu(p.href),p=Un(A).hoistableStyles,y=p.get(u),y||(y={type:"style",instance:null,count:0,state:null},p.set(u,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){i=vu(p.href);var R=Un(A).hoistableStyles,K=R.get(i);if(K||(A=A.ownerDocument||A,K={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(i,K),(R=A.querySelector(sf(i)))&&!R._p&&(K.instance=R,K.state.loading=5),Bi.has(i)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},Bi.set(i,p),R||QL(A,i,p,K.state))),u&&y===null)throw Error(r(528,""));return K}if(u&&y!==null)throw Error(r(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=xu(p),p=Un(A).hoistableScripts,y=p.get(u),y||(y={type:"script",instance:null,count:0,state:null},p.set(u,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function vu(i){return'href="'+mr(i)+'"'}function sf(i){return'link[rel="stylesheet"]['+i+"]"}function W3(i){return h({},i,{"data-precedence":i.precedence,precedence:null})}function QL(i,u,p,y){i.querySelector('link[rel="preload"][as="style"]['+u+"]")?y.loading=1:(u=i.createElement("link"),y.preload=u,u.addEventListener("load",function(){return y.loading|=1}),u.addEventListener("error",function(){return y.loading|=2}),is(u,"link",p),Ze(u),i.head.appendChild(u))}function xu(i){return'[src="'+mr(i)+'"]'}function af(i){return"script[async]"+i}function K3(i,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var y=i.querySelector('style[data-href~="'+mr(p.href)+'"]');if(y)return u.instance=y,Ze(y),y;var A=h({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return y=(i.ownerDocument||i).createElement("style"),Ze(y),is(y,"style",A),U_(y,p.precedence,i),u.instance=y;case"stylesheet":A=vu(p.href);var R=i.querySelector(sf(A));if(R)return u.state.loading|=4,u.instance=R,Ze(R),R;y=W3(p),(A=Bi.get(A))&&I1(y,A),R=(i.ownerDocument||i).createElement("link"),Ze(R);var K=R;return K._p=new Promise(function(ee,he){K.onload=ee,K.onerror=he}),is(R,"link",y),u.state.loading|=4,U_(R,p.precedence,i),u.instance=R;case"script":return R=xu(p.src),(A=i.querySelector(af(R)))?(u.instance=A,Ze(A),A):(y=p,(A=Bi.get(R))&&(y=h({},p),B1(y,A)),i=i.ownerDocument||i,A=i.createElement("script"),Ze(A),is(A,"link",y),i.head.appendChild(A),u.instance=A);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(y=u.instance,u.state.loading|=4,U_(y,p.precedence,i));return u.instance}function U_(i,u,p){for(var y=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),A=y.length?y[y.length-1]:null,R=A,K=0;K title"):null)}function JL(i,u,p){if(p===1||u.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return i=u.disabled,typeof u.precedence=="string"&&i==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function Z3(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function eO(i,u,p,y){if(p.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var A=vu(y.href),R=u.querySelector(sf(A));if(R){u=R._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(i.count++,i=G_.bind(i),u.then(i,i)),p.state.loading|=4,p.instance=R,Ze(R);return}R=u.ownerDocument||u,y=W3(y),(A=Bi.get(A))&&I1(y,A),R=R.createElement("link"),Ze(R);var K=R;K._p=new Promise(function(ee,he){K.onload=ee,K.onerror=he}),is(R,"link",y),p.instance=R}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(p,u),(u=p.state.preload)&&(p.state.loading&3)===0&&(i.count++,p=G_.bind(i),u.addEventListener("load",p),u.addEventListener("error",p))}}var $1=0;function tO(i,u){return i.stylesheets&&i.count===0&&W_(i,i.stylesheets),0$1?50:800)+u);return i.unsuspend=p,function(){i.unsuspend=null,clearTimeout(y),clearTimeout(A)}}:null}function G_(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)W_(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var V_=null;function W_(i,u){i.stylesheets=null,i.unsuspend!==null&&(i.count++,V_=new Map,u.forEach(nO,i),V_=null,G_.call(i))}function nO(i,u){if(!(u.state.loading&4)){var p=V_.get(i);if(p)var y=p.get(null);else{p=new Map,V_.set(i,p);for(var A=i.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),K1.exports=gO(),K1.exports}var vO=bO();const xO={},yO="en",wx=["en","zh-CN","fa"],fE="orx:locale",Sx=["localStorage","preferredLanguage","baseLocale"],k6=[],Ff=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let C6=!1,E=()=>{var t;let e=Sx;!Ff&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=pE(window.location.href));const n=wO(e);if(n)return C6||(C6=!0,hE(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function wO(e,n){let t;for(const r of e){if(r==="baseLocale")t=yO;else if(r==="preferredLanguage"&&!Ff)t=NO();else if(r==="localStorage"&&!Ff)t=localStorage.getItem(fE)??void 0;else if(mE(r)&&rp.has(r)){const a=rp.get(r);if(a){const l=a.getLocale();if(l instanceof Promise)continue;if(l!==void 0)return CO(l)}}const s=Uf(t);if(s)return s}}const SO=e=>{window.location.reload()};let hE=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=E()}catch{}const s=[];let a=Sx;!Ff&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(a=pE(window.location.href));for(const c of a)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(fE,e);else if(mE(c)&&rp.has(c)){const d=rp.get(c);if(d){let _=d.setLocale(e);_ instanceof Promise&&(_=_.catch(h=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:h})}),s.push(_))}}}const l=()=>{!Ff&&t.reload&&window.location&&e!==r&&SO()};if(s.length)return Promise.all(s).then(()=>{l()});l()},kO=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function Uf(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of wx)if(t.toLowerCase()===n)return t}function _E(e){return!!e&&wx.some(n=>n===e)}function CO(e){const n=Uf(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${wx.join(", ")}`)}function EO(e,n){return e.exec(n.href)}function NO(){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=Uf(t.fullTag);if(r)return r;const s=Uf(t.baseTag);if(s)return s}}function zO(e){return jO(e)}function jO(e){const n=typeof e=="string"?new URL(e,kO()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&Uf(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let E6,N6;function AO(e){if(k6.length===0)return;const n=typeof e=="string"?e:e.href;if(E6===n)return N6;const t=new URL(n,"http://example.com"),r=zO(t),s=r.href===t.href?[t]:[t,r];let a;for(const l of s){for(const o of k6){const c=new xO(o.match,l.href);if(EO(c,l)){a=o;break}}if(a)break}return E6=n,N6=a,a}function pE(e){const n=AO(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:Sx}const rp=new Map;function mE(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const TO=e=>`Actions for ${e==null?void 0:e.name}`,MO=e=>`${e==null?void 0:e.name} 的操作`,RO=e=>`عملیات ${e==null?void 0:e.name}`,DO=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MO(e):t==="fa"?RO(e):TO(e)}),LO=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,OO=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,IO=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,BO=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OO(e):t==="fa"?IO(e):LO(e)}),$O=e=>`Branch: ${e==null?void 0:e.branch}`,HO=e=>`分支:${e==null?void 0:e.branch}`,PO=e=>`شاخه: ${e==null?void 0:e.branch}`,FO=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HO(e):t==="fa"?PO(e):$O(e)}),UO=e=>`Browse code on ${e==null?void 0:e.branch}`,qO=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,GO=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,gE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qO(e):t==="fa"?GO(e):UO(e)}),VO=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,WO=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,KO=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,YO=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WO(e):t==="fa"?KO(e):VO(e)}),XO=e=>`Collapse ${e==null?void 0:e.name}`,ZO=e=>`折叠 ${e==null?void 0:e.name}`,QO=e=>`بستن ${e==null?void 0:e.name}`,JO=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZO(e):t==="fa"?QO(e):XO(e)}),eI=e=>`Committed changes versus ${e==null?void 0:e.parent}`,tI=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,nI=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,rI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tI(e):t==="fa"?nI(e):eI(e)}),sI=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,iI=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,aI=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,oI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iI(e):t==="fa"?aI(e):sI(e)}),lI=e=>`Copy ${e==null?void 0:e.value}`,cI=e=>`复制 ${e==null?void 0:e.value}`,uI=e=>`کپی ${e==null?void 0:e.value}`,dI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cI(e):t==="fa"?uI(e):lI(e)}),fI=e=>`Delete ${e==null?void 0:e.name}`,hI=e=>`删除 ${e==null?void 0:e.name}`,_I=e=>`حذف ${e==null?void 0:e.name}`,Rv=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hI(e):t==="fa"?_I(e):fI(e)}),pI=e=>`Download ${e==null?void 0:e.name}`,mI=e=>`下载 ${e==null?void 0:e.name}`,gI=e=>`بارگیری ${e==null?void 0:e.name}`,z6=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mI(e):t==="fa"?gI(e):pI(e)}),bI=e=>`Expand ${e==null?void 0:e.name}`,vI=e=>`展开 ${e==null?void 0:e.name}`,xI=e=>`باز کردن ${e==null?void 0:e.name}`,yI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vI(e):t==="fa"?xI(e):bI(e)}),wI=e=>`Hide additional ${e==null?void 0:e.target}`,SI=e=>`隐藏其余${e==null?void 0:e.target}`,kI=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,CI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SI(e):t==="fa"?kI(e):wI(e)}),EI=e=>`Hide error details for ${e==null?void 0:e.activity}`,NI=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,zI=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,jI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NI(e):t==="fa"?zI(e):EI(e)}),AI=e=>`${e==null?void 0:e.count} consecutive identical calls`,TI=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,MI=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,RI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TI(e):t==="fa"?MI(e):AI(e)}),DI=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,LI=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,OI=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,II=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LI(e):t==="fa"?OI(e):DI(e)}),BI=e=>`Open ${e==null?void 0:e.branch} on GitHub`,$I=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,HI=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,bE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$I(e):t==="fa"?HI(e):BI(e)}),PI=e=>`Open experiment ${e==null?void 0:e.name}`,FI=e=>`打开实验 ${e==null?void 0:e.name}`,UI=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,qI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FI(e):t==="fa"?UI(e):PI(e)}),GI=e=>`Open ${e==null?void 0:e.path} in the right pane`,VI=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,WI=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,KI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?VI(e):t==="fa"?WI(e):GI(e)}),YI=e=>`Open ${e==null?void 0:e.name}`,XI=e=>`打开 ${e==null?void 0:e.name}`,ZI=e=>`باز کردن ${e==null?void 0:e.name}`,QI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XI(e):t==="fa"?ZI(e):YI(e)}),JI=e=>`Open logs for run ${e==null?void 0:e.run}`,eB=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,tB=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,nB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eB(e):t==="fa"?tB(e):JI(e)}),rB=e=>`Open ${e==null?void 0:e.name} on GitHub`,sB=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,iB=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,sp=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sB(e):t==="fa"?iB(e):rB(e)}),aB=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,oB=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,lB=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,cB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oB(e):t==="fa"?lB(e):aB(e)}),uB=e=>`Overleaf — ${e==null?void 0:e.status}`,dB=e=>`Overleaf — ${e==null?void 0:e.status}`,fB=e=>`Overleaf — ${e==null?void 0:e.status}`,hB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dB(e):t==="fa"?fB(e):uB(e)}),_B=e=>`Preview /${e==null?void 0:e.name} skill`,pB=e=>`预览 /${e==null?void 0:e.name} 技能`,mB=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,gB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pB(e):t==="fa"?mB(e):_B(e)}),bB=e=>`Remove annotation ${e==null?void 0:e.number}`,vB=e=>`移除批注 ${e==null?void 0:e.number}`,xB=e=>`حذف یادداشت ${e==null?void 0:e.number}`,yB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vB(e):t==="fa"?xB(e):bB(e)}),wB=e=>`Remove ${e==null?void 0:e.name}`,SB=e=>`移除 ${e==null?void 0:e.name}`,kB=e=>`حذف ${e==null?void 0:e.name}`,CB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SB(e):t==="fa"?kB(e):wB(e)}),EB=e=>`Remove queued message: ${e==null?void 0:e.text}`,NB=e=>`移除排队消息:${e==null?void 0:e.text}`,zB=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,jB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NB(e):t==="fa"?zB(e):EB(e)}),AB=e=>`Retry queued message: ${e==null?void 0:e.text}`,TB=e=>`重试排队消息:${e==null?void 0:e.text}`,MB=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,RB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TB(e):t==="fa"?MB(e):AB(e)}),DB=e=>`Run ${e==null?void 0:e.id}`,LB=e=>`运行 ${e==null?void 0:e.id}`,OB=e=>`اجرای ${e==null?void 0:e.id}`,IB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LB(e):t==="fa"?OB(e):DB(e)}),BB=e=>`Show error details for ${e==null?void 0:e.activity}`,$B=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,HB=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,PB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$B(e):t==="fa"?HB(e):BB(e)}),FB=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,UB=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,qB=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,GB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UB(e):t==="fa"?qB(e):FB(e)}),VB=e=>`${e==null?void 0:e.name} skill`,WB=e=>`${e==null?void 0:e.name} 技能`,KB=e=>`مهارت ${e==null?void 0:e.name}`,YB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WB(e):t==="fa"?KB(e):VB(e)}),XB=e=>`Value for ${e==null?void 0:e.name}`,ZB=e=>`${e==null?void 0:e.name} 的值`,QB=e=>`مقدار ${e==null?void 0:e.name}`,JB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZB(e):t==="fa"?QB(e):XB(e)}),e$=()=>"Agent reported back",t$=()=>"智能体已返回结果",n$=()=>"عامل نتیجه را گزارش کرد",r$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t$():t==="fa"?n$():e$()}),s$=()=>"Browse",i$=()=>"浏览",a$=()=>"مرور",o$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i$():t==="fa"?a$():s$()}),l$=()=>"Browsing…",c$=()=>"正在浏览…",u$=()=>"در حال مرور…",d$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c$():t==="fa"?u$():l$()}),f$=()=>"Checked experiment status and updated notes",h$=()=>"已检查实验状态并更新笔记",_$=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",p$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h$():t==="fa"?_$():f$()}),m$=()=>"Closed an agent",g$=()=>"已关闭智能体",b$=()=>"عامل بسته شد",v$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g$():t==="fa"?b$():m$()}),x$=()=>"Compacted context",y$=()=>"上下文已压缩",w$=()=>"زمینه فشرده شد",S$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y$():t==="fa"?w$():x$()}),k$=()=>"Compacting context…",C$=()=>"正在压缩上下文…",E$=()=>"در حال فشرده‌سازی زمینه…",N$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C$():t==="fa"?E$():k$()}),z$=e=>`Created ${e==null?void 0:e.target}`,j$=e=>`已创建 ${e==null?void 0:e.target}`,A$=e=>`${e==null?void 0:e.target} ایجاد شد`,T$=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?j$(e):t==="fa"?A$(e):z$(e)}),M$=()=>"Delegate",R$=()=>"委派",D$=()=>"واگذاری",L$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R$():t==="fa"?D$():M$()}),O$=()=>"Delegating…",I$=()=>"正在委派…",B$=()=>"در حال واگذاری…",$$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I$():t==="fa"?B$():O$()}),H$=e=>`Deleted ${e==null?void 0:e.target}`,P$=e=>`已删除 ${e==null?void 0:e.target}`,F$=e=>`${e==null?void 0:e.target} حذف شد`,U$=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?P$(e):t==="fa"?F$(e):H$(e)}),q$=()=>"Edit",G$=()=>"编辑",V$=()=>"ویرایش",W$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G$():t==="fa"?V$():q$()}),K$=e=>`Edited ${e==null?void 0:e.target}`,Y$=e=>`已编辑 ${e==null?void 0:e.target}`,X$=e=>`${e==null?void 0:e.target} ویرایش شد`,Z$=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Y$(e):t==="fa"?X$(e):K$(e)}),Q$=()=>"Editing…",J$=()=>"正在编辑…",eH=()=>"در حال ویرایش…",tH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J$():t==="fa"?eH():Q$()}),nH=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,rH=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,sH=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,iH=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rH(e):t==="fa"?sH(e):nH(e)}),aH=e=>`Listed files matching ${e==null?void 0:e.pattern}`,oH=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,lH=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,cH=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oH(e):t==="fa"?lH(e):aH(e)}),uH=()=>"Load",dH=()=>"加载",fH=()=>"بارگیری",hH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dH():t==="fa"?fH():uH()}),_H=()=>"Loaded a skill",pH=()=>"已加载技能",mH=()=>"یک مهارت بارگیری شد",gH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pH():t==="fa"?mH():_H()}),bH=e=>`Loaded ${e==null?void 0:e.name} skill`,vH=e=>`已加载技能 ${e==null?void 0:e.name}`,xH=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,yH=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vH(e):t==="fa"?xH(e):bH(e)}),wH=()=>"Loading…",SH=()=>"正在加载…",kH=()=>"در حال بارگیری…",CH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SH():t==="fa"?kH():wH()}),EH=e=>`Opened ${e==null?void 0:e.target}`,NH=e=>`已打开 ${e==null?void 0:e.target}`,zH=e=>`${e==null?void 0:e.target} باز شد`,jH=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NH(e):t==="fa"?zH(e):EH(e)}),AH=e=>`Ran ${e==null?void 0:e.command}`,TH=e=>`已运行 ${e==null?void 0:e.command}`,MH=e=>`${e==null?void 0:e.command} اجرا شد`,RH=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TH(e):t==="fa"?MH(e):AH(e)}),DH=()=>"Ran a sub-agent",LH=()=>"已运行子智能体",OH=()=>"یک عامل فرعی اجرا شد",IH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LH():t==="fa"?OH():DH()}),BH=()=>"Read",$H=()=>"读取",HH=()=>"خواندن",PH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$H():t==="fa"?HH():BH()}),FH=()=>"Read experiment notes",UH=()=>"已读取实验笔记",qH=()=>"یادداشت‌های آزمایش خوانده شد",GH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UH():t==="fa"?qH():FH()}),VH=()=>"Read a paper",WH=()=>"已读取论文",KH=()=>"یک مقاله خوانده شد",YH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WH():t==="fa"?KH():VH()}),XH=e=>`Read ${e==null?void 0:e.name} skill`,ZH=e=>`已读取技能 ${e==null?void 0:e.name}`,QH=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,Q1=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZH(e):t==="fa"?QH(e):XH(e)}),JH=e=>`Read ${e==null?void 0:e.target}`,eP=e=>`已读取 ${e==null?void 0:e.target}`,tP=e=>`${e==null?void 0:e.target} خوانده شد`,hf=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eP(e):t==="fa"?tP(e):JH(e)}),nP=()=>"Read a web page",rP=()=>"已读取网页",sP=()=>"یک صفحهٔ وب خوانده شد",iP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rP():t==="fa"?sP():nP()}),aP=()=>"Reading…",oP=()=>"正在读取…",lP=()=>"در حال خواندن…",cP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oP():t==="fa"?lP():aP()}),uP=()=>"Resumed an agent",dP=()=>"已恢复智能体",fP=()=>"عامل از سر گرفته شد",hP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dP():t==="fa"?fP():uP()}),_P=()=>"Review",pP=()=>"查看",mP=()=>"بازبینی",gP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pP():t==="fa"?mP():_P()}),bP=()=>"Reviewed run log",vP=()=>"已查看运行日志",xP=()=>"گزارش اجرا بازبینی شد",yP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vP():t==="fa"?xP():bP()}),wP=()=>"Reviewed run logs",SP=()=>"已查看运行日志",kP=()=>"گزارش‌های اجرا بازبینی شد",CP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SP():t==="fa"?kP():wP()}),EP=()=>"Reviewed experiment status and notes",NP=()=>"已查看实验状态和笔记",zP=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",jP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NP():t==="fa"?zP():EP()}),AP=()=>"Reviewing…",TP=()=>"正在查看…",MP=()=>"در حال بازبینی…",RP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TP():t==="fa"?MP():AP()}),DP=()=>"Run",LP=()=>"运行",OP=()=>"اجرا",IP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LP():t==="fa"?OP():DP()}),BP=()=>"Running…",$P=()=>"正在运行…",HP=()=>"در حال اجرا…",vE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$P():t==="fa"?HP():BP()}),PP=()=>"Search",FP=()=>"搜索",UP=()=>"جست‌وجو",qP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FP():t==="fa"?UP():PP()}),GP=()=>"Searched alphaXiv full text",VP=()=>"已搜索 alphaXiv 全文",WP=()=>"متن کامل alphaXiv جست‌وجو شد",KP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VP():t==="fa"?WP():GP()}),YP=()=>"Searched alphaXiv semantically",XP=()=>"已对 alphaXiv 进行语义搜索",ZP=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",QP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XP():t==="fa"?ZP():YP()}),JP=()=>"Searched bioRxiv",eF=()=>"已搜索 bioRxiv",tF=()=>"bioRxiv جست‌وجو شد",nF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eF():t==="fa"?tF():JP()}),rF=()=>"Searched code",sF=()=>"已搜索代码",iF=()=>"کد جست‌وجو شد",J1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sF():t==="fa"?iF():rF()}),aF=e=>`Searched code for “${e==null?void 0:e.pattern}”`,oF=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,lF=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,eb=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oF(e):t==="fa"?lF(e):aF(e)}),cF=e=>`Searched images for “${e==null?void 0:e.query}”`,uF=e=>`已搜索图片“${e==null?void 0:e.query}”`,dF=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,fF=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uF(e):t==="fa"?dF(e):cF(e)}),hF=()=>"Searched the literature",_F=()=>"已搜索文献",pF=()=>"منابع علمی جست‌وجو شد",j6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_F():t==="fa"?pF():hF()}),mF=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,gF=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,bF=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,vF=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gF(e):t==="fa"?bF(e):mF(e)}),xF=()=>"Searched OpenAlex",yF=()=>"已搜索 OpenAlex",wF=()=>"OpenAlex جست‌وجو شد",SF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yF():t==="fa"?wF():xF()}),kF=e=>`Searched the web for “${e==null?void 0:e.query}”`,CF=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,EF=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,A6=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?CF(e):t==="fa"?EF(e):kF(e)}),NF=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,zF=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,jF=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,AF=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zF(e):t==="fa"?jF(e):NF(e)}),TF=()=>"Searching…",MF=()=>"正在搜索…",RF=()=>"در حال جست‌وجو…",DF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MF():t==="fa"?RF():TF()}),LF=()=>"Sent input to an agent",OF=()=>"已向智能体发送输入",IF=()=>"ورودی به عامل فرستاده شد",BF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OF():t==="fa"?IF():LF()}),$F=()=>"Spawned an agent",HF=()=>"已创建智能体",PF=()=>"یک عامل ساخته شد",FF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HF():t==="fa"?PF():$F()}),UF=()=>"Sub-agent",qF=()=>"子智能体",GF=()=>"عامل فرعی",VF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qF():t==="fa"?GF():UF()}),WF=()=>"Sub-agent interrupted",KF=()=>"子智能体已中断",YF=()=>"عامل فرعی متوقف شد",XF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KF():t==="fa"?YF():WF()}),ZF=()=>"Sub-agent started",QF=()=>"子智能体已启动",JF=()=>"عامل فرعی آغاز شد",eU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QF():t==="fa"?JF():ZF()}),tU=()=>"Updated experiment notes",nU=()=>"已更新实验笔记",rU=()=>"یادداشت‌های آزمایش به‌روز شد",sU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nU():t==="fa"?rU():tU()}),iU=()=>"Waiting on an agent",aU=()=>"正在等待智能体",oU=()=>"در انتظار عامل",lU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aU():t==="fa"?oU():iU()}),cU=e=>`Approval required: ${e==null?void 0:e.label}`,uU=e=>`需要批准:${e==null?void 0:e.label}`,dU=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,T6=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uU(e):t==="fa"?dU(e):cU(e)}),fU=()=>"The CLI is retrying the turn.",hU=()=>"CLI 正在重试本轮。",_U=()=>"CLI در حال تلاش دوباره برای این نوبت است.",pU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hU():t==="fa"?_U():fU()}),mU=()=>"Continue is available.",gU=()=>"可以继续。",bU=()=>"ادامه در دسترس است.",vU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gU():t==="fa"?bU():mU()}),xU=()=>"Retry is available.",yU=()=>"可以重试。",wU=()=>"تلاش دوباره در دسترس است.",SU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yU():t==="fa"?wU():xU()}),kU=()=>"Running a tool",CU=()=>"正在运行工具",EU=()=>"در حال اجرای ابزار",NU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CU():t==="fa"?EU():kU()}),zU=()=>"Tool activity completed",jU=()=>"工具活动已完成",AU=()=>"فعالیت ابزار کامل شد",TU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jU():t==="fa"?AU():zU()}),MU=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,RU=e=>`工具活动失败:${e==null?void 0:e.labels}`,DU=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,LU=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?RU(e):t==="fa"?DU(e):MU(e)}),OU=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,IU=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,BU=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,$U=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IU(e):t==="fa"?BU(e):OU(e)}),HU=()=>"Turn did not finish.",PU=()=>"本轮未完成。",FU=()=>"این نوبت کامل نشد.",UU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PU():t==="fa"?FU():HU()}),qU=()=>"Artifacts",GU=()=>"产物",VU=()=>"خروجی‌ها",WU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GU():t==="fa"?VU():qU()}),KU=()=>"Close panel",YU=()=>"关闭面板",XU=()=>"بستن پنل",M6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YU():t==="fa"?XU():KU()}),ZU=()=>"Current task",QU=()=>"当前任务",JU=()=>"وظیفهٔ فعلی",R6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QU():t==="fa"?JU():ZU()}),eq=()=>"Drag to resize panel",tq=()=>"拖动以调整面板大小",nq=()=>"برای تغییر اندازهٔ پنل بکشید",rq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tq():t==="fa"?nq():eq()}),sq=()=>"Drag toward the center to restore panel",iq=()=>"向中央拖动以恢复面板",aq=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",oq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iq():t==="fa"?aq():sq()}),lq=()=>"Entire project",cq=()=>"整个项目",uq=()=>"کل پروژه",D6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cq():t==="fa"?uq():lq()}),dq=()=>"Expand panel",fq=()=>"展开面板",hq=()=>"گسترش پنل",L6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fq():t==="fa"?hq():dq()}),_q=e=>`Experiment filter: ${e==null?void 0:e.scope}`,pq=e=>`实验筛选:${e==null?void 0:e.scope}`,mq=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,gq=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pq(e):t==="fa"?mq(e):_q(e)}),bq=()=>"Experiment view",vq=()=>"实验视图",xq=()=>"نمای آزمایش",yq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vq():t==="fa"?xq():bq()}),wq=()=>"Experiments",Sq=()=>"实验",kq=()=>"آزمایش‌ها",Cq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sq():t==="fa"?kq():wq()}),Eq=()=>"Files",Nq=()=>"文件",zq=()=>"فایل‌ها",jq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nq():t==="fa"?zq():Eq()}),Aq=()=>"Filter experiments",Tq=()=>"筛选实验",Mq=()=>"فیلتر آزمایش‌ها",Rq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tq():t==="fa"?Mq():Aq()}),Dq=()=>"Current task filtering is unavailable for unattributed experiments",Lq=()=>"存在无法归属的实验时,不能按当前任务筛选",Oq=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",Iq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lq():t==="fa"?Oq():Dq()}),Bq=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",$q=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",Hq=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Pq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$q():t==="fa"?Hq():Bq()}),Fq=()=>"Open a task to filter to its experiments",Uq=()=>"请打开一个任务以筛选其实验",qq=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",Gq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uq():t==="fa"?qq():Fq()}),Vq=()=>"projects",Wq=()=>"项目",Kq=()=>"پروژه‌ها",Yq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wq():t==="fa"?Kq():Vq()}),Xq=()=>"Restore panel",Zq=()=>"还原面板",Qq=()=>"بازگرداندن اندازهٔ پنل",O6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zq():t==="fa"?Qq():Xq()}),Jq=()=>"Retry",eG=()=>"重试",tG=()=>"تلاش دوباره",zc=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eG():t==="fa"?tG():Jq()}),nG=()=>"Select a project to browse its files.",rG=()=>"选择一个项目以浏览其文件。",sG=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",iG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rG():t==="fa"?sG():nG()}),aG=()=>"settings",oG=()=>"设置",lG=()=>"تنظیمات",cG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oG():t==="fa"?lG():aG()}),uG=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,dG=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,fG=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,hG=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dG(e):t==="fa"?fG(e):uG(e)}),_G=()=>"Sub-agent",pG=()=>"子智能体",mG=()=>"عامل فرعی",gG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pG():t==="fa"?mG():_G()}),bG=()=>"Table",vG=()=>"表格",xG=()=>"جدول",yG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vG():t==="fa"?xG():bG()}),wG=()=>"Tree",SG=()=>"树状图",kG=()=>"درخت",CG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SG():t==="fa"?kG():wG()}),EG=e=>`Collapse ${e==null?void 0:e.name}`,NG=e=>`折叠 ${e==null?void 0:e.name}`,zG=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,jG=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NG(e):t==="fa"?zG(e):EG(e)}),AG=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,TG=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,MG=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,xE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TG(e):t==="fa"?MG(e):AG(e)}),RG=e=>`Delete folder ${e==null?void 0:e.name}`,DG=e=>`删除文件夹 ${e==null?void 0:e.name}`,LG=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,OG=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DG(e):t==="fa"?LG(e):RG(e)}),IG=e=>`Expand ${e==null?void 0:e.name}`,BG=e=>`展开 ${e==null?void 0:e.name}`,$G=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,HG=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BG(e):t==="fa"?$G(e):IG(e)}),PG=()=>"Binary or unsupported file — no inline preview.",FG=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",UG=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",qG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FG():t==="fa"?UG():PG()}),GG=()=>"Copy path",VG=()=>"复制路径",WG=()=>"کپی مسیر",KG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VG():t==="fa"?WG():GG()}),YG=()=>"Artifact not found",XG=()=>"找不到产物",ZG=()=>"خروجی پیدا نشد",QG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XG():t==="fa"?ZG():YG()}),JG=()=>"Open raw",eV=()=>"打开原始文件",tV=()=>"باز کردن فایل خام",nV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eV():t==="fa"?tV():JG()}),rV=()=>"Click an artifact to view it",sV=()=>"点击产物即可查看",iV=()=>"برای مشاهده، یک خروجی را انتخاب کنید",aV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sV():t==="fa"?iV():rV()}),oV=()=>"Copy artifacts directory path",lV=()=>"复制产物目录路径",cV=()=>"کپی مسیر پوشهٔ خروجی‌ها",uV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lV():t==="fa"?cV():oV()}),dV=()=>"Delete artifact",fV=()=>"删除产物",hV=()=>"حذف خروجی",I6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fV():t==="fa"?hV():dV()}),_V=()=>"Delete folder",pV=()=>"删除文件夹",mV=()=>"حذف پوشه",gV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pV():t==="fa"?mV():_V()}),bV=()=>"Failed to load:",vV=()=>"加载失败:",xV=()=>"بارگیری ناموفق بود:",yV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vV():t==="fa"?xV():bV()}),wV=()=>"File truncated — showing the first 512 KB.",SV=()=>"文件已截断——仅显示前 512 KB。",kV=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",CV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SV():t==="fa"?kV():wV()}),EV=()=>"Listing truncated — the folder has more artifacts.",NV=()=>"列表已截断——文件夹中还有更多产物。",zV=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",jV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NV():t==="fa"?zV():EV()}),AV=()=>"Loading…",TV=()=>"正在加载…",MV=()=>"در حال بارگیری…",RV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TV():t==="fa"?MV():AV()}),DV=()=>"Loading artifacts…",LV=()=>"正在加载产物…",OV=()=>"در حال بارگیری خروجی‌ها…",IV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LV():t==="fa"?OV():DV()}),BV=()=>"Modified",$V=()=>"修改时间",HV=()=>"ویرایش‌شده",PV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$V():t==="fa"?HV():BV()}),FV=()=>"No artifacts yet",UV=()=>"尚无产物",qV=()=>"هنوز خروجی‌ای وجود ندارد",GV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UV():t==="fa"?qV():FV()}),VV=()=>"Open raw in new tab",WV=()=>"在新标签页中打开原始文件",KV=()=>"باز کردن فایل خام در زبانهٔ جدید",B6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WV():t==="fa"?KV():VV()}),YV=()=>"Storage settings",XV=()=>"存储设置",ZV=()=>"تنظیمات ذخیره‌سازی",$6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XV():t==="fa"?ZV():YV()}),QV=()=>"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:",JV=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件:",eW=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید:",tW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JV():t==="fa"?eW():QV()}),nW=()=>"File too large to preview inline.",rW=()=>"文件太大,无法内嵌预览。",sW=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",iW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rW():t==="fa"?sW():nW()}),aW=()=>"This is the baseline branch, so there is no parent comparison.",oW=()=>"这是基线分支,因此没有父分支可供比较。",lW=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",cW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oW():t==="fa"?lW():aW()}),uW=()=>"Failed to load changes:",dW=()=>"加载更改失败:",fW=()=>"بارگیری تغییرات ناموفق بود:",hW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dW():t==="fa"?fW():uW()}),_W=()=>"Loading changes…",pW=()=>"正在加载更改…",mW=()=>"در حال بارگیری تغییرات…",gW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pW():t==="fa"?mW():_W()}),bW=()=>"No committed changes from the parent branch.",vW=()=>"与父分支相比没有已提交的更改。",xW=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",yW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vW():t==="fa"?xW():bW()}),wW=e=>`agent ${e==null?void 0:e.number}`,SW=e=>`智能体 ${e==null?void 0:e.number}`,kW=e=>`عامل ${e==null?void 0:e.number}`,H6=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SW(e):t==="fa"?kW(e):wW(e)}),CW=()=>"agent sessions",EW=()=>"智能体会话",NW=()=>"نشست‌های عامل‌ها",zW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EW():t==="fa"?NW():CW()}),jW=()=>"All sessions",AW=()=>"所有会话",TW=()=>"همهٔ نشست‌ها",MW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AW():t==="fa"?TW():jW()}),RW=e=>`${e==null?void 0:e.count} annotations`,DW=e=>`${e==null?void 0:e.count} 条批注`,LW=e=>`${e==null?void 0:e.count} یادداشت`,OW=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DW(e):t==="fa"?LW(e):RW(e)}),IW=()=>"Archive",BW=()=>"归档",$W=()=>"بایگانی",HW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BW():t==="fa"?$W():IW()}),PW=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",FW=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",UW=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",qW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FW():t==="fa"?UW():PW()}),GW=()=>"Asked about selected text",VW=()=>"已询问所选文本",WW=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",KW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VW():t==="fa"?WW():GW()}),YW=()=>"Attachment",XW=()=>"附件",ZW=()=>"پیوست",QW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XW():t==="fa"?ZW():YW()}),JW=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,eK=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,tK=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,nK=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eK(e):t==="fa"?tK(e):JW(e)}),rK=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",sK=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",iK=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",aK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sK():t==="fa"?iK():rK()}),oK=()=>"Wait for the turn to finish before running a command.",lK=()=>"请等待本轮结束后再运行命令。",cK=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",uK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lK():t==="fa"?cK():oK()}),dK=e=>`Exited with code ${e==null?void 0:e.code}`,fK=e=>`退出码 ${e==null?void 0:e.code}`,hK=e=>`با کد ${e==null?void 0:e.code} خارج شد`,_K=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fK(e):t==="fa"?hK(e):dK(e)}),pK=e=>`Command not run: ${e==null?void 0:e.error}`,mK=e=>`命令未运行:${e==null?void 0:e.error}`,gK=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,P6=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mK(e):t==="fa"?gK(e):pK(e)}),bK=()=>"Collapse tool activity",vK=()=>"折叠工具活动",xK=()=>"بستن فعالیت ابزارها",yK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vK():t==="fa"?xK():bK()}),wK=()=>"Continue",SK=()=>"继续",kK=()=>"ادامه",CK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SK():t==="fa"?kK():wK()}),EK=e=>`Delete “${e==null?void 0:e.title}”? - -Its transcript will be permanently removed.`,NK=e=>`删除“${e==null?void 0:e.title}”? - -其对话记录将被永久移除。`,zK=e=>`«${e==null?void 0:e.title}» حذف شود؟ - -رونوشت آن برای همیشه حذف خواهد شد.`,jK=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NK(e):t==="fa"?zK(e):EK(e)}),AK=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,TK=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,MK=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,RK=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TK(e):t==="fa"?MK(e):AK(e)}),DK=()=>"Could not exit Plan mode. Try again.",LK=()=>"无法退出计划模式。请重试。",OK=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",IK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LK():t==="fa"?OK():DK()}),BK=()=>"Expand tool activity",$K=()=>"展开工具活动",HK=()=>"باز کردن فعالیت ابزارها",PK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$K():t==="fa"?HK():BK()}),FK=()=>"experiments",UK=()=>"实验",qK=()=>"آزمایش‌ها",GK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UK():t==="fa"?qK():FK()}),VK=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,WK=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,KK=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,YK=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WK(e):t==="fa"?KK(e):VK(e)}),XK=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,ZK=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,QK=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,JK=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZK(e):t==="fa"?QK(e):XK(e)}),eY=e=>`Message not sent: ${e==null?void 0:e.error}`,tY=e=>`消息未发送:${e==null?void 0:e.error}`,nY=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,rY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tY(e):t==="fa"?nY(e):eY(e)}),sY=()=>"New session",iY=()=>"新会话",aY=()=>"نشست جدید",F6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iY():t==="fa"?aY():sY()}),oY=()=>"No active sessions",lY=()=>"没有活跃会话",cY=()=>"نشست فعالی وجود ندارد",uY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lY():t==="fa"?cY():oY()}),dY=()=>"No activity",fY=()=>"无活动",hY=()=>"بدون فعالیت",_Y=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fY():t==="fa"?hY():dY()}),pY=()=>"No archived sessions",mY=()=>"没有已归档的会话",gY=()=>"نشست بایگانی‌شده‌ای وجود ندارد",bY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mY():t==="fa"?gY():pY()}),vY=()=>"No sessions yet",xY=()=>"还没有会话",yY=()=>"هنوز نشستی وجود ندارد",wY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xY():t==="fa"?yY():vY()}),SY=()=>"1 annotation",kY=()=>"1 条批注",CY=()=>"۱ یادداشت",EY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kY():t==="fa"?CY():SY()}),NY=()=>"Open sub-agent transcript",zY=()=>"打开子智能体记录",jY=()=>"باز کردن متن گفت‌وگوی عامل فرعی",AY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zY():t==="fa"?jY():NY()}),TY=()=>"About this demo",MY=()=>"关于此演示",RY=()=>"دربارهٔ این نسخهٔ نمایشی",U6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MY():t==="fa"?RY():TY()}),DY=()=>"Accept and auto mode",LY=()=>"接受并使用自动模式",OY=()=>"پذیرش و حالت خودکار",IY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LY():t==="fa"?OY():DY()}),BY=()=>"Accept and bypass all",$Y=()=>"接受并跳过所有审批",HY=()=>"پذیرش و عبور از همهٔ تأییدها",PY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Y():t==="fa"?HY():BY()}),FY=()=>"Active",UY=()=>"活跃",qY=()=>"فعال",GY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UY():t==="fa"?qY():FY()}),VY=()=>"All",WY=()=>"全部",KY=()=>"همه",YY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WY():t==="fa"?KY():VY()}),XY=()=>"Allow",ZY=()=>"允许",QY=()=>"اجازه دادن",JY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZY():t==="fa"?QY():XY()}),eX=()=>"Approval required",tX=()=>"需要批准",nX=()=>"نیازمند تأیید",rX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tX():t==="fa"?nX():eX()}),sX=()=>"Archived",iX=()=>"已归档",aX=()=>"بایگانی‌شده",q6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iX():t==="fa"?aX():sX()}),oX=()=>"Artifacts",lX=()=>"产物",cX=()=>"خروجی‌ها",uX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lX():t==="fa"?cX():oX()}),dX=()=>"Ask about this",fX=()=>"询问此内容",hX=()=>"دربارهٔ این بپرسید",_X=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fX():t==="fa"?hX():dX()}),pX=()=>"Attach a PDF or image",mX=()=>"附加 PDF 或图片",gX=()=>"پیوست PDF یا تصویر",G6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mX():t==="fa"?gX():pX()}),bX=()=>"Bash",vX=()=>"Bash",xX=()=>"Bash",yE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vX():t==="fa"?xX():bX()}),yX=()=>"Browsed the web",wX=()=>"已浏览网页",SX=()=>"وب مرور شد",V6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wX():t==="fa"?SX():yX()}),kX=()=>"Built the project",CX=()=>"已构建项目",EX=()=>"پروژه ساخته شد",NX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CX():t==="fa"?EX():kX()}),zX=()=>"Cancel",jX=()=>"取消",AX=()=>"لغو",TX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jX():t==="fa"?AX():zX()}),MX=()=>"Cancelled an experiment run",RX=()=>"已取消实验运行",DX=()=>"اجرای آزمایش لغو شد",LX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RX():t==="fa"?DX():MX()}),OX=()=>"Checked code style",IX=()=>"已检查代码风格",BX=()=>"سبک کد بررسی شد",$X=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IX():t==="fa"?BX():OX()}),HX=()=>"Checked compute options",PX=()=>"已检查算力选项",FX=()=>"گزینه‌های رایانشی بررسی شد",UX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PX():t==="fa"?FX():HX()}),qX=()=>"Checked experiment status",GX=()=>"已检查实验状态",VX=()=>"وضعیت آزمایش بررسی شد",W6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GX():t==="fa"?VX():qX()}),WX=()=>"Checked Git status",KX=()=>"已检查 Git 状态",YX=()=>"وضعیت Git بررسی شد",XX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KX():t==="fa"?YX():WX()}),ZX=()=>"Checked local times",QX=()=>"已查询当地时间",JX=()=>"زمان‌های محلی بررسی شد",eZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QX():t==="fa"?JX():ZX()}),tZ=()=>"Checked market data",nZ=()=>"已查询市场数据",rZ=()=>"داده‌های بازار بررسی شد",sZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nZ():t==="fa"?rZ():tZ()}),iZ=()=>"Checked sports data",aZ=()=>"已查询体育数据",oZ=()=>"داده‌های ورزشی بررسی شد",lZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aZ():t==="fa"?oZ():iZ()}),cZ=()=>"Checked the weather",uZ=()=>"已查询天气",dZ=()=>"آب‌وهوا بررسی شد",fZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uZ():t==="fa"?dZ():cZ()}),hZ=()=>"Checked types",_Z=()=>"已检查类型",pZ=()=>"نوع‌ها بررسی شد",mZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Z():t==="fa"?pZ():hZ()}),gZ=()=>"Clear annotations",bZ=()=>"清除批注",vZ=()=>"پاک کردن یادداشت‌ها",K6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bZ():t==="fa"?vZ():gZ()}),xZ=()=>"Customize",yZ=()=>"自定义",wZ=()=>"سفارشی‌سازی",SZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yZ():t==="fa"?wZ():xZ()}),kZ=()=>"Data sources",CZ=()=>"数据源",EZ=()=>"منابع داده",tb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CZ():t==="fa"?EZ():kZ()}),NZ=()=>"Delegated a task to a new agent",zZ=()=>"已将任务委派给新智能体",jZ=()=>"وظیفه به عامل جدید واگذار شد",AZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zZ():t==="fa"?jZ():NZ()}),TZ=()=>"Delete",MZ=()=>"删除",RZ=()=>"حذف",DZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MZ():t==="fa"?RZ():TZ()}),LZ=()=>"Deny",OZ=()=>"拒绝",IZ=()=>"رد کردن",BZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OZ():t==="fa"?IZ():LZ()}),$Z=()=>"Edit and re-send",HZ=()=>"编辑并重新发送",PZ=()=>"ویرایش و ارسال دوباره",Y6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HZ():t==="fa"?PZ():$Z()}),FZ=()=>"Edit message",UZ=()=>"编辑消息",qZ=()=>"ویرایش پیام",GZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UZ():t==="fa"?qZ():FZ()}),VZ=()=>"Edited a file",WZ=()=>"已编辑文件",KZ=()=>"فایل ویرایش شد",X6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WZ():t==="fa"?KZ():VZ()}),YZ=()=>"Exit Bash mode",XZ=()=>"退出 Bash 模式",ZZ=()=>"خروج از حالت Bash",Z6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XZ():t==="fa"?ZZ():YZ()}),QZ=()=>"Exit Plan mode",JZ=()=>"退出计划模式",eQ=()=>"خروج از حالت طرح",Q6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JZ():t==="fa"?eQ():QZ()}),tQ=()=>"Experiments",nQ=()=>"实验",rQ=()=>"آزمایش‌ها",sQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nQ():t==="fa"?rQ():tQ()}),iQ=()=>"Failed:",aQ=()=>"失败:",oQ=()=>"ناموفق:",kx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aQ():t==="fa"?oQ():iQ()}),lQ=()=>"Files",cQ=()=>"文件",uQ=()=>"فایل‌ها",dQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cQ():t==="fa"?uQ():lQ()}),fQ=()=>"Filter sessions",hQ=()=>"筛选会话",_Q=()=>"فیلتر نشست‌ها",J6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hQ():t==="fa"?_Q():fQ()}),pQ=()=>"is unavailable.",mQ=()=>"不可用。",gQ=()=>"در دسترس نیست.",bQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mQ():t==="fa"?gQ():pQ()}),vQ=()=>"Later queued messages will wait until this is retried or removed.",xQ=()=>"后续排队的消息会等待此消息重试或移除。",yQ=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",wQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xQ():t==="fa"?yQ():vQ()}),SQ=()=>"Listed files",kQ=()=>"已列出文件",CQ=()=>"فایل‌ها فهرست شد",e7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kQ():t==="fa"?CQ():SQ()}),EQ=()=>"Listed project runs",NQ=()=>"已列出项目运行",zQ=()=>"اجراهای پروژه فهرست شد",jQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NQ():t==="fa"?zQ():EQ()}),AQ=()=>"Listed projects",TQ=()=>"已列出项目",MQ=()=>"پروژه‌ها فهرست شد",RQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TQ():t==="fa"?MQ():AQ()}),DQ=()=>"Loading conversation…",LQ=()=>"正在加载对话…",OQ=()=>"در حال بارگیری گفتگو…",IQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LQ():t==="fa"?OQ():DQ()}),BQ=()=>"Next version",$Q=()=>"下一版本",HQ=()=>"نسخهٔ بعدی",t7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Q():t==="fa"?HQ():BQ()}),PQ=()=>"Open the session this agent spawned",FQ=()=>"打开此智能体创建的会话",UQ=()=>"باز کردن نشست ساخته‌شده توسط این عامل",qQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FQ():t==="fa"?UQ():PQ()}),GQ=()=>"Opened web pages",VQ=()=>"已打开网页",WQ=()=>"صفحه‌های وب باز شد",KQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VQ():t==="fa"?WQ():GQ()}),YQ=()=>"Plan",XQ=()=>"计划",ZQ=()=>"طرح",QQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XQ():t==="fa"?ZQ():YQ()}),JQ=()=>"Plan approved",eJ=()=>"计划已批准",tJ=()=>"طرح تأیید شد",nJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eJ():t==="fa"?tJ():JQ()}),rJ=()=>"Plan rejected",sJ=()=>"计划已拒绝",iJ=()=>"طرح رد شد",aJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sJ():t==="fa"?iJ():rJ()}),oJ=()=>"Plan resolved",lJ=()=>"计划已处理",cJ=()=>"طرح تعیین تکلیف شد",uJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lJ():t==="fa"?cJ():oJ()}),dJ=()=>"Plan revision requested",fJ=()=>"已请求修改计划",hJ=()=>"درخواست بازنگری طرح ثبت شد",_J=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fJ():t==="fa"?hJ():dJ()}),pJ=()=>"Previous version",mJ=()=>"上一版本",gJ=()=>"نسخهٔ قبلی",n7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mJ():t==="fa"?gJ():pJ()}),bJ=()=>"Ran a command",vJ=()=>"已运行命令",xJ=()=>"فرمان اجرا شد",yJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vJ():t==="fa"?xJ():bJ()}),wJ=()=>"Ran tests",SJ=()=>"已运行测试",kJ=()=>"آزمون‌ها اجرا شد",CJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SJ():t==="fa"?kJ():wJ()}),EJ=()=>"Read a file",NJ=()=>"已读取文件",zJ=()=>"فایل خوانده شد",jJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NJ():t==="fa"?zJ():EJ()}),AJ=()=>"Read Git history",TJ=()=>"已读取 Git 历史",MJ=()=>"تاریخچهٔ Git خوانده شد",RJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TJ():t==="fa"?MJ():AJ()}),DJ=()=>"Read project details",LJ=()=>"已读取项目详情",OJ=()=>"جزئیات پروژه خوانده شد",IJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LJ():t==="fa"?OJ():DJ()}),BJ=()=>"Reject",$J=()=>"拒绝",HJ=()=>"رد کردن",PJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$J():t==="fa"?HJ():BJ()}),FJ=()=>"Remove",UJ=()=>"移除",qJ=()=>"حذف",GJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UJ():t==="fa"?qJ():FJ()}),VJ=()=>"Remove annotation",WJ=()=>"移除批注",KJ=()=>"حذف یادداشت",YJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WJ():t==="fa"?KJ():VJ()}),XJ=()=>"Remove file",ZJ=()=>"移除文件",QJ=()=>"حذف فایل",r7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZJ():t==="fa"?QJ():XJ()}),JJ=()=>"Remove image",eee=()=>"移除图片",tee=()=>"حذف تصویر",s7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eee():t==="fa"?tee():JJ()}),nee=()=>"Remove queued message",ree=()=>"移除排队消息",see=()=>"حذف پیام صف",i7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ree():t==="fa"?see():nee()}),iee=()=>"Rename",aee=()=>"重命名",oee=()=>"تغییر نام",lee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aee():t==="fa"?oee():iee()}),cee=()=>"Reviewed code changes",uee=()=>"已审查代码更改",dee=()=>"تغییرات کد بازبینی شد",fee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uee():t==="fa"?dee():cee()}),hee=()=>"Run",_ee=()=>"运行",pee=()=>"اجرا",a7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ee():t==="fa"?pee():hee()}),mee=()=>"Selected chat text",gee=()=>"已选聊天文本",bee=()=>"متن انتخاب‌شدهٔ گفتگو",vee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gee():t==="fa"?bee():mee()}),xee=()=>"Selected text:",yee=()=>"已选文本:",wee=()=>"متن انتخاب‌شده:",See=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yee():t==="fa"?wee():xee()}),kee=()=>"Send",Cee=()=>"发送",Eee=()=>"ارسال",Dv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cee():t==="fa"?Eee():kee()}),Nee=()=>"Session options",zee=()=>"会话选项",jee=()=>"گزینه‌های نشست",o7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zee():t==="fa"?jee():Nee()}),Aee=()=>"Session title",Tee=()=>"会话标题",Mee=()=>"عنوان نشست",Ree=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tee():t==="fa"?Mee():Aee()}),Dee=()=>"Show sidebar",Lee=()=>"显示侧边栏",Oee=()=>"نمایش نوار کناری",l7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lee():t==="fa"?Oee():Dee()}),Iee=()=>"Started an experiment run",Bee=()=>"已启动实验运行",$ee=()=>"اجرای آزمایش آغاز شد",Hee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bee():t==="fa"?$ee():Iee()}),Pee=()=>"Reading the project to suggest where to start…",Fee=()=>"正在阅读项目以建议从哪里开始…",Uee=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",qee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fee():t==="fa"?Uee():Pee()}),Gee=()=>"Starter prompts",Vee=()=>"入门提示",Wee=()=>"پیشنهادهای شروع",Kee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vee():t==="fa"?Wee():Gee()}),Yee=()=>"Stop",Xee=()=>"停止",Zee=()=>"توقف",c7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xee():t==="fa"?Zee():Yee()}),Qee=()=>"Submit",Jee=()=>"提交",ete=()=>"ارسال",tte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jee():t==="fa"?ete():Qee()}),nte=()=>"Task",rte=()=>"任务",ste=()=>"وظیفه",ite=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rte():t==="fa"?ste():nte()}),ate=()=>"Tool failed",ote=()=>"工具失败",lte=()=>"ابزار ناموفق بود",cte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ote():t==="fa"?lte():ate()}),ute=()=>"Used tools",dte=()=>"已使用工具",fte=()=>"ابزارها استفاده شد",wE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dte():t==="fa"?fte():ute()}),hte=()=>"View full plan",_te=()=>"查看完整计划",pte=()=>"مشاهدهٔ طرح کامل",mte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_te():t==="fa"?pte():hte()}),gte=()=>"Waited for an experiment run",bte=()=>"已等待实验运行",vte=()=>"برای اجرای آزمایش صبر شد",xte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bte():t==="fa"?vte():gte()}),yte=()=>"Waiting for your input…",wte=()=>"正在等待你的输入…",Ste=()=>"منتظر ورودی شما…",kte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wte():t==="fa"?Ste():yte()}),Cte=()=>"What should we research?",Ete=()=>"我们应该研究什么?",Nte=()=>"چه چیزی را پژوهش کنیم؟",zte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ete():t==="fa"?Nte():Cte()}),jte=()=>"You, mid-task",Ate=()=>"你(任务进行中)",Tte=()=>"شما، هنگام انجام وظیفه",Mte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ate():t==="fa"?Tte():jte()}),Rte=()=>"Pasted image",Dte=()=>"粘贴的图片",Lte=()=>"تصویر جای‌گذاری‌شده",Ote=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dte():t==="fa"?Lte():Rte()}),Ite=()=>"Plan",Bte=()=>"计划",$te=()=>"طرح",SE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bte():t==="fa"?$te():Ite()}),Hte=()=>"Plan mode — ready to proceed?",Pte=()=>"计划模式 — 准备好继续了吗?",Fte=()=>"حالت طرح — آماده‌اید ادامه دهید؟",Ute=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pte():t==="fa"?Fte():Hte()}),qte=()=>"Proposed plan",Gte=()=>"提议的计划",Vte=()=>"طرح پیشنهادی",u7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gte():t==="fa"?Vte():qte()}),Wte=()=>"Question",Kte=()=>"问题",Yte=()=>"پرسش",Xte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kte():t==="fa"?Yte():Wte()}),Zte=()=>"Queued",Qte=()=>"已排队",Jte=()=>"در صف",ene=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qte():t==="fa"?Jte():Zte()}),tne=()=>"Recents",nne=()=>"最近",rne=()=>"اخیر",kE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nne():t==="fa"?rne():tne()}),sne=()=>"Re-check its setup.",ine=()=>"请重新检查其设置。",ane=()=>"راه‌اندازی آن را دوباره بررسی کنید.",one=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ine():t==="fa"?ane():sne()}),lne=()=>"Could not recover this turn. Try again.",cne=()=>"无法恢复本轮。请重试。",une=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",dne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cne():t==="fa"?une():lne()}),fne=()=>"Could not remove the queued message. Try again.",hne=()=>"无法移除排队消息。请重试。",_ne=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",pne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hne():t==="fa"?_ne():fne()}),mne=e=>`Could not re-send: ${e==null?void 0:e.error}`,gne=e=>`无法重新发送:${e==null?void 0:e.error}`,bne=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,vne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gne(e):t==="fa"?bne(e):mne(e)}),xne=()=>"Resolved",yne=()=>"已处理",wne=()=>"رسیدگی شد",Sne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yne():t==="fa"?wne():xne()}),kne=()=>"Could not retry the queued message. Try again.",Cne=()=>"无法重试排队消息。请重试。",Ene=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",Nne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cne():t==="fa"?Ene():kne()}),zne=()=>"run logs",jne=()=>"运行日志",Ane=()=>"گزارش‌های اجرا",Tne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jne():t==="fa"?Ane():zne()}),Mne=()=>"Scroll to bottom",Rne=()=>"滚动到底部",Dne=()=>"رفتن به پایین گفتگو",d7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rne():t==="fa"?Dne():Mne()}),Lne=()=>"The selected harness is unavailable",One=()=>"所选智能体工具不可用",Ine=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",nb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?One():t==="fa"?Ine():Lne()}),Bne=()=>"The chat session was not created",$ne=()=>"未能创建聊天会话",Hne=()=>"نشست گفت‌وگو ایجاد نشد",Pne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ne():t==="fa"?Hne():Bne()}),Fne=()=>" · Spawned by another agent",Une=()=>" · 由另一个智能体创建",qne=()=>" · ساخته‌شده به‌دست عامل دیگر",Gne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Une():t==="fa"?qne():Fne()}),Vne=()=>"Starting…",Wne=()=>"正在启动…",Kne=()=>"در حال شروع…",Yne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wne():t==="fa"?Kne():Vne()}),Xne=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,Zne=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,Qne=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,Jne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Zne(e):t==="fa"?Qne(e):Xne(e)}),ere=()=>"Could not stop the turn. Try again.",tre=()=>"无法停止本轮。请重试。",nre=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",rre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tre():t==="fa"?nre():ere()}),sre=e=>`Could not switch fork: ${e==null?void 0:e.error}`,ire=e=>`无法切换分支:${e==null?void 0:e.error}`,are=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,ore=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ire(e):t==="fa"?are(e):sre(e)}),lre=()=>"The agent",cre=()=>"智能体",ure=()=>"عامل",dre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cre():t==="fa"?ure():lre()}),fre=()=>"Thinking",hre=()=>"正在思考",_re=()=>"در حال فکر کردن",pre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hre():t==="fa"?_re():fre()}),mre=()=>"Could not toggle Plan mode. Try again.",gre=()=>"无法切换计划模式。请重试。",bre=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",f7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gre():t==="fa"?bre():mre()}),vre=()=>"This turn did not finish.",xre=()=>"本轮未完成。",yre=()=>"این نوبت کامل نشد.",wre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xre():t==="fa"?yre():vre()}),Sre=()=>"Type a custom answer…",kre=()=>"输入自定义回答…",Cre=()=>"پاسخ دلخواه را بنویسید…",Ere=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kre():t==="fa"?Cre():Sre()}),Nre=()=>"Unarchive",zre=()=>"取消归档",jre=()=>"خارج کردن از بایگانی",Are=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zre():t==="fa"?jre():Nre()}),Tre=()=>"Untitled",Mre=()=>"未命名",Rre=()=>"بدون عنوان",rb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mre():t==="fa"?Rre():Tre()}),Dre=()=>"Could not update permissions. Try again.",Lre=()=>"无法更新权限。请重试。",Ore=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",Ire=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lre():t==="fa"?Ore():Dre()}),Bre=()=>"Working…",$re=()=>"正在工作…",Hre=()=>"در حال کار…",Cx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$re():t==="fa"?Hre():Bre()}),Pre=()=>"Close tab",Fre=()=>"关闭标签页",Ure=()=>"بستن زبانه",qre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fre():t==="fa"?Ure():Pre()}),Gre=()=>"Changes",Vre=()=>"更改",Wre=()=>"تغییرات",Kre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vre():t==="fa"?Wre():Gre()}),Yre=()=>"Code browser view",Xre=()=>"代码浏览器视图",Zre=()=>"نمای مرورگر کد",Qre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xre():t==="fa"?Zre():Yre()}),Jre=()=>"Files",ese=()=>"文件",tse=()=>"فایل‌ها",nse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ese():t==="fa"?tse():Jre()}),rse=()=>"Refresh",sse=()=>"刷新",ise=()=>"تازه‌سازی",h7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sse():t==="fa"?ise():rse()}),ase=()=>"listing truncated",ose=()=>"列表已截断",lse=()=>"فهرست کوتاه شده است",cse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ose():t==="fa"?lse():ase()}),use=()=>"No files.",dse=()=>"没有文件。",fse=()=>"فایلی وجود ندارد.",hse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dse():t==="fa"?fse():use()}),_se=()=>"Refresh failed:",pse=()=>"刷新失败:",mse=()=>"تازه‌سازی ناموفق بود:",gse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pse():t==="fa"?mse():_se()}),bse=()=>"Cancelling…",vse=()=>"正在取消…",xse=()=>"در حال لغو…",yse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vse():t==="fa"?xse():bse()}),wse=()=>"Checking…",Sse=()=>"正在检查…",kse=()=>"در حال بررسی…",Fp=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sse():t==="fa"?kse():wse()}),Cse=()=>"Copied",Ese=()=>"已复制",Nse=()=>"کپی شد",ip=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ese():t==="fa"?Nse():Cse()}),zse=e=>`Failed to load: ${e==null?void 0:e.error}`,jse=e=>`加载失败:${e==null?void 0:e.error}`,Ase=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,CE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jse(e):t==="fa"?Ase(e):zse(e)}),Tse=()=>"Loading…",Mse=()=>"正在加载…",Rse=()=>"در حال بارگیری…",EE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mse():t==="fa"?Rse():Tse()}),Dse=e=>`+ ${e==null?void 0:e.count} more`,Lse=e=>`另有 ${e==null?void 0:e.count} 项`,Ose=e=>`${e==null?void 0:e.count}+ مورد دیگر`,Ise=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lse(e):t==="fa"?Ose(e):Dse(e)}),Bse=()=>"Rendered view",$se=()=>"渲染视图",Hse=()=>"نمای رندرشده",ap=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$se():t==="fa"?Hse():Bse()}),Pse=()=>"Save",Fse=()=>"保存",Use=()=>"ذخیره",Rl=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fse():t==="fa"?Use():Pse()}),qse=()=>"Saving…",Gse=()=>"正在保存…",Vse=()=>"در حال ذخیره…",aa=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gse():t==="fa"?Vse():qse()}),Wse=()=>"Show less",Kse=()=>"收起",Yse=()=>"نمایش کمتر",NE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kse():t==="fa"?Yse():Wse()}),Xse=()=>"Show more",Zse=()=>"展开",Qse=()=>"نمایش بیشتر",Jse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zse():t==="fa"?Qse():Xse()}),eie=()=>"Stop",tie=()=>"停止",nie=()=>"توقف",zE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tie():t==="fa"?nie():eie()}),rie=()=>"Stopping…",sie=()=>"正在停止…",iie=()=>"در حال توقف…",aie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sie():t==="fa"?iie():rie()}),oie=()=>"View source",lie=()=>"查看源代码",cie=()=>"نمایش متن منبع",Du=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lie():t==="fa"?cie():oie()}),uie=e=>`Hugging Face token — ${e==null?void 0:e.summary}`,die=e=>`Hugging Face 令牌 — ${e==null?void 0:e.summary}`,fie=e=>`توکن Hugging Face — ${e==null?void 0:e.summary}`,hie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?die(e):t==="fa"?fie(e):uie(e)}),_ie=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,pie=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,mie=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,gie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pie(e):t==="fa"?mie(e):_ie(e)}),bie=()=>"No credentials required; this computer is always available.",vie=()=>"无需凭据;此计算机始终可用。",xie=()=>"نیازی به اطلاعات ورود نیست؛ این رایانه همیشه در دسترس است.",yie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vie():t==="fa"?xie():bie()}),wie=e=>`Modal token — ${e==null?void 0:e.summary}`,Sie=e=>`Modal 令牌 — ${e==null?void 0:e.summary}`,kie=e=>`توکن Modal — ${e==null?void 0:e.summary}`,Cie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Sie(e):t==="fa"?kie(e):wie(e)}),Eie=e=>`OpenResearch login and SSH key — ${e==null?void 0:e.summary}`,Nie=e=>`OpenResearch 登录信息和 SSH 密钥 — ${e==null?void 0:e.summary}`,zie=e=>`ورود OpenResearch و کلید SSH — ${e==null?void 0:e.summary}`,jie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nie(e):t==="fa"?zie(e):Eie(e)}),Aie=e=>`Ray Jobs endpoint — ${e==null?void 0:e.summary}`,Tie=e=>`Ray Jobs 端点 — ${e==null?void 0:e.summary}`,Mie=e=>`endpoint مربوط به Ray Jobs — ${e==null?void 0:e.summary}`,Rie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tie(e):t==="fa"?Mie(e):Aie(e)}),Die=e=>`SSH config — ${e==null?void 0:e.summary}`,Lie=e=>`SSH 配置 — ${e==null?void 0:e.summary}`,Oie=e=>`پیکربندی SSH — ${e==null?void 0:e.summary}`,Iie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lie(e):t==="fa"?Oie(e):Die(e)}),Bie=e=>`SSH config and keys — ${e==null?void 0:e.summary}`,$ie=e=>`SSH 配置和密钥 — ${e==null?void 0:e.summary}`,Hie=e=>`پیکربندی و کلیدهای SSH — ${e==null?void 0:e.summary}`,Pie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$ie(e):t==="fa"?Hie(e):Bie(e)}),Fie=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,Uie=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,qie=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,Gie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Uie(e):t==="fa"?qie(e):Fie(e)}),Vie=()=>"Runs as a remote Hugging Face Job",Wie=()=>"作为远程 Hugging Face Job 运行",Kie=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",Yie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wie():t==="fa"?Kie():Vie()}),Xie=()=>"Runs as a Job on your Kubernetes cluster",Zie=()=>"作为 Kubernetes 集群上的 Job 运行",Qie=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",Jie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zie():t==="fa"?Qie():Xie()}),eae=()=>"Runs directly on this computer",tae=()=>"直接在此计算机上运行",nae=()=>"مستقیماً روی این رایانه اجرا می‌شود",rae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tae():t==="fa"?nae():eae()}),sae=()=>"Runs in a remote Modal sandbox",iae=()=>"在远程 Modal 沙箱中运行",aae=()=>"در sandbox دوردست Modal اجرا می‌شود",oae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iae():t==="fa"?aae():sae()}),lae=()=>"Runs on an ephemeral OpenResearch box",cae=()=>"在临时 OpenResearch 主机上运行",uae=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",dae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cae():t==="fa"?uae():lae()}),fae=()=>"Runs on the connected Ray cluster",hae=()=>"在已连接的 Ray 集群上运行",_ae=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",pae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hae():t==="fa"?_ae():fae()}),mae=()=>"Runs as a scheduled job on your Slurm cluster",gae=()=>"作为 Slurm 集群上的调度作业运行",bae=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",vae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gae():t==="fa"?bae():mae()}),xae=()=>"Runs on a host from your SSH config",yae=()=>"在 SSH 配置中的主机上运行",wae=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",Sae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yae():t==="fa"?wae():xae()}),kae=()=>"Runs through Tinker’s remote compute",Cae=()=>"通过 Tinker 远程算力运行",Eae=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",Nae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cae():t==="fa"?Eae():kae()}),zae=()=>"HF Jobs",jae=()=>"HF Jobs",Aae=()=>"HF Jobs",Tae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jae():t==="fa"?Aae():zae()}),Mae=()=>"Kubernetes",Rae=()=>"Kubernetes",Dae=()=>"Kubernetes",Lae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rae():t==="fa"?Dae():Mae()}),Oae=()=>"This machine",Iae=()=>"此计算机",Bae=()=>"این رایانه",jE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iae():t==="fa"?Bae():Oae()}),$ae=()=>"Modal",Hae=()=>"Modal",Pae=()=>"Modal",Fae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hae():t==="fa"?Pae():$ae()}),Uae=()=>"OpenResearch",qae=()=>"OpenResearch",Gae=()=>"OpenResearch",Vae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qae():t==="fa"?Gae():Uae()}),Wae=()=>"Ray",Kae=()=>"Ray",Yae=()=>"Ray",Xae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kae():t==="fa"?Yae():Wae()}),Zae=()=>"Slurm",Qae=()=>"Slurm",Jae=()=>"Slurm",eoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qae():t==="fa"?Jae():Zae()}),toe=()=>"SSH",noe=()=>"SSH",roe=()=>"SSH",soe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?noe():t==="fa"?roe():toe()}),ioe=()=>"Tinker",aoe=()=>"Tinker",ooe=()=>"Tinker",loe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aoe():t==="fa"?ooe():ioe()}),coe=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",uoe=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",doe=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",foe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uoe():t==="fa"?doe():coe()}),hoe=()=>"A Kubernetes Job is created in the selected context and namespace from the project’s .orx/k8s.yaml manifest.",_oe=()=>"系统根据项目的 .orx/k8s.yaml 清单,在所选上下文和命名空间中创建 Kubernetes Job。",poe=()=>"بر پایهٔ مانیفست .orx/k8s.yaml پروژه، یک Kubernetes Job در زمینه و فضای نام انتخاب‌شده ساخته می‌شود.",moe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_oe():t==="fa"?poe():hoe()}),goe=()=>"The experiment runs as a supervised process on this computer and uses its CPU, memory, and GPUs.",boe=()=>"实验作为受监管进程在此计算机上运行,并使用其 CPU、内存和 GPU。",voe=()=>"آزمایش به‌صورت فرایندی تحت نظارت روی این رایانه اجرا می‌شود و از CPU، حافظه و GPUهای آن استفاده می‌کند.",xoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?boe():t==="fa"?voe():goe()}),yoe=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",woe=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",Soe=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",koe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?woe():t==="fa"?Soe():yoe()}),Coe=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",Eoe=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",Noe=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",zoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eoe():t==="fa"?Noe():Coe()}),joe=()=>"The run is submitted to the Ray Jobs endpoint, and the connected Ray cluster executes it.",Aoe=()=>"运行会提交到 Ray Jobs 端点,并由已连接的 Ray 集群执行。",Toe=()=>"اجرا به endpoint مربوط به Ray Jobs فرستاده و توسط خوشهٔ متصل Ray اجرا می‌شود.",Moe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aoe():t==="fa"?Toe():joe()}),Roe=()=>"The login node receives an sbatch job using the saved partition, account, and time limit; the cluster schedules the work.",Doe=()=>"登录节点使用已保存的分区、账户和时间限制接收 sbatch 作业;集群负责调度。",Loe=()=>"گرهٔ ورود یک کار sbatch با پارتیشن، حساب و محدودیت زمانی ذخیره‌شده دریافت می‌کند و خوشه آن را زمان‌بندی می‌کند.",Ooe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Doe():t==="fa"?Loe():Roe()}),Ioe=()=>"The project is copied to the selected SSH host and runs there. Logs and status return to this dashboard.",Boe=()=>"项目会复制到所选 SSH 主机并在那里运行。日志和状态会返回此控制台。",$oe=()=>"پروژه به میزبان SSH انتخاب‌شده کپی و همان‌جا اجرا می‌شود. گزارش‌ها و وضعیت به این داشبورد برمی‌گردند.",Hoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Boe():t==="fa"?$oe():Ioe()}),Poe=()=>"A controller runs here while the Tinker SDK sends model operations to remote compute. This computer must stay awake and online.",Foe=()=>"控制器在此计算机上运行,Tinker SDK 将模型操作发送到远程算力。此计算机必须保持唤醒和联网。",Uoe=()=>"کنترل‌گر روی این رایانه اجرا می‌شود و Tinker SDK عملیات مدل را به رایانش دوردست می‌فرستد. این رایانه باید روشن و آنلاین بماند.",qoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Foe():t==="fa"?Uoe():Poe()}),Goe=()=>"Context window",Voe=()=>"上下文窗口",Woe=()=>"پنجرهٔ زمینه",Koe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Voe():t==="fa"?Woe():Goe()}),Yoe=()=>"Context window used",Xoe=()=>"已使用的上下文窗口",Zoe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",Qoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xoe():t==="fa"?Zoe():Yoe()}),Joe=e=>`${e==null?void 0:e.value} tokens`,ele=e=>`${e==null?void 0:e.value} 个 token`,tle=e=>`${e==null?void 0:e.value} توکن`,nle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ele(e):t==="fa"?tle(e):Joe(e)}),rle=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,sle=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,ile=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,ale=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sle(e):t==="fa"?ile(e):rle(e)}),ole=()=>"No runs yet — ask the agent to launch one.",lle=()=>"尚无运行——让智能体启动一个。",cle=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",ule=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lle():t==="fa"?cle():ole()}),dle=()=>"Run",fle=()=>"运行",hle=()=>"اجرا",_7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fle():t==="fa"?hle():dle()}),_le=()=>"Switch run",ple=()=>"切换运行",mle=()=>"تغییر اجرا",gle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ple():t==="fa"?mle():_le()}),ble=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,vle=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,xle=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,yle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vle(e):t==="fa"?xle(e):ble(e)}),wle=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,Sle=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,kle=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,Cle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Sle(e):t==="fa"?kle(e):wle(e)}),Ele=e=>`${e==null?void 0:e.value}m`,Nle=e=>`${e==null?void 0:e.value} 分钟`,zle=e=>`${e==null?void 0:e.value} دقیقه`,jle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nle(e):t==="fa"?zle(e):Ele(e)}),Ale=e=>`${e==null?void 0:e.value}s`,Tle=e=>`${e==null?void 0:e.value} 秒`,Mle=e=>`${e==null?void 0:e.value} ثانیه`,Rle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tle(e):t==="fa"?Mle(e):Ale(e)}),Dle=()=>"Code",Lle=()=>"代码",Ole=()=>"کد",Ile=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lle():t==="fa"?Ole():Dle()}),Ble=()=>"created",$le=()=>"创建于",Hle=()=>"ایجادشده",Ple=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$le():t==="fa"?Hle():Ble()}),Fle=()=>"from",Ule=()=>"来自",qle=()=>"از",Gle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ule():t==="fa"?qle():Fle()}),Vle=()=>"Logs",Wle=()=>"日志",Kle=()=>"گزارش‌ها",Yle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wle():t==="fa"?Kle():Vle()}),Xle=()=>"Latest run",Zle=()=>"最新运行",Qle=()=>"آخرین اجرا",Jle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zle():t==="fa"?Qle():Xle()}),ece=()=>"Code",tce=()=>"代码",nce=()=>"کد",rce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tce():t==="fa"?nce():ece()}),sce=()=>"Commit",ice=()=>"提交",ace=()=>"کامیت",oce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ice():t==="fa"?ace():sce()}),lce=()=>"created",cce=()=>"创建于",uce=()=>"ایجادشده",dce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cce():t==="fa"?uce():lce()}),fce=()=>"Description",hce=()=>"说明",_ce=()=>"توضیحات",pce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hce():t==="fa"?_ce():fce()}),mce=()=>"Duration",gce=()=>"时长",bce=()=>"مدت",vce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gce():t==="fa"?bce():mce()}),xce=()=>"exit",yce=()=>"退出码",wce=()=>"خروج",Sce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yce():t==="fa"?wce():xce()}),kce=()=>"from",Cce=()=>"来自",Ece=()=>"از",Nce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cce():t==="fa"?Ece():kce()}),zce=()=>"Logs",jce=()=>"日志",Ace=()=>"گزارش‌ها",Tce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jce():t==="fa"?Ace():zce()}),Mce=()=>"Run",Rce=()=>"运行",Dce=()=>"اجرا",Lce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rce():t==="fa"?Dce():Mce()}),Oce=()=>"Run history",Ice=()=>"运行历史",Bce=()=>"تاریخچهٔ اجرا",$ce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ice():t==="fa"?Bce():Oce()}),Hce=()=>"Started",Pce=()=>"开始时间",Fce=()=>"آغاز",Uce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pce():t==="fa"?Fce():Hce()}),qce=()=>"Runs",Gce=()=>"运行",Vce=()=>"اجراها",Wce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gce():t==="fa"?Vce():qce()}),Kce=()=>"No runs yet",Yce=()=>"还没有运行",Xce=()=>"هنوز اجرایی وجود ندارد",Zce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yce():t==="fa"?Xce():Kce()}),Qce=()=>"No experiments yet.",Jce=()=>"还没有实验。",eue=()=>"هنوز آزمایشی وجود ندارد.",tue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jce():t==="fa"?eue():Qce()}),nue=()=>"Not run yet",rue=()=>"尚未运行",sue=()=>"هنوز اجرا نشده",iue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rue():t==="fa"?sue():nue()}),aue=()=>"1 run",oue=()=>"1 次运行",lue=()=>"۱ اجرا",cue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oue():t==="fa"?lue():aue()}),uue=()=>"Open logs",due=()=>"打开日志",fue=()=>"باز کردن گزارش‌ها",hue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?due():t==="fa"?fue():uue()}),_ue=e=>`${e==null?void 0:e.count} runs`,pue=e=>`${e==null?void 0:e.count} 次运行`,mue=e=>`${e==null?void 0:e.count} اجرا`,gue=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pue(e):t==="fa"?mue(e):_ue(e)}),bue=()=>"Stop requested",vue=()=>"已请求停止",xue=()=>"درخواست توقف ثبت شد",yue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vue():t==="fa"?xue():bue()}),wue=()=>"Stop run",Sue=()=>"停止运行",kue=()=>"توقف اجرا",Cue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sue():t==="fa"?kue():wue()}),Eue=()=>"Code",Nue=()=>"代码",zue=()=>"کد",jue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nue():t==="fa"?zue():Eue()}),Aue=()=>"Experiments",Tue=()=>"实验",Mue=()=>"آزمایش‌ها",Rue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tue():t==="fa"?Mue():Aue()}),Due=()=>"Logs",Lue=()=>"日志",Oue=()=>"گزارش‌ها",Iue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lue():t==="fa"?Oue():Due()}),Bue=()=>"Stop failed:",$ue=()=>"停止失败:",Hue=()=>"توقف ناموفق بود:",Pue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ue():t==="fa"?Hue():Bue()}),Fue=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,Uue=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,que=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,Gue=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Uue(e):t==="fa"?que(e):Fue(e)}),Vue=()=>"Binary file — no inline preview.",Wue=()=>"二进制文件——无法内嵌预览。",Kue=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",Yue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wue():t==="fa"?Kue():Vue()}),Xue=()=>"Compile failed",Zue=()=>"编译失败",Que=()=>"کامپایل ناموفق بود",Jue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zue():t==="fa"?Que():Xue()}),ede=()=>"Compile PDF",tde=()=>"编译 PDF",nde=()=>"کامپایل PDF",p7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tde():t==="fa"?nde():ede()}),rde=()=>"Compiled, but the engine reported errors — check the output below.",sde=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",ide=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",ade=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sde():t==="fa"?ide():rde()}),ode=()=>"Copy command",lde=()=>"复制命令",cde=()=>"کپی فرمان",ude=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lde():t==="fa"?cde():ode()}),dde=()=>"Copy install command",fde=()=>"复制安装命令",hde=()=>"کپی فرمان نصب",_de=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fde():t==="fa"?hde():dde()}),pde=()=>"Discard my edits and reload",mde=()=>"放弃我的编辑并重新加载",gde=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",bde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mde():t==="fa"?gde():pde()}),vde=()=>"Dismiss",xde=()=>"关闭",yde=()=>"بستن",m7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xde():t==="fa"?yde():vde()}),wde=()=>"Dismiss compile message",Sde=()=>"关闭编译消息",kde=()=>"بستن پیام کامپایل",Cde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sde():t==="fa"?kde():wde()}),Ede=()=>"Dismiss Overleaf message",Nde=()=>"关闭 Overleaf 消息",zde=()=>"بستن پیام Overleaf",jde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nde():t==="fa"?zde():Ede()}),Ade=()=>"Download",Tde=()=>"下载",Mde=()=>"بارگیری",AE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tde():t==="fa"?Mde():Ade()}),Rde=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,Dde=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,Lde=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,Ode=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Dde(e):t==="fa"?Lde(e):Rde(e)}),Ide=()=>"Failed to load file:",Bde=()=>"加载文件失败:",$de=()=>"بارگیری فایل ناموفق بود:",Hde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bde():t==="fa"?$de():Ide()}),Pde=()=>"File truncated — showing the first 512 KB.",Fde=()=>"文件已截断——仅显示前 512 KB。",Ude=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",qde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fde():t==="fa"?Ude():Pde()}),Gde=()=>"The page below stops partway — the full file could not be loaded.",Vde=()=>"下方页面在中途结束——无法加载完整文件。",Wde=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",Kde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vde():t==="fa"?Wde():Gde()}),Yde=e=>`Rendered HTML: ${e==null?void 0:e.name}`,Xde=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,Zde=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,Qde=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Xde(e):t==="fa"?Zde(e):Yde(e)}),Jde=()=>"Loading…",efe=()=>"正在加载…",tfe=()=>"در حال بارگیری…",TE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?efe():t==="fa"?tfe():Jde()}),nfe=()=>"File not found.",rfe=()=>"找不到文件。",sfe=()=>"فایل پیدا نشد.",ife=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rfe():t==="fa"?sfe():nfe()}),afe=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,ofe=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,lfe=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,cfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ofe(e):t==="fa"?lfe(e):afe(e)}),ufe=e=>`File not found on branch ${e==null?void 0:e.branch}.`,dfe=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,ffe=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,hfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dfe(e):t==="fa"?ffe(e):ufe(e)}),_fe=()=>"File not found on disk.",pfe=()=>"磁盘上找不到此文件。",mfe=()=>"فایل روی دیسک پیدا نشد.",gfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pfe():t==="fa"?mfe():_fe()}),bfe=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,vfe=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,xfe=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,yfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vfe(e):t==="fa"?xfe(e):bfe(e)}),wfe=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,Sfe=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,kfe=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,Cfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Sfe(e):t==="fa"?kfe(e):wfe(e)}),Efe=()=>"Open in default editor",Nfe=()=>"在默认编辑器中打开",zfe=()=>"باز کردن در ویرایشگر پیش‌فرض",g7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nfe():t==="fa"?zfe():Efe()}),jfe=()=>"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.",Afe=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",Tfe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",Mfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Afe():t==="fa"?Tfe():jfe()}),Rfe=()=>"Compiled PDF is out of date",Dfe=()=>"已编译的 PDF 不是最新版本",Lfe=()=>"PDF کامپایل‌شده به‌روز نیست",Ofe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dfe():t==="fa"?Lfe():Rfe()}),Ife=()=>"project clone",Bfe=()=>"项目克隆",$fe=()=>"کلون پروژه",t0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bfe():t==="fa"?$fe():Ife()}),Hfe=()=>"Recompile PDF",Pfe=()=>"重新编译 PDF",Ffe=()=>"کامپایل دوبارهٔ PDF",b7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pfe():t==="fa"?Ffe():Hfe()}),Ufe=()=>"Reload file",qfe=()=>"重新加载文件",Gfe=()=>"بارگیری دوبارهٔ فایل",v7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qfe():t==="fa"?Gfe():Ufe()}),Vfe=()=>"Save failed",Wfe=()=>"保存失败",Kfe=()=>"ذخیره ناموفق بود",Yfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wfe():t==="fa"?Kfe():Vfe()}),Xfe=()=>"Saving…",Zfe=()=>"正在保存…",Qfe=()=>"در حال ذخیره…",Jfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zfe():t==="fa"?Qfe():Xfe()}),ehe=()=>"Selected — press ⌘C",the=()=>"已选中 — 按 ⌘C 复制",nhe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",rhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?the():t==="fa"?nhe():ehe()}),she=()=>"session’s worktree",ihe=()=>"会话工作树",ahe=()=>"درخت کاری نشست",n0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ihe():t==="fa"?ahe():she()}),ohe=()=>"Show compiled PDF",lhe=()=>"显示已编译的 PDF",che=()=>"نمایش PDF کامپایل‌شده",x7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lhe():t==="fa"?che():ohe()}),uhe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",dhe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",fhe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",hhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dhe():t==="fa"?fhe():uhe()}),_he=()=>"This session's worktree isn't available — showing the project clone's copy.",phe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",mhe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",ghe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?phe():t==="fa"?mhe():_he()}),bhe=()=>"Unsaved",vhe=()=>"未保存",xhe=()=>"ذخیره نشده",yhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vhe():t==="fa"?xhe():bhe()}),whe=()=>"Unsaved — ⌘S or click away to save",She=()=>"未保存 — 按 ⌘S 或点击其他位置保存",khe=()=>"ذخیره نشده — ⌘S را بزنید یا برای ذخیره بیرون کلیک کنید",Che=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?She():t==="fa"?khe():whe()}),Ehe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",Nhe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",zhe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",jhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nhe():t==="fa"?zhe():Ehe()}),Ahe=()=>"Back to preview",The=()=>"返回预览",Mhe=()=>"بازگشت به پیش‌نمایش",Rhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?The():t==="fa"?Mhe():Ahe()}),Dhe=e=>`${e==null?void 0:e.count} changed files`,Lhe=e=>`${e==null?void 0:e.count} 个已更改文件`,Ohe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,Ihe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lhe(e):t==="fa"?Ohe(e):Dhe(e)}),Bhe=()=>"Changed files",$he=()=>"已更改文件",Hhe=()=>"فایل‌های تغییرکرده",Phe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$he():t==="fa"?Hhe():Bhe()}),Fhe=()=>"Diff preview truncated",Uhe=()=>"差异预览已截断",qhe=()=>"پیش‌نمایش تفاوت کوتاه شده است",Ghe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uhe():t==="fa"?qhe():Fhe()}),Vhe=e=>`${e==null?void 0:e.count} files shown (partial)`,Whe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,Khe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,Yhe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Whe(e):t==="fa"?Khe(e):Vhe(e)}),Xhe=()=>"No changes.",Zhe=()=>"没有更改。",Qhe=()=>"تغییری وجود ندارد.",Jhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zhe():t==="fa"?Qhe():Xhe()}),e_e=()=>"No complete file preview was available before the cutoff.",t_e=()=>"在截断位置之前没有完整的文件预览。",n_e=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",r_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t_e():t==="fa"?n_e():e_e()}),s_e=()=>"No textual diff for this file.",i_e=()=>"此文件没有文本差异。",a_e=()=>"برای این فایل تفاوت متنی وجود ندارد.",o_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i_e():t==="fa"?a_e():s_e()}),l_e=()=>"1 changed file",c_e=()=>"1 个已更改文件",u_e=()=>"۱ فایل تغییرکرده",d_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c_e():t==="fa"?u_e():l_e()}),f_e=()=>"1 file shown (partial)",h_e=()=>"显示 1 个文件(部分)",__e=()=>"۱ فایل نمایش داده شده (ناقص)",p_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h_e():t==="fa"?__e():f_e()}),m_e=()=>"Unable to parse this diff.",g_e=()=>"无法解析此差异。",b_e=()=>"خواندن این تفاوت ممکن نبود.",v_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g_e():t==="fa"?b_e():m_e()}),x_e=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,y_e=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,w_e=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,S_e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?y_e(e):t==="fa"?w_e(e):x_e(e)}),k_e=()=>"View full diff",C_e=()=>"查看完整差异",E_e=()=>"نمایش تفاوت کامل",N_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C_e():t==="fa"?E_e():k_e()}),z_e=()=>"Create a token ↗",j_e=()=>"创建令牌 ↗",A_e=()=>"ساخت توکن ↗",T_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j_e():t==="fa"?A_e():z_e()}),M_e=()=>"All projects",R_e=()=>"所有项目",D_e=()=>"همهٔ پروژه‌ها",y7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R_e():t==="fa"?D_e():M_e()}),L_e=()=>"Configure Repository",O_e=()=>"配置仓库",I_e=()=>"پیکربندی مخزن",B_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O_e():t==="fa"?I_e():L_e()}),$_e=()=>"Create a new project",H_e=()=>"新建项目",P_e=()=>"ایجاد پروژهٔ جدید",F_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H_e():t==="fa"?P_e():$_e()}),U_e=()=>"Hide sidebar",q_e=()=>"隐藏侧边栏",G_e=()=>"پنهان کردن نوار کناری",w7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q_e():t==="fa"?G_e():U_e()}),V_e=()=>"Project",W_e=()=>"项目",K_e=()=>"پروژه",Y_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W_e():t==="fa"?K_e():V_e()}),X_e=e=>`${e==null?void 0:e.count} cancelled`,Z_e=e=>`${e==null?void 0:e.count} 次取消`,Q_e=e=>`${e==null?void 0:e.count} لغوشده`,J_e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Z_e(e):t==="fa"?Q_e(e):X_e(e)}),e0e=e=>`${e==null?void 0:e.count} done`,t0e=e=>`${e==null?void 0:e.count} 次完成`,n0e=e=>`${e==null?void 0:e.count} تمام‌شده`,r0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?t0e(e):t==="fa"?n0e(e):e0e(e)}),s0e=e=>`${e==null?void 0:e.count} failed`,i0e=e=>`${e==null?void 0:e.count} 次失败`,a0e=e=>`${e==null?void 0:e.count} ناموفق`,o0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?i0e(e):t==="fa"?a0e(e):s0e(e)}),l0e=e=>`${e==null?void 0:e.count} files`,c0e=e=>`${e==null?void 0:e.count} 个文件`,u0e=e=>`${e==null?void 0:e.count} فایل`,d0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?c0e(e):t==="fa"?u0e(e):l0e(e)}),f0e=e=>`${e==null?void 0:e.count}+ files`,h0e=e=>`至少 ${e==null?void 0:e.count} 个文件`,_0e=e=>`بیش از ${e==null?void 0:e.count} فایل`,p0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?h0e(e):t==="fa"?_0e(e):f0e(e)}),m0e=e=>`${e==null?void 0:e.count} live`,g0e=e=>`${e==null?void 0:e.count} 次进行中`,b0e=e=>`${e==null?void 0:e.count} فعال`,v0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?g0e(e):t==="fa"?b0e(e):m0e(e)}),x0e=()=>"1 file",y0e=()=>"1 个文件",w0e=()=>"۱ فایل",S0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y0e():t==="fa"?w0e():x0e()}),k0e=()=>"1 run",C0e=()=>"1 次运行",E0e=()=>"۱ اجرا",N0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C0e():t==="fa"?E0e():k0e()}),z0e=e=>`${e==null?void 0:e.count} runs`,j0e=e=>`${e==null?void 0:e.count} 次运行`,A0e=e=>`${e==null?void 0:e.count} اجرا`,T0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?j0e(e):t==="fa"?A0e(e):z0e(e)}),M0e=()=>"No instances yet.",R0e=()=>"还没有实例。",D0e=()=>"هنوز نمونه‌ای وجود ندارد.",L0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R0e():t==="fa"?D0e():M0e()}),O0e=()=>"Nothing running right now.",I0e=()=>"当前没有运行中的实例。",B0e=()=>"اکنون چیزی در حال اجرا نیست.",$0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I0e():t==="fa"?B0e():O0e()}),H0e=()=>"Select a project to see its history.",P0e=()=>"请选择一个项目以查看其历史记录。",F0e=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",U0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P0e():t==="fa"?F0e():H0e()}),q0e=()=>"Select a project to see its runs.",G0e=()=>"请选择一个项目以查看其运行。",V0e=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",W0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G0e():t==="fa"?V0e():q0e()}),K0e=()=>"View history",Y0e=()=>"查看历史记录",X0e=()=>"مشاهدهٔ تاریخچه",Z0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y0e():t==="fa"?X0e():K0e()}),Q0e=e=>`View history (${e==null?void 0:e.count})`,J0e=e=>`查看历史记录(${e==null?void 0:e.count})`,epe=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,tpe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?J0e(e):t==="fa"?epe(e):Q0e(e)}),npe=()=>"The engine exited without producing a PDF or a log.",rpe=()=>"引擎已退出,但没有生成 PDF 或日志。",spe=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",ipe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rpe():t==="fa"?spe():npe()}),ape=()=>"Loading…",ope=()=>"正在加载…",lpe=()=>"در حال بارگیری…",cpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ope():t==="fa"?lpe():ape()}),upe=()=>"Copy",dpe=()=>"复制",fpe=()=>"کپی",ME=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dpe():t==="fa"?fpe():upe()}),hpe=()=>"Copy code",_pe=()=>"复制代码",ppe=()=>"کپی کد",mpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_pe():t==="fa"?ppe():hpe()}),gpe=()=>"Download",bpe=()=>"下载",vpe=()=>"بارگیری",RE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bpe():t==="fa"?vpe():gpe()}),xpe=()=>"This browser can’t preview this media format.",ype=()=>"此浏览器无法预览该媒体格式。",wpe=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",Spe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ype():t==="fa"?wpe():xpe()}),kpe=()=>" · CLI configuration",Cpe=()=>" · CLI 配置",Epe=()=>" · پیکربندی CLI",DE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cpe():t==="fa"?Epe():kpe()}),Npe=()=>"· Default",zpe=()=>"· 默认",jpe=()=>"· پیش‌فرض",LE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zpe():t==="fa"?jpe():Npe()}),Ape=()=>"Default model",Tpe=()=>"默认模型",Mpe=()=>"مدل پیش‌فرض",S7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tpe():t==="fa"?Mpe():Ape()}),Rpe=()=>"Detecting harnesses…",Dpe=()=>"正在检测智能体工具…",Lpe=()=>"در حال شناسایی ابزارهای عامل…",Ope=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dpe():t==="fa"?Lpe():Rpe()}),Ipe=()=>"Effort",Bpe=()=>"推理强度",$pe=()=>"میزان استدلال",Hpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bpe():t==="fa"?$pe():Ipe()}),Ppe=()=>"Fast speed ·",Fpe=()=>"快速 ·",Upe=()=>"سرعت بالا ·",qpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fpe():t==="fa"?Upe():Ppe()}),Gpe=()=>"Mode",Vpe=()=>"模式",Wpe=()=>"حالت",k7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vpe():t==="fa"?Wpe():Gpe()}),Kpe=()=>"Model",Ype=()=>"模型",Xpe=()=>"مدل",sb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ype():t==="fa"?Xpe():Kpe()}),Zpe=e=>`${e==null?void 0:e.count} more — search to find`,Qpe=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,Jpe=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,eme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Qpe(e):t==="fa"?Jpe(e):Zpe(e)}),tme=()=>"Not available",nme=()=>"不可用",rme=()=>"در دسترس نیست",sme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nme():t==="fa"?rme():tme()}),ime=()=>"Search models…",ame=()=>"搜索模型…",ome=()=>"جست‌وجوی مدل‌ها…",lme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ame():t==="fa"?ome():ime()}),cme=()=>"Sessions keep their harness. Start a new chat to switch.",ume=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",dme=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",fme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ume():t==="fa"?dme():cme()}),hme=()=>"Speed",_me=()=>"速度",pme=()=>"سرعت",C7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_me():t==="fa"?pme():hme()}),mme=()=>"Unavailable",gme=()=>"不可用",bme=()=>"در دسترس نیست",OE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gme():t==="fa"?bme():mme()}),vme=e=>`Use “${e==null?void 0:e.id}” as the model ID`,xme=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,yme=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,wme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xme(e):t==="fa"?yme(e):vme(e)}),Sme=()=>"Variant",kme=()=>"变体",Cme=()=>"گونه",Eme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kme():t==="fa"?Cme():Sme()}),Nme=()=>"Advanced",zme=()=>"高级",jme=()=>"پیشرفته",Ame=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zme():t==="fa"?jme():Nme()}),Tme=()=>"Advanced · Connect GitHub",Mme=()=>"高级 · 连接 GitHub",Rme=()=>"پیشرفته · اتصال GitHub",Dme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mme():t==="fa"?Rme():Tme()}),Lme=()=>"Advanced · GitHub sync on",Ome=()=>"高级 · GitHub 同步已开启",Ime=()=>"پیشرفته · همگام‌سازی GitHub روشن است",Bme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ome():t==="fa"?Ime():Lme()}),$me=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",Hme=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",Pme=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",Fme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hme():t==="fa"?Pme():$me()}),Ume=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,qme=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,Gme=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,Vme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qme(e):t==="fa"?Gme(e):Ume(e)}),Wme=()=>"Choose an existing project folder",Kme=()=>"选择现有项目文件夹",Yme=()=>"انتخاب پوشهٔ موجود پروژه",E7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kme():t==="fa"?Yme():Wme()}),Xme=()=>"Choosing…",Zme=()=>"正在选择…",Qme=()=>"در حال انتخاب…",Jme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zme():t==="fa"?Qme():Xme()}),ege=()=>"Clone destination",tge=()=>"克隆位置",nge=()=>"مقصد کلون",rge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tge():t==="fa"?nge():ege()}),sge=()=>"Clone paper project",ige=()=>"克隆论文项目",age=()=>"کلون پروژهٔ مقاله",oge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ige():t==="fa"?age():sge()}),lge=()=>"Create project",cge=()=>"创建项目",uge=()=>"ایجاد پروژه",N7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cge():t==="fa"?uge():lge()}),dge=()=>"Creating…",fge=()=>"正在创建…",hge=()=>"در حال ایجاد…",_ge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fge():t==="fa"?hge():dge()}),pge=()=>"Choose a different destination. This path is a file, not a folder.",mge=()=>"请选择其他位置。此路径是文件,不是文件夹。",gge=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",z7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mge():t==="fa"?gge():pge()}),bge=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",vge=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",xge=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",yge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vge():t==="fa"?xge():bge()}),wge=()=>"Blank project",Sge=()=>"空白项目",kge=()=>"پروژهٔ خالی",Cge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sge():t==="fa"?kge():wge()}),Ege=()=>"Cancel",Nge=()=>"取消",zge=()=>"لغو",jge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nge():t==="fa"?zge():Ege()}),Age=()=>"Change",Tge=()=>"更改",Mge=()=>"تغییر",Rge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tge():t==="fa"?Mge():Age()}),Dge=()=>"Change selected paper",Lge=()=>"更改所选论文",Oge=()=>"تغییر مقالهٔ انتخاب‌شده",Ige=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lge():t==="fa"?Oge():Dge()}),Bge=()=>"Check out a Git branch before using this folder.",$ge=()=>"使用此文件夹前,请先检出一个 Git 分支。",Hge=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",Pge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ge():t==="fa"?Hge():Bge()}),Fge=()=>"Checking project location.",Uge=()=>"正在检查项目位置。",qge=()=>"در حال بررسی محل پروژه.",j7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uge():t==="fa"?qge():Fge()}),Gge=()=>"Existing folder",Vge=()=>"现有文件夹",Wge=()=>"پوشهٔ موجود",Kge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vge():t==="fa"?Wge():Gge()}),Yge=()=>"Experiment branches will be pushed to the remote GitHub repository.",Xge=()=>"实验分支将推送到远程 GitHub 仓库。",Zge=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",Qge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xge():t==="fa"?Zge():Yge()}),Jge=()=>"From a paper",e1e=()=>"从论文创建",t1e=()=>"از یک مقاله",n1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e1e():t==="fa"?t1e():Jge()}),r1e=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",s1e=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",i1e=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",a1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s1e():t==="fa"?i1e():r1e()}),o1e=()=>"my-research",l1e=()=>"my-research",c1e=()=>"my-research",A7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l1e():t==="fa"?c1e():o1e()}),u1e=()=>"No papers found. Try an arXiv ID, URL, or a different title.",d1e=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",f1e=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",h1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d1e():t==="fa"?f1e():u1e()}),_1e=()=>"No public repository found on alphaXiv",p1e=()=>"在 alphaXiv 上未找到公开仓库",m1e=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",g1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p1e():t==="fa"?m1e():_1e()}),b1e=()=>"OpenResearch will start a blank project with this paper's PDF.",v1e=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",x1e=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",y1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v1e():t==="fa"?x1e():b1e()}),w1e=()=>"Paper",S1e=()=>"论文",k1e=()=>"مقاله",C1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S1e():t==="fa"?k1e():w1e()}),E1e=()=>"Project location",N1e=()=>"项目位置",z1e=()=>"محل پروژه",ib=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N1e():t==="fa"?z1e():E1e()}),j1e=()=>"Project name",A1e=()=>"项目名称",T1e=()=>"نام پروژه",T7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A1e():t==="fa"?T1e():j1e()}),M1e=()=>"Search for a paper by arXiv ID, URL, or title",R1e=()=>"按 arXiv ID、网址或标题搜索论文",D1e=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",L1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R1e():t==="fa"?D1e():M1e()}),O1e=()=>"Sync experiments to GitHub",I1e=()=>"将实验同步到 GitHub",B1e=()=>"همگام‌سازی آزمایش‌ها با GitHub",$1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I1e():t==="fa"?B1e():O1e()}),H1e=()=>"That folder no longer exists. Choose it again.",P1e=()=>"该文件夹已不存在。请重新选择。",F1e=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",U1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P1e():t==="fa"?F1e():H1e()}),q1e=()=>"The selected folder contains an invalid Git repository.",G1e=()=>"所选文件夹包含无效的 Git 仓库。",V1e=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",W1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G1e():t==="fa"?V1e():q1e()}),K1e=()=>"The selected path is not a folder.",Y1e=()=>"所选路径不是文件夹。",X1e=()=>"مسیر انتخاب‌شده پوشه نیست.",Z1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y1e():t==="fa"?X1e():K1e()}),Q1e=e=>`Checking ${e==null?void 0:e.repository}.`,J1e=e=>`正在检查 ${e==null?void 0:e.repository}。`,ebe=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,tbe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?J1e(e):t==="fa"?ebe(e):Q1e(e)}),nbe=e=>`Creates ${e==null?void 0:e.repository}.`,rbe=e=>`将创建 ${e==null?void 0:e.repository}。`,sbe=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,ibe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rbe(e):t==="fa"?sbe(e):nbe(e)}),abe=e=>`Pushes to ${e==null?void 0:e.repository}.`,obe=e=>`将推送到 ${e==null?void 0:e.repository}。`,lbe=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,cbe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?obe(e):t==="fa"?lbe(e):abe(e)}),ube=()=>"Project location is required.",dbe=()=>"必须填写项目位置。",fbe=()=>"محل پروژه الزامی است.",M7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dbe():t==="fa"?fbe():ube()}),hbe=()=>"Choose a different destination. The paper repository needs a new or empty folder.",_be=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",pbe=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",mbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_be():t==="fa"?pbe():hbe()}),gbe=()=>"A linked public code repository is cloned without credentials.",bbe=()=>"关联的公开代码仓库无需凭据即可克隆。",vbe=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",xbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bbe():t==="fa"?vbe():gbe()}),ybe=e=>`Run ${e==null?void 0:e.command} before creating the project.`,wbe=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,Sbe=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,kbe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wbe(e):t==="fa"?Sbe(e):ybe(e)}),Cbe=()=>"Searching alphaXiv…",Ebe=()=>"正在搜索 alphaXiv…",Nbe=()=>"در حال جست‌وجوی alphaXiv…",zbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ebe():t==="fa"?Nbe():Cbe()}),jbe=()=>"Use folder",Abe=()=>"使用文件夹",Tbe=()=>"استفاده از پوشه",Mbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Abe():t==="fa"?Tbe():jbe()}),Rbe=()=>"Can’t reach OpenResearch. This page is no longer live.",Dbe=()=>"无法连接 OpenResearch。此页面已不再实时同步。",Lbe=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",Lv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dbe():t==="fa"?Lbe():Rbe()}),Obe=()=>"A workspace for your research agents",Ibe=()=>"面向研究智能体的工作空间",Bbe=()=>"فضای کاری برای عامل‌های پژوهشی شما",$be=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ibe():t==="fa"?Bbe():Obe()}),Hbe=()=>"Add papers that represent your research interests, including papers by other authors.",Pbe=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",Fbe=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",Ube=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pbe():t==="fa"?Fbe():Hbe()}),qbe=()=>"API key",Gbe=()=>"API 密钥",Vbe=()=>"کلید API",IE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gbe():t==="fa"?Vbe():qbe()}),Wbe=()=>"AI/ML",Kbe=()=>"人工智能与机器学习",Ybe=()=>"هوش مصنوعی و یادگیری ماشین",Xbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kbe():t==="fa"?Ybe():Wbe()}),Zbe=()=>"Biology",Qbe=()=>"生物学",Jbe=()=>"زیست‌شناسی",eve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qbe():t==="fa"?Jbe():Zbe()}),tve=()=>"Other",nve=()=>"其他",rve=()=>"سایر",sve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nve():t==="fa"?rve():tve()}),ive=()=>"Physics",ave=()=>"物理学",ove=()=>"فیزیک",lve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ave():t==="fa"?ove():ive()}),cve=()=>"Back",uve=()=>"返回",dve=()=>"بازگشت",R7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uve():t==="fa"?dve():cve()}),fve=()=>"Check failed",hve=()=>"检查失败",_ve=()=>"بررسی ناموفق بود",pve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hve():t==="fa"?_ve():fve()}),mve=()=>"Checking",gve=()=>"正在检查",bve=()=>"در حال بررسی",vve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gve():t==="fa"?bve():mve()}),xve=()=>"Checking Git…",yve=()=>"正在检查 Git…",wve=()=>"در حال بررسی Git…",Sve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yve():t==="fa"?wve():xve()}),kve=()=>"Choose a coding agent",Cve=()=>"选择编程智能体",Eve=()=>"یک عامل کدنویسی انتخاب کنید",Nve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cve():t==="fa"?Eve():kve()}),zve=()=>"Choose a coding agent to continue.",jve=()=>"选择一个编程智能体以继续。",Ave=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",Tve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jve():t==="fa"?Ave():zve()}),Mve=()=>"Choose at least one research area to continue.",Rve=()=>"请至少选择一个研究领域后再继续。",Dve=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",Lve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rve():t==="fa"?Dve():Mve()}),Ove=()=>"Choose one or more.",Ive=()=>"请选择一项或多项。",Bve=()=>"یک یا چند مورد را انتخاب کنید.",$ve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ive():t==="fa"?Bve():Ove()}),Hve=()=>"Choose your preferred coding agent",Pve=()=>"请选择首选编程智能体",Fve=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",Uve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pve():t==="fa"?Fve():Hve()}),qve=()=>"Consolidate your research",Gve=()=>"集中管理研究",Vve=()=>"پژوهش خود را یکپارچه کنید",Wve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gve():t==="fa"?Vve():qve()}),Kve=()=>"Continue",Yve=()=>"继续",Xve=()=>"ادامه",D7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yve():t==="fa"?Xve():Kve()}),Zve=()=>"Describe your research area to continue.",Qve=()=>"请描述你的研究领域后再继续。",Jve=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",e2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qve():t==="fa"?Jve():Zve()}),t2e=()=>"Detecting Claude Code, Codex, OpenCode…",n2e=()=>"正在检测 Claude Code、Codex、OpenCode…",r2e=()=>"در حال شناسایی Claude Code، Codex و OpenCode…",s2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n2e():t==="fa"?r2e():t2e()}),i2e=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",a2e=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",o2e=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",l2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a2e():t==="fa"?o2e():i2e()}),c2e=()=>"Everything stays local",u2e=()=>"一切都保留在本地",d2e=()=>"همه‌چیز محلی می‌ماند",f2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u2e():t==="fa"?d2e():c2e()}),h2e=()=>"Get started",_2e=()=>"开始使用",p2e=()=>"شروع",m2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_2e():t==="fa"?p2e():h2e()}),g2e=()=>"Git is required for local experiments. Install Git, then re-check.",b2e=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",v2e=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",x2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b2e():t==="fa"?v2e():g2e()}),y2e=()=>"Ground your agents",w2e=()=>"为智能体提供可靠依据",S2e=()=>"عامل‌هایتان را به منابع متصل کنید",k2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w2e():t==="fa"?S2e():y2e()}),C2e=()=>"Install broken",E2e=()=>"安装损坏",N2e=()=>"نصب خراب است",z2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E2e():t==="fa"?N2e():C2e()}),j2e=()=>"Install Git to continue",A2e=()=>"请安装 Git 后再继续",T2e=()=>"برای ادامه Git را نصب کنید",M2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A2e():t==="fa"?T2e():j2e()}),R2e=()=>"Local Git",D2e=()=>"本地 Git",L2e=()=>"Git محلی",O2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D2e():t==="fa"?L2e():R2e()}),I2e=()=>"Not detected",B2e=()=>"未检测到",$2e=()=>"شناسایی نشد",L7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B2e():t==="fa"?$2e():I2e()}),H2e=()=>"Not found",P2e=()=>"未找到",F2e=()=>"پیدا نشد",BE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P2e():t==="fa"?F2e():H2e()}),U2e=()=>"Not signed in",q2e=()=>"未登录",G2e=()=>"وارد نشده",V2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q2e():t==="fa"?G2e():U2e()}),W2e=()=>"OpenResearch uses a coding agent already installed on this machine.",K2e=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",Y2e=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",X2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K2e():t==="fa"?Y2e():W2e()}),Z2e=()=>"Other research area",Q2e=()=>"其他研究领域",J2e=()=>"حوزهٔ پژوهشی دیگر",exe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q2e():t==="fa"?J2e():Z2e()}),txe=()=>"Re-check",nxe=()=>"重新检查",rxe=()=>"بررسی دوباره",sxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nxe():t==="fa"?rxe():txe()}),ixe=()=>"Ready",axe=()=>"已就绪",oxe=()=>"آماده",lxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?axe():t==="fa"?oxe():ixe()}),cxe=()=>"Re-check Git before continuing",uxe=()=>"请重新检查 Git 后再继续",dxe=()=>"پیش از ادامه Git را دوباره بررسی کنید",fxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uxe():t==="fa"?dxe():cxe()}),hxe=()=>"Representative papers",_xe=()=>"代表性论文",pxe=()=>"مقاله‌های شاخص",mxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_xe():t==="fa"?pxe():hxe()}),gxe=()=>"Research background",bxe=()=>"研究背景",vxe=()=>"پیشینهٔ پژوهشی",xxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bxe():t==="fa"?vxe():gxe()}),yxe=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",wxe=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",Sxe=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",O7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wxe():t==="fa"?Sxe():yxe()}),kxe=()=>"Search alphaXiv by title to link a paper…",Cxe=()=>"按标题搜索 alphaXiv 以关联论文…",Exe=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",Nxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cxe():t==="fa"?Exe():kxe()}),zxe=()=>"Searching alphaXiv…",jxe=()=>"正在搜索 alphaXiv…",Axe=()=>"در حال جست‌وجوی alphaXiv…",Txe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jxe():t==="fa"?Axe():zxe()}),Mxe=()=>"Selected",Rxe=()=>"已选择",Dxe=()=>"انتخاب‌شده",Lxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rxe():t==="fa"?Dxe():Mxe()}),Oxe=()=>"Setting things up…",Ixe=()=>"正在设置…",Bxe=()=>"در حال راه‌اندازی…",$xe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ixe():t==="fa"?Bxe():Oxe()}),Hxe=()=>"Sign in to at least one coding agent to continue",Pxe=()=>"请至少登录一个编程智能体后再继续",Fxe=()=>"برای ادامه، وارد دست‌کم یک عامل برنامه‌نویسی شوید",Uxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pxe():t==="fa"?Fxe():Hxe()}),qxe=()=>"Sign in to at least one agent to continue.",Gxe=()=>"请登录至少一个智能体以继续。",Vxe=()=>"برای ادامه دست‌کم به یک عامل وارد شوید.",Wxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gxe():t==="fa"?Vxe():qxe()}),Kxe=()=>"Signed in",Yxe=()=>"已登录",Xxe=()=>"وارد شده",Zxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yxe():t==="fa"?Xxe():Kxe()}),Qxe=()=>"Connected to alphaXiv, bioRxiv, and OpenAlex to ground your agents in the latest research.",Jxe=()=>"已连接 alphaXiv、bioRxiv 和 OpenAlex,让智能体以最新研究为依据。",eye=()=>"به alphaXiv، bioRxiv و OpenAlex متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",tye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jxe():t==="fa"?eye():Qxe()}),nye=()=>"· Step 1 of 2",rye=()=>"· 第 1 步,共 2 步",sye=()=>"· مرحلهٔ ۱ از ۲",iye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rye():t==="fa"?sye():nye()}),aye=()=>"· Step 2 of 2",oye=()=>"· 第 2 步,共 2 步",lye=()=>"· مرحلهٔ ۲ از ۲",cye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oye():t==="fa"?lye():aye()}),uye=()=>"Tell us about your research",dye=()=>"介绍一下你的研究",fye=()=>"از پژوهش خود بگویید",hye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dye():t==="fa"?fye():uye()}),_ye=()=>"Tell us your other research area",pye=()=>"告诉我们你的其他研究领域",mye=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",gye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pye():t==="fa"?mye():_ye()}),bye=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",vye=()=>"在一处跟踪实验、产物、算力、技能和代码。",xye=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",yye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vye():t==="fa"?xye():bye()}),wye=()=>"Unable to verify",Sye=()=>"无法验证",kye=()=>"تأیید ممکن نیست",Cye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sye():t==="fa"?kye():wye()}),Eye=()=>"Update required",Nye=()=>"需要更新",zye=()=>"نیازمند به‌روزرسانی",jye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nye():t==="fa"?zye():Eye()}),Aye=()=>"Waiting for the Git check",Tye=()=>"正在等待 Git 检查",Mye=()=>"در انتظار بررسی Git",Rye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tye():t==="fa"?Mye():Aye()}),Dye=()=>"Waiting for the local tool checks",Lye=()=>"正在等待本地工具检查",Oye=()=>"در انتظار بررسی ابزارهای محلی",Iye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lye():t==="fa"?Oye():Dye()}),Bye=()=>"What areas are you interested in?",$ye=()=>"你对哪些领域感兴趣?",Hye=()=>"به چه حوزه‌هایی علاقه دارید؟",Pye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ye():t==="fa"?Hye():Bye()}),Fye=()=>"Your code, data, and experiment history stay on your machine.",Uye=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",qye=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",Gye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uye():t==="fa"?qye():Fye()}),Vye=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",Wye=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",Kye=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",Yye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wye():t==="fa"?Kye():Vye()}),Xye=()=>"Changed here and on Overleaf — choose which copy to keep",Zye=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",Qye=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",Jye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zye():t==="fa"?Qye():Xye()}),e4e=()=>"Create a token ↗",t4e=()=>"创建令牌 ↗",n4e=()=>"ساخت توکن ↗",r4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t4e():t==="fa"?n4e():e4e()}),s4e=()=>"Overleaf Git token",i4e=()=>"Overleaf Git 令牌",a4e=()=>"توکن Git در Overleaf",o4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i4e():t==="fa"?a4e():s4e()}),l4e=()=>"In step with Overleaf",c4e=()=>"已与 Overleaf 同步",u4e=()=>"با Overleaf همگام است",$E=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c4e():t==="fa"?u4e():l4e()}),d4e=()=>"The last sync did not finish.",f4e=()=>"上次同步未完成。",h4e=()=>"آخرین همگام‌سازی کامل نشد.",_4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f4e():t==="fa"?h4e():d4e()}),p4e=()=>"Link and sync",m4e=()=>"关联并同步",g4e=()=>"پیوند و همگام‌سازی",b4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m4e():t==="fa"?g4e():p4e()}),v4e=()=>"My projects ↗",x4e=()=>"我的项目 ↗",y4e=()=>"پروژه‌های من ↗",w4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x4e():t==="fa"?y4e():v4e()}),S4e=()=>"Nothing could be synced.",k4e=()=>"没有内容可以同步。",C4e=()=>"هیچ موردی قابل همگام‌سازی نبود.",E4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k4e():t==="fa"?C4e():S4e()}),N4e=()=>"Cancel",z4e=()=>"取消",j4e=()=>"لغو",A4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z4e():t==="fa"?j4e():N4e()}),T4e=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",M4e=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",R4e=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",D4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M4e():t==="fa"?R4e():T4e()}),L4e=()=>"Keep this copy",O4e=()=>"保留此副本",I4e=()=>"نگه داشتن این نسخه",B4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O4e():t==="fa"?I4e():L4e()}),$4e=()=>"Open in Overleaf",H4e=()=>"在 Overleaf 中打开",P4e=()=>"باز کردن در Overleaf",F4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H4e():t==="fa"?P4e():$4e()}),U4e=()=>"Replace the Overleaf token",q4e=()=>"替换 Overleaf 令牌",G4e=()=>"جایگزینی توکن Overleaf",I7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q4e():t==="fa"?G4e():U4e()}),V4e=()=>"Sync now",W4e=()=>"立即同步",K4e=()=>"همگام‌سازی اکنون",Y4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W4e():t==="fa"?K4e():V4e()}),X4e=()=>"Unlink",Z4e=()=>"取消关联",Q4e=()=>"قطع پیوند",J4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z4e():t==="fa"?Q4e():X4e()}),ewe=()=>"Upload a copy as a new project ↗",twe=()=>"上传副本作为新项目 ↗",nwe=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",rwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?twe():t==="fa"?nwe():ewe()}),swe=()=>"Use Overleaf's",iwe=()=>"使用 Overleaf 的副本",awe=()=>"استفاده از نسخهٔ Overleaf",owe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iwe():t==="fa"?awe():swe()}),lwe=()=>"This paper stays in step with Overleaf.",cwe=()=>"此论文将与 Overleaf 保持同步。",uwe=()=>"این مقاله با Overleaf همگام می‌ماند.",dwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cwe():t==="fa"?uwe():lwe()}),fwe=e=>`Pulled ${e==null?void 0:e.paths}.`,hwe=e=>`已拉取 ${e==null?void 0:e.paths}。`,_we=e=>`${e==null?void 0:e.paths} دریافت شد.`,pwe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hwe(e):t==="fa"?_we(e):fwe(e)}),mwe=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,gwe=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,bwe=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,vwe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gwe(e):t==="fa"?bwe(e):mwe(e)}),xwe=e=>`Pushed ${e==null?void 0:e.paths}.`,ywe=e=>`已推送 ${e==null?void 0:e.paths}。`,wwe=e=>`${e==null?void 0:e.paths} ارسال شد.`,Swe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ywe(e):t==="fa"?wwe(e):xwe(e)}),kwe=()=>"Save the file first",Cwe=()=>"请先保存文件",Ewe=()=>"ابتدا فایل را ذخیره کنید",Nwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cwe():t==="fa"?Ewe():kwe()}),zwe=()=>"Save this file to sync it with Overleaf",jwe=()=>"保存此文件以与 Overleaf 同步",Awe=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",HE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jwe():t==="fa"?Awe():zwe()}),Twe=()=>"Save token",Mwe=()=>"保存令牌",Rwe=()=>"ذخیرهٔ توکن",Dwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mwe():t==="fa"?Rwe():Twe()}),Lwe=()=>"Send this paper to Overleaf",Owe=()=>"将此论文发送到 Overleaf",Iwe=()=>"ارسال مقاله به Overleaf",Bwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Owe():t==="fa"?Iwe():Lwe()}),$we=()=>"Overleaf sync failed",Hwe=()=>"Overleaf 同步失败",Pwe=()=>"همگام‌سازی با Overleaf ناموفق بود",Fwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hwe():t==="fa"?Pwe():$we()}),Uwe=()=>"Syncing with Overleaf…",qwe=()=>"正在与 Overleaf 同步…",Gwe=()=>"در حال همگام‌سازی با Overleaf…",Vwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qwe():t==="fa"?Gwe():Uwe()}),Wwe=()=>"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.",Kwe=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",Ywe=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",Xwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kwe():t==="fa"?Ywe():Wwe()}),Zwe=()=>"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.",Qwe=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",Jwe=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",e5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qwe():t==="fa"?Jwe():Zwe()}),t5e=()=>"Toggle Plan mode for this chat",n5e=()=>"切换此聊天的计划模式",r5e=()=>"تغییر حالت طرح این گفت‌وگو",s5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n5e():t==="fa"?r5e():t5e()}),i5e=()=>"Accept and auto mode",a5e=()=>"接受并使用自动模式",o5e=()=>"پذیرش و حالت خودکار",l5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a5e():t==="fa"?o5e():i5e()}),c5e=()=>"Accept and bypass all",u5e=()=>"接受并跳过所有审批",d5e=()=>"پذیرش و عبور از همهٔ تأییدها",f5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u5e():t==="fa"?d5e():c5e()}),h5e=()=>"Accept plan",_5e=()=>"接受计划",p5e=()=>"پذیرش طرح",m5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_5e():t==="fa"?p5e():h5e()}),g5e=e=>`${e==null?void 0:e.agent} proposed a plan`,b5e=e=>`${e==null?void 0:e.agent} 提出了一个计划`,v5e=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,x5e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?b5e(e):t==="fa"?v5e(e):g5e(e)}),y5e=e=>`${e==null?void 0:e.agent} is ready to proceed`,w5e=e=>`${e==null?void 0:e.agent} 已准备好继续`,S5e=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,k5e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?w5e(e):t==="fa"?S5e(e):y5e(e)}),C5e=()=>"Back",E5e=()=>"返回",N5e=()=>"بازگشت",z5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E5e():t==="fa"?N5e():C5e()}),j5e=()=>"More approval options",A5e=()=>"更多批准选项",T5e=()=>"گزینه‌های تأیید بیشتر",M5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A5e():t==="fa"?T5e():j5e()}),R5e=()=>"Open plan",D5e=()=>"打开计划",L5e=()=>"باز کردن طرح",O5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D5e():t==="fa"?L5e():R5e()}),I5e=()=>"Reject",B5e=()=>"拒绝",$5e=()=>"رد کردن",H5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B5e():t==="fa"?$5e():I5e()}),P5e=()=>"Revise",F5e=()=>"修改",U5e=()=>"بازنگری",q5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F5e():t==="fa"?U5e():P5e()}),G5e=()=>"Revise…",V5e=()=>"修改…",W5e=()=>"بازنگری…",K5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V5e():t==="fa"?W5e():G5e()}),Y5e=()=>"What should change? (optional)",X5e=()=>"需要更改什么?(可选)",Z5e=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",Q5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X5e():t==="fa"?Z5e():Y5e()}),J5e=e=>`${e==null?void 0:e.count} active`,e3e=e=>`${e==null?void 0:e.count} 个活跃`,t3e=e=>`${e==null?void 0:e.count} فعال`,n3e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?e3e(e):t==="fa"?t3e(e):J5e(e)}),r3e=e=>`${e==null?void 0:e.count} total agents`,s3e=e=>`共 ${e==null?void 0:e.count} 个智能体`,i3e=e=>`در مجموع ${e==null?void 0:e.count} عامل`,a3e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?s3e(e):t==="fa"?i3e(e):r3e(e)}),o3e=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,l3e=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,c3e=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,u3e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?l3e(e):t==="fa"?c3e(e):o3e(e)}),d3e=()=>"Agents",f3e=()=>"智能体",h3e=()=>"عامل‌ها",B7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f3e():t==="fa"?h3e():d3e()}),_3e=()=>"arXiv paper ID:",p3e=()=>"arXiv 论文 ID:",m3e=()=>"شناسهٔ مقالهٔ arXiv:",g3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p3e():t==="fa"?m3e():_3e()}),b3e=()=>"Cancel",v3e=()=>"取消",x3e=()=>"لغو",y3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v3e():t==="fa"?x3e():b3e()}),w3e=()=>"Created",S3e=()=>"创建时间",k3e=()=>"ایجادشده",C3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S3e():t==="fa"?k3e():w3e()}),E3e=()=>"Delete project?",N3e=()=>"删除项目?",z3e=()=>"پروژه حذف شود؟",j3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N3e():t==="fa"?z3e():E3e()}),A3e=()=>"Delete project",T3e=()=>"删除项目",M3e=()=>"حذف پروژه",R3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T3e():t==="fa"?M3e():A3e()}),D3e=()=>"Deleting…",L3e=()=>"正在删除…",O3e=()=>"در حال حذف…",I3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L3e():t==="fa"?O3e():D3e()}),B3e=()=>"Experiments",$3e=()=>"实验",H3e=()=>"آزمایش‌ها",$7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$3e():t==="fa"?H3e():B3e()}),P3e=()=>"The local folder and linked GitHub repository are kept.",F3e=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",U3e=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",q3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F3e():t==="fa"?U3e():P3e()}),G3e=()=>"The local folder is kept.",V3e=()=>"本地文件夹会保留。",W3e=()=>"پوشهٔ محلی نگه داشته می‌شود.",K3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V3e():t==="fa"?W3e():G3e()}),Y3e=()=>"New project",X3e=()=>"新建项目",Z3e=()=>"پروژهٔ جدید",PE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X3e():t==="fa"?Z3e():Y3e()}),Q3e=()=>"No projects yet — create one to get started.",J3e=()=>"尚无项目——新建一个即可开始。",e6e=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",t6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J3e():t==="fa"?e6e():Q3e()}),n6e=()=>"Project",r6e=()=>"项目",s6e=()=>"پروژه",i6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r6e():t==="fa"?s6e():n6e()}),a6e=()=>"Projects",o6e=()=>"项目",l6e=()=>"پروژه‌ها",c6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o6e():t==="fa"?l6e():a6e()}),u6e=()=>"Repository",d6e=()=>"仓库",f6e=()=>"مخزن",H7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d6e():t==="fa"?f6e():u6e()}),h6e=()=>"Idle",_6e=()=>"空闲",p6e=()=>"بیکار",m6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_6e():t==="fa"?p6e():h6e()}),g6e=()=>"Local",b6e=()=>"本地",v6e=()=>"محلی",FE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b6e():t==="fa"?v6e():g6e()}),x6e=()=>"1 total agent",y6e=()=>"共 1 个智能体",w6e=()=>"در مجموع ۱ عامل",S6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y6e():t==="fa"?w6e():x6e()}),k6e=e=>`${e==null?void 0:e.count} running`,C6e=e=>`${e==null?void 0:e.count} 个运行中`,E6e=e=>`${e==null?void 0:e.count} در حال اجرا`,N6e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?C6e(e):t==="fa"?E6e(e):k6e(e)}),z6e=e=>`${e==null?void 0:e.count} total`,j6e=e=>`共 ${e==null?void 0:e.count} 个`,A6e=e=>`در مجموع ${e==null?void 0:e.count}`,P7=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?j6e(e):t==="fa"?A6e(e):z6e(e)}),T6e=e=>`${e==null?void 0:e.value}d`,M6e=e=>`${e==null?void 0:e.value} 天`,R6e=e=>`${e==null?void 0:e.value}ر`,D6e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?M6e(e):t==="fa"?R6e(e):T6e(e)}),L6e=e=>`${e==null?void 0:e.value}h`,O6e=e=>`${e==null?void 0:e.value} 小时`,I6e=e=>`${e==null?void 0:e.value}س`,B6e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?O6e(e):t==="fa"?I6e(e):L6e(e)}),$6e=e=>`${e==null?void 0:e.value}m`,H6e=e=>`${e==null?void 0:e.value} 分钟`,P6e=e=>`${e==null?void 0:e.value}د`,F6e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?H6e(e):t==="fa"?P6e(e):$6e(e)}),U6e=()=>"now",q6e=()=>"现在",G6e=()=>"اکنون",V6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q6e():t==="fa"?G6e():U6e()}),W6e=()=>"Installing the compatible binary. This may take a few minutes.",K6e=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",Y6e=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",X6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K6e():t==="fa"?Y6e():W6e()}),Z6e=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,Q6e=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,J6e=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,e7e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Q6e(e):t==="fa"?J6e(e):Z6e(e)}),t7e=()=>"Check again",n7e=()=>"再次检查",r7e=()=>"بررسی دوباره",F7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n7e():t==="fa"?r7e():t7e()}),s7e=()=>"Closing…",i7e=()=>"正在关闭…",a7e=()=>"در حال بستن…",o7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i7e():t==="fa"?a7e():s7e()}),l7e=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,c7e=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,u7e=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,d7e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?c7e(e):t==="fa"?u7e(e):l7e(e)}),f7e=()=>"Preparing your remote workspace…",h7e=()=>"正在准备远程工作区…",_7e=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",p7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h7e():t==="fa"?_7e():f7e()}),m7e=e=>`Connecting to ${e==null?void 0:e.host}`,g7e=e=>`正在连接到 ${e==null?void 0:e.host}`,b7e=e=>`در حال اتصال به ${e==null?void 0:e.host}`,v7e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?g7e(e):t==="fa"?b7e(e):m7e(e)}),x7e=()=>"Close remote host picker",y7e=()=>"关闭远程主机选择器",w7e=()=>"بستن انتخاب‌گر میزبان راه‌دور",S7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y7e():t==="fa"?w7e():x7e()}),k7e=()=>"Choose a configured SSH host.",C7e=()=>"选择已配置的 SSH 主机。",E7e=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",N7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C7e():t==="fa"?E7e():k7e()}),z7e=()=>"Connect to remote",j7e=()=>"连接到远程主机",A7e=()=>"اتصال به میزبان راه‌دور",UE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j7e():t==="fa"?A7e():z7e()}),T7e=()=>"Disconnect",M7e=()=>"断开连接",R7e=()=>"قطع اتصال",Ov=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M7e():t==="fa"?R7e():T7e()}),D7e=()=>"Your remote work is still running. Reconnect when you’re ready.",L7e=()=>"你的远程工作仍在运行。准备好后可以重新连接。",O7e=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",I7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L7e():t==="fa"?O7e():D7e()}),B7e=e=>`Disconnected from ${e==null?void 0:e.host}`,$7e=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,H7e=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,qE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$7e(e):t==="fa"?H7e(e):B7e(e)}),P7e=e=>`Could not connect to ${e==null?void 0:e.host}`,F7e=e=>`无法连接到 ${e==null?void 0:e.host}`,U7e=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,q7e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?F7e(e):t==="fa"?U7e(e):P7e(e)}),G7e=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",V7e=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",W7e=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",K7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V7e():t==="fa"?W7e():G7e()}),Y7e=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",X7e=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",Z7e=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",Q7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X7e():t==="fa"?Z7e():Y7e()}),J7e=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,eSe=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,tSe=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,nSe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eSe(e):t==="fa"?tSe(e):J7e(e)}),rSe=()=>"OpenResearch binary",sSe=()=>"OpenResearch 二进制文件",iSe=()=>"فایل اجرایی OpenResearch",aSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sSe():t==="fa"?iSe():rSe()}),oSe=()=>"Repository cache",lSe=()=>"仓库缓存",cSe=()=>"حافظهٔ نهان مخزن",uSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lSe():t==="fa"?cSe():oSe()}),dSe=()=>"OpenResearch Database",fSe=()=>"OpenResearch 数据库",hSe=()=>"پایگاه دادهٔ OpenResearch",_Se=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fSe():t==="fa"?hSe():dSe()}),pSe=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",mSe=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",gSe=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",bSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mSe():t==="fa"?gSe():pSe()}),vSe=()=>"Install OpenResearch?",xSe=()=>"安装 OpenResearch?",ySe=()=>"OpenResearch نصب شود؟",wSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xSe():t==="fa"?ySe():vSe()}),SSe=()=>"Installing…",kSe=()=>"正在安装…",CSe=()=>"در حال نصب…",ESe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kSe():t==="fa"?CSe():SSe()}),NSe=()=>"No matching SSH hosts",zSe=()=>"没有匹配的 SSH 主机",jSe=()=>"میزبان SSH منطبقی پیدا نشد",ASe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zSe():t==="fa"?jSe():NSe()}),TSe=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,MSe=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,RSe=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,DSe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MSe(e):t==="fa"?RSe(e):TSe(e)}),LSe=()=>"Open remote",OSe=()=>"打开远程工作区",ISe=()=>"باز کردن راه‌دور",BSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OSe():t==="fa"?ISe():LSe()}),$Se=()=>"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.",HSe=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",PSe=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",FSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HSe():t==="fa"?PSe():$Se()}),USe=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",qSe=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",GSe=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",VSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qSe():t==="fa"?GSe():USe()}),WSe=()=>"Preparing remote workspace…",KSe=()=>"正在准备远程工作区…",YSe=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",XSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KSe():t==="fa"?YSe():WSe()}),ZSe=()=>"Reconnect",QSe=()=>"重新连接",JSe=()=>"اتصال دوباره",U7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QSe():t==="fa"?JSe():ZSe()}),e8e=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",t8e=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",n8e=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",r8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t8e():t==="fa"?n8e():e8e()}),s8e=e=>`Reconnecting to ${e==null?void 0:e.host}`,i8e=e=>`正在重新连接到 ${e==null?void 0:e.host}`,a8e=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,o8e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?i8e(e):t==="fa"?a8e(e):s8e(e)}),l8e=()=>"Search SSH hosts",c8e=()=>"搜索 SSH 主机",u8e=()=>"جستجوی میزبان‌های SSH",q7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c8e():t==="fa"?u8e():l8e()}),d8e=e=>`SSH: ${e==null?void 0:e.host}`,f8e=e=>`SSH:${e==null?void 0:e.host}`,h8e=e=>`SSH: ${e==null?void 0:e.host}`,ab=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?f8e(e):t==="fa"?h8e(e):d8e(e)}),_8e=()=>"Start a new OpenResearch host",p8e=()=>"启动新的 OpenResearch 主机",m8e=()=>"راه‌اندازی میزبان جدید OpenResearch",g8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p8e():t==="fa"?m8e():_8e()}),b8e=e=>`End ${e==null?void 0:e.count} pending approvals.`,v8e=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,x8e=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,y8e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?v8e(e):t==="fa"?x8e(e):b8e(e)}),w8e=()=>"Stop OpenResearch",S8e=()=>"停止 OpenResearch",k8e=()=>"توقف OpenResearch",C8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S8e():t==="fa"?k8e():w8e()}),E8e=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,N8e=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,z8e=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,j8e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?N8e(e):t==="fa"?z8e(e):E8e(e)}),A8e=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,T8e=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,M8e=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,R8e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?T8e(e):t==="fa"?M8e(e):A8e(e)}),D8e=()=>"Stop OpenResearch on host",L8e=()=>"停止主机上的 OpenResearch",O8e=()=>"توقف OpenResearch روی میزبان",GE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L8e():t==="fa"?O8e():D8e()}),I8e=()=>"This will also:",B8e=()=>"这还将:",$8e=()=>"این کار همچنین:",H8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B8e():t==="fa"?$8e():I8e()}),P8e=()=>"End 1 pending approval.",F8e=()=>"结束 1 个待审批请求。",U8e=()=>"۱ تأیید در انتظار را پایان می‌دهد.",q8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F8e():t==="fa"?U8e():P8e()}),G8e=()=>"Leave 1 submitted experiment running.",V8e=()=>"让 1 个已提交实验继续运行。",W8e=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",K8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V8e():t==="fa"?W8e():G8e()}),Y8e=()=>"Disconnect 1 other client.",X8e=()=>"断开 1 个其他客户端。",Z8e=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",Q8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X8e():t==="fa"?Z8e():Y8e()}),J8e=()=>"Keep 1 queued message saved.",eke=()=>"保留 1 条排队消息。",tke=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",nke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eke():t==="fa"?tke():J8e()}),rke=()=>"Interrupt 1 active agent turn.",ske=()=>"中断 1 个活动代理任务。",ike=()=>"۱ نوبت فعال عامل را قطع می‌کند.",ake=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ske():t==="fa"?ike():rke()}),oke=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,lke=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,cke=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,uke=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lke(e):t==="fa"?cke(e):oke(e)}),dke=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,fke=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,hke=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,_ke=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fke(e):t==="fa"?hke(e):dke(e)}),pke=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,mke=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,gke=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,bke=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mke(e):t==="fa"?gke(e):pke(e)}),vke=()=>"Stopping host…",xke=()=>"正在停止主机…",yke=()=>"در حال توقف میزبان…",wke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xke():t==="fa"?yke():vke()}),Ske=()=>"Update",kke=()=>"更新",Cke=()=>"به‌روزرسانی",G7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kke():t==="fa"?Cke():Ske()}),Eke=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,Nke=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,zke=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,jke=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nke(e):t==="fa"?zke(e):Eke(e)}),Ake=()=>"Update OpenResearch?",Tke=()=>"更新 OpenResearch?",Mke=()=>"OpenResearch به‌روزرسانی شود؟",Rke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tke():t==="fa"?Mke():Ake()}),Dke=()=>"Updating…",Lke=()=>"正在更新…",Oke=()=>"در حال به‌روزرسانی…",Ike=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lke():t==="fa"?Oke():Dke()}),Bke=()=>"Disable syncing",$ke=()=>"关闭同步",Hke=()=>"غیرفعال کردن همگام‌سازی",Pke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ke():t==="fa"?Hke():Bke()}),Fke=()=>"Enable GitHub syncing",Uke=()=>"启用 GitHub 同步",qke=()=>"فعال‌سازی همگام‌سازی GitHub",Gke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uke():t==="fa"?qke():Fke()}),Vke=()=>"Enabling…",Wke=()=>"正在启用…",Kke=()=>"در حال فعال‌سازی…",Yke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wke():t==="fa"?Kke():Vke()}),Xke=()=>"Updating…",Zke=()=>"正在更新…",Qke=()=>"در حال به‌روزرسانی…",Jke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zke():t==="fa"?Qke():Xke()}),eCe=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,tCe=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,nCe=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,rCe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tCe(e):t==="fa"?nCe(e):eCe(e)}),sCe=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,iCe=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,aCe=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,oCe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iCe(e):t==="fa"?aCe(e):sCe(e)}),lCe=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`,cCe=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,uCe=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,dCe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cCe(e):t==="fa"?uCe(e):lCe(e)}),fCe=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,hCe=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,_Ce=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,pCe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hCe(e):t==="fa"?_Ce(e):fCe(e)}),mCe=()=>"CLI is retrying…",gCe=()=>"CLI 正在重试…",bCe=()=>"CLI در حال تلاش دوباره است…",vCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gCe():t==="fa"?bCe():mCe()}),xCe=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,yCe=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,wCe=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,SCe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yCe(e):t==="fa"?wCe(e):xCe(e)}),kCe=()=>"Sending again…",CCe=()=>"正在重新发送…",ECe=()=>"در حال ارسال دوباره…",NCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CCe():t==="fa"?ECe():kCe()}),zCe=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,jCe=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,ACe=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,TCe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jCe(e):t==="fa"?ACe(e):zCe(e)}),MCe=()=>"Retrying…",RCe=()=>"正在重试…",DCe=()=>"در حال تلاش دوباره…",VE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RCe():t==="fa"?DCe():MCe()}),LCe=()=>"Default speed",OCe=()=>"默认速度",ICe=()=>"سرعت پیش‌فرض",BCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OCe():t==="fa"?ICe():LCe()}),$Ce=()=>"Standard",HCe=()=>"标准",PCe=()=>"استاندارد",FCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HCe():t==="fa"?PCe():$Ce()}),UCe=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,qCe=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,GCe=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,VCe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qCe(e):t==="fa"?GCe(e):UCe(e)}),WCe=()=>"Appearance",KCe=()=>"外观",YCe=()=>"ظاهر",XCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KCe():t==="fa"?YCe():WCe()}),ZCe=()=>"Check",QCe=()=>"检查",JCe=()=>"بررسی",e9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QCe():t==="fa"?JCe():ZCe()}),t9e=()=>"Check again",n9e=()=>"再次检查",r9e=()=>"بررسی دوباره",s9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n9e():t==="fa"?r9e():t9e()}),i9e=()=>"Check for updates",a9e=()=>"检查更新",o9e=()=>"بررسی به‌روزرسانی",l9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a9e():t==="fa"?o9e():i9e()}),c9e=()=>"Check now",u9e=()=>"立即检查",d9e=()=>"اکنون بررسی کن",f9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u9e():t==="fa"?d9e():c9e()}),h9e=()=>"Check setup",_9e=()=>"检查设置",p9e=()=>"بررسی راه‌اندازی",m9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_9e():t==="fa"?p9e():h9e()}),g9e=()=>"orx checks a few times a day on its own.",b9e=()=>"orx 每天会自动检查几次。",v9e=()=>"orx روزی چند بار خودکار بررسی می‌کند.",x9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b9e():t==="fa"?v9e():g9e()}),y9e=()=>"Choose a flavor",w9e=()=>"选择配置",S9e=()=>"انتخاب پیکربندی",k9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w9e():t==="fa"?S9e():y9e()}),C9e=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,E9e=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,N9e=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,z9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?E9e(e):t==="fa"?N9e(e):C9e(e)}),j9e=()=>"clean",A9e=()=>"无更改",T9e=()=>"بدون تغییر",M9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A9e():t==="fa"?T9e():j9e()}),R9e=e=>`Already linked at ${e==null?void 0:e.link}.`,D9e=e=>`已链接到 ${e==null?void 0:e.link}。`,L9e=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,O9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?D9e(e):t==="fa"?L9e(e):R9e(e)}),I9e=e=>`Linked ${e==null?void 0:e.link}.`,B9e=e=>`已链接 ${e==null?void 0:e.link}。`,$9e=e=>`${e==null?void 0:e.link} پیوند شد.`,H9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?B9e(e):t==="fa"?$9e(e):I9e(e)}),P9e=()=>"Connect",F9e=()=>"连接",U9e=()=>"اتصال",Ex=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F9e():t==="fa"?U9e():P9e()}),q9e=()=>"Connected via GitHub CLI",G9e=()=>"已通过 GitHub CLI 连接",V9e=()=>"از طریق GitHub CLI متصل است",WE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G9e():t==="fa"?V9e():q9e()}),W9e=()=>"Connecting…",K9e=()=>"正在连接…",Y9e=()=>"در حال اتصال…",KE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K9e():t==="fa"?Y9e():W9e()}),X9e=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",Z9e=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",Q9e=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",J9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z9e():t==="fa"?Q9e():X9e()}),eEe=()=>"the current project",tEe=()=>"当前项目",nEe=()=>"پروژهٔ فعلی",rEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tEe():t==="fa"?nEe():eEe()}),sEe=e=>`${e==null?void 0:e.value} (custom)`,iEe=e=>`${e==null?void 0:e.value}(自定义)`,aEe=e=>`${e==null?void 0:e.value} (سفارشی)`,oEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iEe(e):t==="fa"?aEe(e):sEe(e)}),lEe=()=>"detached",cEe=()=>"分离头指针",uEe=()=>"جدا از شاخه",YE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cEe():t==="fa"?uEe():lEe()}),dEe=()=>"Disconnected",fEe=()=>"已断开连接",hEe=()=>"قطع اتصال",XE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fEe():t==="fa"?hEe():dEe()}),_Ee=()=>"Environment broken",pEe=()=>"环境损坏",mEe=()=>"محیط خراب است",gEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pEe():t==="fa"?mEe():_Ee()}),bEe=()=>"Environment not built",vEe=()=>"环境尚未构建",xEe=()=>"محیط ساخته نشده است",yEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vEe():t==="fa"?xEe():bEe()}),wEe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,SEe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,kEe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,CEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SEe(e):t==="fa"?kEe(e):wEe(e)}),EEe=()=>"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.",NEe=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",zEe=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",jEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NEe():t==="fa"?zEe():EEe()}),AEe=()=>"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.",TEe=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",MEe=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",REe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TEe():t==="fa"?MEe():AEe()}),DEe=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",LEe=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",OEe=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",IEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LEe():t==="fa"?OEe():DEe()}),BEe=()=>"has changes",$Ee=()=>"有更改",HEe=()=>"دارای تغییر",PEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ee():t==="fa"?HEe():BEe()}),FEe=()=>"~/.cache/huggingface/token (hf auth login)",UEe=()=>"~/.cache/huggingface/token(hf auth login)",qEe=()=>"~/.cache/huggingface/token (hf auth login)",GEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UEe():t==="fa"?qEe():FEe()}),VEe=()=>"HF_TOKEN environment variable",WEe=()=>"HF_TOKEN 环境变量",KEe=()=>"متغیر محیطی HF_TOKEN",YEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WEe():t==="fa"?KEe():VEe()}),XEe=()=>"~/.openresearch/env",ZEe=()=>"~/.openresearch/env",QEe=()=>"~/.openresearch/env",JEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZEe():t==="fa"?QEe():XEe()}),eNe=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}.`,tNe=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,nNe=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,rNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tNe(e):t==="fa"?nNe(e):eNe(e)}),sNe=()=>"Install",iNe=()=>"安装",aNe=()=>"نصب",oNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iNe():t==="fa"?aNe():sNe()}),lNe=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.`,cNe=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,uNe=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,dNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cNe(e):t==="fa"?uNe(e):lNe(e)}),fNe=e=>`Install the ${e==null?void 0:e.command} command`,hNe=e=>`安装 ${e==null?void 0:e.command} 命令`,_Ne=e=>`نصب فرمان ${e==null?void 0:e.command}`,pNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hNe(e):t==="fa"?_Ne(e):fNe(e)}),mNe=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",gNe=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",bNe=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",vNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gNe():t==="fa"?bNe():mNe()}),xNe=()=>"Install the new release now instead of waiting for the background update.",yNe=()=>"立即安装新版本,无需等待后台更新。",wNe=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",SNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yNe():t==="fa"?wNe():xNe()}),kNe=()=>"kubectl default",CNe=()=>"kubectl 默认值",ENe=()=>"پیش‌فرض kubectl",NNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CNe():t==="fa"?ENe():kNe()}),zNe=e=>`kubectl default (${e==null?void 0:e.context})`,jNe=e=>`kubectl 默认值(${e==null?void 0:e.context})`,ANe=e=>`پیش‌فرض kubectl (${e==null?void 0:e.context})`,TNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jNe(e):t==="fa"?ANe(e):zNe(e)}),MNe=()=>"Language",RNe=()=>"语言",DNe=()=>"زبان",LNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RNe():t==="fa"?DNe():MNe()}),ONe=e=>`Not signed in. Run ${e==null?void 0:e.command} in a terminal to connect your OpenResearch account.`,INe=e=>`尚未登录。请在终端中运行 ${e==null?void 0:e.command} 以连接你的 OpenResearch 账户。`,BNe=e=>`وارد نشده‌اید. برای اتصال حساب OpenResearch خود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,$Ne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?INe(e):t==="fa"?BNe(e):ONe(e)}),HNe=()=>"Make default",PNe=()=>"设为默认值",FNe=()=>"پیش‌فرض شود",UNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PNe():t==="fa"?FNe():HNe()}),qNe=e=>`The manifest must define one Job. orx injects the run script, environment, labels, and timeout. Use ${e==null?void 0:e.placeholder} in resource names, or override the default path with ${e==null?void 0:e.command}.`,GNe=e=>`清单必须定义一个 Job。orx 会注入运行脚本、环境、标签和超时设置。请在资源名称中使用 ${e==null?void 0:e.placeholder},或通过 ${e==null?void 0:e.command} 覆盖默认路径。`,VNe=e=>`مانیفست باید یک Job تعریف کند. orx اسکریپت اجرا، محیط، برچسب‌ها و مهلت زمانی را تزریق می‌کند. از ${e==null?void 0:e.placeholder} در نام منابع استفاده کنید، یا مسیر پیش‌فرض را با ${e==null?void 0:e.command} تغییر دهید.`,WNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GNe(e):t==="fa"?VNe(e):qNe(e)}),KNe=()=>"Provisioned (Modal import failing)",YNe=()=>"已预配(Modal 导入失败)",XNe=()=>"آماده شده (درون‌ریزی Modal ناموفق است)",ZNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YNe():t==="fa"?XNe():KNe()}),QNe=()=>"MODAL_TOKEN_ID environment variable",JNe=()=>"MODAL_TOKEN_ID 环境变量",eze=()=>"متغیر محیطی MODAL_TOKEN_ID",tze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JNe():t==="fa"?eze():QNe()}),nze=()=>"~/.modal.toml (modal token new)",rze=()=>"~/.modal.toml(modal token new)",sze=()=>"~/.modal.toml (modal token new)",ize=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rze():t==="fa"?sze():nze()}),aze=e=>`No Modal token found. Run ${e==null?void 0:e.command}, or add ${e==null?void 0:e.id} and ${e==null?void 0:e.secret} in the Environment tab.`,oze=e=>`未找到 Modal 令牌。请运行 ${e==null?void 0:e.command},或在“环境”标签页中添加 ${e==null?void 0:e.id} 和 ${e==null?void 0:e.secret}。`,lze=e=>`توکن Modal پیدا نشد. ${e==null?void 0:e.command} را اجرا کنید، یا ${e==null?void 0:e.id} و ${e==null?void 0:e.secret} را در زبانهٔ محیط اضافه کنید.`,cze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oze(e):t==="fa"?lze(e):aze(e)}),uze=()=>"~/.openresearch/env",dze=()=>"~/.openresearch/env",fze=()=>"~/.openresearch/env",hze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dze():t==="fa"?fze():uze()}),_ze=e=>`${e==null?void 0:e.count} available — ${e==null?void 0:e.models}`,pze=e=>`${e==null?void 0:e.count} 个可用 — ${e==null?void 0:e.models}`,mze=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,gze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pze(e):t==="fa"?mze(e):_ze(e)}),bze=e=>`Needs ${e==null?void 0:e.tool}`,vze=e=>`需要 ${e==null?void 0:e.tool}`,xze=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,yze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vze(e):t==="fa"?xze(e):bze(e)}),wze=()=>"Needs tools",Sze=()=>"缺少工具",kze=()=>"به ابزارها نیاز دارد",Cze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sze():t==="fa"?kze():wze()}),Eze=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,Nze=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,zze=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,jze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nze(e):t==="fa"?zze(e):Eze(e)}),Aze=()=>"New runs use SSH; choose a host when launching.",Tze=()=>"新运行将使用 SSH;启动时请选择主机。",Mze=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",Rze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tze():t==="fa"?Mze():Aze()}),Dze=()=>"New token",Lze=()=>"新令牌",Oze=()=>"توکن جدید",Ize=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lze():t==="fa"?Oze():Dze()}),Bze=()=>"No default flavor",$ze=()=>"不设默认配置",Hze=()=>"بدون پیکربندی پیش‌فرض",Pze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ze():t==="fa"?Hze():Bze()}),Fze=()=>"none",Uze=()=>"无",qze=()=>"هیچ‌کدام",Nx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uze():t==="fa"?qze():Fze()}),Gze=()=>"Not built yet",Vze=()=>"尚未构建",Wze=()=>"هنوز ساخته نشده",Kze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vze():t==="fa"?Wze():Gze()}),Yze=()=>"Not connected",Xze=()=>"未连接",Zze=()=>"متصل نیست",ZE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xze():t==="fa"?Zze():Yze()}),Qze=()=>"not found on PATH",Jze=()=>"在 PATH 中未找到",eje=()=>"در PATH پیدا نشد",tje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jze():t==="fa"?eje():Qze()}),nje=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,rje=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,sje=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,ije=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rje(e):t==="fa"?sje(e):nje(e)}),aje=()=>"not initialized",oje=()=>"尚未初始化",lje=()=>"راه‌اندازی نشده",cje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oje():t==="fa"?lje():aje()}),uje=()=>"Not set",dje=()=>"未设置",fje=()=>"تنظیم نشده",hje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dje():t==="fa"?fje():uje()}),_je=()=>"OAuth (subscription login)",pje=()=>"OAuth(订阅登录)",mje=()=>"OAuth (ورود با اشتراک)",gje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pje():t==="fa"?mje():_je()}),bje=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.`,vje=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,xje=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,yje=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vje(e):t==="fa"?xje(e):bje(e)}),wje=()=>"Account",Sje=()=>"账户",kje=()=>"حساب",zx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sje():t==="fa"?kje():wje()}),Cje=()=>"Add one with",Eje=()=>"使用以下命令添加:",Nje=()=>"یکی با این فرمان اضافه کنید:",zje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eje():t==="fa"?Nje():Cje()}),jje=()=>"Add variable",Aje=()=>"添加变量",Tje=()=>"افزودن متغیر",Mje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aje():t==="fa"?Tje():jje()}),Rje=()=>"Agent models",Dje=()=>"智能体模型",Lje=()=>"مدل‌های عامل",Oje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dje():t==="fa"?Lje():Rje()}),Ije=()=>"Anonymous usage analytics",Bje=()=>"匿名使用情况分析",$je=()=>"تحلیل ناشناس استفاده",V7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bje():t==="fa"?$je():Ije()}),Hje=()=>"Auth",Pje=()=>"身份验证",Fje=()=>"احراز هویت",Uje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pje():t==="fa"?Fje():Hje()}),qje=()=>"Authentication",Gje=()=>"身份验证",Vje=()=>"احراز هویت",Wje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gje():t==="fa"?Vje():qje()}),Kje=()=>"Back to Compute",Yje=()=>"返回算力设置",Xje=()=>"بازگشت به رایانش",QE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yje():t==="fa"?Xje():Kje()}),Zje=()=>"Backend",Qje=()=>"后端",Jje=()=>"بک‌اند",eAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qje():t==="fa"?Jje():Zje()}),tAe=()=>"Baseline",nAe=()=>"基线",rAe=()=>"خط مبنا",sAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nAe():t==="fa"?rAe():tAe()}),iAe=()=>"Binary",aAe=()=>"可执行文件",oAe=()=>"فایل اجرایی",lAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aAe():t==="fa"?oAe():iAe()}),cAe=()=>"Cancel",uAe=()=>"取消",dAe=()=>"لغو",Eh=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uAe():t==="fa"?dAe():cAe()}),fAe=()=>"Cancel new variable",hAe=()=>"取消新变量",_Ae=()=>"لغو متغیر جدید",pAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hAe():t==="fa"?_Ae():fAe()}),mAe=()=>"Checking compute targets…",gAe=()=>"正在检查算力目标…",bAe=()=>"در حال بررسی مقصدهای رایانشی…",vAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gAe():t==="fa"?bAe():mAe()}),xAe=()=>"Checking credentials…",yAe=()=>"正在检查凭据…",wAe=()=>"در حال بررسی اطلاعات ورود…",SAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yAe():t==="fa"?wAe():xAe()}),kAe=()=>"Checking kubectl…",CAe=()=>"正在检查 kubectl…",EAe=()=>"در حال بررسی kubectl…",NAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CAe():t==="fa"?EAe():kAe()}),zAe=()=>"Checking Modal…",jAe=()=>"正在检查 Modal…",AAe=()=>"در حال بررسی Modal…",TAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jAe():t==="fa"?AAe():zAe()}),MAe=()=>"Choose a preset flavor",RAe=()=>"选择预设规格",DAe=()=>"یک پیکربندی آماده انتخاب کنید",W7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RAe():t==="fa"?DAe():MAe()}),LAe=()=>"Cluster",OAe=()=>"集群",IAe=()=>"خوشه",BAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OAe():t==="fa"?IAe():LAe()}),$Ae=()=>"cluster default",HAe=()=>"集群默认值",PAe=()=>"پیش‌فرض خوشه",K7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HAe():t==="fa"?PAe():$Ae()}),FAe=()=>"cluster default (e.g. 4h, 30m)",UAe=()=>"集群默认值(例如 4h、30m)",qAe=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",GAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UAe():t==="fa"?qAe():FAe()}),VAe=()=>"Cluster unreachable",WAe=()=>"无法连接集群",KAe=()=>"خوشه در دسترس نیست",YAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WAe():t==="fa"?KAe():VAe()}),XAe=()=>"Compute",ZAe=()=>"算力",QAe=()=>"رایانش",JE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZAe():t==="fa"?QAe():XAe()}),JAe=()=>"Connect compute backends and choose where new runs execute.",eTe=()=>"连接算力后端,并选择新运行的执行位置。",tTe=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",nTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eTe():t==="fa"?tTe():JAe()}),rTe=()=>"Connected",sTe=()=>"已连接",iTe=()=>"متصل",jx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sTe():t==="fa"?iTe():rTe()}),aTe=()=>"Context",oTe=()=>"上下文",lTe=()=>"زمینه",cTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oTe():t==="fa"?lTe():aTe()}),uTe=()=>"Current",dTe=()=>"当前",fTe=()=>"فعلی",hTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dTe():t==="fa"?fTe():uTe()}),_Te=()=>"Currently off:",pTe=()=>"当前已关闭:",mTe=()=>"اکنون خاموش است:",gTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pTe():t==="fa"?mTe():_Te()}),bTe=()=>"Custom flavor",vTe=()=>"自定义规格",xTe=()=>"پیکربندی سفارشی",yTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vTe():t==="fa"?xTe():bTe()}),wTe=()=>"Custom flavor…",STe=()=>"自定义规格…",kTe=()=>"پیکربندی سفارشی…",CTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?STe():t==="fa"?kTe():wTe()}),ETe=()=>"Data directory",NTe=()=>"数据目录",zTe=()=>"پوشهٔ داده",jTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NTe():t==="fa"?zTe():ETe()}),ATe=()=>"default",TTe=()=>"默认",MTe=()=>"پیش‌فرض",RTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TTe():t==="fa"?MTe():ATe()}),DTe=()=>"Default",LTe=()=>"默认",OTe=()=>"پیش‌فرض",eN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LTe():t==="fa"?OTe():DTe()}),ITe=()=>"Default destination",BTe=()=>"默认目标",$Te=()=>"مقصد پیش‌فرض",HTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BTe():t==="fa"?$Te():ITe()}),PTe=()=>"Detecting hardware…",FTe=()=>"正在检测硬件…",UTe=()=>"در حال شناسایی سخت‌افزار…",qTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FTe():t==="fa"?UTe():PTe()}),GTe=()=>"Detecting harnesses…",VTe=()=>"正在检测智能体工具…",WTe=()=>"در حال شناسایی ابزارهای عامل…",KTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VTe():t==="fa"?WTe():GTe()}),YTe=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",XTe=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",ZTe=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",QTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XTe():t==="fa"?ZTe():YTe()}),JTe=()=>"Effective URL",eMe=()=>"实际使用的网址",tMe=()=>"نشانی مؤثر",nMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eMe():t==="fa"?tMe():JTe()}),rMe=()=>"Enable GitHub syncing for new projects",sMe=()=>"为新项目启用 GitHub 同步",iMe=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",Y7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sMe():t==="fa"?iMe():rMe()}),aMe=()=>"Environment",oMe=()=>"环境",lMe=()=>"محیط",Ax=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oMe():t==="fa"?lMe():aMe()}),cMe=()=>"Failed",uMe=()=>"失败",dMe=()=>"ناموفق",Tx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uMe():t==="fa"?dMe():cMe()}),fMe=()=>"General",hMe=()=>"常规",_Me=()=>"عمومی",pMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hMe():t==="fa"?_Me():fMe()}),mMe=()=>"GitHub publishing",gMe=()=>"GitHub 发布",bMe=()=>"انتشار در GitHub",vMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gMe():t==="fa"?bMe():mMe()}),xMe=()=>"Git token",yMe=()=>"Git 令牌",wMe=()=>"توکن Git",SMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yMe():t==="fa"?wMe():xMe()}),kMe=()=>"Harnesses",CMe=()=>"智能体工具",EMe=()=>"ابزارهای عامل",NMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CMe():t==="fa"?EMe():kMe()}),zMe=()=>"hf_…",jMe=()=>"hf_…",AMe=()=>"hf_…",TMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jMe():t==="fa"?AMe():zMe()}),MMe=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",RMe=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",DMe=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",LMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RMe():t==="fa"?DMe():MMe()}),OMe=()=>"Hostname",IMe=()=>"主机名",BMe=()=>"نام میزبان",$Me=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IMe():t==="fa"?BMe():OMe()}),HMe=()=>"How it connects",PMe=()=>"连接方式",FMe=()=>"نحوهٔ اتصال",UMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PMe():t==="fa"?FMe():HMe()}),qMe=()=>"Initialize Git",GMe=()=>"初始化 Git",VMe=()=>"راه‌اندازی Git",WMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GMe():t==="fa"?VMe():qMe()}),KMe=()=>"Install",YMe=()=>"安装",XMe=()=>"نصب",tN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YMe():t==="fa"?XMe():KMe()}),ZMe=()=>"Install broken",QMe=()=>"安装损坏",JMe=()=>"نصب خراب است",eRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QMe():t==="fa"?JMe():ZMe()}),tRe=()=>"Install GitHub CLI",nRe=()=>"安装 GitHub CLI",rRe=()=>"نصب GitHub CLI",sRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nRe():t==="fa"?rRe():tRe()}),iRe=()=>"Install updates automatically",aRe=()=>"自动安装更新",oRe=()=>"نصب خودکار به‌روزرسانی‌ها",X7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aRe():t==="fa"?oRe():iRe()}),lRe=()=>"Instance history",cRe=()=>"实例历史",uRe=()=>"تاریخچهٔ نمونه‌ها",dRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cRe():t==="fa"?uRe():lRe()}),fRe=()=>"Invalid token",hRe=()=>"令牌无效",_Re=()=>"توکن نامعتبر",pRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hRe():t==="fa"?_Re():fRe()}),mRe=()=>"Jobs",gRe=()=>"Jobs",bRe=()=>"Jobs",vRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gRe():t==="fa"?bRe():mRe()}),xRe=()=>"Jobs / Dashboard URL",yRe=()=>"Jobs / 控制台网址",wRe=()=>"نشانی Jobs / داشبورد",SRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yRe():t==="fa"?wRe():xRe()}),kRe=()=>"Jobs permission unknown",CRe=()=>"Jobs 权限未知",ERe=()=>"مجوز Jobs نامشخص است",NRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CRe():t==="fa"?ERe():kRe()}),zRe=()=>"Jobs: write OK",jRe=()=>"Jobs:写入正常",ARe=()=>"Jobs: نوشتن مجاز است",TRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jRe():t==="fa"?ARe():zRe()}),MRe=()=>"kubectl not found",RRe=()=>"未找到 kubectl",DRe=()=>"kubectl پیدا نشد",LRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RRe():t==="fa"?DRe():MRe()}),ORe=()=>"Latest",IRe=()=>"最新版本",BRe=()=>"جدیدترین",$Re=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IRe():t==="fa"?BRe():ORe()}),HRe=()=>"Loading…",PRe=()=>"正在加载…",FRe=()=>"در حال بارگیری…",Dl=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PRe():t==="fa"?FRe():HRe()}),URe=()=>"Loading Ray settings…",qRe=()=>"正在加载 Ray 设置…",GRe=()=>"در حال بارگیری تنظیمات Ray…",VRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qRe():t==="fa"?GRe():URe()}),WRe=()=>"Loading slurm settings…",KRe=()=>"正在加载 Slurm 设置…",YRe=()=>"در حال بارگیری تنظیمات Slurm…",XRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KRe():t==="fa"?YRe():WRe()}),ZRe=()=>"Loading status…",QRe=()=>"正在加载状态…",JRe=()=>"در حال بارگیری وضعیت…",eDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QRe():t==="fa"?JRe():ZRe()}),tDe=()=>"Local only",nDe=()=>"仅本地",rDe=()=>"فقط محلی",sDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nDe():t==="fa"?rDe():tDe()}),iDe=()=>"Local repository",aDe=()=>"本地仓库",oDe=()=>"مخزن محلی",lDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aDe():t==="fa"?oDe():iDe()}),cDe=()=>"Login node",uDe=()=>"登录节点",dDe=()=>"گرهٔ ورود",fDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uDe():t==="fa"?dDe():cDe()}),hDe=()=>"Make GitHub syncing the default?",_De=()=>"将 GitHub 同步设为默认值?",pDe=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",mDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_De():t==="fa"?pDe():hDe()}),gDe=()=>"Missing bash/tar",bDe=()=>"缺少 bash/tar",vDe=()=>"bash/tar موجود نیست",xDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bDe():t==="fa"?vDe():gDe()}),yDe=()=>"More compute options",wDe=()=>"更多算力选项",SDe=()=>"گزینه‌های رایانشی بیشتر",kDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wDe():t==="fa"?SDe():yDe()}),CDe=()=>"Move failed:",EDe=()=>"移动失败:",NDe=()=>"انتقال ناموفق بود:",zDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EDe():t==="fa"?NDe():CDe()}),jDe=()=>"Moved. orx is now using the new location.",ADe=()=>"已移动。orx 现在使用新位置。",TDe=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",MDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ADe():t==="fa"?TDe():jDe()}),RDe=()=>"Namespace",DDe=()=>"命名空间",LDe=()=>"فضای نام",ODe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DDe():t==="fa"?LDe():RDe()}),IDe=()=>"New location",BDe=()=>"新位置",$De=()=>"محل جدید",HDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BDe():t==="fa"?$De():IDe()}),PDe=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",FDe=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",UDe=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",qDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FDe():t==="fa"?UDe():PDe()}),GDe=()=>"New variable key",VDe=()=>"新变量键名",WDe=()=>"کلید متغیر جدید",KDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VDe():t==="fa"?WDe():GDe()}),YDe=()=>"New variable value",XDe=()=>"新变量值",ZDe=()=>"مقدار متغیر جدید",QDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XDe():t==="fa"?ZDe():YDe()}),JDe=()=>"No code, prompts, file contents, or account identifiers are sent.",eLe=()=>"不会发送代码、提示词、文件内容或账户标识符。",tLe=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",nLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eLe():t==="fa"?tLe():JDe()}),rLe=()=>"No hosts found in ~/.ssh/config.",sLe=()=>"在 ~/.ssh/config 中未找到主机。",iLe=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",aLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sLe():t==="fa"?iLe():rLe()}),oLe=()=>"No job-create permission",lLe=()=>"没有创建 Job 的权限",cLe=()=>"مجوز ساخت Job وجود ندارد",uLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lLe():t==="fa"?cLe():oLe()}),dLe=()=>"No job.write permission",fLe=()=>"没有 job.write 权限",hLe=()=>"مجوز job.write وجود ندارد",_Le=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fLe():t==="fa"?hLe():dLe()}),pLe=()=>"No key on this computer to register — load a registered key with",mLe=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",gLe=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",bLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mLe():t==="fa"?gLe():pLe()}),vLe=()=>"No key on this computer yet — create one with",xLe=()=>"此计算机上还没有密钥——使用以下命令创建:",yLe=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",wLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xLe():t==="fa"?yLe():vLe()}),SLe=()=>"No Slurm CLI",kLe=()=>"无 Slurm CLI",CLe=()=>"بدون CLI اسلورم",ELe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kLe():t==="fa"?CLe():SLe()}),NLe=()=>"No token",zLe=()=>"无令牌",jLe=()=>"بدون توکن",ALe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zLe():t==="fa"?jLe():NLe()}),TLe=()=>"None registered",MLe=()=>"未注册任何密钥",RLe=()=>"هیچ‌کدام ثبت نشده",DLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MLe():t==="fa"?RLe():TLe()}),LLe=()=>"Not checked",OLe=()=>"未检查",ILe=()=>"بررسی نشده",nN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OLe():t==="fa"?ILe():LLe()}),BLe=()=>"Not configured",$Le=()=>"未配置",HLe=()=>"پیکربندی نشده",Up=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Le():t==="fa"?HLe():BLe()}),PLe=()=>"Not installed",FLe=()=>"未安装",ULe=()=>"نصب نیست",qLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FLe():t==="fa"?ULe():PLe()}),GLe=()=>"Not now",VLe=()=>"暂不",WLe=()=>"اکنون نه",KLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VLe():t==="fa"?WLe():GLe()}),YLe=()=>"Not on this computer",XLe=()=>"不在此计算机上",ZLe=()=>"روی این رایانه نیست",QLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XLe():t==="fa"?ZLe():YLe()}),JLe=()=>"Not set (pass --host per launch)",eOe=()=>"未设置(每次启动时传入 --host)",tOe=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",nOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eOe():t==="fa"?tOe():JLe()}),rOe=()=>"Not set up",sOe=()=>"未设置",iOe=()=>"راه‌اندازی نشده",aOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sOe():t==="fa"?iOe():rOe()}),oOe=()=>"Not signed in",lOe=()=>"未登录",cOe=()=>"وارد نشده",uOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lOe():t==="fa"?cOe():oOe()}),dOe=()=>"On this computer",fOe=()=>"在此计算机上",hOe=()=>"روی این رایانه",_Oe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fOe():t==="fa"?hOe():dOe()}),pOe=()=>"Open a project to inspect its repository and GitHub publication state.",mOe=()=>"打开项目以查看其仓库和 GitHub 发布状态。",gOe=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",bOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mOe():t==="fa"?gOe():pOe()}),vOe=()=>"Open job page",xOe=()=>"打开作业页面",yOe=()=>"باز کردن صفحهٔ کار",Z7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xOe():t==="fa"?yOe():vOe()}),wOe=()=>"Open on GitHub",SOe=()=>"在 GitHub 上打开",kOe=()=>"باز کردن در GitHub",Q7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SOe():t==="fa"?kOe():wOe()}),COe=()=>", or create one with",EOe=()=>",或使用以下命令创建:",NOe=()=>"، یا با این فرمان یکی بسازید:",zOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EOe():t==="fa"?NOe():COe()}),jOe=()=>"Org",AOe=()=>"组织",TOe=()=>"سازمان",MOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AOe():t==="fa"?TOe():jOe()}),ROe=()=>"Orgs",DOe=()=>"组织",LOe=()=>"سازمان‌ها",OOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DOe():t==="fa"?LOe():ROe()}),IOe=()=>"orx can't update this install",BOe=()=>"orx 无法更新此安装",$Oe=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",HOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BOe():t==="fa"?$Oe():IOe()}),POe=()=>"Overleaf",FOe=()=>"Overleaf",UOe=()=>"Overleaf",qOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FOe():t==="fa"?UOe():POe()}),GOe=()=>"Overleaf Git authentication token",VOe=()=>"Overleaf Git 身份验证令牌",WOe=()=>"توکن احراز هویت Git در Overleaf",KOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VOe():t==="fa"?WOe():GOe()}),YOe=()=>"Overridden by env",XOe=()=>"已被环境变量覆盖",ZOe=()=>"بازنویسی‌شده توسط محیط",QOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XOe():t==="fa"?ZOe():YOe()}),JOe=()=>"Partition",eIe=()=>"分区",tIe=()=>"پارتیشن",nIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eIe():t==="fa"?tIe():JOe()}),rIe=()=>"Partitions",sIe=()=>"分区",iIe=()=>"پارتیشن‌ها",aIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sIe():t==="fa"?iIe():rIe()}),oIe=()=>"Path",lIe=()=>"路径",cIe=()=>"مسیر",uIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lIe():t==="fa"?cIe():oIe()}),dIe=()=>"Plan",fIe=()=>"方案",hIe=()=>"سطح اشتراک",_Ie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fIe():t==="fa"?hIe():dIe()}),pIe=()=>"Project",mIe=()=>"项目",gIe=()=>"پروژه",bIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mIe():t==="fa"?gIe():pIe()}),vIe=()=>"Ray version",xIe=()=>"Ray 版本",yIe=()=>"نسخهٔ Ray",wIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xIe():t==="fa"?yIe():vIe()}),SIe=()=>"Reachable",kIe=()=>"可访问",CIe=()=>"در دسترس",EIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kIe():t==="fa"?CIe():SIe()}),NIe=()=>"Reading ~/.ssh/config…",zIe=()=>"正在读取 ~/.ssh/config…",jIe=()=>"در حال خواندن ‎~/.ssh/config…",rN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zIe():t==="fa"?jIe():NIe()}),AIe=()=>"Ready",TIe=()=>"就绪",MIe=()=>"آماده",Mx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TIe():t==="fa"?MIe():AIe()}),RIe=()=>"Ready to move",DIe=()=>"可以移动",LIe=()=>"آمادهٔ انتقال",OIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DIe():t==="fa"?LIe():RIe()}),IIe=()=>"Ready to use",BIe=()=>"可用",$Ie=()=>"آمادهٔ استفاده",HIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BIe():t==="fa"?$Ie():IIe()}),PIe=()=>"Refresh",FIe=()=>"刷新",UIe=()=>"تازه‌سازی",qp=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FIe():t==="fa"?UIe():PIe()}),qIe=()=>"Remotes",GIe=()=>"远程仓库",VIe=()=>"مخزن‌های دوردست",WIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GIe():t==="fa"?VIe():qIe()}),KIe=()=>"Repository",YIe=()=>"仓库",XIe=()=>"مخزن",ZIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YIe():t==="fa"?XIe():KIe()}),QIe=()=>"Restart to finish updating",JIe=()=>"重新启动以完成更新",eBe=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",tBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JIe():t==="fa"?eBe():QIe()}),nBe=()=>"Run manifest",rBe=()=>"运行清单",sBe=()=>"مانیفست اجرا",iBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rBe():t==="fa"?sBe():nBe()}),aBe=()=>"Running instances",oBe=()=>"正在运行的实例",lBe=()=>"نمونه‌های در حال اجرا",cBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oBe():t==="fa"?lBe():aBe()}),uBe=()=>"Runtime",dBe=()=>"运行时间",fBe=()=>"زمان اجرا",hBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dBe():t==="fa"?fBe():uBe()}),_Be=()=>". Save it under that key if it's meant for HF Jobs.",pBe=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",mBe=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",gBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pBe():t==="fa"?mBe():_Be()}),bBe=()=>"Settings",vBe=()=>"设置",xBe=()=>"تنظیمات",sN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vBe():t==="fa"?xBe():bBe()}),yBe=()=>"Signed in",wBe=()=>"已登录",SBe=()=>"وارد شده",iN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wBe():t==="fa"?SBe():yBe()}),kBe=()=>"Source",CBe=()=>"来源",EBe=()=>"منبع",Rx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CBe():t==="fa"?EBe():kBe()}),NBe=()=>"SSH key",zBe=()=>"SSH 密钥",jBe=()=>"کلید SSH",ABe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zBe():t==="fa"?jBe():NBe()}),TBe=()=>"Started",MBe=()=>"开始时间",RBe=()=>"آغاز",DBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MBe():t==="fa"?RBe():TBe()}),LBe=()=>"State",OBe=()=>"状态",IBe=()=>"وضعیت",BBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OBe():t==="fa"?IBe():LBe()}),$Be=()=>"Status",HBe=()=>"状态",PBe=()=>"وضعیت",Gp=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HBe():t==="fa"?PBe():$Be()}),FBe=()=>"Storage",UBe=()=>"存储",qBe=()=>"ذخیره‌سازی",GBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UBe():t==="fa"?qBe():FBe()}),VBe=()=>"Sync",WBe=()=>"同步",KBe=()=>"همگام‌سازی",YBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WBe():t==="fa"?KBe():VBe()}),XBe=()=>"Syncing off",ZBe=()=>"同步已关闭",QBe=()=>"همگام‌سازی خاموش",JBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZBe():t==="fa"?QBe():XBe()}),e$e=()=>"System",t$e=()=>"系统",n$e=()=>"سامانه",r$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t$e():t==="fa"?n$e():e$e()}),s$e=()=>"Test connection",i$e=()=>"测试连接",a$e=()=>"آزمایش اتصال",o$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i$e():t==="fa"?a$e():s$e()}),l$e=()=>"Testing…",c$e=()=>"正在测试…",u$e=()=>"در حال آزمایش…",d$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c$e():t==="fa"?u$e():l$e()}),f$e=()=>", then add it with",h$e=()=>",然后使用以下命令添加:",_$e=()=>"، سپس با این فرمان اضافه‌اش کنید:",p$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h$e():t==="fa"?_$e():f$e()}),m$e=()=>"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.",g$e=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",b$e=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",v$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g$e():t==="fa"?b$e():m$e()}),x$e=()=>"This saved destination is not configured. Set it up below or choose another backend.",y$e=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",w$e=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",S$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y$e():t==="fa"?w$e():x$e()}),k$e=()=>"This value looks like a Hugging Face token — compute runs only read it from",C$e=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",E$e=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",N$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C$e():t==="fa"?E$e():k$e()}),z$e=()=>"Time limit",j$e=()=>"时间限制",A$e=()=>"محدودیت زمانی",T$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j$e():t==="fa"?A$e():z$e()}),M$e=()=>"Token",R$e=()=>"令牌",D$e=()=>"توکن",aN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R$e():t==="fa"?D$e():M$e()}),L$e=()=>"Unable to verify",O$e=()=>"无法验证",I$e=()=>"تأیید ممکن نیست",B$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O$e():t==="fa"?I$e():L$e()}),$$e=()=>"Unknown",H$e=()=>"未知",P$e=()=>"نامشخص",oN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H$e():t==="fa"?P$e():$$e()}),F$e=()=>"Update required",U$e=()=>"需要更新",q$e=()=>"نیازمند به‌روزرسانی",G$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U$e():t==="fa"?q$e():F$e()}),V$e=()=>"Updates",W$e=()=>"更新",K$e=()=>"به‌روزرسانی‌ها",J7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W$e():t==="fa"?K$e():V$e()}),Y$e=()=>"Usage analytics",X$e=()=>"使用情况分析",Z$e=()=>"تحلیل استفاده",Q$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X$e():t==="fa"?Z$e():Y$e()}),J$e=()=>"value",eHe=()=>"值",tHe=()=>"مقدار",lN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eHe():t==="fa"?tHe():J$e()}),nHe=()=>"Variables available to runs and the research agent (API keys, tokens).",rHe=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",sHe=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",iHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rHe():t==="fa"?sHe():nHe()}),aHe=()=>"Version",oHe=()=>"版本",lHe=()=>"نسخه",cN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oHe():t==="fa"?lHe():aHe()}),cHe=()=>"What happens",uHe=()=>"执行内容",dHe=()=>"چه اتفاقی می‌افتد",fHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uHe():t==="fa"?dHe():cHe()}),hHe=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",_He=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",pHe=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",mHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_He():t==="fa"?pHe():hHe()}),gHe=()=>"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.",bHe=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",vHe=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",xHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bHe():t==="fa"?vHe():gHe()}),yHe=()=>"Pick a login node first",wHe=()=>"请先选择登录节点",SHe=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",kHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wHe():t==="fa"?SHe():yHe()}),CHe=()=>"Providers",EHe=()=>"提供商",NHe=()=>"ارائه‌دهندگان",zHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EHe():t==="fa"?NHe():CHe()}),jHe=()=>"Reconnect",AHe=()=>"重新连接",THe=()=>"اتصال دوباره",uN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AHe():t==="fa"?THe():jHe()}),MHe=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,RHe=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,DHe=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,LHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?RHe(e):t==="fa"?DHe(e):MHe(e)}),OHe=()=>"Reinstall with the orx installer to get automatic updates.",IHe=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",BHe=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",$He=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IHe():t==="fa"?BHe():OHe()}),HHe=()=>"Re-link",PHe=()=>"重新链接",FHe=()=>"پیوند دوباره",UHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PHe():t==="fa"?FHe():HHe()}),qHe=()=>"Remove token",GHe=()=>"移除令牌",VHe=()=>"حذف توکن",WHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GHe():t==="fa"?VHe():qHe()}),KHe=()=>"Removing…",YHe=()=>"正在移除…",XHe=()=>"در حال حذف…",ZHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YHe():t==="fa"?XHe():KHe()}),QHe=()=>"Replace anyway",JHe=()=>"仍要替换",ePe=()=>"به‌هرحال جایگزین کن",tPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JHe():t==="fa"?ePe():QHe()}),nPe=()=>"Replace token",rPe=()=>"替换令牌",sPe=()=>"جایگزینی توکن",iPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rPe():t==="fa"?sPe():nPe()}),aPe=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,oPe=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,lPe=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,cPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oPe(e):t==="fa"?lPe(e):aPe(e)}),uPe=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,dPe=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,fPe=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,hPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dPe(e):t==="fa"?fPe(e):uPe(e)}),_Pe=()=>"Run `gh auth login` in your terminal.",pPe=()=>"请在终端中运行 `gh auth login`。",mPe=()=>"در پایانه `gh auth login` را اجرا کنید.",gPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pPe():t==="fa"?mPe():_Pe()}),bPe=()=>"Saved",vPe=()=>"已保存",xPe=()=>"ذخیره شده",yPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vPe():t==="fa"?xPe():bPe()}),wPe=()=>"Set up",SPe=()=>"设置",kPe=()=>"راه‌اندازی",CPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SPe():t==="fa"?kPe():wPe()}),EPe=()=>"Set up environment",NPe=()=>"设置环境",zPe=()=>"راه‌اندازی محیط",jPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NPe():t==="fa"?zPe():EPe()}),APe=()=>"Setting up… (~30–60s)",TPe=()=>"正在设置…(约 30–60 秒)",MPe=()=>"در حال راه‌اندازی… (حدود ۳۰ تا ۶۰ ثانیه)",RPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TPe():t==="fa"?MPe():APe()}),DPe=()=>"Sign in",LPe=()=>"登录",OPe=()=>"ورود",IPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LPe():t==="fa"?OPe():DPe()}),BPe=()=>"The SSH connection closed before setup completed.",$Pe=()=>"SSH 连接在设置完成前已关闭。",HPe=()=>"اتصال SSH پیش از تکمیل راه‌اندازی بسته شد.",eS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Pe():t==="fa"?HPe():BPe()}),PPe=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,FPe=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,UPe=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,dN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FPe(e):t==="fa"?UPe(e):PPe(e)}),qPe=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",GPe=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",VPe=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",WPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GPe():t==="fa"?VPe():qPe()}),KPe=()=>"Dark",YPe=()=>"深色",XPe=()=>"تیره",ZPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YPe():t==="fa"?XPe():KPe()}),QPe=()=>"Theme",JPe=()=>"主题",eFe=()=>"پوسته",tS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JPe():t==="fa"?eFe():QPe()}),tFe=()=>"Light",nFe=()=>"浅色",rFe=()=>"روشن",sFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nFe():t==="fa"?rFe():tFe()}),iFe=()=>"System",aFe=()=>"系统",oFe=()=>"سیستم",lFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aFe():t==="fa"?oFe():iFe()}),cFe=()=>"Update now",uFe=()=>"立即更新",dFe=()=>"اکنون به‌روزرسانی کن",fFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uFe():t==="fa"?dFe():cFe()}),hFe=e=>`Update to ${e==null?void 0:e.version}`,_Fe=e=>`更新到 ${e==null?void 0:e.version}`,pFe=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,mFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_Fe(e):t==="fa"?pFe(e):hFe(e)}),gFe=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",bFe=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",vFe=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",xFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bFe():t==="fa"?vFe():gFe()}),yFe=()=>"Updating default destination…",wFe=()=>"正在更新默认运行位置…",SFe=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",kFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wFe():t==="fa"?SFe():yFe()}),CFe=()=>"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.",EFe=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",NFe=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",zFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EFe():t==="fa"?NFe():CFe()}),jFe=()=>"Validating…",AFe=()=>"正在验证…",TFe=()=>"در حال اعتبارسنجی…",MFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AFe():t==="fa"?TFe():jFe()}),RFe=()=>"View settings",DFe=()=>"查看设置",LFe=()=>"مشاهدهٔ تنظیمات",OFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DFe():t==="fa"?LFe():RFe()}),IFe=()=>"Skill",BFe=()=>"技能",$Fe=()=>"مهارت",fN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BFe():t==="fa"?$Fe():IFe()}),HFe=()=>"Loading skill…",PFe=()=>"正在加载技能…",FFe=()=>"در حال بارگیری مهارت…",UFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PFe():t==="fa"?FFe():HFe()}),qFe=e=>`Delete the “${e==null?void 0:e.name}” skill?`,GFe=e=>`删除技能“${e==null?void 0:e.name}”?`,VFe=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,WFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GFe(e):t==="fa"?VFe(e):qFe(e)}),KFe=e=>`Delete skill ${e==null?void 0:e.name}`,YFe=e=>`删除技能 ${e==null?void 0:e.name}`,XFe=e=>`حذف مهارت ${e==null?void 0:e.name}`,ZFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YFe(e):t==="fa"?XFe(e):KFe(e)}),QFe=e=>`Delete the “${e==null?void 0:e.name}” template?`,JFe=e=>`删除模板“${e==null?void 0:e.name}”?`,eUe=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,tUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JFe(e):t==="fa"?eUe(e):QFe(e)}),nUe=e=>`Delete template ${e==null?void 0:e.name}`,rUe=e=>`删除模板 ${e==null?void 0:e.name}`,sUe=e=>`حذف قالب ${e==null?void 0:e.name}`,iUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rUe(e):t==="fa"?sUe(e):nUe(e)}),aUe=()=>"SKILL.md folders the agent discovers on its own and you invoke with /name in chat. Skills installed in your coding agents are picked up automatically.",oUe=()=>"智能体会自动发现的 SKILL.md 技能文件夹,你可以在聊天中通过 /name 调用。你的编码智能体中已安装的技能会自动纳入。",lUe=()=>"پوشه‌های SKILL.md که عامل خودش پیدا می‌کند و شما با ‎/name در گفتگو فراخوانی می‌کنید. مهارت‌های نصب‌شده در عامل‌های کدنویسی شما به‌طور خودکار در نظر گرفته می‌شوند.",cUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oUe():t==="fa"?lUe():aUe()}),uUe=()=>"Drop a SKILL.md or .zip here, or click to choose",dUe=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",fUe=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",hUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dUe():t==="fa"?fUe():uUe()}),_Ue=()=>"Drop a .tex or .zip here, or click to choose",pUe=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",mUe=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",gUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pUe():t==="fa"?mUe():_Ue()}),bUe=()=>"File too large (max 20 MB).",vUe=()=>"文件过大(最大 20 MB)。",xUe=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",hN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vUe():t==="fa"?xUe():bUe()}),yUe=()=>" + 1 file",wUe=()=>" + 1 个文件",SUe=()=>" + ۱ فایل",kUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wUe():t==="fa"?SUe():yUe()}),CUe=()=>"What the agent brings to every session, in every project: the skills it can use, and the LaTeX templates it writes papers into.",EUe=()=>"智能体在每个项目的每个会话中都会携带的内容:可用的技能,以及撰写论文所用的 LaTeX 模板。",NUe=()=>"آنچه عامل در هر نشست و در همهٔ پروژه‌ها همراه دارد: مهارت‌هایی که می‌تواند استفاده کند و قالب‌های LaTeX که مقاله‌ها را با آن‌ها می‌نویسد.",zUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EUe():t==="fa"?NUe():CUe()}),jUe=e=>` + ${e==null?void 0:e.count} files`,AUe=e=>` + ${e==null?void 0:e.count} 个文件`,TUe=e=>` + ${e==null?void 0:e.count} فایل`,MUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?AUe(e):t==="fa"?TUe(e):jUe(e)}),RUe=()=>"Could not load skills:",DUe=()=>"无法加载技能:",LUe=()=>"بارگیری مهارت‌ها ممکن نشد:",OUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DUe():t==="fa"?LUe():RUe()}),IUe=()=>"Could not load templates:",BUe=()=>"无法加载模板:",$Ue=()=>"بارگیری قالب‌ها ممکن نشد:",HUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BUe():t==="fa"?$Ue():IUe()}),PUe=()=>"Customize",FUe=()=>"自定义",UUe=()=>"سفارشی‌سازی",qUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FUe():t==="fa"?UUe():PUe()}),GUe=()=>"Delete skill",VUe=()=>"删除技能",WUe=()=>"حذف مهارت",KUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VUe():t==="fa"?WUe():GUe()}),YUe=()=>"Delete template",XUe=()=>"删除模板",ZUe=()=>"حذف قالب",QUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XUe():t==="fa"?ZUe():YUe()}),JUe=()=>"LaTeX templates",eqe=()=>"LaTeX 模板",tqe=()=>"قالب‌های LaTeX",nqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eqe():t==="fa"?tqe():JUe()}),rqe=()=>"Loading skills…",sqe=()=>"正在加载技能…",iqe=()=>"در حال بارگیری مهارت‌ها…",aqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sqe():t==="fa"?iqe():rqe()}),oqe=()=>"Loading templates…",lqe=()=>"正在加载模板…",cqe=()=>"در حال بارگیری قالب‌ها…",uqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lqe():t==="fa"?cqe():oqe()}),dqe=()=>"No skills yet.",fqe=()=>"尚无技能。",hqe=()=>"هنوز مهارتی وجود ندارد.",_qe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fqe():t==="fa"?hqe():dqe()}),pqe=()=>"No templates yet.",mqe=()=>"尚无模板。",gqe=()=>"هنوز قالبی وجود ندارد.",bqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mqe():t==="fa"?gqe():pqe()}),vqe=()=>"Skills",xqe=()=>"技能",yqe=()=>"مهارت‌ها",wqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xqe():t==="fa"?yqe():vqe()}),Sqe=()=>"Uploading…",kqe=()=>"正在上传…",Cqe=()=>"در حال بارگذاری…",Eqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kqe():t==="fa"?Cqe():Sqe()}),Nqe=()=>"A conference class or house style the agent writes papers into instead of its default preamble. Upload a .tex file or a .zip containing its .cls and .sty files. With exactly one template available, the agent uses it without asking.",zqe=()=>"智能体会使用会议文档类或内部样式来撰写论文,而不是使用默认导言。请上传 .tex 文件,或包含 .cls 和 .sty 文件的 .zip 压缩包。当恰好只有一个模板可用时,智能体会直接使用,无需询问。",jqe=()=>"عامل به‌جای مقدمهٔ پیش‌فرض، مقاله‌ها را با کلاس همایش یا سبک سازمانی می‌نویسد. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید. وقتی دقیقاً یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",Aqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zqe():t==="fa"?jqe():Nqe()}),Tqe=()=>"Upload a SKILL.md file or a .zip of a skill folder.",Mqe=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",Rqe=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",Dqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mqe():t==="fa"?Rqe():Tqe()}),Lqe=()=>"Upload a .tex file or a .zip of a template folder.",Oqe=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",Iqe=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",Bqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oqe():t==="fa"?Iqe():Lqe()}),$qe=()=>"Close SSH config",Hqe=()=>"关闭 SSH 配置",Pqe=()=>"بستن پیکربندی SSH",Fqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hqe():t==="fa"?Pqe():$qe()}),Uqe=()=>"Discard your unsaved SSH config changes?",qqe=()=>"要放弃未保存的 SSH 配置更改吗?",Gqe=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",Vqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qqe():t==="fa"?Gqe():Uqe()}),Wqe=()=>"Loading SSH config…",Kqe=()=>"正在加载 SSH 配置…",Yqe=()=>"در حال بارگیری پیکربندی SSH…",Xqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kqe():t==="fa"?Yqe():Wqe()}),Zqe=()=>"SSH config saved",Qqe=()=>"SSH 配置已保存",Jqe=()=>"پیکربندی SSH ذخیره شد",eGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qqe():t==="fa"?Jqe():Zqe()}),tGe=()=>"SSH config",nGe=()=>"SSH 配置",rGe=()=>"پیکربندی SSH",sGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nGe():t==="fa"?rGe():tGe()}),iGe=()=>"Configure SSH hosts…",aGe=()=>"配置 SSH 主机…",oGe=()=>"پیکربندی میزبان‌های SSH…",_N=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aGe():t==="fa"?oGe():iGe()}),lGe=()=>"Cancelled",cGe=()=>"已取消",uGe=()=>"لغوشده",dGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cGe():t==="fa"?uGe():lGe()}),fGe=()=>"Cancelling",hGe=()=>"正在取消",_Ge=()=>"در حال لغو",pGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hGe():t==="fa"?_Ge():fGe()}),mGe=()=>"Done",gGe=()=>"已完成",bGe=()=>"انجام‌شده",vGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gGe():t==="fa"?bGe():mGe()}),xGe=()=>"Editing",yGe=()=>"正在编辑",wGe=()=>"در حال ویرایش",SGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yGe():t==="fa"?wGe():xGe()}),kGe=()=>"Failed",CGe=()=>"失败",EGe=()=>"ناموفق",NGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CGe():t==="fa"?EGe():kGe()}),zGe=()=>"Idle",jGe=()=>"空闲",AGe=()=>"بی‌کار",TGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jGe():t==="fa"?AGe():zGe()}),MGe=()=>"Running",RGe=()=>"运行中",DGe=()=>"در حال اجرا",LGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RGe():t==="fa"?DGe():MGe()}),OGe=()=>"Starting",IGe=()=>"正在启动",BGe=()=>"در حال آغاز",$Ge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IGe():t==="fa"?BGe():OGe()}),HGe=()=>"Copying…",PGe=()=>"正在复制…",FGe=()=>"در حال کپی…",UGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PGe():t==="fa"?FGe():HGe()}),qGe=()=>"Finalizing…",GGe=()=>"正在完成…",VGe=()=>"در حال نهایی‌سازی…",WGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GGe():t==="fa"?VGe():qGe()}),KGe=e=>`${e==null?void 0:e.size} free at target`,YGe=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,XGe=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,ZGe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YGe(e):t==="fa"?XGe(e):KGe(e)}),QGe=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.`,JGe=e=>`将所有 orx 数据移动到: -${e==null?void 0:e.path} - -存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,eVe=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ -${e==null?void 0:e.path} - -مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,tVe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JGe(e):t==="fa"?eVe(e):QGe(e)}),nVe=()=>"Move data here",rVe=()=>"将数据移动到此处",sVe=()=>"انتقال داده به اینجا",iVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rVe():t==="fa"?sVe():nVe()}),aVe=()=>"Moving…",oVe=()=>"正在移动…",lVe=()=>"در حال جابه‌جایی…",cVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oVe():t==="fa"?lVe():aVe()}),uVe=()=>"Preparing…",dVe=()=>"正在准备…",fVe=()=>"در حال آماده‌سازی…",hVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dVe():t==="fa"?fVe():uVe()}),_Ve=()=>" (same disk, instant)",pVe=()=>"(同一磁盘,可立即完成)",mVe=()=>" (روی همان دیسک، فوری)",gVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pVe():t==="fa"?mVe():_Ve()}),bVe=()=>"default location",vVe=()=>"默认位置",xVe=()=>"محل پیش‌فرض",yVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vVe():t==="fa"?xVe():bVe()}),wVe=()=>"ORX_DATA_DIR environment variable",SVe=()=>"ORX_DATA_DIR 环境变量",kVe=()=>"متغیر محیطی ORX_DATA_DIR",CVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SVe():t==="fa"?kVe():wVe()}),EVe=()=>"your saved setting",NVe=()=>"已保存的设置",zVe=()=>"تنظیم ذخیره‌شدهٔ شما",jVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NVe():t==="fa"?zVe():EVe()}),AVe=()=>"XDG_DATA_HOME",TVe=()=>"XDG_DATA_HOME",MVe=()=>"XDG_DATA_HOME",RVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TVe():t==="fa"?MVe():AVe()}),DVe=()=>"Verifying…",LVe=()=>"正在验证…",OVe=()=>"در حال بررسی…",IVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LVe():t==="fa"?OVe():DVe()}),BVe=()=>"Loading…",$Ve=()=>"正在加载…",HVe=()=>"در حال بارگیری…",PVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ve():t==="fa"?HVe():BVe()}),FVe=()=>"This sub-agent is no longer available.",UVe=()=>"此子智能体已不可用。",qVe=()=>"این عامل فرعی دیگر در دسترس نیست.",GVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UVe():t==="fa"?qVe():FVe()}),VVe=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,WVe=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,KVe=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,YVe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WVe(e):t==="fa"?KVe(e):VVe(e)}),XVe=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,ZVe=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,QVe=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,JVe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZVe(e):t==="fa"?QVe(e):XVe(e)}),eWe=()=>", a repo for training a mini-GPT from scratch.",tWe=()=>",一个从零训练迷你 GPT 的仓库。",nWe=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",rWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tWe():t==="fa"?nWe():eWe()}),sWe=()=>"Close",iWe=()=>"关闭",aWe=()=>"بستن",oWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iWe():t==="fa"?aWe():sWe()}),lWe=()=>"Create a new project",cWe=()=>"新建项目",uWe=()=>"ایجاد پروژهٔ جدید",dWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cWe():t==="fa"?uWe():lWe()}),fWe=()=>"Demo project",hWe=()=>"演示项目",_We=()=>"پروژهٔ نمایشی",pWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hWe():t==="fa"?_We():fWe()}),mWe=()=>"Explore the demo",gWe=()=>"探索演示项目",bWe=()=>"دیدن پروژهٔ نمایشی",vWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gWe():t==="fa"?bWe():mWe()}),xWe=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",yWe=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",wWe=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",SWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yWe():t==="fa"?wWe():xWe()}),kWe=()=>"nanochat",CWe=()=>"nanochat",EWe=()=>"nanochat",NWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CWe():t==="fa"?EWe():kWe()}),zWe=()=>"Couldn’t save your progress. Try again.",jWe=()=>"无法保存进度。请重试。",AWe=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",TWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jWe():t==="fa"?AWe():zWe()}),MWe=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",RWe=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",DWe=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",LWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RWe():t==="fa"?DWe():MWe()}),OWe=()=>"Welcome to OpenResearch",IWe=()=>"欢迎使用 OpenResearch",BWe=()=>"به OpenResearch خوش آمدید",$We=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IWe():t==="fa"?BWe():OWe()}),HWe=()=>"Baseline",PWe=()=>"基线",FWe=()=>"مبنا",UWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PWe():t==="fa"?FWe():HWe()}),qWe=()=>"Experiment",GWe=()=>"实验",VWe=()=>"آزمایش",vo=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GWe():t==="fa"?VWe():qWe()}),WWe=e=>`${e==null?void 0:e.count} experiments`,KWe=e=>`${e==null?void 0:e.count} 个实验`,YWe=e=>`${e==null?void 0:e.count} آزمایش`,XWe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KWe(e):t==="fa"?YWe(e):WWe(e)}),ZWe=()=>"1 experiment",QWe=()=>"1 个实验",JWe=()=>"۱ آزمایش",eKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QWe():t==="fa"?JWe():ZWe()}),tKe=()=>"Running",nKe=()=>"运行中",rKe=()=>"در حال اجرا",sKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nKe():t==="fa"?rKe():tKe()}),iKe=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",aKe=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",oKe=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",lKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aKe():t==="fa"?oKe():iKe()}),cKe=()=>"Ask the agent in chat to create and run your first experiment.",uKe=()=>"在聊天中让智能体创建并运行你的第一个实验。",dKe=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",fKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uKe():t==="fa"?dKe():cKe()}),hKe=()=>"Code",_Ke=()=>"代码",pKe=()=>"کد",mKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ke():t==="fa"?pKe():hKe()}),gKe=()=>"Logs",bKe=()=>"日志",vKe=()=>"گزارش‌ها",pN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bKe():t==="fa"?vKe():gKe()}),xKe=()=>"No experiments from the current task yet",yKe=()=>"当前任务尚无实验",wKe=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",SKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yKe():t==="fa"?wKe():xKe()}),kKe=()=>"No experiments yet",CKe=()=>"尚无实验",EKe=()=>"هنوز آزمایشی وجود ندارد",NKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CKe():t==="fa"?EKe():kKe()}),zKe=()=>"no runs",jKe=()=>"无运行",AKe=()=>"بدون اجرا",TKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jKe():t==="fa"?AKe():zKe()}),MKe=()=>"Open logs",RKe=()=>"打开日志",DKe=()=>"باز کردن گزارش‌ها",LKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RKe():t==="fa"?DKe():MKe()}),OKe=()=>"other tasks",IKe=()=>"其他任务",BKe=()=>"وظایف دیگر",$Ke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IKe():t==="fa"?BKe():OKe()}),HKe=()=>"Runs",PKe=()=>"运行",FKe=()=>"اجراها",UKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PKe():t==="fa"?FKe():HKe()}),qKe=()=>"Switch to Entire project to see all experiments",GKe=()=>"切换到“整个项目”以查看所有实验",VKe=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",WKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GKe():t==="fa"?VKe():qKe()}),KKe=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,YKe=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,XKe=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,ZKe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YKe(e):t==="fa"?XKe(e):KKe(e)}),QKe=()=>"Dismiss",JKe=()=>"关闭",eYe=()=>"بستن",tYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JKe():t==="fa"?eYe():QKe()}),nYe=()=>"macOS app",rYe=()=>"macOS 应用",sYe=()=>"برنامهٔ macOS",iYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rYe():t==="fa"?sYe():nYe()}),aYe=()=>"Installed with cargo",oYe=()=>"通过 cargo 安装",lYe=()=>"نصب‌شده با cargo",cYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oYe():t==="fa"?lYe():aYe()}),uYe=()=>"Installed with Homebrew",dYe=()=>"通过 Homebrew 安装",fYe=()=>"نصب‌شده با Homebrew",hYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dYe():t==="fa"?fYe():uYe()}),_Ye=()=>"Installed with the orx installer",pYe=()=>"通过 orx 安装程序安装",mYe=()=>"نصب‌شده با نصب‌کنندهٔ orx",gYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pYe():t==="fa"?mYe():_Ye()}),bYe=()=>"Managed by Nix",vYe=()=>"由 Nix 管理",xYe=()=>"مدیریت‌شده با Nix",yYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vYe():t==="fa"?xYe():bYe()}),wYe=()=>"Unknown install",SYe=()=>"未知安装方式",kYe=()=>"روش نصب نامشخص",CYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SYe():t==="fa"?kYe():wYe()}),EYe=()=>"Re-run your cargo install to update.",NYe=()=>"重新运行 cargo 安装命令以更新。",zYe=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",jYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NYe():t==="fa"?zYe():EYe()}),AYe=()=>"Run brew upgrade to update.",TYe=()=>"运行 brew upgrade 以更新。",MYe=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",RYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TYe():t==="fa"?MYe():AYe()}),DYe=()=>"Update it through your Nix configuration.",LYe=()=>"通过 Nix 配置进行更新。",OYe=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",IYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LYe():t==="fa"?OYe():DYe()}),BYe=e=>`Current worktree · ${e==null?void 0:e.branch}`,$Ye=e=>`当前工作树 · ${e==null?void 0:e.branch}`,HYe=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,PYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ye(e):t==="fa"?HYe(e):BYe(e)}),FYe=e=>`Default branch · ${e==null?void 0:e.branch}`,UYe=e=>`默认分支 · ${e==null?void 0:e.branch}`,qYe=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,GYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UYe(e):t==="fa"?qYe(e):FYe(e)}),VYe=e=>`detached at ${e==null?void 0:e.branch}`,WYe=e=>`分离于 ${e==null?void 0:e.branch}`,KYe=e=>`جدا در ${e==null?void 0:e.branch}`,YYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WYe(e):t==="fa"?KYe(e):VYe(e)}),XYe=()=>"Listing truncated.",ZYe=()=>"列表已截断。",QYe=()=>"فهرست کوتاه شده است.",JYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZYe():t==="fa"?QYe():XYe()}),eXe=()=>"Loading…",tXe=()=>"正在加载…",nXe=()=>"در حال بارگیری…",rXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tXe():t==="fa"?nXe():eXe()}),sXe=()=>"No changes yet.",iXe=()=>"尚无更改。",aXe=()=>"هنوز تغییری وجود ندارد.",oXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iXe():t==="fa"?aXe():sXe()}),lXe=()=>"No files.",cXe=()=>"没有文件。",uXe=()=>"فایلی وجود ندارد.",dXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cXe():t==="fa"?uXe():lXe()}),fXe=()=>"Refresh failed:",hXe=()=>"刷新失败:",_Xe=()=>"تازه‌سازی ناموفق بود:",pXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hXe():t==="fa"?_Xe():fXe()}),Iv=new Set;function mN(e){if(e!==E()){hE(e,{reload:!1}),document.documentElement.lang=e;for(const n of Iv)n()}}function mXe(e){return Iv.add(e),()=>Iv.delete(e)}function Oc(){return M.useSyncExternalStore(mXe,E,E)}const we=e=>`⁦${e}⁩`,Ra=e=>`⁨${e}⁩`,Vt=e=>new Intl.NumberFormat(E()).format(e);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gN=(...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 gXe=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 bXe=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 nS=e=>{const n=bXe(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 ob={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 vXe=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},xXe=M.createContext({}),yXe=()=>M.useContext(xXe),wXe=M.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:a,iconNode:l,...o},c)=>{const{size:d=24,strokeWidth:_=2,absoluteStrokeWidth:h=!1,color:m="currentColor",className:g=""}=yXe()??{},S=r??h?Number(t??_)*24/Number(n??d):t??_;return M.createElement("svg",{ref:c,...ob,width:n??d??ob.width,height:n??d??ob.height,stroke:e??m,strokeWidth:S,className:gN("lucide",g,s),...!a&&!vXe(o)&&{"aria-hidden":"true"},...o},[...l.map(([k,v])=>M.createElement(k,v)),...Array.isArray(a)?a:[a]])});/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rt=(e,n)=>{const t=M.forwardRef(({className:r,...s},a)=>M.createElement(wXe,{ref:a,iconNode:n,className:gN(`lucide-${gXe(nS(e))}`,`lucide-${e}`,r),...s}));return t.displayName=nS(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 SXe=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],kXe=rt("arrow-down",SXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const CXe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],qf=rt("arrow-left",CXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const EXe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],$0=rt("arrow-right",EXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const NXe=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],zXe=rt("arrow-up-right",NXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jXe=[["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"}]],bN=rt("blocks",jXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const AXe=[["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"}]],vN=rt("book-open",AXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const TXe=[["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"}]],MXe=rt("calendar-days",TXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const RXe=[["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"}]],DXe=rt("chart-spline",RXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const LXe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_i=rt("check",LXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const OXe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$a=rt("chevron-down",OXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const IXe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],xN=rt("chevron-left",IXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const BXe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ha=rt("chevron-right",BXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $Xe=[["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"}]],yN=rt("circle-alert",$Xe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const HXe=[["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"}]],PXe=rt("circle-question-mark",HXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const FXe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],wN=rt("circle-stop",FXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const UXe=[["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"}]],SN=rt("circle-x",UXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qXe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],GXe=rt("clock-3",qXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const VXe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],WXe=rt("clock",VXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const KXe=[["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"}]],YXe=rt("cloud-upload",KXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const XXe=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Bv=rt("code",XXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ZXe=[["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"}]],Vp=rt("copy",ZXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const QXe=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],kN=rt("corner-down-left",QXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const JXe=[["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"}]],eZe=rt("cpu",JXe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tZe=[["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"}]],nZe=rt("download",tZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rZe=[["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"}]],Dx=rt("ellipsis",rZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sZe=[["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"}]],jc=rt("external-link",sZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iZe=[["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"}]],CN=rt("file-code",iZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aZe=[["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"}]],oZe=rt("file-output",aZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lZe=[["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"}]],Xu=rt("file-text",lZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cZe=[["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"}]],Lx=rt("flask-conical",cZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uZe=[["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"}]],EN=rt("folder-git-2",uZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dZe=[["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"}]],Gf=rt("folder-open",dZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fZe=[["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"}]],hZe=rt("folder-plus",fZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _Ze=[["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"}]],Wp=rt("folder-tree",_Ze);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pZe=[["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"}]],mZe=rt("funnel",pZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gZe=[["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"}]],Kp=rt("git-branch",gZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bZe=[["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"}]],vZe=rt("git-commit-horizontal",bZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xZe=[["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"}]],yZe=rt("globe",xZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wZe=[["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"}]],SZe=rt("history",wZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kZe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],NN=rt("info",kZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const CZe=[["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"}]],EZe=rt("laptop",CZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const NZe=[["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"}]],zZe=rt("lightbulb",NZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jZe=[["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"}]],rS=rt("lock",jZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const AZe=[["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"}]],TZe=rt("maximize-2",AZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const MZe=[["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"}]],zN=rt("message-square-quote",MZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const RZe=[["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"}]],DZe=rt("minimize-2",RZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const LZe=[["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"}]],OZe=rt("monitor",LZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const IZe=[["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"}]],BZe=rt("moon",IZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $Ze=[["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"}]],HZe=rt("mouse-pointer-click",$Ze);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const PZe=[["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"}]],Ox=rt("package",PZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const FZe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],jN=rt("panel-left",FZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const UZe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],AN=rt("panel-right",UZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qZe=[["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"}]],GZe=rt("paperclip",qZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const VZe=[["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"}]],Ix=rt("pencil",VZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const WZe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Bx=rt("plus",WZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const KZe=[["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"}]],hd=rt("refresh-cw",KZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const YZe=[["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"}]],TN=rt("rotate-cw",YZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const XZe=[["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"}]],$x=rt("scroll-text",XZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ZZe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],MN=rt("search",ZZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const QZe=[["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"}]],sS=rt("server",QZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const JZe=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],eQe=rt("settings-2",JZe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tQe=[["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"}]],RN=rt("settings",tQe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nQe=[["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"}]],DN=rt("sliders-horizontal",nQe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rQe=[["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"}]],Nh=rt("square-terminal",rQe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sQe=[["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"}]],iQe=rt("sun",sQe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aQe=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Zu=rt("terminal",aQe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oQe=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],lQe=rt("toggle-right",oQe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cQe=[["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"}]],_d=rt("trash-2",cQe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uQe=[["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"}]],LN=rt("triangle-alert",uQe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dQe=[["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"}]],fQe=rt("upload",dQe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hQe=[["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"}]],Hx=rt("users",hQe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _Qe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ur=rt("x",_Qe);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pQe=[["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"}]],mQe=rt("zap",pQe),lb="demo_nanochat_v1",r0=e=>e.startsWith("demo_"),Rf="chat_demo_nanochat_v1",ON="chat_demo_nanochat_figures_v1",IN="chat_demo_nanochat_literature_v1",$v="cpu-apple-silicon-pipeline-results.md",gQe="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.";function Fi(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}async function qi(e){if(!e.ok){const n=await e.text().catch(()=>"");let t=n;try{const r=JSON.parse(n);r.error&&(t=r.error)}catch{}throw new Error(t||`HTTP ${e.status}`)}return await e.json()}const Ct=e=>fetch(e).then(n=>qi(n)),Ot=(e,n)=>fetch(e,{method:"POST",headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(t=>qi(t)),Yp=(e,n)=>fetch(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>qi(t)),BN=(e,n)=>fetch(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>qi(t)),bQe=()=>Ct("/api/projects").then(e=>e.projects),vQe=()=>Ct("/api/projects/activity").then(e=>e.activity),xQe=()=>Ct("/api/settings/ui-state"),iS=e=>Ot("/api/settings/ui-state",e),yQe=(e,n)=>Ot("/api/onboarding/complete",{...e,...n}),$N=(e="")=>{const n=e?`?path=${encodeURIComponent(e)}`:"";return Ct(`/api/project-path/status${n}`)},wQe=()=>Ot("/api/project-path/pick").then(e=>e.path),SQe=e=>Ot("/api/projects",e),HN=e=>Ct(`/api/papers/search?q=${encodeURIComponent(e)}`).then(n=>n.papers),kQe=()=>Ct("/api/github/account"),CQe=e=>Ct(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`),EQe=(e,n)=>Ct(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`),Hv=e=>Ct(`/api/papers/resolve?id=${encodeURIComponent(e)}`).then(n=>n.paper),NQe=e=>Ot("/api/projects/starter-prompts/prewarm",e),zQe=(e,n,t,r)=>Ct(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`),jQe=e=>Ot(`/api/projects/${e}/open`).then(n=>n.project),AQe=e=>fetch(`/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})`)}}),TQe=e=>Ct(`/api/projects/${e}/experiments`).then(n=>n.experiments),Px=e=>Ct(`/api/projects/${e}/runs`).then(n=>n.runs),PN=e=>Ot(`/api/runs/${e}/cancel`).then(()=>{}),MQe=(e,n)=>Ct(`/api/runs/${e}/log?offset=${n}`),RQe=e=>Ct(`/api/runs/${e}/diff`),DQe=e=>Ct(`/api/experiments/${e}/diff`),Ic=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),aS=(e,n,t={})=>Ct(`/api/projects/${e}/file?${Ic(t,new URLSearchParams({path:n}))}`),oS=(e,n,t={})=>`/api/projects/${e}/file/raw?${Ic(t,new URLSearchParams({path:n}))}`,LQe=e=>Ct(`/api/files/abs?path=${encodeURIComponent(e)}`),OQe=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,IQe=(e,n,t,r={})=>BN(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId}),BQe=(e,n,t={})=>Ot(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),$Qe=()=>Ct("/api/latex/engine"),HQe=(e,n,t={})=>Ot(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),PQe=()=>Ct("/api/overleaf/settings"),FN=e=>Ot("/api/overleaf/token",{token:e}),FQe=()=>fetch("/api/overleaf/token",{method:"DELETE"}).then(e=>qi(e)),UQe=(e,n,t={})=>Ct(`/api/projects/${e}/file/overleaf?${Ic(t,new URLSearchParams({path:n}))}`),qQe=(e,n,t)=>Ot(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),GQe=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf?${Ic(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>qi(r)),VQe=(e,n,t={})=>Ot(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),WQe=(e,n,t={})=>Ct(`/api/projects/${e}/file/overleaf/status?${Ic(t,new URLSearchParams({path:n}))}`),KQe=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${Ic(t,new URLSearchParams({path:n}))}`,Pv=(e,n={})=>{const t=Ic(n).toString();return Ct(`/api/projects/${e}/code-tree${t?`?${t}`:""}`)},UN=e=>Ct(`/api/chat/sessions/${e}/worktree`),Xp=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,YQe=()=>Ct("/api/settings/hf"),XQe=e=>Ot("/api/settings/hf",{token:e}),ZQe=()=>Ct("/api/update"),QQe=()=>Ot("/api/update/apply"),JQe=e=>Ot("/api/update/auto",{enabled:e}),eJe=(e=!1)=>Ot("/api/update/install-cli",{force:e}),tJe=()=>Ct("/api/settings/k8s"),nJe=e=>Ot("/api/settings/k8s",e),rJe=()=>Ct("/api/settings/modal"),sJe=()=>Ot("/api/settings/modal/provision"),iJe=()=>Ct("/api/settings/env").then(e=>e.vars),qN=(e,n)=>Ot("/api/settings/env",{key:e,value:n}).then(t=>t.vars),aJe=e=>fetch(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>qi(n)).then(n=>n.vars),oJe=()=>Ct("/api/settings/data-dir"),lJe=e=>Ot("/api/settings/data-dir/validate",{path:e}),cJe=e=>Ot("/api/settings/data-dir/move",{path:e}),GN=()=>Ct("/api/settings/ssh").then(e=>e.hosts),uJe=()=>Ct("/api/settings/ssh/config"),dJe=(e,n)=>BN("/api/settings/ssh/config",{content:e,previousContent:n}),fJe=e=>Ct(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`),hJe=()=>Ct("/_orx/runtime"),_Je=()=>Ct("/api/remote/sessions").then(e=>e.sessions),pJe=(e,n)=>Ot("/api/remote/sessions",{host:e,uiPreferences:n}),mJe=e=>Ot("/_orx/install",e),gJe=()=>Ot("/_orx/reconnect"),VN=()=>Ot("/_orx/disconnect"),bJe=()=>Ot("/_orx/start-host"),WN=()=>Ct("/_orx/stop-host"),KN=e=>Ot("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),vJe=()=>Ct("/api/settings/slurm"),xJe=e=>Ot("/api/settings/slurm",e),yJe=()=>Ct("/api/settings/ray"),wJe=e=>Ot("/api/settings/ray",e),SJe=e=>Ot("/api/settings/ray/preflight",{address:e??null}),kJe=e=>Ct(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`),CJe=e=>Ot("/api/settings/compute/default",e),EJe=()=>Ct("/api/settings/local"),NJe=()=>Ct("/api/settings/openresearch"),lS=e=>Ct(`/api/projects/${e}/files`),zJe=(e,n)=>fetch(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>qi(t)),zh=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,YN=512e3,jJe=(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}}},XN=(e,n)=>fetch(zh(e,n),{headers:{Range:`bytes=0-${YN-1}`}}).then(t=>{var s;if(t.status===404)return null;if(t.status===416&&t.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!t.ok)throw new Error(`HTTP ${t.status}`);const r=Number((s=t.headers.get("content-range"))==null?void 0:s.split("/").pop());return t.arrayBuffer().then(a=>jJe(a,Number.isFinite(r)&&r>a.byteLength))}),AJe=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",TJe=(e,n)=>fetch(zh(e,n),{method:"HEAD"}).then(t=>{if(t.status===404)return null;if(!t.ok)throw new Error(`HTTP ${t.status}`);const r=t.headers.get("x-openresearch-presentation");return{size:Number(t.headers.get("content-length"))||0,presentation:AJe(r)?r:"download"}}),MJe=()=>Ct("/api/settings/profile"),RJe=()=>Ct("/api/settings/lit-sources"),DJe=e=>Ot("/api/settings/lit-sources",e),Fx=()=>Ct("/api/settings/projects"),ZN=(e,n)=>Ot("/api/settings/projects",{githubForNewProjects:e,githubDefaultPromptSeen:n}),LJe=e=>Ct(`/api/projects/${e}/git`),OJe=e=>Ot(`/api/projects/${e}/git/init`),IJe=e=>Ot(`/api/projects/${e}/github`),BJe=e=>Ot(`/api/projects/${e}/github/disable`),$Je=()=>Ct("/api/settings/telemetry"),HJe=e=>Ot("/api/settings/telemetry",{enabled:e}),op=e=>e.displayName??ez(e.id),lp="default";function Zp(e,n){var l,o,c;const t=e==null?void 0:e.models.find(d=>d.id===n),r=(t==null?void 0:t.reasoningLevels)??((l=e==null?void 0:e.options)==null?void 0:l.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,a=s&&r.some(d=>d.id===s)?s:r.some(d=>d.id===lp)?lp:((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:a}}const Fv="default";function QN(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:Fv,label:FCe(),description:BCe()},...t]:[]}function cp(e,n,t){var a;if(!e)return t??null;if(e.id!=="codex"||((a=e.models.find(l=>l.id===n))==null?void 0:a.serviceTiers)===void 0)return null;const s=QN(e,n);return s.length===0?Fv:t!=null&&s.some(l=>l.id===t)?t:Fv}function JN(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=Zp(e,n);return r.length===0?lp:t&&r.some(a=>a.id===t)?t:s}const up=(e=!1,n=!1)=>{const t=new URLSearchParams;e&&t.set("refresh","1"),n&&t.set("retry","1");const r=t.size>0?`?${t.toString()}`:"";return Ct(`/api/harnesses${r}`).then(s=>s.harnesses)},PJe=()=>Ct("/api/skills").then(e=>e.skills),FJe=(e,n)=>Ct(`/api/skills/${encodeURIComponent(e)}${n?`?project=${encodeURIComponent(n)}`:""}`).then(t=>t.content),UJe=()=>Ct("/api/latex-templates").then(e=>e.templates),qJe=e=>Ot("/api/latex-templates",e).then(n=>n.template),GJe=e=>fetch(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>qi(n)),VJe=()=>Ct("/api/user-skills").then(e=>e.skills),WJe=e=>Ot("/api/user-skills",e).then(n=>n.skill),KJe=e=>fetch(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>qi(n));function ez(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 H0=e=>Ct(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`).then(n=>n.sessions),YJe=(e,n,t={})=>Ot("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),XJe=e=>fetch(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>qi(n)),ZJe=(e,n)=>Yp(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),QJe=(e,n)=>Yp(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),JJe=(e,n)=>Yp(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),eet=(e,n)=>Yp(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),Lu=e=>Ct(`/api/chat/sessions/${e}/messages`).then(n=>({messages:n.messages,queued:n.queued??[],activeLeafId:n.activeLeafId??null})),tet=(e,n)=>fetch(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>qi(t)),net=(e,n)=>Ot(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),ret=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,cS=(e,n,t={},r,s,a,l)=>Ot(`/api/chat/sessions/${e}/message`,{text:n,clientTurnId:a,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:r,annotations:s,mode:l}),set=(e,n)=>Ot(`/api/chat/sessions/${e}/shell`,{command:n}),iet=(e,n,t,r={})=>Ot(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),aet=(e,n,t)=>Ot(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),oet=(e,n)=>Ot(`/api/chat/sessions/${e}/branch`,{leafId:n}),cet=e=>Ot(`/api/chat/sessions/${e}/interrupt`),uet=(e,n)=>Ot(`/api/chat/sessions/${e}/respond`,n);function La(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 dp(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return Rle({value:Vt(n)});const t=Math.floor(n/60);if(t<60)return jle({value:Vt(t)});const r=Math.floor(t/60);return r<24?Cle({hours:Vt(r),minutes:Vt(t%60)}):yle({days:Vt(Math.floor(r/24)),hours:Vt(r%24)})}function Ta(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&r{Qu==="system"&&qx()});qx();function pet(e){return Uv.add(e),()=>Uv.delete(e)}function rz(){return[M.useSyncExternalStore(pet,()=>Qu,()=>Qu),nz]}var Bc=dE();const met=kh(Bc);function Gx(){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 cb(){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(Gx,{}),"OpenResearch"]})}function get(e,n){if(!n)return e;const t=new Map(e.map(a=>[a.id,a]));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 bet(e,n,t){var l;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,a=(l=t.get(s))==null?void 0:l.filter(o=>o.role===e.role);return a!=null&&a.length?a:[e]}function vet(e,n,t,r){const s=e.filter(d=>!r(d.id)),a=new Map(s.map(d=>[d.id,d])),l=new Map;for(const d of s){const _=d.parentId??null,h=l.get(_);h?h.push(d):l.set(_,[d])}const o=new Set(n.map(d=>d.id)),c=new Map;for(const d of t){const _=bet(d,a,l),h=_.findIndex(m=>o.has(m.id));c.set(d.id,{count:_.length,index:h,prevId:h>0?_[h-1].id:void 0,nextId:h<_.length-1?_[h+1].id:void 0})}return c}function fp(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 jh(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function sz(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||jh(r)||!fp(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function iz(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=sz(n.parts);return t?{messageId:n.id,toolId:t}:null}function xet(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"||jh(r)))return r.type==="text"&&!!r.text}return!1}const P0=new Map;function yet(e,n){let t=P0.get(e);return t||(t=new Set,P0.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&P0.delete(e)}}function wet(e){var n;(n=P0.get(e.runId))==null||n.forEach(t=>t(e))}const qv=new Set;function Vf(e){return qv.add(e),()=>{qv.delete(e)}}function fl(e){qv.forEach(n=>n(e))}const Gv=new Set;function ket(e){return Gv.add(e),()=>{Gv.delete(e)}}function hl(){Gv.forEach(e=>e())}const Vv=new Set;function Vx(e){return Vv.add(e),()=>{Vv.delete(e)}}function uS(e){Vv.forEach(n=>n(e))}const Wv=new Set;function Cet(e){return Wv.add(e),()=>{Wv.delete(e)}}function ub(e){Wv.forEach(n=>n(e))}const Kv=new Set;function Eet(e){return Kv.add(e),()=>{Kv.delete(e)}}function Net(e){Kv.forEach(n=>n(e))}let Yv=!0;const Xv=new Set;function zet(e){return Xv.add(e),()=>{Xv.delete(e)}}function dS(){return Yv}function fS(e){e!==Yv&&(Yv=e,Xv.forEach(n=>n()))}const jet=8e3,Aet=3e3;function Tet(e){const n=M.useRef(e);n.current=e,M.useEffect(()=>{let t=null,r=!1,s,a,l=!1;const o=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{r||(l=!0,s??(s=window.setTimeout(()=>fS(!1),jet)),c.readyState===EventSource.CLOSED&&a===void 0&&(a=window.setTimeout(()=>{a=void 0,o()},Aet)))},c.onopen=()=>{var _,h;r||(window.clearTimeout(s),s=void 0,fS(!0),l&&(fl({type:"reconnected"}),hl(),uS({harness:"*",authState:"unknown"}),(h=(_=n.current).onReconnect)==null||h.call(_)),l=!0)};const d=_=>{try{return JSON.parse(_.data)}catch{return null}};c.addEventListener("run.updated",_=>{const h=d(_);h!=null&&h.run&&(hl(),n.current.onRun(h.run))}),c.addEventListener("experiment.updated",_=>{const h=d(_);h!=null&&h.experiment&&(hl(),n.current.onExperiment(h.experiment))}),c.addEventListener("project.updated",_=>{const h=d(_);h!=null&&h.project&&(hl(),n.current.onProject(h.project))}),c.addEventListener("files.updated",_=>{var m,g;const h=d(_);h!=null&&h.projectId&&((g=(m=n.current).onArtifacts)==null||g.call(m,h.projectId))}),c.addEventListener("run.log",_=>{const h=d(_);h!=null&&h.runId&&wet(h)}),c.addEventListener("chat.session",_=>{const h=d(_);h!=null&&h.session&&(hl(),fl({type:"session",session:h.session}))}),c.addEventListener("chat.session.deleted",_=>{const h=d(_);h!=null&&h.sessionId&&(hl(),fl({type:"sessionDeleted",sessionId:h.sessionId}))}),c.addEventListener("chat.message",_=>{const h=d(_);h!=null&&h.message&&(hl(),fl({type:"message",sessionId:h.sessionId,message:h.message}))}),c.addEventListener("chat.busy",_=>{const h=d(_);h!=null&&h.sessionId&&(hl(),fl({type:"busy",sessionId:h.sessionId,busy:h.busy}))}),c.addEventListener("chat.usage",_=>{const h=d(_);h!=null&&h.sessionId&&h.usage&&fl({type:"usage",sessionId:h.sessionId,usage:h.usage})}),c.addEventListener("chat.queued",_=>{const h=d(_);h!=null&&h.sessionId&&fl({type:"queued",sessionId:h.sessionId,items:h.items??[]})}),c.addEventListener("chat.branch",_=>{const h=d(_);h!=null&&h.sessionId&&fl({type:"branch",sessionId:h.sessionId,activeLeafId:h.activeLeafId??null})}),c.addEventListener("harness.auth",_=>{const h=d(_);h!=null&&h.harness&&h.authState&&uS(h)}),c.addEventListener("datadir.move.progress",_=>{const h=d(_);h&&ub({type:"progress",...h})}),c.addEventListener("datadir.move.done",_=>{const h=d(_);h&&ub({type:"done",path:h.path,oldPathLeft:h.oldPathLeft})}),c.addEventListener("datadir.move.error",_=>{const h=d(_);h&&ub({type:"error",error:h.error})}),c.addEventListener("update.status",_=>{const h=d(_);h&&Net(h)})};return o(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(a),t==null||t.close()}},[])}const Ea=e=>new Intl.NumberFormat(E()).format(e);function Met(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?vCe():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?dCe({attempt:Ea(e.attempt),maximum:Ea(e.maximum),seconds:Ea(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?oCe({attempt:Ea(e.attempt),maximum:Ea(e.maximum)}):typeof e.attempt=="number"&&t!=null?pCe({attempt:Ea(e.attempt),seconds:Ea(t)}):typeof e.attempt=="number"?rCe({attempt:Ea(e.attempt)}):t!=null?SCe({seconds:Ea(t)}):VE()}function Ret(e,n){if(typeof e!="number")return NCe();const t=Math.max(0,Math.ceil((e-n)/1e3));return TCe({seconds:Ea(t)})}function az(e){return e==="retry"||e==="continue"?e:null}function Det(e){const n={};return e.model!==void 0&&(n.model=e.model),e.serviceTier!==void 0&&(n.serviceTier=e.serviceTier),e.permissionMode!==void 0&&(n.permissionMode=e.permissionMode),e.planMode!==void 0&&(n.planMode=e.planMode),e.reasoningLevel!==void 0&&(n.reasoningLevel=e.reasoningLevel),n}function Let(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function hS(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"?e:void 0}function Oet(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 Wx(e){const n=[];let t="",r=!1,s=null;const a=()=>{r&&n.push(t),t="",r=!1};for(let l=0;l"||o==="&")break;/\s/.test(o)?a():(t+=o,r=!0)}return a(),n}function Iet(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=Wx(e);if(t.length===1)return t[0]}return e}function Bet(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 Ju(e){return Bet(typeof e=="string"?Wx(e):e)}function $et(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 Het(e,n){const t=Ju(e);return t===null?!1:n.split("\\s+").every((s,a)=>t[a]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[a]))}function Pet(e){var c;const n=Ju(e);if(!n)return null;const t=n[0];if(t!=="paper"&&t!=="discover")return null;let r;const s=[],a=new Set(["--limit","--published-after","--published-before","--prioritize"]);for(let d=1;d - - - - -`,Uet='',qet=` - - -`,oz={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv"},Get={alphaxiv:Fet,openalex:qet,biorxiv:Uet};function lz({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":oz[e]},dangerouslySetInnerHTML:{__html:Get[e]}})}function Vet(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 Wet(e,n){const t=n.trim();if(e==="alphaxiv"){const a=(t.split(/[?#]/)[0].split("/").pop()||t).replace(/\.(pdf|md)$/i,"");return`https://www.alphaxiv.org/abs/${encodeURIComponent(a)}`}const r=Vet(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 Ket=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),cz=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),hp="-",_S=[],Xet="arbitrary..",Zet=e=>{const n=Jet(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Qet(l);const o=l.split(hp),c=o[0]===""&&o.length>1?1:0;return uz(o,c,n)},getConflictingClassGroupIds:(l,o)=>{if(o){const c=r[l],d=t[l];return c?d?Ket(d,c):c:d||_S}return t[l]||_S}}},uz=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],a=t.nextPart.get(s);if(a){const d=uz(e,n+1,a);if(d)return d}const l=t.validators;if(l===null)return;const o=n===0?e.join(hp):e.slice(n).join(hp),c=l.length;for(let d=0;de.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?Xet+r:void 0})(),Jet=e=>{const{theme:n,classGroups:t}=e;return ett(t,n)},ett=(e,n)=>{const t=cz();for(const r in e){const s=e[r];Kx(s,t,r,n)}return t},Kx=(e,n,t,r)=>{const s=e.length;for(let a=0;a{if(typeof e=="string"){ntt(e,n,t);return}if(typeof e=="function"){rtt(e,n,t,r);return}stt(e,n,t,r)},ntt=(e,n,t)=>{const r=e===""?n:dz(n,e);r.classGroupId=t},rtt=(e,n,t,r)=>{if(itt(e)){Kx(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(Yet(t,e))},stt=(e,n,t,r)=>{const s=Object.entries(e),a=s.length;for(let l=0;l{let t=e;const r=n.split(hp),s=r.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,att=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const s=(a,l)=>{t[a]=l,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(a){let l=t[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return s(a,l),l},set(a,l){a in t?t[a]=l:s(a,l)}}},Zv="!",pS=":",ott=[],mS=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),ltt=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const a=[];let l=0,o=0,c=0,d;const _=s.length;for(let k=0;k<_;k++){const v=s[k];if(l===0&&o===0){if(v===pS){a.push(s.slice(c,k)),c=k+1;continue}if(v==="/"){d=k;continue}}v==="["?l++:v==="]"?l--:v==="("?o++:v===")"&&o--}const h=a.length===0?s:s.slice(c);let m=h,g=!1;h.endsWith(Zv)?(m=h.slice(0,-1),g=!0):h.startsWith(Zv)&&(m=h.slice(1),g=!0);const S=d&&d>c?d-c:void 0;return mS(a,g,m,S)};if(n){const s=n+pS,a=r;r=l=>l.startsWith(s)?a(l.slice(s.length)):mS(ott,!1,l,void 0,!0)}if(t){const s=r;r=a=>t({className:a,parseClassName:s})}return r},ctt=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{n.set(t,1e6+r)}),t=>{const r=[];let s=[];for(let a=0;a0&&(s.sort(),r.push(...s),s=[]),r.push(l)):s.push(l)}return s.length>0&&(s.sort(),r.push(...s)),r}},utt=e=>({cache:att(e.cacheSize),parseClassName:ltt(e),sortModifiers:ctt(e),postfixLookupClassGroupIds:dtt(e),...Zet(e)}),dtt=e=>{const n=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let r=0;r{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:a,postfixLookupClassGroupIds:l}=n,o=[],c=e.trim().split(ftt);let d="";for(let _=c.length-1;_>=0;_-=1){const h=c[_],{isExternal:m,modifiers:g,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:v}=t(h);if(m){d=h+(d.length>0?" "+d:d);continue}let b=!!v,w;if(b){const T=k.substring(0,v);w=r(T);const z=w&&l[w]?r(k):void 0;z&&z!==w&&(w=z,b=!1)}else w=r(k);if(!w){if(!b){d=h+(d.length>0?" "+d:d);continue}if(w=r(k),!w){d=h+(d.length>0?" "+d:d);continue}b=!1}const x=g.length===0?"":g.length===1?g[0]:a(g).join(":"),C=S?x+Zv:x,j=C+w;if(o.indexOf(j)>-1)continue;o.push(j);const N=s(w,b);for(let T=0;T0?" "+d:d)}return d},_tt=(...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,a;const l=c=>{const d=n.reduce((_,h)=>h(_),e());return t=utt(d),r=t.cache.get,s=t.cache.set,a=o,o(c)},o=c=>{const d=r(c);if(d)return d;const _=htt(c,t);return s(c,_),_};return a=l,(...c)=>a(_tt(...c))},mtt=[],Pr=e=>{const n=t=>t[e]||mtt;return n.isThemeGetter=!0,n},hz=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_z=/^\((?:(\w[\w-]*):)?(.+)\)$/i,gtt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,btt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vtt=/\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$/,xtt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ytt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wtt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_l=e=>gtt.test(e),en=e=>!!e&&!Number.isNaN(Number(e)),Sa=e=>!!e&&Number.isInteger(Number(e)),db=e=>e.endsWith("%")&&en(e.slice(0,-1)),po=e=>btt.test(e),pz=()=>!0,Stt=e=>vtt.test(e)&&!xtt.test(e),Yx=()=>!1,ktt=e=>ytt.test(e),Ctt=e=>wtt.test(e),Ett=e=>!ct(e)&&!ut(e),Ntt=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)),ztt=e=>Ll(e,bz,Yx),ct=e=>hz.test(e),lc=e=>Ll(e,vz,Stt),gS=e=>Ll(e,Ott,en),jtt=e=>Ll(e,yz,pz),Att=e=>Ll(e,xz,Yx),bS=e=>Ll(e,mz,Yx),Ttt=e=>Ll(e,gz,Ctt),i0=e=>Ll(e,wz,ktt),ut=e=>_z.test(e),_f=e=>$c(e,vz),Mtt=e=>$c(e,xz),vS=e=>$c(e,mz),Rtt=e=>$c(e,bz),Dtt=e=>$c(e,gz),a0=e=>$c(e,wz,!0),Ltt=e=>$c(e,yz,!0),Ll=(e,n,t)=>{const r=hz.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},$c=(e,n,t=!1)=>{const r=_z.exec(e);return r?r[1]?n(r[1]):t:!1},mz=e=>e==="position"||e==="percentage",gz=e=>e==="image"||e==="url",bz=e=>e==="length"||e==="size"||e==="bg-size",vz=e=>e==="length",Ott=e=>e==="number",xz=e=>e==="family-name",yz=e=>e==="number"||e==="weight",wz=e=>e==="shadow",Itt=()=>{const e=Pr("color"),n=Pr("font"),t=Pr("text"),r=Pr("font-weight"),s=Pr("tracking"),a=Pr("leading"),l=Pr("breakpoint"),o=Pr("container"),c=Pr("spacing"),d=Pr("radius"),_=Pr("shadow"),h=Pr("inset-shadow"),m=Pr("text-shadow"),g=Pr("drop-shadow"),S=Pr("blur"),k=Pr("perspective"),v=Pr("aspect"),b=Pr("ease"),w=Pr("animate"),x=()=>["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"],j=()=>[...C(),ut,ct],N=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],z=()=>[ut,ct,c],D=()=>[_l,"full","auto",...z()],O=()=>[Sa,"none","subgrid",ut,ct],H=()=>["auto",{span:["full",Sa,ut,ct]},Sa,ut,ct],P=()=>[Sa,"auto",ut,ct],F=()=>["auto","min","max","fr",ut,ct],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...z()],X=()=>[_l,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],J=()=>[_l,"screen","full","dvw","lvw","svw","min","max","fit",...z()],$=()=>[_l,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],L=()=>[e,ut,ct],B=()=>[...C(),vS,bS,{position:[ut,ct]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",Rtt,ztt,{size:[ut,ct]}],se=()=>[db,_f,lc],le=()=>["","none","full",d,ut,ct],ae=()=>["",en,_f,lc],re=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[en,db,vS,bS],ce=()=>["","none",S,ut,ct],_e=()=>["none",en,ut,ct],ue=()=>["none",en,ut,ct],Ne=()=>[en,ut,ct],ze=()=>[_l,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[po],breakpoint:[po],color:[pz],container:[po],"drop-shadow":[po],ease:["in","out","in-out"],font:[Ett],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[po],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[po],shadow:[po],spacing:["px",en],text:[po],"text-shadow":[po],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_l,ct,ut,v]}],container:["container"],"container-type":[{"@container":["","normal","size",ut,ct]}],"container-named":[Ntt],columns:[{columns:[en,ct,ut,o]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:j()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Sa,"auto",ut,ct]}],basis:[{basis:[_l,"full","auto",o,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[en,_l,"auto","initial","none",ct]}],grow:[{grow:["",en,ut,ct]}],shrink:[{shrink:["",en,ut,ct]}],order:[{order:[Sa,"first","last","none",ut,ct]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mbs:[{mbs:G()}],mbe:[{mbe:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...J()]}],"min-inline-size":[{"min-inline":["auto",...J()]}],"max-inline-size":[{"max-inline":["none",...J()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[o,"screen",...X()]}],"min-w":[{"min-w":[o,"screen","none",...X()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[l]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",t,_f,lc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ltt,jtt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",db,ct]}],"font-family":[{font:[Mtt,Att,n]}],"font-features":[{"font-features":[ct]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ut,ct]}],"line-clamp":[{"line-clamp":[en,"none",ut,gS]}],leading:[{leading:[a,...z()]}],"list-image":[{"list-image":["none",ut,ct]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ut,ct]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[en,"from-font","auto",ut,lc]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[en,"auto",ut,ct]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"tab-size":[{tab:[Sa,ut,ct]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ut,ct]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ut,ct]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Sa,ut,ct],radial:["",ut,ct],conic:[Sa,ut,ct]},Dtt,Ttt]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"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:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[en,ut,ct]}],"outline-w":[{outline:["",en,_f,lc]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",_,a0,i0]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",h,a0,i0]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[en,lc]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",m,a0,i0]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[en,ut,ct]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[en]}],"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":[ut,ct]}],"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":[en]}],"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:B()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ut,ct]}],filter:[{filter:["","none",ut,ct]}],blur:[{blur:ce()}],brightness:[{brightness:[en,ut,ct]}],contrast:[{contrast:[en,ut,ct]}],"drop-shadow":[{"drop-shadow":["","none",g,a0,i0]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",en,ut,ct]}],"hue-rotate":[{"hue-rotate":[en,ut,ct]}],invert:[{invert:["",en,ut,ct]}],saturate:[{saturate:[en,ut,ct]}],sepia:[{sepia:["",en,ut,ct]}],"backdrop-filter":[{"backdrop-filter":["","none",ut,ct]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[en,ut,ct]}],"backdrop-contrast":[{"backdrop-contrast":[en,ut,ct]}],"backdrop-grayscale":[{"backdrop-grayscale":["",en,ut,ct]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[en,ut,ct]}],"backdrop-invert":[{"backdrop-invert":["",en,ut,ct]}],"backdrop-opacity":[{"backdrop-opacity":[en,ut,ct]}],"backdrop-saturate":[{"backdrop-saturate":[en,ut,ct]}],"backdrop-sepia":[{"backdrop-sepia":["",en,ut,ct]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ut,ct]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[en,"initial",ut,ct]}],ease:[{ease:["linear","initial",b,ut,ct]}],delay:[{delay:[en,ut,ct]}],animate:[{animate:["none",w,ut,ct]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,ut,ct]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[ut,ct,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ze()}],"translate-x":[{"translate-x":ze()}],"translate-y":[{"translate-y":ze()}],"translate-z":[{"translate-z":ze()}],"translate-none":["translate-none"],zoom:[{zoom:[Sa,ut,ct]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ut,ct]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ut,ct]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[en,_f,lc,gS]}],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"]}},Btt=ptt(Itt);function os(...e){return Btt(...e)}const $tt={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 Lt({variant:e="default",className:n,...t}){return f.jsx("span",{className:os("badge inline-flex items-center rounded-full border px-2 py-px font-sans text-sm font-medium",$tt[e],n),...t})}const Htt=["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(" "),Ptt={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"},Ftt={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 Sz(e,n,t,r){return os(Htt,Ptt[e],Ftt[n],t&&"active",r)}function Ue({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("button",{className:Sz(n,t,e,r),...s})}function Qv({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("a",{className:Sz(n,t,e,r),...s})}const Utt=["icon-btn relative inline-flex shrink-0 items-center justify-center","transition-[background,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45","[.chat-header.rail-hidden_>_&:first-child]:me-3"].join(" "),qtt={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"},Gtt={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function kz(e,n,t,r){return os(Utt,qtt[e],Gtt[n],t&&"active",r)}const Gt=M.forwardRef(function({active:n=!1,size:t="default",variant:r="default",className:s,...a},l){return f.jsx("button",{ref:l,className:kz(r,t,n,s),...a})});function Qp({active:e=!1,size:n="default",variant:t="default",className:r,...s}){return f.jsx("a",{className:kz(t,n,e,r),...s})}const Vtt={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 Wf({variant:e="default",className:n,...t}){return f.jsx("input",{className:os("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",Vtt[e],n),...t})}function Mr({active:e=!1,danger:n=!1,className:t,...r}){return f.jsx("button",{className:os("model-item flex min-h-8 w-full items-center justify-between gap-2 rounded-sm px-2 py-1.5 text-start text-sm 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",e&&"bg-surface",n&&"text-accent-red hover:text-accent-red",t),...r})}function Mt({className:e,...n}){return f.jsx("span",{className:os("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 Sr({className:e,...n}){return f.jsx("div",{className:os("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const Wtt={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 Xx({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return f.jsxs("span",{className:os("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[f.jsx("span",{className:os("h-[7px] w-[7px] shrink-0 rounded-full bg-current",Wtt[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const Ktt=["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 Cz(e,n){return os(Ktt,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function Zx({checked:e=!1,className:n,children:t,...r}){return f.jsx("button",{role:"switch","aria-checked":e,className:Cz(e,n),...r,children:t??f.jsx("span",{})})}function Ytt({checked:e=!1,className:n,...t}){return f.jsx("span",{className:Cz(e,n),...t,children:f.jsx("span",{})})}function Xtt(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 Ztt=e=>{switch(e){case"success":return ent;case"info":return nnt;case"warning":return tnt;case"error":return rnt;default:return null}},Qtt=Array(12).fill(0),Jtt=({visible:e,className:n})=>et.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},et.createElement("div",{className:"sonner-spinner"},Qtt.map((t,r)=>et.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),ent=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"})),tnt=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"})),nnt=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"})),rnt=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"})),snt=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"})),int=()=>{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 ant=1;const ont=100,xS=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:ant++};class lnt{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-ont;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=xS(n),a=this.pendingDismissals.get(s);a!==void 0&&(cancelAnimationFrame(a),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const l=this.dismissedToasts.has(s),o=n.dismissible===void 0?!0:n.dismissible;return l&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(d=>d.id!==s)),(l?void 0:this.toasts.find(d=>d.id===s))?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...n,id:s,title:t}),{...d,...n,id:s,dismissible:o,title:t}):d):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 a=r!==void 0,l;const o=s.then(async d=>{if(l=["resolve",d],et.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(unt(d)&&!d.ok){a=!1;const h=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description,S=typeof h=="object"&&!et.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:m,...S})}else if(d instanceof Error){a=!1;const h=typeof t.error=="function"?await t.error(d):t.error,m=typeof t.description=="function"?await t.description(d):t.description,S=typeof h=="object"&&!et.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:m,...S})}else if(t.success!==void 0){a=!1;const h=typeof t.success=="function"?await t.success(d):t.success,m=typeof t.description=="function"?await t.description(d):t.description,S=typeof h=="object"&&!et.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:m,...S})}}).catch(async d=>{if(l=["reject",d],t.error!==void 0){a=!1;const _=typeof t.error=="function"?await t.error(d):t.error,h=typeof t.description=="function"?await t.description(d):t.description,g=typeof _=="object"&&!et.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:h,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((d,_)=>o.then(()=>l[0]==="reject"?_(l[1]):d(l[1])).catch(_));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=xS(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 Ys=new lnt,cnt=(e,n)=>Ys.message(e,n),unt=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",dnt=cnt,fnt=()=>Ys.toasts,hnt=()=>Ys.getActiveToasts(),_nt=Object.assign(dnt,{success:Ys.success,info:Ys.info,warning:Ys.warning,error:Ys.error,custom:Ys.custom,message:Ys.message,promise:Ys.promise,dismiss:Ys.dismiss,loading:Ys.loading},{getHistory:fnt,getToasts:hnt});Xtt("[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 o0(e){return e.label!==void 0}const pnt=3,mnt="24px",gnt="16px",yS=4e3,bnt=356,vnt=14,xnt=45,ynt=200;function ka(...e){return e.filter(Boolean).join(" ")}function wnt(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const Snt=e=>{var n,t,r,s,a,l,o,c,d;const{invert:_,toast:h,unstyled:m,interacting:g,setHeights:S,visibleToasts:k,heights:v,index:b,toasts:w,expanded:x,removeToast:C,defaultRichColors:j,closeButton:N,style:T,cancelButtonStyle:z,actionButtonStyle:D,className:O="",descriptionClassName:H="",duration:P,position:F,gap:W,expandByDefault:Z,classNames:G,icons:X,closeButtonAriaLabel:J="Close toast"}=e,[$,L]=et.useState(null),[B,Y]=et.useState(null),[V,se]=et.useState(!1),[le,ae]=et.useState(!1),[re,q]=et.useState(!1),[oe,ce]=et.useState(!1),[_e,ue]=et.useState(!1),[Ne,ze]=et.useState(0),[Ie,Pe]=et.useState(0),$e=et.useRef(h.duration||P||yS),It=et.useRef(null),yt=et.useRef(null),qe=b===0,jt=b+1<=k,pt=h.type,ot=pt??"default",tt=h.dismissible!==!1,Ft=h.className||"",ke=h.descriptionClassName||"",Re=et.useMemo(()=>v.findIndex(Ge=>Ge.toastId===h.id)||0,[v,h.id]),Xe=et.useMemo(()=>{var Ge;return(Ge=h.closeButton)!=null?Ge:N},[h.closeButton,N]),nt=et.useMemo(()=>h.duration||P||yS,[h.duration,P]),st=et.useRef(0),St=et.useRef(0),mt=et.useRef(0),Wt=et.useRef(null),[fn,hn]=F.split("-"),At=et.useMemo(()=>v.reduce((Ge,Bt,He)=>He>=Re?Ge:Ge+Bt.height,0),[v,Re]),jn=int(),nn=et.useMemo(()=>{var Ge;return(Ge=e.swipeDirections)!=null?Ge:wnt(F)},[e.swipeDirections,F]),nr=h.invert||_,lr=pt==="loading";St.current=et.useMemo(()=>Re*W+At,[Re,At]),et.useEffect(()=>{$e.current=nt},[nt]),et.useEffect(()=>{se(!0)},[]),et.useEffect(()=>{const Ge=yt.current;if(Ge){const Bt=Ge.getBoundingClientRect().height;return Pe(Bt),S(He=>[{toastId:h.id,height:Bt,position:h.position},...He]),()=>S(He=>He.filter(it=>it.toastId!==h.id))}},[S,h.id]),et.useLayoutEffect(()=>{if(!V)return;const Ge=yt.current,Bt=Ge.style.height;Ge.style.height="auto";const He=Ge.getBoundingClientRect().height;Ge.style.height=Bt,Pe(He),S(it=>it.find(qt=>qt.toastId===h.id)?it.map(qt=>qt.toastId===h.id?{...qt,height:He}:qt):[{toastId:h.id,height:He,position:h.position},...it])},[V,h.title,h.description,S,h.id,h.jsx,h.action,h.cancel]);const bn=et.useCallback(()=>{ae(!0),ze(St.current),S(Ge=>Ge.filter(Bt=>Bt.toastId!==h.id)),setTimeout(()=>{C(h)},ynt)},[h,C,S,St]);et.useEffect(()=>{if(h.promise&&pt==="loading"||h.duration===1/0||h.type==="loading")return;let Ge;return x||g||jn?(()=>{if(mt.current{$e.current!==1/0&&(st.current=new Date().getTime(),Ge=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),bn()},$e.current))})(),()=>clearTimeout(Ge)},[x,g,h,pt,jn,bn]),et.useEffect(()=>{h.delete&&(bn(),h.onDismiss==null||h.onDismiss.call(h,h))},[bn,h.delete]);function Je(){var Ge;if(X!=null&&X.loading){var Bt;return et.createElement("div",{className:ka(G==null?void 0:G.loader,h==null||(Bt=h.classNames)==null?void 0:Bt.loader,"sonner-loader"),"data-visible":pt==="loading"},X.loading)}return et.createElement(Jtt,{className:ka(G==null?void 0:G.loader,h==null||(Ge=h.classNames)==null?void 0:Ge.loader),visible:pt==="loading"})}const ht=h.icon||(X==null?void 0:X[pt])||Ztt(pt);var An,rr;return et.createElement("li",{tabIndex:0,ref:yt,className:ka(O,Ft,G==null?void 0:G.toast,h==null||(n=h.classNames)==null?void 0:n.toast,G==null?void 0:G[ot],h==null||(t=h.classNames)==null?void 0:t[ot]),"data-sonner-toast":"","data-rich-colors":(An=h.richColors)!=null?An:j,"data-styled":!(h.jsx||h.unstyled||m),"data-mounted":V,"data-promise":!!h.promise,"data-swiped":_e,"data-removed":le,"data-visible":jt,"data-y-position":fn,"data-x-position":hn,"data-index":b,"data-front":qe,"data-swiping":re,"data-dismissible":tt,"data-type":pt,"data-invert":nr,"data-swipe-out":oe,"data-swipe-direction":B,"data-expanded":!!(x||Z&&V),"data-testid":h.testId,style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${le?Ne:St.current}px`,"--initial-height":Z?"auto":`${Ie}px`,...T,...h.style},onDragEnd:()=>{q(!1),L(null),Wt.current=null},onPointerDown:Ge=>{Ge.button!==2&&(lr||!tt||(It.current=new Date,ze(St.current),Ge.target.setPointerCapture(Ge.pointerId),Ge.target.tagName!=="BUTTON"&&(q(!0),Wt.current={x:Ge.clientX,y:Ge.clientY})))},onPointerUp:()=>{var Ge,Bt,He;if(oe||!tt)return;Wt.current=null;const it=Number(((Ge=yt.current)==null?void 0:Ge.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),_n=Number(((Bt=yt.current)==null?void 0:Bt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),qt=new Date().getTime()-((He=It.current)==null?void 0:He.getTime()),Nt=$==="x"?it:_n,pn=Math.abs(Nt)/qt;if(($==="x"?nn.includes(it>0?"right":"left"):nn.includes(_n>0?"bottom":"top"))&&(Math.abs(Nt)>=xnt||pn>.11)){ze(St.current),h.onDismiss==null||h.onDismiss.call(h,h),Y($==="x"?it>0?"right":"left":_n>0?"down":"up"),bn(),ce(!0);return}else{var Tn,Os;(Tn=yt.current)==null||Tn.style.setProperty("--swipe-amount-x","0px"),(Os=yt.current)==null||Os.style.setProperty("--swipe-amount-y","0px")}ue(!1),q(!1),L(null)},onPointerMove:Ge=>{var Bt,He,it;if(!Wt.current||!tt||((Bt=window.getSelection())==null?void 0:Bt.toString().length)>0)return;const qt=Ge.clientY-Wt.current.y,Nt=Ge.clientX-Wt.current.x;!$&&(Math.abs(Nt)>1||Math.abs(qt)>1)&&L(Math.abs(Nt)>Math.abs(qt)?"x":"y");let pn={x:0,y:0};const ls=Tn=>1/(1.5+Math.abs(Tn)/20);if($==="y"){if(nn.includes("top")||nn.includes("bottom"))if(nn.includes("top")&&qt<0||nn.includes("bottom")&&qt>0)pn.y=qt;else{const Tn=qt*ls(qt);pn.y=Math.abs(Tn)0)pn.x=Nt;else{const Tn=Nt*ls(Nt);pn.x=Math.abs(Tn)0||Math.abs(pn.y)>0)&&ue(!0),(He=yt.current)==null||He.style.setProperty("--swipe-amount-x",`${pn.x}px`),(it=yt.current)==null||it.style.setProperty("--swipe-amount-y",`${pn.y}px`)}},Xe&&!h.jsx&&pt!=="loading"?et.createElement("button",{"aria-label":J,"data-disabled":lr,"data-close-button":!0,onClick:lr||!tt?()=>{}:()=>{bn(),h.onDismiss==null||h.onDismiss.call(h,h)},className:ka(G==null?void 0:G.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(rr=X==null?void 0:X.close)!=null?rr:snt):null,(pt||h.icon||h.promise)&&h.icon!==null&&((X==null?void 0:X[pt])!==null||h.icon)?et.createElement("div",{"data-icon":"",className:ka(G==null?void 0:G.icon,h==null||(s=h.classNames)==null?void 0:s.icon)},pt==="loading"?h.icon||Je():h.promise?Je():null,pt!=="loading"?ht:null):null,et.createElement("div",{"data-content":"",className:ka(G==null?void 0:G.content,h==null||(a=h.classNames)==null?void 0:a.content)},et.createElement("div",{"data-title":"",className:ka(G==null?void 0:G.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?et.createElement("div",{"data-description":"",className:ka(H,ke,G==null?void 0:G.description,h==null||(o=h.classNames)==null?void 0:o.description)},typeof h.description=="function"?h.description():h.description):null),et.isValidElement(h.cancel)?h.cancel:h.cancel&&o0(h.cancel)?et.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||z,onClick:Ge=>{o0(h.cancel)&&tt&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Ge),bn())},className:ka(G==null?void 0:G.cancelButton,h==null||(c=h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,et.isValidElement(h.action)?h.action:h.action&&o0(h.action)?et.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||D,onClick:Ge=>{o0(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Ge),!Ge.defaultPrevented&&bn())},className:ka(G==null?void 0:G.actionButton,h==null||(d=h.classNames)==null?void 0:d.actionButton)},h.action.label):null)};function wS(){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 knt(e,n){const t={};return[e,n].forEach((r,s)=>{const a=s===1,l=a?"--mobile-offset":"--offset",o=a?gnt:mnt;function c(d){["top","right","bottom","left"].forEach(_=>{t[`${l}-${_}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?t[`${l}-${d}`]=o:t[`${l}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(o)}),t}const Cnt=et.forwardRef(function(n,t){const{id:r,invert:s,position:a="bottom-right",hotkey:l=["altKey","KeyT"],expand:o,closeButton:c,className:d,offset:_,mobileOffset:h,theme:m="light",richColors:g,duration:S,style:k,visibleToasts:v=pnt,toastOptions:b,dir:w=wS(),gap:x=vnt,icons:C,customAriaLabel:j,containerAriaLabel:N="Notifications"}=n,[T,z]=et.useState([]),D=et.useMemo(()=>r?T.filter(se=>se.toasterId===r):T.filter(se=>!se.toasterId),[T,r]),O=et.useMemo(()=>Array.from(new Set([a].concat(D.filter(se=>se.position).map(se=>se.position)))),[D,a]),[H,P]=et.useState([]),[F,W]=et.useState(!1),[Z,G]=et.useState(!1),[X,J]=et.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=et.useRef(null),L=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=et.useRef(null),Y=et.useRef(!1),V=et.useCallback(se=>{z(le=>{var ae;return(ae=le.find(re=>re.id===se.id))!=null&&ae.delete||Ys.dismiss(se.id),le.filter(({id:re})=>re!==se.id)})},[]);return et.useEffect(()=>Ys.subscribe(se=>{if(se.dismiss){requestAnimationFrame(()=>{z(le=>le.map(ae=>ae.id===se.id?{...ae,delete:!0}:ae))});return}setTimeout(()=>{met.flushSync(()=>{z(le=>{const ae=le.findIndex(re=>re.id===se.id);return ae!==-1?[...le.slice(0,ae),{...le[ae],...se},...le.slice(ae+1)]:[se,...le]})})})}),[]),et.useEffect(()=>{if(m!=="system"){J(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;const se=window.matchMedia("(prefers-color-scheme: dark)");try{se.addEventListener("change",({matches:le})=>{J(le?"dark":"light")})}catch{se.addListener(({matches:ae})=>{try{J(ae?"dark":"light")}catch(re){console.error(re)}})}},[m]),et.useEffect(()=>{T.length<=1&&W(!1)},[T]),et.useEffect(()=>{const se=le=>{var ae;if(l.length>0&&l.every(oe=>le[oe]||le.code===oe)){var q;W(!0),(q=$.current)==null||q.focus()}le.code==="Escape"&&(document.activeElement===$.current||(ae=$.current)!=null&&ae.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[l]),et.useEffect(()=>{if($.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,Y.current=!1)}},[$.current]),et.createElement("section",{ref:t,"aria-label":j??`${N} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},O.map((se,le)=>{var ae;const[re,q]=se.split("-");return D.length?et.createElement("ol",{key:se,dir:w==="auto"?wS():w,tabIndex:-1,ref:$,className:d,"data-sonner-toaster":!0,"data-sonner-theme":X,"data-y-position":re,"data-x-position":q,style:{"--front-toast-height":`${((ae=H[0])==null?void 0:ae.height)||0}px`,"--width":`${bnt}px`,"--gap":`${x}px`,...k,...knt(_,h)},onBlur:oe=>{Y.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(Y.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,B.current=oe.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{Z||W(!1)},onDragEnd:()=>W(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||G(!0)},onPointerUp:()=>G(!1)},D.filter(oe=>!oe.position&&le===0||oe.position===se).map((oe,ce)=>{var _e,ue;return et.createElement(Snt,{key:oe.id,icons:C,index:ce,toast:oe,defaultRichColors:g,duration:(_e=b==null?void 0:b.duration)!=null?_e:S,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(ue=b==null?void 0:b.closeButton)!=null?ue:c,interacting:Z,position:se,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:V,toasts:D.filter(Ne=>Ne.position==oe.position),heights:H.filter(Ne=>Ne.position==oe.position),setHeights:P,expandByDefault:o,gap:x,expanded:F,swipeDirections:n.swipeDirections})})):null}))});function Ent(e){const[n]=rz();return f.jsx(Cnt,{theme:n,...e})}function Ms(e,n,t){_nt[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function Ez({content:e,children:n,className:t}){return f.jsxs("span",{className:os("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,children:[n,f.jsx("span",{role:"tooltip",className:"pointer-events-none absolute bottom-full start-1/2 z-20 mb-1.5 w-max max-w-64 -translate-x-1/2 rounded-sm bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background opacity-0 shadow-control-subtle transition-opacity group-hover:opacity-100 group-focus:opacity-100",children:e})]})}const Nnt=["alphaxiv","openalex","biorxiv"];let SS=null;function znt(){const[e,n]=M.useState(SS),[t,r]=M.useState(!1),s=l=>{SS=l,n(l)};M.useEffect(()=>{RJe().then(s).catch(()=>{})},[]);const a=l=>{!e||t||(r(!0),DJe({...e,[l]:!e[l]}).then(s).catch(()=>{}).finally(()=>r(!1)))};return e?f.jsx("div",{className:"flex flex-col",children:Nnt.map(l=>{const o=e[l];return f.jsxs(Mr,{type:"button",role:"switch","aria-checked":o,disabled:t,onClick:()=>a(l),children:[f.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[f.jsx(lz,{source:l,size:16,decorative:!0}),oz[l]]}),f.jsx(Ytt,{checked:o,"aria-hidden":"true"})]},l)})}):f.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:cpe()})}function fb(e,n){if(!e)throw new Error("Assertion Error")}function cc(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}function jnt(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 Ant(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` -`}]}function Tnt(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 a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function Mnt(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Rnt(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const Rs=Ol(/[A-Za-z]/),gs=Ol(/[\dA-Za-z]/),Dnt=Ol(/[#-'*+\--9=?A-Z^-~]/);function _p(e){return e!==null&&(e<32||e===127)}const Jv=Ol(/\d/),Lnt=Ol(/[\dA-Fa-f]/),Ont=Ol(/[!-/:-@[-`{-~]/);function bt(e){return e!==null&&e<-2}function Pn(e){return e!==null&&(e<0||e===32)}function an(e){return e===-2||e===-1||e===32}const Jp=Ol(new RegExp("\\p{P}|\\p{S}","u")),Ac=Ol(/\s/);function Ol(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function pd(e){const n=[];let t=-1,r=0,s=0;for(;++t55295&&a<57344){const o=e.charCodeAt(t+1);a<56320&&o>56319&&o<57344?(l=String.fromCharCode(a,o),s=1):l="�"}else l=String.fromCharCode(a);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+s+1,l=""),s&&(t+=s,s=0)}return n.join("")+e.slice(r)}function Int(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=pd(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+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(l)}]};e.patch(n,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,d),e.applyData(n,d)}function Bnt(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 $nt(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Nz(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),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const l=s[s.length-1];return l&&l.type==="text"?l.value+=r:s.push({type:"text",value:r}),s}function Hnt(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Nz(e,n);const s={src:pd(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,a),e.applyData(n,a)}function Pnt(e,n){const t={src:pd(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 Fnt(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 Unt(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Nz(e,n);const s={href:pd(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function qnt(e,n){const t={href:pd(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 Gnt(e,n,t){const r=e.all(n),s=t?Vnt(t):zz(n),a={},l=[];if(typeof n.checked=="boolean"){const _=r[0];let h;_&&_.type==="element"&&_.tagName==="p"?h=_:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o1}function Wnt(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 Znt(e){const n=Qx(e),t=jz(e);if(n&&t)return{start:n,end:t}}function Qnt(e,n){const t=e.all(n),r=t.shift(),s=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),s.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},o=Qx(n.children[1]),c=jz(n.children[n.children.length-1]);o&&c&&(l.position={start:o,end:c}),s.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,a),e.applyData(n,a)}function Jnt(e,n,t){const r=t?t.children:void 0,a=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,o=l?l.length:n.children.length;let c=-1;const d=[];for(;++c0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return a.push(ES(n.slice(s),s>0,!1)),a.join("")}function ES(e,n,t){let r=0,s=e.length;if(n){let a=e.codePointAt(r);for(;a===kS||a===CS;)r++,a=e.codePointAt(r)}if(t){let a=e.codePointAt(s-1);for(;a===kS||a===CS;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function nrt(e,n){const t={type:"text",value:trt(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function rrt(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const srt={blockquote:jnt,break:Ant,code:Tnt,delete:Mnt,emphasis:Rnt,footnoteReference:Int,heading:Bnt,html:$nt,imageReference:Hnt,image:Pnt,inlineCode:Fnt,linkReference:Unt,link:qnt,listItem:Gnt,list:Wnt,paragraph:Knt,root:Ynt,strong:Xnt,table:Qnt,tableCell:ert,tableRow:Jnt,text:nrt,thematicBreak:rrt,toml:l0,yaml:l0,definition:l0,footnoteDefinition:l0};function l0(){}const Tz=-1,em=0,Df=1,pp=2,Jx=3,ey=4,ty=5,ny=6,Mz=7,Rz=8,irt=typeof self=="object"?self:globalThis,NS=(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 irt[e](n)},art=(e,n)=>{const t=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,l]=n[s];switch(a){case em:case Tz:return t(l,s);case Df:{const o=t([],s);for(const c of l)o.push(r(c));return o}case pp:{const o=t({},s);for(const[c,d]of l)o[r(c)]=r(d);return o}case Jx:return t(new Date(l),s);case ey:{const{source:o,flags:c}=l;return t(new RegExp(o,c),s)}case ty:{const o=t(new Map,s);for(const[c,d]of l)o.set(r(c),r(d));return o}case ny:{const o=t(new Set,s);for(const c of l)o.add(r(c));return o}case Mz:{const{name:o,message:c}=l;return t(NS(o,c),s)}case Rz:return t(BigInt(l),s);case"BigInt":return t(Object(BigInt(l)),s);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:o}=new Uint8Array(l);return t(new DataView(o),l)}}return t(NS(a,l),s)};return r},zS=e=>art(new Map,e)(0),hc="",{toString:ort}={},{keys:lrt}=Object,pf=e=>{const n=typeof e;if(n!=="object"||!e)return[em,n];const t=ort.call(e).slice(8,-1);switch(t){case"Array":return[Df,hc];case"Object":return[pp,hc];case"Date":return[Jx,hc];case"RegExp":return[ey,hc];case"Map":return[ty,hc];case"Set":return[ny,hc];case"DataView":return[Df,t]}return t.includes("Array")?[Df,t]:t.includes("Error")?[Mz,t]:[pp,t]},c0=([e,n])=>e===em&&(n==="function"||n==="symbol"),crt=(e,n,t,r)=>{const s=(l,o)=>{const c=r.push(l)-1;return t.set(o,c),c},a=l=>{if(t.has(l))return t.get(l);let[o,c]=pf(l);switch(o){case em:{let _=l;switch(c){case"bigint":o=Rz,_=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);_=null;break;case"undefined":return s([Tz],l)}return s([o,_],l)}case Df:{if(c){let m=l;return c==="DataView"?m=new Uint8Array(l.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(l)),s([c,[...m]],l)}const _=[],h=s([o,_],l);for(const m of l)_.push(a(m));return h}case pp:{if(c)switch(c){case"BigInt":return s([c,l.toString()],l);case"Boolean":case"Number":case"String":return s([c,l.valueOf()],l)}if(n&&"toJSON"in l)return a(l.toJSON());const _=[],h=s([o,_],l);for(const m of lrt(l))(e||!c0(pf(l[m])))&&_.push([a(m),a(l[m])]);return h}case Jx:return s([o,isNaN(l.getTime())?hc:l.toISOString()],l);case ey:{const{source:_,flags:h}=l;return s([o,{source:_,flags:h}],l)}case ty:{const _=[],h=s([o,_],l);for(const[m,g]of l)(e||!(c0(pf(m))||c0(pf(g))))&&_.push([a(m),a(g)]);return h}case ny:{const _=[],h=s([o,_],l);for(const m of l)(e||!c0(pf(m)))&&_.push(a(m));return h}}const{message:d}=l;return s([o,{name:c,message:d}],l)};return a},jS=(e,{json:n,lossy:t}={})=>{const r=[];return crt(!(n||t),!!n,new Map,r)(e),r},mp=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?zS(jS(e,n)):structuredClone(e):(e,n)=>zS(jS(e,n));function urt(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 drt(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function frt(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||urt,r=e.options.footnoteBackLabel||drt,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c0&&S.push({type:"text",value:" "});let w=typeof t=="string"?t:t(c,g);typeof w=="string"&&(w={type:"text",value:w}),S.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const v=_[_.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(...S)}else _.push(...S);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+m},children:e.wrap(_,!0)};e.patch(d,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...mp(l),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 Ah=(function(e){if(e==null)return mrt;if(typeof e=="function")return tm(e);if(typeof e=="object")return Array.isArray(e)?hrt(e):_rt(e);if(typeof e=="string")return prt(e);throw new Error("Expected function, string, or object as test")});function hrt(e){const n=[];let t=-1;for(;++t":""))+")"})}return m;function m(){let g=Dz,S,k,v;if((!n||a(c,d,_[_.length-1]||void 0))&&(g=vrt(t(c,_)),g[0]===e2))return g;if("children"in c&&c.children){const b=c;if(b.children&&g[0]!==Lz)for(k=(r?b.children.length:-1)+l,v=_.concat(b);k>-1&&k0&&t.push({type:"text",value:` -`}),t}function AS(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function TS(e,n){const t=yrt(e,n),r=t.one(e,void 0),s=frt(t),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:` -`},s),a}function gp(e,n){return e&&"run"in e?async function(t,r){const s=TS(t,{file:r,...n});await e.run(s,r)}:function(t,r){return TS(t,{file:r,...e||n})}}function MS(e){if(e)throw e}var hb,RS;function Ert(){if(RS)return hb;RS=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(d){return typeof Array.isArray=="function"?Array.isArray(d):n.call(d)==="[object Array]"},a=function(d){if(!d||n.call(d)!=="[object Object]")return!1;var _=e.call(d,"constructor"),h=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!_&&!h)return!1;var m;for(m in d);return typeof m>"u"||e.call(d,m)},l=function(d,_){t&&_.name==="__proto__"?t(d,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):d[_.name]=_.newValue},o=function(d,_){if(_==="__proto__")if(e.call(d,_)){if(r)return r(d,_).value}else return;return d[_]};return hb=function c(){var d,_,h,m,g,S,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={});vl.length;let c;o&&l.push(s);try{c=e.apply(this,l)}catch(d){const _=d;if(o&&t)throw _;return s(_)}o||(c&&c.then&&typeof c.then=="function"?c.then(a,s):c instanceof Error?s(c):a(c))}function s(l,...o){t||(t=!0,n(l,...o))}function a(l){s(null,l)}}function Lf(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?DS(e.position):"start"in e||"end"in e?DS(e):"line"in e||"column"in e?r2(e):""}function r2(e){return LS(e&&e.line)+":"+LS(e&&e.column)}function DS(e){return r2(e&&e.start)+"-"+r2(e&&e.end)}function LS(e){return e&&typeof e=="number"?e:1}class vs extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let s="",a={},l=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?s=n:!a.cause&&n&&(l=!0,s=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.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=Lf(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}vs.prototype.file="";vs.prototype.name="";vs.prototype.reason="";vs.prototype.message="";vs.prototype.stack="";vs.prototype.column=void 0;vs.prototype.line=void 0;vs.prototype.ancestors=void 0;vs.prototype.cause=void 0;vs.prototype.fatal=void 0;vs.prototype.place=void 0;vs.prototype.ruleId=void 0;vs.prototype.source=void 0;const Na={basename:Art,dirname:Trt,extname:Mrt,join:Rrt,sep:"/"};function Art(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Th(e);let t=0,r=-1,s=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){t=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,o=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){t=s+1;break}}else l<0&&(a=!0,l=s+1),o>-1&&(e.codePointAt(s)===n.codePointAt(o--)?o<0&&(r=s):(o=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function Trt(e){if(Th(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 Mrt(e){Th(e);let n=e.length,t=-1,r=0,s=-1,a=0,l;for(;n--;){const o=e.codePointAt(n);if(o===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),o===46?s<0?s=n:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||t<0||a===0||a===1&&s===t-1&&s===r+1?"":e.slice(s,t)}function Rrt(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Lrt(e,n){let t="",r=0,s=-1,a=0,l=-1,o,c;for(;++l<=e.length;){if(l2){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=l,a=0;continue}}else if(t.length>0){t="",r=0,s=l,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(s+1,l):t=e.slice(s+1,l),r=l-s-1;s=l,a=0}else o===46&&a>-1?a++:a=-1}return t}function Th(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ort={cwd:Irt};function Irt(){return"/"}function s2(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Brt(e){if(typeof e=="string")e=new URL(e);else if(!s2(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 $rt(e)}function $rt(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[g,...S]=_;const k=r[m][1];n2(k)&&n2(g)&&(g=_b(!0,k,g)),r[m]=[d,g,...S]}}}}const ay=new iy().freeze();function bb(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function vb(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function xb(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 IS(e){if(!n2(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function BS(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function u0(e){return Urt(e)?e:new Oz(e)}function Urt(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function qrt(e){return typeof e=="string"||Grt(e)}function Grt(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var $S=Object.prototype.hasOwnProperty;function HS(e,n,t){for(t of e.keys())if(Of(t,n))return t}function Of(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--&&Of(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=HS(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=HS(n,s),!s)||!Of(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($S.call(e,t)&&++r&&!$S.call(n,t)||!(t in n)||!Of(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}function PS(e){const n=[],t=String(e||"");let r=t.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=t.length,a=!0);const l=t.slice(s,r).trim();(l||!a)&&n.push(l),s=r+1,r=t.indexOf(",",s)}return n}function Vrt(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Wrt=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Krt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yrt={};function FS(e,n){return(Yrt.jsx?Krt:Wrt).test(e)}const Xrt=/[ \t\n\f\r]/g;function Zrt(e){return typeof e=="object"?e.type==="text"?US(e.value):!1:US(e)}function US(e){return e.replace(Xrt,"")===""}class Mh{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Mh.prototype.normal={};Mh.prototype.property={};Mh.prototype.space=void 0;function Iz(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new Mh(t,r,n)}function Kf(e){return e.toLowerCase()}class Qs{constructor(n,t){this.attribute=t,this.property=n}}Qs.prototype.attribute="";Qs.prototype.booleanish=!1;Qs.prototype.boolean=!1;Qs.prototype.commaOrSpaceSeparated=!1;Qs.prototype.commaSeparated=!1;Qs.prototype.defined=!1;Qs.prototype.mustUseProperty=!1;Qs.prototype.number=!1;Qs.prototype.overloadedBoolean=!1;Qs.prototype.property="";Qs.prototype.spaceSeparated=!1;Qs.prototype.space=void 0;let Qrt=0;const Ht=Hc(),Tr=Hc(),i2=Hc(),We=Hc(),Hn=Hc(),Sc=Hc(),di=Hc();function Hc(){return 2**++Qrt}const a2=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ht,booleanish:Tr,commaOrSpaceSeparated:di,commaSeparated:Sc,number:We,overloadedBoolean:i2,spaceSeparated:Hn},Symbol.toStringTag,{value:"Module"})),yb=Object.keys(a2);class oy extends Qs{constructor(n,t,r,s){let a=-1;if(super(n,t),qS(this,"space",s),typeof r=="number")for(;++a4&&t.slice(0,4)==="data"&&rst.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(GS,ist);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!GS.test(a)){let l=a.replace(nst,sst);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}s=oy}return new s(r,n)}function sst(e){return"-"+e.toLowerCase()}function ist(e){return e.charAt(1).toUpperCase()}const Gz=Iz([Bz,Jrt,Pz,Fz,Uz],"html"),nm=Iz([Bz,est,Pz,Fz,Uz],"svg");function VS(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function ast(e){return e.join(" ").trim()}var wu={},wb,WS;function ost(){if(WS)return wb;WS=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,o=/^\s+|\s+$/g,c=` -`,d="/",_="*",h="",m="comment",g="declaration";function S(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var w=1,x=1;function C(W){var Z=W.match(n);Z&&(w+=Z.length);var G=W.lastIndexOf(c);x=~G?W.length-G:x+W.length}function j(){var W={line:w,column:x};return function(Z){return Z.position=new N(W),D(),Z}}function N(W){this.start=W,this.end={line:w,column:x},this.source=b.source}N.prototype.content=v;function T(W){var Z=new Error(b.source+":"+w+":"+x+": "+W);if(Z.reason=W,Z.filename=b.source,Z.line=w,Z.column=x,Z.source=v,!b.silent)throw Z}function z(W){var Z=W.exec(v);if(Z){var G=Z[0];return C(G),v=v.slice(G.length),Z}}function D(){z(t)}function O(W){var Z;for(W=W||[];Z=H();)Z!==!1&&W.push(Z);return W}function H(){var W=j();if(!(d!=v.charAt(0)||_!=v.charAt(1))){for(var Z=2;h!=v.charAt(Z)&&(_!=v.charAt(Z)||d!=v.charAt(Z+1));)++Z;if(Z+=2,h===v.charAt(Z-1))return T("End of comment missing");var G=v.slice(2,Z-2);return x+=2,C(G),v=v.slice(Z),x+=2,W({type:m,comment:G})}}function P(){var W=j(),Z=z(r);if(Z){if(H(),!z(s))return T("property missing ':'");var G=z(a),X=W({type:g,property:k(Z[0].replace(e,h)),value:G?k(G[0].replace(e,h)):h});return z(l),X}}function F(){var W=[];O(W);for(var Z;Z=P();)Z!==!1&&(W.push(Z),O(W));return W}return D(),F()}function k(v){return v?v.replace(o,h):h}return wb=S,wb}var KS;function lst(){if(KS)return wu;KS=1;var e=wu&&wu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wu,"__esModule",{value:!0}),wu.default=t;const n=e(ost());function t(r,s){let a=null;if(!r||typeof r!="string")return a;const l=(0,n.default)(r),o=typeof s=="function";return l.forEach(c=>{if(c.type!=="declaration")return;const{property:d,value:_}=c;o?s(d,_,c):_&&(a=a||{},a[d]=_)}),a}return wu}var mf={},YS;function cst(){if(YS)return mf;YS=1,Object.defineProperty(mf,"__esModule",{value:!0}),mf.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(d){return!d||t.test(d)||e.test(d)},l=function(d,_){return _.toUpperCase()},o=function(d,_){return"".concat(_,"-")},c=function(d,_){return _===void 0&&(_={}),a(d)?d:(d=d.toLowerCase(),_.reactCompat?d=d.replace(s,o):d=d.replace(r,o),d.replace(n,l))};return mf.camelCase=c,mf}var gf,XS;function ust(){if(XS)return gf;XS=1;var e=gf&&gf.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(lst()),t=cst();function r(s,a){var l={};return!s||typeof s!="string"||(0,n.default)(s,function(o,c){o&&c&&(l[(0,t.camelCase)(o,a)]=c)}),l}return r.default=r,gf=r,gf}var dst=ust();const fst=kh(dst),ly={}.hasOwnProperty,hst=new Map,_st=/[A-Z]/g,pst=new Set(["table","tbody","thead","tfoot","tr"]),mst=new Set(["td","th"]),Vz="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Wz(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=kst(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=Sst(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"?nm:Gz,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=Kz(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function Kz(e,n,t){if(n.type==="element")return gst(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return bst(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return xst(e,n,t);if(n.type==="mdxjsEsm")return vst(e,n);if(n.type==="root")return yst(e,n,t);if(n.type==="text")return wst(e,n)}function gst(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=nm,e.schema=s),e.ancestors.push(n);const a=Xz(e,n.tagName,!1),l=Cst(e,n);let o=uy(e,n);return pst.has(n.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!Zrt(c):!0})),Yz(e,l,a,n),cy(l,o),e.ancestors.pop(),e.schema=r,e.create(n,a,l,t)}function bst(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)}Yf(e,n.position)}function vst(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Yf(e,n.position)}function xst(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=nm,e.schema=s),e.ancestors.push(n);const a=n.name===null?e.Fragment:Xz(e,n.name,!0),l=Est(e,n),o=uy(e,n);return Yz(e,l,a,n),cy(l,o),e.ancestors.pop(),e.schema=r,e.create(n,a,l,t)}function yst(e,n,t){const r={};return cy(r,uy(e,n)),e.create(n,e.Fragment,r,t)}function wst(e,n){return n.value}function Yz(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function cy(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Sst(e,n,t){return r;function r(s,a,l,o){const d=Array.isArray(l.children)?t:n;return o?d(a,l,o):d(a,l)}}function kst(e,n){return t;function t(r,s,a,l){const o=Array.isArray(a.children),c=Qx(r);return n(s,a,l,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Cst(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&ly.call(n.properties,s)){const a=Nst(e,s,n.properties[s]);if(a){const[l,o]=a;e.tableCellAlignToStyle&&l==="align"&&typeof o=="string"&&mst.has(n.tagName)?r=o:t[l]=o}}if(r){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Est(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const o=l.properties[0];o.type,Object.assign(t,e.evaluater.evaluateExpression(o.argument))}else Yf(e,n.position);else{const s=r.name;let a;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,a=e.evaluater.evaluateExpression(o.expression)}else Yf(e,n.position);else a=r.value===null?!0:r.value;t[s]=a}return t}function uy(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:hst;for(;++rx.key).filter(x=>x!==void 0));let d=0;for(;d=e.children.length-_&&(N=s.length-(e.children.length-x)),N>=0&&(j=((b=s[N])==null?void 0:b.key)??j);j&&c.has(j)&&((w=s[N])==null?void 0:w.key)!==j;)j=`${j}+`;j&&c.add(j);const T=Zz(C,s[N]??null,t,j);a.push(T),T.react!==void 0&&l.push(T.react)}const h=n!==null&&Lst(e,n.node);if(n&&n.key===r&&h&&s.length===a.length&&a.every((x,C)=>x===s[C]))return n;const m=e.type==="element"&&Mst.has(e.tagName)?l.filter(x=>typeof x!="string"||!Rst.test(x)):l,g=m.length>0?m.length===1?m[0]:m:null;let S=h?n==null?void 0:n.shell:null;if(!S){const x=Wz({...e,children:[]},t);S={props:x.props,type:x.type}}return{children:a,key:r,node:e,react:f.jsx(S.type,{...S.props,children:g},r),shell:S}}function Lst(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:a,position:l,...o}=n;return Of(s,o)}function Hu(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 l=0;ls?0:s+n:n=n>s?s:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);a0?(pi(e,e.length,0,n),e):n}const JS={}.hasOwnProperty;function Jz(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 na(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function tn(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(c){return an(c)?(e.enter(t),o(c)):n(c)}function o(c){return an(c)&&a++l))return;const T=n.events.length;let z=T,D,O;for(;z--;)if(n.events[z][0]==="exit"&&n.events[z][1].type==="chunkFlow"){if(D){O=n.events[z][1].end;break}D=!0}for(b(r),N=T;Nx;){const j=t[C];n.containerState=j[1],j[0].exit.call(n,e)}t.length=x}function w(){s.write([null]),a=void 0,s=void 0,n.containerState._closeFlow=void 0}}function qst(e,n,t){return tn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ed(e){if(e===null||Pn(e)||Ac(e))return 1;if(Jp(e))return 2}function rm(e,n,t){const r=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h={...e[r][1].end},m={...e[t][1].start};t8(h,-c),t8(m,c),l={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:m},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:c>1?"strong":"emphasis",start:{...l.start},end:{...o.end}},e[r][1].end={...l.start},e[t][1].start={...o.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Hi(d,[["enter",e[r][1],n],["exit",e[r][1],n]])),d=Hi(d,[["enter",s,n],["enter",l,n],["exit",l,n],["enter",a,n]]),d=Hi(d,rm(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),d=Hi(d,[["exit",a,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(_=2,d=Hi(d,[["enter",e[t][1],n],["exit",e[t][1],n]])):_=0,pi(e,r-1,t-r+3,d),t=r+d.length-_-2;break}}for(t=-1;++t0&&an(N)?tn(e,w,"linePrefix",a+1)(N):w(N)}function w(N){return N===null||bt(N)?e.check(n8,k,C)(N):(e.enter("codeFlowValue"),x(N))}function x(N){return N===null||bt(N)?(e.exit("codeFlowValue"),w(N)):(e.consume(N),x)}function C(N){return e.exit("codeFenced"),n(N)}function j(N,T,z){let D=0;return O;function O(Z){return N.enter("lineEnding"),N.consume(Z),N.exit("lineEnding"),H}function H(Z){return N.enter("codeFencedFence"),an(Z)?tn(N,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):P(Z)}function P(Z){return Z===o?(N.enter("codeFencedFenceSequence"),F(Z)):z(Z)}function F(Z){return Z===o?(D++,N.consume(Z),F):D>=l?(N.exit("codeFencedFenceSequence"),an(Z)?tn(N,W,"whitespace")(Z):W(Z)):z(Z)}function W(Z){return Z===null||bt(Z)?(N.exit("codeFencedFence"),T(Z)):z(Z)}}}function nit(e,n,t){const r=this;return s;function s(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const Sb={name:"codeIndented",tokenize:sit},rit={partial:!0,tokenize:iit};function sit(e,n,t){const r=this;return s;function s(d){return e.enter("codeIndented"),tn(e,a,"linePrefix",5)(d)}function a(d){const _=r.events[r.events.length-1];return _&&_[1].type==="linePrefix"&&_[2].sliceSerialize(_[1],!0).length>=4?l(d):t(d)}function l(d){return d===null?c(d):bt(d)?e.attempt(rit,l,c)(d):(e.enter("codeFlowValue"),o(d))}function o(d){return d===null||bt(d)?(e.exit("codeFlowValue"),l(d)):(e.consume(d),o)}function c(d){return e.exit("codeIndented"),n(d)}}function iit(e,n,t){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?t(l):bt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):tn(e,a,"linePrefix",5)(l)}function a(l){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?n(l):bt(l)?s(l):t(l)}}const ait={name:"codeText",previous:lit,resolve:oit,tokenize:cit};function oit(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 a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&bf(this.left,r),a.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),bf(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),bf(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(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function ij(e,n,t,r,s,a,l,o,c){const d=c||Number.POSITIVE_INFINITY;let _=0;return h;function h(b){return b===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(b),e.exit(a),m):b===null||b===32||b===41||_p(b)?t(b):(e.enter(r),e.enter(l),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(b))}function m(b){return b===62?(e.enter(a),e.consume(b),e.exit(a),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===62?(e.exit("chunkString"),e.exit(o),m(b)):b===null||b===60||bt(b)?t(b):(e.consume(b),b===92?S:g)}function S(b){return b===60||b===62||b===92?(e.consume(b),g):g(b)}function k(b){return!_&&(b===null||b===41||Pn(b))?(e.exit("chunkString"),e.exit(o),e.exit(l),e.exit(r),n(b)):_999||g===null||g===91||g===93&&!c||g===94&&!o&&"_hiddenFootnoteSupport"in l.parser.constructs?t(g):g===93?(e.exit(a),e.enter(s),e.consume(g),e.exit(s),e.exit(r),n):bt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),_):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||bt(g)||o++>999?(e.exit("chunkString"),_(g)):(e.consume(g),c||(c=!an(g)),g===92?m:h)}function m(g){return g===91||g===92||g===93?(e.consume(g),o++,h):h(g)}}function oj(e,n,t,r,s,a){let l;return o;function o(m){return m===34||m===39||m===40?(e.enter(r),e.enter(s),e.consume(m),e.exit(s),l=m===40?41:m,c):t(m)}function c(m){return m===l?(e.enter(s),e.consume(m),e.exit(s),e.exit(r),n):(e.enter(a),d(m))}function d(m){return m===l?(e.exit(a),c(l)):m===null?t(m):bt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),tn(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===l||m===null||bt(m)?(e.exit("chunkString"),d(m)):(e.consume(m),m===92?h:_)}function h(m){return m===l||m===92?(e.consume(m),_):_(m)}}function If(e,n){let t;return r;function r(s){return bt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):an(s)?tn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const git={name:"definition",tokenize:vit},bit={partial:!0,tokenize:xit};function vit(e,n,t){const r=this;let s;return a;function a(g){return e.enter("definition"),l(g)}function l(g){return aj.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function o(g){return s=na(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):t(g)}function c(g){return Pn(g)?If(e,d)(g):d(g)}function d(g){return ij(e,_,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function _(g){return e.attempt(bit,h,h)(g)}function h(g){return an(g)?tn(e,m,"whitespace")(g):m(g)}function m(g){return g===null||bt(g)?(e.exit("definition"),r.parser.defined.push(s),n(g)):t(g)}}function xit(e,n,t){return r;function r(o){return Pn(o)?If(e,s)(o):t(o)}function s(o){return oj(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return an(o)?tn(e,l,"whitespace")(o):l(o)}function l(o){return o===null||bt(o)?n(o):t(o)}}const yit={name:"hardBreakEscape",tokenize:wit};function wit(e,n,t){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return bt(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const Sit={name:"headingAtx",resolve:kit,tokenize:Cit};function kit(e,n){let t=e.length-2,r=3,s,a;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},a={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},pi(e,r,t-r+1,[["enter",s,n],["enter",a,n],["exit",a,n],["exit",s,n]])),e}function Cit(e,n,t){let r=0;return s;function s(_){return e.enter("atxHeading"),a(_)}function a(_){return e.enter("atxHeadingSequence"),l(_)}function l(_){return _===35&&r++<6?(e.consume(_),l):_===null||Pn(_)?(e.exit("atxHeadingSequence"),o(_)):t(_)}function o(_){return _===35?(e.enter("atxHeadingSequence"),c(_)):_===null||bt(_)?(e.exit("atxHeading"),n(_)):an(_)?tn(e,o,"whitespace")(_):(e.enter("atxHeadingText"),d(_))}function c(_){return _===35?(e.consume(_),c):(e.exit("atxHeadingSequence"),o(_))}function d(_){return _===null||_===35||Pn(_)?(e.exit("atxHeadingText"),o(_)):(e.consume(_),d)}}const Eit=["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"],s8=["pre","script","style","textarea"],Nit={concrete:!0,name:"htmlFlow",resolveTo:Ait,tokenize:Tit},zit={partial:!0,tokenize:Rit},jit={partial:!0,tokenize:Mit};function Ait(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 Tit(e,n,t){const r=this;let s,a,l,o,c;return d;function d(V){return _(V)}function _(V){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(V),h}function h(V){return V===33?(e.consume(V),m):V===47?(e.consume(V),a=!0,k):V===63?(e.consume(V),s=3,r.interrupt?n:L):Rs(V)?(e.consume(V),l=String.fromCharCode(V),v):t(V)}function m(V){return V===45?(e.consume(V),s=2,g):V===91?(e.consume(V),s=5,o=0,S):Rs(V)?(e.consume(V),s=4,r.interrupt?n:L):t(V)}function g(V){return V===45?(e.consume(V),r.interrupt?n:L):t(V)}function S(V){const se="CDATA[";return V===se.charCodeAt(o++)?(e.consume(V),o===se.length?r.interrupt?n:P:S):t(V)}function k(V){return Rs(V)?(e.consume(V),l=String.fromCharCode(V),v):t(V)}function v(V){if(V===null||V===47||V===62||Pn(V)){const se=V===47,le=l.toLowerCase();return!se&&!a&&s8.includes(le)?(s=1,r.interrupt?n(V):P(V)):Eit.includes(l.toLowerCase())?(s=6,se?(e.consume(V),b):r.interrupt?n(V):P(V)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(V):a?w(V):x(V))}return V===45||gs(V)?(e.consume(V),l+=String.fromCharCode(V),v):t(V)}function b(V){return V===62?(e.consume(V),r.interrupt?n:P):t(V)}function w(V){return an(V)?(e.consume(V),w):O(V)}function x(V){return V===47?(e.consume(V),O):V===58||V===95||Rs(V)?(e.consume(V),C):an(V)?(e.consume(V),x):O(V)}function C(V){return V===45||V===46||V===58||V===95||gs(V)?(e.consume(V),C):j(V)}function j(V){return V===61?(e.consume(V),N):an(V)?(e.consume(V),j):x(V)}function N(V){return V===null||V===60||V===61||V===62||V===96?t(V):V===34||V===39?(e.consume(V),c=V,T):an(V)?(e.consume(V),N):z(V)}function T(V){return V===c?(e.consume(V),c=null,D):V===null||bt(V)?t(V):(e.consume(V),T)}function z(V){return V===null||V===34||V===39||V===47||V===60||V===61||V===62||V===96||Pn(V)?j(V):(e.consume(V),z)}function D(V){return V===47||V===62||an(V)?x(V):t(V)}function O(V){return V===62?(e.consume(V),H):t(V)}function H(V){return V===null||bt(V)?P(V):an(V)?(e.consume(V),H):t(V)}function P(V){return V===45&&s===2?(e.consume(V),G):V===60&&s===1?(e.consume(V),X):V===62&&s===4?(e.consume(V),B):V===63&&s===3?(e.consume(V),L):V===93&&s===5?(e.consume(V),$):bt(V)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(zit,Y,F)(V)):V===null||bt(V)?(e.exit("htmlFlowData"),F(V)):(e.consume(V),P)}function F(V){return e.check(jit,W,Y)(V)}function W(V){return e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),Z}function Z(V){return V===null||bt(V)?F(V):(e.enter("htmlFlowData"),P(V))}function G(V){return V===45?(e.consume(V),L):P(V)}function X(V){return V===47?(e.consume(V),l="",J):P(V)}function J(V){if(V===62){const se=l.toLowerCase();return s8.includes(se)?(e.consume(V),B):P(V)}return Rs(V)&&l.length<8?(e.consume(V),l+=String.fromCharCode(V),J):P(V)}function $(V){return V===93?(e.consume(V),L):P(V)}function L(V){return V===62?(e.consume(V),B):V===45&&s===2?(e.consume(V),L):P(V)}function B(V){return V===null||bt(V)?(e.exit("htmlFlowData"),Y(V)):(e.consume(V),B)}function Y(V){return e.exit("htmlFlow"),n(V)}}function Mit(e,n,t){const r=this;return s;function s(l){return bt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):t(l)}function a(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function Rit(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Rh,n,t)}}const Dit={name:"htmlText",tokenize:Lit};function Lit(e,n,t){const r=this;let s,a,l;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),d):L===47?(e.consume(L),j):L===63?(e.consume(L),x):Rs(L)?(e.consume(L),z):t(L)}function d(L){return L===45?(e.consume(L),_):L===91?(e.consume(L),a=0,S):Rs(L)?(e.consume(L),w):t(L)}function _(L){return L===45?(e.consume(L),g):t(L)}function h(L){return L===null?t(L):L===45?(e.consume(L),m):bt(L)?(l=h,X(L)):(e.consume(L),h)}function m(L){return L===45?(e.consume(L),g):h(L)}function g(L){return L===62?G(L):L===45?m(L):h(L)}function S(L){const B="CDATA[";return L===B.charCodeAt(a++)?(e.consume(L),a===B.length?k:S):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),v):bt(L)?(l=k,X(L)):(e.consume(L),k)}function v(L){return L===93?(e.consume(L),b):k(L)}function b(L){return L===62?G(L):L===93?(e.consume(L),b):k(L)}function w(L){return L===null||L===62?G(L):bt(L)?(l=w,X(L)):(e.consume(L),w)}function x(L){return L===null?t(L):L===63?(e.consume(L),C):bt(L)?(l=x,X(L)):(e.consume(L),x)}function C(L){return L===62?G(L):x(L)}function j(L){return Rs(L)?(e.consume(L),N):t(L)}function N(L){return L===45||gs(L)?(e.consume(L),N):T(L)}function T(L){return bt(L)?(l=T,X(L)):an(L)?(e.consume(L),T):G(L)}function z(L){return L===45||gs(L)?(e.consume(L),z):L===47||L===62||Pn(L)?D(L):t(L)}function D(L){return L===47?(e.consume(L),G):L===58||L===95||Rs(L)?(e.consume(L),O):bt(L)?(l=D,X(L)):an(L)?(e.consume(L),D):G(L)}function O(L){return L===45||L===46||L===58||L===95||gs(L)?(e.consume(L),O):H(L)}function H(L){return L===61?(e.consume(L),P):bt(L)?(l=H,X(L)):an(L)?(e.consume(L),H):D(L)}function P(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,F):bt(L)?(l=P,X(L)):an(L)?(e.consume(L),P):(e.consume(L),W)}function F(L){return L===s?(e.consume(L),s=void 0,Z):L===null?t(L):bt(L)?(l=F,X(L)):(e.consume(L),F)}function W(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||Pn(L)?D(L):(e.consume(L),W)}function Z(L){return L===47||L===62||Pn(L)?D(L):t(L)}function G(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),n):t(L)}function X(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),J}function J(L){return an(L)?tn(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):$(L)}function $(L){return e.enter("htmlTextData"),l(L)}}const fy={name:"labelEnd",resolveAll:$it,resolveTo:Hit,tokenize:Pit},Oit={tokenize:Fit},Iit={tokenize:Uit},Bit={tokenize:qit};function $it(e){let n=-1;const t=[];for(;++n=3&&(d===null||bt(d))?(e.exit("thematicBreak"),n(d)):t(d)}function c(d){return d===s?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),an(d)?tn(e,o,"whitespace")(d):o(d))}}const Ws={continuation:{tokenize:eat},exit:nat,name:"list",tokenize:Jit},Zit={partial:!0,tokenize:rat},Qit={partial:!0,tokenize:tat};function Jit(e,n,t){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,l=0;return o;function o(g){const S=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:Jv(g)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(F0,t,d)(g):d(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return t(g)}function c(g){return Jv(g)&&++l<10?(e.consume(g),c):(!r.interrupt||l<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),d(g)):t(g)}function d(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Rh,r.interrupt?t:_,e.attempt(Zit,m,h))}function _(g){return r.containerState.initialBlankLine=!0,a++,m(g)}function h(g){return an(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):t(g)}function m(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(g)}}function eat(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Rh,s,a);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,tn(e,n,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!an(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Qit,n,l)(o))}function l(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,tn(e,e.attempt(Ws,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function tat(e,n,t){const r=this;return tn(e,s,"listItemIndent",r.containerState.size+1);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(a):t(a)}}function nat(e){e.exit(this.containerState.type)}function rat(e,n,t){const r=this;return tn(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const l=r.events[r.events.length-1];return!an(a)&&l&&l[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const i8={name:"setextUnderline",resolveTo:sat,tokenize:iat};function sat(e,n){let t=e.length,r,s,a;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),!a&&e[t][1].type==="definition"&&(a=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",l,n]),e.splice(a+1,0,["exit",e[r][1],n]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function iat(e,n,t){const r=this;let s;return a;function a(d){let _=r.events.length,h;for(;_--;)if(r.events[_][1].type!=="lineEnding"&&r.events[_][1].type!=="linePrefix"&&r.events[_][1].type!=="content"){h=r.events[_][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),s=d,l(d)):t(d)}function l(d){return e.enter("setextHeadingLineSequence"),o(d)}function o(d){return d===s?(e.consume(d),o):(e.exit("setextHeadingLineSequence"),an(d)?tn(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||bt(d)?(e.exit("setextHeadingLine"),n(d)):t(d)}}const aat={tokenize:oat};function oat(e){const n=this,t=e.attempt(Rh,r,e.attempt(this.parser.constructs.flowInitial,s,tn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(fit,s)),"linePrefix")));return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const lat={resolveAll:cj()},cat=lj("string"),uat=lj("text");function lj(e){return{resolveAll:cj(e==="text"?dat:void 0),tokenize:n};function n(t){const r=this,s=this.parser.constructs[e],a=t.attempt(s,l,o);return l;function l(_){return d(_)?a(_):o(_)}function o(_){if(_===null){t.consume(_);return}return t.enter("data"),t.consume(_),c}function c(_){return d(_)?(t.exit("data"),a(_)):(t.consume(_),c)}function d(_){if(_===null)return!0;const h=s[_];let m=-1;if(h)for(;++m-1){const o=l[0];typeof o=="string"?l[0]=o.slice(r):l.shift()}a>0&&l.push(e[s].slice(0,a))}return l}function kat(e,n){let t=-1;const r=[];let s;for(;++t0){const St=Xe.tokenStack[Xe.tokenStack.length-1];(St[1]||o8).call(Xe,void 0,St[0])}for(Re.position={start:pl(ke.length>0?ke[0][1].start:{line:1,column:1,offset:0}),end:pl(ke.length>0?ke[ke.length-2][1].end:{line:1,column:1,offset:0})},st=-1;++st0&&(as(this,wl,Zn(this,wl)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=l8(t)),Zn(this,wl)+Vat(t,r)}}wl=new WeakMap;const Lat=new Set(["*","**","_","__"]);function l8(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(Gat(n)){c8(n,t,r);continue}const a=Hat(n,e,t);if(a>t){t=a-1;continue}const l=Pat(n,e,t);if(l>t){t=l-1;continue}ra(e,t)||c8(n,t,r)}return n}function Oat(e,n,t){const r=n[t];return r==="`"?Iat(e,n,t):r==="$"?Bat(e,n,t):r==="~"?$at(e,n,t):t}function Iat(e,n,t){const r=_y(n,t),s="`".repeat(r),a=e.exclusive;return(a==null?void 0:a.kind)==="fence"?(a.token[0]==="`"&&bp(n,t)&&!ra(n,t)&&r>=a.token.length&&(e.exclusive=null),t+r):(a==null?void 0:a.kind)==="code"?(!ra(n,t)&&r>=a.token.length&&(e.exclusive=null),t+r):a||ra(n,t)?t+r:r>=3&&bp(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function Bat(e,n,t){const r=_y(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!ra(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||ra(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function $at(e,n,t){const r=_y(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(bp(n,t)&&!ra(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!bp(n,t)||ra(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function Hat(e,n,t){if(n[t]!=="<"||ra(n,t))return t;const r=n[t+1];if(r!==void 0&&!_j(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` -`)return e.pendingHtml=null,s+1;return n.length}function Pat(e,n,t){const r=Fat(n,t);if(!r)return t;if(ra(n,t))return t+r.length;const s=e.delims.findLastIndex(a=>a.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):(Uat(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function Fat(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 Uat(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!f8(s)||!f8(r)}function c8(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 qat(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 Gat(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function Vat(e,n){n.pendingHtml!==null&&(e=e.slice(0,Yat(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return Ca(Wat(e,t));const r=Kat(n);if(r)return Ca(Ou(e,r));const s=Qat(n);return s?s.kind==="delim"?Ca(l2(e,s.start,s.token.length)?fj(e,s.token):e.slice(0,s.start)):l2(e,s.start,s.token.length)?s.kind==="fence"?Ca(e):s.kind==="code"?Ca(Ou(e,s.token)):s.token==="$$"?Ca(Ou(e,(e.endsWith(` -`)?"":` -`)+"$$")):/\s/.test(e[e.length-1]??"")?Ca(e):Ca(Ou(e,"$")):Ca(s.kind==="fence"?e:e.slice(0,s.start)):Ca(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function Wat(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return l2(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 Kat(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(!Lat.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function Yat(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!Xat(e,s,r))break;t=s,r=s}return t}function Xat(e,n,t){if(e[t-1]!==">"||ra(e,n))return!1;const r=e[n+1];if(r!==void 0&&!_j(r))return!1;for(let s=n+1;s"||a===` -`)return!1}return!0}function Ca(e){var v;const n=e.lastIndexOf(` - -`),t=n===-1?0:n+2,r=e.slice(0,t),s=e.slice(t),a=s.indexOf(` -`),l=a===-1?s:s.slice(0,a),o=(v=l.match(/^( *)\|/))==null?void 0:v[1];if(o===void 0)return e;if(u8(l)<2&&!Jat(l,o))return r;const c=l.trimEnd().endsWith("|")?l:fj(l," |"),d=u8(c),_=d<2?0:c.trimEnd().endsWith("|")?d-1:d;if(_===0)return e;const h=a===-1?"":s.slice(a+1),m=d8(o,Array.from({length:_},()=>"-"));if(h.length===0)return r+c+` -`+m;const g=h.indexOf(` -`),S=g===-1?h:h.slice(0,g),k=g===-1?"":h.slice(g);if(eot(S,o,_))return e;if(S.startsWith(o+"|")&&/^[ |:\-\t]*$/.test(S.slice(o.length))){const b=hj(S,o).map(w=>{const x=w.trim();if(x.length===0)return"-";let C=0;for(let j=0;j1&&x.endsWith(":")?":":"")});for(;b.length<_;)b.push("-");return r+c+` -`+d8(o,b)+k}return r+c+` -`+m+` -`+h}function Ou(e,n){return e+n.slice(Zat(e,n))}function fj(e,n){var s;const t=(s=e.match(/[^\S\n]+$/))==null?void 0:s[0];if(!t)return Ou(e,n);const r=e.slice(0,-t.length);return Ou(r,n)+t}function Zat(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 Qat(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 u8(e){let n=0;for(let t=0;t0}function d8(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function hj(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function eot(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=hj(r,"").map(a=>a.trim());return s.length===t&&s.every(a=>/^:?-+:?$/.test(a))}function _y(e,n){let t=n+1;for(;tn+t}function bp(e,n){return n===0||e[n-1]===` -`}function ra(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function f8(e){return!!e&&/[A-Za-z0-9]/.test(e)}function _j(e){return!!e&&/[A-Za-z]/.test(e)}const pj=ay().use(hy);var vh,Wu,Ku,xc,Yu,xh,yh,wh,yc,Sh,wc;class tot{constructor(){ui(this,vh,pj);ui(this,Wu,null);ui(this,Ku,{});ui(this,xc,null);ui(this,Yu,"");ui(this,xh,[]);ui(this,yh,[]);ui(this,wh,[]);ui(this,yc,0);ui(this,Sh,[]);ui(this,wc,[])}reconfigure(n,t,r){Zn(this,Wu)!==null&&Zn(this,vh)===n&&mj(Zn(this,Ku),r)&&!!Zn(this,xc)===t||(as(this,vh,n),n.attachers.some(s=>s[0]===gp)||(n=n(),n.use(gp),n.freeze()),as(this,Wu,n),as(this,Ku,r),as(this,Yu,""),as(this,xh,[]),as(this,yh,[]),as(this,wh,[]),as(this,yc,0),as(this,Sh,[]),as(this,xc,t?new Dat:null))}update(n){Zn(this,xc)&&(n=Zn(this,xc).update(n));let t=Zn(this,Yu);if(n===t)return Zn(this,wc);const r=Zn(this,xh),s=not(n,t);let a=r.length-1;for(;a>=0&&!(s>=r[a]);a-=1);let l=r[a]??0;a===-1&&(a=0);const o=cc(Zn(this,Wu)),c=Zn(this,yh),d=c.slice(a).some(N=>N.some(c2));let _=o.parse(n.slice(l)),h=_.children.map(N=>cc(cc(N.position).start.offset)+l);as(this,Yu,n),fb(r.length===c.length),r.splice(a,r.length-a,...h);{const N=Cb(_,h,l);fb(N.length===h.length),c.splice(a,c.length-a,...N)}if(d||c2(_)){a=0,l=0,_=o.parse(n),h=_.children.map(T=>cc(cc(T.position).start.offset)+l),r.splice(0,r.length,...h);const N=Cb(_,h,l);fb(N.length===h.length),c.splice(0,c.length,...N)}const m=Cb(o.runSync(_),h,l),g=Zn(this,wh),S=Zn(this,Sh),k=Zn(this,wc),v=S.length;let b=null,w=0;for(;wv&&(g.length=S.length=r.length);for(let N=r.length=C?D=v-(r.length-T):T=v){g[T]=String(Zn(this,yc)),as(this,yc,Zn(this,yc)+1),S[T]=null,b&&(b[T]=void 0);continue}g[T]=g[D]??String(h6(this,yc)._++),S[T]=S[D]??null,b&&(b[T]=k[D])}r.length[]);let s=0;for(const l of e.children){const o=(a=l.position)==null?void 0:a.start.offset;if(o!==void 0){for(;s+1s||t!==-1&&n>t||r!==-1&&n>r||cot.test(e.slice(0,n))?e:""}const m8=/[#.]/g;function pot(e,n){const t=e||"",r={};let s=0,a,l;for(;sd&&(d=_):_&&(d!==void 0&&d>-1&&c.push(` -`.repeat(d)||" "),d=-1,c.push(_))}return c.join("")}function Sj(e,n,t){return e.type==="element"?Iot(e,n,t):e.type==="text"?t.whitespace==="normal"?kj(e,t):Bot(e):[]}function Iot(e,n,t){const r=Cj(e,t),s=e.children||[];let a=-1,l=[];if(Lot(e))return l;let o,c;for(d2(e)||S8(e)&&v8(n,e,S8)?c=` -`:Dot(e)?(o=2,c=2):wj(e)&&(o=1,c=1);++a15?d="…"+o.slice(s-15,s):d=o.slice(0,s);var _;a+15e.replace(Uot,"-$1").toLowerCase(),Got={"&":"&",">":">","<":"<",'"':""","'":"'"},Vot=/[&><"']/g,bs=e=>String(e).replace(Vot,n=>Got[n]),U0=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?U0(e.body[0]):e:e.type==="font"?U0(e.body):e,Wot=new Set(["mathord","textord","atom"]),jo=e=>Wot.has(U0(e).type),Kot=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"},f2={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 Yot(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 Xot(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return Yot(n)}function Zot(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:Xot(r)}class my{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(f2)){var r=f2[t];r&&Zot(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 Ke("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=Kot(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class ml{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 ja[Qot[this.id]]}sub(){return ja[Jot[this.id]]}fracNum(){return ja[elt[this.id]]}fracDen(){return ja[tlt[this.id]]}cramp(){return ja[nlt[this.id]]}text(){return ja[rlt[this.id]]}isTight(){return this.size>=2}}var gy=0,vp=1,Pu=2,So=3,Zf=4,Pi=5,td=6,Ds=7,ja=[new ml(gy,0,!1),new ml(vp,0,!0),new ml(Pu,1,!1),new ml(So,1,!0),new ml(Zf,2,!1),new ml(Pi,2,!0),new ml(td,3,!1),new ml(Ds,3,!0)],Qot=[Zf,Pi,Zf,Pi,td,Ds,td,Ds],Jot=[Pi,Pi,Pi,Pi,Ds,Ds,Ds,Ds],elt=[Pu,So,Zf,Pi,td,Ds,td,Ds],tlt=[So,So,Pi,Pi,Ds,Ds,Ds,Ds],nlt=[vp,vp,So,So,Pi,Pi,Ds,Ds],rlt=[gy,vp,Pu,So,Pu,So,Pu,So],Pt={DISPLAY:ja[gy],TEXT:ja[Pu],SCRIPT:ja[Zf],SCRIPTSCRIPT:ja[td]},h2=[{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 slt(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var q0=[];h2.forEach(e=>e.blocks.forEach(n=>q0.push(...n)));function Ej(e){for(var n=0;n=q0[n]&&e<=q0[n+1])return!0;return!1}var Fr=e=>e+" "+e,Su=80,ilt=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"},alt=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"},olt=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"},llt=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"},clt=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"},ult=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},dlt=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"},flt=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=ilt(t,Su);break;case"sqrtSize1":s=alt(t,Su);break;case"sqrtSize2":s=olt(t,Su);break;case"sqrtSize3":s=llt(t,Su);break;case"sqrtSize4":s=clt(t,Su);break;case"sqrtTall":s=dlt(t,Su,r)}return s},hlt=function(n,t){switch(n){case"⎜":return Fr("M291 0 H417 V"+t+" H291z");case"∣":return Fr("M145 0 H188 V"+t+" H145z");case"∥":return Fr("M145 0 H188 V"+t+" H145z")+Fr("M367 0 H410 V"+t+" H367z");case"⎟":return Fr("M457 0 H583 V"+t+" H457z");case"⎢":return Fr("M319 0 H403 V"+t+" H319z");case"⎥":return Fr("M263 0 H347 V"+t+" H263z");case"⎪":return Fr("M384 0 H504 V"+t+" H384z");case"⏐":return Fr("M312 0 H355 V"+t+" H312z");case"‖":return Fr("M257 0 H300 V"+t+" H257z")+Fr("M478 0 H521 V"+t+" H478z");default:return""}},k8={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:Fr("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Fr("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Fr("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Fr("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:Fr("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:Fr("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Fr("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Fr("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`},_lt=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 plt(e){return"toText"in e}class gd{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(plt(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var _2={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},mlt={ex:!0,em:!0,mu:!0},Nj=function(n){return typeof n!="string"&&(n=n.unit),n in _2||n in mlt||n==="ex"},or=function(n,t){var r;if(n.unit in _2)r=_2[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 Ke("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},Qe=function(n){return+n.toFixed(4)+"em"},Cl=function(n){return n.filter(t=>t).join(" ")},by=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=qot(r)+":"+s+";")}return t},zj=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)}},jj=function(n){var t=document.createElement(n);t.className=Cl(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]/,Aj=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+bs(Cl(this.classes))+'"');var r=by(this.style);r&&(t+=' style="'+bs(r)+'"');for(var s of Object.keys(this.attributes)){if(glt.test(s))throw new Ke("Invalid attribute name '"+s+"'");t+=" "+s+'="'+bs(this.attributes[s])+'"'}t+=">";for(var a=0;a",t};class bd{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,zj.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return jj.call(this,"span")}toMarkup(){return Aj.call(this,"span")}}class sm{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,zj.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 jj.call(this,"a")}toMarkup(){return Aj.call(this,"a")}}class blt{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=''+bs(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=Qe(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=Cl(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:"+Qe(this.italic)+";"),r+=by(this.style),r&&(n=!0,t+=' style="'+bs(r)+'"');var s=bs(this.text);return n?(t+=">",t+=s,t+="",t):s}}class Eo{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 p2{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 wlt=e=>e instanceof bd||e instanceof sm||e instanceof gd,Ma={"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]}},d0={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]},C8={Å:"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 Slt(e,n){Ma[e]=n}function vy(e,n,t){if(!Ma[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=Ma[n][r];if(!s&&e[0]in C8&&(r=C8[e[0]].charCodeAt(0),s=Ma[n][r]),!s&&t==="text"&&Ej(r)&&(s=Ma[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var zb={};function klt(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!zb[n]){var t=zb[n]={cssEmPerMu:d0.quad[n]/18};for(var r in d0)d0.hasOwnProperty(r)&&(t[r]=d0[r][n])}return zb[n]}var Qn={math:{},text:{}};function I(e,n,t,r,s,a){Qn[e][s]={font:n,group:t,replace:r},a&&r&&(Qn[e][r]=Qn[e][s])}var U="math",Be="text",Q="main",de="ams",er="accent-token",lt="bin",Ls="close",vd="inner",Et="mathord",Lr="op-token",yi="open",Dh="punct",fe="rel",Ao="spacing",ge="textord";I(U,Q,fe,"≡","\\equiv",!0);I(U,Q,fe,"≺","\\prec",!0);I(U,Q,fe,"≻","\\succ",!0);I(U,Q,fe,"∼","\\sim",!0);I(U,Q,fe,"⊥","\\perp");I(U,Q,fe,"⪯","\\preceq",!0);I(U,Q,fe,"⪰","\\succeq",!0);I(U,Q,fe,"≃","\\simeq",!0);I(U,Q,fe,"∣","\\mid",!0);I(U,Q,fe,"≪","\\ll",!0);I(U,Q,fe,"≫","\\gg",!0);I(U,Q,fe,"≍","\\asymp",!0);I(U,Q,fe,"∥","\\parallel");I(U,Q,fe,"⋈","\\bowtie",!0);I(U,Q,fe,"⌣","\\smile",!0);I(U,Q,fe,"⊑","\\sqsubseteq",!0);I(U,Q,fe,"⊒","\\sqsupseteq",!0);I(U,Q,fe,"≐","\\doteq",!0);I(U,Q,fe,"⌢","\\frown",!0);I(U,Q,fe,"∋","\\ni",!0);I(U,Q,fe,"∝","\\propto",!0);I(U,Q,fe,"⊢","\\vdash",!0);I(U,Q,fe,"⊣","\\dashv",!0);I(U,Q,fe,"∋","\\owns");I(U,Q,Dh,".","\\ldotp");I(U,Q,Dh,"⋅","\\cdotp");I(U,Q,Dh,"⋅","·");I(Be,Q,ge,"⋅","·");I(U,Q,ge,"#","\\#");I(Be,Q,ge,"#","\\#");I(U,Q,ge,"&","\\&");I(Be,Q,ge,"&","\\&");I(U,Q,ge,"ℵ","\\aleph",!0);I(U,Q,ge,"∀","\\forall",!0);I(U,Q,ge,"ℏ","\\hbar",!0);I(U,Q,ge,"∃","\\exists",!0);I(U,Q,ge,"∇","\\nabla",!0);I(U,Q,ge,"♭","\\flat",!0);I(U,Q,ge,"ℓ","\\ell",!0);I(U,Q,ge,"♮","\\natural",!0);I(U,Q,ge,"♣","\\clubsuit",!0);I(U,Q,ge,"℘","\\wp",!0);I(U,Q,ge,"♯","\\sharp",!0);I(U,Q,ge,"♢","\\diamondsuit",!0);I(U,Q,ge,"ℜ","\\Re",!0);I(U,Q,ge,"♡","\\heartsuit",!0);I(U,Q,ge,"ℑ","\\Im",!0);I(U,Q,ge,"♠","\\spadesuit",!0);I(U,Q,ge,"§","\\S",!0);I(Be,Q,ge,"§","\\S");I(U,Q,ge,"¶","\\P",!0);I(Be,Q,ge,"¶","\\P");I(U,Q,ge,"†","\\dag");I(Be,Q,ge,"†","\\dag");I(Be,Q,ge,"†","\\textdagger");I(U,Q,ge,"‡","\\ddag");I(Be,Q,ge,"‡","\\ddag");I(Be,Q,ge,"‡","\\textdaggerdbl");I(U,Q,Ls,"⎱","\\rmoustache",!0);I(U,Q,yi,"⎰","\\lmoustache",!0);I(U,Q,Ls,"⟯","\\rgroup",!0);I(U,Q,yi,"⟮","\\lgroup",!0);I(U,Q,lt,"∓","\\mp",!0);I(U,Q,lt,"⊖","\\ominus",!0);I(U,Q,lt,"⊎","\\uplus",!0);I(U,Q,lt,"⊓","\\sqcap",!0);I(U,Q,lt,"∗","\\ast");I(U,Q,lt,"⊔","\\sqcup",!0);I(U,Q,lt,"◯","\\bigcirc",!0);I(U,Q,lt,"∙","\\bullet",!0);I(U,Q,lt,"‡","\\ddagger");I(U,Q,lt,"≀","\\wr",!0);I(U,Q,lt,"⨿","\\amalg");I(U,Q,lt,"&","\\And");I(U,Q,fe,"⟵","\\longleftarrow",!0);I(U,Q,fe,"⇐","\\Leftarrow",!0);I(U,Q,fe,"⟸","\\Longleftarrow",!0);I(U,Q,fe,"⟶","\\longrightarrow",!0);I(U,Q,fe,"⇒","\\Rightarrow",!0);I(U,Q,fe,"⟹","\\Longrightarrow",!0);I(U,Q,fe,"↔","\\leftrightarrow",!0);I(U,Q,fe,"⟷","\\longleftrightarrow",!0);I(U,Q,fe,"⇔","\\Leftrightarrow",!0);I(U,Q,fe,"⟺","\\Longleftrightarrow",!0);I(U,Q,fe,"↦","\\mapsto",!0);I(U,Q,fe,"⟼","\\longmapsto",!0);I(U,Q,fe,"↗","\\nearrow",!0);I(U,Q,fe,"↩","\\hookleftarrow",!0);I(U,Q,fe,"↪","\\hookrightarrow",!0);I(U,Q,fe,"↘","\\searrow",!0);I(U,Q,fe,"↼","\\leftharpoonup",!0);I(U,Q,fe,"⇀","\\rightharpoonup",!0);I(U,Q,fe,"↙","\\swarrow",!0);I(U,Q,fe,"↽","\\leftharpoondown",!0);I(U,Q,fe,"⇁","\\rightharpoondown",!0);I(U,Q,fe,"↖","\\nwarrow",!0);I(U,Q,fe,"⇌","\\rightleftharpoons",!0);I(U,de,fe,"≮","\\nless",!0);I(U,de,fe,"","\\@nleqslant");I(U,de,fe,"","\\@nleqq");I(U,de,fe,"⪇","\\lneq",!0);I(U,de,fe,"≨","\\lneqq",!0);I(U,de,fe,"","\\@lvertneqq");I(U,de,fe,"⋦","\\lnsim",!0);I(U,de,fe,"⪉","\\lnapprox",!0);I(U,de,fe,"⊀","\\nprec",!0);I(U,de,fe,"⋠","\\npreceq",!0);I(U,de,fe,"⋨","\\precnsim",!0);I(U,de,fe,"⪹","\\precnapprox",!0);I(U,de,fe,"≁","\\nsim",!0);I(U,de,fe,"","\\@nshortmid");I(U,de,fe,"∤","\\nmid",!0);I(U,de,fe,"⊬","\\nvdash",!0);I(U,de,fe,"⊭","\\nvDash",!0);I(U,de,fe,"⋪","\\ntriangleleft");I(U,de,fe,"⋬","\\ntrianglelefteq",!0);I(U,de,fe,"⊊","\\subsetneq",!0);I(U,de,fe,"","\\@varsubsetneq");I(U,de,fe,"⫋","\\subsetneqq",!0);I(U,de,fe,"","\\@varsubsetneqq");I(U,de,fe,"≯","\\ngtr",!0);I(U,de,fe,"","\\@ngeqslant");I(U,de,fe,"","\\@ngeqq");I(U,de,fe,"⪈","\\gneq",!0);I(U,de,fe,"≩","\\gneqq",!0);I(U,de,fe,"","\\@gvertneqq");I(U,de,fe,"⋧","\\gnsim",!0);I(U,de,fe,"⪊","\\gnapprox",!0);I(U,de,fe,"⊁","\\nsucc",!0);I(U,de,fe,"⋡","\\nsucceq",!0);I(U,de,fe,"⋩","\\succnsim",!0);I(U,de,fe,"⪺","\\succnapprox",!0);I(U,de,fe,"≆","\\ncong",!0);I(U,de,fe,"","\\@nshortparallel");I(U,de,fe,"∦","\\nparallel",!0);I(U,de,fe,"⊯","\\nVDash",!0);I(U,de,fe,"⋫","\\ntriangleright");I(U,de,fe,"⋭","\\ntrianglerighteq",!0);I(U,de,fe,"","\\@nsupseteqq");I(U,de,fe,"⊋","\\supsetneq",!0);I(U,de,fe,"","\\@varsupsetneq");I(U,de,fe,"⫌","\\supsetneqq",!0);I(U,de,fe,"","\\@varsupsetneqq");I(U,de,fe,"⊮","\\nVdash",!0);I(U,de,fe,"⪵","\\precneqq",!0);I(U,de,fe,"⪶","\\succneqq",!0);I(U,de,fe,"","\\@nsubseteqq");I(U,de,lt,"⊴","\\unlhd");I(U,de,lt,"⊵","\\unrhd");I(U,de,fe,"↚","\\nleftarrow",!0);I(U,de,fe,"↛","\\nrightarrow",!0);I(U,de,fe,"⇍","\\nLeftarrow",!0);I(U,de,fe,"⇏","\\nRightarrow",!0);I(U,de,fe,"↮","\\nleftrightarrow",!0);I(U,de,fe,"⇎","\\nLeftrightarrow",!0);I(U,de,fe,"△","\\vartriangle");I(U,de,ge,"ℏ","\\hslash");I(U,de,ge,"▽","\\triangledown");I(U,de,ge,"◊","\\lozenge");I(U,de,ge,"Ⓢ","\\circledS");I(U,de,ge,"®","\\circledR");I(Be,de,ge,"®","\\circledR");I(U,de,ge,"∡","\\measuredangle",!0);I(U,de,ge,"∄","\\nexists");I(U,de,ge,"℧","\\mho");I(U,de,ge,"Ⅎ","\\Finv",!0);I(U,de,ge,"⅁","\\Game",!0);I(U,de,ge,"‵","\\backprime");I(U,de,ge,"▲","\\blacktriangle");I(U,de,ge,"▼","\\blacktriangledown");I(U,de,ge,"■","\\blacksquare");I(U,de,ge,"⧫","\\blacklozenge");I(U,de,ge,"★","\\bigstar");I(U,de,ge,"∢","\\sphericalangle",!0);I(U,de,ge,"∁","\\complement",!0);I(U,de,ge,"ð","\\eth",!0);I(Be,Q,ge,"ð","ð");I(U,de,ge,"╱","\\diagup");I(U,de,ge,"╲","\\diagdown");I(U,de,ge,"□","\\square");I(U,de,ge,"□","\\Box");I(U,de,ge,"◊","\\Diamond");I(U,de,ge,"¥","\\yen",!0);I(Be,de,ge,"¥","\\yen",!0);I(U,de,ge,"✓","\\checkmark",!0);I(Be,de,ge,"✓","\\checkmark");I(U,de,ge,"ℶ","\\beth",!0);I(U,de,ge,"ℸ","\\daleth",!0);I(U,de,ge,"ℷ","\\gimel",!0);I(U,de,ge,"ϝ","\\digamma",!0);I(U,de,ge,"ϰ","\\varkappa");I(U,de,yi,"┌","\\@ulcorner",!0);I(U,de,Ls,"┐","\\@urcorner",!0);I(U,de,yi,"└","\\@llcorner",!0);I(U,de,Ls,"┘","\\@lrcorner",!0);I(U,de,fe,"≦","\\leqq",!0);I(U,de,fe,"⩽","\\leqslant",!0);I(U,de,fe,"⪕","\\eqslantless",!0);I(U,de,fe,"≲","\\lesssim",!0);I(U,de,fe,"⪅","\\lessapprox",!0);I(U,de,fe,"≊","\\approxeq",!0);I(U,de,lt,"⋖","\\lessdot");I(U,de,fe,"⋘","\\lll",!0);I(U,de,fe,"≶","\\lessgtr",!0);I(U,de,fe,"⋚","\\lesseqgtr",!0);I(U,de,fe,"⪋","\\lesseqqgtr",!0);I(U,de,fe,"≑","\\doteqdot");I(U,de,fe,"≓","\\risingdotseq",!0);I(U,de,fe,"≒","\\fallingdotseq",!0);I(U,de,fe,"∽","\\backsim",!0);I(U,de,fe,"⋍","\\backsimeq",!0);I(U,de,fe,"⫅","\\subseteqq",!0);I(U,de,fe,"⋐","\\Subset",!0);I(U,de,fe,"⊏","\\sqsubset",!0);I(U,de,fe,"≼","\\preccurlyeq",!0);I(U,de,fe,"⋞","\\curlyeqprec",!0);I(U,de,fe,"≾","\\precsim",!0);I(U,de,fe,"⪷","\\precapprox",!0);I(U,de,fe,"⊲","\\vartriangleleft");I(U,de,fe,"⊴","\\trianglelefteq");I(U,de,fe,"⊨","\\vDash",!0);I(U,de,fe,"⊪","\\Vvdash",!0);I(U,de,fe,"⌣","\\smallsmile");I(U,de,fe,"⌢","\\smallfrown");I(U,de,fe,"≏","\\bumpeq",!0);I(U,de,fe,"≎","\\Bumpeq",!0);I(U,de,fe,"≧","\\geqq",!0);I(U,de,fe,"⩾","\\geqslant",!0);I(U,de,fe,"⪖","\\eqslantgtr",!0);I(U,de,fe,"≳","\\gtrsim",!0);I(U,de,fe,"⪆","\\gtrapprox",!0);I(U,de,lt,"⋗","\\gtrdot");I(U,de,fe,"⋙","\\ggg",!0);I(U,de,fe,"≷","\\gtrless",!0);I(U,de,fe,"⋛","\\gtreqless",!0);I(U,de,fe,"⪌","\\gtreqqless",!0);I(U,de,fe,"≖","\\eqcirc",!0);I(U,de,fe,"≗","\\circeq",!0);I(U,de,fe,"≜","\\triangleq",!0);I(U,de,fe,"∼","\\thicksim");I(U,de,fe,"≈","\\thickapprox");I(U,de,fe,"⫆","\\supseteqq",!0);I(U,de,fe,"⋑","\\Supset",!0);I(U,de,fe,"⊐","\\sqsupset",!0);I(U,de,fe,"≽","\\succcurlyeq",!0);I(U,de,fe,"⋟","\\curlyeqsucc",!0);I(U,de,fe,"≿","\\succsim",!0);I(U,de,fe,"⪸","\\succapprox",!0);I(U,de,fe,"⊳","\\vartriangleright");I(U,de,fe,"⊵","\\trianglerighteq");I(U,de,fe,"⊩","\\Vdash",!0);I(U,de,fe,"∣","\\shortmid");I(U,de,fe,"∥","\\shortparallel");I(U,de,fe,"≬","\\between",!0);I(U,de,fe,"⋔","\\pitchfork",!0);I(U,de,fe,"∝","\\varpropto");I(U,de,fe,"◀","\\blacktriangleleft");I(U,de,fe,"∴","\\therefore",!0);I(U,de,fe,"∍","\\backepsilon");I(U,de,fe,"▶","\\blacktriangleright");I(U,de,fe,"∵","\\because",!0);I(U,de,fe,"⋘","\\llless");I(U,de,fe,"⋙","\\gggtr");I(U,de,lt,"⊲","\\lhd");I(U,de,lt,"⊳","\\rhd");I(U,de,fe,"≂","\\eqsim",!0);I(U,Q,fe,"⋈","\\Join");I(U,de,fe,"≑","\\Doteq",!0);I(U,de,lt,"∔","\\dotplus",!0);I(U,de,lt,"∖","\\smallsetminus");I(U,de,lt,"⋒","\\Cap",!0);I(U,de,lt,"⋓","\\Cup",!0);I(U,de,lt,"⩞","\\doublebarwedge",!0);I(U,de,lt,"⊟","\\boxminus",!0);I(U,de,lt,"⊞","\\boxplus",!0);I(U,de,lt,"⋇","\\divideontimes",!0);I(U,de,lt,"⋉","\\ltimes",!0);I(U,de,lt,"⋊","\\rtimes",!0);I(U,de,lt,"⋋","\\leftthreetimes",!0);I(U,de,lt,"⋌","\\rightthreetimes",!0);I(U,de,lt,"⋏","\\curlywedge",!0);I(U,de,lt,"⋎","\\curlyvee",!0);I(U,de,lt,"⊝","\\circleddash",!0);I(U,de,lt,"⊛","\\circledast",!0);I(U,de,lt,"⋅","\\centerdot");I(U,de,lt,"⊺","\\intercal",!0);I(U,de,lt,"⋒","\\doublecap");I(U,de,lt,"⋓","\\doublecup");I(U,de,lt,"⊠","\\boxtimes",!0);I(U,de,fe,"⇢","\\dashrightarrow",!0);I(U,de,fe,"⇠","\\dashleftarrow",!0);I(U,de,fe,"⇇","\\leftleftarrows",!0);I(U,de,fe,"⇆","\\leftrightarrows",!0);I(U,de,fe,"⇚","\\Lleftarrow",!0);I(U,de,fe,"↞","\\twoheadleftarrow",!0);I(U,de,fe,"↢","\\leftarrowtail",!0);I(U,de,fe,"↫","\\looparrowleft",!0);I(U,de,fe,"⇋","\\leftrightharpoons",!0);I(U,de,fe,"↶","\\curvearrowleft",!0);I(U,de,fe,"↺","\\circlearrowleft",!0);I(U,de,fe,"↰","\\Lsh",!0);I(U,de,fe,"⇈","\\upuparrows",!0);I(U,de,fe,"↿","\\upharpoonleft",!0);I(U,de,fe,"⇃","\\downharpoonleft",!0);I(U,Q,fe,"⊶","\\origof",!0);I(U,Q,fe,"⊷","\\imageof",!0);I(U,de,fe,"⊸","\\multimap",!0);I(U,de,fe,"↭","\\leftrightsquigarrow",!0);I(U,de,fe,"⇉","\\rightrightarrows",!0);I(U,de,fe,"⇄","\\rightleftarrows",!0);I(U,de,fe,"↠","\\twoheadrightarrow",!0);I(U,de,fe,"↣","\\rightarrowtail",!0);I(U,de,fe,"↬","\\looparrowright",!0);I(U,de,fe,"↷","\\curvearrowright",!0);I(U,de,fe,"↻","\\circlearrowright",!0);I(U,de,fe,"↱","\\Rsh",!0);I(U,de,fe,"⇊","\\downdownarrows",!0);I(U,de,fe,"↾","\\upharpoonright",!0);I(U,de,fe,"⇂","\\downharpoonright",!0);I(U,de,fe,"⇝","\\rightsquigarrow",!0);I(U,de,fe,"⇝","\\leadsto");I(U,de,fe,"⇛","\\Rrightarrow",!0);I(U,de,fe,"↾","\\restriction");I(U,Q,ge,"‘","`");I(U,Q,ge,"$","\\$");I(Be,Q,ge,"$","\\$");I(Be,Q,ge,"$","\\textdollar");I(U,Q,ge,"%","\\%");I(Be,Q,ge,"%","\\%");I(U,Q,ge,"_","\\_");I(Be,Q,ge,"_","\\_");I(Be,Q,ge,"_","\\textunderscore");I(U,Q,ge,"∠","\\angle",!0);I(U,Q,ge,"∞","\\infty",!0);I(U,Q,ge,"′","\\prime");I(U,Q,ge,"△","\\triangle");I(U,Q,ge,"Γ","\\Gamma",!0);I(U,Q,ge,"Δ","\\Delta",!0);I(U,Q,ge,"Θ","\\Theta",!0);I(U,Q,ge,"Λ","\\Lambda",!0);I(U,Q,ge,"Ξ","\\Xi",!0);I(U,Q,ge,"Π","\\Pi",!0);I(U,Q,ge,"Σ","\\Sigma",!0);I(U,Q,ge,"Υ","\\Upsilon",!0);I(U,Q,ge,"Φ","\\Phi",!0);I(U,Q,ge,"Ψ","\\Psi",!0);I(U,Q,ge,"Ω","\\Omega",!0);I(U,Q,ge,"A","Α");I(U,Q,ge,"B","Β");I(U,Q,ge,"E","Ε");I(U,Q,ge,"Z","Ζ");I(U,Q,ge,"H","Η");I(U,Q,ge,"I","Ι");I(U,Q,ge,"K","Κ");I(U,Q,ge,"M","Μ");I(U,Q,ge,"N","Ν");I(U,Q,ge,"O","Ο");I(U,Q,ge,"P","Ρ");I(U,Q,ge,"T","Τ");I(U,Q,ge,"X","Χ");I(U,Q,ge,"¬","\\neg",!0);I(U,Q,ge,"¬","\\lnot");I(U,Q,ge,"⊤","\\top");I(U,Q,ge,"⊥","\\bot");I(U,Q,ge,"∅","\\emptyset");I(U,de,ge,"∅","\\varnothing");I(U,Q,Et,"α","\\alpha",!0);I(U,Q,Et,"β","\\beta",!0);I(U,Q,Et,"γ","\\gamma",!0);I(U,Q,Et,"δ","\\delta",!0);I(U,Q,Et,"ϵ","\\epsilon",!0);I(U,Q,Et,"ζ","\\zeta",!0);I(U,Q,Et,"η","\\eta",!0);I(U,Q,Et,"θ","\\theta",!0);I(U,Q,Et,"ι","\\iota",!0);I(U,Q,Et,"κ","\\kappa",!0);I(U,Q,Et,"λ","\\lambda",!0);I(U,Q,Et,"μ","\\mu",!0);I(U,Q,Et,"ν","\\nu",!0);I(U,Q,Et,"ξ","\\xi",!0);I(U,Q,Et,"ο","\\omicron",!0);I(U,Q,Et,"π","\\pi",!0);I(U,Q,Et,"ρ","\\rho",!0);I(U,Q,Et,"σ","\\sigma",!0);I(U,Q,Et,"τ","\\tau",!0);I(U,Q,Et,"υ","\\upsilon",!0);I(U,Q,Et,"ϕ","\\phi",!0);I(U,Q,Et,"χ","\\chi",!0);I(U,Q,Et,"ψ","\\psi",!0);I(U,Q,Et,"ω","\\omega",!0);I(U,Q,Et,"ε","\\varepsilon",!0);I(U,Q,Et,"ϑ","\\vartheta",!0);I(U,Q,Et,"ϖ","\\varpi",!0);I(U,Q,Et,"ϱ","\\varrho",!0);I(U,Q,Et,"ς","\\varsigma",!0);I(U,Q,Et,"φ","\\varphi",!0);I(U,Q,lt,"∗","*",!0);I(U,Q,lt,"+","+");I(U,Q,lt,"−","-",!0);I(U,Q,lt,"⋅","\\cdot",!0);I(U,Q,lt,"∘","\\circ",!0);I(U,Q,lt,"÷","\\div",!0);I(U,Q,lt,"±","\\pm",!0);I(U,Q,lt,"×","\\times",!0);I(U,Q,lt,"∩","\\cap",!0);I(U,Q,lt,"∪","\\cup",!0);I(U,Q,lt,"∖","\\setminus",!0);I(U,Q,lt,"∧","\\land");I(U,Q,lt,"∨","\\lor");I(U,Q,lt,"∧","\\wedge",!0);I(U,Q,lt,"∨","\\vee",!0);I(U,Q,ge,"√","\\surd");I(U,Q,yi,"⟨","\\langle",!0);I(U,Q,yi,"∣","\\lvert");I(U,Q,yi,"∥","\\lVert");I(U,Q,Ls,"?","?");I(U,Q,Ls,"!","!");I(U,Q,Ls,"⟩","\\rangle",!0);I(U,Q,Ls,"∣","\\rvert");I(U,Q,Ls,"∥","\\rVert");I(U,Q,fe,"=","=");I(U,Q,fe,":",":");I(U,Q,fe,"≈","\\approx",!0);I(U,Q,fe,"≅","\\cong",!0);I(U,Q,fe,"≥","\\ge");I(U,Q,fe,"≥","\\geq",!0);I(U,Q,fe,"←","\\gets");I(U,Q,fe,">","\\gt",!0);I(U,Q,fe,"∈","\\in",!0);I(U,Q,fe,"","\\@not");I(U,Q,fe,"⊂","\\subset",!0);I(U,Q,fe,"⊃","\\supset",!0);I(U,Q,fe,"⊆","\\subseteq",!0);I(U,Q,fe,"⊇","\\supseteq",!0);I(U,de,fe,"⊈","\\nsubseteq",!0);I(U,de,fe,"⊉","\\nsupseteq",!0);I(U,Q,fe,"⊨","\\models");I(U,Q,fe,"←","\\leftarrow",!0);I(U,Q,fe,"≤","\\le");I(U,Q,fe,"≤","\\leq",!0);I(U,Q,fe,"<","\\lt",!0);I(U,Q,fe,"→","\\rightarrow",!0);I(U,Q,fe,"→","\\to");I(U,de,fe,"≱","\\ngeq",!0);I(U,de,fe,"≰","\\nleq",!0);I(U,Q,Ao," ","\\ ");I(U,Q,Ao," ","\\space");I(U,Q,Ao," ","\\nobreakspace");I(Be,Q,Ao," ","\\ ");I(Be,Q,Ao," "," ");I(Be,Q,Ao," ","\\space");I(Be,Q,Ao," ","\\nobreakspace");I(U,Q,Ao,"","\\nobreak");I(U,Q,Ao,"","\\allowbreak");I(U,Q,Dh,",",",");I(U,Q,Dh,";",";");I(U,de,lt,"⊼","\\barwedge",!0);I(U,de,lt,"⊻","\\veebar",!0);I(U,Q,lt,"⊙","\\odot",!0);I(U,Q,lt,"⊕","\\oplus",!0);I(U,Q,lt,"⊗","\\otimes",!0);I(U,Q,ge,"∂","\\partial",!0);I(U,Q,lt,"⊘","\\oslash",!0);I(U,de,lt,"⊚","\\circledcirc",!0);I(U,de,lt,"⊡","\\boxdot",!0);I(U,Q,lt,"△","\\bigtriangleup");I(U,Q,lt,"▽","\\bigtriangledown");I(U,Q,lt,"†","\\dagger");I(U,Q,lt,"⋄","\\diamond");I(U,Q,lt,"⋆","\\star");I(U,Q,lt,"◃","\\triangleleft");I(U,Q,lt,"▹","\\triangleright");I(U,Q,yi,"{","\\{");I(Be,Q,ge,"{","\\{");I(Be,Q,ge,"{","\\textbraceleft");I(U,Q,Ls,"}","\\}");I(Be,Q,ge,"}","\\}");I(Be,Q,ge,"}","\\textbraceright");I(U,Q,yi,"{","\\lbrace");I(U,Q,Ls,"}","\\rbrace");I(U,Q,yi,"[","\\lbrack",!0);I(Be,Q,ge,"[","\\lbrack",!0);I(U,Q,Ls,"]","\\rbrack",!0);I(Be,Q,ge,"]","\\rbrack",!0);I(U,Q,yi,"(","\\lparen",!0);I(U,Q,Ls,")","\\rparen",!0);I(Be,Q,ge,"<","\\textless",!0);I(Be,Q,ge,">","\\textgreater",!0);I(U,Q,yi,"⌊","\\lfloor",!0);I(U,Q,Ls,"⌋","\\rfloor",!0);I(U,Q,yi,"⌈","\\lceil",!0);I(U,Q,Ls,"⌉","\\rceil",!0);I(U,Q,ge,"\\","\\backslash");I(U,Q,ge,"∣","|");I(U,Q,ge,"∣","\\vert");I(Be,Q,ge,"|","\\textbar",!0);I(U,Q,ge,"∥","\\|");I(U,Q,ge,"∥","\\Vert");I(Be,Q,ge,"∥","\\textbardbl");I(Be,Q,ge,"~","\\textasciitilde");I(Be,Q,ge,"\\","\\textbackslash");I(Be,Q,ge,"^","\\textasciicircum");I(U,Q,fe,"↑","\\uparrow",!0);I(U,Q,fe,"⇑","\\Uparrow",!0);I(U,Q,fe,"↓","\\downarrow",!0);I(U,Q,fe,"⇓","\\Downarrow",!0);I(U,Q,fe,"↕","\\updownarrow",!0);I(U,Q,fe,"⇕","\\Updownarrow",!0);I(U,Q,Lr,"∐","\\coprod");I(U,Q,Lr,"⋁","\\bigvee");I(U,Q,Lr,"⋀","\\bigwedge");I(U,Q,Lr,"⨄","\\biguplus");I(U,Q,Lr,"⋂","\\bigcap");I(U,Q,Lr,"⋃","\\bigcup");I(U,Q,Lr,"∫","\\int");I(U,Q,Lr,"∫","\\intop");I(U,Q,Lr,"∬","\\iint");I(U,Q,Lr,"∭","\\iiint");I(U,Q,Lr,"∏","\\prod");I(U,Q,Lr,"∑","\\sum");I(U,Q,Lr,"⨂","\\bigotimes");I(U,Q,Lr,"⨁","\\bigoplus");I(U,Q,Lr,"⨀","\\bigodot");I(U,Q,Lr,"∮","\\oint");I(U,Q,Lr,"∯","\\oiint");I(U,Q,Lr,"∰","\\oiiint");I(U,Q,Lr,"⨆","\\bigsqcup");I(U,Q,Lr,"∫","\\smallint");I(Be,Q,vd,"…","\\textellipsis");I(U,Q,vd,"…","\\mathellipsis");I(Be,Q,vd,"…","\\ldots",!0);I(U,Q,vd,"…","\\ldots",!0);I(U,Q,vd,"⋯","\\@cdots",!0);I(U,Q,vd,"⋱","\\ddots",!0);I(U,Q,ge,"⋮","\\varvdots");I(Be,Q,ge,"⋮","\\varvdots");I(U,Q,er,"ˊ","\\acute");I(U,Q,er,"ˋ","\\grave");I(U,Q,er,"¨","\\ddot");I(U,Q,er,"~","\\tilde");I(U,Q,er,"ˉ","\\bar");I(U,Q,er,"˘","\\breve");I(U,Q,er,"ˇ","\\check");I(U,Q,er,"^","\\hat");I(U,Q,er,"⃗","\\vec");I(U,Q,er,"˙","\\dot");I(U,Q,er,"˚","\\mathring");I(U,Q,Et,"","\\@imath");I(U,Q,Et,"","\\@jmath");I(U,Q,ge,"ı","ı");I(U,Q,ge,"ȷ","ȷ");I(Be,Q,ge,"ı","\\i",!0);I(Be,Q,ge,"ȷ","\\j",!0);I(Be,Q,ge,"ß","\\ss",!0);I(Be,Q,ge,"æ","\\ae",!0);I(Be,Q,ge,"œ","\\oe",!0);I(Be,Q,ge,"ø","\\o",!0);I(Be,Q,ge,"Æ","\\AE",!0);I(Be,Q,ge,"Œ","\\OE",!0);I(Be,Q,ge,"Ø","\\O",!0);I(Be,Q,er,"ˊ","\\'");I(Be,Q,er,"ˋ","\\`");I(Be,Q,er,"ˆ","\\^");I(Be,Q,er,"˜","\\~");I(Be,Q,er,"ˉ","\\=");I(Be,Q,er,"˘","\\u");I(Be,Q,er,"˙","\\.");I(Be,Q,er,"¸","\\c");I(Be,Q,er,"˚","\\r");I(Be,Q,er,"ˇ","\\v");I(Be,Q,er,"¨",'\\"');I(Be,Q,er,"˝","\\H");I(Be,Q,er,"◯","\\textcircled");var Tj={"--":!0,"---":!0,"``":!0,"''":!0};I(Be,Q,ge,"–","--",!0);I(Be,Q,ge,"–","\\textendash");I(Be,Q,ge,"—","---",!0);I(Be,Q,ge,"—","\\textemdash");I(Be,Q,ge,"‘","`",!0);I(Be,Q,ge,"‘","\\textquoteleft");I(Be,Q,ge,"’","'",!0);I(Be,Q,ge,"’","\\textquoteright");I(Be,Q,ge,"“","``",!0);I(Be,Q,ge,"“","\\textquotedblleft");I(Be,Q,ge,"”","''",!0);I(Be,Q,ge,"”","\\textquotedblright");I(U,Q,ge,"°","\\degree",!0);I(Be,Q,ge,"°","\\degree");I(Be,Q,ge,"°","\\textdegree",!0);I(U,Q,ge,"£","\\pounds");I(U,Q,ge,"£","\\mathsterling",!0);I(Be,Q,ge,"£","\\pounds");I(Be,Q,ge,"£","\\textsterling",!0);I(U,de,ge,"✠","\\maltese");I(Be,de,ge,"✠","\\maltese");var E8='0123456789/@."';for(var jb=0;jb{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 O8[s]}else if(120782<=r&&r<=120831){var a=Math.floor((r-120782)/10);return Elt[a]}else{if(r===120485||r===120486)return O8[0];if(120486{if(Cl(e.classes)!==Cl(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},Mj=e=>{for(var n=0;nt&&(t=l.height),l.depth>r&&(r=l.depth),l.maxFontSize>s&&(s=l.maxFontSize)}n.height=t,n.depth=r,n.maxFontSize=s},Fe=function(n,t,r,s){var a=new bd(n,t,r,s);return yy(a),a},Nl=(e,n,t,r)=>new bd(e,n,t,r),nd=function(n,t,r){var s=Fe([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=Qe(s.height),s.maxFontSize=1,s},Alt=function(n,t,r,s){var a=new sm(n,t,r,s);return yy(a),a},To=function(n){var t=new gd(n);return yy(t),t},rd=function(n,t){return n instanceof gd?Fe([],[n],t):n},Tlt=function(n){if(n.positionType==="individualShift"){for(var t=n.children,r=[t[0]],s=-t[0].shift-t[0].elem.depth,a=s,l=1;l{var t=Fe(["mspace"],[],n),r=or(e,n);return t.style.marginRight=Qe(r),t},_0=(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},y2={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"}},Dj={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Lj=function(n,t){var[r,s,a]=Dj[n],l=new El(r),o=new Eo([l],{width:Qe(s),height:Qe(a),style:"width:"+Qe(s),viewBox:"0 0 "+1e3*s+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),c=Nl(["overlay"],[o],t);return c.height=a,c.style.height=Qe(a),c.style.width=Qe(s),c},ar={number:3,unit:"mu"},dc={number:4,unit:"mu"},mo={number:5,unit:"mu"},Mlt={mord:{mop:ar,mbin:dc,mrel:mo,minner:ar},mop:{mord:ar,mop:ar,mrel:mo,minner:ar},mbin:{mord:dc,mop:dc,mopen:dc,minner:dc},mrel:{mord:mo,mop:mo,mopen:mo,minner:mo},mopen:{},mclose:{mop:ar,mbin:dc,mrel:mo,minner:ar},mpunct:{mord:ar,mop:ar,mrel:mo,mopen:ar,mclose:ar,mpunct:ar,minner:ar},minner:{mord:ar,mop:ar,mbin:dc,mrel:mo,mopen:ar,mpunct:ar,minner:ar}},Rlt={mord:{mop:ar},mop:{mord:ar,mop:ar},mbin:{},mrel:{},mopen:{},mclose:{mop:ar},mpunct:{},minner:{mop:ar}},Oj={},yp={},wp={};function at(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:a,mathmlBuilder:l}=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=S.classes[0];v==="mbin"&&Llt.has(b)?k.classes[0]="mord":b==="mbin"&&Dlt.has(v)&&(S.classes[0]="mord")},{node:h},m,g),w2(a,(S,k)=>{var v,b,w=k2(k),x=k2(S),C=w&&x?S.hasClass("mtight")?(v=Rlt[w])==null?void 0:v[x]:(b=Mlt[w])==null?void 0:b[x]:null;if(C)return Rj(C,d)},{node:h},m,g),a},w2=function(n,t,r,s,a){s&&n.push(s);for(var l=0;lm=>{n.splice(h+1,0,m),l++})(l)}s&&n.pop()},Ij=function(n){return n instanceof gd||n instanceof sm||n instanceof bd&&n.hasClass("enclosing")?n:null},S2=function(n,t){var r=Ij(n);if(r){var s=r.children;if(s.length){if(t==="right")return S2(s[s.length-1],"right");if(t==="left")return S2(s[0],"left")}}return n},k2=function(n,t){if(!n)return null;t&&(n=S2(n,t));var r=n.classes[0];return Ilt[r]||null},Qf=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Fe(t.concat(r))},wn=function(n,t,r){if(!n)return Fe();if(yp[n.type]){var s=yp[n.type](n,t);if(r&&t.size!==r.size){s=Fe(t.sizingClasses(r),[s],t);var a=t.sizeMultiplier/r.sizeMultiplier;s.height*=a,s.depth*=a}return s}else throw new Ke("Got group of unknown type: '"+n.type+"'")};function p0(e,n){var t=Fe(["base"],e,n),r=Fe(["strut"]);return r.style.height=Qe(t.height+t.depth),t.depth&&(r.style.verticalAlign=Qe(-t.depth)),t.children.unshift(r),t}function C2(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=qr(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var a=[],l=[],o=0;o0&&(a.push(p0(l,n)),l=[]),a.push(r[o]));l.length>0&&a.push(p0(l,n));var d;t?(d=p0(qr(t,n,!0),n),d.classes=["tag"],a.push(d)):s&&a.push(s);var _=Fe(["katex-html"],a);if(_.setAttribute("aria-hidden","true"),d){var h=d.children[0];h.style.height=Qe(_.height+_.depth),_.depth&&(h.style.verticalAlign=Qe(-_.depth))}return _}function Bj(e){return new gd(e)}class Ye{constructor(n,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=n,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(n,t){this.attributes[n]=t}getAttribute(n){return this.attributes[n]}toNode(){var n=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&n.setAttribute(t,this.attributes[t]);this.classes.length>0&&(n.className=Cl(this.classes));for(var r=0;r0&&(n+=' class ="'+bs(Cl(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class Dr{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return bs(this.toText())}toText(){return this.text}}class $j{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",Qe(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var Blt=new Set(["\\imath","\\jmath"]),$lt=new Set(["mrow","mtable"]),Ui=function(n,t,r){return Qn[t][n]&&Qn[t][n].replace&&n.charCodeAt(0)!==55349&&!(Tj.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Qn[t][n].replace),new Dr(n)},wy=function(n){return n.length===1?n[0]:new Ye("mrow",n)},Hlt={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"},Sy=(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=Hlt[t];if(s)return typeof s=="function"?s(e):s;var a=e.text;if(Blt.has(a))return null;if(Qn[r][a]){var l=Qn[r][a].replace;l&&(a=l)}var o=y2[t].fontName;return vy(a,o,r)?y2[t].variant:null};function Rb(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof Dr&&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 Dr&&t.text===","}else return!1}var wi=function(n,t,r){if(n.length===1){var s=Fn(n[0],t);return r&&s instanceof Ye&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var a=[],l,o=0;o=1&&(l.type==="mn"||Rb(l))){var d=c.children[0];d instanceof Ye&&d.type==="mn"&&(d.children=[...l.children,...d.children],a.pop())}else if(l.type==="mi"&&l.children.length===1){var _=l.children[0];if(_ instanceof Dr&&_.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var h=c.children[0];h instanceof Dr&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),a.pop())}}}a.push(c),l=c}return a},zl=function(n,t,r){return wy(wi(n,t,r))},Fn=function(n,t){if(!n)return new Ye("mrow");if(wp[n.type])return wp[n.type](n,t);throw new Ke("Got group of unknown type: '"+n.type+"'")};function I8(e,n,t,r,s){var a=wi(e,t),l;a.length===1&&a[0]instanceof Ye&&$lt.has(a[0].type)?l=a[0]:l=new Ye("mrow",a);var o=new Ye("annotation",[new Dr(n)]);o.setAttribute("encoding","application/x-tex");var c=new Ye("semantics",[l,o]),d=new Ye("math",[c]);d.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&d.setAttribute("display","block");var _=s?"katex":"katex-mathml";return Fe([_],[d])}var Plt=[[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]],B8=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],$8=function(n,t){return t.size<2?n:Plt[n-1][t.size-1]};class xo{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||xo.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=B8[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 xo(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:$8(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:B8[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=$8(xo.BASESIZE,n);return this.size===t&&this.textSize===xo.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!==xo.BASESIZE?["sizing","reset-size"+this.size,"size"+xo.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=klt(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}xo.BASESIZE=6;var Hj=function(n){return new xo({style:n.displayMode?Pt.DISPLAY:Pt.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},Pj=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Fe(r,[n])}return n},Flt=function(n,t,r){var s=Hj(r),a;if(r.output==="mathml")return I8(n,t,s,r.displayMode,!0);if(r.output==="html"){var l=C2(n,s);a=Fe(["katex"],[l])}else{var o=I8(n,t,s,r.displayMode,!1),c=C2(n,s);a=Fe(["katex"],[o,c])}return Pj(a,r)},Ult=function(n,t,r){var s=Hj(r),a=C2(n,s),l=Fe(["katex"],[a]);return Pj(l,r)},qlt={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":"="},om=function(n){var t=new Ye("mo",[new Dr(qlt[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Glt={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]},Vlt=new Set(["widehat","widecheck","widetilde","utilde"]),lm=function(n,t){function r(){var o=4e5,c=n.label.slice(1);if(Vlt.has(c)&&"base"in n){var d=n.base.type==="ordgroup"?n.base.body.length:1,_,h,m;if(d>5)c==="widehat"||c==="widecheck"?(_=420,o=2364,m=.42,h=c+"4"):(_=312,o=2340,m=.34,h="tilde4");else{var g=[1,1,2,2,3,3][d];c==="widehat"||c==="widecheck"?(o=[0,1062,2364,2364,2364][g],_=[0,239,300,360,420][g],m=[0,.24,.3,.3,.36,.42][g],h=c+g):(o=[0,600,1033,2339,2340][g],_=[0,260,286,306,312][g],m=[0,.26,.286,.3,.306,.34][g],h="tilde"+g)}var S=new El(h),k=new Eo([S],{width:"100%",height:Qe(m),viewBox:"0 0 "+o+" "+_,preserveAspectRatio:"none"});return{span:Nl([],[k],t),minWidth:0,height:m}}else{var v=[],b=Glt[c];if(!b)throw new Error('No SVG data for "'+c+'".');var[w,x,C]=b,j=C/1e3,N=w.length,T,z;if(N===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');T=["hide-tail"],z=[b[3]]}else if(N===2)T=["halfarrow-left","halfarrow-right"],z=["xMinYMin","xMaxYMin"];else if(N===3)T=["brace-left","brace-center","brace-right"],z=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+N+" children.");for(var D=0;D0&&(s.style.minWidth=Qe(a)),s},Wlt=function(n,t,r,s,a){var l,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(l=Fe(["stretchy",t],[],a),t==="fbox"){var c=a.color&&a.getColor();c&&(l.style.borderColor=c)}}else{var d=[];/^[bx]cancel$/.test(t)&&d.push(new p2({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&d.push(new p2({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var _=new Eo(d,{width:"100%",height:Qe(o)});l=Nl([],[_],a)}return l.height=o,l.style.height=Qe(o),l},Klt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ylt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function Xlt(e){return e in Klt}function Jt(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 cm(e){var n=um(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 um(e){return e&&(e.type==="atom"||Ylt.hasOwnProperty(e.type))?e:null}var Fj=e=>{if(e instanceof bi)return e;if(wlt(e)&&e.children.length===1)return Fj(e.children[0])},ky=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=Jt(e.base,"accent"),t=r.base,e.base=t,s=ylt(wn(e,n)),e.base=r):(r=Jt(e,"accent"),t=r.base);var a=wn(t,n.havingCrampedStyle()),l=r.isShifty&&jo(t),o=0;if(l){var c,d;o=(c=(d=Fj(a))==null?void 0:d.skew)!=null?c:0}var _=r.label==="\\c",h=_?a.height+a.depth:Math.min(a.height,n.fontMetrics().xHeight),m;if(r.isStretchy)m=lm(r,n),m=xn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+Qe(2*o)+")",marginLeft:Qe(2*o)}:void 0}]});else{var g,S;r.label==="\\vec"?(g=Lj("vec",n),S=Dj.vec[1]):(g=am({mode:r.mode,text:r.label},n,"textord"),g=xlt(g),g.italic=0,S=g.width,_&&(h+=g.depth)),m=Fe(["accent-body"],[g]);var k=r.label==="\\textcircled";k&&(m.classes.push("accent-full"),h=a.height);var v=o;k||(v-=S/2),m.style.left=Qe(v),r.label==="\\textcircled"&&(m.style.top=".2em"),m=xn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-h},{type:"elem",elem:m}]})}var b=Fe(["mord","accent"],[m],n);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},Uj=(e,n)=>{var t=e.isStretchy?om(e.label):new Ye("mo",[Ui(e.label,e.mode)]),r=new Ye("mover",[Fn(e.base,n),t]);return r.setAttribute("accent","true"),r},Zlt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));at({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,n)=>{var t=Sp(n[0]),r=!Zlt.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:ky,mathmlBuilder:Uj});at({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,n)=>{var t=n[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:ky,mathmlBuilder:Uj});at({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"accentUnder",mode:t.mode,label:r,base:s}},htmlBuilder:(e,n)=>{var t=wn(e.base,n),r=lm(e,n),s=e.label==="\\utilde"?.12:0,a=xn({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Fe(["mord","accentunder"],[a],n)},mathmlBuilder:(e,n)=>{var t=om(e.label),r=new Ye("munder",[Fn(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var m0=e=>{var n=new Ye("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};at({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:n[0],below:t[0]}},htmlBuilder(e,n){var t=n.style,r=n.havingStyle(t.sup()),s=rd(wn(e.body,r,n),n),a=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(a+"-arrow-pad");var l;e.below&&(r=n.havingStyle(t.sub()),l=rd(wn(e.below,r,n),n),l.classes.push(a+"-arrow-pad"));var o=lm(e,n),c=-n.fontMetrics().axisHeight+.5*o.height,d=-n.fontMetrics().axisHeight-.5*o.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(d-=s.depth);var _;if(l){var h=-n.fontMetrics().axisHeight+l.height+.5*o.height+.111;_=xn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:l,shift:h}]})}else _=xn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]}]});return Fe(["mrel","x-arrow"],[_],n)},mathmlBuilder(e,n){var t=om(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=m0(Fn(e.body,n));if(e.below){var a=m0(Fn(e.below,n));r=new Ye("munderover",[t,a,s])}else r=new Ye("mover",[t,s])}else if(e.below){var l=m0(Fn(e.below,n));r=new Ye("munder",[t,l])}else r=m0(),r=new Ye("mover",[t,r]);return r}});function qj(e,n){var t=qr(e.body,n,!0);return Fe([e.mclass],t,n)}function Gj(e,n){var t,r=wi(e.body,n);return e.mclass==="minner"?t=new Ye("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Ye("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Ye("mo",r),e.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):e.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):e.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}at({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"mclass",mode:t.mode,mclass:"m"+r.slice(5),body:Rr(s),isCharacterBox:jo(s)}},htmlBuilder:qj,mathmlBuilder:Gj});var dm=e=>{var n=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return n.type==="atom"&&(n.family==="bin"||n.family==="rel")?"m"+n.family:"mord"};at({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:dm(n[0]),body:Rr(n[1]),isCharacterBox:jo(n[1])}}});at({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,n){var{parser:t,funcName:r}=e,s=n[1],a=n[0],l;r!=="\\stackrel"?l=dm(s):l="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Rr(s)},c={type:"supsub",mode:a.mode,base:o,sup:r==="\\underset"?null:a,sub:r==="\\underset"?a:null};return{type:"mclass",mode:t.mode,mclass:l,body:[c],isCharacterBox:jo(c)}},htmlBuilder:qj,mathmlBuilder:Gj});at({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:dm(n[0]),body:Rr(n[0])}},htmlBuilder(e,n){var t=qr(e.body,n,!0),r=Fe([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=wi(e.body,n),r=new Ye("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Qlt={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},H8=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),P8=e=>e.type==="textord"&&e.text==="@",Jlt=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function ect(e,n,t){var r=Qlt[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]],[]),a={type:"atom",text:r,mode:"math",family:"rel"},l=t.callFunction("\\Big",[a],[]),o=t.callFunction("\\\\cdright",[n[1]],[]),c={type:"ordgroup",mode:"math",body:[s,l,o]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var d={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[d],[])}default:return{type:"textord",text:" ",mode:"math"}}}function tct(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 Ke("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],a=0;aAV".includes(d))for(var h=0;h<2;h++){for(var m=!0,g=c+1;gAV=|." after @',l[c]);var S=ect(d,_,e),k={type:"styling",body:[S],mode:"math",style:"display",resetFont:!0};r.push(k),o=H8()}a%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([])}}at({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:n[0]}},htmlBuilder(e,n){var t=n.havingStyle(n.style.sup()),r=rd(wn(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=Qe(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Ye("mrow",[Fn(e.label,n)]);return t=new Ye("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ye("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});at({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,n){var{parser:t}=e;return{type:"cdlabelparent",mode:t.mode,fragment:n[0]}},htmlBuilder(e,n){var t=rd(wn(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Ye("mrow",[Fn(e.fragment,n)])}});at({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=Jt(n[0],"ordgroup"),s=r.body,a="",l=0;l=1114111)throw new Ke("\\@char with invalid code point "+a);return c<=65535?d=String.fromCharCode(c):(c-=65536,d=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:d}}});var Vj=(e,n)=>{var t=qr(e.body,n.withColor(e.color),!1);return To(t)},Wj=(e,n)=>{var t=wi(e.body,n.withColor(e.color)),r=new Ye("mstyle",t);return r.setAttribute("mathcolor",e.color),r};at({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=Jt(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:Rr(s)}},htmlBuilder:Vj,mathmlBuilder:Wj});at({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=Jt(n[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var a=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:s,body:a}},htmlBuilder:Vj,mathmlBuilder:Wj});at({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,n,t){var{parser:r}=e,s=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:s&&Jt(s,"size").value}},htmlBuilder(e,n){var t=Fe(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=Qe(or(e.size,n)))),t},mathmlBuilder(e,n){var t=new Ye("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",Qe(or(e.size,n)))),t}});var E2={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Kj=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Ke("Expected a control sequence",e);return n},nct=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},Yj=(e,n,t,r)=>{var s=e.gullet.macros.get(t.text);s==null&&(t.noexpand=!0,s={tokens:[t],numArgs:0,unexpandable:!e.gullet.isExpandable(t.text)}),e.gullet.macros.set(n,s,r)};at({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:n,funcName:t}=e;n.consumeSpaces();var r=n.fetch();if(E2[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=E2[r.text]),Jt(n.parseFunction(),"internal");throw new Ke("Invalid token after macro prefix",r)}});at({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=n.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new Ke("Expected a control sequence",r);for(var a=0,l,o=[[]];n.gullet.future().text!=="{";)if(r=n.gullet.popToken(),r.text==="#"){if(n.gullet.future().text==="{"){l=n.gullet.future(),o[a].push("{");break}if(r=n.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Ke('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new Ke('Argument number "'+r.text+'" out of order');a++,o.push([])}else{if(r.text==="EOF")throw new Ke("Expected a macro definition");o[a].push(r.text)}var{tokens:c}=n.gullet.consumeArg();return l&&c.unshift(l),(t==="\\edef"||t==="\\xdef")&&(c=n.gullet.expandTokens(c),c.reverse()),n.gullet.macros.set(s,{tokens:c,numArgs:a,delimiters:o},t===E2[t]),{type:"internal",mode:n.mode}}});at({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=Kj(n.gullet.popToken());n.gullet.consumeSpaces();var s=nct(n);return Yj(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});at({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=Kj(n.gullet.popToken()),s=n.gullet.popToken(),a=n.gullet.popToken();return Yj(n,r,a,t==="\\\\globalfuture"),n.gullet.pushToken(a),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var zf=function(n,t,r){var s=Qn.math[n]&&Qn.math[n].replace,a=vy(s||n,t,r);if(!a)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return a},Cy=function(n,t,r,s){var a=r.havingBaseStyle(t),l=Fe(s.concat(a.sizingClasses(r)),[n],r),o=a.sizeMultiplier/r.sizeMultiplier;return l.height*=o,l.depth*=o,l.maxFontSize=a.sizeMultiplier,l},Xj=function(n,t,r){var s=t.havingBaseStyle(r),a=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;n.classes.push("delimcenter"),n.style.top=Qe(a),n.height-=a,n.depth+=a},rct=function(n,t,r,s,a,l){var o=Ts(n,"Main-Regular",a,s),c=Cy(o,t,s,l);return Xj(c,s,t),c},sct=function(n,t,r,s){return Ts(n,"Size"+t+"-Regular",r,s)},Zj=function(n,t,r,s,a,l){var o=sct(n,t,a,s),c=Cy(Fe(["delimsizing","size"+t],[o],s),Pt.TEXT,s,l);return r&&Xj(c,s,Pt.TEXT),c},Db=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var a=Fe(["delimsizinginner",s],[Fe([],[Ts(n,t,r)])]);return{type:"elem",elem:a}},Lb=function(n,t,r){var s=Ma["Size4-Regular"][n.charCodeAt(0)]?Ma["Size4-Regular"][n.charCodeAt(0)][4]:Ma["Size1-Regular"][n.charCodeAt(0)][4],a=new El("inner",hlt(n,Math.round(1e3*t))),l=new Eo([a],{width:Qe(s),height:Qe(t),style:"width:"+Qe(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Nl([],[l],r);return o.height=t,o.style.height=Qe(t),o.style.width=Qe(s),{type:"elem",elem:o}},N2=.008,g0={type:"kern",size:-1*N2},ict=new Set(["|","\\lvert","\\rvert","\\vert"]),act=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Qj=function(n,t,r,s,a,l){var o,c,d,_,h="",m=0;o=d=_=n,c=null;var g="Size1-Regular";n==="\\uparrow"?d=_="⏐":n==="\\Uparrow"?d=_="‖":n==="\\downarrow"?o=d="⏐":n==="\\Downarrow"?o=d="‖":n==="\\updownarrow"?(o="\\uparrow",d="⏐",_="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",d="‖",_="\\Downarrow"):ict.has(n)?(d="∣",h="vert",m=333):act.has(n)?(d="∥",h="doublevert",m=556):n==="["||n==="\\lbrack"?(o="⎡",d="⎢",_="⎣",g="Size4-Regular",h="lbrack",m=667):n==="]"||n==="\\rbrack"?(o="⎤",d="⎥",_="⎦",g="Size4-Regular",h="rbrack",m=667):n==="\\lfloor"||n==="⌊"?(d=o="⎢",_="⎣",g="Size4-Regular",h="lfloor",m=667):n==="\\lceil"||n==="⌈"?(o="⎡",d=_="⎢",g="Size4-Regular",h="lceil",m=667):n==="\\rfloor"||n==="⌋"?(d=o="⎥",_="⎦",g="Size4-Regular",h="rfloor",m=667):n==="\\rceil"||n==="⌉"?(o="⎤",d=_="⎥",g="Size4-Regular",h="rceil",m=667):n==="("||n==="\\lparen"?(o="⎛",d="⎜",_="⎝",g="Size4-Regular",h="lparen",m=875):n===")"||n==="\\rparen"?(o="⎞",d="⎟",_="⎠",g="Size4-Regular",h="rparen",m=875):n==="\\{"||n==="\\lbrace"?(o="⎧",c="⎨",_="⎩",d="⎪",g="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",c="⎬",_="⎭",d="⎪",g="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",_="⎩",d="⎪",g="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",_="⎭",d="⎪",g="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",_="⎭",d="⎪",g="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",_="⎩",d="⎪",g="Size4-Regular");var S=zf(o,g,a),k=S.height+S.depth,v=zf(d,g,a),b=v.height+v.depth,w=zf(_,g,a),x=w.height+w.depth,C=0,j=1;if(c!==null){var N=zf(c,g,a);C=N.height+N.depth,j=2}var T=k+x+C,z=Math.max(0,Math.ceil((t-T)/(j*b))),D=T+z*j*b,O=s.fontMetrics().axisHeight;r&&(O*=s.sizeMultiplier);var H=D/2-O,P=[];if(h.length>0){var F=D-k-x,W=Math.round(D*1e3),Z=_lt(h,Math.round(F*1e3)),G=new El(h,Z),X=Qe(m/1e3),J=Qe(W/1e3),$=new Eo([G],{width:X,height:J,viewBox:"0 0 "+m+" "+W}),L=Nl([],[$],s);L.height=W/1e3,L.style.width=X,L.style.height=J,P.push({type:"elem",elem:L})}else{if(P.push(Db(_,g,a)),P.push(g0),c===null){var B=D-k-x+2*N2;P.push(Lb(d,B,s))}else{var Y=(D-k-x-C)/2+2*N2;P.push(Lb(d,Y,s)),P.push(g0),P.push(Db(c,g,a)),P.push(g0),P.push(Lb(d,Y,s))}P.push(g0),P.push(Db(o,g,a))}var V=s.havingBaseStyle(Pt.TEXT),se=xn({positionType:"bottom",positionData:H,children:P});return Cy(Fe(["delimsizing","mult"],[se],V),Pt.TEXT,s,l)},Ob=80,Ib=.08,Bb=function(n,t,r,s,a){var l=flt(n,s,r),o=new El(n,l),c=new Eo([o],{width:"400em",height:Qe(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Nl(["hide-tail"],[c],a)},oct=function(n,t){var r=t.havingBaseSizing(),s=rA("\\surd",n*r.sizeMultiplier,nA,r),a=r.sizeMultiplier,l=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,c,d,_,h;return s.type==="small"?(_=1e3+1e3*l+Ob,n<1?a=1:n<1.4&&(a=.7),c=(1+l+Ib)/a,d=(1+l)/a,o=Bb("sqrtMain",c,_,l,t),o.style.minWidth="0.853em",h=.833/a):s.type==="large"?(_=(1e3+Ob)*Bf[s.size],d=(Bf[s.size]+l)/a,c=(Bf[s.size]+l+Ib)/a,o=Bb("sqrtSize"+s.size,c,_,l,t),o.style.minWidth="1.02em",h=1/a):(c=n+l+Ib,d=n+l,_=Math.floor(1e3*n+l)+Ob,o=Bb("sqrtTall",c,_,l,t),o.style.minWidth="0.742em",h=1.056),o.height=d,o.style.height=Qe(c),{span:o,advanceWidth:h,ruleWidth:(t.fontMetrics().sqrtRuleThickness+l)*a}},Jj=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),lct=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),eA=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Bf=[0,1.2,1.8,2.4,3],tA=function(n,t,r,s,a){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),Jj.has(n)||eA.has(n))return Zj(n,t,!1,r,s,a);if(lct.has(n))return Qj(n,Bf[t],!1,r,s,a);throw new Ke("Illegal delimiter: '"+n+"'")},cct=[{type:"small",style:Pt.SCRIPTSCRIPT},{type:"small",style:Pt.SCRIPT},{type:"small",style:Pt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],uct=[{type:"small",style:Pt.SCRIPTSCRIPT},{type:"small",style:Pt.SCRIPT},{type:"small",style:Pt.TEXT},{type:"stack"}],nA=[{type:"small",style:Pt.SCRIPTSCRIPT},{type:"small",style:Pt.SCRIPT},{type:"small",style:Pt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],dct=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.")},rA=function(n,t,r,s){for(var a=Math.min(2,3-s.style.size),l=a;lt)return o}return r[r.length-1]},z2=function(n,t,r,s,a,l){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;eA.has(n)?o=cct:Jj.has(n)?o=nA:o=uct;var c=rA(n,t,o,s);return c.type==="small"?rct(n,c.style,r,s,a,l):c.type==="large"?Zj(n,c.size,r,s,a,l):Qj(n,t,r,s,a,l)},$b=function(n,t,r,s,a,l){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,d=5/s.fontMetrics().ptPerEm,_=Math.max(t-o,r+o),h=Math.max(_/500*c,2*_-d);return z2(n,h,!0,s,a,l)},F8={"\\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}},fct=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 U8(e){return"isMiddle"in e}function fm(e,n){var t=um(e);if(t&&fct.has(t.text))return t;throw t?new Ke("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new Ke("Invalid delimiter type '"+e.type+"'",e)}at({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,n)=>{var t=fm(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:F8[e.funcName].size,mclass:F8[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Fe([e.mclass]):tA(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Ui(e.delim,e.mode));var t=new Ye("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=Qe(Bf[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function q8(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}at({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=e.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new Ke("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:fm(n[0],e).text,color:t}}});at({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=fm(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=Jt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,n)=>{q8(e);for(var t=qr(e.body,n,!0,["mopen","mclose"]),r=0,s=0,a=!1,l=0;l{q8(e);var t=wi(e.body,n);if(e.left!=="."){var r=new Ye("mo",[Ui(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Ye("mo",[Ui(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return wy(t)}});at({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=fm(n[0],e);if(!e.parser.leftrightDepth)throw new Ke("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=Qf(n,[]):(t=tA(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Ui("|","text"):Ui(e.delim,e.mode),r=new Ye("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var hm=(e,n)=>{var t=rd(wn(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,a,l,o=jo(e.body);if(r==="sout")a=Fe(["stretchy","sout"]),a.height=n.fontMetrics().defaultRuleThickness/s,l=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=or({number:.6,unit:"pt"},n),d=or({number:.35,unit:"ex"},n),_=n.havingBaseSizing();s=s/_.sizeMultiplier;var h=t.height+t.depth+c+d;t.style.paddingLeft=Qe(h/2+c);var m=Math.floor(1e3*h*s),g=ult(m),S=new Eo([new El("phase",g)],{width:"400em",height:Qe(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});a=Nl(["hide-tail"],[S],n),a.style.height=Qe(h),l=t.depth+c+d}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),a=Wlt(t,r,k,v,n),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle="solid",a.style.borderWidth=Qe(b)):r==="angl"&&b!==.049&&(a.style.borderTopWidth=Qe(b),a.style.borderRightWidth=Qe(b)),l=t.depth+v,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var w;if(e.backgroundColor)w=xn({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:t,shift:0}]});else{var x=/cancel|phase/.test(r)?["svg-align"]:[];w=xn({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:a,shift:l,wrapperClasses:x}]})}return/cancel/.test(r)&&(w.height=t.height,w.depth=t.depth),/cancel/.test(r)&&!o?Fe(["mord","cancel-lap"],[w],n):Fe(["mord"],[w],n)},_m=(e,n)=>{var t,r=new Ye(e.label.includes("colorbox")?"mpadded":"menclose",[Fn(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: "+Qe(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};at({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,a=Jt(n[0],"color-token").color,l=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,body:l}},htmlBuilder:hm,mathmlBuilder:_m});at({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,a=Jt(n[0],"color-token").color,l=Jt(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:l,borderColor:a,body:o}},htmlBuilder:hm,mathmlBuilder:_m});at({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\fbox",body:n[0]}}});at({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:hm,mathmlBuilder:_m});at({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:hm,mathmlBuilder:_m});at({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\angl",body:n[0]}}});var sA={};function Pa(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:a,mathmlBuilder:l}=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 Ke("{"+e.envName+"} can be used only in display mode.")},hct=new Set(["gather","gather*"]);function Ey(e){if(!e.includes("ed"))return!e.includes("*")}function Il(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:a,arraystretch:l,colSeparationType:o,autoTag:c,singleRow:d,emptySingleRow:_,maxNumCols:h,leqno:m}=n;if(e.gullet.beginGroup(),d||e.gullet.macros.set("\\cr","\\\\\\relax"),!l){var g=e.gullet.expandMacroAsText("\\arraystretch");if(g==null)l=1;else if(l=parseFloat(g),!l||l<0)throw new Ke("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var S=[],k=[S],v=[],b=[],w=c!=null?[]:void 0;function x(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){w&&(e.gullet.macros.get("\\df@tag")?(w.push(e.subparse([new sa("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):w.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(x(),b.push(G8(e));;){var j=e.parseExpression(!1,d?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var N={type:"ordgroup",mode:e.mode,body:j};t&&(N={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[N]}),S.push(N);var T=e.fetch().text;if(T==="&"){if(h&&S.length===h){if(d||o)throw new Ke("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(),S.length===1&&N.type==="styling"&&N.body.length===1&&N.body[0].type==="ordgroup"&&N.body[0].body.length===0&&(k.length>1||!_)&&k.pop(),b.length0&&(x+=.25),d.push({pos:x,isDashed:Xe[nt]})}for(C(l[0]),r=0;r0&&(H+=w,TXe))for(r=0;r=o)){var oe=void 0;if(s>0||n.hskipBeforeAndAfter){var ce,_e;oe=(ce=(_e=V)==null?void 0:_e.pregap)!=null?ce:m,oe!==0&&(Z=Fe(["arraycolsep"],[]),Z.style.width=Qe(oe),W.push(Z))}var ue=[];for(r=0;r0){for(var jt=nd("hline",t,_),pt=nd("hdashline",t,_),ot=[{type:"elem",elem:qe,shift:0}];d.length>0;){var tt=d.pop(),Ft=tt.pos-P;tt.isDashed?ot.push({type:"elem",elem:pt,shift:Ft}):ot.push({type:"elem",elem:jt,shift:Ft})}qe=xn({positionType:"individualShift",children:ot})}if(X.length===0)return Fe(["mord"],[qe],t);var ke=xn({positionType:"individualShift",children:X}),Re=Fe(["tag"],[ke],t);return To([qe,Re])},_ct={c:"center ",l:"left ",r:"right "},Ua=function(n,t){for(var r=[],s=new Ye("mtd",[],["mtr-glue"]),a=new Ye("mtd",[],["mml-eqn-num"]),l=0;l0){var S=n.cols,k="",v=!1,b=0,w=S.length;S[0].type==="separator"&&(m+="top ",b=1),S[S.length-1].type==="separator"&&(m+="bottom ",w-=1);for(var x=b;x0?"left ":"",m+=D[D.length-1].length>0?"right ":"";for(var O=1;O0&&g&&(v=1),r[S]={type:"align",align:k,pregap:v,postgap:0}}return l.colSeparationType=g?"align":"alignat",l};Pa({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=um(n[0]),r=t?[n[0]]:Jt(n[0],"ordgroup").body,s=r.map(function(l){var o=cm(l),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 Ke("Unknown column alignment: "+c,l)}),a={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Il(e.parser,a,Ny(e.envName))},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({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 Ke("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var a=Il(e.parser,r,Ny(e.envName)),l=Math.max(0,...a.body.map(o=>o.length));return a.cols=new Array(l).fill({type:"align",align:t}),n?{type:"leftright",mode:e.mode,body:[a],left:n[0],right:n[1],rightColor:void 0}:a},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=Il(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=um(n[0]),r=t?[n[0]]:Jt(n[0],"ordgroup").body,s=r.map(function(o){var c=cm(o),d=c.text;if("lc".includes(d))return{type:"align",align:d};throw new Ke("Unknown column alignment: "+d,o)});if(s.length>1)throw new Ke("{subarray} can contain only one column");var a={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},l=Il(e.parser,a,"script");if(l.body.length>0&&l.body[0].length>1)throw new Ke("{subarray} can contain only one column");return l},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({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=Il(e.parser,n,Ny(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:oA,htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){hct.has(e.envName)&&pm(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Ey(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Il(e.parser,n,"display")},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:oA,htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){pm(e);var n={autoTag:Ey(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Il(e.parser,n,"display")},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["CD"],props:{numArgs:0},handler(e){return pm(e),tct(e.parser)},htmlBuilder:Fa,mathmlBuilder:Ua});ne("\\nonumber","\\gdef\\@eqnsw{0}");ne("\\notag","\\nonumber");at({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new Ke(e.funcName+" valid only within array environment")}});var V8=sA;at({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];if(s.type!=="ordgroup")throw new Ke("Invalid environment name",s);for(var a="",l=0;l{var t=e.font,r=n.withFont(t);return wn(e.body,r)},cA=(e,n)=>{var t=e.font,r=n.withFont(t);return Fn(e.body,r)},W8={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};at({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=Sp(n[0]),a=r;return a in W8&&(a=W8[a]),{type:"font",mode:t.mode,font:a.slice(1),body:s}},htmlBuilder:lA,mathmlBuilder:cA});at({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"mclass",mode:t.mode,mclass:dm(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:jo(r)}}});at({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r,breakOnTokenText:s}=e,{mode:a}=t,l=t.parseExpression(!0,s);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:l}}},htmlBuilder:lA,mathmlBuilder:cA});var pct=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),a;a=n.havingStyle(r);var l=wn(e.numer,a,n);if(e.continued){var o=8.5/n.fontMetrics().ptPerEm,c=3.5/n.fontMetrics().ptPerEm;l.height=l.height0?S=3*m:S=7*m,k=n.fontMetrics().denom1):(h>0?(g=n.fontMetrics().num2,S=m):(g=n.fontMetrics().num3,S=3*m),k=n.fontMetrics().denom2);var v;if(_){var w=n.fontMetrics().axisHeight;g-l.depth-(w+.5*h){var t=new Ye("mfrac",[Fn(e.numer,n),Fn(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=or(e.barSize,n);t.setAttribute("linethickness",Qe(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var a=new Ye("mo",[new Dr(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(t),e.rightDelim!=null){var l=new Ye("mo",[new Dr(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return wy(s)}return t},uA=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};at({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],a=n[1],l,o=null,c=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":l=!0;break;case"\\\\atopfrac":l=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":l=!1,o="(",c=")";break;case"\\\\bracefrac":l=!1,o="\\{",c="\\}";break;case"\\\\brackfrac":l=!1,o="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var d=r==="\\cfrac",_=null;return d||r.startsWith("\\d")?_="display":r.startsWith("\\t")&&(_="text"),uA({type:"genfrac",mode:t.mode,numer:s,denom:a,continued:d,hasBarLine:l,leftDelim:o,rightDelim:c,barSize:null},_)},htmlBuilder:pct,mathmlBuilder:mct});at({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:n,funcName:t,token:r}=e,s;switch(t){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:s,token:r}}});var K8=["display","text","script","scriptscript"],Y8=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};at({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,n){var{parser:t}=e,r=n[4],s=n[5],a=Sp(n[0]),l=a.type==="atom"&&a.family==="open"?Y8(a.text):null,o=Sp(n[1]),c=o.type==="atom"&&o.family==="close"?Y8(o.text):null,d=Jt(n[2],"size"),_,h=null;d.isBlank?_=!0:(h=d.value,_=h.number>0);var m=null,g=n[3];if(g.type==="ordgroup"){if(g.body.length>0){var S=Jt(g.body[0],"textord");m=K8[Number(S.text)]}}else g=Jt(g,"textord"),m=K8[Number(g.text)];return uA({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:_,barSize:h,leftDelim:l,rightDelim:c},m)}});at({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,n){var{parser:t,funcName:r,token:s}=e;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:Jt(n[0],"size").value,token:s}}});at({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],a=Jt(n[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var l=n[2],o=a.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:l,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null}}});var dA=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?wn(e.sup,n.havingStyle(t.sup()),n):wn(e.sub,n.havingStyle(t.sub()),n),s=Jt(e.base,"horizBrace")):s=Jt(e,"horizBrace");var a=wn(s.base,n.havingBaseStyle(Pt.DISPLAY)),l=lm(s,n),o;if(s.isOver?o=xn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:l,wrapperClasses:["svg-align"]}]}):o=xn({positionType:"bottom",positionData:a.depth+.1+l.height,children:[{type:"elem",elem:l,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:a}]}),r){var c=Fe(["minner",s.isOver?"mover":"munder"],[o],n);s.isOver?o=xn({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=xn({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Fe(["minner",s.isOver?"mover":"munder"],[o],n)},gct=(e,n)=>{var t=om(e.label);return new Ye(e.isOver?"mover":"munder",[Fn(e.base,n),t])};at({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"horizBrace",mode:t.mode,label:r,isOver:r.includes("\\over"),base:n[0]}},htmlBuilder:dA,mathmlBuilder:gct});at({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=Jt(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:Rr(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=qr(e.body,n,!1);return Alt(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=zl(e.body,n);return t instanceof Ye||(t=new Ye("mrow",[t])),t.setAttribute("href",e.href),t}});at({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=Jt(n[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var s=[],a=0;a{var{parser:t,funcName:r,token:s}=e,a=Jt(n[0],"raw").string,l=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=a,o={command:"\\htmlClass",class:a};break;case"\\htmlId":c.id=a,o={command:"\\htmlId",id:a};break;case"\\htmlStyle":c.style=a,o={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var d=a.split(","),_=0;_{var t=qr(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Fe(r,t,n);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&s.setAttribute(a,e.attributes[a]);return s},mathmlBuilder:(e,n)=>zl(e.body,n)});at({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"htmlmathml",mode:t.mode,html:Rr(n[0]),mathml:Rr(n[1])}},htmlBuilder:(e,n)=>{var t=qr(e.html,n,!1);return To(t)},mathmlBuilder:(e,n)=>zl(e.mathml,n)});var Hb=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 Ke("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!Nj(r))throw new Ke("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};at({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,n,t)=>{var{parser:r}=e,s={number:0,unit:"em"},a={number:.9,unit:"em"},l={number:0,unit:"em"},o="";if(t[0])for(var c=Jt(t[0],"raw").string,d=c.split(","),_=0;_{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 a={height:Qe(t+r)};s>0&&(a.width=Qe(s)),r>0&&(a.verticalAlign=Qe(-r));var l=new blt(e.src,e.alt,a);return l.height=t,l.depth=r,l},mathmlBuilder:(e,n)=>{var t=new Ye("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",Qe(-s))),t.setAttribute("height",Qe(r+s)),e.width.number>0){var a=or(e.width,n);t.setAttribute("width",Qe(a))}return t.setAttribute("src",e.src),t}});at({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=Jt(n[0],"size");if(t.settings.strict){var a=r[1]==="m",l=s.value.unit==="mu";a?(l||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")):l&&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 Rj(e.dimension,n)},mathmlBuilder(e,n){var t=or(e.dimension,n);return new $j(t)}});at({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,n)=>{var t;e.alignment==="clap"?(t=Fe([],[wn(e.body,n)]),t=Fe(["inner"],[t],n)):t=Fe(["inner"],[wn(e.body,n)]);var r=Fe(["fix"],[]),s=Fe([e.alignment],[t,r],n),a=Fe(["strut"]);return a.style.height=Qe(s.height+s.depth),s.depth&&(a.style.verticalAlign=Qe(-s.depth)),s.children.unshift(a),s=Fe(["thinbox"],[s],n),Fe(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Ye("mpadded",[Fn(e.body,n)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",r+"width")}return t.setAttribute("width","0px"),t}});at({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){var{funcName:t,parser:r}=e,s=r.mode;r.switchMode("math");var a=t==="\\("?"\\)":"$",l=r.parseExpression(!1,a);return r.expect(a),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:l}}});at({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new Ke("Mismatched "+e.funcName)}});var X8=(e,n)=>{switch(n.style.size){case Pt.DISPLAY.size:return e.display;case Pt.TEXT.size:return e.text;case Pt.SCRIPT.size:return e.script;case Pt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};at({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:Rr(n[0]),text:Rr(n[1]),script:Rr(n[2]),scriptscript:Rr(n[3])}},htmlBuilder:(e,n)=>{var t=X8(e,n),r=qr(t,n,!1);return To(r)},mathmlBuilder:(e,n)=>{var t=X8(e,n);return zl(t,n)}});var fA=(e,n,t,r,s,a,l)=>{e=Fe([],[e]);var o=t&&jo(t),c,d;if(n){var _=wn(n,r.havingStyle(s.sup()),r);d={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-_.depth)}}if(t){var h=wn(t,r.havingStyle(s.sub()),r);c={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}var m;if(d&&c){var g=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+l;m=xn({positionType:"bottom",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Qe(-a)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:Qe(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var S=e.height-l;m=xn({positionType:"top",positionData:S,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Qe(-a)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(d){var k=e.depth+l;m=xn({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:Qe(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var v=[m];if(c&&a!==0&&!o){var b=Fe(["mspace"],[],r);b.style.marginRight=Qe(a),v.unshift(b)}return Fe(["mop","op-limits"],v,r)},hA=new Set(["\\smallint"]),xd=(e,n)=>{var t,r,s=!1,a;e.type==="supsub"?(t=e.sup,r=e.sub,a=Jt(e.base,"op"),s=!0):a=Jt(e,"op");var l=n.style,o=!1;l.size===Pt.DISPLAY.size&&a.symbol&&!hA.has(a.name)&&(o=!0);var c,d;if(a.symbol){var _=o?"Size2-Regular":"Size1-Regular",h="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(h=a.name.slice(1),a.name=h==="oiint"?"\\iint":"\\iiint"),c=Ts(a.name,_,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),d=c.italic,h.length>0){var m=Lj(h+"Size"+(o?"2":"1"),n);c=xn({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:m,shift:o?.08:0}]}),a.name="\\"+h,c.classes.unshift("mop"),c.italic=d}}else if(a.body){var g=qr(a.body,n,!0);g.length===1&&g[0]instanceof bi?(c=g[0],c.classes[0]="mop"):c=Fe(["mop"],g,n)}else{for(var S=[],k=1;k{var t;if(e.symbol)t=new Ye("mo",[Ui(e.name,e.mode)]),hA.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Ye("mo",wi(e.body,n));else{t=new Ye("mi",[new Dr(e.name.slice(1))]);var r=new Ye("mo",[Ui("⁡","text")]);e.parentIsSupSub?t=new Ye("mrow",[t,r]):t=Bj([t,r])}return t},bct={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};at({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=r;return s.length===1&&(s=bct[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:xd,mathmlBuilder:Lh});at({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Rr(r)}},htmlBuilder:xd,mathmlBuilder:Lh});var vct={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};at({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:xd,mathmlBuilder:Lh});at({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:xd,mathmlBuilder:Lh});at({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:n,funcName:t}=e,r=t;return r.length===1&&(r=vct[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:xd,mathmlBuilder:Lh});var _A=(e,n)=>{var t,r,s=!1,a;e.type==="supsub"?(t=e.sup,r=e.sub,a=Jt(e.base,"operatorname"),s=!0):a=Jt(e,"operatorname");var l;if(a.body.length>0){for(var o=a.body.map(h=>{var m="text"in h?h.text:void 0;return typeof m=="string"?{type:"textord",mode:h.mode,text:m}:h}),c=qr(o,n.withFont("mathrm"),!0),d=0;d{for(var t=wi(e.body,n.withFont("mathrm")),r=!0,s=0;s_.toText()).join("");t=[new Dr(o)]}var c=new Ye("mi",t);c.setAttribute("mathvariant","normal");var d=new Ye("mo",[Ui("⁡","text")]);return e.parentIsSupSub?new Ye("mrow",[c,d]):Bj([c,d])};at({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"operatorname",mode:t.mode,body:Rr(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:_A,mathmlBuilder:xct});ne("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Fc({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?To(qr(e.body,n,!1)):Fe(["mord"],qr(e.body,n,!0),n)},mathmlBuilder(e,n){return zl(e.body,n,!0)}});at({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,n){var{parser:t}=e,r=n[0];return{type:"overline",mode:t.mode,body:r}},htmlBuilder(e,n){var t=wn(e.body,n.havingCrampedStyle()),r=nd("overline-line",n),s=n.fontMetrics().defaultRuleThickness,a=xn({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Fe(["mord","overline"],[a],n)},mathmlBuilder(e,n){var t=new Ye("mo",[new Dr("‾")]);t.setAttribute("stretchy","true");var r=new Ye("mover",[Fn(e.body,n),t]);return r.setAttribute("accent","true"),r}});at({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"phantom",mode:t.mode,body:Rr(r)}},htmlBuilder:(e,n)=>{var t=qr(e.body,n.withPhantom(),!1);return To(t)},mathmlBuilder:(e,n)=>{var t=wi(e.body,n);return new Ye("mphantom",t)}});ne("\\hphantom","\\smash{\\phantom{#1}}");at({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"vphantom",mode:t.mode,body:r}},htmlBuilder:(e,n)=>{var t=Fe(["inner"],[wn(e.body,n.withPhantom())]),r=Fe(["fix"],[]);return Fe(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=wi(Rr(e.body),n),r=new Ye("mphantom",t),s=new Ye("mpadded",[r]);return s.setAttribute("width","0px"),s}});at({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=Jt(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=wn(e.body,n),r=or(e.dy,n);return xn({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ye("mpadded",[Fn(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});at({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});at({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,n,t){var{parser:r}=e,s=t[0],a=Jt(n[0],"size"),l=Jt(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&Jt(s,"size").value,width:a.value,height:l.value}},htmlBuilder(e,n){var t=Fe(["mord","rule"],[],n),r=or(e.width,n),s=or(e.height,n),a=e.shift?or(e.shift,n):0;return t.style.borderRightWidth=Qe(r),t.style.borderTopWidth=Qe(s),t.style.bottom=Qe(a),t.width=r,t.height=s+a,t.depth=-a,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,a=n.color&&n.getColor()||"black",l=new Ye("mspace");l.setAttribute("mathbackground",a),l.setAttribute("width",Qe(t)),l.setAttribute("height",Qe(r));var o=new Ye("mpadded",[l]);return s>=0?o.setAttribute("height",Qe(s)):(o.setAttribute("height",Qe(s)),o.setAttribute("depth",Qe(-s))),o.setAttribute("voffset",Qe(s)),o}});function pA(e,n,t){for(var r=qr(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,a=0;a{var t=n.havingSize(e.size);return pA(e.body,t,n)};at({type:"sizing",names:Z8,props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{breakOnTokenText:t,funcName:r,parser:s}=e,a=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:Z8.indexOf(r)+1,body:a}},htmlBuilder:yct,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=wi(e.body,t),s=new Ye("mstyle",r);return s.setAttribute("mathsize",Qe(t.sizeMultiplier)),s}});at({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,n,t)=>{var{parser:r}=e,s=!1,a=!1,l=t[0]&&Jt(t[0],"ordgroup");if(l)for(var o,c=0;c{var t=Fe([],[wn(e.body,n)]);if(!e.smashHeight&&!e.smashDepth)return t;if(e.smashHeight&&(t.height=0),e.smashDepth&&(t.depth=0),e.smashHeight&&e.smashDepth)return Fe(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Ye("mpadded",[Fn(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});at({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r}=e,s=t[0],a=n[0];return{type:"sqrt",mode:r.mode,body:a,index:s}},htmlBuilder(e,n){var t=wn(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=rd(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,a=s;n.style.idt.height+t.depth+l&&(l=(l+h-t.height-t.depth)/2);var m=c.height-t.height-l-d;t.style.paddingLeft=Qe(_);var g=xn({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+m)},{type:"elem",elem:c},{type:"kern",size:d}]});if(e.index){var S=n.havingStyle(Pt.SCRIPTSCRIPT),k=wn(e.index,S,n),v=.6*(g.height-g.depth),b=xn({positionType:"shift",positionData:-v,children:[{type:"elem",elem:k}]}),w=Fe(["root"],[b]);return Fe(["mord","sqrt"],[w,g],n)}else return Fe(["mord","sqrt"],[g],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Ye("mroot",[Fn(t,n),Fn(r,n)]):new Ye("msqrt",[Fn(t,n)])}});var j2={display:Pt.DISPLAY,text:Pt.TEXT,script:Pt.SCRIPT,scriptscript:Pt.SCRIPTSCRIPT};function wct(e){return e in j2}at({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,n){var{breakOnTokenText:t,funcName:r,parser:s}=e,a=s.parseExpression(!0,t),l=r.slice(1,r.length-5);if(!wct(l))throw new Error("Unknown style: "+l);return{type:"styling",mode:s.mode,style:l,body:a}},htmlBuilder(e,n){var t=j2[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),pA(e.body,r,n)},mathmlBuilder(e,n){var t=j2[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=wi(e.body,r),a=new Ye("mstyle",s),l={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=l[e.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});var Sct=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===Pt.DISPLAY.size||r.alwaysHandleSupSub);return s?xd:null}else if(r.type==="operatorname"){var a=r.alwaysHandleSupSub&&(t.style.size===Pt.DISPLAY.size||r.limits);return a?_A:null}else{if(r.type==="accent")return jo(r.base)?ky:null;if(r.type==="horizBrace"){var l=!n.sub;return l===r.isOver?dA:null}else return null}else return null};Fc({type:"supsub",htmlBuilder(e,n){var t=Sct(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:a}=e,l=wn(r,n),o,c,d=n.fontMetrics(),_=0,h=0,m=r&&jo(r);if(s){var g=n.havingStyle(n.style.sup());o=wn(s,g,n),m||(_=l.height-g.fontMetrics().supDrop*g.sizeMultiplier/n.sizeMultiplier)}if(a){var S=n.havingStyle(n.style.sub());c=wn(a,S,n),m||(h=l.depth+S.fontMetrics().subDrop*S.sizeMultiplier/n.sizeMultiplier)}var k;n.style===Pt.DISPLAY?k=d.sup1:n.style.cramped?k=d.sup3:k=d.sup2;var v=n.sizeMultiplier,b=Qe(.5/d.ptPerEm/v),w=null;if(c){var x=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(l instanceof bi||x){var C;w=Qe(-((C=l.italic)!=null?C:0))}}var j;if(o&&c){_=Math.max(_,k,o.depth+.25*d.xHeight),h=Math.max(h,d.sub2);var N=d.defaultRuleThickness,T=4*N;if(_-o.depth-(c.height-h)0&&(_+=z,h-=z)}var D=[{type:"elem",elem:c,shift:h,marginRight:b,marginLeft:w},{type:"elem",elem:o,shift:-_,marginRight:b}];j=xn({positionType:"individualShift",children:D})}else if(c){h=Math.max(h,d.sub1,c.height-.8*d.xHeight);var O=[{type:"elem",elem:c,marginLeft:w,marginRight:b}];j=xn({positionType:"shift",positionData:h,children:O})}else if(o)_=Math.max(_,k,o.depth+.25*d.xHeight),j=xn({positionType:"shift",positionData:-_,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var H=k2(l,"right")||"mord";return Fe([H],[l,Fe(["msupsub"],[j])],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 a=[Fn(e.base,n)];e.sub&&a.push(Fn(e.sub,n)),e.sup&&a.push(Fn(e.sup,n));var l;if(t)l=r?"mover":"munder";else if(e.sub)if(e.sup){var d=e.base;d&&d.type==="op"&&d.limits&&n.style===Pt.DISPLAY||d&&d.type==="operatorname"&&d.alwaysHandleSupSub&&(n.style===Pt.DISPLAY||d.limits)?l="munderover":l="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===Pt.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===Pt.DISPLAY)?l="munder":l="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===Pt.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===Pt.DISPLAY)?l="mover":l="msup"}return new Ye(l,a)}});Fc({type:"atom",htmlBuilder(e,n){return xy(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Ye("mo",[Ui(e.text,e.mode)]);if(e.family==="bin"){var r=Sy(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 mA={mi:"italic",mn:"normal",mtext:"normal"};Fc({type:"mathord",htmlBuilder(e,n){return am(e,n,"mathord")},mathmlBuilder(e,n){var t=new Ye("mi",[Ui(e.text,e.mode,n)]),r=Sy(e,n)||"italic";return r!==mA[t.type]&&t.setAttribute("mathvariant",r),t}});Fc({type:"textord",htmlBuilder(e,n){return am(e,n,"textord")},mathmlBuilder(e,n){var t=Ui(e.text,e.mode,n),r=Sy(e,n)||"normal",s;return e.mode==="text"?s=new Ye("mtext",[t]):/[0-9]/.test(e.text)?s=new Ye("mn",[t]):e.text==="\\prime"?s=new Ye("mo",[t]):s=new Ye("mi",[t]),r!==mA[s.type]&&s.setAttribute("mathvariant",r),s}});var Pb={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Fb={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Fc({type:"spacing",htmlBuilder(e,n){if(Fb.hasOwnProperty(e.text)){var t=Fb[e.text].className||"";if(e.mode==="text"){var r=am(e,n,"textord");return r.classes.push(t),r}else return Fe(["mspace",t],[xy(e.text,e.mode,n)],n)}else{if(Pb.hasOwnProperty(e.text))return Fe(["mspace",Pb[e.text]],[],n);throw new Ke('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(Fb.hasOwnProperty(e.text))t=new Ye("mtext",[new Dr(" ")]);else{if(Pb.hasOwnProperty(e.text))return new Ye("mspace");throw new Ke('Unknown type of space "'+e.text+'"')}return t}});var Q8=()=>{var e=new Ye("mtd",[]);return e.setAttribute("width","50%"),e};Fc({type:"tag",mathmlBuilder(e,n){var t=new Ye("mtable",[new Ye("mtr",[Q8(),new Ye("mtd",[zl(e.body,n)]),Q8(),new Ye("mtd",[zl(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var J8={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},ek={"\\textbf":"textbf","\\textmd":"textmd"},kct={"\\textit":"textit","\\textup":"textup"},tk=(e,n)=>{var t=e.font;if(t){if(J8[t])return n.withTextFontFamily(J8[t]);if(ek[t])return n.withTextFontWeight(ek[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(kct[t])};at({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"text",mode:t.mode,body:Rr(s),font:r}},htmlBuilder(e,n){var t=tk(e,n),r=qr(e.body,t,!0);return Fe(["mord","text"],r,t)},mathmlBuilder(e,n){var t=tk(e,n);return zl(e.body,t)}});at({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"underline",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=wn(e.body,n),r=nd("underline-line",n),s=n.fontMetrics().defaultRuleThickness,a=xn({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Fe(["mord","underline"],[a],n)},mathmlBuilder(e,n){var t=new Ye("mo",[new Dr("‾")]);t.setAttribute("stretchy","true");var r=new Ye("munder",[Fn(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});at({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"vcenter",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=wn(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return xn({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ye("mpadded",[Fn(e.body,n)],["vcenter"]);return new Ye("mrow",[t])}});at({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new Ke("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=nk(e),r=[],s=n.havingStyle(n.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),Sl=Oj,gA=`[ \r - ]`,Cct="\\\\[a-zA-Z@]+",Ect="\\\\[^\uD800-\uDFFF]",Nct="("+Cct+")"+gA+"*",zct=`\\\\( -|[ \r ]+ -?)[ \r ]*`,A2="[̀-ͯ]",jct=new RegExp(A2+"+$"),Act="("+gA+"+)|"+(zct+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(A2+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(A2+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Nct)+("|"+Ect+")");class rk{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(Act,"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 sa("EOF",new Xs(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new Ke("Unexpected character: '"+n[t]+"'",new sa(n[t],new Xs(this,t,t+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[s]===14){var a=n.indexOf(` -`,this.tokenRegex.lastIndex);return a===-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=a+1,this.lex()}return new sa(s,new Xs(this,t,this.tokenRegex.lastIndex))}}class Tct{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 Ke("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 a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(n)&&(a[n]=this.current[n])}t==null?delete this.current[n]:this.current[n]=t}}var Mct=iA;ne("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});ne("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});ne("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});ne("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});ne("\\@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}});ne("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ne("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var sk={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};ne("\\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 Ke("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=sk[n.text],r==null||r>=t)throw new Ke("Invalid base-"+t+" digit "+n.text);for(var s;(s=sk[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new Ke("\\newcommand's first argument must be a macro name");var a=s[0].text,l=e.isDefined(a);if(l&&!n)throw new Ke("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!l&&!t)throw new Ke("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var o=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var c="",d=e.expandNextToken();d.text!=="]"&&d.text!=="EOF";)c+=d.text,d=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new Ke("Invalid number of arguments: "+c);o=parseInt(c),s=e.consumeArg().tokens}return l&&r||e.macros.set(a,{tokens:s,numArgs:o}),""};ne("\\newcommand",e=>zy(e,!1,!0,!1));ne("\\renewcommand",e=>zy(e,!0,!1,!1));ne("\\providecommand",e=>zy(e,!0,!0,!0));ne("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});ne("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});ne("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),Sl[t],Qn.math[t],Qn.text[t]),""});ne("\\bgroup","{");ne("\\egroup","}");ne("~","\\nobreakspace");ne("\\lq","`");ne("\\rq","'");ne("\\aa","\\r a");ne("\\AA","\\r A");ne("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ne("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ne("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");ne("ℬ","\\mathscr{B}");ne("ℰ","\\mathscr{E}");ne("ℱ","\\mathscr{F}");ne("ℋ","\\mathscr{H}");ne("ℐ","\\mathscr{I}");ne("ℒ","\\mathscr{L}");ne("ℳ","\\mathscr{M}");ne("ℛ","\\mathscr{R}");ne("ℭ","\\mathfrak{C}");ne("ℌ","\\mathfrak{H}");ne("ℨ","\\mathfrak{Z}");ne("\\Bbbk","\\Bbb{k}");ne("\\llap","\\mathllap{\\textrm{#1}}");ne("\\rlap","\\mathrlap{\\textrm{#1}}");ne("\\clap","\\mathclap{\\textrm{#1}}");ne("\\mathstrut","\\vphantom{(}");ne("\\underbar","\\underline{\\text{#1}}");ne("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ne("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");ne("\\ne","\\neq");ne("≠","\\neq");ne("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");ne("∉","\\notin");ne("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");ne("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");ne("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");ne("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");ne("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");ne("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");ne("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");ne("⟂","\\perp");ne("‼","\\mathclose{!\\mkern-0.8mu!}");ne("∌","\\notni");ne("⌜","\\ulcorner");ne("⌝","\\urcorner");ne("⌞","\\llcorner");ne("⌟","\\lrcorner");ne("©","\\copyright");ne("®","\\textregistered");ne("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ne("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ne("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ne("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ne("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ne("⋮","\\vdots");ne("\\varGamma","\\mathit{\\Gamma}");ne("\\varDelta","\\mathit{\\Delta}");ne("\\varTheta","\\mathit{\\Theta}");ne("\\varLambda","\\mathit{\\Lambda}");ne("\\varXi","\\mathit{\\Xi}");ne("\\varPi","\\mathit{\\Pi}");ne("\\varSigma","\\mathit{\\Sigma}");ne("\\varUpsilon","\\mathit{\\Upsilon}");ne("\\varPhi","\\mathit{\\Phi}");ne("\\varPsi","\\mathit{\\Psi}");ne("\\varOmega","\\mathit{\\Omega}");ne("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ne("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ne("\\boxed","\\fbox{$\\displaystyle{#1}$}");ne("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ne("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ne("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ne("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ne("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var ik={",":"\\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"},Rct=new Set(["bin","rel"]);ne("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in ik?n=ik[t]:(t.slice(0,4)==="\\not"||t in Qn.math&&Rct.has(Qn.math[t].group))&&(n="\\dotsb"),n});var jy={")":!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};ne("\\dotso",function(e){var n=e.future().text;return n in jy?"\\ldots\\,":"\\ldots"});ne("\\dotsc",function(e){var n=e.future().text;return n in jy&&n!==","?"\\ldots\\,":"\\ldots"});ne("\\cdots",function(e){var n=e.future().text;return n in jy?"\\@cdots\\,":"\\@cdots"});ne("\\dotsb","\\cdots");ne("\\dotsm","\\cdots");ne("\\dotsi","\\!\\cdots");ne("\\dotsx","\\ldots\\,");ne("\\DOTSI","\\relax");ne("\\DOTSB","\\relax");ne("\\DOTSX","\\relax");ne("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ne("\\,","\\tmspace+{3mu}{.1667em}");ne("\\thinspace","\\,");ne("\\>","\\mskip{4mu}");ne("\\:","\\tmspace+{4mu}{.2222em}");ne("\\medspace","\\:");ne("\\;","\\tmspace+{5mu}{.2777em}");ne("\\thickspace","\\;");ne("\\!","\\tmspace-{3mu}{.1667em}");ne("\\negthinspace","\\!");ne("\\negmedspace","\\tmspace-{4mu}{.2222em}");ne("\\negthickspace","\\tmspace-{5mu}{.277em}");ne("\\enspace","\\kern.5em ");ne("\\enskip","\\hskip.5em\\relax");ne("\\quad","\\hskip1em\\relax");ne("\\qquad","\\hskip2em\\relax");ne("\\tag","\\@ifstar\\tag@literal\\tag@paren");ne("\\tag@paren","\\tag@literal{({#1})}");ne("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Ke("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ne("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ne("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ne("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ne("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ne("\\newline","\\\\\\relax");ne("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var bA=Qe(Ma["Main-Regular"][84][1]-.7*Ma["Main-Regular"][65][1]);ne("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+bA+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ne("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+bA+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ne("\\hspace","\\@ifstar\\@hspacer\\@hspace");ne("\\@hspace","\\hskip #1\\relax");ne("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ne("\\ordinarycolon",":");ne("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ne("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ne("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ne("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ne("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ne("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ne("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ne("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ne("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ne("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ne("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ne("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ne("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ne("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ne("∷","\\dblcolon");ne("∹","\\eqcolon");ne("≔","\\coloneqq");ne("≕","\\eqqcolon");ne("⩴","\\Coloneqq");ne("\\ratio","\\vcentcolon");ne("\\coloncolon","\\dblcolon");ne("\\colonequals","\\coloneqq");ne("\\coloncolonequals","\\Coloneqq");ne("\\equalscolon","\\eqqcolon");ne("\\equalscoloncolon","\\Eqqcolon");ne("\\colonminus","\\coloneq");ne("\\coloncolonminus","\\Coloneq");ne("\\minuscolon","\\eqcolon");ne("\\minuscoloncolon","\\Eqcolon");ne("\\coloncolonapprox","\\Colonapprox");ne("\\coloncolonsim","\\Colonsim");ne("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ne("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ne("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ne("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ne("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");ne("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ne("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ne("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ne("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ne("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ne("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ne("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ne("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ne("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");ne("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");ne("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");ne("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");ne("\\nleqq","\\html@mathml{\\@nleqq}{≰}");ne("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");ne("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");ne("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");ne("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");ne("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");ne("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");ne("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");ne("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");ne("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");ne("\\imath","\\html@mathml{\\@imath}{ı}");ne("\\jmath","\\html@mathml{\\@jmath}{ȷ}");ne("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");ne("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");ne("⟦","\\llbracket");ne("⟧","\\rrbracket");ne("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");ne("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");ne("⦃","\\lBrace");ne("⦄","\\rBrace");ne("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");ne("⦵","\\minuso");ne("\\darr","\\downarrow");ne("\\dArr","\\Downarrow");ne("\\Darr","\\Downarrow");ne("\\lang","\\langle");ne("\\rang","\\rangle");ne("\\uarr","\\uparrow");ne("\\uArr","\\Uparrow");ne("\\Uarr","\\Uparrow");ne("\\N","\\mathbb{N}");ne("\\R","\\mathbb{R}");ne("\\Z","\\mathbb{Z}");ne("\\alef","\\aleph");ne("\\alefsym","\\aleph");ne("\\Alpha","\\mathrm{A}");ne("\\Beta","\\mathrm{B}");ne("\\bull","\\bullet");ne("\\Chi","\\mathrm{X}");ne("\\clubs","\\clubsuit");ne("\\cnums","\\mathbb{C}");ne("\\Complex","\\mathbb{C}");ne("\\Dagger","\\ddagger");ne("\\diamonds","\\diamondsuit");ne("\\empty","\\emptyset");ne("\\Epsilon","\\mathrm{E}");ne("\\Eta","\\mathrm{H}");ne("\\exist","\\exists");ne("\\harr","\\leftrightarrow");ne("\\hArr","\\Leftrightarrow");ne("\\Harr","\\Leftrightarrow");ne("\\hearts","\\heartsuit");ne("\\image","\\Im");ne("\\infin","\\infty");ne("\\Iota","\\mathrm{I}");ne("\\isin","\\in");ne("\\Kappa","\\mathrm{K}");ne("\\larr","\\leftarrow");ne("\\lArr","\\Leftarrow");ne("\\Larr","\\Leftarrow");ne("\\lrarr","\\leftrightarrow");ne("\\lrArr","\\Leftrightarrow");ne("\\Lrarr","\\Leftrightarrow");ne("\\Mu","\\mathrm{M}");ne("\\natnums","\\mathbb{N}");ne("\\Nu","\\mathrm{N}");ne("\\Omicron","\\mathrm{O}");ne("\\plusmn","\\pm");ne("\\rarr","\\rightarrow");ne("\\rArr","\\Rightarrow");ne("\\Rarr","\\Rightarrow");ne("\\real","\\Re");ne("\\reals","\\mathbb{R}");ne("\\Reals","\\mathbb{R}");ne("\\Rho","\\mathrm{P}");ne("\\sdot","\\cdot");ne("\\sect","\\S");ne("\\spades","\\spadesuit");ne("\\sub","\\subset");ne("\\sube","\\subseteq");ne("\\supe","\\supseteq");ne("\\Tau","\\mathrm{T}");ne("\\thetasym","\\vartheta");ne("\\weierp","\\wp");ne("\\Zeta","\\mathrm{Z}");ne("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ne("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ne("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ne("\\bra","\\mathinner{\\langle{#1}|}");ne("\\ket","\\mathinner{|{#1}\\rangle}");ne("\\braket","\\mathinner{\\langle{#1}\\rangle}");ne("\\Bra","\\left\\langle#1\\right|");ne("\\Ket","\\left|#1\\right\\rangle");var vA=e=>n=>{var t=n.consumeArg().tokens,r=n.consumeArg().tokens,s=n.consumeArg().tokens,a=n.consumeArg().tokens,l=n.macros.get("|"),o=n.macros.get("\\|");n.macros.beginGroup();var c=h=>m=>{e&&(m.macros.set("|",l),s.length&&m.macros.set("\\|",o));var g=h;if(!h&&s.length){var S=m.future();S.text==="|"&&(m.popToken(),g=!0)}return{tokens:g?s:r,numArgs:0}};n.macros.set("|",c(!1)),s.length&&n.macros.set("\\|",c(!0));var d=n.consumeArg().tokens,_=n.expandTokens([...a,...d,...t]);return n.macros.endGroup(),{tokens:_.reverse(),numArgs:0}};ne("\\bra@ket",vA(!1));ne("\\bra@set",vA(!0));ne("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ne("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ne("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ne("\\angln","{\\angl n}");ne("\\blue","\\textcolor{##6495ed}{#1}");ne("\\orange","\\textcolor{##ffa500}{#1}");ne("\\pink","\\textcolor{##ff00af}{#1}");ne("\\red","\\textcolor{##df0030}{#1}");ne("\\green","\\textcolor{##28ae7b}{#1}");ne("\\gray","\\textcolor{gray}{#1}");ne("\\purple","\\textcolor{##9d38bd}{#1}");ne("\\blueA","\\textcolor{##ccfaff}{#1}");ne("\\blueB","\\textcolor{##80f6ff}{#1}");ne("\\blueC","\\textcolor{##63d9ea}{#1}");ne("\\blueD","\\textcolor{##11accd}{#1}");ne("\\blueE","\\textcolor{##0c7f99}{#1}");ne("\\tealA","\\textcolor{##94fff5}{#1}");ne("\\tealB","\\textcolor{##26edd5}{#1}");ne("\\tealC","\\textcolor{##01d1c1}{#1}");ne("\\tealD","\\textcolor{##01a995}{#1}");ne("\\tealE","\\textcolor{##208170}{#1}");ne("\\greenA","\\textcolor{##b6ffb0}{#1}");ne("\\greenB","\\textcolor{##8af281}{#1}");ne("\\greenC","\\textcolor{##74cf70}{#1}");ne("\\greenD","\\textcolor{##1fab54}{#1}");ne("\\greenE","\\textcolor{##0d923f}{#1}");ne("\\goldA","\\textcolor{##ffd0a9}{#1}");ne("\\goldB","\\textcolor{##ffbb71}{#1}");ne("\\goldC","\\textcolor{##ff9c39}{#1}");ne("\\goldD","\\textcolor{##e07d10}{#1}");ne("\\goldE","\\textcolor{##a75a05}{#1}");ne("\\redA","\\textcolor{##fca9a9}{#1}");ne("\\redB","\\textcolor{##ff8482}{#1}");ne("\\redC","\\textcolor{##f9685d}{#1}");ne("\\redD","\\textcolor{##e84d39}{#1}");ne("\\redE","\\textcolor{##bc2612}{#1}");ne("\\maroonA","\\textcolor{##ffbde0}{#1}");ne("\\maroonB","\\textcolor{##ff92c6}{#1}");ne("\\maroonC","\\textcolor{##ed5fa6}{#1}");ne("\\maroonD","\\textcolor{##ca337c}{#1}");ne("\\maroonE","\\textcolor{##9e034e}{#1}");ne("\\purpleA","\\textcolor{##ddd7ff}{#1}");ne("\\purpleB","\\textcolor{##c6b9fc}{#1}");ne("\\purpleC","\\textcolor{##aa87ff}{#1}");ne("\\purpleD","\\textcolor{##7854ab}{#1}");ne("\\purpleE","\\textcolor{##543b78}{#1}");ne("\\mintA","\\textcolor{##f5f9e8}{#1}");ne("\\mintB","\\textcolor{##edf2df}{#1}");ne("\\mintC","\\textcolor{##e0e5cc}{#1}");ne("\\grayA","\\textcolor{##f6f7f7}{#1}");ne("\\grayB","\\textcolor{##f0f1f2}{#1}");ne("\\grayC","\\textcolor{##e3e5e6}{#1}");ne("\\grayD","\\textcolor{##d6d8da}{#1}");ne("\\grayE","\\textcolor{##babec2}{#1}");ne("\\grayF","\\textcolor{##888d93}{#1}");ne("\\grayG","\\textcolor{##626569}{#1}");ne("\\grayH","\\textcolor{##3b3e40}{#1}");ne("\\grayI","\\textcolor{##21242c}{#1}");ne("\\kaBlue","\\textcolor{##314453}{#1}");ne("\\kaGreen","\\textcolor{##71B307}{#1}");var xA={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Dct{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 Tct(Mct,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new rk(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 sa("EOF",r.loc)),this.pushTokens(s),new sa("",Xs.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(),a,l=0,o=0;do{if(a=this.popToken(),t.push(a),a.text==="{")++l;else if(a.text==="}"){if(--l,l===-1)throw new Ke("Extra }",a)}else if(a.text==="EOF")throw new Ke("Unexpected end of input in a macro argument, expected '"+(n&&r?n[o]:"}")+"'",a);if(n&&r)if((l===0||l===1&&n[o]==="{")&&a.text===n[o]){if(++o,o===n.length){t.splice(-o,o);break}}else o=0}while(l!==0||r);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:a}}consumeArgs(n,t){if(t){if(t.length!==n+1)throw new Ke("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new Ke("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 Ke("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var a=s.tokens,l=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){a=a.slice();for(var o=a.length-1;o>=0;--o){var c=a[o];if(c.text==="#"){if(o===0)throw new Ke("Incomplete placeholder at end of macro body",c);if(c=a[--o],c.text==="#")a.splice(o+1,1);else if(/^[1-9]$/.test(c.text))a.splice(o,2,...l[+c.text-1]);else throw new Ke("Not a valid argument number",c)}}}return this.pushTokens(a),a.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 sa(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 a=0;if(s.includes("#"))for(var l=s.replace(/##/g,"");l.includes("#"+(a+1));)++a;for(var o=new rk(s,this.settings),c=[],d=o.lex();d.text!=="EOF";)c.push(d),d=o.lex();c.reverse();var _={tokens:c,numArgs:a};return _}return s}isDefined(n){return this.macros.has(n)||Sl.hasOwnProperty(n)||Qn.math.hasOwnProperty(n)||Qn.text.hasOwnProperty(n)||xA.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:Sl.hasOwnProperty(n)&&!Sl[n].primitive}}var ak=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,b0=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Ub={"́":{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"}},ok={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class mm{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 Dct(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 Ke("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 sa("}")),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(mm.endOfExpression.has(s.text)||t&&s.text===t||n&&Sl[s.text]&&Sl[s.text].infix)break;var a=this.parseAtom(t);if(a){if(a.type==="internal")continue}else break;r.push(a)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(n){for(var t=-1,r,s=0;s=128)this.settings.strict&&(Ej(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)),l={type:"textord",mode:"text",loc:Xs.range(n),text:t};else return null;if(this.consume(),a)for(var _=0;_0?{type:"text",value:N}:void 0),N===!1?m.lastIndex=C+1:(S!==C&&w.push({type:"text",value:d.value.slice(S,C)}),Array.isArray(N)?w.push(...N):N&&w.push(N),S=C+x[0].length,b=!0),!m.global)break;x=m.exec(d.value)}return b?(S?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=ck(e,"(");let a=ck(e,")");for(;r!==-1&&s>a;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),a++;return[e,t]}function kA(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Ac(t)||Jp(t))&&(!n||t!==47)}CA.peek=hut;function iut(){this.buffer()}function aut(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function out(){this.buffer()}function lut(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function cut(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=na(this.sliceSerialize(e)).toLowerCase(),t.label=n}function uut(e){this.exit(e)}function dut(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=na(this.sliceSerialize(e)).toLowerCase(),t.label=n}function fut(e){this.exit(e)}function hut(){return"["}function CA(e,n,t,r){const s=t.createTracker(r);let a=s.move("[^");const l=t.enter("footnoteReference"),o=t.enter("reference");return a+=s.move(t.safe(t.associationId(e),{after:"]",before:a})),o(),l(),a+=s.move("]"),a}function _ut(){return{enter:{gfmFootnoteCallString:iut,gfmFootnoteCall:aut,gfmFootnoteDefinitionLabelString:out,gfmFootnoteDefinition:lut},exit:{gfmFootnoteCallString:cut,gfmFootnoteCall:uut,gfmFootnoteDefinitionLabelString:dut,gfmFootnoteDefinition:fut}}}function put(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:CA},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,a,l){const o=a.createTracker(l);let c=o.move("[^");const d=a.enter("footnoteDefinition"),_=a.enter("label");return c+=o.move(a.safe(a.associationId(r),{before:c,after:"]"})),_(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((n?` -`:" ")+a.indentLines(a.containerFlow(r,o.current()),n?EA:mut))),d(),c}}function mut(e,n,t){return n===0?e:EA(e,n,t)}function EA(e,n,t){return(t?"":" ")+e}const gut=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];NA.peek=wut;function but(){return{canContainEols:["delete"],enter:{strikethrough:xut},exit:{strikethrough:yut}}}function vut(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:gut}],handlers:{delete:NA}}}function xut(e){this.enter({type:"delete",children:[]},e)}function yut(e){this.exit(e)}function NA(e,n,t,r){const s=t.createTracker(r),a=t.enter("strikethrough");let l=s.move("~~");return l+=t.containerPhrasing(e,{...s.current(),before:l,after:"~"}),l+=s.move("~~"),a(),l}function wut(){return"~"}function Sut(e){return e.length}function kut(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||Sut,a=[],l=[],o=[],c=[];let d=0,_=-1;for(;++_d&&(d=e[_].length);++bc[b])&&(c[b]=x)}k.push(w)}l[_]=k,o[_]=v}let h=-1;if(typeof r=="object"&&"length"in r)for(;++hc[h]&&(c[h]=w),g[h]=w),m[h]=x}l.splice(1,0,m),o.splice(1,0,g),_=-1;const S=[];for(;++_ "),a.shift(2);const l=t.indentLines(t.containerFlow(e,a.current()),Nut);return s(),l}function Nut(e,n,t){return">"+(t?"":" ")+e}function zut(e,n){return dk(e,n.inConstruct,!0)&&!dk(e,n.notInConstruct,!1)}function dk(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++rl&&(l=a):a=1,s=r+n.length,r=t.indexOf(n,s);return l}function jut(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 Aut(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 Tut(e,n,t,r){const s=Aut(t),a=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(jut(e,t)){const h=t.enter("codeIndented"),m=t.indentLines(a,Mut);return h(),m}const o=t.createTracker(r),c=s.repeat(Math.max(zA(a,s)+1,3)),d=t.enter("codeFenced");let _=o.move(c);if(e.lang){const h=t.enter(`codeFencedLang${l}`);_+=o.move(t.safe(e.lang,{before:_,after:" ",encode:["`"],...o.current()})),h()}if(e.lang&&e.meta){const h=t.enter(`codeFencedMeta${l}`);_+=o.move(" "),_+=o.move(t.safe(e.meta,{before:_,after:` -`,encode:["`"],...o.current()})),h()}return _+=o.move(` -`),a&&(_+=o.move(a+` -`)),_+=o.move(c),d(),_}function Mut(e,n,t){return(t?"":" ")+e}function My(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 Rut(e,n,t,r){const s=My(t),a=s==='"'?"Quote":"Apostrophe",l=t.enter("definition");let o=t.enter("label");const c=t.createTracker(r);let d=c.move("[");return d+=c.move(t.safe(t.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(t.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(o=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":` -`,...c.current()}))),o(),e.title&&(o=t.enter(`title${a}`),d+=c.move(" "+s),d+=c.move(t.safe(e.title,{before:d,after:s,...c.current()})),d+=c.move(s),o()),l(),d}function Dut(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 Jf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function kp(e,n,t){const r=ed(e),s=ed(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}}jA.peek=Lut;function jA(e,n,t,r){const s=Dut(t),a=t.enter("emphasis"),l=t.createTracker(r),o=l.move(s);let c=l.move(t.containerPhrasing(e,{after:s,before:o,...l.current()}));const d=c.charCodeAt(0),_=kp(r.before.charCodeAt(r.before.length-1),d,s);_.inside&&(c=Jf(d)+c.slice(1));const h=c.charCodeAt(c.length-1),m=kp(r.after.charCodeAt(0),h,s);m.inside&&(c=c.slice(0,-1)+Jf(h));const g=l.move(s);return a(),t.attentionEncodeSurroundingInfo={after:m.outside,before:_.outside},o+c+g}function Lut(e,n,t){return t.options.emphasis||"*"}function Out(e,n){let t=!1;return sy(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,e2}),!!((!e.depth||e.depth<3)&&dy(e)&&(n.options.setext||t))}function Iut(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(r);if(Out(e,t)){const _=t.enter("headingSetext"),h=t.enter("phrasing"),m=t.containerPhrasing(e,{...a.current(),before:` -`,after:` -`});return h(),_(),m+` -`+(s===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(` -`))+1))}const l="#".repeat(s),o=t.enter("headingAtx"),c=t.enter("phrasing");a.move(l+" ");let d=t.containerPhrasing(e,{before:"# ",after:` -`,...a.current()});return/^[\t ]/.test(d)&&(d=Jf(d.charCodeAt(0))+d.slice(1)),d=d?l+" "+d:l,t.options.closeAtx&&(d+=" "+l),c(),o(),d}AA.peek=But;function AA(e){return e.value||""}function But(){return"<"}TA.peek=$ut;function TA(e,n,t,r){const s=My(t),a=s==='"'?"Quote":"Apostrophe",l=t.enter("image");let o=t.enter("label");const c=t.createTracker(r);let d=c.move("![");return d+=c.move(t.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(t.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(o=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=t.enter(`title${a}`),d+=c.move(" "+s),d+=c.move(t.safe(e.title,{before:d,after:s,...c.current()})),d+=c.move(s),o()),d+=c.move(")"),l(),d}function $ut(){return"!"}MA.peek=Hut;function MA(e,n,t,r){const s=e.referenceType,a=t.enter("imageReference");let l=t.enter("label");const o=t.createTracker(r);let c=o.move("![");const d=t.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(d+"]["),l();const _=t.stack;t.stack=[],l=t.enter("reference");const h=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return l(),t.stack=_,a(),s==="full"||!d||d!==h?c+=o.move(h+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function Hut(){return"!"}RA.peek=Put;function RA(e,n,t){let r=e.value||"",s="`",a=-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+" ");++a\u007F]/.test(e.url))}LA.peek=Fut;function LA(e,n,t,r){const s=My(t),a=s==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let o,c;if(DA(e,t)){const _=t.stack;t.stack=[],o=t.enter("autolink");let h=l.move("<");return h+=l.move(t.containerPhrasing(e,{before:h,after:">",...l.current()})),h+=l.move(">"),o(),t.stack=_,h}o=t.enter("link"),c=t.enter("label");let d=l.move("[");return d+=l.move(t.containerPhrasing(e,{before:d,after:"](",...l.current()})),d+=l.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(t.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(c=t.enter("destinationRaw"),d+=l.move(t.safe(e.url,{before:d,after:e.title?" ":")",...l.current()}))),c(),e.title&&(c=t.enter(`title${a}`),d+=l.move(" "+s),d+=l.move(t.safe(e.title,{before:d,after:s,...l.current()})),d+=l.move(s),c()),d+=l.move(")"),o(),d}function Fut(e,n,t){return DA(e,t)?"<":"["}OA.peek=Uut;function OA(e,n,t,r){const s=e.referenceType,a=t.enter("linkReference");let l=t.enter("label");const o=t.createTracker(r);let c=o.move("[");const d=t.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(d+"]["),l();const _=t.stack;t.stack=[],l=t.enter("reference");const h=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return l(),t.stack=_,a(),s==="full"||!d||d!==h?c+=o.move(h+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function Uut(){return"["}function Ry(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 qut(e){const n=Ry(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 Gut(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 IA(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 Vut(e,n,t,r){const s=t.enter("list"),a=t.bulletCurrent;let l=e.ordered?Gut(t):Ry(t);const o=e.ordered?l==="."?")":".":qut(t);let c=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const _=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&_&&(!_.children||!_.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(c=!0),IA(t)===l&&_){let h=-1;for(;++h-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let l=a.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const o=t.createTracker(r);o.move(a+" ".repeat(l-a.length)),o.shift(l);const c=t.enter("listItem"),d=t.indentLines(t.containerFlow(e,o.current()),_);return c(),d;function _(h,m,g){return m?(g?"":" ".repeat(l))+h:(g?a:a+" ".repeat(l-a.length))+h}}function Yut(e,n,t,r){const s=t.enter("paragraph"),a=t.enter("phrasing"),l=t.containerPhrasing(e,r);return a(),s(),l}const Xut=Ah(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Zut(e,n,t,r){return(e.children.some(function(l){return Xut(l)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function Qut(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}BA.peek=Jut;function BA(e,n,t,r){const s=Qut(t),a=t.enter("strong"),l=t.createTracker(r),o=l.move(s+s);let c=l.move(t.containerPhrasing(e,{after:s,before:o,...l.current()}));const d=c.charCodeAt(0),_=kp(r.before.charCodeAt(r.before.length-1),d,s);_.inside&&(c=Jf(d)+c.slice(1));const h=c.charCodeAt(c.length-1),m=kp(r.after.charCodeAt(0),h,s);m.inside&&(c=c.slice(0,-1)+Jf(h));const g=l.move(s+s);return a(),t.attentionEncodeSurroundingInfo={after:m.outside,before:_.outside},o+c+g}function Jut(e,n,t){return t.options.strong||"*"}function edt(e,n,t,r){return t.safe(e.value,r)}function tdt(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 ndt(e,n,t){const r=(IA(t)+(t.options.ruleSpaces?" ":"")).repeat(tdt(t));return t.options.ruleSpaces?r.slice(0,-1):r}const $A={blockquote:Eut,break:fk,code:Tut,definition:Rut,emphasis:jA,hardBreak:fk,heading:Iut,html:AA,image:TA,imageReference:MA,inlineCode:RA,link:LA,linkReference:OA,list:Vut,listItem:Kut,paragraph:Yut,root:Zut,strong:BA,text:edt,thematicBreak:ndt};function rdt(){return{enter:{table:sdt,tableData:hk,tableHeader:hk,tableRow:adt},exit:{codeText:odt,table:idt,tableData:Wb,tableHeader:Wb,tableRow:Wb}}}function sdt(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 idt(e){this.exit(e),this.data.inTable=void 0}function adt(e){this.enter({type:"tableRow",children:[]},e)}function Wb(e){this.exit(e)}function hk(e){this.enter({type:"tableCell",children:[]},e)}function odt(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,ldt));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function ldt(e,n){return n==="|"?n:e}function cdt(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,a=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:m,table:l,tableCell:c,tableRow:o}};function l(g,S,k,v){return d(_(g,k,v),g.align)}function o(g,S,k,v){const b=h(g,k,v),w=d([b]);return w.slice(0,w.indexOf(` -`))}function c(g,S,k,v){const b=k.enter("tableCell"),w=k.enter("phrasing"),x=k.containerPhrasing(g,{...v,before:a,after:a});return w(),b(),x}function d(g,S){return kut(g,{align:S,alignDelimiters:r,padding:t,stringLength:s})}function _(g,S,k){const v=g.children;let b=-1;const w=[],x=S.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Ndt={tokenize:Ldt,partial:!0};function zdt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Mdt,continuation:{tokenize:Rdt},exit:Ddt}},text:{91:{name:"gfmFootnoteCall",tokenize:Tdt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:jdt,resolveTo:Adt}}}}function jdt(e,n,t){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){l=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(!l||!l._balanced)return t(c);const d=na(r.sliceSerialize({start:l.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function Adt(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 a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",s,n],["exit",s,n],["enter",a,n],["enter",l,n],["exit",l,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...o),e}function Tdt(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return o;function o(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),c}function c(h){return h!==94?t(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(h){if(a>999||h===93&&!l||h===null||h===91||Pn(h))return t(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return s.includes(na(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(h)}return Pn(h)||(l=!0),a++,e.consume(h),h===92?_:d}function _(h){return h===91||h===92||h===93?(e.consume(h),a++,d):d(h)}}function Mdt(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,o;return c;function c(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",_):t(S)}function _(S){if(l>999||S===93&&!o||S===null||S===91||Pn(S))return t(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=na(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Pn(S)||(o=!0),l++,e.consume(S),S===92?h:_}function h(S){return S===91||S===92||S===93?(e.consume(S),l++,_):_(S)}function m(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(a)||s.push(a),tn(e,g,"gfmFootnoteDefinitionWhitespace")):t(S)}function g(S){return n(S)}}function Rdt(e,n,t){return e.check(Rh,n,e.attempt(Ndt,n,t))}function Ddt(e){e.exit("gfmFootnoteDefinition")}function Ldt(e,n,t){const r=this;return tn(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(a):t(a)}}function Odt(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(l,o){let c=-1;for(;++c1?c(S):(l.consume(S),h++,g);if(h<2&&!t)return c(S);const v=l.exit("strikethroughSequenceTemporary"),b=ed(S);return v._open=!b||b===2&&!!k,v._close=!k||k===2&&!!b,o(S)}}}class Idt{constructor(){this.map=[]}add(n,t,r){Bdt(this,n,t,r)}consume(n){if(this.map.sort(function(a,l){return a[0]-l[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 a of s)n.push(a);s=r.pop()}this.map.length=0}}function Bdt(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const W=r.events[H][1].type;if(W==="lineEnding"||W==="linePrefix")H--;else break}const P=H>-1?r.events[H][1].type:null,F=P==="tableHead"||P==="tableRow"?N:c;return F===N&&r.parser.lazy[r.now().line]?t(O):F(O)}function c(O){return e.enter("tableHead"),e.enter("tableRow"),d(O)}function d(O){return O===124||(l=!0,a+=1),_(O)}function _(O){return O===null?t(O):bt(O)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),g):t(O):an(O)?tn(e,_,"whitespace")(O):(a+=1,l&&(l=!1,s+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),l=!0,_):(e.enter("data"),h(O)))}function h(O){return O===null||O===124||Pn(O)?(e.exit("data"),_(O)):(e.consume(O),O===92?m:h)}function m(O){return O===92||O===124?(e.consume(O),h):h(O)}function g(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(O):(e.enter("tableDelimiterRow"),l=!1,an(O)?tn(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):S(O))}function S(O){return O===45||O===58?v(O):O===124?(l=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),k):j(O)}function k(O){return an(O)?tn(e,v,"whitespace")(O):v(O)}function v(O){return O===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),b):O===45?(a+=1,b(O)):O===null||bt(O)?C(O):j(O)}function b(O){return O===45?(e.enter("tableDelimiterFiller"),w(O)):j(O)}function w(O){return O===45?(e.consume(O),w):O===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(O))}function x(O){return an(O)?tn(e,C,"whitespace")(O):C(O)}function C(O){return O===124?S(O):O===null||bt(O)?!l||s!==a?j(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(O)):j(O)}function j(O){return t(O)}function N(O){return e.enter("tableRow"),T(O)}function T(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),T):O===null||bt(O)?(e.exit("tableRow"),n(O)):an(O)?tn(e,T,"whitespace")(O):(e.enter("data"),z(O))}function z(O){return O===null||O===124||Pn(O)?(e.exit("data"),T(O)):(e.consume(O),O===92?D:z)}function D(O){return O===92||O===124?(e.consume(O),z):z(O)}}function Fdt(e,n){let t=-1,r=!0,s=0,a=[0,0,0,0],l=[0,0,0,0],o=!1,c=0,d,_,h;const m=new Idt;for(;++tt[2]+1){const S=t[2]+1,k=t[3]-t[2]-1;e.add(S,k,[])}}e.add(t[3]+1,0,[["exit",h,n]])}return s!==void 0&&(a.end=Object.assign({},ju(n.events,s)),e.add(s,0,[["exit",a,n]]),a=void 0),a}function pk(e,n,t,r,s){const a=[],l=ju(n.events,t);s&&(s.end=Object.assign({},l),a.push(["exit",s,n])),r.end=Object.assign({},l),a.push(["exit",r,n]),e.add(t+1,0,a)}function ju(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const Udt={name:"tasklistCheck",tokenize:Gdt};function qdt(){return{text:{91:Udt}}}function Gdt(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"),a)}function a(c){return Pn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),l):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),l):t(c)}function l(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):t(c)}function o(c){return bt(c)?n(c):an(c)?e.check({tokenize:Vdt},n,t)(c):t(c)}}function Vdt(e,n,t){return tn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function Wdt(e){return Jz([bdt(),zdt(),Odt(e),Hdt(),qdt()])}const Kdt={};function KA(e){const n=this,t=e||Kdt,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Wdt(t)),a.push(_dt()),l.push(pdt(t))}function Ydt(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:a},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:o,mathText:l,mathTextData:o}};function e(c){const d={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[d]}},c)}function n(){this.buffer()}function t(){const c=this.resume(),d=this.stack[this.stack.length-1];d.type,d.meta=c}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const d=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),_=this.stack[this.stack.length-1];_.type,this.exit(c),_.value=d;const h=_.data.hChildren[0];h.type,h.tagName,h.children.push({type:"text",value:d}),this.data.mathFlowInside=void 0}function a(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function l(c){const d=this.resume(),_=this.stack[this.stack.length-1];_.type,this.exit(c),_.value=d,_.data.hChildren.push({type:"text",value:d})}function o(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function Xdt(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(a,l,o,c){const d=a.value||"",_=o.createTracker(c),h="$".repeat(Math.max(zA(d,"$")+1,2)),m=o.enter("mathFlow");let g=_.move(h);if(a.meta){const S=o.enter("mathFlowMeta");g+=_.move(o.safe(a.meta,{after:` -`,before:g,encode:["$"],..._.current()})),S()}return g+=_.move(` -`),d&&(g+=_.move(d+` -`)),g+=_.move(h),m(),g}function r(a,l,o){let c=a.value||"",d=1;for(n||d++;new RegExp("(^|[^$])"+"\\$".repeat(d)+"([^$]|$)").test(c);)d++;const _="$".repeat(d);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let h=-1;for(;++h]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}Oh.displayName="c";Oh.aliases=[];function Oh(e){e.register(Ga),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}gm.displayName="cpp";gm.aliases=[];function gm(e){e.register(Oh),(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)}Oy.displayName="arduino";Oy.aliases=["ino"];function Oy(e){e.register(gm),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}Iy.displayName="bash";Iy.aliases=["sh","shell"];function Iy(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 a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],l=s.variable[1].inside,o=0;o>/g,function(Y,V){return"(?:"+B[+V]+")"})}function r(L,B,Y){return RegExp(t(L,B),"")}function s(L,B){for(var Y=0;Y>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var a={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 l(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var o=l(a.typeDeclaration),c=RegExp(l(a.type+" "+a.typeDeclaration+" "+a.contextual+" "+a.other)),d=l(a.typeDeclaration+" "+a.contextual+" "+a.other),_=l(a.type+" "+a.typeDeclaration+" "+a.other),h=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),m=s(/\((?:[^()]|<>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,S=t(/<<0>>(?:\s*<<1>>)?/.source,[g,h]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,S]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[h,m,v]),x=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[x,k,v]),j={keyword:c,punctuation:/[<>()?,.:[\]]/},N=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,T=/"(?:\\.|[^\\"\r\n])*"/.source,z=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[z]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),lookbehind:!0,inside:j},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,C]),lookbehind:!0,inside:j},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[o,S]),lookbehind:!0,inside:j},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[k]),lookbehind:!0,inside:j},{pattern:r(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:j},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,_,g]),inside:j}],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,[g]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[m]),lookbehind:!0,alias:"class-name",inside:j},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,k]),inside:j,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:j,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,h]),inside:{function:r(/^<<0>>/.source,[g]),generic:{pattern:RegExp(h),alias:"class-name",inside:j}}},"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,S,g,C,c.source,m,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[S,m]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:c,"class-name":{pattern:RegExp(C),greedy:!0,inside:j},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 D=T+"|"+N,O=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[D]),H=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),P=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,F=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,H]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[P,F]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[P]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[H]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var W=/:[^}\r\n]+/.source,Z=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),G=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,W]),X=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[D]),2),J=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[X,W]);function $(L,B){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[B,W]),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,[G]),lookbehind:!0,greedy:!0,inside:$(G,Z)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[J]),lookbehind:!0,greedy:!0,inside:$(J,X)}],char:{pattern:RegExp(N),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}Ih.displayName="markup";Ih.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function Ih(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 a={"included-cdata":{pattern://i,inside:s}};a["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var l={};l[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:a},e.languages.insertBefore("markup","cdata",l)}}),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}yd.displayName="css";yd.aliases=[];function yd(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)}$y.displayName="diff";$y.aliases=[];function $y(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],a=[];/^\w+$/.test(r)||a.push(/\w+/.exec(r)[0]),r==="diff"&&a.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r -?| -|(?![\\s\\S])))+`,"m"),alias:a,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)}Hy.displayName="go";Hy.aliases=[];function Hy(e){e.register(Ga),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"]}Py.displayName="ini";Py.aliases=[];function Py(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:/=/}}Fy.displayName="java";Fy.aliases=[];function Fy(e){e.register(Ga),(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)}Uy.displayName="regex";Uy.aliases=[];function Uy(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"},a={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},l="(?:[^\\\\-]|"+r.source+")",o=RegExp(l+"-"+l),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":a,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}qy.displayName="json";qy.aliases=["webmanifest"];function qy(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}Gy.displayName="kotlin";Gy.aliases=["kt","kts"];function Gy(e){e.register(Ga),(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)}Vy.displayName="less";Vy.aliases=[];function Vy(e){e.register(yd),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"}})}Wy.displayName="lua";Wy.aliases=[];function Wy(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:/[\[\](){},;]|\.+|:+/}}Ky.displayName="makefile";Ky.aliases=[];function Ky(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:/[:;(){}]/}}Yy.displayName="yaml";Yy.aliases=["yml"];function Yy(e){(function(n){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",a=/(?:[^\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}),l=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(c,d){d=(d||"").replace(/m/g,"")+"m";var _=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(_,d)}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"(?:"+a+"|"+l+")"})),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(l),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)}Xy.displayName="markdown";Xy.aliases=["md"];function Xy(e){e.register(Ih),(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,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),l=/\|?[ \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("^"+a+l+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+l+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+l+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),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(d){if(!(!d||typeof d=="string"))for(var _=0,h=d.length;_]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}Qy.displayName="perl";Qy.aliases=[];function Qy(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)}vm.displayName="markup-templating";vm.aliases=[];function vm(e){e.register(Ih),(function(n){function t(r,s){return"___"+r.toUpperCase()+s+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,s,a,l){if(r.language===s){var o=r.tokenStack=[];r.code=r.code.replace(a,function(c){if(typeof l=="function"&&!l(c))return c;for(var d=o.length,_;r.code.indexOf(_=t(s,d))!==-1;)++d;return o[d]=c,_}),r.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(r,s){if(r.language!==s||!r.tokenStack)return;r.grammar=n.languages[s];var a=0,l=Object.keys(r.tokenStack);function o(c){for(var d=0;d=l.length);d++){var _=c[d];if(typeof _=="string"||_.content&&typeof _.content=="string"){var h=l[a],m=r.tokenStack[h],g=typeof _=="string"?_:_.content,S=t(s,h),k=g.indexOf(S);if(k>-1){++a;var v=g.substring(0,k),b=new n.Token(s,n.tokenize(m,r.grammar),"language-"+s,m),w=g.substring(k+S.length),x=[];v&&x.push.apply(x,o([v])),x.push(b),w&&x.push.apply(x,o([w])),typeof _=="string"?c.splice.apply(c,[d,1].concat(x)):_.content=x}}else _.content&&o(_.content)}return c}o(r.tokens)}}})})(e)}Jy.displayName="php";Jy.aliases=[];function Jy(e){e.register(vm),(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,a=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,l=/[{}\[\](),:;]/;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:a,punctuation:l};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:a,punctuation:l}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(d){if(/<\?/.test(d.code)){var _=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(d,"php",_)}}),n.hooks.add("after-tokenize",function(d){n.languages["markup-templating"].tokenizePlaceholders(d,"php")})})(e)}e4.displayName="python";e4.aliases=["py"];function e4(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}t4.displayName="r";t4.aliases=[];function t4(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:/[(){}\[\],;]/}}n4.displayName="ruby";n4.aliases=["rb"];function n4(e){e.register(Ga),(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)}r4.displayName="rust";r4.aliases=[];function r4(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)}s4.displayName="sass";s4.aliases=[];function s4(e){e.register(yd),(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)}i4.displayName="scss";i4.aliases=[];function i4(e){e.register(yd),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}a4.displayName="sql";a4.aliases=[];function a4(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:/[;[\]()`,.]/}}o4.displayName="swift";o4.aliases=[];function o4(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})}l4.displayName="typescript";l4.aliases=["ts"];function l4(e){e.register(bm),(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)}xm.displayName="basic";xm.aliases=[];function xm(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:/[,;:()]/}}c4.displayName="vbnet";c4.aliases=[];function c4(e){e.register(xm),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}const oft=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],gk={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function XA(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=48&&n<=57}function lft(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function cft(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function bk(e){return cft(e)||XA(e)}const uft=["","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 dft(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let a=0,l=-1,o="",c,d;t.position&&("start"in t.position||"indent"in t.position?(d=t.position.indent,c=t.position.start):c=t.position);let _=(c?c.line:0)||1,h=(c?c.column:0)||1,m=S(),g;for(a--;++a<=e.length;)if(g===10&&(h=(d?d[l]:0)||1),g=e.charCodeAt(a),g===38){const b=e.charCodeAt(a+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||r&&b===r){o+=String.fromCharCode(g),h++;continue}const w=a+1;let x=w,C=w,j;if(b===35){C=++x;const F=e.charCodeAt(C);F===88||F===120?(j="hexadecimal",C=++x):j="decimal"}else j="named";let N="",T="",z="";const D=j==="named"?bk:j==="decimal"?XA:lft;for(C--;++C<=e.length;){const F=e.charCodeAt(C);if(!D(F))break;z+=String.fromCharCode(F),j==="named"&&oft.includes(z)&&(N=z,T=Xf(z))}let O=e.charCodeAt(C)===59;if(O){C++;const F=j==="named"?Xf(z):!1;F&&(N=z,T=F)}let H=1+C-w,P="";if(!(!O&&t.nonTerminated===!1))if(!z)j!=="named"&&k(4,H);else if(j==="named"){if(O&&!T)k(5,1);else if(N!==z&&(C=x+N.length,H=1+C-x,O=!1),!O){const F=N?1:3;if(t.attribute){const W=e.charCodeAt(C);W===61?(k(F,H),T=""):bk(W)?T="":k(F,H)}else k(F,H)}P=T}else{O||k(2,H);let F=Number.parseInt(z,j==="hexadecimal"?16:10);if(fft(F))k(7,H),P="�";else if(F in gk)k(6,H),P=gk[F];else{let W="";hft(F)&&k(6,H),F>65535&&(F-=65536,W+=String.fromCharCode(F>>>10|55296),F=56320|F&1023),P=W+String.fromCharCode(F)}}if(P){v(),m=S(),a=C-1,h+=C-w+1,s.push(P);const F=S();F.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,P,{start:m,end:F},e.slice(w-1,C)),m=F}else z=e.slice(w-1,C),o+=z,h+=z.length,a=C-1}else g===10&&(_++,l++,h=0),Number.isNaN(g)?v():(o+=String.fromCharCode(g),h++);return s.join("");function S(){return{line:_,column:h,offset:a+((c?c.offset:0)||0)}}function k(b,w){let x;t.warning&&(x=S(),x.column+=w,x.offset+=w,t.warning.call(t.warningContext||void 0,uft[b],x,b))}function v(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:m,end:S()}),o="")}}function fft(e){return e>=55296&&e<=57343||e>1114111}function hft(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 _ft=0,x0={},Xr={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++_ft}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(Xr.util.type(n)){case"Object":if(s=Xr.util.objId(n),t[s])return t[s];r={},t[s]=r;for(var a in n)n.hasOwnProperty(a)&&(r[a]=e(n[a],t));return r;case"Array":return s=Xr.util.objId(n),t[s]?t[s]:(r=[],t[s]=r,n.forEach(function(l,o){r[o]=e(l,t)}),r);default:return n}}},languages:{plain:x0,plaintext:x0,text:x0,txt:x0,extend:function(e,n){var t=Xr.util.clone(Xr.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||Xr.languages;var s=r[e],a={};for(var l in s)if(s.hasOwnProperty(l)){if(l==n)for(var o in t)t.hasOwnProperty(o)&&(a[o]=t[o]);t.hasOwnProperty(l)||(a[l]=s[l])}var c=r[e];return r[e]=a,Xr.languages.DFS(Xr.languages,function(d,_){_===c&&d!=e&&(this[d]=a)}),a},DFS:function e(n,t,r,s){s=s||{};var a=Xr.util.objId;for(var l in n)if(n.hasOwnProperty(l)){t.call(n,l,n[l],r||l);var o=n[l],c=Xr.util.type(o);c==="Object"&&!s[a(o)]?(s[a(o)]=!0,e(o,t,null,s)):c==="Array"&&!s[a(o)]&&(s[a(o)]=!0,e(o,t,l,s))}}},plugins:{},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(Xr.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Xr.tokenize(r.code,r.grammar),Xr.hooks.run("after-tokenize",r),$f.stringify(Xr.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 pft;return G0(s,s.head,e),ZA(e,s,n,s.head,0),gft(s)},hooks:{all:{},add:function(e,n){var t=Xr.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=Xr.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:$f};function $f(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function vk(e,n,t,r){e.lastIndex=n;var s=e.exec(t);if(s&&r&&s[1]){var a=s[1].length;s.index+=a,s[0]=s[0].slice(a)}return s}function ZA(e,n,t,r,s,a){for(var l in t)if(!(!t.hasOwnProperty(l)||!t[l])){var o=t[l];o=Array.isArray(o)?o:[o];for(var c=0;c=a.reach);b+=v.value.length,v=v.next){var w=v.value;if(n.length>e.length)return;if(!(w instanceof $f)){var x=1,C;if(m){if(C=vk(k,b,e,h),!C||C.index>=e.length)break;var z=C.index,j=C.index+C[0].length,N=b;for(N+=v.value.length;z>=N;)v=v.next,N+=v.value.length;if(N-=v.value.length,b=N,v.value instanceof $f)continue;for(var T=v;T!==n.tail&&(Na.reach&&(a.reach=P);var F=v.prev;O&&(F=G0(n,F,O),b+=O.length),mft(n,F,x);var W=new $f(l,_?Xr.tokenize(D,_):D,g,D);if(v=G0(n,F,W),H&&G0(n,v,H),x>1){var Z={cause:l+","+c,reach:P};ZA(e,n,t,v.prev,b,Z),a&&Z.reach>a.reach&&(a.reach=Z.reach)}}}}}}function pft(){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 G0(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 mft(e,n,t){for(var r=n.next,s=0;st)return null;try{return xt.highlight(e,n).children}catch{return null}}function tT(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(tT)},n)}function Cft(e,n,t=3e5){var r;return((r=eT(e,n,t))==null?void 0:r.map(tT))??e}function nT(e,n,t=3e5){const r=eT(e,n,t);if(!r)return e.split(` -`);const s=[];let a=[];const l=[];let o=0;const c=_=>{let h=_;for(let m=l.length-1;m>=0;m--)h=f.jsx("span",{className:l[m],children:h},o++);a.push(h)},d=_=>{var h;if(_.type==="text"){(_.value??"").split(` -`).forEach((m,g)=>{g>0&&(s.push(a),a=[]),m&&c(m)});return}_.type==="element"&&(l.push((((h=_.properties)==null?void 0:h.className)??[]).join(" ")),(_.children??[]).forEach(d),l.pop())};return r.forEach(d),s.push(a),s}function rT(e){return Array.isArray(e)?e.length===0:e===""}const xk=/^\d+(?:,\d{3})*(?:\.\d+)?(?:\s*[–—-]\s*\$?\d+(?:,\d{3})*(?:\.\d+)?)?(?:\/[A-Za-z][A-Za-z0-9-]*)?/;function sd(e,n,t){let r=n;for(;e[r]===t;)r+=1;return r-n}function eh(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function D2(e){var l;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 a=((l=/^[ \t]*/.exec(e.slice(r)))==null?void 0:l[0].length)??0;return{hasListMarker:n,indentation:a,listIndent:t,offset:r+a,quoteDepth:s}}function Eft(e,n){const t=e[n];if(t!=="`"&&t!=="~"||eh(e,n)||sd(e,n,t)<3)return!1;const r=e.lastIndexOf(` -`,n-1)+1,s=e.indexOf(` -`,n),a=e.slice(r,s===-1?e.length:s),l=D2(a);return l.indentation<=3&&r+l.offset===n}function Nft(e,n){const t=e[n],r=sd(e,n,t),s=e.lastIndexOf(` -`,n-1)+1,a=e.indexOf(` -`,n),l=D2(e.slice(s,a===-1?e.length:a));let o=e.indexOf(` -`,n+r);if(o===-1)return e.length;for(o+=1;o=l.listIndent&&h.indentation<=l.listIndent+3&&g>=r&&/^[ \t\r]*$/.test(e.slice(m+g,d)))return c===-1?e.length:c+1;if(c===-1)return e.length;o=c+1}return e.length}function zft(e,n,t){const r=sd(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function Aft(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 Mft(e,{predictMath:n=!1}={}){const t=Aft(e),r=new Set,s=new Set;for(let d=0;d`$$${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}`)),Mft(t,n)}function sT(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 Lft(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function wr(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=Lft(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const Oft=1e5;function Ift({code:e,lang:n}){const[t,r]=M.useState(!1),s=()=>{var a;(a=navigator.clipboard)==null||a.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(Gt,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:ME(),"aria-label":mpe(),onClick:s,children:t?f.jsx(_i,{size:13}):f.jsx(Vp,{size:13})}),f.jsx("pre",{children:f.jsx("code",{children:Cft(e,n,Oft)})})]})}function Bft(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 wk(e,n,t){let r=n.line,s=n.column;for(let a=0;a]*?)\/?>/gi,r=[];let s=0,a=!1;for(const l of n.matchAll(t)){const o=(l[1]??"").toLowerCase(),c=Bft(l[2]??"");if(!c[o==="run"?"id":"path"])continue;a=!0,l.index>s&&r.push({type:"text",value:n.slice(s,l.index),position:Kb(e,s,l.index)});const _=l.index+l[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:c},position:Kb(e,l.index,_),type:o==="run"?"runMention":"fileMention"}),s=_}return a?(siT(e)}function Hft(){return e=>{const n=t=>{var r;for(const s of["href","src"])t.properties&&Object.hasOwn(t.properties,s)&&(t.properties[s]=gj(String(t.properties[s]||"")));(r=t.children)==null||r.forEach(n)};n(e)}}function kk({path:e,lines:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,a=n&&Number.parseInt(n,10)||void 0,l=a!=null?`${s}:${a}`:s;return f.jsxs("button",{className:"file-chip",title:r?KI({path:we(e)}):e,...wr(o=>r==null?void 0:r(e,a,t,void 0,o)),disabled:!r,children:[f.jsx(CN,{size:12}),f.jsx("span",{className:"file-chip-label",children:l}),f.jsx(AN,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function Pft({id:e,label:n,onOpenRun:t}){return f.jsxs("button",{className:"file-chip run-chip",title:t?cB({id:we(e)}):IB({id:we(e)}),...wr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[f.jsx($x,{size:12}),f.jsx("span",{className:"file-chip-label",children:n||pN()}),f.jsx(AN,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const aT={singleDollarTextMath:!0},Fft=ay().use(hy).use(KA).use(YA,aT).use($ft).use(gp).use(Hft).use(SA);function Uft(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const oT={code:({node:e,className:n,children:t,...r})=>{const s=n??"",a=/language-(\w+)/.exec(s),l=String(t??"").replace(/\n$/,"");if(!(a!=null||l.includes(` -`)))return f.jsx("code",{className:s,...r,children:t});const c=a?M2(a[1]):null;return f.jsx(Ift,{code:l,lang:c})},pre:({children:e})=>f.jsx(f.Fragment,{children:e})},Oa=M.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:a,predict:l=!1}){Oc();const o=M.useMemo(()=>({"file-mention":c=>f.jsx(kk,{path:c.path,lines:c.lines,exp:c.exp,onOpenFile:t}),"run-mention":c=>f.jsx(Pft,{id:c.id,label:c.label,onOpenRun:r}),a:({node:c,href:d,children:_,...h})=>{if(d&&Uft(d)&&t){let m;try{m=decodeURI(d)}catch{return f.jsx("span",{children:_})}const g=s?s(m):m;return g?f.jsx(kk,{path:g,onOpenFile:t}):f.jsx("span",{children:_})}return f.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",...h,children:_})},th:({node:c,...d})=>f.jsx("th",{dir:"auto",...d}),td:({node:c,...d})=>f.jsx("td",{dir:"auto",...d}),img:({node:c,src:d,alt:_,className:h,...m})=>{if(!d||typeof d!="string")return null;const g=a?a(d):d;return g?f.jsx("img",{...m,src:g,alt:_??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border ${h??""}`}):null},...oT}),[t,r,s,a]);return f.jsx("div",{dir:"auto","data-streaming":l||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(sot,{content:sT(n,{predictMath:l}),processor:Fft,components:o,predict:l})})}),Ck="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function qft({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:a,onRevise:l}){const[o,c]=M.useState(!1),d=M.useRef(null),[_,h]=M.useState(!1),[m,g]=M.useState(""),S=M.useRef(null);M.useEffect(()=>{if(!o)return;const v=b=>{d.current&&!d.current.contains(b.target)&&c(!1)};return window.addEventListener("pointerdown",v),()=>window.removeEventListener("pointerdown",v)},[o]),M.useEffect(()=>{var v;_&&((v=S.current)==null||v.focus())},[_]);const k=()=>{l(m.trim()||"no specific feedback — use your judgment"),g(""),h(!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($x,{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?k5e({agent:we(n)}):x5e({agent:we(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",...wr(t),children:O5e()})]}),_?f.jsxs(f.Fragment,{children:[f.jsx("textarea",{dir:"auto",ref:S,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:Q5e(),rows:2,value:m,onChange:v=>g(v.target.value),onKeyDown:v=>{v.key==="Escape"?(v.preventDefault(),g(""),h(!1)):v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),k())}}),f.jsxs("div",{className:Ck,children:[f.jsx(Ue,{size:"small",onClick:()=>{g(""),h(!1)},children:z5e()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),f.jsxs(Ue,{size:"small",variant:"primary",onClick:k,children:[q5e(),f.jsx(kN,{size:13})]})]})]}):f.jsxs("div",{className:Ck,children:[f.jsx(Ue,{size:"small",onClick:a,children:H5e()}),f.jsx(Ue,{size:"small",onClick:()=>h(!0),children:K5e()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),s?f.jsxs("div",{className:"plan-strip-approve relative flex",ref:d,children:[f.jsx(Ue,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:l5e()}),f.jsx(Ue,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":M5e(),onClick:()=>c(v=>!v),children:f.jsx($a,{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(Mr,{onClick:()=>{c(!1),r("bypassPermissions")},children:f5e()})})]}):f.jsx(Ue,{size:"small",variant:"primary",onClick:()=>r(),children:m5e()})]})]})}function lT(e=!0){const[n,t]=M.useState(null),[r,s]=M.useState(null);return M.useEffect(()=>{if(!e)return;let a=!1;const l=Eet(o=>{a=!0,t(o)});return ZQe().then(o=>!a&&t(o)).catch(o=>s(o instanceof Error?o.message:String(o))),l},[e]),{status:n,error:r,apply:t}}function Gft({status:e}){const[n,t]=M.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null;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(hd,{size:13,className:"shrink-0 text-subtext"}),f.jsx("span",{className:"min-w-0",children:ZKe({version:we(r)})}),f.jsx(Gt,{type:"button",size:"small",className:"ms-auto","aria-label":tYe(),onClick:()=>t(r),children:f.jsx(Ur,{size:13})})]})}function Vft({save:e,onSaved:n,placeholder:t,createHref:r}){const[s,a]=M.useState(""),[l,o]=M.useState(!1),[c,d]=M.useState(null);async function _(h){if(h.preventDefault(),!(l||!s.trim())){o(!0),d(null);try{n(await e(s.trim())),a("")}catch(m){d(m instanceof Error?m.message:String(m))}finally{o(!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:s,onChange:h=>a(h.target.value),placeholder:t,autoComplete:"off"}),f.jsx(Ue,{type:"submit",disabled:l||!s.trim(),children:l?aa():Rl()}),f.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:T_e()}),c&&f.jsx("div",{className:"error",children:c})]})}function Wft({cmd:e}){const[n,t]=M.useState(!1);return f.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[f.jsx("code",{className:"font-mono text-sm",children:e}),f.jsx("button",{type:"button",className:"cmd-inline-copy inline-flex items-center p-0.5 border-0 rounded-xs bg-none bg-transparent text-muted cursor-pointer [&:hover]:bg-surface [&:hover]:text-text",onClick:()=>{navigator.clipboard.writeText(e).then(()=>{t(!0),setTimeout(()=>t(!1),1500)}).catch(()=>{})},"aria-label":n?ip():dI({value:we(e)}),title:n?ip():ME(),children:n?f.jsx(_i,{size:11,strokeWidth:3}):f.jsx(Vp,{size:11})})]})}function Bh(e){return e?e.split(/`([^`]+)`/).map((n,t)=>t%2===1?f.jsx(Wft,{cmd:n},t):n):null}const Kft="/assets/slurm-logo-aGSXVZcE.svg",Yft="/assets/thinking-machines-BOdslTfm.png";function Xft(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 jE();case"tinker_job":return"Tinker";default:return e||"—"}}function Zft({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 Qft({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 Jft({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 eht({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 tht({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 nht({size:e=16}){return f.jsx("img",{className:"tinker-logo block flex-none object-contain",src:Yft,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 rht({size:e=16}){return f.jsx("img",{className:"block flex-none object-contain",src:Kft,width:e,height:e,alt:"","aria-hidden":"true"})}function ym({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 wm({kind:e,size:n=16}){switch(e){case"modal_job":return f.jsx(Qft,{size:n});case"hf_job":return f.jsx(Zft,{size:n});case"k8s_job":return f.jsx(Jft,{size:n});case"ssh_job":return f.jsx(sS,{size:n,strokeWidth:1.5});case"slurm_job":return f.jsx(rht,{size:n});case"ray_job":return f.jsx(eht,{size:n});case"openresearch_job":return f.jsx(tht,{size:n});case"tinker_job":return f.jsx(nht,{size:n});case"local_job":return f.jsx(EZe,{size:n,strokeWidth:1.5});default:return f.jsx(sS,{size:n})}}function d4({backend:e}){const n=Ux(e),t=det(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(wm,{kind:n}),f.jsx("span",{className:"backend-name",children:Xft(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 cT({value:e,max:n,label:t,caption:r,fillColor:s}){const a=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":a,"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:`${a}%`,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??`${a}%`}),r]})]})}function L2({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"})}):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"})})}const uT=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),Ek=["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(" "),jf={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode"};function sht(e){var r,s;const n=e.find(a=>a.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:cp(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:Zp(n,t).defaultId}}function Va(e){const[n,t]=M.useState(!1),r=M.useRef(null);return M.useEffect(()=>{if(!n)return;const s=l=>{var o;(o=r.current)!=null&&o.contains(l.target)||t(!1)},a=l=>{var o;l.key==="Escape"&&(l.preventDefault(),l.stopPropagation(),t(!1),(o=e==null?void 0:e.current)==null||o.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",a,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",a,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function iht({value:e,onSelect:n,permissionChoices:t=[],defaultPermissionId:r,onSelectPermission:s,reasoningChoices:a=[],defaultReasoningId:l,onSelectReasoning:o,onHarnesses:c,lockHarness:d=!1,className:_}){var ae,re,q,oe,ce,_e;const[h,m]=M.useState([]),g=M.useRef(null),S=M.useRef(null),{open:k,setOpen:v,ref:b}=Va(g),[w,x]=M.useState(""),[C,j]=M.useState("root"),N=()=>{v(!1),j("root"),x("")};M.useEffect(()=>{var ue;k&&(C==="reasoning"||C==="speed"||C==="permissions")&&((ue=S.current)==null||ue.focus())},[k,C]),M.useEffect(()=>{let ue=!0;const Ne=(Ie=!1)=>up(Ie).then(Pe=>{ue&&(m(Pe),c==null||c(Pe))}).catch(()=>{});Ne();const ze=Vx(()=>void Ne(!0));return()=>{ue=!1,ze()}},[]);const T=M.useMemo(()=>{const ue=w.trim().toLowerCase();return(d&&e?h.filter(ze=>ze.id===e.harness):h).map(ze=>{let Ie=ze.models;return ue?Ie=Ie.filter(Pe=>Pe.id.toLowerCase().includes(ue)):ze.id==="opencode"&&(Ie=Ie.slice(0,6)),{harness:ze,models:Ie,hidden:ue?0:ze.models.length-Ie.length}})},[h,w,d,e]),z=(ue,Ne)=>{var Ie;const ze=(e==null?void 0:e.harness)===ue.id;n({harness:ue.id,model:Ne,serviceTier:cp(ue,Ne,ze?e==null?void 0:e.serviceTier:null),permissionMode:ze?e.permissionMode:((Ie=ue.options)==null?void 0:Ie.defaultPermissionMode)??null,reasoningLevel:JN(ue,Ne,ze?e.reasoningLevel:null)}),N()},D=(e==null?void 0:e.model)!=null?(ae=h.find(ue=>ue.id===e.harness))==null?void 0:ae.models.find(ue=>ue.id===e.model):void 0,O=e?e.model?D?op(D):ez(e.model):S7():sb(),H=(e==null?void 0:e.reasoningLevel)??l??((re=a[0])==null?void 0:re.id),P=(q=a.find(ue=>ue.id===H))==null?void 0:q.label,F=(e==null?void 0:e.permissionMode)??r??((oe=t[0])==null?void 0:oe.id),W=(ce=t.find(ue=>ue.id===F))==null?void 0:ce.label,Z=(e==null?void 0:e.harness)==="opencode"?Eme():Hpe(),G=h.find(ue=>ue.id===(e==null?void 0:e.harness)),X=QN(G,e==null?void 0:e.model),J=cp(G,e==null?void 0:e.model,e==null?void 0:e.serviceTier),$=(_e=X.find(ue=>ue.id===J))==null?void 0:_e.label,L=ue=>{o==null||o(ue),N()},B=ue=>{s==null||s(ue),N()},Y=ue=>{e&&n({...e,serviceTier:ue}),N()},V=(ue,Ne,ze)=>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(ze),children:[f.jsx("span",{className:"flex-1",children:ue}),Ne&&f.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:Ne}),f.jsx(Ha,{size:14,className:"shrink-0 text-muted"})]}),se=ue=>f.jsxs("button",{ref:S,type:"button",className:"model-submenu-header flex w-full items-center gap-2 border-0 border-b border-solid border-b-border-variant bg-transparent px-2 py-2 text-start text-sm font-medium text-text hover:bg-surface",onClick:()=>{j("root"),x("")},children:[f.jsx(xN,{size:15}),ue]}),le=(ue,Ne,ze,Ie)=>f.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:ue.map(Pe=>f.jsxs(Mr,{onClick:()=>Ie(Pe.id),children:[f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[Pe.label,Pe.id===ze&&f.jsxs("span",{className:"font-normal text-muted",children:[" ",LE()]})]}),Pe.description&&f.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Pe.description})]}),Pe.id===Ne&&f.jsx(_i,{size:13})]},Pe.id))});return f.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:b,children:[f.jsxs("button",{ref:g,type:"button",className:os("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:YO({label:`${O}${P?` · ${P}`:""}${$?` · ${$}`:""}`}),"aria-haspopup":"menu","aria-expanded":k,onClick:()=>{k?N():(j("root"),v(!0))},children:[J==="priority"?f.jsx(mQe,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?f.jsx(L2,{harness:e.harness,size:14}):null,J==="priority"&&f.jsxs("span",{className:"sr-only",children:[qpe()," "]}),f.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[O,P&&f.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:P})]}),f.jsx($a,{size:14,className:"shrink-0 text-muted"})]}),k&&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:[C==="root"&&f.jsxs("div",{className:"model-root-menu p-1",children:[V(sb(),O,"models"),a.length>0&&V(Z,P,"reasoning"),X.length>0&&V(C7(),$,"speed"),t.length>0&&V(k7(),W,"permissions")]}),C==="models"&&f.jsxs(f.Fragment,{children:[se(sb()),f.jsx("input",{autoFocus:!0,type:"text",placeholder:lme(),value:w,onChange:ue=>x(ue.target.value)}),f.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[T.map(({harness:ue,models:Ne,hidden:ze})=>f.jsxs("div",{className:"[&_.model-item]:ps-6",children:[f.jsxs("div",{className:uT,children:[f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx(L2,{harness:ue.id,size:14}),ue.name]}),!ue.agentReady&&f.jsxs("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:[f.jsx(rS,{size:10})," ",OE()]})]}),ue.agentReady?f.jsxs(f.Fragment,{children:[ue.models.length===0&&f.jsxs(Mr,{onClick:()=>z(ue,null),children:[f.jsxs("span",{children:[S7(),f.jsx("span",{className:"model-id",children:DE()})]}),(e==null?void 0:e.harness)===ue.id&&(e==null?void 0:e.model)===null&&f.jsx(_i,{size:13})]}),Ne.map(Ie=>f.jsxs(Mr,{title:Ie.id,onClick:()=>z(ue,Ie.id),children:[f.jsx("span",{children:op(Ie)}),(e==null?void 0:e.harness)===ue.id&&(e==null?void 0:e.model)===Ie.id&&f.jsx(_i,{size:13})]},Ie.id)),ze>0&&f.jsx("div",{className:Ek,children:eme({count:Vt(ze)})}),w.trim().length>0&&!ue.models.some(Ie=>Ie.id===w.trim())&&f.jsx(Mr,{onClick:()=>z(ue,w.trim()),children:f.jsx("span",{children:wme({id:we(w.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:ue.agentNote?Bh(ue.agentNote):sme()})]},ue.id)),h.length===0&&f.jsx("div",{className:Ek,children:Ope()})]}),d&&e&&h.length>1&&f.jsxs("div",{className:"model-locked-note flex items-center gap-1.5 py-[7px] px-3 text-sm text-muted border-t border-t-border-variant [&_svg]:shrink-0",children:[f.jsx(rS,{size:11}),fme()]})]}),C==="reasoning"&&f.jsxs(f.Fragment,{children:[se(Z),le(a,H,l,L)]}),C==="permissions"&&f.jsxs(f.Fragment,{children:[se(k7()),le(t,F,r,B)]}),C==="speed"&&f.jsxs(f.Fragment,{children:[se(C7()),le(X,J??void 0,"default",Y)]})]})]})}function th({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:a=!1,disabled:l=!1,variant:o="pill",title:c,numbered:d=!1,renderIcon:_,onSelect:h,className:m}){var T,z;const{open:g,setOpen:S,ref:k}=Va();if(e.length===0)return null;const v=n??t??((T=e[0])==null?void 0:T.id)??null,b=e.find(D=>D.id===v),w=e.find(D=>D.id===t),x=o==="bare"&&(w==null?void 0:w.id)===lp?w:void 0,C=x?e.filter(D=>D.id!==x.id):e,j=(b==null?void 0:b.label)??((z=e[0])==null?void 0:z.label)??"",N=D=>{h(D),S(!1)};return f.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:k,children:[f.jsxs("button",{type:"button",className:os(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"}`,m),title:c,"aria-haspopup":"menu","aria-expanded":g,disabled:l,onClick:()=>S(D=>!D),children:[f.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[b&&(_==null?void 0:_(b)),f.jsx("span",{className:"truncate",children:j})]}),f.jsx($a,{size:12})]}),g&&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 ${e.some(D=>D.description)?"min-w-80":""} ${o==="field"?"min-w-full":""} ${s==="right"?"align-right":""} ${a?"drop-down":""}`,children:[r&&f.jsx("div",{className:uT,children:r}),x&&f.jsxs(f.Fragment,{children:[f.jsxs(Mr,{type:"button",onClick:()=>N(x.id),children:[f.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(x),f.jsxs("span",{children:[x.label,f.jsx("span",{className:"option-default text-muted font-normal",children:DE()})]})]}),v===x.id&&f.jsx(_i,{size:13})]}),f.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),C.map((D,O)=>f.jsxs(Mr,{type:"button",onClick:()=>N(D.id),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(D),f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[D.label,!x&&D.id===t&&f.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",LE()]})]}),D.description&&f.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:D.description})]})]}),v===D.id?f.jsx(_i,{size:13}):d&&f.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:O+1})]},D.id))]})]})}const Nk={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 aht(e){return Nk[e]??Nk.idle}const oht={done:vGe,failed:NGe,running:LGe,starting:$Ge,cancelling:pGe,cancelled:dGe,editing:SGe,idle:TGe};function dT(e){const n=oht[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function ko({status:e,label:n,className:t}){const r=aht(e);return f.jsx(Xx,{tone:r.tone,live:r.live,className:t,children:n??dT(e)})}var Yb={exports:{}},zk;function lht(){return zk||(zk=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 a=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(a._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,a=s._renderService.dimensions;if(a.css.cell.width===0||a.css.cell.height===0)return;const l=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(o.getPropertyValue("height")),d=Math.max(0,parseInt(o.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),h=c-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),m=d-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-l;return{cols:Math.max(2,Math.floor(m/a.css.cell.width)),rows:Math.max(1,Math.floor(h/a.css.cell.height))}}}})(),t})()))})(Yb)),Yb.exports}var cht=lht(),Xb={exports:{}},jk;function uht(){return jk||(jk=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(l,o)=>{function c(_){try{const h=new URL(_),m=h.password&&h.username?`${h.protocol}//${h.username}:${h.password}@${h.host}`:h.username?`${h.protocol}//${h.username}@${h.host}`:`${h.protocol}//${h.host}`;return _.toLocaleLowerCase().startsWith(m.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(_,h,m,g={}){this._terminal=_,this._regex=h,this._handler=m,this._options=g}provideLinks(_,h){const m=d.computeLink(_,this._regex,this._terminal,this._handler);h(this._addCallbacks(m))}_addCallbacks(_){return _.map((h=>(h.leave=this._options.leave,h.hover=(m,g)=>{if(this._options.hover){const{range:S}=h;this._options.hover(m,g,S)}},h)))}};class d{static computeLink(h,m,g,S){const k=new RegExp(m.source,(m.flags||"")+"g"),[v,b]=d._getWindowedLineStrings(h-1,g),w=v.join("");let x;const C=[];for(;x=k.exec(w);){const j=x[0];if(!c(j))continue;const[N,T]=d._mapStrIdx(g,b,0,x.index),[z,D]=d._mapStrIdx(g,N,T,j.length);if(N===-1||T===-1||z===-1||D===-1)continue;const O={start:{x:T+1,y:N+1},end:{x:D,y:z+1}};C.push({range:O,text:j,activate:S})}return C}static _getWindowedLineStrings(h,m){let g,S=h,k=h,v=0,b="";const w=[];if(g=m.buffer.active.getLine(h)){const x=g.translateToString(!0);if(g.isWrapped&&x[0]!==" "){for(v=0;(g=m.buffer.active.getLine(--S))&&v<2048&&(b=g.translateToString(!0),v+=b.length,w.push(b),g.isWrapped&&b.indexOf(" ")===-1););w.reverse()}for(w.push(x),v=0;(g=m.buffer.active.getLine(++k))&&g.isWrapped&&v<2048&&(b=g.translateToString(!0),v+=b.length,w.push(b),b.indexOf(" ")===-1););}return[w,S]}static _mapStrIdx(h,m,g,S){const k=h.buffer.active,v=k.getNullCell();let b=g;for(;S;){const w=k.getLine(m);if(!w)return[-1,-1];for(let x=b;x{var l=a;Object.defineProperty(l,"__esModule",{value:!0}),l.WebLinksAddon=void 0;const o=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(_,h){const m=window.open();if(m){try{m.opener=null}catch{}m.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}l.WebLinksAddon=class{constructor(_=d,h={}){this._handler=_,this._options=h}activate(_){this._terminal=_;const h=this._options,m=h.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,m,this._handler,h))}dispose(){var _;(_=this._linkProvider)==null||_.dispose()}}})(),a})()))})(Xb)),Xb.exports}var dht=uht(),Zb={exports:{}},Ak;function fht(){return Ak||(Ak=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(l,o,c){var d=this&&this.__decorate||function(w,x,C,j){var N,T=arguments.length,z=T<3?x:j===null?j=Object.getOwnPropertyDescriptor(x,C):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(w,x,C,j);else for(var D=w.length-1;D>=0;D--)(N=w[D])&&(z=(T<3?N(z):T>3?N(x,C,z):N(x,C))||z);return T>3&&z&&Object.defineProperty(x,C,z),z},_=this&&this.__param||function(w,x){return function(C,j){x(C,j,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const h=c(9042),m=c(9924),g=c(844),S=c(4725),k=c(2585),v=c(3656);let b=o.AccessibilityManager=class extends g.Disposable{constructor(w,x,C,j){super(),this._terminal=w,this._coreBrowserService=C,this._renderService=j,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 N=0;Nthis._handleBoundaryFocus(N,0),this._bottomBoundaryFocusListener=N=>this._handleBoundaryFocus(N,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 m.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((N=>this._handleResize(N.rows)))),this.register(this._terminal.onRender((N=>this._refreshRows(N.start,N.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((N=>this._handleChar(N)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` -`)))),this.register(this._terminal.onA11yTab((N=>this._handleTab(N)))),this.register(this._terminal.onKey((N=>this._handleKey(N.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,g.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(w){for(let x=0;x0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===` -`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.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,x){this._liveRegionDebouncer.refresh(w,x,this._terminal.rows)}_renderRows(w,x){const C=this._terminal.buffer,j=C.lines.length.toString();for(let N=w;N<=x;N++){const T=C.lines.get(C.ydisp+N),z=[],D=(T==null?void 0:T.translateToString(!0,void 0,void 0,z))||"",O=(C.ydisp+N+1).toString(),H=this._rowElements[N];H&&(D.length===0?(H.innerText=" ",this._rowColumns.set(H,[0,1])):(H.textContent=D,this._rowColumns.set(H,z)),H.setAttribute("aria-posinset",O),H.setAttribute("aria-setsize",j))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(w,x){const C=w.target,j=this._rowElements[x===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(x===0?"1":`${this._terminal.buffer.lines.length}`)||w.relatedTarget!==j)return;let N,T;if(x===0?(N=C,T=this._rowElements.pop(),this._rowContainer.removeChild(T)):(N=this._rowElements.shift(),T=C,this._rowContainer.removeChild(N)),N.removeEventListener("focus",this._topBoundaryFocusListener),T.removeEventListener("focus",this._bottomBoundaryFocusListener),x===0){const z=this._createAccessibilityTreeNode();this._rowElements.unshift(z),this._rowContainer.insertAdjacentElement("afterbegin",z)}else{const z=this._createAccessibilityTreeNode();this._rowElements.push(z),this._rowContainer.appendChild(z)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(x===0?-1:1),this._rowElements[x===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}_handleSelectionChange(){var D;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 x={node:w.anchorNode,offset:w.anchorOffset},C={node:w.focusNode,offset:w.focusOffset};if((x.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||x.node===C.node&&x.offset>C.offset)&&([x,C]=[C,x]),x.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(x={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(x.node))return;const j=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(j)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:j,offset:((D=j.textContent)==null?void 0:D.length)??0}),!this._rowContainer.contains(C.node))return;const N=({node:O,offset:H})=>{const P=O instanceof Text?O.parentNode:O;let F=parseInt(P==null?void 0:P.getAttribute("aria-posinset"),10)-1;if(isNaN(F))return console.warn("row is invalid. Race condition?"),null;const W=this._rowColumns.get(P);if(!W)return console.warn("columns is null. Race condition?"),null;let Z=H=this._terminal.cols&&(++F,Z=0),{row:F,column:Z}},T=N(x),z=N(C);if(T&&z){if(T.row>z.row||T.row===z.row&&T.column>=z.column)throw new Error("invalid range");this._terminal.select(T.column,T.row,(z.row-T.row)*this._terminal.cols-T.column+z.column)}}_handleResize(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let x=this._rowContainer.children.length;xw;)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(m){return m.replace(/\r?\n/g,"\r")}function d(m,g){return g?"\x1B[200~"+m+"\x1B[201~":m}function _(m,g,S,k){m=d(m=c(m),S.decPrivateModes.bracketedPasteMode&&k.rawOptions.ignoreBracketedPasteMode!==!0),S.triggerDataEvent(m,!0),g.value=""}function h(m,g,S){const k=S.getBoundingClientRect(),v=m.clientX-k.left-10,b=m.clientY-k.top-10;g.style.width="20px",g.style.height="20px",g.style.left=`${v}px`,g.style.top=`${b}px`,g.style.zIndex="1000",g.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=d,o.copyHandler=function(m,g){m.clipboardData&&m.clipboardData.setData("text/plain",g.selectionText),m.preventDefault()},o.handlePasteEvent=function(m,g,S,k){m.stopPropagation(),m.clipboardData&&_(m.clipboardData.getData("text/plain"),g,S,k)},o.paste=_,o.moveTextAreaUnderMouseCursor=h,o.rightClickHandler=function(m,g,S,k,v){h(m,g,S),v&&k.rightClickSelect(m),g.value=k.selectionText,g.select()}},7239:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const d=c(1505);o.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(_,h,m){this._css.set(_,h,m)}getCss(_,h){return this._css.get(_,h)}setColor(_,h,m){this._color.set(_,h,m)}getColor(_,h){return this._color.get(_,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(c,d,_,h){c.addEventListener(d,_,h);let m=!1;return{dispose:()=>{m||(m=!0,c.removeEventListener(d,_,h))}}}},3551:function(l,o,c){var d=this&&this.__decorate||function(b,w,x,C){var j,N=arguments.length,T=N<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,x,C);else for(var z=b.length-1;z>=0;z--)(j=b[z])&&(T=(N<3?j(T):N>3?j(w,x,T):j(w,x))||T);return N>3&&T&&Object.defineProperty(w,x,T),T},_=this&&this.__param||function(b,w){return function(x,C){w(x,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const h=c(3656),m=c(8460),g=c(844),S=c(2585),k=c(4725);let v=o.Linkifier=class extends g.Disposable{get currentLink(){return this._currentLink}constructor(b,w,x,C,j){super(),this._element=b,this._mouseService=w,this._renderService=x,this._bufferService=C,this._linkProviderService=j,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,g.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,g.toDisposable)((()=>{var N;this._lastMouseEvent=void 0,(N=this._activeProviderReplies)==null||N.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(b){this._lastMouseEvent=b;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!w)return;this._isMouseOut=!1;const x=b.composedPath();for(let C=0;C{N==null||N.forEach((T=>{T.link.dispose&&T.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let x=!1;for(const[N,T]of this._linkProviderService.linkProviders.entries())w?(j=this._activeProviderReplies)!=null&&j.get(N)&&(x=this._checkLinkProviderResult(N,b,x)):T.provideLinks(b.y,(z=>{var O,H;if(this._isMouseOut)return;const D=z==null?void 0:z.map((P=>({link:P})));(O=this._activeProviderReplies)==null||O.set(N,D),x=this._checkLinkProviderResult(N,b,x),((H=this._activeProviderReplies)==null?void 0:H.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,w){const x=new Set;for(let C=0;Cb?this._bufferService.cols:T.link.range.end.x;for(let O=z;O<=D;O++){if(x.has(O)){j.splice(N--,1);break}x.add(O)}}}}_checkLinkProviderResult(b,w,x){var N;if(!this._activeProviderReplies)return x;const C=this._activeProviderReplies.get(b);let j=!1;for(let T=0;Tthis._linkAtPosition(z.link,w)));T&&(x=!0,this._handleNewLink(T))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!x)for(let T=0;Tthis._linkAtPosition(D.link,w)));if(z){x=!0,this._handleNewLink(z);break}}return x}_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,g.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 x,C;return(C=(x=this._currentLink)==null?void 0:x.state)==null?void 0:C.decorations.pointerCursor},set:x=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==x&&(this._currentLink.state.decorations.pointerCursor=x,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",x))}},underline:{get:()=>{var x,C;return(C=(x=this._currentLink)==null?void 0:x.state)==null?void 0:C.decorations.underline},set:x=>{var C,j,N;(C=this._currentLink)!=null&&C.state&&((N=(j=this._currentLink)==null?void 0:j.state)==null?void 0:N.decorations.underline)!==x&&(this._currentLink.state.decorations.underline=x,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,x))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((x=>{if(!this._currentLink)return;const C=x.start===0?0:x.start+1+this._bufferService.buffer.ydisp,j=this._bufferService.buffer.ydisp+1+x.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=j&&(this._clearCurrentLink(C,j),this._lastMouseEvent)){const N=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);N&&this._askForLink(N,!1)}}))))}_linkHover(b,w,x){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(x,w.text)}_fireUnderlineEvent(b,w){const x=b.range,C=this._bufferService.buffer.ydisp,j=this._createLinkUnderlineEvent(x.start.x-1,x.start.y-C-1,x.end.x,x.end.y-C-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(j)}_linkLeave(b,w,x){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(x,w.text)}_linkAtPosition(b,w){const x=b.range.start.y*this._bufferService.cols+b.range.start.x,C=b.range.end.y*this._bufferService.cols+b.range.end.x,j=w.y*this._bufferService.cols+w.x;return x<=j&&j<=C}_positionFromMouseEvent(b,w,x){const C=x.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,x,C,j){return{x1:b,y1:w,x2:x,y2:C,cols:this._bufferService.cols,fg:j}}};o.Linkifier=v=d([_(1,k.IMouseService),_(2,k.IRenderService),_(3,S.IBufferService),_(4,k.ILinkProviderService)],v)},9042:(l,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(l,o,c){var d=this&&this.__decorate||function(k,v,b,w){var x,C=arguments.length,j=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(k,v,b,w);else for(var N=k.length-1;N>=0;N--)(x=k[N])&&(j=(C<3?x(j):C>3?x(v,b,j):x(v,b))||j);return C>3&&j&&Object.defineProperty(v,b,j),j},_=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 h=c(511),m=c(2585);let g=o.OscLinkProvider=class{constructor(k,v,b){this._bufferService=k,this._optionsService=v,this._oscLinkService=b}provideLinks(k,v){var D;const b=this._bufferService.buffer.lines.get(k-1);if(!b)return void v(void 0);const w=[],x=this._optionsService.rawOptions.linkHandler,C=new h.CellData,j=b.getTrimmedLength();let N=-1,T=-1,z=!1;for(let O=0;Ox?x.activate(W,Z,P):S(0,Z),hover:(W,Z)=>{var G;return(G=x==null?void 0:x.hover)==null?void 0:G.call(x,W,Z,P)},leave:(W,Z)=>{var G;return(G=x==null?void 0:x.leave)==null?void 0:G.call(x,W,Z,P)}})}z=!1,C.hasExtendedAttrs()&&C.extended.urlId?(T=O,N=C.extended.urlId):(T=-1,N=-1)}}v(w)}};function S(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=g=d([_(0,m.IBufferService),_(1,m.IOptionsService),_(2,m.IOscLinkService)],g)},6193:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(c,d){this._renderCallback=c,this._coreBrowserService=d,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,d,_){this._rowCount=_,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d,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),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const d=c(3614),_=c(3656),h=c(3551),m=c(9042),g=c(3730),S=c(1680),k=c(3107),v=c(5744),b=c(2950),w=c(1296),x=c(428),C=c(4269),j=c(5114),N=c(8934),T=c(3230),z=c(9312),D=c(4725),O=c(6731),H=c(8055),P=c(8969),F=c(8460),W=c(844),Z=c(6114),G=c(8437),X=c(2584),J=c(7399),$=c(5941),L=c(9074),B=c(2585),Y=c(5435),V=c(4567),se=c(779);class le extends P.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(re={}){super(re),this.browser=Z,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new W.MutableDisposable),this._onCursorMove=this.register(new F.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new F.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new F.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new F.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new F.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new F.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new F.EventEmitter),this._onBlur=this.register(new F.EventEmitter),this._onA11yCharEmitter=this.register(new F.EventEmitter),this._onA11yTabEmitter=this.register(new F.EventEmitter),this._onWillOpen=this.register(new F.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(B.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(se.LinkProviderService),this._instantiationService.setService(D.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(g.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((q,oe)=>this.refresh(q,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((q=>this._reportWindowsOptions(q)))),this.register(this._inputHandler.onColor((q=>this._handleColorEvent(q)))),this.register((0,F.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,F.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((q=>this._afterResize(q.cols,q.rows)))),this.register((0,W.toDisposable)((()=>{var q,oe;this._customKeyEventHandler=void 0,(oe=(q=this.element)==null?void 0:q.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(re){if(this._themeService)for(const q of re){let oe,ce="";switch(q.index){case 256:oe="foreground",ce="10";break;case 257:oe="background",ce="11";break;case 258:oe="cursor",ce="12";break;default:oe="ansi",ce="4;"+q.index}switch(q.type){case 0:const _e=H.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${X.C0.ESC}]${ce};${(0,$.toRgbString)(_e)}${X.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((ue=>ue.ansi[q.index]=H.channels.toColor(...q.color)));else{const ue=oe;this._themeService.modifyColors((Ne=>Ne[ue]=H.channels.toColor(...q.color)))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(re){re?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(re){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var re;return(re=this.textarea)==null?void 0:re.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const re=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(re);if(!q)return;const oe=Math.min(this.buffer.x,this.cols-1),ce=this._renderService.dimensions.css.cell.height,_e=q.getWidth(oe),ue=this._renderService.dimensions.css.cell.width*_e,Ne=this.buffer.y*this._renderService.dimensions.css.cell.height,ze=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ze+"px",this.textarea.style.top=Ne+"px",this.textarea.style.width=ue+"px",this.textarea.style.height=ce+"px",this.textarea.style.lineHeight=ce+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,_.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,d.copyHandler)(q,this._selectionService)})));const re=q=>(0,d.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,_.addDisposableDomListener)(this.textarea,"paste",re)),this.register((0,_.addDisposableDomListener)(this.element,"paste",re)),Z.isFirefox?this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,d.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,_.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,d.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Z.isLinux&&this.register((0,_.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,d.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,_.addDisposableDomListener)(this.textarea,"keyup",(re=>this._keyUp(re)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keydown",(re=>this._keyDown(re)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keypress",(re=>this._keyPress(re)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionupdate",(re=>this._compositionHelper.compositionupdate(re)))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,_.addDisposableDomListener)(this.textarea,"input",(re=>this._inputEvent(re)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(re){var oe;if(!re)throw new Error("Terminal requires a parent element.");if(re.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=re.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"),re.appendChild(this.element);const q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,_.addDisposableDomListener)(this.screenElement,"mousemove",(ce=>this.updateCursorStyle(ce)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),Z.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(j.CoreBrowserService,this.textarea,re.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(D.ICoreBrowserService,this._coreBrowserService),this.register((0,_.addDisposableDomListener)(this.textarea,"focus",(ce=>this._handleTextAreaFocus(ce)))),this.register((0,_.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(x.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(D.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(O.ThemeService),this._instantiationService.setService(D.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(D.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(T.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(D.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ce=>this._onRender.fire(ce)))),this.onResize((ce=>this._renderService.resize(ce.cols,ce.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(N.MouseService),this._instantiationService.setService(D.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(S.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ce=>this.scrollLines(ce.amount,ce.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(z.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(D.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ce=>this.scrollLines(ce.amount,ce.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ce=>this._renderService.handleSelectionChanged(ce.start,ce.end,ce.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ce=>{this.textarea.value=ce,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ce=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(ce=>this._selectionService.handleMouseDown(ce)))),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(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ce=>this._handleScreenReaderModeOptionChange(ce)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ce=>{!this._overviewRulerRenderer&&ce&&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 re=this,q=this.element;function oe(ue){const Ne=re._mouseService.getMouseReportCoords(ue,re.screenElement);if(!Ne)return!1;let ze,Ie;switch(ue.overrideType||ue.type){case"mousemove":Ie=32,ue.buttons===void 0?(ze=3,ue.button!==void 0&&(ze=ue.button<3?ue.button:3)):ze=1&ue.buttons?0:4&ue.buttons?1:2&ue.buttons?2:3;break;case"mouseup":Ie=0,ze=ue.button<3?ue.button:3;break;case"mousedown":Ie=1,ze=ue.button<3?ue.button:3;break;case"wheel":if(re._customWheelEventHandler&&re._customWheelEventHandler(ue)===!1||re.viewport.getLinesScrolled(ue)===0)return!1;Ie=ue.deltaY<0?0:1,ze=4;break;default:return!1}return!(Ie===void 0||ze===void 0||ze>4)&&re.coreMouseService.triggerMouseEvent({col:Ne.col,row:Ne.row,x:Ne.x,y:Ne.y,button:ze,action:Ie,ctrl:ue.ctrlKey,alt:ue.altKey,shift:ue.shiftKey})}const ce={mouseup:null,wheel:null,mousedrag:null,mousemove:null},_e={mouseup:ue=>(oe(ue),ue.buttons||(this._document.removeEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.removeEventListener("mousemove",ce.mousedrag)),this.cancel(ue)),wheel:ue=>(oe(ue),this.cancel(ue,!0)),mousedrag:ue=>{ue.buttons&&oe(ue)},mousemove:ue=>{ue.buttons||oe(ue)}};this.register(this.coreMouseService.onProtocolChange((ue=>{ue?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ue)),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&ue?ce.mousemove||(q.addEventListener("mousemove",_e.mousemove),ce.mousemove=_e.mousemove):(q.removeEventListener("mousemove",ce.mousemove),ce.mousemove=null),16&ue?ce.wheel||(q.addEventListener("wheel",_e.wheel,{passive:!1}),ce.wheel=_e.wheel):(q.removeEventListener("wheel",ce.wheel),ce.wheel=null),2&ue?ce.mouseup||(ce.mouseup=_e.mouseup):(this._document.removeEventListener("mouseup",ce.mouseup),ce.mouseup=null),4&ue?ce.mousedrag||(ce.mousedrag=_e.mousedrag):(this._document.removeEventListener("mousemove",ce.mousedrag),ce.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,_.addDisposableDomListener)(q,"mousedown",(ue=>{if(ue.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ue))return oe(ue),ce.mouseup&&this._document.addEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.addEventListener("mousemove",ce.mousedrag),this.cancel(ue)}))),this.register((0,_.addDisposableDomListener)(q,"wheel",(ue=>{if(!ce.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ue)===!1)return!1;if(!this.buffer.hasScrollback){const Ne=this.viewport.getLinesScrolled(ue);if(Ne===0)return;const ze=X.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ue.deltaY<0?"A":"B");let Ie="";for(let Pe=0;Pe{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ue),this.cancel(ue)}),{passive:!0})),this.register((0,_.addDisposableDomListener)(q,"touchmove",(ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ue)?void 0:this.cancel(ue)}),{passive:!1}))}refresh(re,q){var oe;(oe=this._renderService)==null||oe.refreshRows(re,q)}updateCursorStyle(re){var q;(q=this._selectionService)!=null&&q.shouldColumnSelect(re)?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(re,q,oe=0){var ce;oe===1?(super.scrollLines(re,q,oe),this.refresh(0,this.rows-1)):(ce=this.viewport)==null||ce.scrollLines(re)}paste(re){(0,d.paste)(re,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(re){this._customKeyEventHandler=re}attachCustomWheelEventHandler(re){this._customWheelEventHandler=re}registerLinkProvider(re){return this._linkProviderService.registerLinkProvider(re)}registerCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const q=this._characterJoinerService.register(re);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(re)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(re){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+re)}registerDecoration(re){return this._decorationService.registerDecoration(re)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(re,q,oe){this._selectionService.setSelection(re,q,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 re;(re=this._selectionService)==null||re.clearSelection()}selectAll(){var re;(re=this._selectionService)==null||re.selectAll()}selectLines(re,q){var oe;(oe=this._selectionService)==null||oe.selectLines(re,q)}_keyDown(re){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&re.altKey;if(!q&&!this._compositionHelper.keydown(re))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||re.key!=="Dead"&&re.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,J.evaluateKeyboardEvent)(re,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(re),oe.type===3||oe.type===2){const ce=this.rows-1;return this.scrollLines(oe.type===2?-ce:ce),this.cancel(re,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,re)||(oe.cancel&&this.cancel(re,!0),!oe.key||!!(re.key&&!re.ctrlKey&&!re.altKey&&!re.metaKey&&re.key.length===1&&re.key.charCodeAt(0)>=65&&re.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==X.C0.ETX&&oe.key!==X.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||re.altKey||re.ctrlKey?this.cancel(re,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(re,q){const oe=re.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||re.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||re.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?oe:oe&&(!q.keyCode||q.keyCode>47)}_keyUp(re){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(re)||this.focus(),this.updateCursorStyle(re),this._keyPressHandled=!1)}_keyPress(re){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;if(this.cancel(re),re.charCode)q=re.charCode;else if(re.which===null||re.which===void 0)q=re.keyCode;else{if(re.which===0||re.charCode===0)return!1;q=re.which}return!(!q||(re.altKey||re.ctrlKey||re.metaKey)&&!this._isThirdLevelShift(this.browser,re)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(re){if(re.data&&re.inputType==="insertText"&&(!re.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const q=re.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(re),!0}return!1}resize(re,q){re!==this.cols||q!==this.rows?super.resize(re,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(re,q){var oe,ce;(oe=this._charSizeService)==null||oe.measure(),(ce=this.viewport)==null||ce.syncScrollArea(!0)}clear(){var re;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let q=1;q{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(c,d=1e3){this._renderCallback=c,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,d,_){this._rowCount=_,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=h-this._lastRefreshMs,g=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),g)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d)}}},1680:function(l,o,c){var d=this&&this.__decorate||function(b,w,x,C){var j,N=arguments.length,T=N<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,x,C);else for(var z=b.length-1;z>=0;z--)(j=b[z])&&(T=(N<3?j(T):N>3?j(w,x,T):j(w,x))||T);return N>3&&T&&Object.defineProperty(w,x,T),T},_=this&&this.__param||function(b,w){return function(x,C){w(x,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const h=c(3656),m=c(4725),g=c(8460),S=c(844),k=c(2585);let v=o.Viewport=class extends S.Disposable{constructor(b,w,x,C,j,N,T,z){super(),this._viewportElement=b,this._scrollArea=w,this._bufferService=x,this._optionsService=C,this._charSizeService=j,this._renderService=N,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 g.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((D=>this._activeBuffer=D.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((D=>this._renderDimensions=D))),this._handleThemeChange(z.colors),this.register(z.onChangeColors((D=>this._handleThemeChange(D)))),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 x=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&x0&&(x=P),C=""}}return{bufferElements:j,cursorElement:x}}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 x=this._optionsService.rawOptions.fastScrollModifier;return x==="alt"&&w.altKey||x==="ctrl"&&w.ctrlKey||x==="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=d([_(2,k.IBufferService),_(3,k.IOptionsService),_(4,m.ICharSizeService),_(5,m.IRenderService),_(6,m.ICoreBrowserService),_(7,m.IThemeService)],v)},3107:function(l,o,c){var d=this&&this.__decorate||function(k,v,b,w){var x,C=arguments.length,j=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(k,v,b,w);else for(var N=k.length-1;N>=0;N--)(x=k[N])&&(j=(C<3?x(j):C>3?x(v,b,j):x(v,b))||j);return C>3&&j&&Object.defineProperty(v,b,j),j},_=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 h=c(4725),m=c(844),g=c(2585);let S=o.BufferDecorationRenderer=class extends m.Disposable{constructor(k,v,b,w,x){super(),this._screenElement=k,this._bufferService=v,this._coreBrowserService=b,this._decorationService=w,this._renderService=x,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,m.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=S=d([_(1,g.IBufferService),_(2,h.ICoreBrowserService),_(3,g.IDecorationService),_(4,h.IRenderService)],S)},5871:(l,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 d of this._zones)if(d.color===c.options.overviewRulerOptions.color&&d.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,c.marker.line))return;if(this._lineAdjacentToZone(d,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(d,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&d<=c.endBufferLine}_lineAdjacentToZone(c,d,_){return d>=c.startBufferLine-this._linePadding[_||"full"]&&d<=c.endBufferLine+this._linePadding[_||"full"]}_addLineToZone(c,d){c.startBufferLine=Math.min(c.startBufferLine,d),c.endBufferLine=Math.max(c.endBufferLine,d)}}},5744:function(l,o,c){var d=this&&this.__decorate||function(x,C,j,N){var T,z=arguments.length,D=z<3?C:N===null?N=Object.getOwnPropertyDescriptor(C,j):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(x,C,j,N);else for(var O=x.length-1;O>=0;O--)(T=x[O])&&(D=(z<3?T(D):z>3?T(C,j,D):T(C,j))||D);return z>3&&D&&Object.defineProperty(C,j,D),D},_=this&&this.__param||function(x,C){return function(j,N){C(j,N,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const h=c(5871),m=c(4725),g=c(844),S=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 g.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(x,C,j,N,T,z,D){var H;super(),this._viewportElement=x,this._screenElement=C,this._bufferService=j,this._decorationService=N,this._renderService=T,this._optionsService=z,this._coreBrowserService=D,this._colorZoneStore=new h.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(),(H=this._viewportElement.parentElement)==null||H.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,g.toDisposable)((()=>{var P;(P=this._canvas)==null||P.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 x=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=x,v.center=C,v.right=x,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 x=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(x,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 x=this._colorZoneStore.zones;for(const C of x)C.position!=="full"&&this._renderColorZone(C);for(const C of x)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(x){this._ctx.fillStyle=x.color,this._ctx.fillRect(b[x.position||"full"],Math.round((this._canvas.height-1)*(x.startBufferLine/this._bufferService.buffers.active.lines.length)-k[x.position||"full"]/2),v[x.position||"full"],Math.round((this._canvas.height-1)*((x.endBufferLine-x.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[x.position||"full"]))}_queueRefresh(x,C){this._shouldUpdateDimensions=x||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=d([_(2,S.IBufferService),_(3,S.IDecorationService),_(4,m.IRenderService),_(5,S.IOptionsService),_(6,m.ICoreBrowserService)],w)},2950:function(l,o,c){var d=this&&this.__decorate||function(k,v,b,w){var x,C=arguments.length,j=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(k,v,b,w);else for(var N=k.length-1;N>=0;N--)(x=k[N])&&(j=(C<3?x(j):C>3?x(v,b,j):x(v,b))||j);return C>3&&j&&Object.defineProperty(v,b,j),j},_=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 h=c(4725),m=c(2585),g=c(2584);let S=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(k,v,b,w,x,C){this._textarea=k,this._compositionView=v,this._bufferService=b,this._optionsService=w,this._coreService=x,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=S=d([_(2,m.IBufferService),_(3,m.IOptionsService),_(4,m.ICoreService),_(5,h.IRenderService)],S)},9806:(l,o)=>{function c(d,_,h){const m=h.getBoundingClientRect(),g=d.getComputedStyle(h),S=parseInt(g.getPropertyValue("padding-left")),k=parseInt(g.getPropertyValue("padding-top"));return[_.clientX-m.left-S,_.clientY-m.top-k]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(d,_,h,m,g,S,k,v,b){if(!S)return;const w=c(d,_,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),m+(b?1:0)),w[1]=Math.min(Math.max(w[1],1),g),w):void 0}},9504:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const d=c(2584);function _(v,b,w,x){const C=v-h(v,w),j=b-h(b,w),N=Math.abs(C-j)-(function(T,z,D){let O=0;const H=T-h(T,D),P=z-h(z,D);for(let F=0;F=0&&vb?"A":"B"}function g(v,b,w,x,C,j){let N=v,T=b,z="";for(;N!==w||T!==x;)N+=C?1:-1,C&&N>j.cols-1?(z+=j.buffer.translateBufferLineToString(T,!1,v,N),N=0,v=0,T++):!C&&N<0&&(z+=j.buffer.translateBufferLineToString(T,!1,0,v+1),N=j.cols-1,v=N,T--);return z+j.buffer.translateBufferLineToString(T,!1,v,N)}function S(v,b){const w=b?"O":"[";return d.C0.ESC+w+v}function k(v,b){v=Math.floor(v);let w="";for(let x=0;x0?H-h(H,P):D;const Z=H,G=(function(X,J,$,L,B,Y){let V;return V=_($,L,B,Y).length>0?L-h(L,B):J,X<$&&V<=L||X>=$&&Vv?"D":"C",k(Math.abs(C-v),S(N,x));N=j>b?"D":"C";const T=Math.abs(j-b);return k((function(z,D){return D.cols-z})(j>b?v:C,w)+(T-1)*w.cols+1+((j>b?C:v)-1),S(N,x))}},1296:function(l,o,c){var d=this&&this.__decorate||function(F,W,Z,G){var X,J=arguments.length,$=J<3?W:G===null?G=Object.getOwnPropertyDescriptor(W,Z):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(F,W,Z,G);else for(var L=F.length-1;L>=0;L--)(X=F[L])&&($=(J<3?X($):J>3?X(W,Z,$):X(W,Z))||$);return J>3&&$&&Object.defineProperty(W,Z,$),$},_=this&&this.__param||function(F,W){return function(Z,G){W(Z,G,F)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const h=c(3787),m=c(2550),g=c(2223),S=c(6171),k=c(6052),v=c(4725),b=c(8055),w=c(8460),x=c(844),C=c(2585),j="xterm-dom-renderer-owner-",N="xterm-rows",T="xterm-fg-",z="xterm-bg-",D="xterm-focus",O="xterm-selection";let H=1,P=o.DomRenderer=class extends x.Disposable{constructor(F,W,Z,G,X,J,$,L,B,Y,V,se,le){super(),this._terminal=F,this._document=W,this._element=Z,this._screenElement=G,this._viewportElement=X,this._helperContainer=J,this._linkifier2=$,this._charSizeService=B,this._optionsService=Y,this._bufferService=V,this._coreBrowserService=se,this._themeService=le,this._terminalClass=H++,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(N),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(O),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,S.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ae=>this._injectCss(ae)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(j+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ae=>this._handleLinkHover(ae)))),this.register(this._linkifier2.onHideLinkUnderline((ae=>this._handleLinkLeave(ae)))),this.register((0,x.toDisposable)((()=>{this._element.classList.remove(j+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new m.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 F=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*F,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*F),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/F),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/F),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 Z of this._rowElements)Z.style.width=`${this.dimensions.css.canvas.width}px`,Z.style.height=`${this.dimensions.css.cell.height}px`,Z.style.lineHeight=`${this.dimensions.css.cell.height}px`,Z.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const W=`${this._terminalSelector} .${N} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=W,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(F){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let W=`${this._terminalSelector} .${N} { color: ${F.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;W+=`${this._terminalSelector} .${N} .xterm-dim { color: ${b.color.multiplyOpacity(F.foreground,.5).css};}`,W+=`${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 Z=`blink_underline_${this._terminalClass}`,G=`blink_bar_${this._terminalClass}`,X=`blink_block_${this._terminalClass}`;W+=`@keyframes ${Z} { 50% { border-bottom-style: hidden; }}`,W+=`@keyframes ${G} { 50% { box-shadow: none; }}`,W+=`@keyframes ${X} { 0% { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css}; } 50% { background-color: inherit; color: ${F.cursor.css}; }}`,W+=`${this._terminalSelector} .${N}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${N}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${G} 1s step-end infinite;}${this._terminalSelector} .${N}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-block { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css};}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${F.cursor.css} !important; color: ${F.cursorAccent.css} !important;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${F.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${F.cursor.css} inset;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${F.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,W+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${F.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${F.selectionInactiveBackgroundOpaque.css};}`;for(const[J,$]of F.ansi.entries())W+=`${this._terminalSelector} .${T}${J} { color: ${$.css}; }${this._terminalSelector} .${T}${J}.xterm-dim { color: ${b.color.multiplyOpacity($,.5).css}; }${this._terminalSelector} .${z}${J} { background-color: ${$.css}; }`;W+=`${this._terminalSelector} .${T}${g.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(F.background).css}; }${this._terminalSelector} .${T}${g.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(F.background),.5).css}; }${this._terminalSelector} .${z}${g.INVERTED_DEFAULT_COLOR} { background-color: ${F.foreground.css}; }`,this._themeStyleElement.textContent=W}_setDefaultSpacing(){const F=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${F}px`,this._rowFactory.defaultSpacing=F}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(F,W){for(let Z=this._rowElements.length;Z<=W;Z++){const G=this._document.createElement("div");this._rowContainer.appendChild(G),this._rowElements.push(G)}for(;this._rowElements.length>W;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(F,W){this._refreshRowElements(F,W),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(D),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(D),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(F,W,Z){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(F,W,Z),this.renderRows(0,this._bufferService.rows-1),!F||!W)return;this._selectionRenderModel.update(this._terminal,F,W,Z);const G=this._selectionRenderModel.viewportStartRow,X=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,$=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||$<0)return;const L=this._document.createDocumentFragment();if(Z){const B=F[0]>W[0];L.appendChild(this._createSelectionElement(J,B?W[0]:F[0],B?F[0]:W[0],$-J+1))}else{const B=G===J?F[0]:0,Y=J===X?W[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(J,B,Y));const V=$-J-1;if(L.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,V)),J!==$){const se=X===$?W[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement($,0,se))}}this._selectionContainer.appendChild(L)}_createSelectionElement(F,W,Z,G=1){const X=this._document.createElement("div"),J=W*this.dimensions.css.cell.width;let $=this.dimensions.css.cell.width*(Z-W);return J+$>this.dimensions.css.canvas.width&&($=this.dimensions.css.canvas.width-J),X.style.height=G*this.dimensions.css.cell.height+"px",X.style.top=F*this.dimensions.css.cell.height+"px",X.style.left=`${J}px`,X.style.width=`${$}px`,X}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const F of this._rowElements)F.replaceChildren()}renderRows(F,W){const Z=this._bufferService.buffer,G=Z.ybase+Z.y,X=Math.min(Z.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=F;B<=W;B++){const Y=B+Z.ydisp,V=this._rowElements[B],se=Z.lines.get(Y);if(!V||!se)break;V.replaceChildren(...this._rowFactory.createRow(se,Y,Y===G,$,L,X,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${j}${this._terminalClass}`}_handleLinkHover(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!0)}_handleLinkLeave(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!1)}_setCellUnderline(F,W,Z,G,X,J){Z<0&&(F=0),G<0&&(W=0);const $=this._bufferService.rows-1;Z=Math.max(Math.min(Z,$),0),G=Math.max(Math.min(G,$),0),X=Math.min(X,this._bufferService.cols);const L=this._bufferService.buffer,B=L.ybase+L.y,Y=Math.min(L.x,X-1),V=this._optionsService.rawOptions.cursorBlink,se=this._optionsService.rawOptions.cursorStyle,le=this._optionsService.rawOptions.cursorInactiveStyle;for(let ae=Z;ae<=G;++ae){const re=ae+L.ydisp,q=this._rowElements[ae],oe=L.lines.get(re);if(!q||!oe)break;q.replaceChildren(...this._rowFactory.createRow(oe,re,re===B,se,le,Y,V,this.dimensions.css.cell.width,this._widthCache,J?ae===Z?F:0:-1,J?(ae===G?W:X)-1:-1))}}};o.DomRenderer=P=d([_(7,C.IInstantiationService),_(8,v.ICharSizeService),_(9,C.IOptionsService),_(10,C.IBufferService),_(11,v.ICoreBrowserService),_(12,v.IThemeService)],P)},3787:function(l,o,c){var d=this&&this.__decorate||function(N,T,z,D){var O,H=arguments.length,P=H<3?T:D===null?D=Object.getOwnPropertyDescriptor(T,z):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(N,T,z,D);else for(var F=N.length-1;F>=0;F--)(O=N[F])&&(P=(H<3?O(P):H>3?O(T,z,P):O(T,z))||P);return H>3&&P&&Object.defineProperty(T,z,P),P},_=this&&this.__param||function(N,T){return function(z,D){T(z,D,N)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const h=c(2223),m=c(643),g=c(511),S=c(2585),k=c(8055),v=c(4725),b=c(4269),w=c(6171),x=c(3734);let C=o.DomRendererRowFactory=class{constructor(N,T,z,D,O,H,P){this._document=N,this._characterJoinerService=T,this._optionsService=z,this._coreBrowserService=D,this._coreService=O,this._decorationService=H,this._themeService=P,this._workCell=new g.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(N,T,z){this._selectionStart=N,this._selectionEnd=T,this._columnSelectMode=z}createRow(N,T,z,D,O,H,P,F,W,Z,G){const X=[],J=this._characterJoinerService.getJoinedCharacters(T),$=this._themeService.colors;let L,B=N.getNoBgTrimmedLength();z&&B0&&Ne===J[0][0]){Ie=!0;const mt=J.shift();$e=new b.JoinedCellData(this._workCell,N.translateToString(!0,mt[0],mt[1]),mt[1]-mt[0]),Pe=mt[1]-1,ze=$e.getWidth()}const It=this._isCellInSelection(Ne,T),yt=z&&Ne===H,qe=ue&&Ne>=Z&&Ne<=G;let jt=!1;this._decorationService.forEachDecorationAtCell(Ne,T,void 0,(mt=>{jt=!0}));let pt=$e.getChars()||m.WHITESPACE_CELL_CHAR;if(pt===" "&&($e.isUnderline()||$e.isOverline())&&(pt=" "),ce=ze*F-W.get(pt,$e.isBold(),$e.isItalic()),L){if(Y&&(It&&oe||!It&&!oe&&$e.bg===se)&&(It&&oe&&$.selectionForeground||$e.fg===le)&&$e.extended.ext===ae&&qe===re&&ce===q&&!yt&&!Ie&&!jt){$e.isInvisible()?V+=m.WHITESPACE_CELL_CHAR:V+=pt,Y++;continue}Y&&(L.textContent=V),L=this._document.createElement("span"),Y=0,V=""}else L=this._document.createElement("span");if(se=$e.bg,le=$e.fg,ae=$e.extended.ext,re=qe,q=ce,oe=It,Ie&&H>=Ne&&H<=Pe&&(H=Ne),!this._coreService.isCursorHidden&&yt&&this._coreService.isCursorInitialized){if(_e.push("xterm-cursor"),this._coreBrowserService.isFocused)P&&_e.push("xterm-cursor-blink"),_e.push(D==="bar"?"xterm-cursor-bar":D==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":_e.push("xterm-cursor-outline");break;case"block":_e.push("xterm-cursor-block");break;case"bar":_e.push("xterm-cursor-bar");break;case"underline":_e.push("xterm-cursor-underline")}}if($e.isBold()&&_e.push("xterm-bold"),$e.isItalic()&&_e.push("xterm-italic"),$e.isDim()&&_e.push("xterm-dim"),V=$e.isInvisible()?m.WHITESPACE_CELL_CHAR:$e.getChars()||m.WHITESPACE_CELL_CHAR,$e.isUnderline()&&(_e.push(`xterm-underline-${$e.extended.underlineStyle}`),V===" "&&(V=" "),!$e.isUnderlineColorDefault()))if($e.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${x.AttributeData.toColorRGB($e.getUnderlineColor()).join(",")})`;else{let mt=$e.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&$e.isBold()&&mt<8&&(mt+=8),L.style.textDecorationColor=$.ansi[mt].css}$e.isOverline()&&(_e.push("xterm-overline"),V===" "&&(V=" ")),$e.isStrikethrough()&&_e.push("xterm-strikethrough"),qe&&(L.style.textDecoration="underline");let ot=$e.getFgColor(),tt=$e.getFgColorMode(),Ft=$e.getBgColor(),ke=$e.getBgColorMode();const Re=!!$e.isInverse();if(Re){const mt=ot;ot=Ft,Ft=mt;const Wt=tt;tt=ke,ke=Wt}let Xe,nt,st,St=!1;switch(this._decorationService.forEachDecorationAtCell(Ne,T,void 0,(mt=>{mt.options.layer!=="top"&&St||(mt.backgroundColorRGB&&(ke=50331648,Ft=mt.backgroundColorRGB.rgba>>8&16777215,Xe=mt.backgroundColorRGB),mt.foregroundColorRGB&&(tt=50331648,ot=mt.foregroundColorRGB.rgba>>8&16777215,nt=mt.foregroundColorRGB),St=mt.options.layer==="top")})),!St&&It&&(Xe=this._coreBrowserService.isFocused?$.selectionBackgroundOpaque:$.selectionInactiveBackgroundOpaque,Ft=Xe.rgba>>8&16777215,ke=50331648,St=!0,$.selectionForeground&&(tt=50331648,ot=$.selectionForeground.rgba>>8&16777215,nt=$.selectionForeground)),St&&_e.push("xterm-decoration-top"),ke){case 16777216:case 33554432:st=$.ansi[Ft],_e.push(`xterm-bg-${Ft}`);break;case 50331648:st=k.channels.toColor(Ft>>16,Ft>>8&255,255&Ft),this._addStyle(L,`background-color:#${j((Ft>>>0).toString(16),"0",6)}`);break;default:Re?(st=$.foreground,_e.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):st=$.background}switch(Xe||$e.isDim()&&(Xe=k.color.multiplyOpacity(st,.5)),tt){case 16777216:case 33554432:$e.isBold()&&ot<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ot+=8),this._applyMinimumContrast(L,st,$.ansi[ot],$e,Xe,void 0)||_e.push(`xterm-fg-${ot}`);break;case 50331648:const mt=k.channels.toColor(ot>>16&255,ot>>8&255,255&ot);this._applyMinimumContrast(L,st,mt,$e,Xe,nt)||this._addStyle(L,`color:#${j(ot.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,st,$.foreground,$e,Xe,nt)||Re&&_e.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}_e.length&&(L.className=_e.join(" "),_e.length=0),yt||Ie||jt?L.textContent=V:Y++,ce!==this.defaultSpacing&&(L.style.letterSpacing=`${ce}px`),X.push(L),Ne=Pe}return L&&Y&&(L.textContent=V),X}_applyMinimumContrast(N,T,z,D,O,H){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,w.treatGlyphAsBackgroundColor)(D.getCode()))return!1;const P=this._getContrastCache(D);let F;if(O||H||(F=P.getColor(T.rgba,z.rgba)),F===void 0){const W=this._optionsService.rawOptions.minimumContrastRatio/(D.isDim()?2:1);F=k.color.ensureContrastRatio(O||T,H||z,W),P.setColor((O||T).rgba,(H||z).rgba,F??null)}return!!F&&(this._addStyle(N,`color:${F.css}`),!0)}_getContrastCache(N){return N.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(N,T){N.setAttribute("style",`${N.getAttribute("style")||""}${T};`)}_isCellInSelection(N,T){const z=this._selectionStart,D=this._selectionEnd;return!(!z||!D)&&(this._columnSelectMode?z[0]<=D[0]?N>=z[0]&&T>=z[1]&&N=z[1]&&N>=D[0]&&T<=D[1]:T>z[1]&&T=z[0]&&N=z[0])}};function j(N,T,z){for(;N.length{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(c,d){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 _=c.createElement("span");_.classList.add("xterm-char-measure-element");const h=c.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const g=c.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontWeight="bold",g.style.fontStyle="italic",this._measureElements=[_,h,m,g],this._container.appendChild(_),this._container.appendChild(h),this._container.appendChild(m),this._container.appendChild(g),d.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,d,_,h){c===this._font&&d===this._fontSize&&_===this._weight&&h===this._weightBold||(this._font=c,this._fontSize=d,this._weight=_,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${_}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${_}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(c,d,_){let h=0;if(!d&&!_&&c.length===1&&(h=c.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const S=this._measure(c,0);return S>0&&(this._flat[h]=S),S}let m=c;d&&(m+="B"),_&&(m+="I");let g=this._holey.get(m);if(g===void 0){let S=0;d&&(S|=1),_&&(S|=2),g=this._measure(c,S),g>0&&this._holey.set(m,g)}return g}_measure(c,d){const _=this._measureElements[d];return _.textContent=c.repeat(32),_.offsetWidth/32}}},2223:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const d=c(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(l,o)=>{function c(_){return 57508<=_&&_<=57558}function d(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},o.isEmoji=d,o.allowRescaling=function(_,h,m,g){return h===1&&m>Math.ceil(1.5*g)&&_!==void 0&&_>255&&!d(_)&&!c(_)&&!(function(S){return 57344<=S&&S<=63743})(_)},o.treatGlyphAsBackgroundColor=function(_){return c(_)||(function(h){return 9472<=h&&h<=9631})(_)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},o.computeNextVariantOffset=function(_,h,m=0){return(_-(2*Math.round(h)-m))%(2*Math.round(h))}},6052:(l,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,m,g=!1){if(this.selectionStart=h,this.selectionEnd=m,!h||!m||h[0]===m[0]&&h[1]===m[1])return void this.clear();const S=_.buffers.active.ydisp,k=h[1]-S,v=m[1]-S,b=Math.max(k,0),w=Math.min(v,_.rows-1);b>=_.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=g,this.viewportStartRow=k,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=w,this.startCol=h[0],this.endCol=m[0])}isCellSelected(_,h,m){return!!this.hasSelection&&(m-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&m>=this.viewportCappedStartRow&&h=this.viewportCappedStartRow&&h>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m=this.startCol&&h=this.startCol)}}o.createSelectionRenderModel=function(){return new c}},456:(l,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,d=this.selectionEnd;return!(!c||!d)&&(c[1]>d[1]||c[1]===d[1]&&c[0]>d[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(l,o,c){var d=this&&this.__decorate||function(w,x,C,j){var N,T=arguments.length,z=T<3?x:j===null?j=Object.getOwnPropertyDescriptor(x,C):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(w,x,C,j);else for(var D=w.length-1;D>=0;D--)(N=w[D])&&(z=(T<3?N(z):T>3?N(x,C,z):N(x,C))||z);return T>3&&z&&Object.defineProperty(x,C,z),z},_=this&&this.__param||function(w,x){return function(C,j){x(C,j,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const h=c(2585),m=c(8460),g=c(844);let S=o.CharSizeService=class extends g.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(w,x,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new b(this._optionsService))}catch{this._measureStrategy=this.register(new v(w,x,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=S=d([_(2,h.IOptionsService)],S);class k extends g.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(x,C){x!==void 0&&x>0&&C!==void 0&&C>0&&(this._result.width=x,this._result.height=C)}}class v extends k{constructor(x,C,j){super(),this._document=x,this._parentElement=C,this._optionsService=j,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(x){super(),this._optionsService=x,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 x=this._ctx.measureText("W");return this._validateAndSet(x.width,x.fontBoundingBoxAscent+x.fontBoundingBoxDescent),this._result}}},4269:function(l,o,c){var d=this&&this.__decorate||function(b,w,x,C){var j,N=arguments.length,T=N<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,x,C);else for(var z=b.length-1;z>=0;z--)(j=b[z])&&(T=(N<3?j(T):N>3?j(w,x,T):j(w,x))||T);return N>3&&T&&Object.defineProperty(w,x,T),T},_=this&&this.__param||function(b,w){return function(x,C){w(x,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const h=c(3734),m=c(643),g=c(511),S=c(2585);class k extends h.AttributeData{constructor(w,x,C){super(),this.content=0,this.combinedData="",this.fg=w.fg,this.bg=w.bg,this.combinedData=x,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 fT{constructor(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new g.CellData}register(w){const x={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(x),x.id}deregister(w){for(let x=0;x1){const P=this._getJoinedRanges(j,z,T,x,N);for(let F=0;F1){const H=this._getJoinedRanges(j,z,T,x,N);for(let P=0;P{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const d=c(844),_=c(8460),h=c(3656);class m extends d.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 g(this._window),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new _.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((w=>this._screenDprMonitor.setWindow(w)))),this.register((0,_.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(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=m;class g extends d.Disposable{constructor(k){super(),this._parentWindow=k,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(k){this._parentWindow=k,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.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:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const d=c(844);class _ extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const g=this.linkProviders.indexOf(m);g!==-1&&this.linkProviders.splice(g,1)}}}}o.LinkProviderService=_},8934:function(l,o,c){var d=this&&this.__decorate||function(S,k,v,b){var w,x=arguments.length,C=x<3?k:b===null?b=Object.getOwnPropertyDescriptor(k,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(S,k,v,b);else for(var j=S.length-1;j>=0;j--)(w=S[j])&&(C=(x<3?w(C):x>3?w(k,v,C):w(k,v))||C);return x>3&&C&&Object.defineProperty(k,v,C),C},_=this&&this.__param||function(S,k){return function(v,b){k(v,b,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const h=c(4725),m=c(9806);let g=o.MouseService=class{constructor(S,k){this._renderService=S,this._charSizeService=k}getCoords(S,k,v,b,w){return(0,m.getCoords)(window,S,k,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,w)}getMouseReportCoords(S,k){const v=(0,m.getCoordsRelativeToElement)(window,S,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=g=d([_(0,h.IRenderService),_(1,h.ICharSizeService)],g)},3230:function(l,o,c){var d=this&&this.__decorate||function(w,x,C,j){var N,T=arguments.length,z=T<3?x:j===null?j=Object.getOwnPropertyDescriptor(x,C):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(w,x,C,j);else for(var D=w.length-1;D>=0;D--)(N=w[D])&&(z=(T<3?N(z):T>3?N(x,C,z):N(x,C))||z);return T>3&&z&&Object.defineProperty(x,C,z),z},_=this&&this.__param||function(w,x){return function(C,j){x(C,j,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const h=c(6193),m=c(4725),g=c(8460),S=c(844),k=c(7226),v=c(2585);let b=o.RenderService=class extends S.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(w,x,C,j,N,T,z,D){super(),this._rowCount=w,this._charSizeService=j,this._renderer=this.register(new S.MutableDisposable),this._pausedResizeTask=new k.DebouncedIdleTask,this._observerDisposable=this.register(new S.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 g.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new g.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new g.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new g.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer(((O,H)=>this._renderRows(O,H)),z),this.register(this._renderDebouncer),this.register(z.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(T.onResize((()=>this._fullRefresh()))),this.register(T.buffers.onBufferActivate((()=>{var O;return(O=this._renderer.value)==null?void 0:O.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(N.onDecorationRegistered((()=>this._fullRefresh()))),this.register(N.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(D.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(z.window,x),this.register(z.onWindowChange((O=>this._registerIntersectionObserver(O,x))))}_registerIntersectionObserver(w,x){if("IntersectionObserver"in w){const C=new w.IntersectionObserver((j=>this._handleIntersectionChange(j[j.length-1])),{threshold:0});C.observe(x),this._observerDisposable.value=(0,S.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,x,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,x,this._rowCount))}_renderRows(w,x){this._renderer.value&&(w=Math.min(w,this._rowCount-1),x=Math.min(x,this._rowCount-1),this._renderer.value.renderRows(w,x),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:x}),this._onRender.fire({start:w,end:x}),this._isNextRenderRedrawOnly=!0)}resize(w,x){this._rowCount=x,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((x=>this.refreshRows(x.start,x.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,x;this._renderer.value&&((x=(w=this._renderer.value).clearTextureAtlas)==null||x.call(w),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(w,x){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(w,x)})):this._renderer.value.handleResize(w,x),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,x,C){var j;this._selectionState.start=w,this._selectionState.end=x,this._selectionState.columnSelectMode=C,(j=this._renderer.value)==null||j.handleSelectionChanged(w,x,C)}handleCursorMove(){var w;(w=this._renderer.value)==null||w.handleCursorMove()}clear(){var w;(w=this._renderer.value)==null||w.clear()}};o.RenderService=b=d([_(2,v.IOptionsService),_(3,m.ICharSizeService),_(4,v.IDecorationService),_(5,v.IBufferService),_(6,m.ICoreBrowserService),_(7,m.IThemeService)],b)},9312:function(l,o,c){var d=this&&this.__decorate||function(z,D,O,H){var P,F=arguments.length,W=F<3?D:H===null?H=Object.getOwnPropertyDescriptor(D,O):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(z,D,O,H);else for(var Z=z.length-1;Z>=0;Z--)(P=z[Z])&&(W=(F<3?P(W):F>3?P(D,O,W):P(D,O))||W);return F>3&&W&&Object.defineProperty(D,O,W),W},_=this&&this.__param||function(z,D){return function(O,H){D(O,H,z)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const h=c(9806),m=c(9504),g=c(456),S=c(4725),k=c(8460),v=c(844),b=c(6114),w=c(4841),x=c(511),C=c(2585),j=" ",N=new RegExp(j,"g");let T=o.SelectionService=class extends v.Disposable{constructor(z,D,O,H,P,F,W,Z,G){super(),this._element=z,this._screenElement=D,this._linkifier=O,this._bufferService=H,this._coreService=P,this._mouseService=F,this._optionsService=W,this._renderService=Z,this._coreBrowserService=G,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new x.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=X=>this._handleMouseMove(X),this._mouseUpListener=X=>this._handleMouseUp(X),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((X=>this._handleTrim(X))),this.register(this._bufferService.buffers.onBufferActivate((X=>this._handleBufferActivate(X)))),this.enable(),this._model=new g.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 z=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!z||!D||z[0]===D[0]&&z[1]===D[1])}get selectionText(){const z=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;if(!z||!D)return"";const O=this._bufferService.buffer,H=[];if(this._activeSelectionMode===3){if(z[0]===D[0])return"";const P=z[0]P.replace(N," "))).join(b.isWindows?`\r -`:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(z){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&z&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(z){const D=this._getMouseBufferCoords(z),O=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!!(O&&H&&D)&&this._areCoordsInSelection(D,O,H)}isCellInSelection(z,D){const O=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!(!O||!H)&&this._areCoordsInSelection([z,D],O,H)}_areCoordsInSelection(z,D,O){return z[1]>D[1]&&z[1]=D[0]&&z[0]=D[0]}_selectWordAtCursor(z,D){var P,F;const O=(F=(P=this._linkifier.currentLink)==null?void 0:P.link)==null?void 0:F.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,w.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const H=this._getMouseBufferCoords(z);return!!H&&(this._selectWordAt(H,D),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(z,D){this._model.clearSelection(),z=Math.max(z,0),D=Math.min(D,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,z],this._model.selectionEnd=[this._bufferService.cols,D],this.refresh(),this._onSelectionChange.fire()}_handleTrim(z){this._model.handleTrim(z)&&this.refresh()}_getMouseBufferCoords(z){const D=this._mouseService.getCoords(z,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(D)return D[0]--,D[1]--,D[1]+=this._bufferService.buffer.ydisp,D}_getMouseEventScrollAmount(z){let D=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,z,this._screenElement)[1];const O=this._renderService.dimensions.css.canvas.height;return D>=0&&D<=O?0:(D>O&&(D-=O),D=Math.min(Math.max(D,-50),50),D/=50,D/Math.abs(D)+Math.round(14*D))}shouldForceSelection(z){return b.isMac?z.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:z.shiftKey}handleMouseDown(z){if(this._mouseDownTimeStamp=z.timeStamp,(z.button!==2||!this.hasSelection)&&z.button===0){if(!this._enabled){if(!this.shouldForceSelection(z))return;z.stopPropagation()}z.preventDefault(),this._dragScrollAmount=0,this._enabled&&z.shiftKey?this._handleIncrementalClick(z):z.detail===1?this._handleSingleClick(z):z.detail===2?this._handleDoubleClick(z):z.detail===3&&this._handleTripleClick(z),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(z){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(z))}_handleSingleClick(z){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(z)?3:0,this._model.selectionStart=this._getMouseBufferCoords(z),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const D=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);D&&D.length!==this._model.selectionStart[0]&&D.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(z){this._selectWordAtCursor(z,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(z){const D=this._getMouseBufferCoords(z);D&&(this._activeSelectionMode=2,this._selectLineAt(D[1]))}shouldColumnSelect(z){return z.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(z){if(z.stopImmediatePropagation(),!this._model.selectionStart)return;const D=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(z),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const O=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(z.ydisp+this._bufferService.rows,z.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=z.ydisp),this.refresh()}}_handleMouseUp(z){const D=z.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&D<500&&z.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(z,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const H=(0,m.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(H,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const z=this._model.finalSelectionStart,D=this._model.finalSelectionEnd,O=!(!z||!D||z[0]===D[0]&&z[1]===D[1]);O?z&&D&&(this._oldSelectionStart&&this._oldSelectionEnd&&z[0]===this._oldSelectionStart[0]&&z[1]===this._oldSelectionStart[1]&&D[0]===this._oldSelectionEnd[0]&&D[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(z,D,O)):this._oldHasSelection&&this._fireOnSelectionChange(z,D,O)}_fireOnSelectionChange(z,D,O){this._oldSelectionStart=z,this._oldSelectionEnd=D,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(z){this.clearSelection(),this._trimListener.dispose(),this._trimListener=z.activeBuffer.lines.onTrim((D=>this._handleTrim(D)))}_convertViewportColToCharacterIndex(z,D){let O=D;for(let H=0;D>=H;H++){const P=z.loadCell(H,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:P>1&&D!==H&&(O+=P-1)}return O}setSelection(z,D,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[z,D],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(z){this._isClickInSelection(z)||(this._selectWordAtCursor(z,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(z,D,O=!0,H=!0){if(z[0]>=this._bufferService.cols)return;const P=this._bufferService.buffer,F=P.lines.get(z[1]);if(!F)return;const W=P.translateBufferLineToString(z[1],!1);let Z=this._convertViewportColToCharacterIndex(F,z[0]),G=Z;const X=z[0]-Z;let J=0,$=0,L=0,B=0;if(W.charAt(Z)===" "){for(;Z>0&&W.charAt(Z-1)===" ";)Z--;for(;G1&&(B+=ae-1,G+=ae-1);se>0&&Z>0&&!this._isCharWordSeparator(F.loadCell(se-1,this._workCell));){F.loadCell(se-1,this._workCell);const re=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,se--):re>1&&(L+=re-1,Z-=re-1),Z--,se--}for(;le1&&(B+=re-1,G+=re-1),G++,le++}}G++;let Y=Z+X-J+L,V=Math.min(this._bufferService.cols,G-Z+J+$-L-B);if(D||W.slice(Z,G).trim()!==""){if(O&&Y===0&&F.getCodePoint(0)!==32){const se=P.lines.get(z[1]-1);if(se&&F.isWrapped&&se.getCodePoint(this._bufferService.cols-1)!==32){const le=this._getWordAt([this._bufferService.cols-1,z[1]-1],!1,!0,!1);if(le){const ae=this._bufferService.cols-le.start;Y-=ae,V+=ae}}}if(H&&Y+V===this._bufferService.cols&&F.getCodePoint(this._bufferService.cols-1)!==32){const se=P.lines.get(z[1]+1);if(se!=null&&se.isWrapped&&se.getCodePoint(0)!==32){const le=this._getWordAt([0,z[1]+1],!1,!1,!0);le&&(V+=le.length)}}return{start:Y,length:V}}}_selectWordAt(z,D){const O=this._getWordAt(z,D);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,z[1]--;this._model.selectionStart=[O.start,z[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(z){const D=this._getWordAt(z,!0);if(D){let O=z[1];for(;D.start<0;)D.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;D.start+D.length>this._bufferService.cols;)D.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?D.start:D.start+D.length,O]}}_isCharWordSeparator(z){return z.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(z.getChars())>=0}_selectLineAt(z){const D=this._bufferService.buffer.getWrappedRangeForLine(z),O={start:{x:0,y:D.first},end:{x:this._bufferService.cols-1,y:D.last}};this._model.selectionStart=[0,D.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,w.getRangeLength)(O,this._bufferService.cols)}};o.SelectionService=T=d([_(3,C.IBufferService),_(4,C.ICoreService),_(5,S.IMouseService),_(6,C.IOptionsService),_(7,S.IRenderService),_(8,S.ICoreBrowserService)],T)},4725:(l,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 d=c(8343);o.ICharSizeService=(0,d.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),o.IMouseService=(0,d.createDecorator)("MouseService"),o.IRenderService=(0,d.createDecorator)("RenderService"),o.ISelectionService=(0,d.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,d.createDecorator)("ThemeService"),o.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(l,o,c){var d=this&&this.__decorate||function(T,z,D,O){var H,P=arguments.length,F=P<3?z:O===null?O=Object.getOwnPropertyDescriptor(z,D):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(T,z,D,O);else for(var W=T.length-1;W>=0;W--)(H=T[W])&&(F=(P<3?H(F):P>3?H(z,D,F):H(z,D))||F);return P>3&&F&&Object.defineProperty(z,D,F),F},_=this&&this.__param||function(T,z){return function(D,O){z(D,O,T)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const h=c(7239),m=c(8055),g=c(8460),S=c(844),k=c(2585),v=m.css.toColor("#ffffff"),b=m.css.toColor("#000000"),w=m.css.toColor("#ffffff"),x=m.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],z=[0,95,135,175,215,255];for(let D=0;D<216;D++){const O=z[D/36%6|0],H=z[D/6%6|0],P=z[D%6];T.push({css:m.channels.toCss(O,H,P),rgba:m.channels.toRgba(O,H,P)})}for(let D=0;D<24;D++){const O=8+10*D;T.push({css:m.channels.toCss(O,O,O),rgba:m.channels.toRgba(O,O,O)})}return T})());let j=o.ThemeService=class extends S.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new g.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:b,cursor:w,cursorAccent:x,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:m.color.blend(b,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:m.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 z=this._colors;if(z.foreground=N(T.foreground,v),z.background=N(T.background,b),z.cursor=N(T.cursor,w),z.cursorAccent=N(T.cursorAccent,x),z.selectionBackgroundTransparent=N(T.selectionBackground,C),z.selectionBackgroundOpaque=m.color.blend(z.background,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundTransparent=N(T.selectionInactiveBackground,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundOpaque=m.color.blend(z.background,z.selectionInactiveBackgroundTransparent),z.selectionForeground=T.selectionForeground?N(T.selectionForeground,m.NULL_COLOR):void 0,z.selectionForeground===m.NULL_COLOR&&(z.selectionForeground=void 0),m.color.isOpaque(z.selectionBackgroundTransparent)&&(z.selectionBackgroundTransparent=m.color.opacity(z.selectionBackgroundTransparent,.3)),m.color.isOpaque(z.selectionInactiveBackgroundTransparent)&&(z.selectionInactiveBackgroundTransparent=m.color.opacity(z.selectionInactiveBackgroundTransparent,.3)),z.ansi=o.DEFAULT_ANSI_COLORS.slice(),z.ansi[0]=N(T.black,o.DEFAULT_ANSI_COLORS[0]),z.ansi[1]=N(T.red,o.DEFAULT_ANSI_COLORS[1]),z.ansi[2]=N(T.green,o.DEFAULT_ANSI_COLORS[2]),z.ansi[3]=N(T.yellow,o.DEFAULT_ANSI_COLORS[3]),z.ansi[4]=N(T.blue,o.DEFAULT_ANSI_COLORS[4]),z.ansi[5]=N(T.magenta,o.DEFAULT_ANSI_COLORS[5]),z.ansi[6]=N(T.cyan,o.DEFAULT_ANSI_COLORS[6]),z.ansi[7]=N(T.white,o.DEFAULT_ANSI_COLORS[7]),z.ansi[8]=N(T.brightBlack,o.DEFAULT_ANSI_COLORS[8]),z.ansi[9]=N(T.brightRed,o.DEFAULT_ANSI_COLORS[9]),z.ansi[10]=N(T.brightGreen,o.DEFAULT_ANSI_COLORS[10]),z.ansi[11]=N(T.brightYellow,o.DEFAULT_ANSI_COLORS[11]),z.ansi[12]=N(T.brightBlue,o.DEFAULT_ANSI_COLORS[12]),z.ansi[13]=N(T.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),z.ansi[14]=N(T.brightCyan,o.DEFAULT_ANSI_COLORS[14]),z.ansi[15]=N(T.brightWhite,o.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const D=Math.min(z.ansi.length-16,T.extendedAnsi.length);for(let O=0;O{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const d=c(8460),_=c(844);class h extends _.Disposable{constructor(g){super(),this._maxLength=g,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.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(g){if(this._maxLength===g)return;const S=new Array(g);for(let k=0;kthis._length)for(let S=this._length;S=g;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(g){g>this._length&&(g=this._length),this._startIndex+=g,this._length-=g,this.onTrimEmitter.fire(g)}shiftElements(g,S,k){if(!(S<=0)){if(g<0||g>=this._length)throw new Error("start argument out of range");if(g+k<0)throw new Error("Cannot shift elements in list beyond index 0");if(k>0){for(let b=S-1;b>=0;b--)this.set(g+b+k,this.get(g+b));const v=g+S+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(d,_=5){if(typeof d!="object")return d;const h=Array.isArray(d)?[]:{};for(const m in d)h[m]=_<=1?d[m]:d[m]&&c(d[m],_-1);return h}},8055:(l,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,d=0,_=0,h=0;var m,g,S,k,v;function b(x){const C=x.toString(16);return C.length<2?"0"+C:C}function w(x,C){return x>>0},x.toColor=function(C,j,N,T){return{css:x.toCss(C,j,N,T),rgba:x.toRgba(C,j,N,T)}}})(m||(o.channels=m={})),(function(x){function C(j,N){return h=Math.round(255*N),[c,d,_]=v.toChannels(j.rgba),{css:m.toCss(c,d,_,h),rgba:m.toRgba(c,d,_,h)}}x.blend=function(j,N){if(h=(255&N.rgba)/255,h===1)return{css:N.css,rgba:N.rgba};const T=N.rgba>>24&255,z=N.rgba>>16&255,D=N.rgba>>8&255,O=j.rgba>>24&255,H=j.rgba>>16&255,P=j.rgba>>8&255;return c=O+Math.round((T-O)*h),d=H+Math.round((z-H)*h),_=P+Math.round((D-P)*h),{css:m.toCss(c,d,_),rgba:m.toRgba(c,d,_)}},x.isOpaque=function(j){return(255&j.rgba)==255},x.ensureContrastRatio=function(j,N,T){const z=v.ensureContrastRatio(j.rgba,N.rgba,T);if(z)return m.toColor(z>>24&255,z>>16&255,z>>8&255)},x.opaque=function(j){const N=(255|j.rgba)>>>0;return[c,d,_]=v.toChannels(N),{css:m.toCss(c,d,_),rgba:N}},x.opacity=C,x.multiplyOpacity=function(j,N){return h=255&j.rgba,C(j,h*N/255)},x.toColorRGB=function(j){return[j.rgba>>24&255,j.rgba>>16&255,j.rgba>>8&255]}})(g||(o.color=g={})),(function(x){let C,j;try{const N=document.createElement("canvas");N.width=1,N.height=1;const T=N.getContext("2d",{willReadFrequently:!0});T&&(C=T,C.globalCompositeOperation="copy",j=C.createLinearGradient(0,0,1,1))}catch{}x.toColor=function(N){if(N.match(/#[\da-f]{3,8}/i))switch(N.length){case 4:return c=parseInt(N.slice(1,2).repeat(2),16),d=parseInt(N.slice(2,3).repeat(2),16),_=parseInt(N.slice(3,4).repeat(2),16),m.toColor(c,d,_);case 5:return c=parseInt(N.slice(1,2).repeat(2),16),d=parseInt(N.slice(2,3).repeat(2),16),_=parseInt(N.slice(3,4).repeat(2),16),h=parseInt(N.slice(4,5).repeat(2),16),m.toColor(c,d,_,h);case 7:return{css:N,rgba:(parseInt(N.slice(1),16)<<8|255)>>>0};case 9:return{css:N,rgba:parseInt(N.slice(1),16)>>>0}}const T=N.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]),d=parseInt(T[2]),_=parseInt(T[3]),h=Math.round(255*(T[5]===void 0?1:parseFloat(T[5]))),m.toColor(c,d,_,h);if(!C||!j)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=j,C.fillStyle=N,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,d,_,h]=C.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(c,d,_,h),css:N}}})(S||(o.css=S={})),(function(x){function C(j,N,T){const z=j/255,D=N/255,O=T/255;return .2126*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}x.relativeLuminance=function(j){return C(j>>16&255,j>>8&255,255&j)},x.relativeLuminance2=C})(k||(o.rgb=k={})),(function(x){function C(N,T,z){const D=N>>24&255,O=N>>16&255,H=N>>8&255;let P=T>>24&255,F=T>>16&255,W=T>>8&255,Z=w(k.relativeLuminance2(P,F,W),k.relativeLuminance2(D,O,H));for(;Z0||F>0||W>0);)P-=Math.max(0,Math.ceil(.1*P)),F-=Math.max(0,Math.ceil(.1*F)),W-=Math.max(0,Math.ceil(.1*W)),Z=w(k.relativeLuminance2(P,F,W),k.relativeLuminance2(D,O,H));return(P<<24|F<<16|W<<8|255)>>>0}function j(N,T,z){const D=N>>24&255,O=N>>16&255,H=N>>8&255;let P=T>>24&255,F=T>>16&255,W=T>>8&255,Z=w(k.relativeLuminance2(P,F,W),k.relativeLuminance2(D,O,H));for(;Z>>0}x.blend=function(N,T){if(h=(255&T)/255,h===1)return T;const z=T>>24&255,D=T>>16&255,O=T>>8&255,H=N>>24&255,P=N>>16&255,F=N>>8&255;return c=H+Math.round((z-H)*h),d=P+Math.round((D-P)*h),_=F+Math.round((O-F)*h),m.toRgba(c,d,_)},x.ensureContrastRatio=function(N,T,z){const D=k.relativeLuminance(N>>8),O=k.relativeLuminance(T>>8);if(w(D,O)>8));if(Ww(D,k.relativeLuminance(Z>>8))?F:Z}return F}const H=j(N,T,z),P=w(D,k.relativeLuminance(H>>8));if(Pw(D,k.relativeLuminance(F>>8))?H:F}return H}},x.reduceLuminance=C,x.increaseLuminance=j,x.toChannels=function(N){return[N>>24&255,N>>16&255,N>>8&255,255&N]}})(v||(o.rgba=v={})),o.toPaddedHex=b,o.contrastRatio=w},8969:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const d=c(844),_=c(2585),h=c(4348),m=c(7866),g=c(744),S=c(7302),k=c(6975),v=c(8460),b=c(1753),w=c(1480),x=c(7994),C=c(9282),j=c(5435),N=c(5981),T=c(2660);let z=!1;class D extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((H=>{var P;(P=this._onScrollApi)==null||P.fire(H.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(H){for(const P in H)this.optionsService.options[P]=H[P]}constructor(H){super(),this._windowsWrappingHeuristics=this.register(new d.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 h.InstantiationService,this.optionsService=this.register(new S.OptionsService(H)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(g.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(w.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(x.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new j.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((P=>{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((P=>{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 N.WriteBuffer(((P,F)=>this._inputHandler.parse(P,F)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(H,P){this._writeBuffer.write(H,P)}writeSync(H,P){this._logService.logLevel<=_.LogLevelEnum.WARN&&!z&&(this._logService.warn("writeSync is unreliable and will be removed soon."),z=!0),this._writeBuffer.writeSync(H,P)}input(H,P=!0){this.coreService.triggerDataEvent(H,P)}resize(H,P){isNaN(H)||isNaN(P)||(H=Math.max(H,g.MINIMUM_COLS),P=Math.max(P,g.MINIMUM_ROWS),this._bufferService.resize(H,P))}scroll(H,P=!1){this._bufferService.scroll(H,P)}scrollLines(H,P,F){this._bufferService.scrollLines(H,P,F)}scrollPages(H){this.scrollLines(H*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(H){const P=H-this._bufferService.buffer.ydisp;P!==0&&this.scrollLines(P)}registerEscHandler(H,P){return this._inputHandler.registerEscHandler(H,P)}registerDcsHandler(H,P){return this._inputHandler.registerDcsHandler(H,P)}registerCsiHandler(H,P){return this._inputHandler.registerCsiHandler(H,P)}registerOscHandler(H,P){return this._inputHandler.registerOscHandler(H,P)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let H=!1;const P=this.optionsService.rawOptions.windowsPty;P&&P.buildNumber!==void 0&&P.buildNumber!==void 0?H=P.backend==="conpty"&&P.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(H=!0),H?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const H=[];H.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),H.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const P of H)P.dispose()}))}}}o.CoreTerminal=D},8460:(l,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 d=0;dd.fire(_)))},o.runAndSubscribe=function(c,d){return d(void 0),c((_=>d(_)))}},5435:function(l,o,c){var d=this&&this.__decorate||function(J,$,L,B){var Y,V=arguments.length,se=V<3?$:B===null?B=Object.getOwnPropertyDescriptor($,L):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")se=Reflect.decorate(J,$,L,B);else for(var le=J.length-1;le>=0;le--)(Y=J[le])&&(se=(V<3?Y(se):V>3?Y($,L,se):Y($,L))||se);return V>3&&se&&Object.defineProperty($,L,se),se},_=this&&this.__param||function(J,$){return function(L,B){$(L,B,J)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const h=c(2584),m=c(7116),g=c(2015),S=c(844),k=c(482),v=c(8437),b=c(8460),w=c(643),x=c(511),C=c(3734),j=c(2585),N=c(1480),T=c(6242),z=c(6351),D=c(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},H=131072;function P(J,$){if(J>24)return $.setWinLines||!1;switch(J){case 1:return!!$.restoreWin;case 2:return!!$.minimizeWin;case 3:return!!$.setWinPosition;case 4:return!!$.setWinSizePixels;case 5:return!!$.raiseWin;case 6:return!!$.lowerWin;case 7:return!!$.refreshWin;case 8:return!!$.setWinSizeChars;case 9:return!!$.maximizeWin;case 10:return!!$.fullscreenWin;case 11:return!!$.getWinState;case 13:return!!$.getWinPosition;case 14:return!!$.getWinSizePixels;case 15:return!!$.getScreenSizePixels;case 16:return!!$.getCellSizePixels;case 18:return!!$.getWinSizeChars;case 19:return!!$.getScreenSizeChars;case 20:return!!$.getIconTitle;case 21:return!!$.getWinTitle;case 22:return!!$.pushTitle;case 23:return!!$.popTitle;case 24:return!!$.setWinLines}return!1}var F;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(F||(o.WindowsOptionsReportType=F={}));let W=0;class Z extends S.Disposable{getAttrData(){return this._curAttrData}constructor($,L,B,Y,V,se,le,ae,re=new g.EscapeSequenceParser){super(),this._bufferService=$,this._charsetService=L,this._coreService=B,this._logService=Y,this._optionsService=V,this._oscLinkService=se,this._coreMouseService=le,this._unicodeService=ae,this._parser=re,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new x.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 G(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:oe.toArray()})})),this._parser.setEscHandlerFallback((q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})})),this._parser.setExecuteHandlerFallback((q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})})),this._parser.setOscHandlerFallback(((q,oe,ce)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:oe,data:ce})})),this._parser.setDcsHandlerFallback(((q,oe,ce)=>{oe==="HOOK"&&(ce=ce.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:oe,payload:ce})})),this._parser.setPrintHandler(((q,oe,ce)=>this.print(q,oe,ce))),this._parser.registerCsiHandler({final:"@"},(q=>this.insertChars(q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(q=>this.scrollLeft(q))),this._parser.registerCsiHandler({final:"A"},(q=>this.cursorUp(q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(q=>this.scrollRight(q))),this._parser.registerCsiHandler({final:"B"},(q=>this.cursorDown(q))),this._parser.registerCsiHandler({final:"C"},(q=>this.cursorForward(q))),this._parser.registerCsiHandler({final:"D"},(q=>this.cursorBackward(q))),this._parser.registerCsiHandler({final:"E"},(q=>this.cursorNextLine(q))),this._parser.registerCsiHandler({final:"F"},(q=>this.cursorPrecedingLine(q))),this._parser.registerCsiHandler({final:"G"},(q=>this.cursorCharAbsolute(q))),this._parser.registerCsiHandler({final:"H"},(q=>this.cursorPosition(q))),this._parser.registerCsiHandler({final:"I"},(q=>this.cursorForwardTab(q))),this._parser.registerCsiHandler({final:"J"},(q=>this.eraseInDisplay(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(q=>this.eraseInDisplay(q,!0))),this._parser.registerCsiHandler({final:"K"},(q=>this.eraseInLine(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(q=>this.eraseInLine(q,!0))),this._parser.registerCsiHandler({final:"L"},(q=>this.insertLines(q))),this._parser.registerCsiHandler({final:"M"},(q=>this.deleteLines(q))),this._parser.registerCsiHandler({final:"P"},(q=>this.deleteChars(q))),this._parser.registerCsiHandler({final:"S"},(q=>this.scrollUp(q))),this._parser.registerCsiHandler({final:"T"},(q=>this.scrollDown(q))),this._parser.registerCsiHandler({final:"X"},(q=>this.eraseChars(q))),this._parser.registerCsiHandler({final:"Z"},(q=>this.cursorBackwardTab(q))),this._parser.registerCsiHandler({final:"`"},(q=>this.charPosAbsolute(q))),this._parser.registerCsiHandler({final:"a"},(q=>this.hPositionRelative(q))),this._parser.registerCsiHandler({final:"b"},(q=>this.repeatPrecedingCharacter(q))),this._parser.registerCsiHandler({final:"c"},(q=>this.sendDeviceAttributesPrimary(q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(q=>this.sendDeviceAttributesSecondary(q))),this._parser.registerCsiHandler({final:"d"},(q=>this.linePosAbsolute(q))),this._parser.registerCsiHandler({final:"e"},(q=>this.vPositionRelative(q))),this._parser.registerCsiHandler({final:"f"},(q=>this.hVPosition(q))),this._parser.registerCsiHandler({final:"g"},(q=>this.tabClear(q))),this._parser.registerCsiHandler({final:"h"},(q=>this.setMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(q=>this.setModePrivate(q))),this._parser.registerCsiHandler({final:"l"},(q=>this.resetMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(q=>this.resetModePrivate(q))),this._parser.registerCsiHandler({final:"m"},(q=>this.charAttributes(q))),this._parser.registerCsiHandler({final:"n"},(q=>this.deviceStatus(q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(q=>this.deviceStatusPrivate(q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(q=>this.softReset(q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(q=>this.setCursorStyle(q))),this._parser.registerCsiHandler({final:"r"},(q=>this.setScrollRegion(q))),this._parser.registerCsiHandler({final:"s"},(q=>this.saveCursor(q))),this._parser.registerCsiHandler({final:"t"},(q=>this.windowOptions(q))),this._parser.registerCsiHandler({final:"u"},(q=>this.restoreCursor(q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(q=>this.insertColumns(q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(q=>this.deleteColumns(q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(q=>this.selectProtected(q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(q=>this.requestMode(q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(q=>this.requestMode(q,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new T.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new T.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new T.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new T.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new T.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new T.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new T.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new T.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new T.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new T.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new T.OscHandler((q=>this.restoreCursorColor(q)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const q in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},(()=>this.selectCharset("("+q))),this._parser.registerEscHandler({intermediates:")",final:q},(()=>this.selectCharset(")"+q))),this._parser.registerEscHandler({intermediates:"*",final:q},(()=>this.selectCharset("*"+q))),this._parser.registerEscHandler({intermediates:"+",final:q},(()=>this.selectCharset("+"+q))),this._parser.registerEscHandler({intermediates:"-",final:q},(()=>this.selectCharset("-"+q))),this._parser.registerEscHandler({intermediates:".",final:q},(()=>this.selectCharset("."+q))),this._parser.registerEscHandler({intermediates:"/",final:q},(()=>this.selectCharset("/"+q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((q=>(this._logService.error("Parsing error: ",q),q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new z.DcsHandler(((q,oe)=>this.requestStatusString(q,oe))))}_preserveStack($,L,B,Y){this._parseStack.paused=!0,this._parseStack.cursorStartX=$,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=B,this._parseStack.position=Y}_logSlowResolvingAsync($){this._logService.logLevel<=j.LogLevelEnum.WARN&&Promise.race([$,new Promise(((L,B)=>setTimeout((()=>B("#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($,L){let B,Y=this._activeBuffer.x,V=this._activeBuffer.y,se=0;const le=this._parseStack.paused;if(le){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(B),B;Y=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,$.length>H&&(se=this._parseStack.position+H)}if(this._logService.logLevel<=j.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof $=="string"?` "${$}"`:` "${Array.prototype.map.call($,(q=>String.fromCharCode(q))).join("")}"`),typeof $=="string"?$.split("").map((q=>q.charCodeAt(0))):$),this._parseBuffer.length<$.length&&this._parseBuffer.lengthH)for(let q=se;q<$.length;q+=H){const oe=q+H<$.length?q+H:$.length,ce=typeof $=="string"?this._stringDecoder.decode($.substring(q,oe),this._parseBuffer):this._utf8Decoder.decode($.subarray(q,oe),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,ce))return this._preserveStack(Y,V,ce,q),this._logSlowResolvingAsync(B),B}else if(!le){const q=typeof $=="string"?this._stringDecoder.decode($,this._parseBuffer):this._utf8Decoder.decode($,this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,q))return this._preserveStack(Y,V,q,0),this._logSlowResolvingAsync(B),B}this._activeBuffer.x===Y&&this._activeBuffer.y===V||this._onCursorMove.fire();const ae=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),re=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);re0&&ce.getWidth(this._activeBuffer.x-1)===2&&ce.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let _e=this._parser.precedingJoinState;for(let ue=L;ueae){if(re){const Pe=ce;let $e=this._activeBuffer.x-Ie;for(this._activeBuffer.x=Ie,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),ce=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ie>0&&ce instanceof v.BufferLine&&ce.copyCellsFrom(Pe,$e,0,Ie,!1);$e=0;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(q&&(ce.insertCells(this._activeBuffer.x,V-Ie,this._activeBuffer.getNullCell(oe)),ce.getWidth(ae-1)===2&&ce.setCellFromCodepoint(ae-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,oe)),ce.setCellFromCodepoint(this._activeBuffer.x++,Y,V,oe),V>0)for(;--V;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=_e,this._activeBuffer.x0&&ce.getWidth(this._activeBuffer.x)===0&&!ce.hasContent(this._activeBuffer.x)&&ce.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler($,L){return $.final!=="t"||$.prefix||$.intermediates?this._parser.registerCsiHandler($,L):this._parser.registerCsiHandler($,(B=>!P(B.params[0],this._optionsService.rawOptions.windowOptions)||L(B)))}registerDcsHandler($,L){return this._parser.registerDcsHandler($,new z.DcsHandler(L))}registerEscHandler($,L){return this._parser.registerEscHandler($,L)}registerOscHandler($,L){return this._parser.registerOscHandler($,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 $;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&&(($=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&$.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 $=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-$),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor($=this._bufferService.cols-1){this._activeBuffer.x=Math.min($,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($,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=$,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=$,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor($,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+$,this._activeBuffer.y+L)}cursorUp($){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,$.params[0]||1)):this._moveCursor(0,-($.params[0]||1)),!0}cursorDown($){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,$.params[0]||1)):this._moveCursor(0,$.params[0]||1),!0}cursorForward($){return this._moveCursor($.params[0]||1,0),!0}cursorBackward($){return this._moveCursor(-($.params[0]||1),0),!0}cursorNextLine($){return this.cursorDown($),this._activeBuffer.x=0,!0}cursorPrecedingLine($){return this.cursorUp($),this._activeBuffer.x=0,!0}cursorCharAbsolute($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition($){return this._setCursor($.length>=2?($.params[1]||1)-1:0,($.params[0]||1)-1),!0}charPosAbsolute($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative($){return this._moveCursor($.params[0]||1,0),!0}linePosAbsolute($){return this._setCursor(this._activeBuffer.x,($.params[0]||1)-1),!0}vPositionRelative($){return this._moveCursor(0,$.params[0]||1),!0}hVPosition($){return this.cursorPosition($),!0}tabClear($){const L=$.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected($){const L=$.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine($,L,B,Y=!1,V=!1){const se=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);se.replaceCells(L,B,this._activeBuffer.getNullCell(this._eraseAttrData()),V),Y&&(se.isWrapped=!1)}_resetBufferLine($,L=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+$),B.isWrapped=!1)}eraseInDisplay($,L=!1){let B;switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);B=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 3:const Y=this._activeBuffer.lines.length-this._bufferService.rows;Y>0&&(this._activeBuffer.lines.trimStart(Y),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-Y,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-Y,0),this._onScroll.fire(0))}return!0}eraseInLine($,L=!1){switch(this._restrictCursor(this._bufferService.cols),$.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($){this._restrictCursor();let L=$.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 re=ae;for(let q=1;q0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary($){return $.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent($.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is($){return(this._optionsService.rawOptions.termName+"").indexOf($)===0}setMode($){for(let L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode($){for(let L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),$.params[L]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode($,L){const B=this._coreService.decPrivateModes,{activeProtocol:Y,activeEncoding:V}=this._coreMouseService,se=this._coreService,{buffers:le,cols:ae}=this._bufferService,{active:re,alt:q}=le,oe=this._optionsService.rawOptions,ce=ze=>ze?1:2,_e=$.params[0];return ue=_e,Ne=L?_e===2?4:_e===4?ce(se.modes.insertMode):_e===12?3:_e===20?ce(oe.convertEol):0:_e===1?ce(B.applicationCursorKeys):_e===3?oe.windowOptions.setWinLines?ae===80?2:ae===132?1:0:0:_e===6?ce(B.origin):_e===7?ce(B.wraparound):_e===8?3:_e===9?ce(Y==="X10"):_e===12?ce(oe.cursorBlink):_e===25?ce(!se.isCursorHidden):_e===45?ce(B.reverseWraparound):_e===66?ce(B.applicationKeypad):_e===67?4:_e===1e3?ce(Y==="VT200"):_e===1002?ce(Y==="DRAG"):_e===1003?ce(Y==="ANY"):_e===1004?ce(B.sendFocus):_e===1005?4:_e===1006?ce(V==="SGR"):_e===1015?4:_e===1016?ce(V==="SGR_PIXELS"):_e===1048?1:_e===47||_e===1047||_e===1049?ce(re===q):_e===2004?ce(B.bracketedPasteMode):0,se.triggerDataEvent(`${h.C0.ESC}[${L?"":"?"}${ue};${Ne}$y`),!0;var ue,Ne}_updateAttrColor($,L,B,Y,V){return L===2?($|=50331648,$&=-16777216,$|=C.AttributeData.fromColorRGB([B,Y,V])):L===5&&($&=-50331904,$|=33554432|255&B),$}_extractColor($,L,B){const Y=[0,0,-1,0,0,0];let V=0,se=0;do{if(Y[se+V]=$.params[L+se],$.hasSubParams(L+se)){const le=$.getSubParams(L+se);let ae=0;do Y[1]===5&&(V=1),Y[se+ae+1+V]=le[ae];while(++ae=2||Y[1]===2&&se+V>=5)break;Y[1]&&(V=1)}while(++se+L<$.length&&se+V5)&&($=1),L.extended.underlineStyle=$,L.fg|=268435456,$===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0($){$.fg=v.DEFAULT_ATTR_DATA.fg,$.bg=v.DEFAULT_ATTR_DATA.bg,$.extended=$.extended.clone(),$.extended.underlineStyle=0,$.extended.underlineColor&=-67108864,$.updateExtended()}charAttributes($){if($.length===1&&$.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=$.length;let B;const Y=this._curAttrData;for(let V=0;V=30&&B<=37?(Y.fg&=-50331904,Y.fg|=16777216|B-30):B>=40&&B<=47?(Y.bg&=-50331904,Y.bg|=16777216|B-40):B>=90&&B<=97?(Y.fg&=-50331904,Y.fg|=16777224|B-90):B>=100&&B<=107?(Y.bg&=-50331904,Y.bg|=16777224|B-100):B===0?this._processSGR0(Y):B===1?Y.fg|=134217728:B===3?Y.bg|=67108864:B===4?(Y.fg|=268435456,this._processUnderline($.hasSubParams(V)?$.getSubParams(V)[0]:1,Y)):B===5?Y.fg|=536870912:B===7?Y.fg|=67108864:B===8?Y.fg|=1073741824:B===9?Y.fg|=2147483648:B===2?Y.bg|=134217728:B===21?this._processUnderline(2,Y):B===22?(Y.fg&=-134217729,Y.bg&=-134217729):B===23?Y.bg&=-67108865:B===24?(Y.fg&=-268435457,this._processUnderline(0,Y)):B===25?Y.fg&=-536870913:B===27?Y.fg&=-67108865:B===28?Y.fg&=-1073741825:B===29?Y.fg&=2147483647:B===39?(Y.fg&=-67108864,Y.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):B===49?(Y.bg&=-67108864,Y.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?V+=this._extractColor($,V,Y):B===53?Y.bg|=1073741824:B===55?Y.bg&=-1073741825:B===59?(Y.extended=Y.extended.clone(),Y.extended.underlineColor=-1,Y.updateExtended()):B===100?(Y.fg&=-67108864,Y.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,Y.bg&=-67108864,Y.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus($){switch($.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${L};${B}R`)}return!0}deviceStatusPrivate($){if($.params[0]===6){const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${L};${B}R`)}return!0}softReset($){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($){const L=$.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 B=L%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion($){const L=$.params[0]||1;let B;return($.length<2||(B=$.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions($){if(!P($.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=$.length>1?$.params[1]:0;switch($.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(F.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(F.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.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($){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($){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($){return this._windowTitle=$,this._onTitleChange.fire($),!0}setIconName($){return this._iconName=$,!0}setOrReportIndexedColor($){const L=[],B=$.split(";");for(;B.length>1;){const Y=B.shift(),V=B.shift();if(/^\d+$/.exec(Y)){const se=parseInt(Y);if(X(se))if(V==="?")L.push({type:0,index:se});else{const le=(0,D.parseColor)(V);le&&L.push({type:1,index:se,color:le})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink($){const L=$.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink($,L){this._getCurrentLinkId()&&this._finishHyperlink();const B=$.split(":");let Y;const V=B.findIndex((se=>se.startsWith("id=")));return V!==-1&&(Y=B[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:Y,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($,L){const B=$.split(";");for(let Y=0;Y=this._specialColors.length);++Y,++L)if(B[Y]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const V=(0,D.parseColor)(B[Y]);V&&this._onColor.fire([{type:1,index:this._specialColors[L],color:V}])}return!0}setOrReportFgColor($){return this._setOrReportSpecialColor($,0)}setOrReportBgColor($){return this._setOrReportSpecialColor($,1)}setOrReportCursorColor($){return this._setOrReportSpecialColor($,2)}restoreIndexedColor($){if(!$)return this._onColor.fire([{type:2}]),!0;const L=[],B=$.split(";");for(let Y=0;Y=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const $=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,$,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($){return this._charsetService.setgLevel($),!0}screenAlignmentPattern(){const $=new x.CellData;$.content=4194373,$.fg=this._curAttrData.fg,$.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${h.C0.ESC}${V}${h.C0.ESC}\\`),!0))($==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:$==='"p'?'P1$r61;1"p':$==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:$==="m"?"P1$r0m":$===" q"?`P1$r${{block:2,underline:4,bar:6}[Y.cursorStyle]-(Y.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty($,L){this._dirtyRowTracker.markRangeDirty($,L)}}o.InputHandler=Z;let G=class{constructor(J){this._bufferService=J,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(J){Jthis.end&&(this.end=J)}markRangeDirty(J,$){J>$&&(W=J,J=$,$=W),Jthis.end&&(this.end=$)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function X(J){return 0<=J&&J<256}G=d([_(0,j.IBufferService)],G)},844:(l,o)=>{function c(d){for(const _ of d)_.dispose();d.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 d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const _=this._disposables.indexOf(d);_!==-1&&this._disposables.splice(_,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var _;this._isDisposed||d===this._value||((_=this._value)==null||_.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},o.toDisposable=function(d){return{dispose:d}},o.disposeArray=c,o.getDisposeArrayDisposable=function(d){return{dispose:()=>c(d)}}},1505:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(_,h,m){this._data[_]||(this._data[_]={}),this._data[_][h]=m}get(_,h){return this._data[_]?this._data[_][h]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(d,_,h,m,g){this._data.get(d,_)||this._data.set(d,_,new c),this._data.get(d,_).set(h,m,g)}get(d,_,h,m){var g;return(g=this._data.get(d,_))==null?void 0:g.get(h,m)}clear(){this._data.clear()}}},6114:(l,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,d=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 _=c.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),o.isIpad=d==="iPad",o.isIphone=d==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),o.isLinux=d.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(c)},6106:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let c=0;o.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(c=this._search(this._getKey(d)),this._array.splice(c,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const _=this._getKey(d);if(_===void 0||(c=this._search(_),c===-1)||this._getKey(this._array[c])!==_)return!1;do if(this._array[c]===d)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===d))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===d))do _(this._array[c]);while(++c=_;){let m=_+h>>1;const g=this._getKey(this._array[m]);if(g>d)h=m-1;else{if(!(g0&&this._getKey(this._array[m-1])===d;)m--;return m}_=m+1}}return _}}},7226:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const d=c(6114);class _{constructor(){this._tasks=[],this._i=0}enqueue(g){this._tasks.push(g),this._start()}flush(){for(;this._ib)return v-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-S))}ms`),void this._start();v=b}this.clear()}}class h extends _{_requestCallback(g){return setTimeout((()=>g(this._createDeadline(16))))}_cancelCallback(g){clearTimeout(g)}_createDeadline(g){const S=Date.now()+g;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}o.PriorityTaskQueue=h,o.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:h,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const d=c(643);o.updateWindowsModeWrappedState=function(_){const h=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),m=h==null?void 0:h.get(_.cols-1),g=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);g&&m&&(g.isWrapped=m[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&m[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(l,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 d}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new c;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}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 d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,m=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=m}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=d},9092:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const d=c(6349),_=c(7226),h=c(3734),m=c(8437),g=c(4634),S=c(511),k=c(643),v=c(4863),b=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(w,x,C){this._hasScrollback=w,this._optionsService=x,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=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=S.CellData.fromCharData([0,k.NULL_CELL_CHAR,k.NULL_CELL_WIDTH,k.NULL_CELL_CODE]),this._whitespaceCell=S.CellData.fromCharData([0,k.WHITESPACE_CELL_CHAR,k.WHITESPACE_CELL_WIDTH,k.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.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 h.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 h.ExtendedAttrs),this._whitespaceCell}getBlankLine(w,x){return new m.BufferLine(this._bufferService.cols,this.getNullCell(w),x)}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:x}fillViewportRows(w){if(this.lines.length===0){w===void 0&&(w=m.DEFAULT_ATTR_DATA);let x=this._rows;for(;x--;)this.lines.push(this.getBlankLine(w))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(w,x){const C=this.getNullCell(m.DEFAULT_ATTR_DATA);let j=0;const N=this._getCorrectBufferLength(x);if(N>this.lines.maxLength&&(this.lines.maxLength=N),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 m.BufferLine(w,C)));else for(let z=this._rows;z>x;z--)this.lines.length>x+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(N0&&(this.lines.trimStart(z),this.ybase=Math.max(this.ybase-z,0),this.ydisp=Math.max(this.ydisp-z,0),this.savedY=Math.max(this.savedY-z,0)),this.lines.maxLength=N}this.x=Math.min(this.x,w-1),this.y=Math.min(this.y,x-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,w-1),this.scrollTop=0}if(this.scrollBottom=x-1,this._isReflowEnabled&&(this._reflow(w,x),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 x=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,x){this._cols!==w&&(w>this._cols?this._reflowLarger(w,x):this._reflowSmaller(w,x))}_reflowLarger(w,x){const C=(0,g.reflowLargerGetLinesToRemove)(this.lines,this._cols,w,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(C.length>0){const j=(0,g.reflowLargerCreateNewLayout)(this.lines,C);(0,g.reflowLargerApplyNewLayout)(this.lines,j.layout),this._reflowLargerAdjustViewport(w,x,j.countRemoved)}}_reflowLargerAdjustViewport(w,x,C){const j=this.getNullCell(m.DEFAULT_ATTR_DATA);let N=C;for(;N-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;T--){let z=this.lines.get(T);if(!z||!z.isWrapped&&z.getTrimmedLength()<=w)continue;const D=[z];for(;z.isWrapped&&T>0;)z=this.lines.get(--T),D.unshift(z);const O=this.ybase+this.y;if(O>=T&&O0&&(j.push({start:T+D.length+N,newLines:Z}),N+=Z.length),D.push(...Z);let G=P.length-1,X=P[G];X===0&&(G--,X=P[G]);let J=D.length-F-1,$=H;for(;J>=0;){const B=Math.min($,X);if(D[G]===void 0)break;if(D[G].copyCellsFrom(D[J],$-B,X-B,B,!0),X-=B,X===0&&(G--,X=P[G]),$-=B,$===0){J--;const Y=Math.max(J,0);$=(0,g.getWrappedLineTrimmedLength)(D,Y,this._cols)}}for(let B=0;B0;)this.ybase===0?this.y0){const T=[],z=[];for(let G=0;G=0;G--)if(P&&P.start>O+F){for(let X=P.newLines.length-1;X>=0;X--)this.lines.set(G--,P.newLines[X]);G++,T.push({index:O+1,amount:P.newLines.length}),F+=P.newLines.length,P=j[++H]}else this.lines.set(G,z[O--]);let W=0;for(let G=T.length-1;G>=0;G--)T[G].index+=W,this.lines.onInsertEmitter.fire(T[G]),W+=T[G].amount;const Z=Math.max(0,D+N-this.lines.maxLength);Z>0&&this.lines.onTrimEmitter.fire(Z)}}translateBufferLineToString(w,x,C=0,j){const N=this.lines.get(w);return N?N.translateToString(x,C,j):""}getWrappedRangeForLine(w){let x=w,C=w;for(;x>0&&this.lines.get(x).isWrapped;)x--;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 x=0;x{x.line-=C,x.line<0&&x.dispose()}))),x.register(this.lines.onInsert((C=>{x.line>=C.index&&(x.line+=C.amount)}))),x.register(this.lines.onDelete((C=>{x.line>=C.index&&x.lineC.index&&(x.line-=C.amount)}))),x.register(x.onDispose((()=>this._removeMarker(x)))),x}_removeMarker(w){this._isClearing||this.markers.splice(this.markers.indexOf(w),1)}}},8437:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const d=c(3734),_=c(511),h=c(643),m=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let g=0;class S{constructor(v,b,w=!1){this.isWrapped=w,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const x=b||_.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.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[h.CHAR_DATA_ATTR_INDEX],b[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[h.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,m.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return g=3*v,b.content=this._data[g+0],b.fg=this._data[g+1],b.bg=this._data[g+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,x){268435456&x.bg&&(this._extendedAttrs[v]=x.extended),this._data[3*v+0]=b|w<<22,this._data[3*v+1]=x.fg,this._data[3*v+2]=x.bg}addCodepointToCell(v,b,w){let x=this._data[3*v+0];2097152&x?this._combined[v]+=(0,m.stringFromCodePoint)(b):2097151&x?(this._combined[v]=(0,m.stringFromCodePoint)(2097151&x)+(0,m.stringFromCodePoint)(b),x&=-2097152,x|=2097152):x=b|4194304,w&&(x&=-12582913,x|=w<<22),this._data[3*v+0]=x}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,x));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*w)this._data=new Uint32Array(this._data.buffer,0,w);else{const x=new Uint32Array(w);x.set(this._data),this._data=x}for(let x=this.length;x=v&&delete this._combined[N]}const C=Object.keys(this._extendedAttrs);for(let j=0;j=v&&delete this._extendedAttrs[N]}}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,x,C){const j=v._data;if(C)for(let T=x-1;T>=0;T--){for(let z=0;z<3;z++)this._data[3*(w+T)+z]=j[3*(b+T)+z];268435456&j[3*(b+T)+2]&&(this._extendedAttrs[w+T]=v._extendedAttrs[b+T])}else for(let T=0;T=b&&(this._combined[z-b+w]=v._combined[z])}}translateToString(v,b,w,x){b=b??0,w=w??this.length,v&&(w=Math.min(w,this.getTrimmedLength())),x&&(x.length=0);let C="";for(;b>22||1}return x&&x.push(b),C}}o.BufferLine=S},4841:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(c,d){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 d*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(l,o)=>{function c(d,_,h){if(_===d.length-1)return d[_].getTrimmedLength();const m=!d[_].hasContent(h-1)&&d[_].getWidth(h-1)===1,g=d[_+1].getWidth(0)===2;return m&&g?h-1:h}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(d,_,h,m,g){const S=[];for(let k=0;k=k&&m0&&(z>x||w[z].getTrimmedLength()===0);z--)T++;T>0&&(S.push(k+w.length-T),S.push(T)),k+=w.length-1}return S},o.reflowLargerCreateNewLayout=function(d,_){const h=[];let m=0,g=_[m],S=0;for(let k=0;kc(d,w,_))).reduce(((b,w)=>b+w));let S=0,k=0,v=0;for(;vb&&(S-=b,k++);const w=d[k].getWidth(S-1)===2;w&&S--;const x=w?h-1:h;m.push(x),v+=x}return m},o.getWrappedLineTrimmedLength=c},5295:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const d=c(8460),_=c(844),h=c(9092);class m extends _.Disposable{constructor(S,k){super(),this._optionsService=S,this._bufferService=k,this._onBufferActivate=this.register(new d.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 h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.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(S){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(S),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(S,k){this._normal.resize(S,k),this._alt.resize(S,k),this.setupTabStops(S)}setupTabStops(S){this._normal.setupTabStops(S),this._alt.setupTabStops(S)}}o.BufferSet=m},511:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const d=c(482),_=c(643),h=c(3734);class m extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(S){const k=new m;return k.setFromCharData(S),k}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(S[_.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(S[_.CHAR_DATA_CHAR_INDEX].length===2){const v=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|S[_.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[_.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=S[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=m},643:(l,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:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const d=c(8460),_=c(844);class h{get id(){return this._id}constructor(g){this.line=g,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,_.disposeArray)(this._disposables),this._disposables.length=0)}register(g){return this._disposables.push(g),g}}o.Marker=h,h._nextId=1},7116:(l,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:(l,o)=>{var c,d,_;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=` -`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(c||(o.C0=c={})),(function(h){h.PAD="€",h.HOP="",h.BPH="‚",h.NBH="ƒ",h.IND="„",h.NEL="…",h.SSA="†",h.ESA="‡",h.HTS="ˆ",h.HTJ="‰",h.VTS="Š",h.PLD="‹",h.PLU="Œ",h.RI="",h.SS2="Ž",h.SS3="",h.DCS="",h.PU1="‘",h.PU2="’",h.STS="“",h.CCH="”",h.MW="•",h.SPA="–",h.EPA="—",h.SOS="˜",h.SGCI="™",h.SCI="š",h.CSI="›",h.ST="œ",h.OSC="",h.PM="ž",h.APC="Ÿ"})(d||(o.C1=d={})),(function(h){h.ST=`${c.ESC}\\`})(_||(o.C1_ESCAPED=_={}))},7399:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const d=c(2584),_={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(h,m,g,S){const k={type:0,cancel:!1,key:void 0},v=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?k.key=m?d.C0.ESC+"OA":d.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?k.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?k.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(k.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:k.key=h.ctrlKey?"\b":d.C0.DEL,h.altKey&&(k.key=d.C0.ESC+k.key);break;case 9:if(h.shiftKey){k.key=d.C0.ESC+"[Z";break}k.key=d.C0.HT,k.cancel=!0;break;case 13:k.key=h.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,k.cancel=!0;break;case 27:k.key=d.C0.ESC,h.altKey&&(k.key=d.C0.ESC+d.C0.ESC),k.cancel=!0;break;case 37:if(h.metaKey)break;v?(k.key=d.C0.ESC+"[1;"+(v+1)+"D",k.key===d.C0.ESC+"[1;3D"&&(k.key=d.C0.ESC+(g?"b":"[1;5D"))):k.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(h.metaKey)break;v?(k.key=d.C0.ESC+"[1;"+(v+1)+"C",k.key===d.C0.ESC+"[1;3C"&&(k.key=d.C0.ESC+(g?"f":"[1;5C"))):k.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(h.metaKey)break;v?(k.key=d.C0.ESC+"[1;"+(v+1)+"A",g||k.key!==d.C0.ESC+"[1;3A"||(k.key=d.C0.ESC+"[1;5A")):k.key=m?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(h.metaKey)break;v?(k.key=d.C0.ESC+"[1;"+(v+1)+"B",g||k.key!==d.C0.ESC+"[1;3B"||(k.key=d.C0.ESC+"[1;5B")):k.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(k.key=d.C0.ESC+"[2~");break;case 46:k.key=v?d.C0.ESC+"[3;"+(v+1)+"~":d.C0.ESC+"[3~";break;case 36:k.key=v?d.C0.ESC+"[1;"+(v+1)+"H":m?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:k.key=v?d.C0.ESC+"[1;"+(v+1)+"F":m?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:h.shiftKey?k.type=2:h.ctrlKey?k.key=d.C0.ESC+"[5;"+(v+1)+"~":k.key=d.C0.ESC+"[5~";break;case 34:h.shiftKey?k.type=3:h.ctrlKey?k.key=d.C0.ESC+"[6;"+(v+1)+"~":k.key=d.C0.ESC+"[6~";break;case 112:k.key=v?d.C0.ESC+"[1;"+(v+1)+"P":d.C0.ESC+"OP";break;case 113:k.key=v?d.C0.ESC+"[1;"+(v+1)+"Q":d.C0.ESC+"OQ";break;case 114:k.key=v?d.C0.ESC+"[1;"+(v+1)+"R":d.C0.ESC+"OR";break;case 115:k.key=v?d.C0.ESC+"[1;"+(v+1)+"S":d.C0.ESC+"OS";break;case 116:k.key=v?d.C0.ESC+"[15;"+(v+1)+"~":d.C0.ESC+"[15~";break;case 117:k.key=v?d.C0.ESC+"[17;"+(v+1)+"~":d.C0.ESC+"[17~";break;case 118:k.key=v?d.C0.ESC+"[18;"+(v+1)+"~":d.C0.ESC+"[18~";break;case 119:k.key=v?d.C0.ESC+"[19;"+(v+1)+"~":d.C0.ESC+"[19~";break;case 120:k.key=v?d.C0.ESC+"[20;"+(v+1)+"~":d.C0.ESC+"[20~";break;case 121:k.key=v?d.C0.ESC+"[21;"+(v+1)+"~":d.C0.ESC+"[21~";break;case 122:k.key=v?d.C0.ESC+"[23;"+(v+1)+"~":d.C0.ESC+"[23~";break;case 123:k.key=v?d.C0.ESC+"[24;"+(v+1)+"~":d.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(g&&!S||!h.altKey||h.metaKey)!g||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?k.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(k.key=d.C0.US),h.key==="@"&&(k.key=d.C0.NUL)):h.keyCode===65&&(k.type=1);else{const b=_[h.keyCode],w=b==null?void 0:b[h.shiftKey?1:0];if(w)k.key=d.C0.ESC+w;else if(h.keyCode>=65&&h.keyCode<=90){const x=h.ctrlKey?h.keyCode-64:h.keyCode+32;let C=String.fromCharCode(x);h.shiftKey&&(C=C.toUpperCase()),k.key=d.C0.ESC+C}else if(h.keyCode===32)k.key=d.C0.ESC+(h.ctrlKey?d.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let x=h.code.slice(3,4);h.shiftKey||(x=x.toLowerCase()),k.key=d.C0.ESC+x,k.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?k.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?k.key=d.C0.NUL:h.keyCode>=51&&h.keyCode<=55?k.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?k.key=d.C0.DEL:h.keyCode===219?k.key=d.C0.ESC:h.keyCode===220?k.key=d.C0.FS:h.keyCode===221&&(k.key=d.C0.GS)}return k}},482:(l,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,d=0,_=c.length){let h="";for(let m=d;m<_;++m){let g=c[m];g>65535?(g-=65536,h+=String.fromCharCode(55296+(g>>10))+String.fromCharCode(g%1024+56320)):h+=String.fromCharCode(g)}return h},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,d){const _=c.length;if(!_)return 0;let h=0,m=0;if(this._interim){const g=c.charCodeAt(m++);56320<=g&&g<=57343?d[h++]=1024*(this._interim-55296)+g-56320+65536:(d[h++]=this._interim,d[h++]=g),this._interim=0}for(let g=m;g<_;++g){const S=c.charCodeAt(g);if(55296<=S&&S<=56319){if(++g>=_)return this._interim=S,h;const k=c.charCodeAt(g);56320<=k&&k<=57343?d[h++]=1024*(S-55296)+k-56320+65536:(d[h++]=S,d[h++]=k)}else S!==65279&&(d[h++]=S)}return h}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,d){const _=c.length;if(!_)return 0;let h,m,g,S,k=0,v=0,b=0;if(this.interim[0]){let C=!1,j=this.interim[0];j&=(224&j)==192?31:(240&j)==224?15:7;let N,T=0;for(;(N=63&this.interim[++T])&&T<4;)j<<=6,j|=N;const z=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=z-T;for(;b=_)return 0;if(N=c[b++],(192&N)!=128){b--,C=!0;break}this.interim[T++]=N,j<<=6,j|=63&N}C||(z===2?j<128?b--:d[k++]=j:z===3?j<2048||j>=55296&&j<=57343||j===65279||(d[k++]=j):j<65536||j>1114111||(d[k++]=j)),this.interim.fill(0)}const w=_-4;let x=b;for(;x<_;){for(;!(!(x=_)return this.interim[0]=h,k;if(m=c[x++],(192&m)!=128){x--;continue}if(v=(31&h)<<6|63&m,v<128){x--;continue}d[k++]=v}else if((240&h)==224){if(x>=_)return this.interim[0]=h,k;if(m=c[x++],(192&m)!=128){x--;continue}if(x>=_)return this.interim[0]=h,this.interim[1]=m,k;if(g=c[x++],(192&g)!=128){x--;continue}if(v=(15&h)<<12|(63&m)<<6|63&g,v<2048||v>=55296&&v<=57343||v===65279)continue;d[k++]=v}else if((248&h)==240){if(x>=_)return this.interim[0]=h,k;if(m=c[x++],(192&m)!=128){x--;continue}if(x>=_)return this.interim[0]=h,this.interim[1]=m,k;if(g=c[x++],(192&g)!=128){x--;continue}if(x>=_)return this.interim[0]=h,this.interim[1]=m,this.interim[2]=g,k;if(S=c[x++],(192&S)!=128){x--;continue}if(v=(7&h)<<18|(63&m)<<12|(63&g)<<6|63&S,v<65536||v>1114111)continue;d[k++]=v}}return k}}},225:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const d=c(1480),_=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[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 m;o.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let g=0;g<_.length;++g)m.fill(0,_[g][0],_[g][1]+1)}}wcwidth(g){return g<32?0:g<127?1:g<65536?m[g]:(function(S,k){let v,b=0,w=k.length-1;if(Sk[w][1])return!1;for(;w>=b;)if(v=b+w>>1,S>k[v][1])b=v+1;else{if(!(S=131072&&g<=196605||g>=196608&&g<=262141?2:1}charProperties(g,S){let k=this.wcwidth(g),v=k===0&&S!==0;if(v){const b=d.UnicodeService.extractWidth(S);b===0?v=!1:b>k&&(k=b)}return d.UnicodeService.createPropertyValue(0,k,v)}}},5981:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const d=c(8460),_=c(844);class h extends _.Disposable{constructor(g){super(),this._action=g,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(g,S){if(S!==void 0&&this._syncCalls>S)return void(this._syncCalls=0);if(this._pendingData+=g.length,this._writeBuffer.push(g),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(g,S){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+=g.length,this._writeBuffer.push(g),this._callbacks.push(S),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(S)}_innerWrite(g=0,S=!0){const k=g||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],b=this._action(v,S);if(b){const x=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(x)}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=h},5941:(l,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})$/,d=/^[\da-f]+$/;function _(h,m){const g=h.toString(16),S=g.length<2?"0"+g:g;switch(m){case 4:return g[0];case 8:return S;case 12:return(S+S).slice(0,3);default:return S+S}}o.parseColor=function(h){if(!h)return;let m=h.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const g=c.exec(m);if(g){const S=g[1]?15:g[4]?255:g[7]?4095:65535;return[Math.round(parseInt(g[1]||g[4]||g[7]||g[10],16)/S*255),Math.round(parseInt(g[2]||g[5]||g[8]||g[11],16)/S*255),Math.round(parseInt(g[3]||g[6]||g[9]||g[12],16)/S*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),d.exec(m)&&[3,6,9,12].includes(m.length))){const g=m.length/3,S=[0,0,0];for(let k=0;k<3;++k){const v=parseInt(m.slice(g*k,g*k+g),16);S[k]=g===1?v<<4:g===2?v:g===3?v>>4:v>>8}return S}},o.toRgbString=function(h,m=16){const[g,S,k]=h;return`rgb:${_(g,m)}/${_(S,m)}/${_(k,m)}`}},5770:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const d=c(482),_=c(8742),h=c(5770),m=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(S,k){this._handlers[S]===void 0&&(this._handlers[S]=[]);const v=this._handlers[S];return v.push(k),{dispose:()=>{const b=v.indexOf(k);b!==-1&&v.splice(b,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}reset(){if(this._active.length)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(S,k){if(this.reset(),this._ident=S,this._active=this._handlers[S]||m,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(S,k,v){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(S,k,v);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(S,k,v))}unhook(S,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(S),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",S);this._active=m,this._ident=0}};const g=new _.Params;g.addParam(0),o.DcsHandler=class{constructor(S){this._handler=S,this._data="",this._params=g,this._hitLimit=!1}hook(S){this._params=S.length>1||S.params[0]?S.clone():g,this._data="",this._hitLimit=!1}put(S,k,v){this._hitLimit||(this._data+=(0,d.utf32ToString)(S,k,v),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(S){let k=!1;if(this._hitLimit)k=!1;else if(S&&(k=this._handler(this._data,this._params),k instanceof Promise))return k.then((v=>(this._params=g,this._data="",this._hitLimit=!1,v)));return this._params=g,this._data="",this._hitLimit=!1,k}}},2015:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const d=c(844),_=c(8742),h=c(6242),m=c(6351);class g{constructor(b){this.table=new Uint8Array(b)}setDefault(b,w){this.table.fill(b<<4|w)}add(b,w,x,C){this.table[w<<8|b]=x<<4|C}addMany(b,w,x,C){for(let j=0;jz)),w=(T,z)=>b.slice(T,z),x=w(32,127),C=w(0,24);C.push(25),C.push.apply(C,w(28,32));const j=w(0,14);let N;for(N in v.setDefault(1,0),v.addMany(x,0,2,0),j)v.addMany([24,26,153,154],N,3,0),v.addMany(w(128,144),N,3,0),v.addMany(w(144,152),N,3,0),v.add(156,N,0,0),v.add(27,N,11,1),v.add(157,N,4,8),v.addMany([152,158,159],N,0,7),v.add(155,N,11,3),v.add(144,N,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(x,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(x,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(x,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(S,0,2,0),v.add(S,8,5,8),v.add(S,6,0,6),v.add(S,11,0,11),v.add(S,13,13,13),v})();class k extends d.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 _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(w,x,C)=>{},this._executeHandlerFb=w=>{},this._csiHandlerFb=(w,x)=>{},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,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,w=[64,126]){let x=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(x=b.prefix.charCodeAt(0),x&&60>x||x>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 j=0;jN||N>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");x<<=8,x|=N}}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 x<<=8,x|=C,x}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 x=this._identifier(b,[48,126]);this._escHandlers[x]===void 0&&(this._escHandlers[x]=[]);const C=this._escHandlers[x];return C.push(w),{dispose:()=>{const j=C.indexOf(w);j!==-1&&C.splice(j,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 x=this._identifier(b);this._csiHandlers[x]===void 0&&(this._csiHandlers[x]=[]);const C=this._csiHandlers[x];return C.push(w),{dispose:()=>{const j=C.indexOf(w);j!==-1&&C.splice(j,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,x,C,j){this._parseStack.state=b,this._parseStack.handlers=w,this._parseStack.handlerPos=x,this._parseStack.transition=C,this._parseStack.chunkPos=j}parse(b,w,x){let C,j=0,N=0,T=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,T=this._parseStack.chunkPos+1;else{if(x===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const z=this._parseStack.handlers;let D=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(x===!1&&D>-1){for(;D>=0&&(C=z[D](this._params),C!==!0);D--)if(C instanceof Promise)return this._parseStack.handlerPos=D,C}this._parseStack.handlers=[];break;case 4:if(x===!1&&D>-1){for(;D>=0&&(C=z[D](),C!==!0);D--)if(C instanceof Promise)return this._parseStack.handlerPos=D,C}this._parseStack.handlers=[];break;case 6:if(j=b[this._parseStack.chunkPos],C=this._dcsParser.unhook(j!==24&&j!==26,x),C)return C;j===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(j=b[this._parseStack.chunkPos],C=this._oscParser.end(j!==24&&j!==26,x),C)return C;j===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 z=T;z>4){case 2:for(let F=z+1;;++F){if(F>=w||(j=b[F])<32||j>126&&j=w||(j=b[F])<32||j>126&&j=w||(j=b[F])<32||j>126&&j=w||(j=b[F])<32||j>126&&j=0&&(C=D[O](this._params),C!==!0);O--)if(C instanceof Promise)return this._preserveStack(3,D,O,N,z),C;O<0&&this._csiHandlerFb(this._collect<<8|j,this._params),this.precedingJoinState=0;break;case 8:do switch(j){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(j-48)}while(++z47&&j<60);z--;break;case 9:this._collect<<=8,this._collect|=j;break;case 10:const H=this._escHandlers[this._collect<<8|j];let P=H?H.length-1:-1;for(;P>=0&&(C=H[P](),C!==!0);P--)if(C instanceof Promise)return this._preserveStack(4,H,P,N,z),C;P<0&&this._escHandlerFb(this._collect<<8|j),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|j,this._params);break;case 13:for(let F=z+1;;++F)if(F>=w||(j=b[F])===24||j===26||j===27||j>127&&j=w||(j=b[F])<32||j>127&&j{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const d=c(5770),_=c(482),h=[];o.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(m,g){this._handlers[m]===void 0&&(this._handlers[m]=[]);const S=this._handlers[m];return S.push(g),{dispose:()=>{const k=S.indexOf(g);k!==-1&&S.splice(k,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,g,S){if(this._active.length)for(let k=this._active.length-1;k>=0;k--)this._active[k].put(m,g,S);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(m,g,S))}start(){this.reset(),this._state=1}put(m,g,S){if(this._state!==3){if(this._state===1)for(;g0&&this._put(m,g,S)}}end(m,g=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let S=!1,k=this._active.length-1,v=!1;if(this._stack.paused&&(k=this._stack.loopPosition-1,S=g,v=this._stack.fallThrough,this._stack.paused=!1),!v&&S===!1){for(;k>=0&&(S=this._active[k].end(m),S!==!0);k--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!1,S;k--}for(;k>=0;k--)if(S=this._active[k].end(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",m);this._active=h,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,g,S){this._hitLimit||(this._data+=(0,_.utf32ToString)(m,g,S),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let g=!1;if(this._hitLimit)g=!1;else if(m&&(g=this._handler(this._data),g instanceof Promise))return g.then((S=>(this._data="",this._hitLimit=!1,S)));return this._data="",this._hitLimit=!1,g}}},8742:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const c=2147483647;class d{static fromArray(h){const m=new d;if(!h.length)return m;for(let g=Array.isArray(h[0])?1:0;g256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new d(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let m=0;m>8,S=255&this._subParamsIdx[m];S-g>0&&h.push(Array.prototype.slice.call(this._subParams,g,S))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>c?c:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>c?c:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const m=this._subParamsIdx[h]>>8,g=255&this._subParamsIdx[h];return g-m>0?this._subParams.subarray(m,g):null}getSubParamsAll(){const h={};for(let m=0;m>8,S=255&this._subParamsIdx[m];S-g>0&&(h[m]=this._subParams.slice(g,S))}return h}addDigit(h){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const g=this._digitIsSub?this._subParams:this.params,S=g[m-1];g[m-1]=~S?Math.min(10*S+h,c):h}}o.Params=d},5741:(l,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,d){const _={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(_),d.dispose=()=>this._wrappedAddonDispose(_),d.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let d=-1;for(let _=0;_{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const d=c(3785),_=c(511);o.BufferApiView=class{constructor(h,m){this._buffer=h,this.type=m}init(h){return this._buffer=h,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(h){const m=this._buffer.lines.get(h);if(m)return new d.BufferLineApiView(m)}getNullCell(){return new _.CellData}}},3785:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const d=c(511);o.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,h){if(!(_<0||_>=this._line.length))return h?(this._line.loadCell(_,h),h):this._line.loadCell(_,new d.CellData)}translateToString(_,h,m){return this._line.translateToString(_,h,m)}}},8285:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const d=c(8771),_=c(8460),h=c(844);class m extends h.Disposable{constructor(S){super(),this._core=S,this._onBufferChange=this.register(new _.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.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=m},7975:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,d){return this._core.registerCsiHandler(c,(_=>d(_.toArray())))}addCsiHandler(c,d){return this.registerCsiHandler(c,d)}registerDcsHandler(c,d){return this._core.registerDcsHandler(c,((_,h)=>d(_,h.toArray())))}addDcsHandler(c,d){return this.registerDcsHandler(c,d)}registerEscHandler(c,d){return this._core.registerEscHandler(c,d)}addEscHandler(c,d){return this.registerEscHandler(c,d)}registerOscHandler(c,d){return this._core.registerOscHandler(c,d)}addOscHandler(c,d){return this.registerOscHandler(c,d)}}},7090:(l,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(l,o,c){var d=this&&this.__decorate||function(v,b,w,x){var C,j=arguments.length,N=j<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,w):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(v,b,w,x);else for(var T=v.length-1;T>=0;T--)(C=v[T])&&(N=(j<3?C(N):j>3?C(b,w,N):C(b,w))||N);return j>3&&N&&Object.defineProperty(b,w,N),N},_=this&&this.__param||function(v,b){return function(w,x){b(w,x,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const h=c(8460),m=c(844),g=c(5295),S=c(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let k=o.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.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 g.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 x;x=this._cachedBlankLine,x&&x.length===this.cols&&x.getFg(0)===v.fg&&x.getBg(0)===v.bg||(x=w.getBlankLine(v,b),this._cachedBlankLine=x),x.isWrapped=b;const C=w.ybase+w.scrollTop,j=w.ybase+w.scrollBottom;if(w.scrollTop===0){const N=w.lines.isFull;j===w.lines.length-1?N?w.lines.recycle().copyFrom(x):w.lines.push(x.clone()):w.lines.splice(j+1,0,x.clone()),N?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{const N=j-C+1;w.lines.shiftElements(C+1,N-1,-1),w.lines.set(j,x.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)}scrollLines(v,b,w){const x=this.buffer;if(v<0){if(x.ydisp===0)return;this.isUserScrolling=!0}else v+x.ydisp>=x.ybase&&(this.isUserScrolling=!1);const C=x.ydisp;x.ydisp=Math.max(Math.min(x.ydisp+v,x.ybase),0),C!==x.ydisp&&(b||this._onScroll.fire(x.ydisp))}};o.BufferService=k=d([_(0,S.IOptionsService)],k)},7994:(l,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,d){this._charsets[c]=d,this.glevel===c&&(this.charset=d)}}},1753:function(l,o,c){var d=this&&this.__decorate||function(x,C,j,N){var T,z=arguments.length,D=z<3?C:N===null?N=Object.getOwnPropertyDescriptor(C,j):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(x,C,j,N);else for(var O=x.length-1;O>=0;O--)(T=x[O])&&(D=(z<3?T(D):z>3?T(C,j,D):T(C,j))||D);return z>3&&D&&Object.defineProperty(C,j,D),D},_=this&&this.__param||function(x,C){return function(j,N){C(j,N,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const h=c(2585),m=c(8460),g=c(844),S={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:x=>x.button!==4&&x.action===1&&(x.ctrl=!1,x.alt=!1,x.shift=!1,!0)},VT200:{events:19,restrict:x=>x.action!==32},DRAG:{events:23,restrict:x=>x.action!==32||x.button!==3},ANY:{events:31,restrict:x=>!0}};function k(x,C){let j=(x.ctrl?16:0)|(x.shift?4:0)|(x.alt?8:0);return x.button===4?(j|=64,j|=x.action):(j|=3&x.button,4&x.button&&(j|=64),8&x.button&&(j|=128),x.action===32?j|=32:x.action!==0||C||(j|=3)),j}const v=String.fromCharCode,b={DEFAULT:x=>{const C=[k(x,!1)+32,x.col+32,x.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${v(C[0])}${v(C[1])}${v(C[2])}`},SGR:x=>{const C=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${k(x,!0)};${x.col};${x.row}${C}`},SGR_PIXELS:x=>{const C=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${k(x,!0)};${x.x};${x.y}${C}`}};let w=o.CoreMouseService=class extends g.Disposable{constructor(x,C){super(),this._bufferService=x,this._coreService=C,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const j of Object.keys(S))this.addProtocol(j,S[j]);for(const j of Object.keys(b))this.addEncoding(j,b[j]);this.reset()}addProtocol(x,C){this._protocols[x]=C}addEncoding(x,C){this._encodings[x]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(x){if(!this._protocols[x])throw new Error(`unknown protocol "${x}"`);this._activeProtocol=x,this._onProtocolChange.fire(this._protocols[x].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(x){if(!this._encodings[x])throw new Error(`unknown encoding "${x}"`);this._activeEncoding=x}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(x){if(x.col<0||x.col>=this._bufferService.cols||x.row<0||x.row>=this._bufferService.rows||x.button===4&&x.action===32||x.button===3&&x.action!==32||x.button!==4&&(x.action===2||x.action===3)||(x.col++,x.row++,x.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,x,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(x))return!1;const C=this._encodings[this._activeEncoding](x);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=x,!0}explainEvents(x){return{down:!!(1&x),up:!!(2&x),drag:!!(4&x),move:!!(8&x),wheel:!!(16&x)}}_equalEvents(x,C,j){if(j){if(x.x!==C.x||x.y!==C.y)return!1}else if(x.col!==C.col||x.row!==C.row)return!1;return x.button===C.button&&x.action===C.action&&x.ctrl===C.ctrl&&x.alt===C.alt&&x.shift===C.shift}};o.CoreMouseService=w=d([_(0,h.IBufferService),_(1,h.ICoreService)],w)},6975:function(l,o,c){var d=this&&this.__decorate||function(w,x,C,j){var N,T=arguments.length,z=T<3?x:j===null?j=Object.getOwnPropertyDescriptor(x,C):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(w,x,C,j);else for(var D=w.length-1;D>=0;D--)(N=w[D])&&(z=(T<3?N(z):T>3?N(x,C,z):N(x,C))||z);return T>3&&z&&Object.defineProperty(x,C,z),z},_=this&&this.__param||function(w,x){return function(C,j){x(C,j,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const h=c(1439),m=c(8460),g=c(844),S=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 g.Disposable{constructor(w,x,C){super(),this._bufferService=w,this._logService=x,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(k),this.decPrivateModes=(0,h.clone)(v)}reset(){this.modes=(0,h.clone)(k),this.decPrivateModes=(0,h.clone)(v)}triggerDataEvent(w,x=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;x&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),x&&this._onUserInput.fire(),this._logService.debug(`sending data "${w}"`,(()=>w.split("").map((j=>j.charCodeAt(0))))),this._onData.fire(w)}triggerBinaryEvent(w){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${w}"`,(()=>w.split("").map((x=>x.charCodeAt(0))))),this._onBinary.fire(w))}};o.CoreService=b=d([_(0,S.IBufferService),_(1,S.ILogService),_(2,S.IOptionsService)],b)},9074:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const d=c(8055),_=c(8460),h=c(844),m=c(6106);let g=0,S=0;class k extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList((w=>w==null?void 0:w.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(w){if(w.marker.isDisposed)return;const x=new v(w);if(x){const C=x.marker.onDispose((()=>x.dispose()));x.onDispose((()=>{x&&(this._decorations.delete(x)&&this._onDecorationRemoved.fire(x),C.dispose())})),this._decorations.insert(x),this._onDecorationRegistered.fire(x)}return x}reset(){for(const w of this._decorations.values())w.dispose();this._decorations.clear()}*getDecorationsAtCell(w,x,C){let j=0,N=0;for(const T of this._decorations.getKeyIterator(x))j=T.options.x??0,N=j+(T.options.width??1),w>=j&&w{g=N.options.x??0,S=g+(N.options.width??1),w>=g&&w{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const d=c(2585),_=c(8343);class h{constructor(...g){this._entries=new Map;for(const[S,k]of g)this.set(S,k)}set(g,S){const k=this._entries.get(g);return this._entries.set(g,S),k}forEach(g){for(const[S,k]of this._entries.entries())g(S,k)}has(g){return this._entries.has(g)}get(g){return this._entries.get(g)}}o.ServiceCollection=h,o.InstantiationService=class{constructor(){this._services=new h,this._services.set(d.IInstantiationService,this)}setService(m,g){this._services.set(m,g)}getService(m){return this._services.get(m)}createInstance(m,...g){const S=(0,_.getServiceDependencies)(m).sort(((b,w)=>b.index-w.index)),k=[];for(const b of S){const w=this._services.get(b.id);if(!w)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${b.id}.`);k.push(w)}const v=S.length>0?S[0].index:g.length;if(g.length!==v)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${v+1} conflicts with ${g.length} static arguments`);return new m(...g,...k)}}},7866:function(l,o,c){var d=this&&this.__decorate||function(v,b,w,x){var C,j=arguments.length,N=j<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,w):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(v,b,w,x);else for(var T=v.length-1;T>=0;T--)(C=v[T])&&(N=(j<3?C(N):j>3?C(b,w,N):C(b,w))||N);return j>3&&N&&Object.defineProperty(b,w,N),N},_=this&&this.__param||function(v,b){return function(w,x){b(w,x,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const h=c(844),m=c(2585),g={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let S,k=o.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),S=this}_updateLogLevel(){this._logLevel=g[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let b=0;bJSON.stringify(N))).join(", ")})`);const j=x.apply(this,C);return S.trace(`GlyphRenderer#${x.name} return`,j),j}}},7302:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const d=c(8460),_=c(844),h=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:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const m=["normal","bold","100","200","300","400","500","600","700","800","900"];class g extends _.Disposable{constructor(k){super(),this._onOptionChange=this.register(new d.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,_.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=m.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=g},2660:function(l,o,c){var d=this&&this.__decorate||function(g,S,k,v){var b,w=arguments.length,x=w<3?S:v===null?v=Object.getOwnPropertyDescriptor(S,k):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(g,S,k,v);else for(var C=g.length-1;C>=0;C--)(b=g[C])&&(x=(w<3?b(x):w>3?b(S,k,x):b(S,k))||x);return w>3&&x&&Object.defineProperty(S,k,x),x},_=this&&this.__param||function(g,S){return function(k,v){S(k,v,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const h=c(2585);let m=o.OscLinkService=class{constructor(g){this._bufferService=g,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(g){const S=this._bufferService.buffer;if(g.id===void 0){const C=S.addMarker(S.ybase+S.y),j={data:g,id:this._nextId++,lines:[C]};return C.onDispose((()=>this._removeMarkerFromLink(j,C))),this._dataByLinkId.set(j.id,j),j.id}const k=g,v=this._getEntryIdKey(k),b=this._entriesWithId.get(v);if(b)return this.addLineToLink(b.id,S.ybase+S.y),b.id;const w=S.addMarker(S.ybase+S.y),x={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[w]};return w.onDispose((()=>this._removeMarkerFromLink(x,w))),this._entriesWithId.set(x.key,x),this._dataByLinkId.set(x.id,x),x.id}addLineToLink(g,S){const k=this._dataByLinkId.get(g);if(k&&k.lines.every((v=>v.line!==S))){const v=this._bufferService.buffer.addMarker(S);k.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(k,v)))}}getLinkData(g){var S;return(S=this._dataByLinkId.get(g))==null?void 0:S.data}_getEntryIdKey(g){return`${g.id};;${g.uri}`}_removeMarkerFromLink(g,S){const k=g.lines.indexOf(S);k!==-1&&(g.lines.splice(k,1),g.lines.length===0&&(g.data.id!==void 0&&this._entriesWithId.delete(g.key),this._dataByLinkId.delete(g.id)))}};o.OscLinkService=m=d([_(0,h.IBufferService)],m)},8343:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const c="di$target",d="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(_){return _[d]||[]},o.createDecorator=function(_){if(o.serviceRegistry.has(_))return o.serviceRegistry.get(_);const h=function(m,g,S){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[d].push({id:k,index:b}):(v[d]=[{id:k,index:b}],v[c]=v)})(h,m,S)};return h.toString=()=>_,o.serviceRegistry.set(_,h),h}},2585:(l,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 d=c(8343);var _;o.IBufferService=(0,d.createDecorator)("BufferService"),o.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),o.ICoreService=(0,d.createDecorator)("CoreService"),o.ICharsetService=(0,d.createDecorator)("CharsetService"),o.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(_||(o.LogLevelEnum=_={})),o.ILogService=(0,d.createDecorator)("LogService"),o.IOptionsService=(0,d.createDecorator)("OptionsService"),o.IOscLinkService=(0,d.createDecorator)("OscLinkService"),o.IUnicodeService=(0,d.createDecorator)("UnicodeService"),o.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const d=c(8460),_=c(225);class h{static extractShouldJoin(g){return(1&g)!=0}static extractWidth(g){return g>>1&3}static extractCharKind(g){return g>>3}static createPropertyValue(g,S,k=!1){return(16777215&g)<<3|(3&S)<<1|(k?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const g=new _.UnicodeV6;this.register(g),this._active=g.version,this._activeProvider=g}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(g){if(!this._providers[g])throw new Error(`unknown Unicode version "${g}"`);this._active=g,this._activeProvider=this._providers[g],this._onChange.fire(g)}register(g){this._providers[g.version]=g}wcwidth(g){return this._activeProvider.wcwidth(g)}getStringCellWidth(g){let S=0,k=0;const v=g.length;for(let b=0;b=v)return S+this.wcwidth(w);const j=g.charCodeAt(b);56320<=j&&j<=57343?w=1024*(w-55296)+j-56320+65536:S+=this.wcwidth(j)}const x=this.charProperties(w,k);let C=h.extractWidth(x);h.extractShouldJoin(x)&&(C-=h.extractWidth(k)),S+=C,k=x}return S}charProperties(g,S){return this._activeProvider.charProperties(g,S)}}o.UnicodeService=h}},r={};function s(l){var o=r[l];if(o!==void 0)return o.exports;var c=r[l]={exports:{}};return t[l].call(c.exports,c,c.exports,s),c.exports}var a={};return(()=>{var l=a;Object.defineProperty(l,"__esModule",{value:!0}),l.Terminal=void 0;const o=s(9042),c=s(3236),d=s(844),_=s(5741),h=s(8285),m=s(7975),g=s(7090),S=["cols","rows"];class k extends d.Disposable{constructor(b){super(),this._core=this.register(new c.Terminal(b)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const w=C=>this._core.options[C],x=(C,j)=>{this._checkReadonlyOptions(C),this._core.options[C]=j};for(const C in this._core.options){const j={get:w.bind(this,C),set:x.bind(this,C)};Object.defineProperty(this._publicOptions,C,j)}}_checkReadonlyOptions(b){if(S.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 m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new g.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 h.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,x){this._verifyIntegers(b,w,x),this._core.select(b,w,x)}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")}}l.Terminal=k})(),a})()))})(Zb)),Zb.exports}var hht=fht();function f4(e,n,t=!1){const r=getComputedStyle(document.documentElement),s=new hht.Terminal({convertEol:!0,disableStdin:n,fontSize:12,fontFamily:r.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:{background:r.getPropertyValue("--term-bg").trim(),foreground:r.getPropertyValue("--term-foreground").trim(),cursor:n?r.getPropertyValue("--term-bg").trim():r.getPropertyValue("--term-foreground").trim(),selectionBackground:r.getPropertyValue("--term-selection").trim()}}),a=new cht.FitAddon;s.loadAddon(a),t&&s.loadAddon(new dht.WebLinksAddon((c,d)=>{let _;try{_=new URL(d)}catch{return}(_.protocol==="http:"||_.protocol==="https:")&&window.open(_,"_blank","noopener,noreferrer")})),s.open(e);const l=()=>{try{a.fit()}catch{}};l();const o=new ResizeObserver(l);return o.observe(e),{terminal:s,dispose(){o.disconnect(),s.dispose()}}}const hT="h-40 overflow-hidden rounded-md bg-terminal p-2";function Sm(e){return typeof e=="object"&&e!==null}function _T(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function _ht(e){return Sm(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||_T(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function pht(e){return Sm(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&_T(e.partitions)&&(e.error===null||typeof e.error=="string")}function mht(e){return!Sm(e)||e.type!=="complete"?null:e.backend==="ssh"&&_ht(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&pht(e.result)?{backend:"slurm",result:e.result}:null}function ght(e){return Sm(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function h4({host:e,backend:n,path:t="/api/settings/ssh/connect",active:r=!0,onComplete:s,onError:a}){const l=M.useRef(null),o=M.useRef(null),c=M.useRef(s),d=M.useRef(a),[_,h]=M.useState(null);return c.current=s,d.current=a,M.useEffect(()=>{const m=l.current;if(!m)return;const{terminal:g,dispose:S}=f4(m,!1,!0);o.current=g,g.focus();const k=location.protocol==="https:"?"wss:":"ws:",v=new URL(t,`${k}//${location.host}`);v.searchParams.set("host",e),v.searchParams.set("backend",n);const b=new WebSocket(v);b.binaryType="arraybuffer";let w=!1,x=!1,C=!1;const j=z=>{var D;x||(x=!0,C||g.writeln(z),g.options.disableStdin=!0,g.blur(),h(z),(D=d.current)==null||D.call(d,z))},N=g.onData(z=>{b.readyState===WebSocket.OPEN&&b.send(new TextEncoder().encode(z))}),T=g.onResize(({cols:z,rows:D})=>{b.readyState===WebSocket.OPEN&&b.send(JSON.stringify({type:"resize",cols:z,rows:D}))});return b.onopen=()=>{b.send(JSON.stringify({type:"resize",cols:g.cols,rows:g.rows}))},b.onmessage=z=>{if(z.data instanceof ArrayBuffer){C=!0,g.write(new Uint8Array(z.data));return}if(typeof z.data!="string")return;let D;try{D=JSON.parse(z.data)}catch{return}const O=mht(D);if(O){w=!0,c.current(O),b.close();return}const H=ght(D);H&&j(H)},b.onerror=()=>j(eS()),b.onclose=()=>{!w&&!x&&j(eS())},()=>{b.onopen=null,b.onmessage=null,b.onerror=null,b.onclose=null,N.dispose(),T.dispose(),b.close(),o.current=null,S()}},[n,e,t]),M.useEffect(()=>{const m=o.current;m&&(m.options.disableStdin=!r||_!==null,r&&_===null?m.focus():m.blur())},[r,_]),f.jsxs("div",{className:"mt-3",children:[f.jsx("div",{className:hT,role:"group","aria-label":dN({host:we(e)}),children:f.jsx("div",{ref:l,className:"h-full overflow-hidden"})}),_?f.jsx("p",{role:"alert",className:"sr-only",children:_}):null]})}function bht({host:e,transcript:n}){const t=M.useRef(null);return M.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:a}=f4(r,!0,!0);return s.write(n),a},[n]),f.jsx("div",{className:`mt-3 ${hT}`,role:"group","aria-label":dN({host:we(e)}),children:f.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}const Cp="font-mono text-sm leading-[1.55] [tab-size:4]",pT="whitespace-pre-wrap break-words",mT="file-view-gutter text-right text-muted select-none";function gT(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}function bT({value:e,onChange:n,onSave:t,onBlur:r,path:s,highlightLine:a,scrollRequest:l,onScrollRequestHandled:o}){const c=M.useMemo(()=>nT(e,Ly(s)),[e,s]),{ruleCh:d,codeCh:_}=gT(c.length),h=M.useRef(null),m=M.useRef(null),g=()=>{const v=h.current;v&&m.current&&(m.current.scrollTop=v.scrollTop)};M.useLayoutEffect(g,[e]),M.useLayoutEffect(()=>{var j;const v=h.current;if(!v||!a)return;const b=e.split(` -`),w=Math.min(Math.max(Math.trunc(a),1),b.length);let x=0;for(let N=0;N{if((v.metaKey||v.ctrlKey)&&v.key.toLowerCase()==="s"){v.preventDefault(),t();return}if(v.key==="Tab"){v.preventDefault();const b=v.currentTarget,{selectionStart:w,selectionEnd:x}=b,C=e.slice(0,w)+" "+e.slice(x);n(C),requestAnimationFrame(()=>{b.selectionStart=b.selectionEnd=w+1})}},k=`absolute inset-0 m-0 py-3.5 pe-4 ${Cp} ${pT} [scrollbar-gutter:stable]`;return f.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Cp}`,children:[f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${d}ch`},"aria-hidden":"true"}),f.jsx("div",{ref:m,className:`file-view-code ${k} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:c.map((v,b)=>f.jsxs("div",{"data-line":b+1,className:"relative",style:{paddingInlineStart:`${_}ch`},children:[f.jsx("span",{className:`${mT} absolute start-0 pe-[1ch]`,style:{width:`${d}ch`},children:b+1}),rT(v)?f.jsx("br",{}):v]},b))}),f.jsx("textarea",{ref:h,className:`file-view-editarea ${k} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${_}ch`},value:e,onChange:v=>n(v.target.value),onScroll:g,onKeyDown:S,onBlur:r,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}const vht='button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function _4(e,n,t="[data-initial-focus]"){const r=M.useRef(n);r.current=n,M.useEffect(()=>{const s=e.current;if(!s)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,l=()=>[...s.querySelectorAll(vht)];(s.querySelector(t)??l()[0]??s).focus();const o=c=>{if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),r.current();return}if(c.key!=="Tab")return;const d=l(),_=d[0],h=d.at(-1);!_||!h?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===_?(c.preventDefault(),h.focus()):!c.shiftKey&&document.activeElement===h&&(c.preventDefault(),_.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),a==null||a.focus()}},[e,t])}function vT({onClose:e,onSaved:n}){const[t,r]=M.useState(null),[s,a]=M.useState(""),[l,o]=M.useState(null),[c,d]=M.useState(!1),_=M.useRef(null),h=M.useRef(e),m=t!==null&&s!==t.content,g=M.useRef(m),S=M.useRef(c);g.current=m,S.current=c,h.current=e,M.useEffect(()=>{uJe().then(b=>{r(b),a(b.content)}).catch(b=>o(b instanceof Error?b.message:String(b)))},[]);const k=()=>{S.current||g.current&&!window.confirm(Vqe())||h.current()};_4(_,k,"textarea");async function v(){if(!(!t||!m||c)){d(!0);try{await dJe(s,t.content),r({...t,content:s}),n==null||n(),Ms(eGe(),"success")}catch(b){Ms(b instanceof Error?b.message:String(b),"error")}finally{d(!1)}}}return Bc.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:b=>{b.target===b.currentTarget&&k()},children:f.jsxs("div",{ref:_,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:sGe()}),f.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),f.jsx(Gt,{className:"absolute end-3.5 top-3.5","aria-label":Fqe(),onClick:k,disabled:c,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:l?f.jsx("p",{className:"m-5 text-sm text-accent-red",children:l}):t===null?f.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[f.jsx(Mt,{})," ",Xqe()]}):f.jsx(bT,{value:s,onChange:a,onSave:()=>void v(),path:t.path})}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[f.jsx(Ue,{onClick:k,disabled:c,children:Eh()}),f.jsx(Ue,{variant:"primary",onClick:()=>void v(),disabled:!m||c,children:c?aa():Rl()})]})]})}),document.body)}const Ia=["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(" "),id=["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(" "),Uc=["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(" "),p4="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",ms=["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(" "),$h=["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(" "),yo=["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(" "),O2=["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(" "),ku=["settings-stack-section [&_+_.settings-stack-section]:mt-6 [&_>_:last-child]:mb-0","[&_>_h2]:mt-0 [&_>_h2]:mx-0 [&_>_h2]:mb-1.5 [&_>_h2]:text-xl"].join(" ");function Qb(e){return e.agentReady?{cls:"ok",variant:"success",label:iN()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:eRe()}:e.authState==="unknown"?{cls:"warn",variant:"warning",label:B$e()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:G$e()}:{cls:"warn",variant:"warning",label:uOe()}:{cls:"warn",variant:"warning",label:qLe()}}function xht({h:e}){return e.authMethod?f.jsx(f.Fragment,{children:e.authMethod==="oauth"?gje():IE()}):f.jsx(f.Fragment,{children:"—"})}function yht(){const[e,n]=M.useState(null),[t,r]=M.useState("claude-code"),[s,a]=M.useState(!1),l=(c,d=!1)=>{a(!0),up(c,d).then(n).catch(()=>{}).finally(()=>a(!1))};M.useEffect(()=>l(!1),[]),M.useEffect(()=>Vx(()=>l(!0)),[]);const o=e==null?void 0:e.find(c=>c.id===t);return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:NMe()}),f.jsx("div",{className:"harness-tabs mt-3 flex gap-1 mb-3.5 border-b border-b-border-variant [&_button]:inline-flex [&_button]:items-center [&_button]:gap-[7px] [&_button]:py-[7px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:border-b-2 [&_button]:border-b-transparent [&_button]:-mb-px [&_button:hover]:text-text [&_button.active]:border-b-primary",children:(e??[]).map(c=>f.jsxs("button",{className:c.id===t?"active":"",onClick:()=>r(c.id),children:[c.name,f.jsx("span",{className:`w-[7px] h-[7px] rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${Qb(c).cls}`})]},c.id))}),e?o?f.jsxs("div",{className:Ia,children:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx(Lt,{variant:Qb(o).variant,children:Qb(o).label}),f.jsx("div",{className:"spacer flex-1"}),f.jsxs(Ue,{size:"small",onClick:()=>l(!0,!0),disabled:s,children:[f.jsx(hd,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",qp()]})]}),f.jsxs("div",{className:id,children:[f.jsx("span",{className:"k",children:lAe()}),f.jsx("span",{className:"v",children:o.binPath??tje()}),f.jsx("span",{className:"k",children:cN()}),f.jsx("span",{className:"v",children:o.version??"—"}),f.jsx("span",{className:"k",children:Uje()}),f.jsx("span",{className:"v",children:f.jsx(xht,{h:o})}),o.account&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:o.id==="opencode"?zHe():zx()}),f.jsx("span",{className:"v",children:o.account})]}),o.org&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:MOe()}),f.jsx("span",{className:"v",children:o.org})]}),o.plan&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:_Ie()}),f.jsx("span",{className:"v",children:o.plan})]}),f.jsx("span",{className:"k",children:Oje()}),f.jsx("span",{className:"v",children:o.models.length>0?gze({count:Vt(o.models.length),models:new Intl.ListFormat(E()).format(o.models.slice(0,4).map(c=>we(op(c))))}):Nx()})]}),o.agentNote&&f.jsx("p",{className:ms,children:Bh(o.agentNote)})]}):null:f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",KTe()]})]})}function wht({s:e}){if(!e.configured)return f.jsx(Lt,{children:Up()});const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?f.jsx(Lt,{variant:"success",children:jx()}):f.jsx(Lt,{variant:"error",children:uLe()}):f.jsx(Lt,{variant:"error",children:YAe()}):f.jsx(Lt,{variant:"error",children:LRe()})}function Sht(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[l,o]=M.useState(""),[c,d]=M.useState(!1),[_,h]=M.useState(null),m=k=>{n(k),a(k.context??""),o(k.namespace)};M.useEffect(()=>{tJe().then(m).catch(k=>r(k instanceof Error?k.message:String(k)))},[]);const g=e!==null&&s===(e.context??"")&&l.trim()===e.namespace;async function S(k){if(k.preventDefault(),!c){d(!0),h(null);try{m(await nJe({context:s,namespace:l.trim()}))}catch(v){h(v instanceof Error?v.message:String(v))}finally{d(!1)}}}return f.jsx(f.Fragment,{children:t?f.jsx("div",{className:"error",children:t}):e?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Uc,children:[f.jsx("span",{className:"k",children:BAe()}),f.jsx("span",{className:"v",children:f.jsx(wht,{s:e})})]}),e.preflight.error&&f.jsx("p",{className:p4,children:e.preflight.error}),f.jsxs("form",{className:$h,onSubmit:S,children:[f.jsxs("div",{className:"row2",children:[f.jsxs("label",{children:[cTe(),f.jsx(th,{choices:[{id:"",label:e.currentContext?TNe({context:we(e.currentContext)}):NNe()},...s&&!e.contexts.includes(s)?[{id:s,label:ije({context:we(s)})}]:[],...e.contexts.map(k=>({id:k,label:k}))],value:s,variant:"field",dropDown:!0,disabled:c,onSelect:a})]}),f.jsxs("label",{children:[ODe(),f.jsx("input",{type:"text",value:l,onChange:k=>o(k.target.value),placeholder:RTe(),autoComplete:"off",spellCheck:!1})]})]}),_&&f.jsx("div",{className:"error",children:_}),f.jsx("div",{className:"actions",children:f.jsx(Ue,{variant:"primary",type:"submit",disabled:c||g,children:c?aa():Rl()})})]}),f.jsxs("section",{className:"mt-7",children:[f.jsx("h3",{className:"mt-0 mx-0 mb-1.5 text-base font-semibold text-text",children:iBe()}),f.jsx("p",{className:"m-0 font-sans text-sm leading-relaxed text-text",children:WNe({placeholder:we("{{ORX_RUN}}"),command:we("--manifest ")})})]})]}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",NAe()]})})}const kht={env:tze,syncedEnv:hze,modalToml:ize};function Cht({s:e}){return e.ready?f.jsx(Lt,{variant:"success",children:jx()}):!e.tokenConfigured&&!e.modalImportable?f.jsx(Lt,{children:aOe()}):e.modalImportable?e.tokenConfigured?f.jsx(Lt,{children:oN()}):f.jsx(Lt,{variant:"error",children:ALe()}):f.jsx(Lt,{variant:"error",children:e.envProvisioned?gEe():yEe()})}function Eht(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(!1),[l,o]=M.useState(null);M.useEffect(()=>{rJe().then(n).catch(d=>r(d instanceof Error?d.message:String(d)))},[]);async function c(){if(!s){a(!0),o(null);try{n(await sJe())}catch(d){o(d instanceof Error?d.message:String(d))}finally{a(!1)}}}return f.jsx(f.Fragment,{children:t?f.jsx("div",{className:"error",children:t}):e?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Uc,children:[f.jsx("span",{className:"k",children:Gp()}),f.jsx("span",{className:"v",children:f.jsx(Cht,{s:e})}),f.jsx("span",{className:"k",children:Ax()}),f.jsx("span",{className:"v",children:e.modalImportable?Mx():e.envProvisioned?ZNe():Kze()}),f.jsx("span",{className:"k",children:aN()}),f.jsx("span",{className:"v",children:e.tokenSource?kht[e.tokenSource]():Up()})]}),!e.tokenConfigured&&f.jsx("p",{className:ms,children:cze({command:we("modal token new"),id:we("MODAL_TOKEN_ID"),secret:we("MODAL_TOKEN_SECRET")})}),e.error&&e.envProvisioned&&!e.modalImportable&&f.jsx("p",{className:ms,children:e.error}),l&&f.jsx("div",{className:"error",children:l}),!e.modalImportable&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsx(Ue,{variant:"primary",onClick:()=>void c(),disabled:s,children:s?RPe():jPe()})})]}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",TAe()]})})}const xT="rounded-sm border-border-strong bg-surface text-subtext",yT="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",Nht=5e3;function wT(e){const[n,t]=M.useState({}),r=e.join("\0");return M.useEffect(()=>{const a=r?r.split("\0"):[];if(a.length===0){t({});return}let l=!1;const o=async()=>{const d=await Promise.all(a.map(async _=>{try{return[_,(await fJe(_)).running]}catch{return null}}));l||t(_=>{const h={};for(const m of d)m&&(h[m[0]]=m[1]);for(const m of a)h[m]===void 0&&_[m]!==void 0&&(h[m]=_[m]);return h})};o();const c=window.setInterval(o,Nht);return()=>{l=!0,window.clearInterval(c)}},[r]),[n,a=>t(l=>({...l,[a]:!0}))]}function zht({test:e,connecting:n,masterRunning:t}){if(n)return f.jsx("span",{role:"status",children:f.jsx(Lt,{className:yT,children:KE()})});if(e===void 0)return f.jsx(Lt,{className:xT,children:nN()});const r=e.missingTools??[],s=e.reachable&&e.toolsFound&&t===!1,a=e.reachable?e.toolsFound?s?f.jsx(Lt,{className:"rounded-sm",variant:"warning",children:XE()}):f.jsx(Lt,{className:"rounded-sm",variant:"success",children:Mx()}):f.jsx(Lt,{className:"rounded-sm",variant:"error",children:r.length===1?yze({tool:we(r[0])}):Cze()}):f.jsx(Lt,{className:"rounded-sm",variant:"error",children:Tx()});return f.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[a,!s&&f.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:La(e.testedAt)})]})}function jht({remote:e=!1}){const[n,t]=M.useState(null),[r,s]=M.useState(!1),[a,l]=M.useState(0),[o,c]=M.useState({}),[d,_]=M.useState({}),[h,m]=M.useState(null),[g,S]=M.useState(!1),[k,v]=M.useState(0),b=e?[]:(n==null?void 0:n.filter(T=>{const z=o[T.host]??T.lastTest;return(z==null?void 0:z.reachable)&&z.toolsFound}).map(T=>T.host))??[],[w,x]=wT(b);M.useEffect(()=>{GN().then(t).catch(()=>t([]))},[a]);function C(T){S(!1),v(z=>z+1),m(T),_(z=>({...z,[T]:!0}))}function j(){S(!1),m(null)}function N(T,z){_(D=>({...D,[T]:!z}))}return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"mb-3 flex justify-end",children:f.jsxs(Ue,{variant:"ghost",onClick:()=>s(!0),children:[f.jsx(RN,{size:14})," ",_N()]})}),n===null?f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",rN()]}):n.length===0?f.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:aLe()}):f.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:n.map(T=>{const z=o[T.host]??T.lastTest,D=h===T.host,O=d[T.host]??!1,H=!e&&(D||(z==null?void 0:z.reachable)===!1),P=`${T.user?`${T.user}@`:""}${T.hostname??T.host}${T.port?`:${T.port}`:""}`;return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-3 py-3 px-2",children:[f.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:[H?f.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":O,"aria-label":O?JO({name:we(T.host)}):yI({name:we(T.host)}),onClick:F=>{F.stopPropagation(),N(T.host,O)},children:f.jsx($a,{size:15,className:`text-muted transition-transform duration-120 ease-standard${O?" rotate-180":""}`})}):f.jsx("span",{className:"w-5 flex-none","aria-hidden":"true"}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"truncate text-base font-medium text-text",title:T.host,children:T.host}),f.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:P,children:P})]})]}),!e&&f.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[f.jsx("div",{className:"text-start",children:f.jsx(zht,{test:z,connecting:D&&!g,masterRunning:w[T.host]})}),f.jsx(Ue,{size:"small",type:"button",className:"justify-self-end",onClick:F=>{F.stopPropagation(),D&&!g?j():C(T.host)},disabled:!D&&h!==null&&!g,children:D?g?zc():Eh():(z==null?void 0:z.reachable)===!1?zc():z?uN():Ex()})]})]}),H&&(O||D)&&f.jsxs("div",{className:`border-t border-t-border-variant py-3 pe-2 ps-10${O?"":" hidden"}`,children:[!D&&(z==null?void 0:z.error)&&f.jsx(bht,{host:T.host,transcript:z.error}),D&&f.jsx(h4,{host:T.host,backend:"ssh",active:O,onComplete:F=>{F.backend==="ssh"&&(c(W=>({...W,[T.host]:F.result})),x(T.host),S(!1),m(null))},onError:F=>{S(!0),c(W=>({...W,[T.host]:{reachable:!1,toolsFound:!1,missingTools:[],error:F,testedAt:Date.now()}}))}},k)]})]},T.host)})}),r&&f.jsx(vT,{onClose:()=>s(!1),onSaved:()=>l(T=>T+1)})]})}function Aht({test:e,connecting:n,masterRunning:t}){return n?f.jsx(Lt,{className:yT,children:KE()}):e===null?f.jsx(Lt,{className:xT,children:nN()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?f.jsx(Lt,{className:"rounded-sm",variant:"warning",children:XE()}):f.jsx(Lt,{className:"rounded-sm",variant:"success",children:Mx()}):f.jsx(Lt,{className:"rounded-sm",variant:"error",children:xDe()}):f.jsx(Lt,{className:"rounded-sm",variant:"error",children:ELe()}):f.jsx(Lt,{className:"rounded-sm",variant:"error",children:Tx()})}function Tht({remote:e=!1}){const[n,t]=M.useState(null),[r,s]=M.useState(null),[a,l]=M.useState(""),[o,c]=M.useState(""),[d,_]=M.useState(""),[h,m]=M.useState(""),[g,S]=M.useState(!1),[k,v]=M.useState(null),[b,w]=M.useState(null),[x,C]=M.useState(!1),[j,N]=M.useState(!1),[T,z]=M.useState(0),D=!e&&a&&(b!=null&&b.reachable)&&b.slurmFound&&b.toolsFound?[a]:[],[O,H]=wT(D);function P(){N(!1),z(G=>G+1),C(!0)}const F=G=>{t(G),l(G.host??""),c(G.partition??""),_(G.account??""),m(G.timeLimit??"")};M.useEffect(()=>{vJe().then(F).catch(G=>s(G instanceof Error?G.message:String(G)))},[]);const W=n!==null&&a===(n.host??"")&&o.trim()===(n.partition??"")&&d.trim()===(n.account??"")&&h.trim()===(n.timeLimit??"");async function Z(G){if(G.preventDefault(),!g){S(!0),v(null);try{F(await xJe({host:a,partition:o.trim(),account:d.trim(),timeLimit:h.trim()}))}catch(X){v(X instanceof Error?X.message:String(X))}finally{S(!1)}}}return f.jsx(f.Fragment,{children:r?f.jsx("div",{className:"error",children:r}):n?f.jsxs(f.Fragment,{children:[!x&&(b==null?void 0:b.error)&&f.jsx("p",{className:p4,children:b.error}),b&&b.partitions.length>0&&f.jsxs("div",{className:Uc,children:[f.jsx("span",{className:"k",children:aIe()}),f.jsx("span",{className:"v",children:b.partitions.join(", ")})]}),f.jsxs("form",{className:$h,onSubmit:Z,children:[f.jsxs("div",{className:"row2",children:[f.jsxs("label",{children:[fDe(),f.jsx(th,{choices:[{id:"",label:nOe()},...a&&!n.hosts.some(G=>G.host===a)?[{id:a,label:`${a} (not in ~/.ssh/config)`}]:[],...n.hosts.map(G=>({id:G.host,label:G.host}))],value:a,variant:"field",dropDown:!0,disabled:g||x,onSelect:G=>{l(G),w(null),C(!1),N(!1)}})]}),f.jsxs("label",{children:[nIe(),f.jsx("input",{type:"text",list:"slurm-partitions",value:o,onChange:G=>c(G.target.value),placeholder:K7(),autoComplete:"off",spellCheck:!1}),f.jsx("datalist",{id:"slurm-partitions",children:b==null?void 0:b.partitions.map(G=>f.jsx("option",{value:G},G))})]})]}),f.jsxs("div",{className:"row2",children:[f.jsxs("label",{children:[zx(),f.jsx("input",{type:"text",value:d,onChange:G=>_(G.target.value),placeholder:K7(),autoComplete:"off",spellCheck:!1})]}),f.jsxs("label",{children:[T$e(),f.jsx("input",{type:"text",value:h,onChange:G=>m(G.target.value),placeholder:GAe(),autoComplete:"off",spellCheck:!1})]})]}),k&&f.jsx("div",{className:"error",children:k}),f.jsxs("div",{className:"actions",children:[f.jsx(Ue,{variant:"primary",type:"submit",disabled:g||W||x,children:g?aa():Rl()}),!e&&f.jsx(Ue,{type:"button",onClick:()=>{x&&!j?(N(!1),C(!1)):P()},disabled:!a,title:a?void 0:kHe(),children:x?j?zc():Eh():b?uN():Ex()}),f.jsx("span",{role:"status",children:f.jsx(Aht,{test:b,connecting:x&&!j,masterRunning:O[a]})})]})]}),!e&&x&&f.jsx(h4,{host:a,backend:"slurm",onComplete:G=>{G.backend==="slurm"&&(w(G.result),H(a),N(!1),C(!1))},onError:G=>{N(!0),w({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:G})}},T)]}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",XRe()]})})}function Mht(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[l,o]=M.useState(!1),[c,d]=M.useState(null),[_,h]=M.useState(null),m=_!==null&&_!=="testing"?_:null,g=b=>{n(b),a(b.address??"")};M.useEffect(()=>{yJe().then(g).catch(b=>r(b instanceof Error?b.message:String(b)))},[]);const S=e!==null&&s===(e.address??"");async function k(b){if(b.preventDefault(),!l){o(!0),d(null);try{g(await wJe({address:s}))}catch(w){d(w instanceof Error?w.message:String(w))}finally{o(!1)}}}async function v(){h("testing");try{h(await SJe(s.trim()||void 0))}catch(b){h({reachable:!1,address:s.trim()||"(unknown)",rayVersion:null,error:b instanceof Error?b.message:String(b)})}}return f.jsx(f.Fragment,{children:t?f.jsx("div",{className:"error",children:t}):e?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Uc,children:[f.jsx("span",{className:"k",children:nMe()}),f.jsx("span",{className:"v",children:e.resolvedAddress}),f.jsx("span",{className:"k",children:Rx()}),f.jsx("span",{className:"v",children:e.source}),(m==null?void 0:m.reachable)&&m.rayVersion&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:wIe()}),f.jsx("span",{className:"v",children:m.rayVersion})]})]}),(m==null?void 0:m.error)&&f.jsx("p",{className:p4,children:m.error}),f.jsxs("form",{className:$h,onSubmit:k,children:[f.jsxs("label",{children:[SRe(),f.jsx("input",{type:"text",value:s,onChange:b=>{a(b.target.value),h(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),c&&f.jsx("div",{className:"error",children:c}),f.jsxs("div",{className:"actions",children:[f.jsx(Ue,{variant:"primary",type:"submit",disabled:l||S,children:l?aa():Rl()}),f.jsx(Ue,{type:"button",onClick:()=>void v(),disabled:_==="testing",children:o$e()}),f.jsx(Rht,{test:_})]})]})]}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",VRe()]})})}function Rht({test:e}){return e===null?null:e==="testing"?f.jsx(Lt,{children:d$e()}):e.reachable?f.jsx(Lt,{variant:"success",children:EIe()}):f.jsx(Lt,{variant:"error",children:Tx()})}function Dht(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{EJe().then(n).catch(s=>r(s instanceof Error?s.message:String(s)))},[]),f.jsx(f.Fragment,{children:t?f.jsx("div",{className:"error",children:t}):e?f.jsxs("div",{className:Uc,children:[f.jsx("span",{className:"k",children:$Me()}),f.jsx("span",{className:"v",children:e.hostname}),f.jsx("span",{className:"k",children:r$e()}),f.jsxs("span",{className:"v",children:[e.os,"/",e.arch,e.chip?` — ${e.chip}`:""]}),f.jsx("span",{className:"k",children:"CPU"}),f.jsx("span",{className:"v",children:e.cpuCount>0?`${e.cpuCount} cores`:"—"}),f.jsx("span",{className:"k",children:"RAM"}),f.jsx("span",{className:"v",children:e.memBytes!==null?Ta(e.memBytes):"—"}),f.jsx("span",{className:"k",children:"GPUs"}),f.jsx("span",{className:"v",children:e.gpus.length===0?"none detected (nvidia-smi)":e.gpus.map(s=>`${s.name}${s.memMib!==null?` — ${Ta(s.memMib*1024*1024)}`:""}`).join(", ")})]}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",qTe()]})})}function Lht(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{NJe().then(n).catch(s=>r(s instanceof Error?s.message:String(s)))},[]),f.jsx(f.Fragment,{children:t?f.jsx("div",{className:"error",children:t}):e?e.loggedIn?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Uc,children:[f.jsx("span",{className:"k",children:Gp()}),f.jsx("span",{className:"v",children:f.jsx(Lt,{variant:"success",children:iN()})}),f.jsx("span",{className:"k",children:OOe()}),f.jsx("span",{className:"v",children:e.orgs.length>0?e.orgs.join(", "):"—"}),f.jsx("span",{className:"k",children:ABe()}),f.jsx("span",{className:"v",children:e.sshKeyStatus==="matched"?f.jsx(Lt,{variant:"success",children:_Oe()}):e.sshKeyStatus==="no_local_match"?f.jsx(Lt,{variant:"warning",children:QLe()}):e.sshKeyStatus==="none_registered"?f.jsx(Lt,{variant:"error",children:DLe()}):f.jsx(Lt,{children:oN()})})]}),e.sshKeyStatus==="none_registered"&&(e.sshKeyPath?f.jsxs("p",{dir:"auto",className:ms,children:[zje()," ",f.jsxs("code",{children:["orx ssh-key add ",e.sshKeyPath]}),"."]}):f.jsxs("p",{dir:"auto",className:ms,children:[wLe()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),p$e()," ",f.jsx("code",{children:"orx ssh-key add"}),"."]})),e.sshKeyStatus==="no_local_match"&&(e.sshKeyPath?f.jsx("p",{dir:"auto",className:ms,children:LHe({register:we(`orx ssh-key add ${e.sshKeyPath}`),load:we("ssh-add")})}):f.jsxs("p",{dir:"auto",className:ms,children:[bLe()," ",f.jsx("code",{children:"ssh-add"}),zOe()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),e.error&&f.jsx("p",{dir:"auto",className:ms,children:e.error})]}):f.jsx("p",{className:ms,children:$Ne({command:we("orx login")})}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",SAe()]})})}const Ep={local:jE,tinker:loe,hf:Tae,modal:Fae,k8s:Lae,ssh:soe,slurm:eoe,ray:Xae,openresearch:Vae},Oht={local:rae,ssh:Sae,tinker:Nae,hf:Yie,modal:oae,k8s:Jie,slurm:vae,ray:pae,openresearch:dae},m4={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"},Iht={local:xoe,ssh:Hoe,tinker:qoe,hf:foe,modal:koe,k8s:moe,slurm:Ooe,ray:Moe,openresearch:zoe};function Bht(e){switch(e.id){case"local":return yie();case"ssh":return Pie({summary:we(e.summary)});case"tinker":return Gie({summary:we(e.summary)});case"hf":return hie({summary:we(e.summary)});case"modal":return Cie({summary:we(e.summary)});case"k8s":return gie({summary:we(e.summary)});case"slurm":return Iie({summary:we(e.summary)});case"ray":return Rie({summary:we(e.summary)});case"openresearch":return jie({summary:we(e.summary)})}}function $ht({target:e}){return f.jsxs("dl",{className:"m-0 mt-8 grid grid-cols-[9rem_minmax(0,1fr)] gap-x-5 gap-y-4 font-sans",children:[f.jsx("dt",{className:"text-sm font-medium text-subtext",children:UMe()}),f.jsx("dd",{className:"m-0 text-base leading-relaxed text-text",children:Bht(e)}),f.jsx("dt",{className:"text-sm font-medium text-subtext",children:fHe()}),f.jsx("dd",{className:"m-0 text-base leading-relaxed text-text",children:Iht[e.id]()})]})}const Tk=["hf","modal","slurm","ray","openresearch"],Jb=["hf","modal","openresearch"],ST={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"]},Mk="__custom__";function vf(e,n){return!!(n&&!(ST[e]??[]).includes(n))}function Hht({settings:e,projectId:n,onSaved:t}){const r=e.configuredDefaultBackend??e.defaultBackend??"local",s=e.defaultFlavor??"",[a,l]=M.useState(r),[o,c]=M.useState(s),[d,_]=M.useState(vf(r,s)),[h,m]=M.useState(!1),[g,S]=M.useState(null),k=e.targets.find(O=>O.id===a),v=e.targets.filter(O=>O.configured||O.id===r),b=Tk.includes(a),w=Jb.includes(a),x=ST[a]??[],C=a===r&&(!b||o.trim()===s),j=Ep[a](),N=h?kFe():w&&!o.trim()?z9e({destination:j}):a==="ssh"?Rze():jze({destination:j});M.useEffect(()=>{l(r),c(s),_(vf(r,s))},[r,s]);async function T(O,H){const P=Tk.includes(O);if(!(h||Jb.includes(O)&&!H.trim())){m(!0),S(null);try{t(await CJe({backend:O,flavor:P&&H.trim()||null,projectId:n}))}catch(F){S(F instanceof Error?F.message:String(F)),l(r),c(s),_(vf(r,s))}finally{m(!1)}}}function z(O){const H=e.targets.find(F=>F.id===O);if(!H)return;l(H.id);const P=H.id===r?s:"";c(P),_(vf(H.id,P)),Jb.includes(H.id)||T(H.id,P)}function D(O){if(O===Mk){_(!0);return}_(!1),c(O),(!w||O)&&T(a,O)}return f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:HTe()}),f.jsxs("div",{children:[f.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:O=>{O.preventDefault(),C||T(a,o)},children:[f.jsx(th,{choices:v.map(O=>({id:O.id,label:Ep[O.id]()})),value:a,variant:"field",dropDown:!0,disabled:h,renderIcon:O=>{const H=e.targets.find(P=>P.id===O.id);return H?f.jsx(wm,{kind:m4[H.id],size:16}):null},onSelect:z}),b&&f.jsx("div",{children:d?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:o,onChange:O=>c(O.target.value),onBlur:()=>{if(w&&!o.trim()){a===r&&(c(s),_(vf(r,s)));return}C||T(a,o)},placeholder:yTe(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:h}),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":W7(),title:W7(),onMouseDown:O=>O.preventDefault(),onClick:()=>_(!1),children:f.jsx($a,{size:12})})]}):f.jsx(th,{choices:[{id:"",label:w?k9e():Pze()},...o&&!x.includes(o)?[{id:o,label:oEe({value:we(o)})}]:[],...x.map(O=>({id:O,label:O})),{id:Mk,label:CTe()}],value:o,variant:"field",dropDown:!0,disabled:h,onSelect:D})})]}),g&&f.jsx("div",{className:"error mt-2.5",children:g}),k&&!k.configured&&f.jsx("p",{className:ms,children:S$e()})]}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:N})]})}function Pht({target:e,isDefault:n,onOpen:t}){const r=e.unverified?m9e():e.id==="openresearch"?IPe():e.id==="ray"?Ex():CPe();return f.jsxs("button",{type:"button",className:"group flex min-h-41 w-full flex-col items-start rounded-lg border border-border bg-background p-5 text-start font-sans transition-colors duration-120 ease-standard hover:border-text hover:bg-surface disabled:cursor-default disabled:opacity-52",onClick:t,disabled:!e.enabled,children:[f.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:f.jsx(wm,{kind:m4[e.id],size:48})}),f.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:Ep[e.id]()}),f.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:Oht[e.id]()}),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?eN():e.configured?OFe():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($0,{size:16})})]})]})}function Fht({target:e,isDefault:n,onBack:t,remote:r}){return f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"settings-back mb-10 inline-flex items-center gap-2 text-sm font-medium text-subtext hover:text-text",onClick:t,children:[f.jsx(qf,{size:16})," ",QE()]}),f.jsxs("div",{className:"flex items-center justify-between gap-6",children:[f.jsxs("div",{className:`flex min-w-0 items-center ${e.id==="tinker"?"gap-8":"gap-5"}`,children:[f.jsx("span",{className:"flex h-20 w-24 flex-none items-center justify-start",children:f.jsx(wm,{kind:m4[e.id],size:72})}),f.jsx("h1",{className:"m-0 min-w-0",children:Ep[e.id]()})]}),n&&f.jsx(Lt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:eN()})]}),f.jsx($ht,{target:e}),e.id!=="tinker"&&f.jsxs("div",{className:"mt-8 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==="local"&&f.jsx(Dht,{}),e.id==="hf"&&f.jsx(Wht,{}),e.id==="modal"&&f.jsx(Eht,{}),e.id==="k8s"&&f.jsx(Sht,{}),e.id==="ssh"&&f.jsx(jht,{remote:r}),e.id==="slurm"&&f.jsx(Tht,{remote:r}),e.id==="ray"&&f.jsx(Mht,{}),e.id==="openresearch"&&f.jsx(Lht,{})]})]})}function Uht({project:e,onViewHistory:n,remote:t}){const[r,s]=M.useState(null),[a,l]=M.useState(null),[o,c]=M.useState(null),[d,_]=M.useState(null),h=M.useRef(0);M.useEffect(()=>{h.current++,s(null),c(null),l(null),_(null)},[e==null?void 0:e.id]),M.useEffect(()=>{const C=++h.current;kJe(e==null?void 0:e.id).then(j=>{C===h.current&&(s(j),l(null))}).catch(j=>{if(C!==h.current)return;const N=j instanceof Error?j.message:String(j);s(T=>(T===null?l(N):_(N),T))})},[o,e==null?void 0:e.id]);const m=C=>{h.current++,s(C),_(null)},g=r?r.targets:null,S=(r==null?void 0:r.configuredDefaultBackend)??(r==null?void 0:r.defaultBackend),k=g?[...g].sort((C,j)=>+(j.id===S)-+(C.id===S)):null,v=(k==null?void 0:k.filter(C=>C.configured))??[],b=(k==null?void 0:k.filter(C=>!C.configured))??[],w=C=>f.jsx(Pht,{target:C,isDefault:S===C.id,onOpen:()=>c(C.id)},`${(e==null?void 0:e.id)??"none"}:${C.id}`),x=o?r==null?void 0:r.targets.find(C=>C.id===o):null;return x?f.jsx(Fht,{target:x,isDefault:S===x.id,onBack:()=>c(null),remote:t}):f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:JE()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:nTe()}),f.jsx(u_t,{projectId:e==null?void 0:e.id,onViewHistory:n}),a?f.jsx("div",{className:"error",children:a}):r?f.jsxs(f.Fragment,{children:[d&&f.jsx("div",{className:"error",children:d}),f.jsx(Hht,{settings:r,projectId:e==null?void 0:e.id,onSaved:m}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:HIe()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:v.map(w)})]}),b.length>0&&f.jsxs("section",{className:"mb-3.5",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:kDe()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:b.map(w)})]})]}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",vAe()]})]})}const qht={env:YEe,openresearchEnv:JEe,hfCache:GEe};function Ght({settings:e}){return e.configured?e.valid?f.jsx(Lt,{variant:"success",children:jx()}):f.jsx(Lt,{variant:"error",children:pRe()}):f.jsx(Lt,{children:Up()})}function Vht({settings:e}){return!e.configured||!e.valid?null:e.jobsWrite===!0?f.jsx(Lt,{variant:"success",children:TRe()}):e.jobsWrite===!1?f.jsx(Lt,{variant:"error",children:_Le()}):f.jsx(Lt,{children:NRe()})}function Wht(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[l,o]=M.useState(!1),[c,d]=M.useState(null),_=M.useRef(!1);M.useEffect(()=>{YQe().then(m=>{_.current||n(m)}).catch(m=>{_.current||r(m instanceof Error?m.message:String(m))})},[]);async function h(m){if(m.preventDefault(),!(!s.trim()||l)){o(!0),d(null);try{const g=await XQe(s.trim());_.current=!0,n(g),r(null),a("")}catch(g){d(g instanceof Error?g.message:String(g))}finally{o(!1)}}}return f.jsxs(f.Fragment,{children:[t?f.jsx("div",{className:"error",children:t}):e?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Uc,children:[f.jsx("span",{className:"k",children:Gp()}),f.jsx("span",{className:"v",children:f.jsx(Ght,{settings:e})}),f.jsx("span",{className:"k",children:zx()}),f.jsx("span",{className:"v",children:e.username??"—"}),f.jsx("span",{className:"k",children:aN()}),f.jsx("span",{className:"v",children:e.maskedToken??"—"}),f.jsx("span",{className:"k",children:Rx()}),f.jsx("span",{className:"v",children:e.source?qht[e.source]():Up()}),f.jsx("span",{className:"k",children:vRe()}),f.jsxs("span",{className:"v",children:[f.jsx(Vht,{settings:e}),(!e.configured||!e.valid)&&"—"]})]}),e.source==="env"&&f.jsx("p",{className:ms,children:LMe()}),e.valid&&e.jobsWrite===null&&f.jsx("p",{className:ms,children:rNe({login:we("hf auth login"),url:we("huggingface.co/settings/tokens")})})]}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",eDe()]}),f.jsxs("form",{className:$h,onSubmit:h,children:[f.jsxs("label",{children:[e!=null&&e.configured?iPe():Ize(),f.jsx("input",{type:"password",value:s,onChange:m=>a(m.target.value),placeholder:TMe(),autoComplete:"off"})]}),c&&f.jsx("div",{className:"error",children:c}),f.jsx("div",{className:"actions",children:f.jsx(Ue,{variant:"primary",type:"submit",disabled:!s.trim()||l,children:l?MFe():Rl()})})]})]})}const kT=/^hf_[A-Za-z0-9]{10,}$/;function CT(){return f.jsx("tr",{children:f.jsx("td",{colSpan:3,children:f.jsxs("p",{dir:"auto",className:ms,children:[N$e()," ",f.jsx("code",{children:"HF_TOKEN"}),gBe()]})})})}const Rk=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function I2(e,n){const t=n instanceof Error?n.message:String(n);Ms(t.includes(e)?t:`${e}: ${t}`,"error")}function Kht({name:e,entry:n,onVars:t}){const[r,s]=M.useState(""),[a,l]=M.useState(!1);async function o(){if(!(!r.trim()||a)){l(!0);try{t(await qN(e,r.trim())),s("")}catch(d){I2(e,d)}finally{l(!1)}}}async function c(){if(!a){l(!0);try{t(await aJe(e))}catch(d){I2(e,d)}finally{l(!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(Lt,{children:QOe()})]}):f.jsx(Wf,{variant:"inline",className:"text-base",type:"password",value:r,onChange:d=>s(d.target.value),onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),o()),d.key==="Escape"&&!a&&s("")},placeholder:lN(),"aria-label":JB({name:we(e)}),autoComplete:"new-password",disabled:a})}),f.jsx("td",{children:n?f.jsx(Gt,{className:"[&:hover:not(:disabled)]:text-accent-red",title:Rv({name:we(e)}),"aria-label":Rv({name:we(e)}),onClick:()=>void c(),disabled:a,children:f.jsx(_d,{size:13})}):r.trim()&&f.jsx(Ue,{size:"small",onClick:()=>void o(),disabled:a,children:a?aa():Rl()})})]}),!n&&e!=="HF_TOKEN"&&kT.test(r.trim())&&f.jsx(CT,{})]})}function Yht({onVars:e,onDone:n}){const[t,r]=M.useState(""),[s,a]=M.useState(""),[l,o]=M.useState(!1);async function c(){if(!(!t.trim()||!s.trim()||l)){o(!0);try{e(await qN(t.trim(),s.trim())),n()}catch(_){I2(t.trim(),_)}finally{o(!1)}}}const d=_=>{_.key==="Enter"&&(_.preventDefault(),c()),_.key==="Escape"&&!l&&n()};return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{children:f.jsx(Wf,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:t,onChange:_=>r(_.target.value),onKeyDown:d,placeholder:"MY_API_KEY","aria-label":KDe(),autoComplete:"off",spellCheck:!1,disabled:l})}),f.jsx("td",{children:f.jsx(Wf,{variant:"inline",className:"text-base",type:"password",value:s,onChange:_=>a(_.target.value),onKeyDown:d,placeholder:lN(),"aria-label":QDe(),autoComplete:"new-password",disabled:l})}),f.jsxs("td",{children:[f.jsx(Ue,{size:"small",onClick:()=>void c(),disabled:l||!t.trim()||!s.trim(),children:l?aa():Rl()}),f.jsx(Gt,{title:Eh(),"aria-label":pAe(),onClick:n,disabled:l,children:f.jsx(Ur,{size:13})})]})]}),t.trim()!=="HF_TOKEN"&&kT.test(s.trim())&&f.jsx(CT,{})]})}function Xht(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(!1);M.useEffect(()=>{iJe().then(n).catch(c=>r(c instanceof Error?c.message:String(c)))},[]);const l=e===null?[]:e.map(c=>c.key).filter(c=>!Rk.includes(c)),o=[...Rk,...l];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:iHe()}),f.jsxs(Ue,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:s||e===null,children:[f.jsx(Bx,{size:12})," ",Mje()]})]}),f.jsx("div",{className:Ia,children:t?f.jsx("div",{className:"error",children:t}):e===null?f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",Dl()]}):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:[o.map(c=>f.jsx(Kht,{name:c,entry:e.find(d=>d.key===c),onVars:n},c)),s&&f.jsx(Yht,{onVars:n,onDone:()=>a(!1)})]})})})]})}const xf=[{value:"system",label:lFe,icon:OZe},{value:"light",label:sFe,icon:iQe},{value:"dark",label:ZPe,icon:BZe}],Zht=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"}];function Qht(){const e=Oc(),[n,t]=rz(),r=s=>{var _;const a=s.key==="ArrowRight"||s.key==="ArrowDown"?1:s.key==="ArrowLeft"||s.key==="ArrowUp"?-1:0;if(!a)return;s.preventDefault();const l=[...s.currentTarget.querySelectorAll('[role="radio"]')],o=l.findIndex(h=>h===document.activeElement),d=((o===-1?xf.findIndex(h=>h.value===n):o)+a+xf.length)%xf.length;t(xf[d].value),(_=l[d])==null||_.focus()};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:XCe()}),f.jsxs("div",{className:`${Ia} mt-3`,children:[f.jsxs("div",{className:`${yo} pb-3.5`,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:tS()}),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":tS(),onKeyDown:r,children:xf.map(({value:s,label:a,icon:l})=>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(l,{size:14}),a()]},s))})]}),f.jsxs("div",{className:yo,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:LNe()}),f.jsx("div",{className:"w-52 flex-none",children:f.jsx(th,{choices:Zht,value:e,variant:"field",dropDown:!0,onSelect:s=>{_E(s)&&mN(s)}})})]})]})]})}const Jht={installer:gYe,"app-bundle":iYe,cargo:cYe,homebrew:hYe,nix:yYe,unknown:CYe},ev={cargo:jYe,homebrew:RYe,nix:IYe};function e_t(){var c;const{status:e,error:n,apply:t}=lT(),[r,s]=M.useState(null),[a,l]=M.useState(null);if(!e)return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:J7()}),n?f.jsx("div",{className:Ia,children:f.jsx("div",{className:"error",children:n})}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",Dl()]})]});const o=async(d,_)=>{s(d),l(null);try{await _()}catch(h){l(h instanceof Error?h.message:String(h))}finally{s(null)}};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:J7()}),f.jsxs("div",{className:`${Ia} mt-3`,children:[f.jsxs("div",{className:`${id} pb-3.5`,children:[f.jsx("div",{className:"k",children:cN()}),f.jsx("div",{className:"v",children:e.current}),f.jsx("div",{className:"k",children:$Re()}),f.jsx("div",{className:"v",children:e.latest??"—"}),f.jsx("div",{className:"k",children:tN()}),f.jsx("div",{className:"v",children:Jht[e.channel]()})]}),e.restartRequired&&f.jsx("div",{className:yo,children:f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:tBe()}),f.jsx("p",{children:hPe({installed:we(e.installedVersion??"—"),current:we(e.current??e.installedVersion??"—")})})]})}),e.selfUpdates?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:yo,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:X7()}),f.jsxs("p",{children:[qDe(),e.envDisabled&&xFe()]})]}),f.jsx(Zx,{type:"button",checked:e.autoUpdate,"aria-label":X7(),disabled:r!==null,onClick:()=>void o("auto",()=>JQe(!e.autoUpdate).then(t))})]}),f.jsxs("div",{className:yo,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:e.updateAvailable?mFe({version:we(e.latest??"—")}):l9e()}),f.jsx("p",{children:e.updateAvailable?SNe():x9e()})]}),f.jsx(Ue,{size:"small",type:"button",disabled:r!==null,onClick:()=>void o("apply",()=>QQe().then(t)),children:r==="apply"?Cx():e.updateAvailable?fFe():f9e()})]})]}):f.jsx("div",{className:yo,children:f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:HOe()}),f.jsx("p",{children:((c=ev[e.channel])==null?void 0:c.call(ev))??$He()})]})}),e.channel==="app-bundle"&&f.jsx(n_t,{busy:r,run:o}),a&&f.jsx("div",{className:"error",children:a})]})]})}function t_t(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null);M.useEffect(()=>{$Je().then(n).catch(o=>a(o instanceof Error?o.message:String(o)))},[]);const l=()=>{!e||t||(r(!0),a(null),HJe(!e.preferenceEnabled).then(n).catch(o=>a(o instanceof Error?o.message:String(o))).finally(()=>r(!1)))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:Q$e()}),e?f.jsxs("div",{className:`${Ia} mt-3`,children:[f.jsxs("div",{className:yo,children:[f.jsxs("div",{children:[f.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[V7(),e.locked&&e.reason&&f.jsx(Ez,{content:`${gTe()} ${e.reason}.`,className:"text-subtext",children:f.jsx(NN,{size:15})})]}),f.jsx("p",{children:nLe()})]}),f.jsx(Zx,{type:"button",checked:e.enabled,"aria-label":V7(),disabled:t||e.locked,onClick:l})]}),s&&f.jsx("div",{className:"error",children:s})]}):s?f.jsx("div",{className:"error",children:s}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",Dl()]})]})}function n_t({busy:e,run:n}){const[t,r]=M.useState(null),[s,a]=M.useState(!1),l=o=>void n("cli",()=>eJe(o).then(c=>{r(c),a(!1)}).catch(c=>{throw a(!o&&String((c==null?void 0:c.message)??c).includes("--force")),c}));return f.jsxs("div",{className:yo,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:pNe({command:we("orx")})}),t?f.jsxs("p",{children:[t.alreadyCurrent?O9e({link:we(t.link)}):H9e({link:we(t.link)}),!t.onPath&&VCe({directory:we(t.dir)})]}):f.jsx("p",{children:dNe({command:we("orx")})})]}),f.jsx(Ue,{size:"small",type:"button",disabled:e!==null,onClick:()=>l(s),children:e==="cli"?Cx():s?tPe():t?UHe():oNe()})]})}function r_t(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null),l=()=>(a(null),Fx().then(n).catch(c=>a(c instanceof Error?c.message:String(c))));M.useEffect(()=>void l(),[]);const o=()=>{if(!e||t)return;const c=!e.githubForNewProjects;r(!0),a(null),ZN(c,!0).then(n).catch(d=>a(d instanceof Error?d.message:String(d))).finally(()=>r(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:pMe()}),e?f.jsxs("div",{className:`${Ia} 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:vMe()}),f.jsx(Lt,{variant:e.githubAuthenticated?"success":e.ghInstalled?"warning":"error",children:e.githubAuthenticated?WE():ZE()})]}),f.jsxs("div",{className:yo,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:Y7()}),f.jsx("p",{children:mHe()})]}),f.jsx(Zx,{type:"button",checked:e.githubForNewProjects,"aria-label":Y7(),disabled:t||!e.githubAuthenticated&&!e.githubForNewProjects,onClick:o})]}),!e.githubAuthenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(ET,{ghInstalled:e.ghInstalled,onCheck:l})}),s&&f.jsx("div",{className:"error",children:s})]}):s?f.jsx("div",{className:"error",children:s}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",Dl()]})]})}function ET({ghInstalled:e,onCheck:n}){const[t,r]=M.useState(!1),s=()=>{r(!0),n().finally(()=>r(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper m-0 text-sm leading-relaxed text-text",children:Bh(e?gPe():vNe())}),f.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&f.jsxs(Qv,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[sRe()," ",f.jsx(jc,{size:12})]}),f.jsx(Ue,{type:"button",variant:e?"warning":"default",disabled:t,onClick:s,children:t?Fp():s9e()})]})]})}function s_t(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null);return M.useEffect(()=>{PQe().then(l=>n(l.hasToken)).catch(l=>a(l instanceof Error?l.message:String(l)))},[]),f.jsxs("div",{className:O2,children:[f.jsx("h3",{children:qOe()}),f.jsxs("div",{className:id,children:[f.jsx("span",{className:"k",children:SMe()}),f.jsx("span",{className:"v",children:f.jsx(Lt,{variant:e?"success":"default",children:e===null?s?OE():Fp():e?yPe():hje()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:xHe()}),e?f.jsx("div",{className:V0,children:f.jsx(Ue,{disabled:t,onClick:()=>{r(!0),a(null),FQe().then(l=>n(l.hasToken)).catch(l=>a(l instanceof Error?l.message:String(l))).finally(()=>r(!1))},children:t?ZHe():WHe()})}):f.jsx(Vft,{save:FN,onSaved:l=>n(l.hasToken),placeholder:KOe(),createHref:"https://www.overleaf.com/user/settings"}),s&&f.jsx("div",{className:"error",children:s})]})}function i_t({project:e,publicationError:n,onProjectUpdate:t}){const[r,s]=M.useState(null),[a,l]=M.useState(!1),[o,c]=M.useState(null),[d,_]=M.useState(!1),[h,m]=M.useState(!1),[g,S]=M.useState(null),k=M.useRef(0),v=!!(r!=null&&r.github.owner&&r.github.repo),b=(j=!0)=>{const N=++k.current;return j&&s(null),c(null),e?LJe(e.id).then(T=>{N===k.current&&s(T)}).catch(T=>{N===k.current&&c(T instanceof Error?T.message:String(T))}):Promise.resolve()};M.useEffect(()=>void b(),[e==null?void 0:e.id]);const w=j=>{const N=j instanceof Error?j.message:String(j);return N.toLowerCase().includes("archived")?jEe():N.includes("(fetch first)")||N.includes("non-fast-forward")?REe():N.includes("403")||N.toLowerCase().includes("permission denied")?IEe():N},x=()=>{e&&(l(!0),c(null),IJe(e.id).then(j=>{s(j.git),t(j.project),Fx().then(N=>{!N.githubForNewProjects&&!N.githubDefaultPromptSeen&&_(!0)}).catch(()=>{})}).catch(j=>c(w(j))).finally(()=>l(!1)))},C=j=>{m(!0),S(null),ZN(j,!0).then(()=>_(!1)).catch(N=>S(N instanceof Error?N.message:String(N))).finally(()=>m(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:ZIe()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:cPe({project:(e==null?void 0:e.name)??rEe()})}),e?o&&!r?f.jsx("div",{className:"error",children:o}):r?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:O2,children:[f.jsx("h3",{children:lDe()}),f.jsxs("div",{className:id,children:[f.jsx("span",{className:"k",children:uIe()}),f.jsx("span",{className:"v",children:r.path}),f.jsx("span",{className:"k",children:"Git"}),f.jsx("span",{className:"v",children:r.gitVersion??BE()}),f.jsx("span",{className:"k",children:BBe()}),f.jsx("span",{className:"v",children:r.initialized?CEe({branch:we(r.currentBranch??YE()),state:r.clean?M9e():PEe()}):cje()}),f.jsx("span",{className:"k",children:sAe()}),f.jsx("span",{className:"v",children:r.baselineBranch}),f.jsx("span",{className:"k",children:WIe()}),f.jsx("span",{className:"v",children:r.remotes.length?r.remotes.map(j=>`${j.name}: ${j.url}`).join(" · "):Nx()})]}),!r.initialized&&f.jsx("div",{className:V0,children:f.jsx(Ue,{variant:"primary",onClick:()=>void OJe(e.id).then(s).catch(j=>c(String(j))),children:WMe()})})]}),f.jsxs("div",{className:O2,children:[f.jsx("h3",{children:"GitHub"}),f.jsxs("div",{className:id,children:[f.jsx("span",{className:"k",children:Wje()}),f.jsx("span",{className:"v",children:f.jsx(Lt,{variant:r.github.authenticated?"success":r.github.ghInstalled?"warning":"error",children:r.github.authenticated?WE():ZE()})}),f.jsx("span",{className:"k",children:bIe()}),f.jsx("span",{className:"v",children:v?f.jsxs(f.Fragment,{children:[f.jsxs("span",{children:[r.github.owner,"/",r.github.repo]}),!r.github.enabled&&f.jsx(Lt,{children:JBe()})]}):f.jsx(Lt,{children:sDe()})}),r.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:YBe()}),f.jsx("span",{className:"v",children:r.github.syncStatus})]})]}),!r.github.authenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(ET,{ghInstalled:r.github.ghInstalled,onCheck:()=>b(!1)})}),r.github.authenticated&&!r.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:v?zFe():J9e()}),f.jsxs("div",{className:V0,children:[v&&r.github.url&&f.jsxs(Qv,{href:r.github.url,target:"_blank",rel:"noreferrer",children:[Q7()," ",f.jsx(jc,{size:12})]}),f.jsx(Ue,{variant:"primary",disabled:a,onClick:x,children:a?Yke():Gke()})]})]}),r.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:QTe()}),f.jsxs("div",{className:V0,children:[r.github.url&&f.jsxs(Qv,{href:r.github.url,target:"_blank",rel:"noreferrer",children:[Q7()," ",f.jsx(jc,{size:12})]}),f.jsx(Ue,{disabled:a,onClick:()=>{l(!0),BJe(e.id).then(j=>{s(j.git),t(j.project)}).catch(j=>c(j instanceof Error?j.message:String(j))).finally(()=>l(!1))},children:a?Jke():Pke()})]})]})]}),f.jsx(s_t,{}),n&&f.jsx("div",{className:"error",children:w(n)}),o&&f.jsx("div",{className:"error",children:w(o)})]}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",Dl()]}):f.jsx("div",{className:Ia,children:f.jsx("p",{className:ms,children:bOe()})}),d&&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:()=>C(!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:j=>j.stopPropagation(),children:[f.jsx("h2",{id:"github-default-title",children:mDe()}),f.jsx("p",{children:v$e()}),g&&f.jsx("div",{className:"error",children:g}),f.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[f.jsx(Ue,{disabled:h,onClick:()=>C(!1),children:KLe()}),f.jsx(Ue,{variant:"primary",disabled:h,onClick:()=>C(!0),children:h?aa():UNe()})]})]})})]})}const a_t={env:CVe,config:jVe,xdg:RVe,default:yVe},tv={preparing:hVe,copying:UGe,verifying:IVe,finalizing:WGe},o_t=e=>{var n;return((n=tv[e])==null?void 0:n.call(tv))??e};function l_t(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[l,o]=M.useState(!1),[c,d]=M.useState(null),[_,h]=M.useState({kind:"idle"}),[m,g]=M.useState(null),S=()=>oJe().then(C=>{n(C),a(j=>j||C.current)}).catch(C=>r(C instanceof Error?C.message:String(C)));M.useEffect(()=>{S()},[]),M.useEffect(()=>Cet(C=>{C.type==="progress"?h(j=>{const N=j.kind==="moving"?j.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||N}}):C.type==="done"?(h({kind:"done",oldPathLeft:C.oldPathLeft}),d(null),a(""),S()):C.type==="error"&&h({kind:"error",message:C.error})}),[]);const k=(e==null?void 0:e.source)==="env",v=s.trim(),b=e!==null&&v===e.current;async function w(){if(!(l||!v)){o(!0),g(null),d(null);try{d(await lJe(v))}catch(C){g(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function x(C){if(C.preventDefault(),!(_.kind==="moving"||!v||b)&&(g(null),!!window.confirm(tVe({path:we(v)})))){h({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await cJe(v)}catch(j){h({kind:"idle"}),g(j instanceof Error?j.message:String(j))}}}return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:GBe()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:WPe()}),t?f.jsx("div",{className:Ia,children:f.jsx("div",{className:"error",children:t})}):e?f.jsxs("div",{className:Ia,children:[f.jsx("div",{className:"settings-card-head mb-3",children:f.jsx("h3",{children:jTe()})}),f.jsxs("div",{className:id,children:[f.jsx("span",{className:"k",children:hTe()}),f.jsx("span",{className:"v",children:e.current}),f.jsx("span",{className:"k",children:Rx()}),f.jsx("span",{className:"v",children:a_t[e.source]()})]}),!k&&f.jsxs("form",{className:$h,onSubmit:x,children:[f.jsxs("label",{children:[HDe(),f.jsx("input",{className:"text-sm",type:"text",value:s,onChange:C=>{a(C.target.value),d(null)},placeholder:"/absolute/path/to/openresearch",autoComplete:"off",spellCheck:!1,disabled:_.kind==="moving"})]}),c&&!c.error&&c.ok&&f.jsxs("p",{className:ms,children:[OIe()," ",Ta(c.treeBytes??0),c.freeBytes!=null&&` — ${ZGe({size:we(Ta(c.freeBytes))})}`,c.sameFilesystem?gVe():"","."]}),c&&c.ok===!1&&c.error&&f.jsx("div",{className:"error",children:c.error}),m&&f.jsx("div",{className:"error",children:m}),_.kind==="moving"&&f.jsx(cT,{value:_.copied,max:_.total,label:o_t(_.phase),caption:_.total>0?f.jsxs("span",{className:"text-sm",children:[Ta(_.copied)," / ",Ta(_.total)]}):void 0}),_.kind==="done"&&f.jsxs("p",{className:ms,children:[MDe(),_.oldPathLeft&&f.jsxs(f.Fragment,{children:[" ",yje({path:we(_.oldPathLeft)})]})]}),_.kind==="error"&&f.jsxs("div",{className:"error",children:[zDe()," ",_.message]}),f.jsxs("div",{className:"actions",children:[f.jsx(Ue,{type:"button",onClick:w,disabled:l||!v||b||_.kind==="moving",children:l?Fp():e9e()}),f.jsx(Ue,{variant:"primary",type:"submit",disabled:!v||b||_.kind==="moving",children:_.kind==="moving"?cVe():iVe()})]})]})]}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",Dl()]})]})}const B2=e=>e==="running"||e==="starting";function c_t(e){return B2(e.status)?dp(Date.now()-e.createdAt):e.endedAt?dp(e.endedAt-e.createdAt):"—"}function NT({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:eAe()}),f.jsx("th",{children:Gp()}),f.jsx("th",{children:DBe()}),f.jsx("th",{children:hBe()})]})}),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(d4,{backend:t.backend}),r&&f.jsx(Qp,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:Z7(),"aria-label":Z7(),onClick:a=>a.stopPropagation(),children:f.jsx(jc,{size:12})})]})}),f.jsx("td",{children:f.jsx(ko,{status:Fi(t)})}),f.jsx("td",{children:La(t.createdAt)}),f.jsx("td",{children:c_t(t)})]},t.id)})})]})})}function u_t({projectId:e,onViewHistory:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[l,o]=M.useState(!1),[,c]=M.useState(0);M.useEffect(()=>{const g=setInterval(()=>c(S=>S+1),3e4);return()=>clearInterval(g)},[]);const d=()=>{if(!e){r([]);return}o(!0),Px(e).then(g=>{r(g),a(null)}).catch(g=>{a(g instanceof Error?g.message:String(g)),r(S=>S??[])}).finally(()=>o(!1))};M.useEffect(()=>d(),[e]);const _=(g,S)=>S.createdAt-g.createdAt,h=t==null?void 0:t.filter(g=>B2(g.status)).sort(_),m=t==null?void 0:t.filter(g=>!B2(g.status)).sort(_);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:[cBe(),h&&h.length>0&&f.jsx("span",{className:"count-badge",children:h.length})]})}),f.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[f.jsxs(Ue,{size:"small",onClick:d,disabled:l,children:[f.jsx(hd,{size:12,className:l?"animate-[spin_0.9s_linear_infinite]":""})," ",qp()]}),f.jsx(Ue,{size:"small",onClick:n,children:m!=null&&m.length?tpe({count:Vt(m.length)}):Z0e()})]})]}),s&&f.jsx("div",{className:"error",children:s}),!h||!m?f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",Dl()]}):f.jsx(NT,{instances:h,emptyLabel:e?$0e():W0e()})]})}function d_t({projectId:e,onBack:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[l,o]=M.useState(!1),[,c]=M.useState(0);M.useEffect(()=>{const _=setInterval(()=>c(h=>h+1),3e4);return()=>clearInterval(_)},[]);const d=()=>{if(!e){r([]);return}o(!0),Px(e).then(_=>{r(_.sort((h,m)=>m.createdAt-h.createdAt)),a(null)}).catch(_=>{a(_ instanceof Error?_.message:String(_)),r(h=>h??[])}).finally(()=>o(!1))};return M.useEffect(d,[e]),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(qf,{size:14})," ",QE()]}),f.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[f.jsx("h1",{children:dRe()}),f.jsxs(Ue,{size:"small",onClick:d,disabled:l,children:[f.jsx(hd,{size:12,className:l?"animate-[spin_0.9s_linear_infinite]":""})," ",qp()]})]}),s&&f.jsx("div",{className:"error",children:s}),t?f.jsx(NT,{instances:t,emptyLabel:e?L0e():U0e()}):f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",Dl()]})]})}const zT=["projects","harnesses","storage"],f_t=[{id:"compute",label:JE,icon:f.jsx(eZe,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:Ax,icon:f.jsx(Nh,{size:15}),activeTabs:["environment"]},{id:"settings",label:sN,icon:f.jsx(RN,{size:15}),activeTabs:["settings",...zT]}];function h_t(e){return zT.includes(e)}function __t({tab:e,project:n,githubPublicationError:t,onProjectUpdate:r,onSelectTab:s,remote:a=!1}){const l=e==="settings"||h_t(e);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 [&_>_.error]:text-accent-red [&_>_.error]:text-base [&_>_.error]:whitespace-pre-wrap [&_>_.error]:mt-0 [&_>_.error]:mx-0 [&_>_.error]:mb-3",children:[l&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:sN()}),f.jsxs("div",{className:"settings-stack mt-4.5",children:[f.jsx("section",{className:ku,children:f.jsx(Qht,{})}),f.jsx("section",{className:ku,children:f.jsx(r_t,{})}),f.jsx("section",{className:ku,children:f.jsx(yht,{})}),!a&&f.jsx("section",{className:ku,children:f.jsx(l_t,{})}),f.jsx("section",{className:ku,children:f.jsx(t_t,{})}),!a&&f.jsx("section",{className:ku,children:f.jsx(e_t,{})})]})]}),e==="compute"&&f.jsx(Uht,{project:n,onViewHistory:()=>s("instances"),remote:a}),e==="instances"&&f.jsx(d_t,{projectId:n==null?void 0:n.id,onBack:()=>s("compute")}),e==="environment"&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:Ax()}),f.jsx(Xht,{})]}),e==="git"&&f.jsx(i_t,{project:n,publicationError:t,onProjectUpdate:r})]})}function p_t({skills:e,activeIndex:n,onPick:t,onHover:r}){return f.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 min-w-85 max-w-full p-1.5 bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden",children:e.map((s,a)=>f.jsxs("button",{type:"button",className:`skill-item flex flex-col gap-0.5 w-full text-start py-[7px] px-2 rounded-sm [&.active]:bg-surface [&_.skill-name]:text-sm [&_.skill-desc]:text-sm [&_.skill-desc]:text-subtext ${a===n?"active":""}`,onMouseDown:l=>{l.preventDefault(),t(s)},onMouseEnter:()=>r(a),children:[f.jsxs("span",{className:"skill-name flex items-center gap-1.5",children:["/",s.name,s.source!=="command"&&f.jsx(Lt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:fN()})]}),f.jsx("span",{className:"skill-desc",children:s.description})]},s.name))})}const Dk={name:"plan",get description(){return s5e()},source:"command"};function nv(e,n){if(n<0||n>e.length)return null;let t=n;for(;t>0&&!/\s/.test(e[t-1]);)t-=1;if(e[t]!=="/")return null;let r=n;for(;r1&&/[ \t]$/.test(a)&&(a=a.replace(/[ \t]+$/,_=>_.includes(" ")||_.length>=r?_:s));let l=e.slice(n.end);if(!l)l=s;else if(!l.startsWith(` -`)){const _=(c=/^[ \t]+/.exec(l))==null?void 0:c[0];l=_?`${_.length>=r?_:s}${l.slice(_.length)}`:s+l}const o=((d=/^[ \t]+/.exec(l))==null?void 0:d[0].length)??0;return{text:`${a}/${t}${l}`,cursor:a.length+t.length+1+o}}function Ok(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 g_t(e,n){const t=e.filter(r=>r.name.toLowerCase()!==Dk.name);return n?[Dk,...t]:t}function b_t(e,n){if(!n)return null;const t=/(^|\s)\/plan(?=\s|$)/gi;return t.test(e)?{prompt:e.replace(t,"").trim()}:null}function Ik(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const v_t=["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"],rv=new Map;function x_t(e,n){const t=`${n}\0${e}`,r=rv.get(t);if(r)return r;const s=FJe(e,n).catch(a=>{throw rv.delete(t),a});return rv.set(t,s),s}function jT(e,n,t,r,s,a=!1){let l=0;return m_t(e,n).map((o,c)=>{const d=l+o.text.length;l=d;const _=o.text.slice(1).toLowerCase();return o.command&&s?s(o.text,_,d,c):o.command?f.jsxs("span",{className:t,onMouseDown:void 0,children:[f.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.text.slice(1)]},c):a?f.jsx("span",{"aria-hidden":"true",children:o.text},c):f.jsx(M.Fragment,{children:o.text},c)})}function y_t({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:a}){const l=M.useRef(null),o=M.useRef(null),c=M.useRef(null),d=M.useId(),[_,h]=M.useState(!1),[m,g]=M.useState(null),[S,k]=M.useState(!1),[v,b]=M.useState({}),w=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},x=()=>{const N=l.current;if(!N)return;const T=N.getBoundingClientRect(),z=Math.min(420,window.innerWidth-32),D=Math.max(16,Math.min(T.left-4,window.innerWidth-z-16));b(T.top>300?{bottom:window.innerHeight-T.top+12,left:D,width:z}:{left:D,top:T.bottom+12,width:z})},C=()=>{w(),x(),h(!0),!(m!==null||S)&&(k(!0),x_t(n,s).then(g).catch(()=>g(null)).finally(()=>k(!1)))},j=()=>{w(),c.current=window.setTimeout(()=>h(!1),120)};return M.useEffect(()=>()=>w(),[]),M.useEffect(()=>{if(!_)return;const N=()=>x();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[_]),f.jsxs(M.Fragment,{children:[f.jsxs("span",{ref:l,role:"button",tabIndex:0,"aria-controls":d,"aria-expanded":_,"aria-label":gB({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:C,onMouseLeave:j,onFocus:C,onBlur:j,onKeyDown:N=>{var T,z;if(N.key==="Escape"){h(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),C();return}_&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(T=o.current)==null||T.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),_&&(N.key==="ArrowUp"||N.key==="PageUp")&&(N.preventDefault(),(z=o.current)==null||z.scrollBy({top:N.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:N=>{var T,z;N.preventDefault(),(T=a.current)==null||T.focus(),(z=a.current)==null||z.setSelectionRange(t,t),w()},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.jsxs("span",{className:"relative z-1",children:[f.jsx("span",{className:"text-skill-blue-slash",children:"/"}),e.slice(1)]})]}),_&&Bc.createPortal(f.jsxs("div",{id:d,ref:o,role:"dialog","aria-label":YB({name:n}),style:{...v,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:w,onMouseLeave:j,onFocus:w,onBlur:j,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(Lt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:fN()})]}),f.jsx("div",{className:"p-4 text-sm text-text",children:S&&m===null?f.jsx("span",{className:"text-muted",children:UFe()}):f.jsx(Oa,{text:m??r.description})})]}),document.body)]})}function w_t({text:e,isCommand:n}){return f.jsx(f.Fragment,{children:jT(e,n,"skill-chip mx-1 inline-flex items-center rounded-md px-2 py-1 font-medium text-skill-blue transition-colors hover:bg-skill-blue-subtle")})}function S_t({text:e,isCommand:n,skills:t,projectId:r,textareaRef:s}){const a=M.useRef(null);return M.useLayoutEffect(()=>{const l=s.current,o=a.current;if(!l||!o)return;const c=()=>{const _=getComputedStyle(l);for(const h of v_t)o.style.setProperty(h,_.getPropertyValue(h));o.style.width=`${l.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};c();const d=new ResizeObserver(c);return d.observe(l),()=>d.disconnect()},[e,s]),M.useLayoutEffect(()=>{const l=s.current;if(!l)return;const o=()=>{a.current&&(a.current.scrollTop=l.scrollTop)};return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)},[s,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:[jT(e,n,"",void 0,(l,o,c,d)=>{const _=t.find(h=>h.name===o);return _&&_.source!=="command"?f.jsx(y_t,{label:l,name:o,end:c,skill:_,projectId:r,textareaRef:s},`${d}:${c}`):f.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[f.jsx("span",{className:"text-skill-blue-slash",children:"/"}),l.slice(1)]},`${d}:${c}`)},!0),"​"]})}function $2({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"})]})}function AT({host:e,preview:n,currentClientAttached:t,stopping:r,onClose:s,onConfirm:a}){const l=M.useRef(null),o=Math.max(0,n.attachmentCount-(t?1:0)),c=[];return n.activeTurnCount>0&&c.push(n.activeTurnCount===1?ake():bke({count:Vt(n.activeTurnCount)})),n.pendingPermissionCount>0&&c.push(n.pendingPermissionCount===1?q8e():y8e({count:Vt(n.pendingPermissionCount)})),o>0&&c.push(o===1?Q8e():uke({count:Vt(o)})),n.queuedMessageCount>0&&c.push(n.queuedMessageCount===1?nke():_ke({count:Vt(n.queuedMessageCount)})),n.activeRunCount>0&&c.push(n.activeRunCount===1?K8e():R8e({count:Vt(n.activeRunCount)})),_4(l,s),Bc.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:d=>{!r&&d.target===d.currentTarget&&s()},children:f.jsxs("div",{ref:l,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:j8e({host:we(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:H8e()}),f.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:c.map(d=>f.jsx("li",{children:d},d))})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx(Ue,{disabled:r,onClick:s,children:Eh()}),f.jsx(Ue,{variant:"danger",disabled:r,onClick:a,children:r?wke():C8e()})]})]})}),document.body)}function Af({runtime:e,corner:n=!1}){const[t,r]=M.useState(!1),[s,a]=M.useState(!1),[l,o]=M.useState(!1),[c,d]=M.useState(null),_=Va();async function h(){if(c){o(!0);try{await KN(c),d(null)}catch(m){d(null),Ms(m instanceof Error?m.message:String(m),"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:_.ref,children:[_.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:d7e({host:we(e.session.host),user:we(e.session.user??"")})}),f.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",we(e.session.version??"…")]})]}),f.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[f.jsx(Mr,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await VN(),_.setOpen(!1)}catch(m){Ms(m instanceof Error?m.message:String(m),"error")}finally{r(!1)}},children:t?o7e():Ov()}),f.jsx(Ez,{content:FSe(),className:"me-2 shrink-0 text-subtext",children:f.jsx(NN,{size:15})})]}),f.jsx(Mr,{danger:!0,disabled:s,onClick:async()=>{a(!0);try{d(await WN()),_.setOpen(!1)}catch(m){Ms(m instanceof Error?m.message:String(m),"error")}finally{a(!1)}},children:GE()})]}),n?f.jsxs(Ue,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":_.open,onClick:()=>_.setOpen(m=>!m),children:[f.jsx($2,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:ab({host:we(e.session.host)})})]}):f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Gt,{size:"small","aria-label":ab({host:we(e.session.host)}),"aria-haspopup":"menu","aria-expanded":_.open,onClick:()=>_.setOpen(m=>!m),children:f.jsx($2,{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:ab({host:we(e.session.host)})}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",we(e.session.version??"…")]})]})]})]}),c&&f.jsx(AT,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:l,onClose:()=>{l||d(null)},onConfirm:()=>void h()})]})}function k_t(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const H2=6.5,Bk=2*Math.PI*H2;function C_t({usage:e}){return!e||e.usedTokens<=0?null:f.jsx(E_t,{usage:e})}function E_t({usage:e}){const{open:n,setOpen:t,ref:r}=Va(),{usedTokens:s,contextWindow:a}=e,l=a&&a>0?Math.min(100,Math.round(s/a*100)):null,o=l===null?"var(--accent)":k_t(l),c=l===null?"":new Intl.NumberFormat(E(),{style:"percent"}).format(l/100);return f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[f.jsx("button",{type:"button",className:`${l===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:Qoe(),onClick:()=>t(d=>!d),children:l===null?s0(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:H2,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),f.jsx("circle",{cx:"8",cy:"8",r:H2,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${Bk*Math.max(l,2)/100} ${Bk}`,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:Koe()}),f.jsx("span",{className:"context-meter-value text-text tabular-nums",children:l===null?nle({value:we(s0(s))}):ale({used:we(s0(s)),total:we(s0(a)),percent:we(c)})})]}),l!==null&&f.jsx(cT,{value:s,max:a,fillColor:o})]})]})}const Np="!";function $k(e){return e.startsWith(Np)?e.slice(Np.length).trim():null}function N_t(e){return e.startsWith(Np)?e.slice(Np.length):e}const g4="orx:demo-read-sessions";function TT(){try{const e=JSON.parse(sessionStorage.getItem(g4)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function z_t(e){try{const n=TT();n.add(e),sessionStorage.setItem(g4,JSON.stringify([...n]))}catch{}}function j_t(){try{sessionStorage.removeItem(g4)}catch{}}function A_t(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 T_t(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 M_t(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 P2(e,n){return n?` - -\\[ -${e} -\\] - -`:`\\(${e}\\)`}function R_t(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 D_t(e,n){if(e.length===0)return"";const t=Math.max(...e.map(l=>l.length)),r=l=>`| ${Array.from({length:t},(o,c)=>l[c]??"").join(" | ")} |`,s=n?e[0]:Array.from({length:t},()=>""),a=n?e.slice(1):e;return[r(s),r(Array.from({length:t},()=>"---")),...a.map(r)].join(` -`)}function L_t(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function O_t(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function I_t(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const B_t={header:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-base font-semibold text-text",list:"text-sm font-medium text-text"};function nh({variant:e="list",className:n,...t}){return f.jsx("span",{className:os("title",B_t[e],n),...t})}const MT="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",b4="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",jl=256,RT=1024,DT=2e4,sv=8,y0="chat-annotations";function bc(e){return e instanceof Element?e:e.parentElement}function Hk(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function iv(e,n){return Hk(e).compareBoundaryPoints(Range.START_TO_START,Hk(n))<0}function Pk(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const $_t=new Set(["A","B","CODE","EM","I","STRONG"]);function H_t(e,n){var s,a;const t=bc(e.endContainer);if(Array.from(n.childNodes).every(l=>l.nodeType===Node.TEXT_NODE)){let l=bc(e.startContainer);for(;l&&l.matches(".md *")&&l.contains(t);){if($_t.has(l.tagName)){const o=l.cloneNode(!1);o instanceof HTMLElement&&(o.replaceChildren(...Array.from(n.childNodes)),n.replaceChildren(o))}l=l.parentElement}}const r=(s=bc(e.startContainer))==null?void 0:s.closest("pre");if(r!=null&&r.contains(t)){const l=(a=r.querySelector("code"))==null?void 0:a.cloneNode(!1),o=r.cloneNode(!1);o instanceof HTMLElement&&l instanceof HTMLElement&&(l.replaceChildren(...Array.from(n.childNodes)),o.replaceChildren(l),n.replaceChildren(o))}}function P_t(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 F_t(e,n){const t=document.createElement("div"),r={container:e.endContainer,offset:e.endOffset};let s={container:e.startContainer,offset:e.startOffset};const a=Array.from(n.querySelectorAll(".katex")).filter(l=>e.intersectsNode(l));for(const l of a){const o=l.closest(".katex-display")??l,c=document.createRange();c.selectNode(o);const d={container:c.startContainer,offset:c.startOffset},_={container:c.endContainer,offset:c.endOffset};if(iv(s,d)&&t.append(Pk(s,d)),t.append(o.cloneNode(!0)),s=_,!iv(s,r))break}return a.length===0?t.append(e.cloneContents()):iv(s,r)&&t.append(Pk(s,r)),H_t(e,t),P_t(t),t}function U_t(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>rh(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` - -${D_t(n,!!e.querySelector("tr:first-child th"))} - -`:""}function LT(e){const n=e.tagName==="OL",t=e.getAttribute("start"),r=t===null?1:Number(t);let s=Number.isFinite(r)?r:1;const a=[];for(const l of Array.from(e.children).filter(o=>o instanceof HTMLElement&&o.tagName==="LI")){const o=l.getAttribute("value"),c=o===null?s:Number(o),d=Number.isFinite(c)?c:s;s=d+1;const _=Array.from(l.childNodes).map(h=>h instanceof HTMLElement&&h.matches("UL, OL")?` -${LT(h).trim()} -`:rh(h)).join("").trim();a.push(R_t(n?`${d}.`:"-",_))}return` - -${a.join(` -`)} - -`}function rh(e){var r,s,a,l,o;if(e.nodeType===Node.TEXT_NODE)return A_t(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(rh).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?P2(c,!0):""}if(e.matches(".katex")){const c=(l=(a=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:l.trim();return c?P2(c,!1):""}if(e.tagName==="BR")return` -`;if(e.tagName==="TABLE")return U_t(e);if(e.matches("UL, OL"))return LT(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return T_t(e.textContent??"");if(e.tagName==="PRE")return M_t(e.textContent??"");const n=Array.from(e.childNodes).map(rh).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=L_t(e.tagName,n);return t?` - -${t} - -`:e.matches("P, DIV, UL, OL, TABLE")?` - -${n.trim()} - -`:n}function q_t(e,n){return rh(e).replace(/\r\n?/g,` -`).replace(/[ \t]+\n/g,` -`).replace(/\n{3,}/g,` - -`).trim()||n}function Fk(e){return e.normalize("NFKC").replace(/[\s\u200B-\u200D\u2060\uFEFF]/g,"").toLowerCase()}function G_t(e,n){var s,a,l,o;if(!O_t(e))return;const t=Fk(e);if(t.length<8)return;let r;for(const c of n.querySelectorAll(".msg-assistant > .md .katex")){const _=[(s=c.querySelector(".katex-mathml"))==null?void 0:s.textContent,(a=c.querySelector(".katex-html"))==null?void 0:a.textContent,c.textContent].filter(S=>!!S).map(Fk).find(S=>I_t(S,t));if(!_)continue;const h=(o=(l=c.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:l.textContent)==null?void 0:o.trim();if(!h)continue;const m=!!c.closest(".katex-display"),g={markdown:P2(h,m).trim(),delta:Math.abs(_.length-t.length)};(!r||g.deltaz.width>0&&z.height>0),S=g[0]??t.getBoundingClientRect(),k=g.filter(z=>z.topS.top),v=k.length>0?k:[S],b=Math.min(...v.map(z=>z.left)),w=Math.max(...v.map(z=>z.right)),x=Math.min(...v.map(z=>z.top)),C=Math.max(...v.map(z=>z.bottom)),j=34,N=74,T=x>=j+sv?x-j-sv:C+sv;return{text:q_t(m,h),range:t.cloneRange(),x:Math.min(window.innerWidth-N,Math.max(N,b+(w-b)/2)),top:T}}function W_t(e,n){const[t,r]=M.useState(null),s=M.useRef(!1),a=M.useCallback(()=>{const c=e.current;r(c?V_t(c):null)},[e]);M.useEffect(()=>{let c=null;const d=()=>{s.current||a()},_=m=>{const g=e.current,S=m.target;!m.isPrimary||m.button!==0||!g||!(S instanceof Node)||!g.contains(S)||(s.current=!0,r(null))},h=m=>{!m.isPrimary||!s.current||(s.current=!1,c=window.requestAnimationFrame(a))};return document.addEventListener("selectionchange",d),document.addEventListener("pointerdown",_,!0),window.addEventListener("pointerup",h,!0),window.addEventListener("pointercancel",h,!0),()=>{document.removeEventListener("selectionchange",d),document.removeEventListener("pointerdown",_,!0),window.removeEventListener("pointerup",h,!0),window.removeEventListener("pointercancel",h,!0),c!==null&&window.cancelAnimationFrame(c),s.current=!1}},[a]),M.useEffect(()=>{if(!t)return;const c=d=>{const _=d.target;_ instanceof Element&&_.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",c,!0),window.addEventListener("resize",a),()=>{document.removeEventListener("mousedown",c,!0),window.removeEventListener("resize",a)}},[t,a]);const l=M.useCallback(()=>{var c;t&&(n({text:t.text,range:t.range}),r(null),(c=window.getSelection())==null||c.removeAllRanges())},[t,n]),o=M.useCallback(()=>r(null),[]);return{action:t,add:l,dismiss:o}}function K_t(e){M.useLayoutEffect(()=>{if(!("highlights"in CSS)||typeof Highlight>"u")return;const n=e.flatMap(r=>r.range?[r.range]:[]);if(n.length===0){CSS.highlights.delete(y0);return}const t=new Highlight(...n);return CSS.highlights.set(y0,t),()=>{CSS.highlights.get(y0)===t&&CSS.highlights.delete(y0)}},[e])}function Y_t({annotation:e}){const n=M.useRef(null),[t,r]=M.useState();return M.useLayoutEffect(()=>{var a;const s=(a=n.current)==null?void 0:a.closest(".chat-thread-inner");r(s?G_t(e.text,s):void 0)},[e.id,e.text]),f.jsx("div",{ref:n,children:f.jsx(Oa,{text:t??e.text})})}function X_t({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:See()}),f.jsx(Y_t,{annotation:t})]}),n&&f.jsx(Gt,{type:"button",size:"small","data-annotation-remove":!0,title:YJ(),"aria-label":yB({number:Vt(r+1)}),onClick:()=>n(t.id),children:f.jsx(Ur,{size:13})})]},t.id))}function v4({annotations:e,variant:n,onClear:t,onRemove:r}){const s=M.useRef(null),a=M.useRef(null),l=M.useId(),o=Va(s),c=n==="sent",d=M.useRef(null),_=()=>{d.current!==null&&window.clearTimeout(d.current),d.current=null,o.setOpen(!0)},h=()=>{d.current=window.setTimeout(()=>{var S;(S=a.current)!=null&&S.contains(document.activeElement)||o.setOpen(!1)},160)},m=()=>{const S=c||!o.open;o.setOpen(S),S&&window.requestAnimationFrame(()=>{var k;return(k=a.current)==null?void 0:k.focus()})},g=S=>{r==null||r(S),window.requestAnimationFrame(()=>{var v,b;(b=((v=a.current)==null?void 0:v.querySelector("button[data-annotation-remove]"))??a.current??s.current)==null||b.focus()})};return M.useEffect(()=>()=>{d.current!==null&&window.clearTimeout(d.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?_:void 0,onMouseLeave:c?h: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":l,onClick:m,children:[f.jsx(zN,{size:c?13:14,className:"text-muted"}),e.length===1?EY():OW({count:Vt(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:K6(),"aria-label":K6(),onClick:t,children:f.jsx(Ur,{size:13})})]}),o.open&&f.jsx("div",{id:l,ref:a,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":vee(),children:f.jsx(X_t,{annotations:e,onRemove:r?g:void 0})})]})}function Z_t(e){return f.jsx(v4,{...e,variant:"composer"})}const Q_t=["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(" "),Uk=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),J_t=["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(" "),e0t=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),F2="prompt-actions flex flex-wrap gap-2",kc="local-",OT="bash",qk=[];function Gk(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(kc)),n]}function t0t(e,n){switch(n.type){case"reset":return{messagesBySession:{},busySessions:new Set,queuedBySession:{},activeLeafBySession:{}};case"seed":return n.onlyIfAbsent&&n.sessionId in e.messagesBySession?e:{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:n.messages},queuedBySession:{...e.queuedBySession,[n.sessionId]:n.queued??[]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.activeLeafId??null}};case"upsertMessage":{const t=e.messagesBySession[n.sessionId]??[],r=t.some(o=>o.id===n.message.id),s=e.activeLeafBySession[n.sessionId]??null,a=n.message.role==="user"&&s!==null&&s.startsWith(kc),l=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:Gk(t,n.message)},activeLeafBySession:r&&!a&&!l?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.message.id}}}case"localError":{const t=e.messagesBySession[n.sessionId]??[],r={id:`${kc}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(a=>a.id===n.id),s={id:n.id,role:"user",parts:[{id:"p0",type:"tool",tool:OT,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?Gk(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((a,l)=>r.push({id:`img${l}`,type:"image",text:a.url,name:a.name})),n.annotations.forEach((a,l)=>r.push({id:`annotation${l}`,type:"annotation",text:a.text}));const s={id:`${kc}${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"busy":{const t=new Set(e.busySessions);return n.busy?t.add(n.sessionId):t.delete(n.sessionId),{...e,busySessions:t}}case"seedBusy":{const t=new Set(n.sessions),r=new Set(n.known);for(const s of e.busySessions)r.has(s)||t.add(s);return{...e,busySessions:t}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[n.sessionId]:n.items}};case"forget":{const t={...e.messagesBySession};delete t[n.sessionId];const r=new Set(e.busySessions);r.delete(n.sessionId);const s={...e.queuedBySession};delete s[n.sessionId];const a={...e.activeLeafBySession};return delete a[n.sessionId],{messagesBySession:t,busySessions:r,queuedBySession:s,activeLeafBySession:a}}}}function n0t(e){if(!e)return"";const n=Math.max(0,Math.floor((Date.now()-e)/1e3));if(n<60)return V6e();const t=Math.floor(n/60);if(t<60)return F6e({value:Vt(t)});const r=Math.floor(t/60);return r<24?B6e({value:Vt(r)}):D6e({value:Vt(Math.floor(r/24))})}function _c(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function av(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 r0t(e,n){return/^orx-[a-z0-9]+(?:-[a-z0-9]+)*$/.test(n)?e==="Skill"?`.claude/skills/${n}/SKILL.md`:e==="skill"?`.opencode/skills/${n}/SKILL.md`:null:null}function ps(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function ov(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 a=s[t];if(typeof a=="string"&&a)return a}return null}function lv(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=jl));s++);return r}function s0t(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 Fu(...e){const n=new Set,t=new RegExp(`^${Cc}$`,"i");let r=0;for(const s of e)for(const a of s){if(n.size>=jl||r++>=RT)return[...n];t.test(a)&&n.add(a.toLowerCase())}return[...n]}function km(e){return e.replace(/^Exit code \d+\s*/i,"").split(` -`).filter(n=>!/^\s*\[orx-(?:run|experiment):[^\]]+\]\s*$/.test(n)).join(` -`).trim()}function i0t(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 a0t(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=Iet(r),IT(r)}function IT(e){return l0t(e).replace(/[\t\r ]+/g," ").trim()}function o0t(e){let n=null,t=!1;for(let r=0;r!a.startsWith("-")&&a.includes(":"));if(!n)return null;const t=n.indexOf(":"),r=n.slice(0,t),s=n.slice(t+1);return r&&$T(s)?{ref:r,path:s}:null}function d0t(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 Vk(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 a of n.split("/"))if(!(!a||a===".")){if(a===".."){r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(a);continue}r.push(a)}return`${t?"/":""}${r.join("/")}`||(t?"/":null)}function f0t(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let a=0;a!d.startsWith("-"));if(!o)return null;const c=Vk(s,o);if(!c)return null;s=c}return s?Vk(s,e):e}const za="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",h0t=new RegExp(`\\bchat_(${za})\\b`,"gi"),Cc=`(?:${za}|[0-9a-f]{8})`;function Uu(e){const n=[];let t="",r="",s=null,a=!1;const l=()=>{(t.trim()||r.trim())&&n.push({raw:t.trim(),code:r.trim()}),t="",r=""},o=d=>{let _=1,h=null,m=!1;for(let g=d;g{let _=!1;for(let h=d;hHet(t.raw,n))}function $i(e,n){return Cm(e,n).length>0}function _0t(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,DT).matchAll(h0t))if(n.add(t[0].toLowerCase()),n.size>=jl)break;return[...n]}function U2(e,n){if(!e)return[];const t=new Set,r=e.slice(0,DT),s=n==="runs"?[new RegExp(`/runs/(${za})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${za})`,"gi"),new RegExp(`^\\s*RUN\\s+(${za})\\b`,"gim"),new RegExp(`={3,}\\s*(${za})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${za})`,"gi"),new RegExp(`^\\s*id:\\s*(${za})`,"gim"),new RegExp(`={3,}\\s*(${za})\\s*={3,}`,"gi")];for(const l of s)for(const o of r.matchAll(l))if(t.add(o[1]),t.size>=jl)return[...t];const a=new RegExp(`^\\s*(${za})(?:\\s|$)`,"gim");for(const l of r.matchAll(a))if(t.add(l[1]),t.size>=jl)break;return[...t]}function PT(e,n){let t=0;return n.map(r=>{const s=e.indexOf(r.raw,t),a=s===-1?e.indexOf(r.raw):s;return t=Math.max(t,a+r.raw.length),{invocation:r,offset:Math.max(0,a)}})}function FT(e,n,t,r){const s=new RegExp(`(?:^|[\\s;])(?:export\\s+)?${n}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s;]+))`,"gi");let a="";for(const l of e.matchAll(s)){if((l.index??0)>=t)break;a=l[1]??l[2]??l[3]??""}return[...a.matchAll(new RegExp(r,"gi"))].map(l=>l[0])}function UT(e,n,t,r){const s=new RegExp(`\\bfor\\s+${n}\\s+in\\s+([\\s\\S]*?)(?:;|\\n)\\s*do\\b`,"gi");let a="";for(const l of e.matchAll(s)){const o=l.index??0;if(o>=t)break;const c=o+l[0].length;c<=t&&/\bdone\b/.test(e.slice(c,t))||(a=l[1])}return/\$\(|`/.test(a)?[]:[...a.matchAll(new RegExp(r,"gi"))].map(l=>l[0])}function p0t(e,n,t=[],r=[]){const s=Cm(e,"logs"),a=new Set;if(s.length===0){if(!$i(e,"logs"))return[];const o=t.length>0?[]:U2(n,"runs");for(const c of t.length>0?t:o.length>0?o:r)if(a.add(c),a.size>=jl)break;return Fu([...a])}let l=!1;for(const{invocation:o,offset:c}of PT(e,s)){const d=Ju(o.raw);if((d==null?void 0:d[0])!=="logs")continue;const _=d.slice(1);let h=null;for(let v=0;v<_.length;v++){const b=_[v];if(b!=="--head"){if(b==="--bytes"||b==="--range"){v++;continue}if(!(b.startsWith("--bytes=")||b.startsWith("--range="))){h=b;break}}}if(!h){l=!0;continue}if(new RegExp(`^${Cc}$`,"i").test(h)){a.add(h);continue}const m=/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(h);if(!m){l=!0;continue}const g=m[1],S=FT(e,g,c,Cc);for(const v of S)a.add(v);const k=UT(e,g,c,Cc);for(const v of k)a.add(v);S.length===0&&k.length===0&&(l=!0)}if(a.size===0||l){const o=t.length>0?[]:U2(n,"runs"),c=t.length>0?t:o.length>0?o:r;for(const d of c)if(a.add(d),a.size>=jl)break}return Fu([...a])}function Cu(e,n,t=[],r=[]){const s=Cm(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const a=new Set;let l=!1;for(const{invocation:o,offset:c}of PT(e,s)){const d=Ju(o.raw),_=(d==null?void 0:d[0])==="exp"&&(d[1]==="status"||d[1]==="desc")?d[2]:null;let h=!1;_&&new RegExp(`^${Cc}$`,"i").test(_)&&(a.add(_),h=!0);const m=_?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(_):null;if(m){const g=m[1],S=FT(e,g,c,Cc);if(S.length>0){for(const v of S)a.add(v);h=!0}const k=UT(e,g,c,Cc);for(const v of k)a.add(v);k.length>0&&(h=!0)}h||(l=!0)}if(a.size===0||l){const o=t.length>0?[]:U2(n,"experiments"),c=t.length>0?t:o.length>0?o:r;for(const d of c)if(a.add(d),a.size>=jl)break}return Fu([...a])}function Al(e){var b,w,x,C;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)):{},a={...t,...s},l=ps(a,"command","cmd"),o=s0t(a,"commandArgv"),c=((w=e.state)==null?void 0:w.output)||((x=e.state)==null?void 0:x.error),d=Fu(lv(a,"targetIds")),_=Fu(lv(a,"runTargetIds")),h=Fu(lv(a,"experimentTargetIds")),m=ps(a,"filePath","file_path","notebookPath","notebook_path","path"),g=ps(a,"description"),S=n.toLowerCase().split(/(?::|\.|__)+/),k=S.at(-1)??n.toLowerCase();if(k==="run"&&S.includes("web")){const j=ov(a,"search_query","q"),N=ov(a,"image_query","q"),T=ov(a,"find","pattern");return j?{kind:"web",label:A6({query:j})}:N?{kind:"web",label:fF({query:N})}:T?{kind:"web",label:AF({pattern:T})}:Array.isArray(a.open)?{kind:"web",label:KQ()}:Array.isArray(a.weather)?{kind:"web",label:fZ()}:Array.isArray(a.finance)?{kind:"web",label:sZ()}:Array.isArray(a.sports)?{kind:"web",label:lZ()}:Array.isArray(a.time)?{kind:"web",label:eZ()}:{kind:"web",label:V6()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["subagentactivity","subagent"]]).get(k)??k){case"bash":{if(!l&&!(o!=null&&o.length))return{kind:"command",label:yJ()};const j=a0t(l??(o==null?void 0:o.join(" "))??""),N=Uu(j);let T=N.map(ae=>ae.raw);if(o!=null&&o.length){const ae=$et(o);T=ae===null?[o]:Uu(IT(ae)).map(re=>re.raw)}let z=null;for(const ae of T)if(z=Pet(ae),z)break;const D=T.some(ae=>{const re=Ju(ae);return re!==null&&re[0]!=="discover"&&re[0]!=="paper"});if(z&&!D){const ae=z.kind==="discover"?{keyword:KP(),embedding:QP(),openalex:SF(),biorxiv:nF()}[z.strategy]:null,re=z.kind==="discover"?z.query?iH({activity:ae??j6(),query:z.query}):ae??j6():z.id?hf({target:we(z.id)}):YH();return{kind:z.kind==="paper"?"read":"search",label:re,litCall:z}}if($i(j,"agent\\s+spawn"))return{kind:"agent",label:AZ(),spawnedSessionIds:_0t(c),litCall:z??void 0};const O=N.map(ae=>HT(ae.raw)),H=$i(j,"exp\\s+status"),P=$i(j,"exp\\s+desc"),F=Cm(j,"exp\\s+desc").some(ae=>(Ju(ae.raw)??[]).some(q=>q==="--set"||q.startsWith("--set=")||q==="--stdin")),W=F?sU():GH(),Z=F?p$():jP();if($i(j,"logs")){const ae=p0t(j,c,_,d);return{kind:"project",label:ae.length===1?yP():CP(),runIds:ae,litCall:z??void 0}}if($i(j,"exp\\s+run"))return{kind:"project",label:Hee(),litCall:z??void 0};if($i(j,"exp\\s+wait"))return{kind:"project",label:xte(),litCall:z??void 0};if($i(j,"exp\\s+cancel"))return{kind:"project",label:LX(),litCall:z??void 0};const G=$i(j,"project\\s+view");if(G&&H&&P)return{kind:"project",label:Z,experimentIds:Cu(j,c,h,d),litCall:z??void 0};if(G&&P)return{kind:"project",label:W,experimentIds:Cu(j,c,h,d),litCall:z??void 0};if(G&&H)return{kind:"project",label:W6(),experimentIds:Cu(j,c,h,d),litCall:z??void 0};if(G)return{kind:"project",label:IJ(),litCall:z??void 0};if(H&&P)return{kind:"project",label:Z,experimentIds:Cu(j,c,h,d),litCall:z??void 0};if(H)return{kind:"project",label:W6(),experimentIds:Cu(j,c,h,d),litCall:z??void 0};if(P)return{kind:"project",label:W,experimentIds:Cu(j,c,h,d),litCall:z??void 0};if($i(j,"runs?"))return{kind:"project",label:jQ(),litCall:z??void 0};if($i(j,"projects"))return{kind:"project",label:RQ(),litCall:z??void 0};if($i(j,"compute"))return{kind:"project",label:UX(),litCall:z??void 0};const X=O.map(u0t).find(ae=>ae!=null);if(X){const ae=av(X.path);return{kind:ae?"skill":"read",label:ae?Q1({name:we(ae)}):hf({target:we(_c(X.path))}),filePath:X.path,fileRef:X.ref,labelTarget:ae?`${ae} skill`:_c(X.path)}}const J=O.findIndex(ae=>ae!=null&&["sed","cat","head","tail"].includes(ae.name)),$=J>=0?O[J]:null,L=$?c0t($):null,B=L?f0t(L,N,J,ps(a,"cwd","workdir")):null;if(L&&B){const ae=av(B);return{kind:ae?"skill":"read",label:ae?Q1({name:we(ae)}):hf({target:we(_c(L))}),filePath:B,labelTarget:ae?`${ae} skill`:_c(L)}}if(O.some(ae=>(ae==null?void 0:ae.name)==="find"||(ae==null?void 0:ae.name)==="ls"||(ae==null?void 0:ae.name)==="rg"&&ae.args.includes("--files")))return{kind:"search",label:e7()};const Y=O.findIndex(ae=>(ae==null?void 0:ae.name)==="rg"||(ae==null?void 0:ae.name)==="grep");if(Y>=0){const ae=d0t(N[Y].raw);return{kind:"search",label:ae?eb({pattern:we(ae)}):J1(),searchPattern:ae??void 0}}const V=O.find(ae=>(ae==null?void 0:ae.name)==="git"),se=V==null?void 0:V.args[0];if(se==="grep"){const ae=V==null?void 0:V.args.slice(1).find(re=>!re.startsWith("-"));return{kind:"search",label:ae?eb({pattern:we(ae)}):J1(),searchPattern:ae}}if(se==="status")return{kind:"command",label:XX()};if(se==="diff")return{kind:"command",label:fee()};if(se==="log")return{kind:"command",label:RJ()};const le=ae=>O.some(re=>!re||!["cargo","pnpm","npm","yarn"].includes(re.name)?!1:re.args[0]===ae||re.args[0]==="run"&&re.args[1]===ae);return le("test")?{kind:"command",label:CJ()}:O.some(ae=>(ae==null?void 0:ae.name)==="tsc")||le("typecheck")?{kind:"command",label:mZ()}:le("lint")?{kind:"command",label:$X()}:le("build")?{kind:"command",label:NX()}:{kind:"command",label:RH({command:we(j)})}}case"skill":{const j=ps(a,"skill","name"),N=j?r0t(n,j):null;return{kind:"skill",label:j?yH({name:we(j)}):gH(),filePath:N??void 0,labelTarget:N&&j?`${j} skill`:void 0}}case"read":{const j=m?_c(m):null,N=m?av(m):null;return N?{kind:"skill",label:Q1({name:we(N)}),filePath:m??void 0,labelTarget:`${N} skill`}:j?{kind:"read",label:hf({target:we(j)}),filePath:m??void 0,labelTarget:j}:{kind:"read",label:jJ()}}case"edit":case"write":case"notebookedit":{const j=i0t(a),N=m??(j==null?void 0:j.path)??null,T=N?_c(N):null,z=T?(j==null?void 0:j.type)==="add"?T$({target:we(T)}):(j==null?void 0:j.type)==="delete"?U$({target:we(T)}):Z$({target:we(T)}):null;return T?{kind:"edit",label:z??X6(),filePath:N??void 0,labelTarget:T}:{kind:"edit",label:X6()}}case"grep":{const j=ps(a,"pattern");return{kind:"search",label:j?eb({pattern:we(j)}):J1(),searchPattern:j??void 0}}case"glob":{const j=ps(a,"pattern");return{kind:"search",label:j?cH({pattern:we(j)}):e7()}}case"websearch":{const j=ps(a,"query"),N=ps(a,"url"),T=ps(a,"pattern");return j?{kind:"web",label:A6({query:j})}:T&&N?{kind:"web",label:vF({pattern:T})}:N?{kind:"web",label:jH({target:we(N)})}:{kind:"web",label:g??V6()}}case"webfetch":{const j=ps(a,"url");return{kind:"web",label:j?hf({target:we(j)}):g??iP()}}case"task":return{kind:"agent",label:g??IH()};case"subagent":return{kind:"agent",label:m0t(a)};case"error":return{kind:"command",label:cte()};case"contextcompaction":return{kind:"command",label:S$(),progressLabel:N$()};default:{const j=g??m??l??((C=e.state)==null?void 0:C.title)??"";return{kind:"command",label:j?`${n}: ${j}`:n}}}}function m0t(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 FF();case"sendInput":return BF();case"resumeAgent":return hP();case"wait":return lU();case"closeAgent":return v$()}switch(typeof e.kind=="string"?e.kind:""){case"started":return eU();case"interacted":return r$();case"interrupted":return XF()}return VF()}function zp({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=f.jsx(Nh,{...t});if(e.litCall)r=f.jsx(lz,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=f.jsx(bN,{...t});break;case"read":case"project":r=f.jsx(vN,{...t});break;case"search":r=f.jsx(MN,{...t});break;case"edit":r=f.jsx(Ix,{...t});break;case"web":r=f.jsx(yZe,{...t});break;case"agent":r=f.jsx(Hx,{...t});break}return f.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function cv({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,a]=M.useState(!1),l=M.useRef(null),o=M.useRef(!1);return M.useEffect(()=>{var c,d;!s||!o.current||(o.current=!1,(d=(c=l.current)==null?void 0:c.querySelector("button"))==null||d.focus())},[s]),f.jsxs("span",{className:"tool-target-overflow inline",children:[s&&f.jsx("span",{className:"tool-target-reveal",ref:l,children:e.map((c,d)=>f.jsxs("span",{children:[d>0&&", ",n||t?f.jsx("button",{className:"tool-target",...n?wr(_=>n(c.id,_),{stopPropagation:!0}):{onClick:_=>{_.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?CI({target:r}):GB({count:Vt(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),o.current=!s&&c.detail===0,a(d=>!d)},children:s?NE():Ise({count:Vt(e.length)})})]})}function q2({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:a,experimentName:l}){var o,c,d,_;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:Wet(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,f.jsx(zXe,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const h=e.filePath;return f.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...wr(m=>n(h,void 0,void 0,e.fileRef,m),{stopPropagation:!0}),children:e.label})}if((c=e.spawnedSessionIds)!=null&&c.length&&r){const h=e.spawnedSessionIds,m=h.slice(0,3),g=h.slice(m.length).map((S,k)=>({id:S,label:H6({number:Vt(m.length+k+1)})}));return f.jsxs(f.Fragment,{children:[e.label," — ",m.map((S,k)=>f.jsxs("span",{children:[k>0&&", ",f.jsx("button",{className:"tool-target",title:qQ(),onClick:v=>{v.preventDefault(),v.stopPropagation(),r(S)},children:H6({number:Vt(k+1)})})]},S)),g.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(cv,{items:g,onSelect:r,targetType:zW()})]})]})}if((d=e.runIds)!=null&&d.length){const h=s?e.runIds.filter(S=>!!s(S)):e.runIds;if(h.length===0)return e.label;const m=h.slice(0,3),g=h.slice(m.length).map(S=>({id:S,label:(s==null?void 0:s(S))||vo()}));return f.jsxs(f.Fragment,{children:[e.label," — ",m.map((S,k)=>f.jsxs("span",{children:[k>0&&", ",t?f.jsx("button",{className:"tool-target",title:nB({run:we(S)}),...wr(v=>t(S,v),{stopPropagation:!0}),children:(s==null?void 0:s(S))||vo()}):f.jsx("span",{children:(s==null?void 0:s(S))||vo()})]},S)),g.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(cv,{items:g,onOpen:t,targetType:Tne()})]})]})}if((_=e.experimentIds)!=null&&_.length){const h=l?e.experimentIds.filter(S=>!!l(S)):e.experimentIds;if(h.length===0)return e.label;const m=h.slice(0,3),g=h.slice(m.length).map(S=>({id:S,label:(l==null?void 0:l(S))||vo()}));return f.jsxs(f.Fragment,{children:[e.label," — ",m.map((S,k)=>f.jsxs("span",{children:[k>0&&", ",a?f.jsx("button",{className:"tool-target",title:qI({name:(l==null?void 0:l(S))||we(S)}),...wr(v=>a(S,v),{stopPropagation:!0}),children:(l==null?void 0:l(S))||vo()}):f.jsx("span",{children:(l==null?void 0:l(S))||vo()})]},S)),g.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(cv,{items:g,onOpen:a,targetType:GK()})]})]})}return e.label}function x4(e){const n=e.progressLabel??{skill:CH(),read:cP(),search:DF(),edit:tH(),project:RP(),web:d$(),agent:$$(),command:vE()}[e.kind];return{...e,label:n}}function qT(e,n){const t=Al({tool:e,state:{status:"running",input:n}});return{skill:hH(),read:PH(),search:qP(),edit:W$(),project:gP(),web:o$(),agent:L$(),command:IP()}[t.kind]}function g0t(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const b0t=250;function v0t(e,n){const[t,r]=M.useState(e),s=M.useRef(Date.now()),a=M.useRef(e);return M.useEffect(()=>{if(a.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 l=b0t-(Date.now()-s.current);if(l<=0){s.current=Date.now(),r(e);return}const o=window.setTimeout(()=>{s.current=Date.now(),r(a.current)},l);return()=>window.clearTimeout(o)},[e,t,n]),e!=null&&e.label===(t==null?void 0:t.label)?e:t}const x0t=160;function GT(e){const[n,t]=M.useState(!1);return M.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),x0t);return()=>window.clearTimeout(r)},[e]),e&&n}function y0t(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:wE()}}function w0t(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 S0t(e){const n=[];let t=null;for(const r of e){const s=Al(r),a=w0t(r,s),l=n[n.length-1];a&&l&&t===a?l.count++:n.push({part:r,activity:s,count:1}),t=a}return n}function k0t({part:e,busy:n,recovering:t,onRecover:r}){var m,g;const s=(m=e.state)==null?void 0:m.input,a=(s==null?void 0:s.nextRetryAt)??null,[l,o]=M.useState(Date.now());if(M.useEffect(()=>{if(typeof a!="number"||(o(Date.now()),a<=Date.now()))return;const S=window.setInterval(()=>{const k=Date.now();o(k),k>=a&&window.clearInterval(S)},1e3);return()=>window.clearInterval(S)},[a]),e.id==="turn-retry"){const S=Met(s??{},l);return f.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[f.jsx(Mt,{}),f.jsx("span",{children:S})]})}const c=az(s==null?void 0:s.recoveryAction),d=s==null?void 0:s.turnId;if(c!=="retry"&&c!=="continue"||!d)return null;const _=c==="retry"?zc():CK(),h=km(((g=e.state)==null?void 0:g.error)||wre());return f.jsxs("div",{className:"turn-recovery-row flex items-center justify-between gap-2 py-1.5 px-2.5 border border-border rounded-md bg-background",children:[f.jsx("span",{className:"min-w-0 truncate text-sm text-accent-red",title:h,children:h}),f.jsx(Ue,{type:"button",size:"small",disabled:n||t,onClick:()=>r==null?void 0:r(d,c),children:t?Yne():_})]})}function Wk({part:e,repeatCount:n=1,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,experimentName:o}){const c=e.state,d=Al(e),_=(c==null?void 0:c.status)==="error",h=km((c==null?void 0:c.error)||(c==null?void 0:c.output)||""),m=_&&!!h,[g,S]=M.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`,v=f.jsxs(f.Fragment,{children:[_&&f.jsxs("span",{className:"sr-only",children:[kx()," "]}),_?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(SN,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):f.jsx(zp,{activity:d,className:"text-muted"}),f.jsxs("span",{className:`${MT} ${_?"text-accent-red":"text-subtext"}`,children:[f.jsx(q2,{activity:d,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,experimentName:o}),n>1&&f.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:RI({count:Vt(n)}),children:["×",n]})]})]});return m?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":g,"aria-controls":k,"aria-label":g?jI({activity:d.label}):PB({activity:d.label}),onClick:()=>S(b=>!b),children:f.jsx(Ha,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${g?"rotate-90":""}`})})]}),g&&f.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:k,children:f.jsx("div",{className:b4,children:h.slice(0,2e4)})})]}):f.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:v})}function C0t({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,experimentName:o}){var j,N,T,z;const[c,d]=M.useState(!1),_=S0t(e),h=_.map(({activity:D})=>D),m=n?_.at(-1):void 0,g=m==null?void 0:m.part,S=m==null?void 0:m.activity,k=((j=g==null?void 0:g.state)==null?void 0:j.status)!=="error"?(S&&x4(S))??null:null,v=!!g&&((N=g.state)==null?void 0:N.status)==="running"&&!(k!=null&&k.progressLabel)&&(g0t((T=g.state)==null?void 0:T.input)||(k==null?void 0:k.kind)==="command"&&!ps(((z=g.state)==null?void 0:z.input)??{},"command","cmd")),b=v0t(k,v),w=GT(b!=null),x=b??y0t(h),C=b?b.label:wE();return e.length===1?b?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(zp,{activity:b,className:w?"tool-running-shimmer-icon":"text-muted"}),f.jsx("span",{className:`${w?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:C,children:f.jsx(q2,{activity:b,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,experimentName:o})})]})}):f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsx(Wk,{part:e[0],onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,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(zp,{activity:x,className:w?"tool-running-shimmer-icon":"text-muted"}),b?f.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${w?"tool-running-shimmer":""}`,title:C,children:f.jsx(q2,{activity:b,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,experimentName:o})}):f.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:()=>d(D=>!D),"aria-expanded":c,children:C}),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:()=>d(D=>!D),"aria-expanded":c,"aria-label":c?yK():PK(),children:f.jsx(Ha,{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:_.map(({part:D,count:O})=>f.jsx(Wk,{part:D,repeatCount:O,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,experimentName:o},D.id))})})})]})}function E0t({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var _;const s=e.prompt,[a,l]=M.useState([]),o=!n,c=h=>n==null?void 0:n({promptId:e.id,...h});if(s.resolved){if(s.kind==="permission")return null;if(s.kind==="plan"){const g=s.approved===!0?{label:nJ(),icon:_i,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:_J(),icon:Ix,iconClass:"text-accent-amber"}:s.approved===!1?{label:aJ(),icon:Ur,iconClass:"text-accent-red"}:{label:uJ(),icon:Xu,iconClass:"text-muted"},S=g.icon;return f.jsxs("details",{className:J_t,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?SE():u7()}),f.jsx(S,{size:17,strokeWidth:1.8,className:`shrink-0 ${g.iconClass}`}),f.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:g.label}),f.jsx(Ha,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),f.jsxs("div",{className:`${Uk} ms-6`,children:[f.jsx(Oa,{text:s.plan??"",onOpenFile:t}),s.note&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const h=(s.answers??[]).join(", ")||s.note||"",m=(s.annotations??[]).map((g,S)=>({id:`${e.id}-annotation-${S}`,text:g.text}));return f.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[m.length>0&&f.jsx(v4,{annotations:m,variant:"sent"}),f.jsxs("details",{className:Q_t,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||Xte()}),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 ${h?"chosen":""}`,children:h||Sne()})]}),f.jsxs("div",{className:Uk,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(g=>{var S;return f.jsx("li",{className:(S=s.answers)!=null&&S.includes(g.label)?"sel":"",children:g.label},g.label)})}),s.note&&s.note!==h&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const h=!!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?Ute():u7()}),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 ${h?"clamped":""}`,children:f.jsx(Oa,{text:s.plan??"",onOpenFile:t})}),h&&f.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...wr(m=>r(s.plan??"",e.id,m)),children:mte()}),!o&&!h&&f.jsxs("div",{className:F2,children:[f.jsx(Ue,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:IY()}),f.jsx(Ue,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:PY()}),f.jsx(Ue,{size:"small",onClick:()=>c({approve:!1}),children:PJ()})]})]})}if(s.kind==="permission"){const h=s.toolInput??{},m=ps(h,"command","cmd","filePath","file_path","path")||"",g=typeof((_=s.toolInput)==null?void 0:_.reason)=="string"&&s.toolInput.reason||"",S=ps(h,"description")||"",k=g||S||qT(s.tool,h),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(LN,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),f.jsx("span",{id:v,className:"text-base font-semibold text-text",children:rX()})]}),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}),m&&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:m}),!o&&f.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[f.jsx(Ue,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:BZ()}),f.jsx(Ue,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:JY()})]})]})]})}const d=h=>l(m=>s.multiSelect?m.includes(h)?m.filter(g=>g!==h):[...m,h]:[h]);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:e0t,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(h=>{const m=a.includes(h.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 ${m?"sel":""}`,disabled:o,onClick:()=>o?void 0:s.multiSelect?d(h.label):c({answers:[h.label]}),children:[f.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:h.label}),h.description&&f.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:h.description})]},h.label)})}),s.multiSelect&&!o&&f.jsx("div",{className:F2,children:f.jsx(Ue,{size:"small",variant:"primary",disabled:a.length===0,onClick:()=>c({answers:a}),children:tte()})})]})}function N0t(e,n){return e.role==="user"?!0:e.parts.some(t=>fp(t,n))}function z0t(e){const n=e.text??"",t=n.startsWith("data:")?n:ret(n),r=n.startsWith("data:")?"":n.includes("__")?n.slice(n.indexOf("__")+2):n,s=e.name||r||"attachment",a=n.startsWith("data:application/pdf")||/\.pdf$/i.test(s)||/\.pdf$/i.test(n);return{src:t,isPdf:a,name:s}}function j0t({count:e,index:n,prevId:t,nextId:r,onSelect:s,pagerDisabled:a,onEdit:l,editDisabled:o}){const c=e>1;return f.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${c?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[c&&f.jsxs(f.Fragment,{children:[f.jsx(Gt,{size:"small",title:n7(),"aria-label":n7(),disabled:a||!t,onClick:()=>t&&s(t),children:f.jsx(xN,{size:14})}),f.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[n+1,"/",e]}),f.jsx(Gt,{size:"small",title:t7(),"aria-label":t7(),disabled:a||!r,onClick:()=>r&&s(r),children:f.jsx(Ha,{size:14})})]}),f.jsx(Gt,{size:"small",title:Y6(),"aria-label":Y6(),disabled:o,onClick:l,children:f.jsx(Ix,{size:13})})]})}const A0t=M.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:l,runExperimentName:o,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:h,onOpenSubagent:m,busy:g=!1,recoveringTurnId:S,onRecover:k,skills:v,predictTextTail:b=!1,forkCount:w,forkIndex:x=0,forkPrevId:C,forkNextId:j,forkDisabled:N,branchDisabled:T,onFork:z,onSelectFork:D}){var Z,G;Oc();const[O,H]=M.useState(null),P=T0t(n);if(P)return f.jsx(M0t,{part:P});if(n.role==="user"){const X=n.parts.filter(V=>V.type==="text").map(V=>V.text??"").join(` -`),J=V=>!!(v!=null&&v.some(se=>se.name===V)),$=n.parts.filter(V=>V.type==="image"&&V.text).map(z0t),L=$.filter(V=>!V.isPdf),B=$.filter(V=>V.isPdf),Y=n.parts.filter(V=>V.type==="annotation"&&V.text).map(V=>({id:V.id,text:V.text??""}));if(O!==null){const V=()=>{const se=O.trim();!se||N||(H(null),z(n.id,se))};return f.jsx("div",{className:"msg-user-group 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":GZ(),value:O,autoFocus:!0,onChange:se=>H(se.target.value),onKeyDown:se=>{se.key==="Escape"?(se.preventDefault(),H(null)):se.key==="Enter"&&!se.shiftKey&&!se.nativeEvent.isComposing&&(se.preventDefault(),V())}}),f.jsxs("div",{className:`${F2} justify-end`,children:[f.jsx(Ue,{size:"small",onClick:()=>H(null),children:TX()}),f.jsx(Ue,{size:"small",variant:"primary",onClick:V,disabled:N||!O.trim(),children:Dv()})]})]})})}return f.jsxs("div",{className:"msg-user-group group/turn self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[Y.length>0&&f.jsx(v4,{annotations:Y,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]:me-0.5 [&_.skill-chip]:align-baseline",children:[f.jsx(w_t,{text:X,isCommand:J}),L.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:L.map((V,se)=>f.jsx("a",{href:V.src,target:"_blank",rel:"noreferrer",children:f.jsx("img",{src:V.src,alt:QW()})},se))}),B.length>0&&f.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:B.map((V,se)=>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:V.src,target:"_blank",rel:"noreferrer",children:[f.jsx(Xu,{size:15}),f.jsx("span",{children:V.name})]},se))})]}),w!==void 0&&f.jsx(j0t,{count:w,index:x,prevId:C,nextId:j,onSelect:D,pagerDisabled:T,onEdit:()=>H(X),editDisabled:N})]})}const F=n.parts.find(jh),W=F?n.parts.filter(X=>X!==F):n.parts;return f.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[VT(W,{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:l,runExperimentName:o,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:h,onOpenSubagent:m,predictTextTail:b}),F&&f.jsx(k0t,{part:F,busy:g,recovering:S===((G=(Z=F.state)==null?void 0:Z.input)==null?void 0:G.turnId),onRecover:k})]})});function T0t(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===OT?n:null}function M0t({part:e}){var c;const n=e.state,t=ps((n==null?void 0:n.input)??{},"command")??"",r=(n==null?void 0:n.status)==="running",s=(n==null?void 0:n.status)==="error",a=typeof((c=n==null?void 0:n.input)==null?void 0:c.exitCode)=="number"?n.input.exitCode:null,l=[n==null?void 0:n.output,n==null?void 0:n.error].filter(Boolean).join(` -`),o=r?vE():s&&a!==null?_K({code:Vt(a)}):null;return f.jsx("div",{className:"msg-shell 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:[yE()," "]}),f.jsx(Nh,{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})]}),l&&f.jsx("div",{className:`${b4} mt-2`,children:l.slice(0,2e4)}),o&&f.jsx("div",{className:`mt-1.5 text-xs ${s?"text-accent-red":"text-muted"}`,children:o})]})})}function VT(e,n){var w,x;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:l,runExperimentName:o,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:h,onOpenSubagent:m,predictTextTail:g=!1}=n,S=e.filter(C=>C.type!=="steer"&&fp(C,t)).at(-1),k=[];let v=[];const b=()=>{v.length!==0&&(k.push(f.jsx(C0t,{parts:v,pendingTail:v.some(C=>C.id===r),onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:l,runExperimentName:o,onOpenExperiment:c,experimentName:d},`tg-${v[0].id}`)),v=[])};for(const C of e)if(fp(C,t)){if(C.type==="tool"&&(D0t(C.tool)||(((w=C.children)==null?void 0:w.length)??0)>0)){b(),k.push(f.jsx(O0t,{part:C,pendingTail:g&&((x=C.state)==null?void 0:x.status)==="running"||C.id===r,onOpenSubagent:m},C.id));continue}if(C.type==="tool"){v.push(C);continue}b(),C.type==="text"?k.push(f.jsx(Oa,{text:C.text,onOpenFile:s,onOpenRun:a,predict:g&&C.id===(S==null?void 0:S.id)},C.id)):C.type==="steer"?k.push(f.jsx("div",{dir:"auto",role:"note","aria-label":Mte(),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(E0t,{part:C,onRespond:_,onOpenFile:s,onOpenPlan:h},C.id))}return b(),k}function R0t(e){return Al(e).label}function D0t(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function WT(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 y4(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&y4(t.children,n);if(r)return r}return null}function L0t({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:a,onOpenSubagent:l}){var S,k,v,b;const o=e.children??[],c=((S=e.state)==null?void 0:S.status)==="running",d=((k=e.state)==null?void 0:k.status)==="error",_=d?km(((v=e.state)==null?void 0:v.error)||((b=e.state)==null?void 0:b.output)||""):"",h=VT(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:a,onOpenSubagent:l,predictTextTail:c,pendingTailToolId:c?sz(o):null}),g=o.some(w=>w.type==="text"&&!!w.text)?"":WT(e);return f.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[d&&f.jsxs("span",{className:"sr-only",children:[kx()," "]}),_&&f.jsx("div",{className:b4,children:_.slice(0,2e4)}),h.length===0&&!g&&!_?f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?Cx():_Y()}):f.jsxs(f.Fragment,{children:[h,g&&f.jsx(Oa,{text:g,onOpenFile:n,onOpenRun:t})]})]})}function O0t({part:e,pendingTail:n,onOpenSubagent:t}){var d,_,h,m;const r=((d=e.state)==null?void 0:d.status)==="error",s=km(((_=e.state)==null?void 0:_.error)||((h=e.state)==null?void 0:h.output)||""),a=n&&!r?x4(Al(e)):Al(e),l=GT(!!(n&&!r)),o=(((m=e.children)==null?void 0:m.length)??0)===0&&!r&&!WT(e),c=f.jsxs(f.Fragment,{children:[r&&f.jsxs("span",{className:"sr-only",children:[kx()," "]}),r?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(SN,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):f.jsx(zp,{activity:a,className:`subagent-icon ${l?"tool-running-shimmer-icon":"text-muted"}`}),f.jsx("span",{className:`${MT} ${l?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:a.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:AY(),...wr(g=>t==null?void 0:t(e.id,a.label,g)),disabled:!t,children:[c,f.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:f.jsx(Ha,{size:12})})]})}function I0t(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,a)=>{var l,o;for(const c of s){const d=`${a}/${c.id}`;c.type==="tool"&&((l=c.state)!=null&&l.status)&&n.set(d,{status:c.state.status,part:c}),(o=c.children)!=null&&o.length&&r(c.children,d)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function w4(e){const n=(t,r)=>{var s;for(const a of t){const l=a.prompt;if(a.type==="prompt"&&(l==null?void 0:l.kind)==="permission"&&!l.resolved){const o=l.toolInput??{},d=ps(o,"reason","description")||qT(l.tool,o);return{id:a.id,path:`${r}/${a.id}`,label:d}}if((s=a.children)!=null&&s.length){const o=n(a.children,`${r}/${a.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 B0t(e){const[n,t]=M.useState({text:"",sequence:0}),r=M.useRef(null);return M.useEffect(()=>{var S,k,v,b,w;const s=((S=e[0])==null?void 0:S.id)??"",{messageId:a,states:l}=I0t(e),o=w4(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:a,states:l,permissionPath:(o==null?void 0:o.path)??null},t(x=>({text:o?T6({label:Ra(o.label)}):"",sequence:x.sequence+1}));return}const c=r.current.messageId===a?r.current.states:new Map,d=r.current.permissionPath,_=[...l].filter(([x,C])=>{var j;return((j=c.get(x))==null?void 0:j.status)!==C.status});if(r.current={transcript:s,messageId:a,states:l,permissionPath:(o==null?void 0:o.path)??null},o&&o.path!==d){t(x=>({text:T6({label:Ra(o.label)}),sequence:x.sequence+1}));return}const h=(k=_.find(([,x])=>jh(x.part)))==null?void 0:k[1].part;if((h==null?void 0:h.id)==="turn-recovery"){const x=az((b=(v=h.state)==null?void 0:v.input)==null?void 0:b.recoveryAction);t(C=>({text:`${UU()}${x?` ${x==="retry"?SU():vU()}`:""}`,sequence:C.sequence+1}));return}if((h==null?void 0:h.id)==="turn-retry"){t(x=>({text:pU(),sequence:x.sequence+1}));return}const m=_.filter(([,x])=>x.status==="error");if(m.length>0){const x=m.slice(0,2).map(([,C])=>Al(C.part).label).join(", ");t(C=>({text:m.length===1?LU({labels:x}):$U({count:Vt(m.length),labels:x}),sequence:C.sequence+1}));return}const g=_.filter(([,x])=>x.status==="running");if(g.length>0){const x=(w=g.at(-1))==null?void 0:w[1].part;t(C=>({text:x?x4(Al(x)).label:NU(),sequence:C.sequence+1}));return}_.some(([,x])=>x.status==="completed")&&t(x=>({text:TU(),sequence:x.sequence+1}))},[e]),n}const $0t=M.memo(function({messages:n,allMessages:t,canFork:r,onFork:s,onSelectFork:a,busy:l,onOpenFile:o,onOpenRun:c,onOpenSpawnedSession:d,runExperimentName:_,onOpenExperiment:h,experimentName:m,onRespond:g,onOpenPlan:S,onOpenSubagent:k,recoveringTurnId:v,onRecover:b,skills:w}){var D;Oc();const x=((D=w4(n))==null?void 0:D.id)??null,C=M.useMemo(()=>n.filter(O=>N0t(O,x)),[n,x]),j=M.useMemo(()=>{const O=C.filter(H=>H.role==="user"&&!H.id.startsWith(kc));return vet(t,n,O,H=>H.startsWith(kc))},[n,C,t]),N=C.at(-1),T=B0t(n),z=l?iz(n):null;return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:f.jsx("span",{children:T.text},T.sequence)}),C.map(O=>{var W,Z,G,X,J,$;const H=O.parts.find(jh),P=(Z=(W=H==null?void 0:H.state)==null?void 0:W.input)==null?void 0:Z.turnId,F=H?l||v!==null:!1;return f.jsx(A0t,{message:O,forkCount:(G=j.get(O.id))==null?void 0:G.count,forkIndex:(X=j.get(O.id))==null?void 0:X.index,forkPrevId:(J=j.get(O.id))==null?void 0:J.prevId,forkNextId:($=j.get(O.id))==null?void 0:$.nextId,forkDisabled:!r,branchDisabled:l,onFork:s,onSelectFork:a,activePermissionId:x,pendingTailToolId:(z==null?void 0:z.messageId)===O.id?z.toolId:null,onOpenFile:o,onOpenRun:c,onOpenSpawnedSession:d,runExperimentName:_,onOpenExperiment:h,experimentName:m,onRespond:g,onOpenPlan:S,onOpenSubagent:k,busy:F,recoveringTurnId:P===v?v:null,onRecover:b,skills:w,predictTextTail:l&&O===N&&O.role==="assistant"},O.id)})]})}),Kk=(e,n)=>e==="all"?!0:e==="archived"?n:!n,KT=[{id:"active",label:GY,railLabel:kE},{id:"archived",label:q6,railLabel:q6},{id:"all",label:YY,railLabel:MW}];function H0t({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=Va();return f.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[f.jsx(Gt,{size:"small",className:"rail-filter-btn",active:e!=="active",title:J6(),"aria-label":J6(),onClick:()=>r(a=>!a),children:f.jsx(DN,{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:KT.map(a=>f.jsxs(Mr,{onClick:()=>{n(a.id),r(!1)},children:[f.jsx("span",{children:a.label()}),e===a.id&&f.jsx(_i,{size:13})]},a.id))})]})}const P0t=14,F0t=500,U0t=1200;function YT({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*P0t,F0t)}ms`},children:t},r))}):f.jsx(f.Fragment,{children:e})}function q0t({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:a,onOpen:l,onRename:o,onSetArchived:c,onDelete:d}){var j;const{open:_,setOpen:h,ref:m}=Va(),g=((j=e.title)==null?void 0:j.trim())||"Untitled",[S,k]=M.useState(!1),[v,b]=M.useState(""),w=M.useRef(null);function x(){var N;b(((N=e.title)==null?void 0:N.trim())||""),k(!0)}function C(){var T;const N=v.trim();k(!1),N&&N!==(((T=e.title)==null?void 0:T.trim())||"")&&o(N)}return M.useEffect(()=>{var N,T;S&&((N=w.current)==null||N.focus(),(T=w.current)==null||T.select())},[S]),f.jsxs("div",{ref:m,role:"button",tabIndex:0,className:`session-row relative flex items-center gap-2 w-full text-start py-[7px] px-2.5 rounded-md text-sm text-text cursor-pointer select-none [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium [&_.session-dot]:w-3.5 [&_.session-dot]:inline-flex [&_.session-dot]:items-center [&_.session-dot]:justify-center [&_.session-dot]:shrink-0 [&_.session-title]:flex-1 [&_.session-title]:min-w-0 [&_.session-title]:overflow-hidden [&_.session-title]:text-ellipsis [&_.session-title]:whitespace-nowrap [&.unread_.session-title]:font-semibold [&_.session-time]:text-xs [&_.session-time]:text-muted [&_.session-time]:shrink-0 [&_.session-menu-btn]:hidden [&_.session-menu-btn]:items-center [&_.session-menu-btn]:justify-center [&_.session-menu-btn]:w-4 [&_.session-menu-btn]:h-4 [&_.session-menu-btn]:-my-0.5 [&_.session-menu-btn]:mx-0 [&_.session-menu-btn]:rounded-sm [&_.session-menu-btn]:text-muted [&_.session-menu-btn]:shrink-0 [&_.session-menu-btn:hover]:text-text [&_.session-menu-btn:hover]:bg-panel [&:hover_.session-menu-btn]:inline-flex [&:focus-within_.session-menu-btn]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-time]:hidden [&:focus-within_.session-time]:hidden [&.menu-open_.session-time]:hidden [&_.busy-dot]:w-[7px] [&_.busy-dot]:h-[7px] [&_.busy-dot]:rounded-full [&_.busy-dot]:bg-primary [&_.busy-dot]:animate-[or-pulse_1.2s_infinite] [&_.busy-dot]:shrink-0 [&_.unread-dot]:w-[7px] [&_.unread-dot]:h-[7px] [&_.unread-dot]:rounded-full [&_.unread-dot]:bg-primary [&_.unread-dot]:shrink-0 [&_.busy-dot.waiting]:animate-none [&_.session-title-input]:flex-1 [&_.session-title-input]:min-w-0 [&_.session-title-input]:py-px [&_.session-title-input]:px-[5px] [&_.session-title-input]:-my-0.5 [&_.session-title-input]:mx-0 [&_.session-title-input]:[font:inherit] [&_.session-title-input]:text-text [&_.session-title-input]:bg-background [&_.session-title-input]:border [&_.session-title-input]:border-primary [&_.session-title-input]:rounded-sm [&_.session-title-input]:outline-none [&.editing]:bg-surface [&.editing]:cursor-default [&.editing_.session-menu-btn]:hidden [&.editing_.session-time]:hidden ${n?"active":""} ${t?"unread":""} ${_?"menu-open":""} ${S?"editing":""}`,title:`${jf[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?Gne():""}`,onClick:()=>{S||(_?h(!1):l())},onKeyDown:N=>{N.target===N.currentTarget&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),_?h(!1):l())},children:[f.jsx("span",{className:"session-dot",children:r?f.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&f.jsx("span",{className:"unread-dot"})}),e.parentSessionId&&!S&&f.jsx(Hx,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),S?f.jsx("input",{ref:w,className:"session-title-input","aria-label":Ree(),value:v,onChange:N=>b(N.target.value),onClick:N=>N.stopPropagation(),onBlur:C,onKeyDown:N=>{N.stopPropagation(),N.key==="Enter"?(N.preventDefault(),C()):N.key==="Escape"&&(N.preventDefault(),k(!1))}}):f.jsx("span",{className:"session-title",children:f.jsx(YT,{title:g,animate:a!==void 0},a??"static")}),f.jsx("span",{className:"session-time",children:n0t(e.updatedAt)}),f.jsx("button",{className:"session-menu-btn",title:o7(),"aria-label":o7(),onClick:N=>{N.stopPropagation(),h(T=>!T)},children:f.jsx(Dx,{size:14})}),_&&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(Mr,{onClick:N=>{N.stopPropagation(),h(!1),x()},children:f.jsx("span",{children:lee()})}),f.jsx(Mr,{onClick:N=>{N.stopPropagation(),h(!1),c(!e.archived)},children:f.jsx("span",{children:e.archived?Are():HW()})}),f.jsx(Mr,{danger:!0,onClick:N=>{N.stopPropagation(),h(!1),d()},children:f.jsx("span",{children:DZ()})})]})]})}const Yk=[vN,MN,Nh,Lx],uv=[{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"}],Xk="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function G0t({onClose:e,onConfigureSsh:n}){const[t,r]=M.useState(null),[s,a]=M.useState([]),[l,o]=M.useState(""),[c,d]=M.useState(null),[_,h]=M.useState(null),m=M.useRef(null);M.useEffect(()=>{Promise.all([GN(),_Je()]).then(([v,b])=>{r(v),a(b)}).catch(v=>d(v instanceof Error?v.message:String(v)))},[]),_4(m,e);async function g(v){const b=window.open("/remote-launch","_blank");if(!b){Ms(VSe(),"error");return}h(v);try{const w=await pJe(v,{theme:_et(),locale:E()});b.location.replace(w.gatewayUrl),e()}catch(w){b.close(),Ms(w instanceof Error?w.message:String(w),"error")}finally{h(null)}}const S=t==null?void 0:t.filter(v=>v.host.toLocaleLowerCase().includes(l.trim().toLocaleLowerCase())),k=new Map(s.map(v=>[v.host,v]));return Bc.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:v=>{v.target===v.currentTarget&&e()},children:f.jsxs("div",{ref:m,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(Gt,{className:"absolute end-3.5 top-3.5","aria-label":S7e(),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:UE()}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:N7e()}),f.jsx(Wf,{"data-initial-focus":!0,className:"mt-4",value:l,onChange:v=>o(v.target.value),placeholder:q7(),"aria-label":q7()})]}),f.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:c?f.jsx("p",{className:"m-3 text-sm text-accent-red",children:c}):t===null?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[f.jsx(Mt,{})," ",rN()]}):(S==null?void 0:S.length)===0?f.jsx("p",{className:"m-3 text-sm text-subtext",children:ASe()}):S==null?void 0:S.map(v=>{const b=k.get(v.host);return f.jsxs(Ue,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:_===v.host,onClick:()=>void g(v.host),children:[f.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:v.host}),_===v.host?f.jsx(Mt,{}):b?f.jsx("span",{className:"text-sm text-subtext",children:BSe()}):null]},v.host)})}),f.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:f.jsxs(Ue,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[f.jsx(DN,{size:15}),_N()]})})]})}),document.body)}function V0t({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:a,onSelectMainView:l,experimentsActive:o,filesActive:c,artifactsActive:d,onOpenExperiments:_,onOpenArtifacts:h,onOpenFile:m,onOpenRun:g,runExperimentName:S,onOpenExperiment:k,experimentName:v,onOpenPlan:b,onOpenSubagent:w,onOpenWorktree:x,runtime:C,onOpenDemoWelcome:j,composerPrefill:N=null,onActiveSessionChange:T,preferredAgent:z,onPreferredAgentChange:D,children:O}){var Yh,Ed,Nd;const[H,P]=M.useState([]),[F,W]=M.useState(!1),[Z,G]=M.useState(!1),[X,J]=M.useState(null),[$,L]=M.useState(new Set),[B,Y]=M.useState("active"),[V,se]=M.useState(""),[le,ae]=M.useState([]),re=M.useRef(0),q=M.useRef({projectId:e,activeId:X});q.current={projectId:e,activeId:X};const[oe,ce]=M.useState([]),[_e,ue]=M.useState(null),[Ne,ze]=M.useState(null),Ie=M.useRef(Promise.resolve()),Pe=M.useRef(0),$e=M.useRef(0),[It,yt]=M.useState(null),qe=M.useRef(null),jt=M.useRef(!1),pt=M.useRef(null),[ot,tt]=M.useReducer(t0t,{messagesBySession:{},busySessions:new Set,queuedBySession:{},activeLeafBySession:{}}),[Ft,ke]=M.useState([]),[Re,Xe]=M.useState(z);M.useEffect(()=>Xe(z),[z]);const[nt,st]=M.useState({}),[St,mt]=M.useState({}),[Wt,fn]=M.useState(null),hn=M.useRef(!1),At=M.useRef(null),[jn,nn]=M.useState(null),nr=M.useRef(null),[lr,bn]=M.useState(new Map),Je=M.useRef(new Map),ht=M.useRef(new Set),An=M.useRef(new Set),rr=M.useRef(0),Ge=M.useRef([]),Bt=M.useRef(null),He=M.useRef(null),it=M.useRef(!0),[_n,qt]=M.useState(!0),Nt=M.useRef(null),pn=Va(),ls=M.useCallback(te=>{var me;re.current+=1,ae(Ee=>[...Ee,{id:`annotation-${re.current}`,...te}]),(me=Nt.current)==null||me.focus()},[]),Tn=W_t(He,ls);K_t(le),M.useEffect(()=>{ae([]),Tn.dismiss()},[X,e,Tn.dismiss]);const[Os,la]=M.useState([]),[Zr,Sn]=M.useState(0),[Mn,kn]=M.useState(!1),[xs,cr]=M.useState(0),Qr=M.useRef(!1);M.useEffect(()=>{PJe().then(la).catch(()=>{})},[a]);function Ir(te){if(!Jr)return;if(te.source==="command"&&te.name==="plan"){ws(V,Jr);return}const me=Lk(V,Jr,te.name,2);se(me.text),window.requestAnimationFrame(()=>{var Ee,je;(Ee=Nt.current)==null||Ee.focus(),(je=Nt.current)==null||je.setSelectionRange(me.cursor,me.cursor),cr(me.cursor)})}function Si(te){const me=te.selectionStart;if(Qr.current||me!==te.selectionEnd)return!1;const Ee=nv(V,me);if(!Ee||Ee.end!==me||!Lo(Ee.query))return!1;const je=Ok(V,Ee);return se(je.text),cr(je.cursor),window.requestAnimationFrame(()=>te.setSelectionRange(je.cursor,je.cursor)),!0}function Wn(te){ue(null);let je=oe.reduce((Ve,kt)=>Ve+kt.size,0);for(const Ve of te){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Ve.type))continue;if(Ve.size>31457280){ue(nK({name:we(Ve.name)}));continue}if(je+Ve.size>41943040){ue(aK());continue}je+=Ve.size;const kt=new FileReader;kt.onload=()=>{const Cn=kt.result;ce(Cr=>[...Cr,{dataUrl:Cn,mediaType:Ve.type,name:Ve.name,size:Ve.size}])},kt.readAsDataURL(Ve)}}function pr(te){const me=Array.from(te.clipboardData.items).filter(Ee=>Ee.kind==="file"&&(Ee.type.startsWith("image/")||Ee.type==="application/pdf")).map(Ee=>Ee.getAsFile()).filter(Ee=>Ee!==null);me.length>0&&(te.preventDefault(),Wn(me))}const Tt=H.find(te=>te.id===X),Kn=Re??sht(Ft),Un=Tt?{harness:Tt.harness,model:nt.model??Tt.model,serviceTier:nt.serviceTier!==void 0?nt.serviceTier:Tt.serviceTier,permissionMode:nt.permissionMode??Tt.permissionMode,reasoningLevel:nt.reasoningLevel??Tt.reasoningLevel}:Kn?{...Kn,...nt}:null,Ze=Un?Ft.find(te=>te.id===Un.harness):void 0,Rt=Ze==null?void 0:Ze.options,ki=M.useMemo(()=>g_t(Os,Rt==null?void 0:Rt.planActivation),[Os,Rt==null?void 0:Rt.planActivation]),cs=$k(V),us=cs!==null,Jr=nv(V,xs),Ci=(Jr==null?void 0:Jr.query)??null,Xt=Ci===null?[]:ki.filter(te=>te.name.startsWith(Ci)),Gr=!us&&Ci!==null&&(Jr==null?void 0:Jr.end)===xs&&Xt.some(te=>te.name!==Ci)&&!Mn?Xt:[],ei=Gr.length>0,Vr=Math.min(Zr,Math.max(0,Gr.length-1));M.useEffect(()=>Sn(0),[Ci]);const ur=Un&&Ze&&Ze.models.length>0&&!Ze.models.some(te=>te.id===Un.model)?Ze.models[0].id:(Un==null?void 0:Un.model)??null,Zt=Un&&{...Un,model:ur,serviceTier:cp(Ze,ur,Un.serviceTier),reasoningLevel:JN(Ze,ur,Un.reasoningLevel)},ca=Zp(Ze,Zt==null?void 0:Zt.model),Is=te=>{if(!Zt)return;const me={...Zt,...te},Ee={};te.model!==void 0&&te.model!==Zt.model&&(Ee.model=te.model),te.serviceTier!==void 0&&te.serviceTier!==Zt.serviceTier&&(Ee.serviceTier=te.serviceTier),te.permissionMode!==void 0&&te.permissionMode!==Zt.permissionMode&&(Ee.permissionMode=te.permissionMode),te.reasoningLevel!==void 0&&te.reasoningLevel!==Zt.reasoningLevel&&(Ee.reasoningLevel=te.reasoningLevel),mt(je=>({...je,...Ee})),Xe(me),D(me).catch(()=>{}),Tt?st(je=>({...je,...te})):te.harness&&te.harness!==Zt.harness&&st({})},kr=M.useCallback(te=>{const me=Ie.current.catch(()=>{}).then(te);return Ie.current=me.then(()=>{},()=>{}),me},[]),Bs=te=>{if(te==="plan"&&(Ze==null?void 0:Ze.id)==="claude-code"?(mt(je=>({...je,permissionMode:te})),st(je=>({...je,permissionMode:te}))):(st(je=>{const Ve={...je};return delete Ve.permissionMode,Ve}),Is({permissionMode:te})),!Tt)return;const me=Tt.id,Ee=++Pe.current;ze(null),kr(()=>eet(me,te)).then(je=>{P(Ve=>Ve.map(kt=>kt.id===je.id?je:kt)),Pe.current===Ee&&st(Ve=>{const kt={...Ve};return delete kt.permissionMode,kt})}).catch(()=>{Pe.current===Ee&&(st(je=>{const Ve={...je};return delete Ve.permissionMode,Ve}),ze(Ire()))})},ys=te=>Is({reasoningLevel:te}),mr=(Zt==null?void 0:Zt.harness)==="claude-code"?Zt.permissionMode==="plan":(Rt==null?void 0:Rt.planActivation)==="command"?It??(Tt==null?void 0:Tt.planMode)??!1:!1;M.useEffect(()=>{It===null||(Tt==null?void 0:Tt.planMode)!==It||(qe.current=null,yt(null))},[Tt==null?void 0:Tt.planMode,It]);async function Gi(te){if(mt(je=>({...je,planMode:te})),qe.current=te,yt(te),!Tt)return;const me=Tt.id,Ee=++$e.current;ze(null);try{const je=await kr(()=>JJe(me,te));P(Ve=>Ve.map(kt=>kt.id===je.id?je:kt)),$e.current===Ee&&(qe.current=null,yt(null),ze(null))}catch(je){throw $e.current===Ee&&(qe.current=null,yt(null)),je}}async function $s(){if((Zt==null?void 0:Zt.harness)==="claude-code"){Bs("auto");return}if(Tt)try{await Gi(!1)}catch{ze(IK())}}async function Ka(){const te=!mr;try{if((Zt==null?void 0:Zt.harness)==="claude-code")Bs(te?"plan":"auto");else if((Rt==null?void 0:Rt.planActivation)==="command")await Gi(te);else throw new Error(nb())}catch{ze(f7())}}function ws(te,me){const Ee=Ok(te,me);se(Ee.text),kn(!0),Ka(),window.requestAnimationFrame(()=>{var je,Ve;(je=Nt.current)==null||je.focus(),(Ve=Nt.current)==null||Ve.setSelectionRange(Ee.cursor,Ee.cursor),cr(Ee.cursor)})}Ge.current=H;const Ss=M.useCallback(async()=>{const te=Ge.current.map(me=>me.id);try{const me=(await H0(e)).filter(je=>!An.current.has(je.id)),Ee=new Set(me.map(je=>je.id));for(const je of te)Ee.has(je)||fs(je);return P(je=>{const Ve=new Map(je.map(kt=>[kt.id,kt.contextUsage]));return me.map(kt=>({...kt,contextUsage:kt.contextUsage??Ve.get(kt.id)}))}),Je.current=new Map(me.map(je=>[je.id,je.title])),tt({type:"seedBusy",sessions:me.filter(je=>je.busy).map(je=>je.id),known:me.map(je=>je.id)}),me}catch{return null}},[e]),Ei=M.useCallback(async te=>{const me=q.current.activeId===te?At.current:void 0,[{messages:Ee,queued:je,activeLeafId:Ve}]=await Promise.all([Lu(te),Ss()]),kt=me!==void 0&&q.current.activeId===te&&At.current!==me;tt({type:"seed",sessionId:te,messages:Ee,queued:je,activeLeafId:kt?At.current:Ve})},[Ss,tt]);M.useEffect(()=>{P([]),Ge.current=[],J(null);const te=TT();L(e===lb?new Set([ON,IN].filter(me=>!te.has(me))):new Set),se(""),ce([]),tt({type:"reset"}),ht.current=new Set,bn(new Map),Je.current=new Map,Ss().then(me=>{me&&J(Ee=>{var je,Ve;return Ee??(e===lb?(je=me.find(kt=>kt.id===Rf))==null?void 0:je.id:void 0)??((Ve=me.find(kt=>!kt.archived))==null?void 0:Ve.id)??null})})},[e,Ss]),M.useEffect(()=>{mt({}),nr.current=null},[X]),M.useEffect(()=>{!X||ht.current.has(X)||(ht.current.add(X),Lu(X).then(({messages:te,queued:me,activeLeafId:Ee})=>tt({type:"seed",sessionId:X,messages:te,queued:me,activeLeafId:Ee})).catch(()=>{tt({type:"seed",sessionId:X,messages:[],onlyIfAbsent:!0}),ht.current.delete(X)}))},[X]),M.useEffect(()=>Vf(te=>{switch(te.type){case"session":{if(te.session.projectId!==e||An.current.has(te.session.id))return;const me=Je.current.has(te.session.id),Ee=Je.current.get(te.session.id)!==te.session.title;Je.current.set(te.session.id,te.session.title),me&&Ee&&te.session.titleSource==="generated"&&(bn(je=>{const Ve=new Map(je);return Ve.set(te.session.id,(je.get(te.session.id)??0)+1),Ve}),window.setTimeout(()=>{bn(je=>{if(!je.has(te.session.id))return je;const Ve=new Map(je);return Ve.delete(te.session.id),Ve})},U0t)),P(je=>{const Ve=je.findIndex(Cn=>Cn.id===te.session.id);if(Ve<0)return[te.session,...je];const kt=je.slice();return kt[Ve]={...te.session,contextUsage:te.session.contextUsage??je[Ve].contextUsage},kt});break}case"sessionDeleted":fs(te.sessionId);break;case"message":rr.current++,tt({type:"upsertMessage",sessionId:te.sessionId,message:te.message});break;case"busy":tt({type:"busy",sessionId:te.sessionId,busy:te.busy});break;case"queued":tt({type:"setQueued",sessionId:te.sessionId,items:te.items});break;case"branch":tt({type:"activeLeaf",sessionId:te.sessionId,leafId:te.activeLeafId});break;case"usage":P(me=>me.map(Ee=>Ee.id===te.sessionId?{...Ee,contextUsage:te.usage}:Ee));break}}),[e]),M.useEffect(()=>Vf(te=>{if(te.type!=="reconnected"||(Ss(),!X||!ht.current.has(X)))return;const me=Ee=>{const je=rr.current;Lu(X).then(({messages:Ve,queued:kt,activeLeafId:Cn})=>{tt({type:"seed",sessionId:X,messages:Ve,queued:kt,activeLeafId:Cn}),Ee&&rr.current!==je&&me(!1)}).catch(()=>{})};me(!0)}),[X,Ss]);const ti=X?ot.messagesBySession[X]??qk:qk,$l=X?ot.activeLeafBySession[X]??null:null;At.current=$l;const sr=M.useMemo(()=>get(ti,$l),[ti,$l]),In=X?ot.busySessions.has(X):!1,ua=!In&&!!(Ze!=null&&Ze.agentReady),Sd=In&&iz(sr)!=null,Vc=In&&xet(sr),ir=X?ot.queuedBySession[X]??[]:[],Hs=ir.some(te=>te.dispatchState==="retrying"),Hl=ir.findIndex(te=>te.dispatchState==="blocked"),da=ir.reduce((te,me)=>me.dispatchState!=="retrying"||typeof me.nextRetryAt!="number"?te:te===null?me.nextRetryAt:Math.min(te,me.nextRetryAt),null),[fa,Ni]=M.useState(()=>Date.now());M.useEffect(()=>{if(!Hs||da===null||(Ni(Date.now()),da<=Date.now()))return;const te=window.setInterval(()=>{const me=Date.now();Ni(me),me>=da&&window.clearInterval(te)},1e3);return()=>window.clearInterval(te)},[Hs,da]),M.useEffect(()=>{const te=ir.reduce((me,Ee)=>Ee.planMode??me,void 0);te!==void 0?(jt.current=!0,qe.current=te,yt(te)):jt.current&&(jt.current=!1,qe.current=null,yt(null))},[ir]);const Pl=!!X&&!(X in ot.messagesBySession),Ya=M.useMemo(()=>{const te=new Set;for(const me of ot.busySessions)(ot.messagesBySession[me]??[]).some(Ee=>Ee.parts.some(je=>je.type==="prompt"&&je.prompt&&!je.prompt.resolved&&je.prompt.nativeId))&&te.add(me);return te},[ot.busySessions,ot.messagesBySession]),Xa=X?Ya.has(X):!1,Bn=Tt,ks=Bn?lr.get(Bn.id):void 0,Br=M.useMemo(()=>{var te;for(let me=sr.length-1;me>=0;me--)for(const Ee of sr[me].parts)if(Ee.type==="prompt"&&((te=Ee.prompt)==null?void 0:te.kind)==="plan"&&!Ee.prompt.resolved)return{promptId:Ee.id,plan:Ee.prompt.plan??"",synthesized:!!Ee.prompt.synthesized};return null},[sr]),es=M.useMemo(()=>{const te=Bn==null?void 0:Bn.harness;if(!X||te!=="claude-code"&&te!=="codex")return null;for(let me=sr.length-1;me>=0;me--)for(const Ee of sr[me].parts)if(!(Ee.type!=="prompt"||!Ee.prompt||Ee.prompt.resolved)&&Ee.prompt.kind==="question")return Ee.prompt.nativeId&&!ot.busySessions.has(X)?null:Ee.id;return null},[sr,Bn==null?void 0:Bn.harness,X,ot.busySessions]),gr=us&&!es,Lo=te=>!es&&!us&&ki.some(me=>me.name===te),[ts,Oo]=M.useState(null),Wr=ts&&ts.sessionId===X?ts:null;M.useEffect(()=>{if(!ts)return;const te=ot.busySessions.has(ts.sessionId),me=ts.sessionId===X&&Br&&Br.promptId!==ts.promptId;(!te||me)&&Oo(null)},[ts,Br,ot.busySessions,X]);const Yn=M.useMemo(()=>w4(sr),[sr]),ha=In&&!!(Ze!=null&&Ze.supportsSteering)&&!!(Ze!=null&&Ze.agentReady)&&!Br&&!es&&!Yn&&oe.length===0&&le.length===0,br=M.useMemo(()=>b&&X?(te,me,Ee)=>b(te,X,me,Ee):void 0,[b,X]),ds=M.useMemo(()=>w&&X?(te,me,Ee)=>w(X,te,me,Ee):void 0,[w,X]),$r=M.useMemo(()=>m&&((te,me,Ee,je,Ve)=>m(te,X??void 0,me,Ee,je,Ve)),[m,X]);M.useEffect(()=>{Pe.current+=1,$e.current+=1;const te=(X?ot.queuedBySession[X]??[]:[]).reduce((me,Ee)=>Ee.planMode??me,void 0);jt.current=te!==void 0,qe.current=te??null,yt(te??null),st({}),ze(null)},[X]),M.useEffect(()=>{T==null||T(X)},[X,T]);const Ps=a==="chat"&&(sr.length>0||In),dr=(Zt==null?void 0:Zt.harness)??null,Za=(Zt==null?void 0:Zt.model)??null,[ni,_a]=M.useState(null),Cs=(ni==null?void 0:ni.projectId)===e&&(ni.prompts!==null||ni.harness===dr),Io=a==="chat"&&!Ps&&!Pl;M.useEffect(()=>{if(!Io||!dr||Cs)return;let te=!0;return zQe(e,dr,Za,E()).then(me=>{te&&_a({projectId:e,harness:dr,prompts:me.prompts})}).catch(()=>{te&&_a({projectId:e,harness:dr,prompts:null})}),()=>{te=!1}},[e,dr,Za,Cs,Io]);const zi=Cs&&ni?ni.prompts:null,Fl=dr!==null&&!Cs,kd=te=>{se(te),kn(!1),window.requestAnimationFrame(()=>{const me=Nt.current;me&&(me.focus(),me.setSelectionRange(te.length,te.length),cr(te.length))})};M.useEffect(()=>{N&&(se(N),kn(!1),cr(N.length))},[N]);const Qa=M.useCallback(te=>{const me=te.scrollHeight-te.scrollTop-te.clientHeight<60;it.current=me,qt(me)},[]),Es=M.useCallback(()=>{it.current=!0,qt(!0);const te=Bt.current;te&&(te.scrollTop=te.scrollHeight)},[]);M.useLayoutEffect(()=>{Es()},[X,Ps,Es]),M.useLayoutEffect(()=>{it.current&&Es()},[sr,In,Es]),M.useEffect(()=>{const te=Bt.current,me=He.current;if(!te||!me)return;const Ee=new ResizeObserver(()=>{if(it.current){te.scrollTop=te.scrollHeight;return}Qa(te)});return Ee.observe(me),Ee.observe(te),()=>Ee.disconnect()},[Ps,Qa]);const ie=M.useCallback(te=>{te.currentTarget.blur(),Es()},[Es]);async function ve({queue:te=!1}={}){var Xh,Zh,Qh,hs,Fo;const me=V.trim(),Ee=es?null:b_t(me,Rt==null?void 0:Rt.planActivation),je=!!Ee,Ve=!mr,kt=Ik(Rt==null?void 0:Rt.planActivation,je?Ve:void 0,qe.current),Cn=je&&(Ze==null?void 0:Ze.id)==="claude-code"?Ve?"plan":"auto":void 0,Cr=Ee?Ee.prompt:me,Ai=oe,ri=le,ma=ri.map(En=>({text:En.text})),tg=e;let Ul=X;const zd=()=>{const En=q.current;return En.projectId===tg&&En.activeId===Ul},ql=()=>{zd()&&(se(En=>En||me),ce(En=>En.length?En:Ai),ae(En=>En.length?En:ri))};if(je&&!Cr&&Ai.length===0&&ri.length===0){se(""),kn(!1);try{if((Ze==null?void 0:Ze.id)==="claude-code")Bs(Ve?"plan":"auto");else if((Rt==null?void 0:Rt.planActivation)==="command")await Gi(Ve);else throw new Error(nb())}catch{ze(f7()),ql()}return}const vr=Zt?{...Zt,...Cn?{permissionMode:Cn}:{}}:null;Cn&&Bs(Cn);let Gl=null;const jd=qe.current;je&&(Rt==null?void 0:Rt.planActivation)==="command"&&(Gl=++$e.current,qe.current=Ve,yt(Ve));const Po=()=>{Gl===null||$e.current!==Gl||(qe.current=jd,yt(jd))};if(!Cr&&Ai.length===0&&ri.length===0)return;if((Cr||ri.length>0)&&es&&Ai.length===0){se(""),ae([]),Vi({promptId:es,answers:[],note:Cr||void 0,annotations:ma}).then(En=>{En||ql()});return}const Ad=JSON.stringify({text:Cr,images:Ai.map(En=>({mediaType:En.mediaType,name:En.name,dataUrl:En.dataUrl})),annotations:ma,settings:vr?{model:vr.model,serviceTier:vr.serviceTier,permissionMode:vr.permissionMode,planMode:kt,reasoningLevel:vr.reasoningLevel}:null}),Vl=((Xh=nr.current)==null?void 0:Xh.signature)===Ad?nr.current.id:`ct_${crypto.randomUUID()}`;if(nr.current={signature:Ad,id:Vl},In){if(!X||!(Ze!=null&&Ze.agentReady)){Po();return}const En=X;se(""),ce([]),ae([]),ue(null);const ga=vr?{model:vr.model,serviceTier:vr.serviceTier,permissionMode:vr.permissionMode,planMode:(Rt==null?void 0:Rt.planActivation)==="command"?kt??(Tt==null?void 0:Tt.planMode):kt,reasoningLevel:vr.reasoningLevel}:{};st({});const ba=Ai.map(Er=>({mediaType:Er.mediaType,dataBase64:Er.dataUrl.slice(Er.dataUrl.indexOf(",")+1),name:Er.name}));try{(Zh=(await kr(()=>cS(En,Cr,ga,ba.length?ba:void 0,ma,Vl,ha&&!te&&!je?"steer":void 0))).turn)!=null&&Zh.existing&&await Ei(En),mt({}),((Qh=nr.current)==null?void 0:Qh.id)===Vl&&(nr.current=null)}catch{Po(),ql()}return}if(!(Ze!=null&&Ze.agentReady)){Po();return}if(!vr){Po();return}se(""),ce([]),ae([]),ue(null);let Wi=X;try{if(!Wi){const zs=await Ce(vr,kt);Wi=zs.id,Ul=zs.id}tt({type:"optimisticUser",sessionId:Wi,text:Cr||KW(),attachments:Ai.map(zs=>({url:zs.dataUrl,mediaType:zs.mediaType,name:zs.name})),annotations:ri}),tt({type:"busy",sessionId:Wi,busy:!0}),Es(),B==="archived"&&Y("active");const En=vr?{model:vr.model,serviceTier:vr.serviceTier,permissionMode:vr.permissionMode,planMode:kt,reasoningLevel:vr.reasoningLevel}:{};st({});const ga=Ai.map(zs=>({mediaType:zs.mediaType,dataBase64:zs.dataUrl.slice(zs.dataUrl.indexOf(",")+1),name:zs.name})),ba=Wi;if(!ba)throw new Error(Pne());(hs=(await kr(()=>cS(ba,Cr,En,ga.length?ga:void 0,ma,Vl))).turn)!=null&&hs.existing&&await Ei(ba),mt({}),((Fo=nr.current)==null?void 0:Fo.id)===Vl&&(nr.current=null)}catch(En){if(ql(),Po(),!Wi)return;const ga=En instanceof Error?En.message:String(En);if(!/session is busy/i.test(ga)&&await H0(e).then(Er=>{var Uo;return!!((Uo=Er.find(zs=>zs.id===Wi))!=null&&Uo.busy)}).catch(()=>!1)){zd()&&(se(Er=>Er===Cr?"":Er),ce(Er=>Er===Ai?[]:Er),ae(Er=>Er===ri?[]:Er));return}tt({type:"busy",sessionId:Wi,busy:!1}),tt({type:"localError",sessionId:Wi,text:rY({error:we(ga)})})}}async function Ce(te,me){const Ee=await YJe(e,te.harness,{model:te.model,serviceTier:te.serviceTier,permissionMode:te.permissionMode,planMode:me,reasoningLevel:te.reasoningLevel});return ht.current.add(Ee.id),P(je=>[Ee,...je]),J(Ee.id),q.current={projectId:e,activeId:Ee.id},Ee}function De(){const te=N_t(V);se(te),window.requestAnimationFrame(()=>{var me,Ee;(me=Nt.current)==null||me.focus(),(Ee=Nt.current)==null||Ee.setSelectionRange(te.length,te.length),cr(te.length)})}async function Oe(){const te=cs;if(!te)return;if(ze(null),In){ze(uK());return}const me=V,Ee=q.current,je=()=>{const Cn=q.current;Cn.projectId!==Ee.projectId||Cn.activeId!==Ee.activeId||se(Cr=>Cr||me)};se(""),kn(!1);let Ve=X;if(!Ve){if(!(Ze!=null&&Ze.agentReady)||!Zt){je(),ze(nb());return}try{const Cn=Ik(Rt==null?void 0:Rt.planActivation,void 0,qe.current);Ve=(await Ce(Zt,Cn)).id,st({})}catch(Cn){je();const Cr=Cn instanceof Error?Cn.message:String(Cn);ze(P6({error:we(Cr)}));return}}B==="archived"&&Y("active");const kt=`${kc}shell-${Date.now()}`;tt({type:"localShell",sessionId:Ve,id:kt,command:te}),Es();try{const{message:Cn}=await set(Ve,te);tt({type:"upsertMessage",sessionId:Ve,message:Cn})}catch(Cn){const Cr=Cn instanceof Error?Cn.message:String(Cn);tt({type:"localShell",sessionId:Ve,id:kt,command:te,error:P6({error:we(Cr)})})}}function gt(){X&&cet(X).catch(()=>{ze(rre())})}const ft=M.useCallback(async(te,me)=>{if(!(!X||hn.current)){hn.current=!0,ze(null),fn(te);try{const Ee=Det({model:St.model,serviceTier:St.serviceTier,permissionMode:St.permissionMode,planMode:St.planMode,reasoningLevel:St.reasoningLevel}),je=X;(await iet(je,te,me,Ee)).turn.existing&&await Ei(je),mt({})}catch{ze(dne())}finally{hn.current=!1,fn(null)}}},[X,St,Ei]),$t=M.useCallback((te,me)=>{if(!X||In||!(Ze!=null&&Ze.agentReady))return;const Ee=X;tt({type:"busy",sessionId:Ee,busy:!0}),Es(),kr(()=>aet(Ee,te,me)).catch(je=>{tt({type:"busy",sessionId:Ee,busy:!1});const Ve=je instanceof Error?je.message:String(je);tt({type:"localError",sessionId:Ee,text:vne({error:we(Ve)})})})},[X,In,Ze==null?void 0:Ze.agentReady,Es,kr]),Rn=M.useCallback(te=>{if(!X||In)return;const me=X,Ee=At.current;tt({type:"activeLeaf",sessionId:me,leafId:te}),kr(()=>oet(me,te)).catch(je=>{tt({type:"activeLeaf",sessionId:me,leafId:Ee});const Ve=je instanceof Error?je.message:String(je);tt({type:"localError",sessionId:me,text:ore({error:we(Ve)})})})},[X,In,kr]);function Kr(te){if(!X)return;const me=X;tet(me,te).then(({removed:Ee})=>{if(Ee)return Ei(me)}).catch(()=>ze(pne()))}async function Ns(te){if(!X||jn)return;const me=X;ze(null),nn(te);try{await net(me,te),await Ei(me)}catch{ze(Nne())}finally{nn(null)}}M.useEffect(()=>{if(!In||a!=="chat")return;function te(me){var Ee;me.key!=="Escape"||me.defaultPrevented||(me.preventDefault(),gt(),(Ee=Nt.current)==null||Ee.focus())}return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[In,X,a]);function fs(te){An.current.add(te),P(me=>me.filter(Ee=>Ee.id!==te)),J(me=>me===te?null:me),L(me=>{if(!me.has(te))return me;const Ee=new Set(me);return Ee.delete(te),Ee}),ht.current.delete(te),Je.current.delete(te),tt({type:"forget",sessionId:te})}function ji(te,me){const Ee=te.archived;P(je=>je.map(Ve=>Ve.id===te.id?{...Ve,archived:me}:Ve)),Kk(B,me)||J(je=>je===te.id?null:je),ZJe(te.id,me).catch(()=>{P(je=>je.map(Ve=>Ve.id===te.id?{...Ve,archived:Ee}:Ve))})}function Bo(te,me){const Ee=te.title;P(je=>je.map(Ve=>Ve.id===te.id?{...Ve,title:me}:Ve)),QJe(te.id,me).catch(()=>{P(je=>je.map(Ve=>Ve.id===te.id?{...Ve,title:Ee}:Ve))})}async function pa(te){var Ee;const me=((Ee=te.title)==null?void 0:Ee.trim())||rb();if(window.confirm(jK({title:Ra(me)}))){try{await XJe(te.id)}catch(je){Ms(RK({title:Ra(me),error:we(je instanceof Error?je.message:String(je))}),"error");return}fs(te.id)}}const Vi=M.useCallback(te=>{if(!X)return Promise.resolve(!1);const me=X;return tt({type:"busy",sessionId:me,busy:!0}),kr(()=>uet(me,te)).then(()=>!0).catch(()=>!1).finally(()=>{Lu(me).then(({messages:Ee,queued:je,activeLeafId:Ve})=>tt({type:"seed",sessionId:me,messages:Ee,queued:je,activeLeafId:Ve})).catch(()=>{}),H0(e).then(Ee=>{var je;return tt({type:"busy",sessionId:me,busy:!!((je=Ee.find(Ve=>Ve.id===me))!=null&&je.busy)})}).catch(()=>{})})},[X,e,kr]),$o=H.filter(te=>Kk(B,te.archived)),Wh=/Mac|iPhone|iPad/.test(navigator.platform),Qm=Wh?"⌘ ⇧ Enter":"Ctrl + Shift + Enter",Jm=Wh?"⌘ Enter":"Ctrl + Enter",Cd=M.useCallback(()=>{Y("active"),J(null),l("chat")},[l]),eg=M.useCallback(te=>{Y("all"),J(te),l("chat")},[l]);M.useEffect(()=>{const te=me=>{me.repeat||me.key!=="Enter"||!me.metaKey&&!me.ctrlKey||me.altKey||!me.shiftKey||(me.preventDefault(),Cd())};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[Cd]);const Kh=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]:py-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:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${c?"active":""}`,onClick:x,children:[f.jsx(Gf,{size:15}),dQ()]}),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 ${d?"active":""}`,"data-onboarding":"nav-artifacts",onClick:h,children:[f.jsx(Ox,{size:15}),uX()]}),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 ${o?"active":""}`,onClick:_,children:[f.jsx(Lx,{size:15}),sQ()]}),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 ${a==="skills"?"active":""}`,onClick:()=>l("skills"),children:[f.jsx(bN,{size:15}),SZ()]}),f_t.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 ${a!=="chat"&&a!=="skills"&&te.activeTabs.includes(a)?"active":""}`,"data-onboarding":te.id==="compute"?"nav-compute":void 0,onClick:()=>l(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-1.5 ps-4.5",children:[f.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:((Yh=KT.find(te=>te.id===B))==null?void 0:Yh.railLabel())??kE()}),f.jsxs("div",{className:"rail-section-actions flex items-center gap-0.5",children:[f.jsxs("button",{className:"rail-section-new inline-flex items-center gap-1 py-[3px] px-1.5 rounded-sm text-subtext text-sm font-medium [&:hover]:text-text [&:hover]:bg-surface tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":Qm,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:Cd,children:[f.jsx(Bx,{size:13}),ite()]}),f.jsx(H0t,{value:B,onChange:Y})]})]}),f.jsxs("div",{className:"rail-body",children:[$o.map(te=>f.jsx(q0t,{session:te,active:te.id===X&&a==="chat",unread:$.has(te.id),busy:ot.busySessions.has(te.id),waiting:Ya.has(te.id),revealTitle:lr.get(te.id),onOpen:()=>{J(te.id),e===lb&&z_t(te.id),L(me=>{if(!me.has(te.id))return me;const Ee=new Set(me);return Ee.delete(te.id),Ee}),l("chat")},onRename:me=>Bo(te,me),onSetArchived:me=>ji(te,me),onDelete:()=>void pa(te)},te.id)),$o.length===0&&f.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:B==="archived"?bY():H.length>0?uY():wY()})]}),C.kind==="ssh"?f.jsx(Af,{runtime:C}):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(Gt,{size:"small","aria-label":UE(),"aria-haspopup":"dialog",onClick:()=>W(!0),children:f.jsx($2,{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:FE()}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",we(C.version)]})]})]})}),F&&f.jsx(G0t,{onClose:()=>W(!1),onConfigureSsh:()=>{W(!1),G(!0)}}),Z&&f.jsx(vT,{onClose:()=>{G(!1),W(!0)}})]}),Wc=`chat-header flex items-center gap-2 py-0 px-4 bg-background shrink-0 h-12 relative z-4 w-full max-w-readable my-0 mx-auto [&.rail-hidden]:max-w-none [&.rail-hidden]:py-0 [&.rail-hidden]:px-0.5 [&::after]:content-[''] [&::after]:absolute [&::after]:top-full [&::after]:start-0 [&::after]:end-0 [&::after]:h-6 [&::after]:bg-[linear-gradient(to_bottom,_var(--base),_transparent)] [&::after]:pointer-events-none${r?"":" rail-hidden"}`,Ho=!r&&f.jsx(Gt,{title:l7(),"aria-label":l7(),onClick:s,children:f.jsx(jN,{size:15})});return a!=="chat"?f.jsxs(f.Fragment,{children:[r&&Kh,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:Wc,children:Ho}),f.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:O})]})]}):f.jsxs(f.Fragment,{children:[r&&Kh,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[f.jsxs("div",{className:Wc,children:[Ho,f.jsx(nh,{variant:"header",title:Bn?((Ed=Bn.title)==null?void 0:Ed.trim())||rb():F6(),children:Bn?f.jsx(YT,{title:((Nd=Bn.title)==null?void 0:Nd.trim())||rb(),animate:ks!==void 0},ks??"static"):F6()}),j&&f.jsx(Gt,{"data-tip":U6(),"aria-label":U6(),onClick:j,children:f.jsx(PXe,{size:15})})]}),Pl?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(Mt,{}),f.jsx("span",{children:IQ()})]}):Ps?f.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:Bt,onScroll:te=>{Qa(te.currentTarget),Tn.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:He,children:[f.jsx($0t,{messages:sr,allMessages:ti,canFork:ua,onFork:$t,onSelectFork:Rn,busy:In,onOpenFile:$r,onOpenRun:g,onOpenSpawnedSession:eg,runExperimentName:S,onOpenExperiment:k,experimentName:v,onRespond:Vi,onOpenPlan:br,onOpenSubagent:ds,recoveringTurnId:Wt,onRecover:ft,skills:ki}),In&&Xa&&f.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:kte()}),In&&!Xa&&!Sd&&!Vc&&f.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:f.jsx("span",{className:"tool-running-shimmer",children:pre()})})]})}):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(Gx,{})}),f.jsx("h2",{children:zte()}),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(Gf,{size:19}),f.jsx("span",{children:n})]}),Fl&&f.jsx("div",{className:Xk,role:"status","aria-live":"polite","aria-label":qee(),"aria-busy":"true",children:Yk.map((te,me)=>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 ${uv[me].box}`,children:[f.jsxs("span",{className:`flex w-full items-center gap-2.5 ${uv[me].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"})]},me))}),zi&&zi.length>0&&f.jsx("div",{className:Xk,role:"group","aria-label":Kee(),children:zi.map((te,me)=>{const Ee=Yk[me],je=uv[me];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 ${je.box}`,onClick:()=>kd(te.prompt),children:[f.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[f.jsx(Ee,{size:17,className:je.icon}),te.title]}),f.jsx("span",{className:"w-full truncate text-sm text-subtext",children:te.prompt})]},me)})})]}),Tn.action&&f.jsxs(Ue,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:Tn.action.x,top:Tn.action.top,transform:"translateX(-50%)"},onMouseDown:te=>te.preventDefault(),onClick:Tn.add,children:[f.jsx(zN,{size:14}),_X()]}),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:[Ps&&f.jsx(Gt,{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 ${_n?"opacity-0":"opacity-100"}`,title:d7(),"aria-label":d7(),inert:_n,onClick:ie,children:In&&!Xa?f.jsx(Dx,{size:18,className:"tool-running-shimmer-icon"}):f.jsx(kXe,{size:16})}),Br&&!(Wr&&Br.promptId===Wr.promptId)&&f.jsx(qft,{synthesized:Br.synthesized,agentLabel:Bn?jf[Bn.harness]:dre(),showResumeModes:(Bn==null?void 0:Bn.harness)==="claude-code",onView:te=>br==null?void 0:br(Br.plan,Br.promptId,te),onApprove:te=>Vi({promptId:Br.promptId,approve:!0,...te?{resumeMode:te}:{}}),onReject:()=>Vi({promptId:Br.promptId,approve:!1}),onRevise:te=>{X&&Oo({sessionId:X,promptId:Br.promptId}),Vi({promptId:Br.promptId,approve:!1,note:te})}}),ir.length>0&&f.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:ir.map((te,me)=>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(LN,{size:13,className:"shrink-0 text-accent-amber"}):f.jsx(WXe,{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"?Ret(te.nextRetryAt,fa):ene()}),te.dispatchState==="blocked"?f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>void Ns(te.id),"aria-label":RB({text:te.text}),disabled:jn!==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:jn===te.id?VE():zc()}),f.jsx("button",{onClick:()=>Kr(te.id),"aria-label":jB({text:te.text}),disabled:jn!==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:GJ()}),me===Hl&&meKr(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))}),f.jsxs("div",{className:`composer-box relative flex flex-col border ${gr?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[Ze&&!Ze.agentReady&&f.jsxs("div",{className:"composer-harness-warning py-2 px-3 text-subtext text-sm leading-normal border-b border-b-border-variant [&_strong]:text-accent-amber [&_strong]:font-medium [&_code]:font-mono [&_code]:text-text",children:[f.jsxs("strong",{children:[Ze.name," ",bQ()]})," ",Ze.agentNote?Bh(Ze.agentNote):one()]}),ei&&f.jsx(p_t,{skills:Gr,activeIndex:Vr,onPick:Ir,onHover:Sn}),le.length>0&&f.jsx(Z_t,{annotations:le,onClear:()=>{ae([]),window.requestAnimationFrame(()=>{var te;return(te=Nt.current)==null?void 0:te.focus()})},onRemove:te=>{const me=le.filter(Ee=>Ee.id!==te);ae(me),me.length===0&&window.requestAnimationFrame(()=>{var Ee;return(Ee=Nt.current)==null?void 0:Ee.focus()})}}),oe.length>0&&f.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:oe.map((te,me)=>{const Ee=()=>ce(je=>je.filter((Ve,kt)=>kt!==me));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(Xu,{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:r7(),"aria-label":r7(),onClick:Ee,children:f.jsx(Ur,{size:11})})]},me):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:Ote()}),f.jsx("button",{title:s7(),"aria-label":s7(),onClick:Ee,children:f.jsx(Ur,{size:11})})]},me)})}),_e&&f.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:_e}),Ne&&f.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Ne}),f.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${gr?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[f.jsx("textarea",{dir:"auto",ref:Nt,className:"relative z-1 bg-transparent",value:V,placeholder:es?Ere():ha&&Ze?Jne({harness:we(jf[Ze.id]),shortcut:we(Jm)}):Zt?Ze!=null&&Ze.agentReady?JK({harness:we(jf[Zt.harness])}):YK({harness:we(jf[Zt.harness])}):qW(),rows:2,onPaste:pr,onDragOver:te=>{te.dataTransfer.types.includes("Files")&&te.preventDefault()},onDrop:te=>{te.dataTransfer.files.length!==0&&(te.preventDefault(),Wn(Array.from(te.dataTransfer.files)))},onChange:te=>{const me=te.target.value,Ee=te.target.selectionStart;cr(Ee);const je=Ee>0&&/\s/.test(me[Ee-1])&&!es&&!Qr.current&&$k(me)===null?nv(me,Ee-1):null;if((je==null?void 0:je.query)==="plan"&&(Rt!=null&&Rt.planActivation)){ws(me,je);return}const Ve=je?ki.find(kt=>kt.source!=="command"&&kt.name===je.query):void 0;if(Ve&&je){const kt=Lk(me,je,Ve.name,2);se(kt.text),window.requestAnimationFrame(()=>{var Cn;(Cn=Nt.current)==null||Cn.setSelectionRange(kt.cursor,kt.cursor),cr(kt.cursor)});return}se(me),kn(!1)},onSelect:te=>cr(te.currentTarget.selectionStart),onCompositionStart:()=>{Qr.current=!0},onCompositionEnd:()=>{Qr.current=!1},onKeyDown:te=>{if(ei){if(te.key==="ArrowDown"||te.key==="ArrowUp"){te.preventDefault();const me=te.key==="ArrowDown"?1:-1;Sn((Vr+me+Gr.length)%Gr.length);return}if(te.key==="Tab"||te.key==="Enter"){te.preventDefault(),Ir(Gr[Vr]);return}if(te.key==="Escape"){te.preventDefault(),kn(!0);return}}if(te.key==="Backspace"&&Si(te.currentTarget)){te.preventDefault();return}if(te.key==="Enter"&&!te.shiftKey&&!te.nativeEvent.isComposing){if(te.preventDefault(),gr){Oe();return}ve({queue:te.metaKey||te.ctrlKey})}}}),f.jsx(S_t,{text:V,isCommand:Lo,skills:ki,projectId:e,textareaRef:Nt})]}),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:pn.ref,children:[f.jsx(Gt,{type:"button",className:"composer-bare",title:tb(),"aria-label":tb(),"aria-haspopup":"dialog","aria-expanded":pn.open,onClick:()=>pn.setOpen(te=>!te),children:f.jsx(lQe,{size:16})}),pn.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:tb()}),f.jsx(znt,{})]})]}),f.jsx("input",{ref:pt,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:te=>{Wn(Array.from(te.target.files??[])),te.target.value=""}}),f.jsx(Gt,{type:"button",className:"composer-attach",title:G6(),"aria-label":G6(),onClick:()=>{var te;return(te=pt.current)==null?void 0:te.click()},children:f.jsx(GZe,{size:16})}),mr&&f.jsxs(Ue,{type:"button",variant:"ghost",active:!0,className:"group",title:Q6(),"aria-label":Q6(),onClick:()=>void $s(),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(zZe,{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:QQ()})]}),gr&&f.jsxs(Ue,{type:"button",variant:"ghost",active:!0,className:"group",title:Z6(),"aria-label":Z6(),onClick:De,children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(Nh,{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:yE()})]}),f.jsx("div",{className:"min-w-0 flex-1"}),f.jsxs("div",{className:"flex min-w-0 items-center",children:[f.jsx(iht,{value:Zt,onSelect:Is,permissionChoices:Ze!=null&&Ze.agentReady?(Rt==null?void 0:Rt.permissionModes)??[]:[],defaultPermissionId:(Rt==null?void 0:Rt.defaultPermissionMode)??null,onSelectPermission:Bs,reasoningChoices:Ze!=null&&Ze.agentReady?ca.choices:[],defaultReasoningId:ca.defaultId,onSelectReasoning:ys,onHarnesses:ke,lockHarness:!!Tt}),f.jsx(C_t,{usage:Tt==null?void 0:Tt.contextUsage})]}),In&&!es?f.jsx(Gt,{className:"send-btn",variant:"stop",title:c7(),"aria-label":c7(),onClick:gt,children:f.jsx(Ur,{size:16})}):f.jsx(Gt,{className:"send-btn",variant:"primary",title:gr?a7():Dv(),"aria-label":gr?a7():Dv(),onClick:()=>void(gr?Oe():ve()),disabled:gr?!cs||!X&&!(Ze!=null&&Ze.agentReady):!(Ze!=null&&Ze.agentReady)||!V.trim()&&oe.length===0&&le.length===0,children:f.jsx(kN,{size:16})})]})]})]})]})]})}function bo({className:e,...n}){return f.jsx("div",{className:os("relative flex min-h-0 flex-1 flex-col",e),...n})}function qu({className:e,...n}){return f.jsx("div",{className:os("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Qi({className:e,...n}){return f.jsx("div",{className:os("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const Zk=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function W0t({sessionId:e,spawnPartId:n,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:a,experimentName:l,onOpenSubagent:o}){const[c,d]=M.useState(null),_=M.useRef(null),h=M.useRef(null),m=M.useRef(!0);if(M.useLayoutEffect(()=>{m.current=!0;const S=_.current;S&&(S.scrollTop=S.scrollHeight)},[e,n]),M.useLayoutEffect(()=>{const S=_.current;S&&m.current&&(S.scrollTop=S.scrollHeight)},[c]),M.useEffect(()=>{const S=_.current,k=h.current;if(!S||!k)return;const v=new ResizeObserver(()=>{m.current&&(S.scrollTop=S.scrollHeight)});return v.observe(k),v.observe(S),()=>v.disconnect()},[c===null]),M.useEffect(()=>{let S=!0;const k=new Set;let v=0;const b=()=>{const x=++v;Lu(e).then(({messages:C})=>{!S||x!==v||d(j=>{if(!j)return C;const N=C.map(z=>k.has(z.id)?j.find(D=>D.id===z.id)??z:z),T=new Set(C.map(z=>z.id));return[...N,...j.filter(z=>!T.has(z.id))]})}).catch(()=>S&&d(C=>C??[]))};b();const w=Vf(x=>{if(x.type==="reconnected"){k.clear(),b();return}x.type!=="message"||x.sessionId!==e||(k.add(x.message.id),d(C=>{const j=C?C.slice():[],N=j.findIndex(T=>T.id===x.message.id);return N===-1?j.push(x.message):j[N]=x.message,j}))});return()=>{S=!1,w()}},[e]),c===null)return f.jsx(bo,{children:f.jsx("div",{className:Zk,children:f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:PVe()})})});let g=null;for(const S of c)if(g=y4(S.parts,n),g)break;return f.jsx(bo,{children:f.jsx("div",{className:Zk,ref:_,onScroll:S=>{const k=S.currentTarget;m.current=k.scrollHeight-k.scrollTop-k.clientHeight<60},children:f.jsx("div",{ref:h,children:g?f.jsx(L0t,{spawn:g,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:a,experimentName:l,onOpenSubagent:o}):f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:GVe()})})})})}function Qk(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 yn(e){for(var n=1;n=0||(_[c]=l[c]);return _})(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function un(e,n){return ZT(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var a,l,o,c,d=[],_=!0,h=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;_=!1}else for(;!(_=(a=o.call(s)).done)&&(d.push(a.value),d.length!==r);_=!0);}catch(m){h=!0,l=m}finally{try{if(!_&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(h)throw l}}return d}})(e,n)||Em(e,n)||JT()}function XT(e){return ZT(e)||QT(e)||Em(e)||JT()}function mi(e){return(function(n){if(Array.isArray(n))return V2(n)})(e)||QT(e)||Em(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 ZT(e){if(Array.isArray(e))return e}function QT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Em(e,n){if(e){if(typeof e=="string")return V2(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)?V2(e,n):void 0}}function V2(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 a,l=!0,o=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return l=c.done,c},e:function(c){o=!0,a=c},f:function(){try{l||t.return==null||t.return()}finally{if(o)throw a}}}}var w0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hh(e,n){return e(n={exports:{}},n.exports),n.exports}var hi=Hh((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,x):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var j=b.slice(x+1);j.indexOf("file mode")===0&&(l[C==="new"?"newMode":"oldMode"]=j.slice(10));break;case"similarity":l.similarity=parseInt(b.split(" ")[2],10);break;case"index":var N=b.slice(x+1).split(" "),T=N[0].split("..");l.oldRevision=T[0],l.newRevision=T[1],N[1]&&(l.oldMode=l.newMode=N[1]);break;case"copy":case"rename":var z=b.slice(x+1);z.indexOf("from")===0?l.oldPath=z.slice(5):l.newPath=z.slice(3),w=C;break;case"---":var D=b.slice(x+1),O=g[++k].slice(4);D==="/dev/null"?(O=O.slice(2),w="add"):O==="/dev/null"?(D=D.slice(2),w="delete"):(w="modify",D=D.slice(2),O=O.slice(2)),D&&(l.oldPath=D),O&&(l.newPath=O),m=5;break e}}l.type=w||"modify"}else if(v.indexOf("Binary")===0)l.isBinary=!0,l.type=v.indexOf("/dev/null and")>=0?"add":v.indexOf("and /dev/null")>=0?"delete":"modify",m=2,l=null;else if(m===5)if(v.indexOf("@@")===0){var H=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);o={content:v,oldStart:H[1]-0,newStart:H[4]-0,oldLines:H[3]-0||1,newLines:H[6]-0||1,changes:[]},l.hunks.push(o),c=o.oldStart,d=o.newStart}else{var P=v.slice(0,1),F={content:v.slice(1)};switch(P){case"+":F.type="insert",F.isInsert=!0,F.lineNumber=d,d++;break;case"-":F.type="delete",F.isDelete=!0,F.lineNumber=c,c++;break;case" ":F.type="normal",F.isNormal=!0,F.oldLineNumber=c,F.newLineNumber=d,c++,d++;break;case"\\":var W=o.changes[o.changes.length-1];W.isDelete||(l.newEndingNewLine=!1),W.isInsert||(l.oldEndingNewLine=!1)}F.type&&o.changes.push(F)}k++}return h}};e.exports=s})()}));function Bl(e){return e.type==="insert"}function gi(e){return e.type==="delete"}function No(e){return e.type==="normal"}function Z0t(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(a,l,o){var c=un(a,3),d=c[0],_=c[1],h=c[2];return _?Bl(l)&&h>=0?(d.splice(h+1,0,l),[d,l,h+2]):(d.push(l),[d,l,gi(l)&&gi(_)?h:o]):(d.push(l),[d,l,gi(l)?o:-1])}),[[],null,-1]);return un(s,1)[0]})(e.changes):e.changes;return yn(yn({},e),{},{isPlain:!1,changes:t})}function W2(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(` -`),a=r.indexOf(` -`,s+1),l=r.slice(0,s),o=r.slice(s+1,a),c=l.split(" ").slice(1,-3).join(" "),d=o.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(c," b/").concat(d),"index 1111111..2222222 100644","--- a/".concat(c),"+++ b/".concat(d),r.slice(a+1)].join(` -`)})(e.trimStart());return X0t.parse(t).map((function(r){return(function(s,a){var l=s.hunks.map((function(o){return Z0t(o,a)}));return yn(yn({},s),{},{hunks:l})})(r,n)}))}function Q0t(e){return e[0]}function J0t(e){return e[e.length-1]}function K2(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function sh(e){return e==="old"?function(n){return Bl(n)?-1:No(n)?n.oldLineNumber:n.lineNumber}:function(n){return gi(n)?-1:No(n)?n.newLineNumber:n.lineNumber}}function tM(e,n){return function(t,r){var s=t[e],a=s+t[n];return r>=s&&r=a&&s-1},opt=function(e,n){var t=this.__data__,r=Nm(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function Au(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var d=a.get(e),_=a.get(n);if(d&&_)return d==n&&_==e;var h=-1,m=!0,g=2&t?new qpt:void 0;for(a.set(e,n),a.set(n,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Vn={};Vn["[object Float32Array]"]=Vn["[object Float64Array]"]=Vn["[object Int8Array]"]=Vn["[object Int16Array]"]=Vn["[object Int32Array]"]=Vn["[object Uint8Array]"]=Vn["[object Uint8ClampedArray]"]=Vn["[object Uint16Array]"]=Vn["[object Uint32Array]"]=!0,Vn["[object Arguments]"]=Vn["[object Array]"]=Vn["[object ArrayBuffer]"]=Vn["[object Boolean]"]=Vn["[object DataView]"]=Vn["[object Date]"]=Vn["[object Error]"]=Vn["[object Function]"]=Vn["[object Map]"]=Vn["[object Number]"]=Vn["[object Object]"]=Vn["[object RegExp]"]=Vn["[object Set]"]=Vn["[object String]"]=Vn["[object WeakMap]"]=!1;var amt=function(e){return ad(e)&&C4(e.length)&&!!Vn[wd(e)]},omt=function(e){return function(n){return e(n)}},aC=Hh((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&sM.process,a=(function(){try{var l=r&&r.require&&r.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}})();e.exports=a})),oC=aC&&aC.isTypedArray,E4=oC?omt(oC):amt,lmt=Object.prototype.hasOwnProperty,cmt=function(e,n){var t=vi(e),r=!t&&Tm(e),s=!t&&!r&&jp(e),a=!t&&!r&&!s&&E4(e),l=t||r||s||a,o=l?tmt(e.length,String):[],c=o.length;for(var d in e)!lmt.call(e,d)||l&&(d=="length"||s&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||uM(d,c))||o.push(d);return o},umt=Object.prototype,dM=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||umt)},dmt=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),fmt=Object.prototype.hasOwnProperty,fM=function(e){if(!dM(e))return dmt(e);var n=[];for(var t in Object(e))fmt.call(e,t)&&t!="constructor"&&n.push(t);return n},Mm=function(e){return e!=null&&C4(e.length)&&!aM(e)},N4=function(e){return Mm(e)?cmt(e):fM(e)},lC=function(e){return Xpt(e,N4,emt)},hmt=Object.prototype.hasOwnProperty,_mt=function(e,n,t,r,s,a){var l=1&t,o=lC(e),c=o.length;if(c!=lC(n).length&&!l)return!1;for(var d=c;d--;){var _=o[d];if(!(l?_ in n:hmt.call(n,_)))return!1}var h=a.get(e),m=a.get(n);if(h&&m)return h==n&&m==e;var g=!0;a.set(e,n),a.set(n,e);for(var S=l;++d1)return!1;if(e.length===1){var n=un(e,1)[0];return n.type==="text"&&!n.value}return!0}function ngt(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,a=Tl(e,egt),l=s?function(o,c){return s(o,hC,c)}:hC;return f.jsx("td",yn(yn({},a),{},{"data-change-key":n,children:r?tgt(r)?" ":r.map(l):t||" "}))}var xM=M.memo(ngt);function yM(e,n){return function(){var t=n==="old"?Im(e):Bm(e);return t===-1?void 0:t}}function wM(e,n){return function(t){return e&&t?f.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function Ap(e,n){return n?function(t){e(),n(t)}:e}function _C(e,n,t,r){return M.useMemo((function(){var s=vM(e,(function(a){return function(l){return a&&a(n,l)}}));return s.onMouseEnter=Ap(t,s.onMouseEnter),s.onMouseLeave=Ap(r,s.onMouseLeave),s}),[e,t,r,n])}function pC(e,n,t,r,s,a,l,o,c){var d={change:n,side:r,inHoverState:o,renderDefault:yM(n,r),wrapInAnchor:wM(s,a)};return f.jsx("td",yn(yn({className:e},l),{},{"data-change-key":t,children:c(d)}))}function rgt(e){var n,t,r,s=e.change,a=e.selected,l=e.tokens,o=e.className,c=e.generateLineClassName,d=e.gutterClassName,_=e.codeClassName,h=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,S=e.gutterAnchor,k=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,w=s.type,x=s.content,C=kl(s),j=(n=un(M.useState(!1),2),t=n[0],r=n[1],[t,M.useCallback((function(){return r(!0)}),[]),M.useCallback((function(){return r(!1)}),[])]),N=un(j,3),T=N[0],z=N[1],D=N[2],O=M.useMemo((function(){return{change:s}}),[s]),H=_C(h,O,z,D),P=_C(m,O,z,D),F=k(s),W=c({changes:[s],defaultGenerate:function(){return o}}),Z=hi("diff-gutter","diff-gutter-".concat(w),d,{"diff-gutter-selected":a}),G=hi("diff-code","diff-code-".concat(w),_,{"diff-code-selected":a});return f.jsxs("tr",{id:F,className:hi("diff-line",W),children:[!g&&pC(Z,s,C,"old",S,F,H,T,b),!g&&pC(Z,s,C,"new",S,F,H,T,b),f.jsx(xM,yn({className:G,changeKey:C,text:x,tokens:l,renderToken:v},P))]})}var sgt=M.memo(rgt);function igt(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 agt=["hideGutter","selectedChanges","tokens","lineClassName"],ogt=["hunk","widgets","className"];function lgt(e){var n=e.hunk,t=e.widgets,r=e.className,s=Tl(e,ogt),a=(function(l,o){return l.reduce((function(c,d){var _=kl(d);c.push(["change",_,d]);var h=o[_];return h&&c.push(["widget",_,h]),c}),[])})(n.changes,t);return f.jsx("tbody",{className:hi("diff-hunk",r),children:a.map((function(l){return(function(o,c){var d=un(o,3),_=d[0],h=d[1],m=d[2],g=c.hideGutter,S=c.selectedChanges,k=c.tokens,v=c.lineClassName,b=Tl(c,agt);if(_==="change"){var w=gi(m)?"old":"new",x=gi(m)?Im(m):Bm(m),C=k?k[w][x-1]:null;return f.jsx(sgt,yn({className:v,change:m,hideGutter:g,selected:S.includes(h),tokens:C},b),"change".concat(h))}return _==="widget"?f.jsx(igt,{hideGutter:g,element:m},"widget".concat(h)):null})(l,s)}))})}var SM=0;function k0(e,n,t,r){var s=M.useCallback((function(){return n(e)}),[e,n]),a=M.useCallback((function(){return n("")}),[n]);return M.useMemo((function(){var l=vM(r,(function(o){return function(c){return o&&o({side:e,change:t},c)}}));return l.onMouseEnter=Ap(s,l.onMouseEnter),l.onMouseLeave=Ap(a,l.onMouseLeave),l}),[t,r,s,e,a])}function hv(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,a=e.gutterClassName,l=e.codeClassName,o=e.gutterEvents,c=e.codeEvents,d=e.anchorID,_=e.gutterAnchor,h=e.gutterAnchorTarget,m=e.hideGutter,g=e.hover,S=e.renderToken,k=e.renderGutter;if(!n){var v=hi("diff-gutter","diff-gutter-omit",a),b=hi("diff-code","diff-code-omit",l);return[!m&&f.jsx("td",{className:v},"gutter"),f.jsx("td",{className:b},"code")]}var w=n.type,x=n.content,C=kl(n),j=t===SM?"old":"new",N=yn({id:d||void 0,className:hi("diff-gutter","diff-gutter-".concat(w),G2({"diff-gutter-selected":r},"diff-line-hover-"+j,g),a),children:k({change:n,side:j,inHoverState:g,renderDefault:yM(n,j),wrapInAnchor:wM(_,h)})},o),T=hi("diff-code","diff-code-".concat(w),G2({"diff-code-selected":r},"diff-line-hover-"+j,g),l);return[!m&&f.jsx("td",yn(yn({},N),{},{"data-change-key":C}),"gutter"),f.jsx(xM,yn({className:T,changeKey:C,text:x,tokens:s,renderToken:S},c),"code")]}function cgt(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,a=e.newSelected,l=e.oldTokens,o=e.newTokens,c=e.monotonous,d=e.gutterClassName,_=e.codeClassName,h=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,S=e.generateAnchorID,k=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,w=e.renderGutter,x=un(M.useState(""),2),C=x[0],j=x[1],N=k0("old",j,t,h),T=k0("new",j,r,h),z=k0("old",j,t,m),D=k0("new",j,r,m),O=t&&S(t),H=r&&S(r),P=k({changes:[t,r],defaultGenerate:function(){return n}}),F={monotonous:c,hideGutter:g,gutterClassName:d,codeClassName:_,gutterEvents:h,codeEvents:m,renderToken:b,renderGutter:w},W=yn(yn({},F),{},{change:t,side:SM,selected:s,tokens:l,gutterEvents:N,codeEvents:z,anchorID:O,gutterAnchor:v,gutterAnchorTarget:O,hover:C==="old"}),Z=yn(yn({},F),{},{change:r,side:1,selected:a,tokens:o,gutterEvents:T,codeEvents:D,anchorID:t===r?null:H,gutterAnchor:v,gutterAnchorTarget:t===r?O:H,hover:C==="new"});if(c)return f.jsx("tr",{className:hi("diff-line",P),children:hv(t?W:Z)});var G=(function(X,J){return X&&!J?"diff-line-old-only":!X&&J?"diff-line-new-only":X===J?"diff-line-normal":"diff-line-compare"})(t,r);return f.jsxs("tr",{className:hi("diff-line",G,P),children:[hv(W),hv(Z)]})}var ugt=M.memo(cgt);function dgt(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 fgt=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],hgt=["hunk","widgets","className"];function C0(e,n){return(e?kl(e):"00")+(n?kl(n):"00")}function _gt(e){var n=e.hunk,t=e.widgets,r=e.className,s=Tl(e,hgt),a=(function(l,o){for(var c=function(b){if(!b)return null;var w=kl(b);return o[w]||null},d=[],_=0;_=(a==null?void 0:a.value.length))return[e];var o=function(h,m){var g=a.value.slice(h,m);return[].concat(mi(s),[yn(yn({},a),{},{value:g})])};if(n>0){var c=o(0,n);l.push(Iu(c))}var d=o(Math.max(n,0),t);if(l.push(r?(function(h,m){return[m].concat(mi(Iu(h)))})(d,r):Iu(d)),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=Tl(e,Dgt);t.push(s);var a,l=S4(r);try{for(l.s();!(a=l.n()).done;)NM(a.value,n,t)}catch(o){l.e(o)}finally{l.f()}t.pop()}else n.push(Iu([].concat(mi(t.slice(1)),[e])));return n}function Lgt(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var d=M4(c);return d.value.includes(` -`)?d.value.split(` -`).map((function(_){return Tgt(c,yn(yn({},d),{},{value:_}))})):[c]})(t),a=XT(s),l=a[0],o=a.slice(1);return[].concat(mi(n.slice(0,-1)),[[].concat(mi(r),[l])],mi(o.map((function(c){return[c]}))))}),[[]])}function vC(e){return Lgt(NM(e))}var Ogt=function(e,n,t){var r=(t=typeof t=="function"?t:void 0)?t(e,n):void 0;return r===void 0?Rm(e,n,void 0,t):!!r},Igt=function(e,n){return Rm(e,n)},Bgt=function(e){var n=e==null?0:e.length;return n?e[n-1]:void 0};function $gt(e,n){if(!e.children)throw new Error("parent node missing children property");var t,r,s=Bgt(e.children);return s&&(r=n,(t=s).type===r.type&&(t.type==="text"||t.children&&r.children&&Ogt(t,r,(function(a,l,o){return o==="chlidren"||Igt(a,l)}))))?e.children[e.children.length-1]=(function(a,l){return"value"in a&&"value"in l?yn(yn({},a),{},{value:"".concat(a.value).concat(l.value)}):a})(s,n):e.children.push(n),e.children[e.children.length-1]}function xC(e){var n,t={type:"root",children:[]},r=S4(e);try{var s=function(){var a=n.value;a.reduce((function(l,o,c){return $gt(l,c===a.length-1?yn({},o):yn(yn({},o),{},{children:[]}))}),t)};for(r.s();!(n=r.n()).done;)s()}catch(a){r.e(a)}finally{r.f()}return t}var Hgt=Object.prototype.hasOwnProperty,Pgt=CM((function(e,n,t){Hgt.call(e,t)?e[t].push(n):A4(e,t,[n])})),Fgt=Object.prototype.hasOwnProperty,Ugt=function(e){if(e==null)return!0;if(Mm(e)&&(vi(e)||typeof e=="string"||typeof e.splice=="function"||jp(e)||E4(e)||Tm(e)))return!e.length;var n=J2(e);if(n=="[object Map]"||n=="[object Set]")return!e.size;if(dM(e))return!fM(e).length;for(var t in e)if(Fgt.call(e,t))return!1;return!0},qgt=function(e,n){var t=n.start,r=n.length,s=t+r,a=e.reduce((function(l,o){var c=un(l,2),d=c[0],_=c[1],h=_+M4(o).value.length;if(_>s||hr.length?t:r,c=t.length>r.length?r:t,d=o.indexOf(c);if(d!=-1)return l=[new n.Diff(1,o.substring(0,d)),new n.Diff(0,c),new n.Diff(1,o.substring(d+c.length))],t.length>r.length&&(l[0][0]=l[2][0]=-1),l;if(c.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var _=this.diff_halfMatch_(t,r);if(_){var h=_[0],m=_[1],g=_[2],S=_[3],k=_[4],v=this.diff_main(h,g,s,a),b=this.diff_main(m,S,s,a);return v.concat([new n.Diff(0,k)],b)}return s&&t.length>100&&r.length>100?this.diff_lineMode_(t,r,a):this.diff_bisect_(t,r,a)},n.prototype.diff_lineMode_=function(t,r,s){var a=this.diff_linesToChars_(t,r);t=a.chars1,r=a.chars2;var l=a.lineArray,o=this.diff_main(t,r,!1,s);this.diff_charsToLines_(o,l),this.diff_cleanupSemantic(o),o.push(new n.Diff(0,""));for(var c=0,d=0,_=0,h="",m="";c=1&&_>=1){o.splice(c-d-_,d+_),c=c-d-_;for(var g=this.diff_main(h,m,!1,s),S=g.length-1;S>=0;S--)o.splice(c,0,g[S]);c+=g.length}_=0,d=0,h="",m=""}c++}return o.pop(),o},n.prototype.diff_bisect_=function(t,r,s){for(var a=t.length,l=r.length,o=Math.ceil((a+l)/2),c=o,d=2*o,_=new Array(d),h=new Array(d),m=0;ms);x++){for(var C=-x+k;C<=x-v;C+=2){for(var j=c+C,N=(H=C==-x||C!=x&&_[j-1]<_[j+1]?_[j+1]:_[j-1]+1)-C;Ha)v+=2;else if(N>l)k+=2;else if(S&&(D=c+g-C)>=0&&D=(z=a-h[D]))return this.diff_bisectSplit_(t,r,H,N,s)}for(var T=-x+b;T<=x-w;T+=2){for(var z,D=c+T,O=(z=T==-x||T!=x&&h[D-1]a)w+=2;else if(O>l)b+=2;else if(!S&&(j=c+g-T)>=0&&j=(z=a-z))return this.diff_bisectSplit_(t,r,H,N,s)}}}return[new n.Diff(-1,t),new n.Diff(1,r)]},n.prototype.diff_bisectSplit_=function(t,r,s,a,l){var o=t.substring(0,s),c=r.substring(0,a),d=t.substring(s),_=r.substring(a),h=this.diff_main(o,c,!1,l),m=this.diff_main(d,_,!1,l);return h.concat(m)},n.prototype.diff_linesToChars_=function(t,r){var s=[],a={};function l(d){for(var _="",h=0,m=-1,g=s.length;ma?t=t.substring(s-a):sr.length?t:r,a=t.length>r.length?r:t;if(s.length<4||2*a.length=k.length?[w,x,C,j,z]:null}var c,d,_,h,m,g=o(s,a,Math.ceil(s.length/4)),S=o(s,a,Math.ceil(s.length/2));return g||S?(c=S?g&&g[4].length>S[4].length?g:S:g,t.length>r.length?(d=c[0],_=c[1],h=c[2],m=c[3]):(h=c[0],m=c[1],d=c[2],_=c[3]),[d,_,h,m,c[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var r=!1,s=[],a=0,l=null,o=0,c=0,d=0,_=0,h=0;o0?s[a-1]:-1,c=0,d=0,_=0,h=0,l=null,r=!0)),o++;for(r&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),o=1;o=k?(S>=m.length/2||S>=g.length/2)&&(t.splice(o,0,new n.Diff(0,g.substring(0,S))),t[o-1][1]=m.substring(0,m.length-S),t[o+1][1]=g.substring(S),o++):(k>=m.length/2||k>=g.length/2)&&(t.splice(o,0,new n.Diff(0,m.substring(0,k))),t[o-1][0]=1,t[o-1][1]=g.substring(0,g.length-k),t[o+1][0]=-1,t[o+1][1]=m.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),x=b.match(n.nonAlphaNumericRegex_),C=w.match(n.nonAlphaNumericRegex_),j=x&&b.match(n.whitespaceRegex_),N=C&&w.match(n.whitespaceRegex_),T=j&&b.match(n.linebreakRegex_),z=N&&w.match(n.linebreakRegex_),D=T&&k.match(n.blanklineEndRegex_),O=z&&v.match(n.blanklineStartRegex_);return D||O?5:T||z?4:x&&!j&&N?3:j||N?2:x||C?1:0}for(var s=1;s=g&&(g=S,_=a,h=l,m=o)}t[s-1][1]!=_&&(_?t[s-1][1]=_:(t.splice(s-1,1),s--),t[s][1]=h,m?t[s+1][1]=m:(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=[],a=0,l=null,o=0,c=!1,d=!1,_=!1,h=!1;o0?s[a-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,a=0,l=0,o="",c="";s1?(a!==0&&l!==0&&((r=this.diff_commonPrefix(c,o))!==0&&(s-a-l>0&&t[s-a-l-1][0]==0?t[s-a-l-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-=a+l,t.splice(s,a+l),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++,l=0,a=0,o="",c=""}t[t.length-1][1]===""&&t.pop();var d=!1;for(s=1;sr));s++)o=a,c=l;return t.length!=s&&t[s][0]===-1?c:c+(r-o)},n.prototype.diff_prettyHtml=function(t){for(var r=[],s=/&/g,a=//g,o=/\n/g,c=0;c");switch(d){case 1:r[c]=''+_+"";break;case-1:r[c]=''+_+"";break;case 0:r[c]=""+_+""}}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 a=this.match_alphabet_(r),l=this;function o(N,T){var z=N/r.length,D=Math.abs(s-T);return l.Match_Distance?z+D/l.Match_Distance:D?1:z}var c=this.Match_Threshold,d=t.indexOf(r,s);d!=-1&&(c=Math.min(o(0,d),c),(d=t.lastIndexOf(r,s+r.length))!=-1&&(c=Math.min(o(0,d),c)));var _,h,m=1<=v;x--){var C=a[t.charAt(x-1)];if(w[x]=k===0?(w[x+1]<<1|1)&C:(w[x+1]<<1|1)&C|(g[x+1]|g[x])<<1|1|g[x+1],w[x]&m){var j=o(k,x-1);if(j<=c){if(c=j,!((d=x-1)>s))break;v=Math.max(1,2*s-d)}}}if(o(k+1,s)>c)break;g=w}return d},n.prototype.match_alphabet_=function(t){for(var r={},s=0;s2&&(this.diff_cleanupSemantic(l),this.diff_cleanupEfficiency(l));else if(t&&typeof t=="object"&&r===void 0&&s===void 0)l=t,a=this.diff_text1(l);else if(typeof t=="string"&&r&&typeof r=="object"&&s===void 0)a=t,l=r;else{if(typeof t!="string"||typeof r!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");a=t,l=s}if(l.length===0)return[];for(var o=[],c=new n.patch_obj,d=0,_=0,h=0,m=a,g=a,S=0;S=2*this.Patch_Margin&&d&&(this.patch_addContext_(c,m),o.push(c),c=new n.patch_obj,d=0,m=g,_=h)}k!==1&&(_+=v.length),k!==-1&&(h+=v.length)}return d&&(this.patch_addContext_(c,m),o.push(c)),o},n.prototype.patch_deepCopy=function(t){for(var r=[],s=0;sthis.Match_MaxBits?(c=this.match_main(r,h.substring(0,this.Match_MaxBits),_))!=-1&&((m=this.match_main(r,h.substring(h.length-this.Match_MaxBits),_+h.length-this.Match_MaxBits))==-1||c>=m)&&(c=-1):c=this.match_main(r,h,_),c==-1)l[o]=!1,a-=t[o].length2-t[o].length1;else if(l[o]=!0,a=c-_,h==(d=m==-1?r.substring(c,c+h.length):r.substring(c,m+this.Match_MaxBits)))r=r.substring(0,c)+this.diff_text2(t[o].diffs)+r.substring(c+h.length);else{var g=this.diff_main(h,d,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(g)/h.length>this.Patch_DeleteThreshold)l[o]=!1;else{this.diff_cleanupSemanticLossless(g);for(var S,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],l.start1-=c,l.start2-=c,l.length1+=c,l.length2+=c}return(o=(l=t[t.length-1]).diffs).length==0||o[o.length-1][0]!=0?(o.push(new n.Diff(0,s)),l.length1+=r,l.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),l.length1+=c,l.length2+=c),s},n.prototype.patch_splitMax=function(t){for(var r=this.Match_MaxBits,s=0;s2*r?(d.length1+=m.length,l+=m.length,_=!1,d.diffs.push(new n.Diff(h,m)),a.diffs.shift()):(m=m.substring(0,r-d.length1-this.Patch_Margin),d.length1+=m.length,l+=m.length,h===0?(d.length2+=m.length,o+=m.length):_=!1,d.diffs.push(new n.Diff(h,m)),m==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(m.length))}c=(c=this.diff_text2(d.diffs)).substring(c.length-this.Patch_Margin);var g=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);g!==""&&(d.length1+=g.length,d.length2+=g.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===0?d.diffs[d.diffs.length-1][1]+=g:d.diffs.push(new n.Diff(0,g))),_||t.splice(++s,0,d)}}},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"?Xgt:Zgt,r=T4(e.map((function(o){return o.changes})),zM).map(t).reduce((function(o,c){var d=un(o,2),_=d[0],h=d[1],m=un(c,2),g=m[0],S=m[1];return[_.concat(g),h.concat(S)]}),[[],[]]),s=un(r,2),a=s[0],l=s[1];return Ggt(wC(a),wC(l))}var Jgt=["enhancers"],EC=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,a=un(Agt(e,Tl(t,Jgt)),2),l=a[0],o=a[1],c=[vC(l),vC(o)],d=(n=[c[0],c[1]],s.reduce((function(k,v){return v(k)}),n)),_=un(d,2),h=_[0],m=_[1],g=[h.map(xC),m.map(xC)],S=g[1];return{old:g[0].map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]})),new:S.map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]}))}};const tx=["openresearch-diff flex flex-col gap-4","[&_.openresearch-diff-file]:[--diff-background-color:var(--base)]","[&_.openresearch-diff-file]:[--diff-text-color:var(--text)]","[&_.openresearch-diff-file]:[--diff-font-family:var(--mono)]","[&_.openresearch-diff-file]:[--diff-selection-text-color:var(--primary)]","[&_.openresearch-diff-file]:[--diff-selection-background-color:var(--color-diff-selection)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)]","[&_.openresearch-diff-file]:[--diff-code-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-code-selected-background-color:var(--diff-selection-background-color)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-text-color:var(--accent-green)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-text-color:var(--accent-red)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)]","[&_.openresearch-diff-file]:[--diff-code-insert-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-background-color:var(--color-diff-insert-code)]","[&_.openresearch-diff-file]:[--diff-code-delete-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-background-color:var(--color-diff-delete-code)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)]","[&_.openresearch-diff-file]:[--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)]","[&_.openresearch-diff-file]:w-full [&_.openresearch-diff-file]:text-sm","[&_.openresearch-diff-file]:leading-[1.55] [&_.openresearch-diff-file.diff-unified]:table-auto","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:collapse","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:w-0","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:nth-child(2)]:w-[1%]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:hidden","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:sticky","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:start-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:z-1","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[1%]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pt-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pe-2.5 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pb-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:ps-3.5","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:whitespace-nowrap","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-end","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-diff-gutter-text","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e-border","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:select-none","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:cursor-default","[&_.openresearch-diff-file_.diff-line]:leading-[1.55]","[&_.openresearch-diff-file_.diff-line:has(.diff-code-insert)]:bg-diff-insert-code","[&_.openresearch-diff-file_.diff-line:has(.diff-code-delete)]:bg-diff-delete-code","[&_.openresearch-diff-file_.diff-code]:py-0 [&_.openresearch-diff-file_.diff-code]:px-4","[&_.openresearch-diff-file_.diff-code]:whitespace-pre","[&_.openresearch-diff-file_.diff-code]:break-normal","[&_.openresearch-diff-file_.diff-code]:wrap-normal","[&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t [&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t-border"].join(" "),e1t=2e3,t1t={highlight(e,n){return xt.highlight(e,n).children}};function n1t(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function R4(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 r1t(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function nx(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 s1t(e){const n=[Qgt(e.hunks,{type:"line"})],t=Ly(r1t(e));return t&&xt.registered(t)?EC(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:t1t}):EC(e.hunks,{enhancers:n,highlight:!1})}function i1t(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:W2(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:W2(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const a1t=({change:e,side:n})=>n==="old"?null:n1t(e);function AM({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:Ghe()}),f.jsx("p",{children:S_e({limit:we(Ta(n)),read:we(Ta(e))})})]})}function TM({file:e,defaultExpanded:n}){const[t,r]=M.useState(n),{additions:s,deletions:a}=M.useMemo(()=>R4(e),[e]),l=t&&s+a<=e1t,o=M.useMemo(()=>{if(l)try{return s1t(e)}catch{return}},[e,l]);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-semibold [&_.path_code]:text-text [&_.stats]:flex [&_.stats]:items-center [&_.stats]:gap-2 [&_.stats]:shrink-0 [&_.stats]:font-mono [&_.stats]:text-xs [&_.stats]:font-medium [&_.stats]:tabular-nums","aria-expanded":t,onClick:()=>r(c=>!c),children:[f.jsx("span",{className:"chev",children:t?f.jsx($a,{size:14}):f.jsx(Ha,{size:14})}),f.jsx("span",{className:"path",children:f.jsx("code",{children:nx(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:["−",a]})]})]}),t&&(e.hunks.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:o_e()}):f.jsx("div",{className:"diff-file-body overflow-x-auto bg-background",children:f.jsx(xgt,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:a1t,tokens:o,viewType:"unified"})}))]})}function o1t({files:e,className:n}){return f.jsx("div",{className:n?`${tx} ${n}`:tx,children:e.map((t,r)=>f.jsx(TM,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function l1t(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 MM({diff:e,partial:n=!1}){var m;const t=M.useMemo(()=>i1t(e,n),[e,n]),r=t.files,s=M.useMemo(()=>r.map((g,S)=>({file:g,key:`${g.oldPath}→${g.newPath}#${S}`,changes:R4(g)})),[r]),[a,l]=M.useState(null),[o,c]=M.useState(!1),d=o&&!n,_=s.some(g=>g.key===a)?a:((m=s[0])==null?void 0:m.key)??null,h=s.find(g=>g.key===_)??null;return t.failed?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?r_e():v_e()}):s.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:Jhe()}):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",{children:n?s.length===1?p_e():Yhe({count:Vt(s.length)}):s.length===1?d_e():Ihe({count:Vt(s.length)})}),!n&&f.jsx("button",{type:"button",onClick:()=>c(g=>!g),children:d?Rhe():N_e()})]}),d?f.jsx(o1t,{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":Phe(),children:s.map(g=>f.jsxs("button",{type:"button",className:g.key===_?"active":"","aria-pressed":g.key===_,onClick:()=>l(g.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-${g.file.type}`,children:l1t(g.file)}),f.jsx("code",{title:nx(g.file),children:nx(g.file)}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",g.changes.additions]}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",g.changes.deletions]})]},g.key))}),f.jsx("div",{className:`${tx} diff-explorer-preview min-w-0`,children:h&&f.jsx(TM,{file:h.file,defaultExpanded:!0},h.key)})]})]})}function c1t({experiment:e,refreshKey:n,onLoadingChange:t}){const[r,s]=M.useState(null),[a,l]=M.useState(null);return M.useEffect(()=>{let o=!1;return t(!0),l(null),s(null),DQe(e.id).then(c=>{o||s(c)}).catch(c=>{o||l(c.message)}).finally(()=>{o||t(!1)}),()=>{o=!0}},[e.id,n,t]),f.jsx(qu,{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:a?f.jsxs(Qi,{children:[hW()," ",we(a)]}):r?r.diff.trim()?f.jsxs(f.Fragment,{children:[r.truncated&&f.jsx(AM,{bytesRead:r.bytesRead,byteLimit:r.byteLimit}),f.jsx(MM,{diff:r.diff,partial:r.truncated})]}):f.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?yW():cW()}):f.jsx(Qi,{children:gW()})})}function RM({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:a,githubTitle:l,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":Qre(),children:[f.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:nse()}),f.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:Kre()})]}),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(Kp,{size:12}),f.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),a&&f.jsx(Qp,{href:a,target:"_blank",rel:"noopener noreferrer",title:l,"aria-label":l,children:f.jsx(ym,{size:13})}),f.jsx("span",{className:"flex-1"}),f.jsx(Gt,{title:h7(),"aria-label":h7(),onClick:c,children:o?f.jsx(Mt,{}):f.jsx(TN,{size:13})})]})}const u1t=/\.(md|mdx|markdown)$/i,d1t=/\.tex$/i,f1t=/\.html?$/i,h1t=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,_1t=/\.(csv|tsv|xlsx?|ods)$/i,p1t=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,m1t=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,g1t=/\.pdf$/i,b1t=/\.(docx?|log|rtf|txt)$/i;function v1t(e){return h1t.test(e)}function D4(e){return u1t.test(e)}function DM(e){return d1t.test(e)}function x1t(e){return f1t.test(e)}function LM({name:e}){const n=D4(e)?"markdown":v1t(e)?"image":_1t.test(e)?"spreadsheet":p1t.test(e)?"code":m1t.test(e)?"archive":g1t.test(e)?"pdf":b1t.test(e)||DM(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})}const OM=["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(" "),NC=["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 zC(){return{dirs:new Map,files:[]}}function IM(e){const n=zC();for(const t of e){const r=t.split("/");let s=n;for(let a=0;aa(t),title:t,children:[c?f.jsx($a,{size:13,className:NC}):f.jsx(Ha,{size:13,className:NC}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),c&&f.jsx(L4,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:a,onOpenFile:l})]})}function L4({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:a}){const l=[...e.dirs.keys()].sort((c,d)=>c.localeCompare(d)),o=[...e.files].sort((c,d)=>c.localeCompare(d));return f.jsxs(f.Fragment,{children:[l.map(c=>{const d=n?`${n}/${c}`:c;return f.jsx(y1t,{name:c,node:e.dirs.get(c),path:d,depth:t,toggled:r,onToggle:s,onOpenFile:a},`d:${d}`)}),o.map(c=>{const d=n?`${n}/${c}`:c;return f.jsxs("button",{type:"button",className:OM,style:{paddingInlineStart:8+t*14},...wr(_=>a(d,_)),title:II({name:we(d)}),children:[f.jsx(LM,{name:c}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c})]},`f:${d}`)})]})}function w1t({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:a,onToggledChange:l,onOpenFile:o}){const c=t.branchName,d=`${e}:${c}`,[_,h]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!1),[v,b]=M.useState(!1),[w,x]=M.useState(0),[C,j]=M.useState(void 0),N=M.useRef(0),T=M.useRef(null),z=M.useCallback(()=>{T.current=d;const P=++N.current;k(!0),Pv(e,{ref:c}).then(F=>{P===N.current&&(h(F),g(null))}).catch(F=>{P===N.current&&g(F.message)}).finally(()=>{P===N.current&&k(!1)})},[e,c,d]);M.useEffect(()=>(N.current++,T.current=null,h(null),g(null),k(!1),()=>{N.current++}),[d]),M.useEffect(()=>{r==="files"&&T.current!==d&&z()},[r,d,z]),M.useEffect(()=>{j(void 0);const P=t.chatSessionId;if(!P)return;let F=!1;return UN(P).then(W=>{!F&&W.exists&&W.branch===c&&j(P)}).catch(()=>{}),()=>{F=!0}},[t.chatSessionId,c]);const D=M.useMemo(()=>_?IM(_.entries):null,[_]),O=r==="files"?S:v,H=M.useCallback(P=>{const F=new Set(s);F.has(P)?F.delete(P):F.add(P),l(F)},[s,l]);return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[f.jsx(RM,{view:r,onViewChange:a,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?Xp(n.githubOwner,n.githubRepo,c):void 0,githubTitle:bE({branch:we(c)}),refreshing:O,onRefresh:()=>r==="files"?z():x(P=>P+1)}),r==="changes"?f.jsx(c1t,{experiment:t,refreshKey:w,onLoadingChange:b},t.id):f.jsxs(f.Fragment,{children:[(_==null?void 0:_.truncated)&&f.jsx(Qi,{children:cse()}),m&&D&&f.jsxs(Qi,{children:[gse()," ",we(m)]}),f.jsx(qu,{children:D?D.dirs.size===0&&D.files.length===0?f.jsx(Qi,{children:hse()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(L4,{node:D,parentPath:"",depth:0,toggled:s,onToggle:H,onOpenFile:(P,F)=>C?o(P,C,void 0,F):o(P,void 0,c,F)})}):f.jsx(Qi,{children:m?CE({error:we(m)}):EE()})})]})]})}const S1t=5e3;function k1t({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:a,onOpenFile:l}){var D;const o=n.id,[c,d]=M.useState(null),[_,h]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!0),v=M.useRef(0),b=M.useCallback(()=>{const O=++v.current;k(!0),(async()=>{if(!e)return[null,await Pv(o,{ref:n.baselineBranch})];const P=await UN(e),F=P.exists?{sessionId:e}:{ref:n.baselineBranch};return[P,await Pv(o,F)]})().then(([P,F])=>{O===v.current&&(d(P),h(F),g(null))}).catch(P=>{O===v.current&&g(P.message)}).finally(()=>{O===v.current&&k(!1)})},[e,o,n.baselineBranch]);M.useEffect(()=>(d(null),h(null),g(null),b(),()=>{v.current++}),[b]),M.useEffect(()=>{if(!e)return;let O=!1,H=!1,P=!1,F=null;const W=()=>{F||(F=setInterval(b,S1t))},Z=()=>{F&&(clearInterval(F),F=null)},G=Vf(X=>{X.type!=="busy"||X.sessionId!==e||(H=!0,X.busy&&!O?(O=!0,W()):!X.busy&&O&&(O=!1,Z(),b()))});return H0(o).then(X=>{var J;P||H||O||(J=X.find($=>$.id===e))!=null&&J.busy&&(O=!0,W())}).catch(()=>{}),()=>{P=!0,G(),Z()}},[e,o,b]);const w=M.useMemo(()=>_?IM(_.entries):null,[_]),x=M.useCallback(O=>{const H=new Set(r);H.has(O)?H.delete(O):H.add(O),a(H)},[r,a]),C=e&&(c!=null&&c.exists)?c:null,j=(C==null?void 0:C.branch)??(C!=null&&C.baselineBranch?YYe({branch:we(C.baselineBranch)}):YE()),N=((D=C==null?void 0:C.files)==null?void 0:D.length)??0,T=C?PYe({branch:we(`${j}${N>0?"*":""}`)}):GYe({branch:we(n.baselineBranch)}),z=C?C.branch:n.baselineBranch;return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[f.jsx(RM,{view:C?t:"files",onViewChange:s,showViewToggle:!!C,branchLabel:T,branchTitle:T,githubHref:n.githubEnabled&&z?Xp(n.githubOwner,n.githubRepo,z):void 0,githubTitle:z?bE({branch:we(z)}):void 0,refreshing:S,onRefresh:b}),m&&(c||_)&&f.jsxs(Qi,{children:[pXe()," ",we(m)]}),!_||e&&!c?f.jsx(qu,{children:f.jsx(Qi,{children:m?CE({error:we(m)}):EE()})}):C&&t==="changes"?f.jsx(qu,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:N===0||!C.diff?f.jsx("div",{className:"changes-note text-sm text-muted",children:oXe()}):f.jsxs(f.Fragment,{children:[C.diff.truncated&&f.jsx(AM,{bytesRead:C.diff.bytesRead,byteLimit:C.diff.byteLimit}),f.jsx(MM,{diff:C.diff.diff,partial:C.diff.truncated})]})}):f.jsxs(qu,{children:[_.truncated&&f.jsx(Qi,{children:JYe()}),w?w.dirs.size===0&&w.files.length===0?f.jsx(Qi,{children:dXe()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(L4,{node:w,parentPath:"",depth:0,toggled:r,onToggle:x,onOpenFile:(O,H)=>C?l(O,e,void 0,H):l(O,void 0,n.baselineBranch,H)})}):f.jsx(Qi,{children:rXe()})]})]})}function BM({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const a=M.useMemo(()=>{if(!e)return[];const _=e.replace(/\r\n?/g,` -`),h=nT(_,Ly(n));return _.endsWith(` -`)?h.slice(0,-1):h},[e,n]),l=t&&a.length>0?Math.min(Math.max(Math.trunc(t),1),a.length):void 0,o=M.useRef(null);M.useEffect(()=>{var _;r!==void 0&&(l?((_=o.current)==null||_.scrollIntoView({block:"center"}),s==null||s()):a.length===0&&(s==null||s()))},[a.length,s,r,l]);const{ruleCh:c}=gT(a.length),d=M.useMemo(()=>a.map((_,h)=>f.jsxs("div",{ref:h+1===l?o:void 0,className:`file-view-line flex items-stretch ${h+1===l?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[f.jsx("span",{"data-line":h+1,className:`${mT} 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 ${Cp} ${pT}`,children:rT(_)?f.jsx("br",{}):_})]},h)),[a,c,l]);return f.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${Cp}`,children:[a.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"}),d]})}function $M(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function jC({url:e,name:n}){return f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Spe()," ",f.jsxs("a",{href:e,download:n,children:[RE()," ",we(n)]})]})}function rx({kind:e,url:n,name:t,downloadBar:r=!0}){const[s,a]=M.useState(!1);if(M.useEffect(()=>a(!1),[e,n]),s)return f.jsx(jC,{url:n,name:t});let l;return e==="image"?l=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:()=>a(!0)})}):e==="audio"?l=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:()=>a(!0)})}):e==="video"?l=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:()=>a(!0)})}):l=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:()=>a(!0),children:f.jsx(jC,{url:n,name:t})}),f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[l,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:[RE()," ",t]})})]})}const AC="tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]";function C1t(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function E1t(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),a=r===-1?"":t.slice(r),l=s.indexOf("?"),o=l===-1?s:s.slice(0,l),c=l===-1?"":s.slice(l+1),d=o.startsWith("/")?[]:n.split("/").filter(g=>g.length>0);for(const g of o.split("/"))if(!(!g||g==="."))if(g===".."){if(d.length===0)return null;d.pop()}else d.push(g);const _=d.join("/");if(!_)return null;const h=new URLSearchParams(c);h.delete("path");const m=h.toString();return`${zh(e,_)}${m?`&${m}`:""}${a}`}function N1t(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` ----`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const HM="orx:files-tree-width",PM="orx:artifacts-collapsed:",FM=180,UM=560,z1t=8,j1t=280;function A1t(){try{const e=Number(localStorage.getItem(HM));if(Number.isFinite(e)&&e>=FM&&e<=UM)return e}catch{}return j1t}function T1t(e){try{const n=localStorage.getItem(`${PM}${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 sx(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=sx(t.children??[],n);if(r)return r}}return null}function qM({projectId:e,folder:n,markdown:t}){const r=s=>C1t(s)?s:E1t(e,n,s);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(dot,{remarkPlugins:[KA,[YA,aT]],rehypePlugins:[SA],components:{a:({href:s,children:a,...l})=>{const o=!s||s.startsWith("#"),c=o?s:r(s);return c?f.jsx("a",{...l,href:c,...o?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):f.jsx("span",{children:a})},img:({src:s,alt:a})=>{if(!s||typeof s!="string")return null;const l=r(s);return l?f.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[f.jsx("img",{src:l,alt:a??"",loading:"lazy"}),a&&f.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...oT},children:sT(N1t(t))})})}function M1t(e){return e.presentation==="text"&&D4(e.name)?"markdown":$M(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function R1t(e,n,t){const[r,s]=M.useState(null),[a,l]=M.useState(!1),[o,c]=M.useState(!1),[d,_]=M.useState(null),h=M.useRef(0),m=M.useRef(!1),g=t==="markdown"||t==="text"&&n.size<=YN;return M.useEffect(()=>{if(l(!1),c(!1),_(null),!g)return;let S=!1;const k=++h.current;return XN(e,n.path).then(b=>{if(!b)throw new Error(QG());return b}).then(b=>{S||k!==h.current||(b.binary?l(!0):(m.current=!0,s(b.content)),c(b.truncated))}).catch(b=>{!S&&k===h.current&&!m.current&&_(b instanceof Error?b.message:String(b))}),()=>{S=!0}},[e,n.path,n.modifiedAt,t,g]),{text:r,binary:a,truncated:o,error:d,wantsText:g}}function D1t({projectId:e,entry:n,onDelete:t}){const r=M1t(n),{text:s,binary:a,truncated:l,error:o,wantsText:c}=R1t(e,n,r),[d,_]=M.useState(!1),h=r==="markdown",m=n.path.split("/").slice(0,-1).join("/"),g=`${zh(e,n.path)}&v=${n.modifiedAt}`;let S;return r==="image"||r==="audio"||r==="video"||r==="pdf"?S=f.jsx(rx,{kind:r,url:g,name:n.name}):r==="download"||!c||a?S=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[r==="download"||a?qG():iW()," ",f.jsx("a",{href:g,...r==="download"||a?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:r==="download"||a?AE():nV()})]}):o?S=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[yV()," ",we(o)]}):s===null?S=f.jsxs(Sr,{children:[f.jsx(Mt,{})," ",RV()]}):h&&!d?S=f.jsx(qM,{projectId:e,folder:m,markdown:s}):S=f.jsx(BM,{text:s,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",children:[f.jsxs("div",{className:"fpreview-head h-10 flex items-center gap-2 py-0 px-3.5 border-b border-b-border-variant text-subtext shrink-0",children:[f.jsx(Xu,{size:13,className:"shrink-0"}),f.jsx("code",{className:"fpreview-path font-mono text-sm text-text flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:we(n.path),children:n.path}),f.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0",children:[PV()," ",new Date(n.modifiedAt).toLocaleString(E(),{dateStyle:"medium",timeStyle:"short"})]}),(r==="text"||r==="download")&&f.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:Ta(n.size)}),h&&f.jsx(Gt,{active:d,"data-tip":d?ap():Du(),"data-tip-align":"end","aria-label":d?ap():Du(),onClick:()=>_(k=>!k),children:f.jsx(Bv,{size:13})}),f.jsx(Qp,{href:g,target:"_blank",rel:"noopener noreferrer","data-tip":B6(),"data-tip-align":"end","aria-label":B6(),children:f.jsx(jc,{size:13})}),f.jsx(Gt,{"data-tip":I6(),"data-tip-align":"end","aria-label":I6(),onClick:()=>{window.confirm(xE({path:we(n.path)}))&&t(n.path)},children:f.jsx(_d,{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 ${h&&!d?"doc":""}`,children:[S,l&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:CV()})]})]})}function GM({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:a,onOpenFile:l,onDelete:o}){return f.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(c=>{var _;const d={paddingInlineStart:8+Math.min(n,z1t)*14};if(c.isDir){const h=!t.has(c.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:d,onClick:()=>s(c.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":h?jG({name:we(c.name)}):HG({name:we(c.name)}),onClick:m=>{m.stopPropagation(),s(c.path)},children:f.jsx(Ha,{size:13,className:h?"open":""})}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c.name}),f.jsx(Gt,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":gV(),"data-tip-align":"end","aria-label":OG({name:we(c.name)}),onClick:m=>{m.stopPropagation(),window.confirm(xE({path:we(c.path)}))&&o(c.path)},children:f.jsx(_d,{size:12})})]}),h&&(((_=c.children)==null?void 0:_.length)??0)>0&&f.jsx(GM,{entries:c.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:a,onOpenFile:l,onDelete:o})]},c.path)}return 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===c.path?"selected":""}`,style:d,title:BO({path:we(c.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===c.path,onClick:()=>a(c.path),onDoubleClick:()=>l(c.path),onAuxClick:h=>{h.button===1&&(h.preventDefault(),a(c.path),l(c.path))},onKeyDown:h=>{if(h.key===" "){h.preventDefault(),h.stopPropagation(),a(c.path);return}h.key==="Enter"&&(h.preventDefault(),h.stopPropagation(),a(c.path),l(c.path))},children:[f.jsx(LM,{name:c.name}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c.name})]},c.path)})})}function TC({dir:e,onOpenStorage:n}){const[t,r]=M.useState(!1);return f.jsxs("div",{className:"ftree-footer shrink-0 flex items-center gap-0.5 py-[5px] px-2 border-t border-t-border-variant [&_code]:flex-1 [&_code]:min-w-0 [&_code]:[direction:rtl] [&_code]:text-left [&_code]:font-mono [&_code]:text-xs [&_code]:text-muted [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap",title:we(e),children:[f.jsx("code",{className:"path-front-ellipsis",children:e}),f.jsx(Gt,{size:"small",className:AC,"data-tip":t?ip():KG(),"aria-label":uV(),onClick:()=>{var s;(s=navigator.clipboard)==null||s.writeText(e),r(!0),setTimeout(()=>r(!1),1200)},children:t?f.jsx(_i,{size:12}):f.jsx(Vp,{size:12})}),n&&f.jsx(Gt,{size:"small",className:AC,"data-tip":$6(),"data-tip-align":"end","aria-label":$6(),onClick:n,children:f.jsx(eQe,{size:12})})]})}function L1t({project:e,artifacts:n,onChanged:t,onOpenFile:r,onOpenStorage:s}){const[a,l]=M.useState(null),[o,c]=M.useState(()=>T1t(e.id)),[d,_]=M.useState(A1t),h=M.useRef(null);M.useEffect(()=>{try{localStorage.setItem(`${PM}${e.id}`,JSON.stringify([...o]))}catch{}},[e.id,o]);const m=b=>{var N;b.preventDefault(),b.currentTarget.setPointerCapture(b.pointerId);const w=(N=h.current)==null?void 0:N.getBoundingClientRect(),x=document.body.style.userSelect;document.body.style.userSelect="none";const C=T=>{const z=Math.round(T.clientX-((w==null?void 0:w.left)??0)),D=Math.min(Math.max(z,FM),UM);_(D);try{localStorage.setItem(HM,String(D))}catch{}},j=()=>{window.removeEventListener("pointermove",C),window.removeEventListener("pointerup",j),window.removeEventListener("pointercancel",j),document.body.style.userSelect=x};window.addEventListener("pointermove",C),window.addEventListener("pointerup",j),window.addEventListener("pointercancel",j)};M.useEffect(()=>{if(!a||!n)return;const b=sx(n.entries,a);(!b||b.isDir)&&l(null)},[a,n]);const g=b=>c(w=>{const x=new Set(w);return x.has(b)?x.delete(b):x.add(b),x}),S=b=>{(a===b||a!=null&&a.startsWith(b+"/"))&&l(null),zJe(e.id,b).catch(()=>{}).finally(t)};if(!n)return f.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:f.jsxs(Sr,{className:"p-5",children:[f.jsx(Mt,{})," ",IV()]})});const k=b=>f.jsx(GM,{entries:b,depth:0,collapsed:o,selected:a,onToggle:g,onSelect:l,onOpenFile:r,onDelete:S}),v=a?sx(n.entries,a):null;return n.entries.length===0?f.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:f.jsxs("div",{className:"files-empty-state flex-1 flex flex-col items-center justify-center gap-1.5 p-6 text-center text-muted [&_h3]:mt-1.5 [&_h3]:mx-0 [&_h3]:mb-0 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text [&_p]:m-0 [&_p]:max-w-105 [&_p]:text-sm [&_p]:leading-[1.55] [&_p]:text-subtext [&_.ftree-footer]:mt-2.5 [&_.ftree-footer]:max-w-full [&_.ftree-footer]:border [&_.ftree-footer]:border-border [&_.ftree-footer]:rounded-md [&_.ftree-footer]:py-1.5 [&_.ftree-footer]:px-2.5 [&_.ftree-footer]:bg-background [&_.ftree-footer_code]:max-w-95",children:[f.jsx(Ox,{size:28,strokeWidth:1.5}),f.jsx("h3",{children:GV()}),f.jsx("p",{children:tW()}),f.jsx(TC,{dir:n.dir,onOpenStorage:s})]})}):f.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background",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",ref:h,style:{width:d},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",onPointerDown:m}),f.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[k(n.entries),n.truncated&&f.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:jV()})]}),f.jsx(TC,{dir:n.dir,onOpenStorage:s})]}),v?f.jsx(D1t,{projectId:e.id,entry:v,onDelete:S},v.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",children:[f.jsx(HZe,{size:22,strokeWidth:1.5}),f.jsx("span",{children:aV()})]})]})}const VM=20*1024*1024,WM="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",KM="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",YM="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",O1t="font-mono text-base font-medium text-text",I1t="mt-1 mb-0 text-sm leading-relaxed text-text";function XM(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 a=s.indexOf(",");n(a>=0?s.slice(a+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function B1t(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function ZM({accept:e,busy:n,prompt:t,onFile:r}){const[s,a]=M.useState(!1),l=M.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(),a(!0)},onDragLeave:()=>a(!1),onDrop:o=>{var d;if(o.preventDefault(),a(!1),n)return;const c=(d=o.dataTransfer.files)==null?void 0:d[0];c&&r(c)},onClick:()=>{var o;n||(o=l.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=l.current)==null||c.click())},children:[f.jsx("input",{ref:l,type:"file",accept:e,hidden:!0,onChange:o=>{var d;const c=(d=o.target.files)==null?void 0:d[0];c&&r(c),o.target.value=""}}),n?f.jsxs(f.Fragment,{children:[f.jsx(Mt,{}),f.jsx("span",{children:Eqe()})]}):f.jsxs(f.Fragment,{children:[f.jsx(fQe,{size:20,strokeWidth:1.5}),f.jsx("span",{children:t})]})]})}function QM({bytes:e,updatedAt:n}){return f.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[Ta(e),n>0&&f.jsxs("span",{className:"text-muted",children:[" · ",La(n)]})]})}function $1t({skill:e,onDeleted:n,onError:t}){const[r,s]=M.useState(!1);return f.jsxs("div",{className:YM,children:[f.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[f.jsxs("code",{className:O1t,children:["/",e.name]}),e.origin&&f.jsx(Lt,{children:e.origin})]}),f.jsx(QM,{bytes:e.bytes,updatedAt:e.updatedAt}),!e.origin&&f.jsx(Gt,{"data-tip":KUe(),"data-tip-align":"end","aria-label":ZFe({name:we(e.name)}),disabled:r,onClick:()=>{window.confirm(WFe({name:we(e.name)}))&&(s(!0),KJe(e.name).then(n).catch(a=>{s(!1),t(a instanceof Error?a.message:String(a))}))},children:f.jsx(_d,{size:13})})]})}function H1t({template:e,onChanged:n,onError:t}){const[r,s]=M.useState(!1),a=e.supportFiles.length;return f.jsxs("div",{className:YM,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:I1t,children:[e.entry,a>0&&(a===1?kUe():MUe({count:Vt(a)}))]})]}),f.jsx(QM,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(Gt,{"data-tip":QUe(),"data-tip-align":"end","aria-label":iUe({name:we(e.name)}),disabled:r,onClick:()=>{window.confirm(tUe({name:we(e.name)}))&&(s(!0),GJe(e.name).then(n).catch(l=>{s(!1),t(l instanceof Error?l.message:String(l))}))},children:f.jsx(_d,{size:13})})]})}function P1t(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(!1),[l,o]=M.useState(null),[c,d]=M.useState(null),_=M.useCallback(()=>{a(!0),VJe().then(g=>{n(g),d(null)}).catch(g=>{n([]),d(g instanceof Error?g.message:String(g))}).finally(()=>a(!1))},[]);M.useEffect(()=>{_()},[_]);const h=M.useRef(!1),m=M.useCallback(async g=>{if(!h.current){if(o(null),!B1t(g.name)){o(Dqe());return}if(g.size>VM){o(hN());return}h.current=!0,r(!0);try{await WJe({filename:g.name,contentBase64:await XM(g)}),_()}catch(S){o(S instanceof Error?S.message:String(S))}finally{h.current=!1,r(!1)}}},[_]);return f.jsxs("section",{className:WM,children:[f.jsxs("div",{className:"flex items-baseline gap-2.5",children:[f.jsx("h3",{children:wqe()}),f.jsxs(Ue,{className:"ms-auto",size:"small",onClick:_,disabled:s,children:[f.jsx(hd,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",qp()]})]}),f.jsx("p",{className:KM,children:cUe()}),f.jsx(ZM,{accept:".md,.markdown,.zip",busy:t,prompt:hUe(),onFile:g=>void m(g)}),l&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:l}),e===null?f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Mt,{})," ",aqe()]}):c?f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[OUe()," ",c]}):e.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:_qe()}):f.jsx("div",{className:"flex flex-col mt-1",children:e.map(g=>f.jsx($1t,{skill:g,onDeleted:_,onError:o},g.name))})]})}function F1t(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null),[l,o]=M.useState(null),c=M.useCallback(()=>{UJe().then(h=>{n(h),o(null)}).catch(h=>{n([]),o(h instanceof Error?h.message:String(h))})},[]);M.useEffect(()=>{c()},[c]);const d=M.useRef(!1),_=M.useCallback(async h=>{if(d.current)return;a(null);const m=h.name.toLowerCase();if(!m.endsWith(".tex")&&!m.endsWith(".zip")){a(Bqe());return}if(h.size>VM){a(hN());return}d.current=!0,r(!0);try{await qJe({filename:h.name,contentBase64:await XM(h)}),c()}catch(g){a(g instanceof Error?g.message:String(g))}finally{d.current=!1,r(!1)}},[c]);return f.jsxs("section",{className:WM,children:[f.jsx("h3",{children:nqe()}),f.jsx("p",{className:KM,children:Aqe()}),f.jsx(ZM,{accept:".tex,.zip",busy:t,prompt:gUe(),onFile:h=>void _(h)}),s&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:s}),e===null?f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Mt,{})," ",uqe()]}):l?f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[HUe()," ",l]}):e.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:bqe()}):f.jsx("div",{className:"flex flex-col mt-1",children:e.map(h=>f.jsx(H1t,{template:h,onChanged:c,onError:a},h.name))})]})}function U1t(){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:qUe()}),f.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:zUe()}),f.jsx(P1t,{}),f.jsx(F1t,{})]})}const q1t="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function bl({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:a,onPromote:l,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-24 [&:hover]:bg-surface [&:hover]:text-text [&:not(.active)_+_.tab:not(.active)::before]:content-[''] [&:not(.active)_+_.tab:not(.active)::before]:absolute [&:not(.active)_+_.tab:not(.active)::before]:top-2.5 [&:not(.active)_+_.tab:not(.active)::before]:bottom-2.5 [&:not(.active)_+_.tab:not(.active)::before]:-start-px [&:not(.active)_+_.tab:not(.active)::before]:w-px [&:not(.active)_+_.tab:not(.active)::before]:bg-border [&.active]:border-border [&.active]:bg-background [&.active]:text-text [&.active]:font-medium [&.active::after]:content-[''] [&.active::after]:absolute [&.active::after]:end-0 [&.active::after]:-bottom-px [&.active::after]:start-0 [&.active::after]:h-px [&.active::after]:bg-background closable ${e?"active":""} ${s?q1t:""}`,onClick:a,onDoubleClick:l,title:s?JVe({label:n}):n,"aria-label":s?YVe({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:qre(),onClick:c=>{c.stopPropagation(),o()},children:f.jsx(Ur,{size:12})})]})}const MC=["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 G1t({owner:e,repo:n,branch:t}){return!e||!n?f.jsx("span",{className:MC,children:f.jsx("code",{children:t})}):f.jsxs("a",{className:MC,href:Xp(e,n,t),target:"_blank",rel:"noopener noreferrer",title:sp({name:we(t)}),children:[f.jsx("code",{children:t}),f.jsx(ym,{size:12})]})}const _v=["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(" "),RC=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function DC(e){return new Date(e).toLocaleString(E(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function LC(e,n){return dp((e.endedAt??n)-e.createdAt)}function V1t({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:a}){const l=r[0]??null,o=r.some(_=>_.status==="running"||_.status==="starting"),[c,d]=M.useState(()=>Date.now());return M.useEffect(()=>{if(!o)return;d(Date.now());const _=window.setInterval(()=>d(Date.now()),1e3);return()=>window.clearInterval(_)},[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(ko,{status:l?Fi(l):"idle"})]}),f.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[l&&f.jsxs(Ue,{...wr(_=>s(l.id,_)),children:[f.jsx(Zu,{size:15}),Tce()]}),f.jsxs(Ue,{...wr(a),children:[f.jsx(Wp,{size:15}),rce()]})]}),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:pce()}),f.jsx(Oa,{text:e.description})]}),f.jsxs("section",{className:_v,children:[f.jsx("h2",{children:l?Jle():Wce()}),l&&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(ko,{status:Fi(l)}),f.jsx(d4,{backend:l.backend}),f.jsxs("span",{title:Uce(),children:[f.jsx(MXe,{size:13}),DC(l.createdAt)]}),f.jsxs("span",{title:vce(),children:[f.jsx(GXe,{size:13}),LC(l,c)]}),l.commitSha&&f.jsxs("span",{title:oce(),children:[f.jsx(vZe,{size:14}),f.jsx("code",{children:l.commitSha.slice(0,7)})]}),l.exitCode!==null&&l.exitCode!==void 0&&l.exitCode!==0&&f.jsxs("span",{children:[Sce()," ",l.exitCode]})]}),l.command&&f.jsxs("code",{className:RC,children:["$ ",l.command]}),l.resultMarkdown&&f.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${l.status==="failed"?"failed":""}`,children:f.jsx(Oa,{text:l.resultMarkdown})})]})]}),f.jsxs("section",{className:_v,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(G1t,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&f.jsxs("span",{children:[Nce()," ",f.jsx("code",{children:n.slug})]}),f.jsxs("span",{title:DC(e.createdAt),children:[dce()," ",La(e.createdAt)]})]}),e.runCommand!==(l==null?void 0:l.command)&&f.jsxs("code",{className:RC,children:["$ ",e.runCommand]})]}),r.length>0&&f.jsxs("section",{className:_v,children:[f.jsx("h2",{children:$ce()}),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",{...wr(m=>s(_.id,m)),children:[f.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[Lce()," ",r.length-h]}),f.jsx(ko,{status:Fi(_)}),f.jsx("span",{children:La(_.createdAt)}),f.jsx("span",{children:LC(_,c)}),f.jsx(Zu,{size:13})]},_.id))})]})]})})}function OC(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}=f4(t,!0);let a=!1,l=0,o=!1,c=!1;async function d(){if(o){c=!0;return}o=!0;try{for(;;){const h=await MQe(e,l);if(a)return;if(h.dataBase64&&r.write(OC(h.dataBase64)),l=h.nextOffset,h.eof)break}}catch{}finally{o=!1,c&&!a&&(c=!1,d())}}const _=yet(e,h=>{if(a)return;const m=OC(h.dataBase64);!o&&h.offset===l?(r.write(m),l+=m.length):h.offset+m.length>l&&d()});return d(),()=>{a=!0,_(),s()}},[e]),f.jsx("div",{ref:n,className:"h-full w-full"})}function K1t({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:a,parentExperiment:l,onOpenView:o,onOpenCode:c}){const d=r.filter(_=>_.experimentId===e.id).sort((_,h)=>h.createdAt-_.createdAt);return t==="overview"?f.jsx(V1t,{experiment:e,parentExperiment:l,project:n,runs:d,onOpenLogs:(_,h)=>o("terminal",_,h),onOpenCode:_=>c("files",_)}):f.jsx(Y1t,{experiment:e,expRuns:d,selectedRunId:s,onSelectRun:a})}function Y1t({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,a]=M.useState(null),[l,o]=M.useState(null),[c,d]=M.useState(!1),_=M.useRef(null),h=t&&n.find(b=>b.id===t)||n[0]||null,m=(h==null?void 0:h.status)==="running"||(h==null?void 0:h.status)==="starting",g=!!(h&&m&&(h.cancelRequested||l===h.id)),S=b=>{const w=n.findIndex(x=>x.id===b);return w===-1?n.length:n.length-w},k=M.useRef(null);M.useEffect(()=>{if(k.current===null){k.current=new Set(n.map(w=>w.id));return}const b=n.find(w=>!k.current.has(w.id));for(const w of n)k.current.add(w.id);b&&r(b.id)},[n,r]),M.useEffect(()=>{if(!c)return;const b=w=>{var x;(x=_.current)!=null&&x.contains(w.target)||d(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c]);async function v(){if(h){a(null),o(h.id);try{await PN(h.id)}catch(b){o(null),a(b instanceof Error?b.message:String(b))}}}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}),m&&f.jsxs(Ue,{size:"small",variant:"ghost",disabled:g,onClick:()=>void v(),children:[f.jsx(wN,{size:13}),g?yse():zE()]}),n.length>0&&h&&f.jsxs("div",{className:"run-history relative shrink-0",ref:_,children:[f.jsxs(Ue,{title:gle(),"aria-expanded":c,onClick:()=>d(b=>!b),children:[f.jsxs("span",{children:[_7()," ",S(h.id)]}),f.jsx(ko,{status:g?"cancelling":Fi(h)}),f.jsx($a,{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(b=>f.jsxs(Mr,{className:"justify-start",active:b.id===(h==null?void 0:h.id),onClick:()=>{r(b.id),d(!1)},children:[f.jsxs("span",{className:"font-medium",children:[_7()," ",S(b.id)]}),f.jsx(ko,{status:Fi(b)}),f.jsx("span",{className:"ms-auto text-xs text-muted",children:La(b.createdAt)})]},b.id))})]})]}),f.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:h?f.jsx(W1t,{runId:h.id},h.id):f.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:ule()})})]})}function X1t({projectId:e,filePath:n,sessionId:t,enabled:r,ready:s,source:a}){const[l,o]=M.useState(void 0),[c,d]=M.useState(null),[_,h]=M.useState(null),[m,g]=M.useState(!1),[S,k]=M.useState(null),[v,b]=M.useState(null),[w,x]=M.useState(!1),[C,j]=M.useState(null),[N,T]=M.useState(null),[z,D]=M.useState(!1),[O,H]=M.useState(0),P=M.useCallback(X=>{D(X),X&&H(J=>J+1)},[]),F=M.useRef(a);F.current=a,M.useEffect(()=>{if(!r)return;let X=!1;return $Qe().then(J=>{X||(o(J.engine),d(J.hint),h(J.installCommand))}).catch(()=>{X||o(null)}),()=>{X=!0}},[r]);const W=M.useRef(!1),Z=M.useCallback(()=>{if(W.current)return;W.current=!0,g(!0);const X=F.current;T(null),b(null),j(null),HQe(e,n,{sessionId:t}).then(J=>{var L,B;const $=J.pdfPath;if(J.ok&&$){k(Y=>({path:$,version:((Y==null?void 0:Y.version)??0)+1,source:X})),x(J.hadErrors),j(J.note),J.hadErrors&&b(((L=J.log)==null?void 0:L.trim())||null),P(!0);return}k(null),x(!1),j(J.note),D(!1),b(((B=J.log)==null?void 0:B.trim())||ipe())}).catch(J=>{k(null),x(!1),j(null),D(!1),T(J instanceof Error?J.message:String(J))}).finally(()=>{W.current=!1,g(!1)})},[e,n,t,P]),G=M.useRef(null);return M.useEffect(()=>{!r||!s||!l||G.current!==n&&(G.current=n,Z())},[r,s,l,n,Z]),{engine:l,installHint:c,installCommand:_,compiling:m,compiled:S,stale:S!==null&&S.source!==a,log:v,builtWithErrors:w,note:C,error:N,showPdf:z,setShowPdf:P,viewNonce:O,compile:Z,dismiss:()=>{T(null),b(null)}}}const Z1t=3e4;function Q1t({projectId:e,filePath:n,sessionId:t,enabled:r,savedSource:s,dirty:a,onPulled:l}){const[o,c]=M.useState(!1),[d,_]=M.useState(null),[h,m]=M.useState(!1),[g,S]=M.useState(!1),[k,v]=M.useState(null),[b,w]=M.useState(null),[x,C]=M.useState(!1),j=M.useCallback(P=>{c(P.hasToken),_(P.link)},[]);M.useEffect(()=>{let P=!1;if(m(!1),_(null),v(null),w(null),C(!1),D.current=!1,!!r)return UQe(e,n,{sessionId:t}).then(F=>{P||j(F)}).catch(F=>{P||w(F instanceof Error?F.message:String(F))}).finally(()=>{P||m(!0)}),()=>{P=!0}},[r,e,n,t,j]),M.useEffect(()=>{C(!1)},[s]);const N=M.useRef(!1),T=M.useRef(l);T.current=l;const z=M.useRef(a);z.current=a;const D=M.useRef(!1),O=M.useCallback(P=>N.current||z.current?!1:(N.current=!0,S(!0),w(null),VQe(e,n,{sessionId:t,resolve:P}).then(F=>{D.current=!1,v(F),F.pulled.includes(n)&&(z.current?C(!0):T.current(F.pulled))}).catch(F=>{D.current=!0,v(null),w(F instanceof Error?F.message:String(F))}).finally(()=>{N.current=!1,S(!1)}),!0),[e,n,t]),H=M.useRef(null);return M.useEffect(()=>{if(!r||!h||!d||a)return;const P=`${n}:${d.projectId}:${s}`;H.current!==P&&O()&&(H.current=P)},[r,h,d,n,s,a,g,O]),M.useEffect(()=>{if(!r||!h||!d||a)return;const P=setInterval(()=>{N.current||D.current||WQe(e,n,{sessionId:t}).then(F=>{F.remoteChanged&&O()}).catch(F=>{D.current=!0,w(F instanceof Error?F.message:String(F))})},Z1t);return()=>clearInterval(P)},[r,h,d,a,e,n,t,O]),{hasToken:o,link:d,loaded:h,syncing:g,last:k,error:b,blocked:a,staleOnDisk:x,reloaded:()=>C(!1),uploadUrl:KQe(e,n,{sessionId:t}),saveToken:async P=>{const F=await FN(P);c(F.hasToken)},linkProject:async P=>{j(await qQe(e,n,{project:P,sessionId:t}))},unlink:async()=>{j(await GQe(e,n,{sessionId:t})),H.current=null,D.current=!1,v(null),w(null)},sync:P=>{D.current=!1,O(P)},dismiss:()=>{D.current=!1,w(null)}}}function JM(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function IC(e,n,t=!1){const r=n.indexOf("#"),s=r===-1?n:n.slice(0,r),a=r===-1?"":n.slice(r),l=s.indexOf("?"),o=l===-1?s:s.slice(0,l),c=l===-1?"":s.slice(l+1);let d;try{d=decodeURI(o)}catch{return null}if(!d||d.includes("\0"))return null;const _=d.startsWith("/"),h=_?[]:e.split("/").filter(Boolean);for(const m of d.split("/"))if(!(!m||m===".")){if(m===".."){if(h.length===0)return null;h.pop();continue}h.push(m)}return h.length===0?null:{path:`${t&&(_||e.startsWith("/"))?"/":""}${h.join("/")}`,query:c,hash:a}}function J1t(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}const BC=[{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"]}],ebt=4e6,tbt=200,$C=16e6,nbt=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)}),HC=e=>e.startsWith("//")?`https:${e}`:e;async function rbt(e,n){var s;let t=ebt;const r=new Map;for(const{element:a,attribute:l,url:o,typePrefixes:c}of e){if(r.has(o)){const S=r.get(o);S&&a.setAttribute(l,S);continue}if(n.aborted)return;if(r.size>=tbt)continue;r.set(o,null);const d=await fetch(o,{signal:n}).catch(()=>null);if(!(d!=null&&d.ok))continue;const _=d.headers.get("content-type")??"",h=Number(d.headers.get("content-length"));if(!c.some(S=>_.startsWith(S))||!(Number.isFinite(h)&&h>0&&h<=t)){await((s=d.body)==null?void 0:s.cancel().catch(()=>{}));continue}const m=await d.blob().catch(()=>null),g=m&&await nbt(m);!m||!g||(t-=m.size,r.set(o,g),a.setAttribute(l,g))}}async function sbt(e,n,t){var l;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(BC.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:d,typePrefixes:_}of BC){if(!o.matches(c))continue;const h=o.getAttribute(d);if(!h)continue;const m=n(h);m&&(m===h?o.setAttribute(d,HC(h)):s.push({element:o,attribute:d,url:m,typePrefixes:_}))}await rbt(s,t);for(const o of r.querySelectorAll("a[href]")){const c=o.getAttribute("href");!c||!JM(c)||(o.setAttribute("href",HC(c)),o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"))}const a=((l=r.querySelector("base[href]"))==null?void 0:l.getAttribute("href"))??"";if(!/^https?:\/\//i.test(a)){const o=r.createElement("base");o.setAttribute("href","about:srcdoc"),r.head.prepend(o)}return`${r.doctype?``:""}${r.documentElement.outerHTML}`}async function ibt(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${$C-1}`}}).catch(()=>null),a=s!=null&&s.ok?await s.text().catch(()=>null):null;if(a===null)return{text:e,partial:!0};const l=Number((o=s==null?void 0:s.headers.get("content-range"))==null?void 0:o.split("/").pop());return{text:a,partial:Number.isFinite(l)&&l>$C}}function abt({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[a,l]=M.useState(null);return M.useEffect(()=>{let o=!1;const c=new AbortController;return l(null),ibt(e,n,t,c.signal).then(async({text:d,partial:_})=>({source:await sbt(d,s,c.signal),partial:_})).then(d=>{o||l(d)}),()=>{o=!0,c.abort()}},[e,n,t,s]),a===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(Mt,{})," ",TE()]}):f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[a.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:Kde()}),f.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:Qde({name:we(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:a.source})]})}const N0=e=>Ra(new Intl.ListFormat(E()).format(e.map(we)));function obt(e){if(e.error)return _4e();if(e.syncing)return Vwe();if(e.blocked)return HE();const n=e.last;return n?n.pulled.length&&n.pushed.length?vwe({pulled:N0(n.pulled),pushed:N0(n.pushed)}):n.pulled.length?pwe({paths:N0(n.pulled)}):n.pushed.length?Swe({paths:N0(n.pushed)}):n.conflicts.length?E4e():$E():dwe()}function PC({href:e}){return f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:rwe()})}function lbt({overleaf:e}){var m,g;const[n,t]=M.useState(""),[r,s]=M.useState(!1),[a,l]=M.useState(null),[o,c]=M.useState(!1),d=()=>{t(""),l(null),c(!0)},_=!e.hasToken||o;async function h(S){S.preventDefault();const k=n.trim();if(!(r||!k)){s(!0),l(null);try{_?(await e.saveToken(k),c(!1)):await e.linkProject(k),t("")}catch(v){l(v instanceof Error?v.message:String(v))}finally{s(!1)}}}if(e.link&&!o){const S=((m=e.last)==null?void 0:m.conflicts)??[];return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsxs("div",{className:"flex items-center flex-wrap gap-2 text-sm text-subtext",children:[f.jsx("span",{className:"flex-1 min-w-0",children:obt(e)}),e.syncing&&f.jsx(Mt,{}),f.jsxs("a",{className:"inline-flex items-center gap-1 text-sm text-subtext whitespace-nowrap",href:e.link.url,target:"_blank",rel:"noreferrer",children:[F4e()," ",f.jsx(jc,{size:11})]}),f.jsx(Ue,{disabled:e.syncing||e.blocked,"data-tip":e.blocked?Nwe():void 0,onClick:()=>e.sync(),children:Y4e()}),f.jsx(Ue,{variant:"ghost",disabled:e.syncing,onClick:()=>void e.unlink().catch(k=>{l(k instanceof Error?k.message:String(k))}),children:J4e()})]}),S.map(k=>f.jsxs("div",{className:"flex items-center flex-wrap gap-2 text-sm text-accent-red",children:[f.jsxs("span",{className:"flex-1 min-w-0",children:[f.jsx("code",{className:"font-mono",children:k})," ",D4e()]}),f.jsx(Ue,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[k]:"keep-local"}),children:B4e()}),f.jsx(Ue,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[k]:"take-overleaf"}),children:owe()})]},k)),((g=e.last)==null?void 0:g.note)&&f.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),a&&f.jsx("div",{className:"text-sm text-accent-red whitespace-pre-wrap",children:a}),f.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[f.jsx(PC,{href:e.uploadUrl}),f.jsx(Ue,{variant:"ghost",type:"button",onClick:d,children:I7()})]})]})}return f.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:h,children:[f.jsx("div",{className:"text-sm text-subtext",children:_?Xwe():e5e()}),f.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[f.jsx("input",{className:"flex-1 min-w-55 text-sm",type:_?"password":"text",value:n,onChange:S=>t(S.target.value),placeholder:_?o4e():"https://www.overleaf.com/project/…",autoComplete:"off"}),f.jsx(Ue,{type:"submit",disabled:r||!n.trim(),children:r?_?aa():Fp():_?Dwe():b4e()}),f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:_?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:_?r4e():w4e()})]}),a&&f.jsx("div",{className:"text-sm text-accent-red whitespace-pre-wrap",children:a}),f.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[f.jsx(PC,{href:e.uploadUrl}),o?f.jsx(Ue,{variant:"ghost",type:"button",onClick:()=>c(!1),children:A4e()}):e.hasToken&&f.jsx(Ue,{variant:"ghost",type:"button",onClick:d,children:I7()})]})]})}function cbt({command:e}){const[n,t]=M.useState("idle"),r=M.useRef(null),s=async()=>{try{await navigator.clipboard.writeText(e),t("copied"),setTimeout(()=>t("idle"),1500)}catch{const a=r.current;if(a){const l=document.createRange();l.selectNodeContents(a);const o=window.getSelection();o==null||o.removeAllRanges(),o==null||o.addRange(l)}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(Gt,{"data-tip":n==="copied"?ip():n==="select"?rhe():ude(),"aria-label":_de(),onClick:()=>void s(),children:n==="copied"?f.jsx(_i,{size:13}):f.jsx(Vp,{size:13})})]})}function ubt({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:a,branchLabel:l,onOpenFile:o,scrollPosition:c,onScrollPositionChange:d,lineScrollRequest:_,onLineScrollRequestHandled:h,onEdit:m,remote:g=!1}){var bn;const[S,k]=M.useState(null),[v,b]=M.useState(null),[w,x]=M.useState(!0),[C,j]=M.useState(0),N=t==="artifacts",T=t==="abs",z=D4(n),D=DM(n),O=x1t(n),H=z||O,[P,F]=M.useState(!1),[W,Z]=M.useState(""),[G,X]=M.useState(!1),[J,$]=M.useState(null),L=M.useRef(null),B=M.useRef(c),Y=(S==null?void 0:S.file)??null,V=(S==null?void 0:S.source)==="checkout"?S.file.path:n,se=V.split("/").slice(0,-1).join("/"),le=(S==null?void 0:S.source)==="artifact",ae=M.useCallback(Je=>{var ht;return((ht=IC(se,Je,T))==null?void 0:ht.path)??null},[T,se]),re=M.useCallback(Je=>T?OQe(Je):le?zh(e,Je):oS(e,Je,{sessionId:r,ref:s}),[le,s,T,e,r]),q=M.useCallback(Je=>{if(JM(Je))return Je;const ht=IC(se,Je,T);return ht?J1t(re(ht.path),ht):null},[T,se,re]),oe=$M(Y==null?void 0:Y.presentation),ce=(S==null?void 0:S.source)==="artifact"&&!N,_e=N&&(S==null?void 0:S.source)==="checkout",ue=!s&&(S==null?void 0:S.source)==="checkout"&&Y!=null&&!Y.notFound,Ne=r!=null&&(S==null?void 0:S.source)==="checkout"&&S.file.root==="clone",ze=ue&&Y!=null&&!Y.binary&&!Y.truncated&&!oe&&!Ne,Ie=M.useMemo(()=>((Y==null?void 0:Y.content)??"").replace(/\r\n/g,` -`),[Y==null?void 0:Y.content]),Pe=ze&&W!==Ie,$e=M.useRef(null);M.useEffect(()=>{const Je=(Y==null?void 0:Y.content)??"";if($e.current!==null&&Je===$e.current){$e.current=null;return}Z(Je.replace(/\r\n/g,` -`)),$(null)},[Y==null?void 0:Y.content,n]);const It=async()=>{if(!ze||Y==null||!Pe||G)return!Pe;const Je=Y.content.includes(`\r -`)?W.replace(/\n/g,`\r -`):W;X(!0),$(null);try{return await IQe(e,V,Je,{sessionId:r}),$e.current=Je,k(ht=>ht&&ht.source==="checkout"?{source:"checkout",file:{...ht.file,content:Je}}:ht),!0}catch(ht){return $(ht instanceof Error?ht.message:String(ht)),!1}finally{X(!1)}},yt=D&&ue&&!Ne,qe=X1t({projectId:e,filePath:V,sessionId:r,enabled:yt,ready:Y!=null&&!Y.notFound,source:ze?W:(Y==null?void 0:Y.content)??""}),jt=Q1t({projectId:e,filePath:V,sessionId:r,enabled:yt,savedSource:Ie,dirty:Pe,onPulled:M.useCallback(Je=>{Je.includes(V)&&j(ht=>ht+1)},[V])}),[pt,ot]=M.useState(!1),tt=((bn=jt.last)==null?void 0:bn.conflicts.length)??0;M.useEffect(()=>{tt>0&&ot(!0)},[tt]);const Ft=jt.error?Fwe():tt>0?Jye():jt.blocked?HE():jt.link?$E():Bwe(),ke=jt.error||tt>0?"text-accent-red":jt.link?"text-accent-green":void 0,Re=D&&qe.showPdf&&qe.compiled!=null,Xe=ze&&!(H&&!P)&&!Re,nt=qe.compiled?`${oS(e,qe.compiled.path,{sessionId:r})}&v=${qe.compiled.version}`:null,st=nt?`${nt}&view=${qe.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,St=qe.compiled?qe.compiled.path.split("/").pop()??qe.compiled.path:null,mt=async()=>{Pe&&!await It()||D&&qe.engine&&qe.compile()},Wt=async()=>{Pe&&await mt()},[fn,hn]=M.useState(!1),[At,jn]=M.useState(null),nn=async()=>{hn(!0),jn(null);try{await BQe(e,V,{sessionId:r})}catch(Je){jn(Je instanceof Error?Je.message:String(Je))}finally{hn(!1)}},nr=`${re(V)}&v=${C}`;M.useEffect(()=>{let Je=!1;x(!0);const ht=async()=>{const Ge=await TJe(e,n),Bt=(Ge==null?void 0:Ge.presentation)==="text"||(Ge==null?void 0:Ge.presentation)==="unknown",He=Ge&&Bt?await XN(e,n):null,it=Ge===null||Bt&&He===null;return{path:n,content:(He==null?void 0:He.content)??"",truncated:(He==null?void 0:He.truncated)??!1,binary:(He==null?void 0:He.binary)??(Ge==null?void 0:Ge.presentation)==="download",notFound:it,presentation:He?He.binary?"download":"text":(Ge==null?void 0:Ge.presentation)??"download"}},An=async()=>{for(const Ge of[`artifacts/${n}`,n]){const Bt=await aS(e,Ge,{sessionId:r}).catch(()=>null);if(Bt&&!Bt.notFound)return Bt}return null};return(T?LQe(n).then(Ge=>({source:"absolute",file:Ge})):N?ht().then(async Ge=>{if(!Ge.notFound)return{source:"artifact",file:Ge};const Bt=await An();return Bt?{source:"checkout",file:Bt}:{source:"artifact",file:Ge}}):aS(e,n,{sessionId:r,ref:s}).then(Ge=>Ge.notFound&&!s?ht().then(Bt=>Bt.notFound?{source:"checkout",file:Ge}:{source:"artifact",file:Bt,checkoutRoot:Ge.root}):{source:"checkout",file:Ge})).then(Ge=>{Je||(k(Ge),b(null))}).catch(Ge=>{Je||b(Ge.message)}).finally(()=>{Je||x(!1)}),()=>{Je=!0}},[e,n,t,r,s,C]),M.useLayoutEffect(()=>{const Je=L.current,ht=B.current;!Je||!Y||!ht||(Je.scrollTop=ht.top,Je.scrollLeft=ht.left)},[Y]);const lr=Je=>{if(Je.source==="absolute")return gfe();if(N)return cfe({root:r?n0():t0()});if(s)return hfe({branch:we(s)});if(r&&Je.source==="checkout"&&Je.file.root==="clone")return jhe();const ht=Je.source==="checkout"?Je.file.root:Je.checkoutRoot;return yfe({root:ht==="worktree"?n0():t0()})};return f.jsxs("div",{className:"file-view flex flex-col h-full min-h-0",children:[f.jsxs("div",{className:"file-view-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant text-text shrink-0",children:[f.jsx(Xu,{size:13,className:"shrink-0"}),f.jsx("code",{className:"file-view-path font-mono text-sm text-text flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:V,children:V}),l&&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:FO({branch:we(l)}),children:[f.jsx(Kp,{size:11}),l]}),Xe&&(G||Pe||J)&&f.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${J?"text-accent-red":"text-muted"}`,title:J??(G?aa():Che()),children:G?f.jsxs(f.Fragment,{children:[f.jsx(Mt,{})," ",Jfe()]}):J?Yfe():yhe()}),D&&qe.compiled&&f.jsx(Gt,{active:!qe.showPdf,"data-tip":qe.stale&&qe.showPdf?Ofe():qe.showPdf?Du():x7(),"data-tip-align":"end","aria-label":qe.showPdf?Du():x7(),onClick:()=>qe.setShowPdf(!qe.showPdf),children:qe.showPdf?f.jsx(Bv,{size:13}):f.jsx(Xu,{size:13,className:qe.stale?"text-accent-amber":void 0})}),D&&nt&&St&&f.jsx(Qp,{"data-tip":qe.stale?Ode({name:we(St)}):z6({name:we(St)}),"data-tip-align":"end","aria-label":z6({name:we(St)}),href:nt,download:St,children:f.jsx(nZe,{size:13,className:qe.stale?"text-accent-amber":void 0})}),yt&&f.jsx(Gt,{active:pt,"data-tip":Ft,"data-tip-align":"end","aria-label":hB({status:Ft}),"aria-expanded":pt,onClick:()=>ot(Je=>!Je),children:jt.syncing?f.jsx(Mt,{}):f.jsx(YXe,{size:13,className:ke})}),D&&ue&&f.jsx(Gt,{"data-tip":qe.compiled?b7():p7(),"data-tip-align":"end","aria-label":qe.compiled?b7():p7(),disabled:qe.compiling||!qe.engine,onClick:()=>void mt(),children:qe.compiling?f.jsx(Mt,{}):f.jsx(oZe,{size:13})}),H&&f.jsx(Gt,{active:P,"data-tip":P?ap():Du(),"data-tip-align":"end","aria-label":P?ap():Du(),onClick:()=>F(Je=>!Je),children:f.jsx(Bv,{size:13})}),ue&&!g&&f.jsx(Gt,{"data-tip":At??g7(),"data-tip-align":"end","aria-label":g7(),disabled:fn,onClick:()=>void nn(),children:fn?f.jsx(Mt,{}):f.jsx(jc,{size:13})}),f.jsx(Gt,{"data-tip":v7(),"data-tip-align":"end","aria-label":v7(),onClick:()=>j(Je=>Je+1),children:w?f.jsx(Mt,{}):f.jsx(TN,{size:13})})]}),!v&&_e&&(S==null?void 0:S.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:Cfe({root:S.file.root==="worktree"?n0():t0()})}),(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?ade():Jue())}),f.jsx(Gt,{"data-tip":m7(),"data-tip-align":"end","aria-label":Cde(),onClick:qe.dismiss,children:f.jsx(Ur,{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})]}),yt&&jt.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:Mfe()}),f.jsx(Ue,{onClick:()=>{jt.reloaded(),j(Je=>Je+1)},children:bde()})]}),yt&&jt.error&&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 flex items-start gap-2",children:[f.jsx("span",{className:"flex-1 min-w-0 text-sm text-accent-red whitespace-pre-wrap",children:jt.error}),f.jsx(Gt,{"data-tip":m7(),"data-tip-align":"end","aria-label":jde(),onClick:jt.dismiss,children:f.jsx(Ur,{size:13})})]}),yt&&pt&&jt.loaded&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4",children:f.jsx(lbt,{overleaf:jt})}),D&&ue&&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(cbt,{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}),Re&&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:hhe()}),f.jsxs("div",{ref:L,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",onScroll:Je=>{const ht={top:Je.currentTarget.scrollTop,left:Je.currentTarget.scrollLeft};B.current=ht,d==null||d(ht)},children:[!Xe&&!v&&!N&&(S==null?void 0:S.source)==="checkout"&&!S.file.notFound&&!s&&r&&S.file.root==="clone"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:ghe()}),!Xe&&!v&&(S==null?void 0:S.source)==="artifact"&&!S.file.notFound&&ce&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Gue({root:S.checkoutRoot==="worktree"?n0():t0()})}),v?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Hde()," ",we(v)]}):Y===null?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:TE()}):Y.notFound?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:S?lr(S):ife()}):oe?f.jsx(rx,{kind:oe,url:nr,name:n.split("/").pop()??n}):Y.binary?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Yue()," ",f.jsx("a",{href:nr,download:n.split("/").pop()??n,children:AE()})]}):Re&&st&&St?f.jsx(rx,{kind:"pdf",url:st,name:St,downloadBar:!1},st):z&&!P?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:le?f.jsx(qM,{projectId:e,folder:se,markdown:Y.content}):f.jsx(Oa,{text:Y.content,resolveFilePath:ae,resolveImageSrc:q,onOpenFile:o&&((Je,ht,An,rr,Ge)=>o(Je,r,s,Ge))})}):O&&!P?f.jsx(abt,{html:Y.content,truncated:Y.truncated,url:nr,name:V,resolveSrc:q}):Xe?f.jsx(bT,{value:W,onChange:Je=>{Z(Je),m==null||m(),J&&$(null)},onSave:()=>void Wt(),onBlur:()=>void Wt(),path:n,highlightLine:a,scrollRequest:_,onScrollRequestHandled:h}):f.jsxs(f.Fragment,{children:[f.jsx(BM,{text:Y.content,path:n,highlightLine:a,scrollRequest:_,onScrollRequestHandled:h}),Y.truncated&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:qde()})]})]})]})}const pv=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function dbt({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:a,setOpen:l,ref:o}=Va(),c=M.useRef(null);return M.useEffect(()=>{if(!a)return;const d=_=>{var h;_.key==="Escape"&&((h=c.current)==null||h.focus())};return document.addEventListener("keydown",d,!0),()=>document.removeEventListener("keydown",d,!0)},[a]),f.jsxs("div",{className:"rail-brand flex items-center gap-1 h-16 p-2 border-b border-b-border shrink-0 [&_.project-switcher]:relative [&_.project-switcher]:flex-1 [&_.project-switcher]:self-stretch [&_.project-switcher]:min-w-0 [&_.project-back]:shrink-0 [&_.brand]:flex [&_.brand]:items-center [&_.brand]:justify-between [&_.brand]:gap-2 [&_.brand]:w-full [&_.brand]:h-full [&_.brand]:min-w-0 [&_.brand]:font-semibold [&_.brand]:text-base [&_.brand]:text-text [&_.brand]:py-1 [&_.brand]:px-1.5 [&_.brand]:border [&_.brand]:border-transparent [&_.brand]:rounded-sm [&_.brand:hover]:bg-surface [&_.brand:hover]:border-border [&_.brand.open]:bg-surface [&_.brand.open]:border-border [&_.brand_svg]:shrink-0 [&_.brand-project-copy]:flex [&_.brand-project-copy]:flex-col [&_.brand-project-copy]:gap-[3px] [&_.brand-project-copy]:min-w-0 [&_.brand-project-copy]:leading-[1.15] [&_.brand-project-copy]:text-start [&_.brand-project-label]:text-muted [&_.brand-project-label]:text-xs [&_.brand-project-label]:font-medium [&_.brand-project-label]:tracking-[0.04em] [&_.brand-project-label]:uppercase [&_.brand_.brand-project]:min-w-0 [&_.brand_.brand-project]:overflow-hidden [&_.brand_.brand-project]:text-ellipsis [&_.brand_.brand-project]:whitespace-nowrap [&_.brand_.brand-project]:text-xl [&_.project-chevron]:text-muted [&_.project-chevron]:opacity-0 [&_.project-chevron]:transition-transform [&_.project-chevron]:duration-120 [&_.project-chevron]:ease-standard [&_.brand:hover_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:rotate-180 [&_.project-menu]:start-0 [&_.project-menu]:w-52.5 [&_.project-menu]:z-70",children:[f.jsx(Gt,{className:"project-back text-text","aria-label":y7(),onClick:n,children:f.jsx(qf,{size:18})}),f.jsxs("div",{className:"project-switcher",ref:o,children:[f.jsxs("button",{ref:c,className:`brand${a?" open":""}`,onClick:()=>l(d=>!d),"aria-expanded":a,children:[f.jsxs("span",{className:"brand-project-copy",children:[f.jsx("span",{className:"brand-project-label",children:Y_e()}),f.jsx("span",{className:"brand-project",children:e})]}),f.jsx($a,{className:"project-chevron",size:14})]}),a&&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 project-menu",children:[f.jsx(Mr,{onClick:()=>{l(!1),r()},children:f.jsxs("span",{className:pv,children:[f.jsx(EN,{size:14}),B_e()]})}),f.jsx(Mr,{onClick:()=>{l(!1),n()},children:f.jsxs("span",{className:pv,children:[f.jsx(SZe,{size:14}),y7()]})}),f.jsx(Mr,{onClick:()=>{var d;(d=c.current)==null||d.focus(),l(!1),t()},children:f.jsxs("span",{className:pv,children:[f.jsx(hZe,{size:14}),F_e()]})})]})]}),s&&f.jsx(Gt,{"data-tip":w7(),"data-tip-align":"end","aria-label":w7(),onClick:s,children:f.jsx(jN,{size:15})})]})}function FC(){const e=M.useSyncExternalStore(zet,dS,dS);return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":Lv()}),!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(yN,{size:13,className:"shrink-0 text-accent-amber"}),f.jsx("span",{dir:"auto",className:"min-w-0",children:Lv()})]})]})}const UC=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),lh=["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(" "),qC=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),eR=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),GC=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),fbt=[{id:"AI/ML",label:Xbe},{id:"Biology",label:eve},{id:"Physics",label:lve},{id:"Other",label:sve}];function hbt({onDone:e,preferredAgent:n}){const[t,r]=M.useState(0),[s,a]=M.useState(null),[l,o]=M.useState(),[c,d]=M.useState(!1),[_,h]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!1),[v,b]=M.useState([]),[w,x]=M.useState(""),[C,j]=M.useState(""),[N,T]=M.useState([]),[z,D]=M.useState(""),[O,H]=M.useState([]),[P,F]=M.useState(!1),W=M.useRef(0),[Z,G]=M.useState(!1),[X,J]=M.useState(!1),$=(s==null?void 0:s.some(q=>q.agentReady))??!1,L=l!=null,B=M.useRef(0),Y=(q,oe=!1)=>{const ce=++B.current;k(!0),G(!1),J(!1),o(void 0);const _e=()=>ce===B.current;Promise.allSettled([up(q,oe).then(ue=>_e()&&a(ue)),$N().then(ue=>_e()&&o(ue.gitVersion))]).then(([ue,Ne])=>{_e()&&(ue.status==="rejected"&&(G(!0),a(null)),Ne.status==="rejected"&&(J(!0),o(void 0)))}).finally(()=>_e()&&k(!1))};M.useEffect(()=>Y(!1),[]),M.useEffect(()=>{if(s===null)return;const q=s.filter(oe=>oe.agentReady);g(oe=>{var _e;if(oe&&q.some(ue=>ue.id===oe))return oe;const ce=n&&q.find(ue=>ue.id===n.harness);return(ce==null?void 0:ce.id)??((_e=q[0])==null?void 0:_e.id)??null})},[s,n]),M.useEffect(()=>Vx(()=>{up(!0).then(q=>{a(q),G(!1)}).catch(()=>G(!0))}),[]),M.useEffect(()=>{MJe().then(q=>{b(q.researchAreas),x(q.otherArea??""),j(q.background??""),T(q.papers)}).catch(()=>{})},[]),M.useEffect(()=>{const q=z.trim();if(q.length<3){H([]),F(!1);return}const oe=++W.current;F(!0);const ce=setTimeout(()=>{HN(q).then(_e=>oe===W.current&&H(_e)).catch(()=>oe===W.current&&H([])).finally(()=>oe===W.current&&F(!1))},350);return()=>clearTimeout(ce)},[z]);const V=q=>{const oe=N.some(ce=>ce.paperId===q.paperId);T(ce=>ce.some(_e=>_e.paperId===q.paperId)?ce:[...ce,{paperId:q.paperId,title:VC(q.title)}]),D(""),H([]),oe||Hv(q.paperId).then(ce=>{var ue;const _e=(ue=ce.title)==null?void 0:ue.trim();_e&&T(Ne=>Ne.map(ze=>ze.paperId===q.paperId?{...ze,title:_e}:ze))}).catch(()=>{})},se=q=>T(oe=>oe.filter(ce=>ce.paperId!==q)),le=q=>{b(oe=>oe.includes(q)?oe.filter(ce=>ce!==q):[...oe,q])},ae=v.length>0&&(!v.includes("Other")||w.trim().length>0),re=async()=>{const q=s==null?void 0:s.find(ce=>ce.id===m&&ce.agentReady);if(!q||c)return;const oe=pbt(q);d(!0),h(null);try{const ce=await yQe(oe,{researchAreas:v,otherArea:v.includes("Other")?w:null,background:C||null,papers:N});e(ce.project,ce.selection)}catch(ce){h(ce instanceof Error?ce.message:String(ce))}finally{d(!1)}};return f.jsx("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${t===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:f.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${t===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:t===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(cb,{})}),f.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:$be()})]}),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:Wve()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:yye()})]})}),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:k2e()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:tye()})]})}),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:f2e()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Gye()})]})})]})]}),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(Ue,{variant:"primary",size:"large",onClick:()=>r(1),children:[D7()," ",f.jsx($0,{size:20})]})})]}):t===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(cb,{}),f.jsx("span",{children:iye()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:Nve()}),f.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:X2e()}),s!==null&&!$&&f.jsx("p",{className:UC,children:Wxe()}),s!==null&&$&&m===null&&f.jsx("p",{className:UC,children:Tve()}),f.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:s!==null?s.map(q=>f.jsx(gbt,{h:q,selected:m===q.id,onSelect:()=>g(q.id)},q.id)):Z?f.jsx("div",{className:lh,children:O7()}):f.jsxs(Sr,{className:"py-2",children:[f.jsx(Mt,{})," ",s2e()]})}),(l===null||X)&&f.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[f.jsx(bbt,{gitVersion:l,error:X}),X?f.jsx("p",{className:qC,children:O7()}):f.jsx("p",{className:qC,children:x2e()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Ue,{variant:"ghost",onClick:()=>r(0),children:[f.jsx(qf,{size:12})," ",R7()]}),(Z||X||l===null||s!==null&&!$)&&f.jsxs(Ue,{variant:"ghost",onClick:()=>Y(!0,!0),disabled:S,children:[f.jsx(hd,{size:12,className:S?"animate-[spin_0.9s_linear_infinite]":""})," ",sxe()]}),f.jsx("div",{className:"flex-1"}),f.jsxs(Ue,{variant:"primary",onClick:()=>r(2),disabled:S||!$||m===null||!L,title:S?Iye():$?m===null?Uve():X?fxe():l===void 0?Rye():l===null?M2e():void 0:Uxe(),children:[D7()," ",f.jsx($0,{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(cb,{}),f.jsx("span",{children:cye()})]}),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:hye()}),f.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:f.jsxs("div",{className:eR,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:Pye()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:$ve()}),f.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:fbt.map(q=>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:v.includes(q.id),onChange:()=>le(q.id),disabled:c}),f.jsx("span",{children:q.label()})]},q.id))}),v.includes("Other")&&f.jsx("input",{className:"onb-other-area w-full mt-2",value:w,onChange:q=>x(q.target.value),disabled:c,placeholder:gye(),"aria-label":exe()})]}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:xxe()}),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:C,onChange:q=>j(q.target.value),disabled:c,rows:4,placeholder:l2e()}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:mxe()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:Ube()}),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:z,onChange:q=>D(q.target.value),disabled:c,placeholder:Nxe()}),P?f.jsx("div",{className:lh,children:Txe()}):O.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:O.map(q=>f.jsxs("button",{type:"button",onClick:()=>V(q),disabled:c,children:[f.jsx(nh,{children:VC(q.title)}),f.jsx("span",{className:"id",children:q.paperId})]},q.paperId))}):null]}),N.length>0&&f.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:N.map(q=>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(nh,{children:q.title||q.paperId}),f.jsx("span",{className:"id",children:q.paperId}),f.jsx("button",{type:"button","aria-label":CB({name:we(q.paperId)}),onClick:()=>se(q.paperId),disabled:c,children:f.jsx(Ur,{size:12})})]},q.paperId))})]})}),!ae&&f.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:v.length===0?Lve():e2e()}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Ue,{variant:"ghost",onClick:()=>r(1),disabled:c,children:[f.jsx(qf,{size:12})," ",R7()]}),f.jsx("div",{className:"flex-1"}),f.jsx(Ue,{variant:"primary",onClick:()=>void re(),disabled:c||m===null||!ae,children:c?f.jsxs(f.Fragment,{children:[f.jsx(Mt,{})," ",$xe()]}):f.jsxs(f.Fragment,{children:[m2e()," ",f.jsx($0,{size:13})]})})]}),m===null&&f.jsx("p",{className:GC,children:Yye()}),_&&f.jsx("p",{className:GC,children:_})]})})})}function VC(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function _bt(e){return e.agentReady?{tone:"success",label:Zxe()}:e.installed?e.installBroken?{tone:"warning",label:z2e()}:e.authState==="unknown"?{tone:"warning",label:Cye()}:e.authState==="unsupported"?{tone:"warning",label:jye()}:e.installed?{tone:"warning",label:V2e()}:{tone:"neutral",label:L7()}:{tone:"neutral",label:L7()}}function pbt(e){var t,r;const n=((t=e.models[0])==null?void 0:t.id)??null;return{harness:e.id,model:n,permissionMode:((r=e.options)==null?void 0:r.defaultPermissionMode)??null,reasoningLevel:Zp(e,n).defaultId}}function mbt({harness:e}){return f.jsx(L2,{harness:e,size:26})}function gbt({h:e,selected:n,onSelect:t}){var c;const r=_bt(e),s=n?{tone:"success",label:Lxe()}:r,l=[(c=e.version)==null?void 0:c.replace(/\s*\(.*\)$/,""),e.models.length>0&&`${e.models.length} model${e.models.length===1?"":"s"} — ${e.models.slice(0,3).map(d=>op(d)).join(", ")}${e.models.length>3?", …":""}`].filter(Boolean).join(" · "),o=f.jsxs("div",{className:"onb-card-head flex 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(mbt,{harness:e.id}),f.jsx("span",{className:"onb-card-name text-lg font-semibold tracking-[-0.01em]",children:e.name})]}),f.jsx(Xx,{tone:s.tone,children:s.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-5.5 px-6 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${n?" selected":""}`,"aria-pressed":n,onClick:t,children:[o,f.jsxs("div",{className:"onb-card-detail text-sm",children:[e.account??IE(),e.plan?` · ${e.plan}`:""]}),f.jsx("div",{className:`${lh} w-full overflow-hidden text-ellipsis whitespace-nowrap`,title:l,children:l})]}):f.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[o,f.jsx("div",{className:lh,children:Bh(e.agentNote)})]})}function bbt({gitVersion:e,error:n}){return f.jsxs("div",{className:eR,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:O2e()}),f.jsx(Xx,{tone:e?"success":n||e===null?"danger":"warning",children:e?lxe():n?pve():e===null?BE():vve()})]}),(e||!n&&e===void 0)&&f.jsx("div",{className:lh,children:e??Sve()})]})}function mv(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function vbt(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 xbt(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 ybt(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function wbt({onCreated:e,onCancel:n,remote:t=!1}){const[r,s]=M.useState("blank"),[a,l]=M.useState(""),[o,c]=M.useState(!1),[d,_]=M.useState(""),[h,m]=M.useState(!1),[g,S]=M.useState(null),[k,v]=M.useState(null),[b,w]=M.useState(!1),[x,C]=M.useState(!1),[j,N]=M.useState(!1),[T,z]=M.useState(null),[D,O]=M.useState(!1),[H,P]=M.useState(!1),[F,W]=M.useState(void 0),[Z,G]=M.useState("research-project"),[X,J]=M.useState(null),[$,L]=M.useState(!1),[B,Y]=M.useState(!1),[V,se]=M.useState(""),[le,ae]=M.useState(null),[re,q]=M.useState([]),[oe,ce]=M.useState(!1),[_e,ue]=M.useState(""),[Ne,ze]=M.useState(0),Ie=M.useRef(0),Pe=M.useRef(0),$e=M.useRef(0),It=M.useRef({blank:{name:"",nameTouched:!1,path:"",pathTouched:!1},folder:{name:"",nameTouched:!1,path:"",pathTouched:!1},paper:{name:"",nameTouched:!1,path:"",pathTouched:!1}}),yt=r==="paper"?xbt(le==null?void 0:le.repoUrl):null,qe=a.trim()?`~/OpenResearch/${mv(a,48)}`:"",jt=`~/OpenResearch/${mv(a||(le==null?void 0:le.title)||(le==null?void 0:le.paperId)||"")}`,pt=r==="blank"&&!h?qe:r==="paper"&&le&&!h?jt:d,ot=yt??(r==="folder"&&(g!=null&&g.githubOwner)&&g.githubRepo?{owner:g.githubOwner,repo:g.githubRepo}:null);M.useEffect(()=>{kQe().then(({login:He})=>W(He)).catch(()=>W(null)),Fx().then(He=>P(He.githubForNewProjects)).catch(()=>{})},[]),M.useEffect(()=>{let He=!0;L(!0);const it=setTimeout(()=>{CQe(a.trim()).then(({repo:_n})=>He&&G(_n)).catch(()=>He&&G(mv(a,48))).finally(()=>He&&L(!1))},150);return()=>{He=!1,clearTimeout(it)}},[a]),M.useEffect(()=>{let He=!0;if(J(null),Y(!!ot),!!ot)return EQe(ot.owner,ot.repo).then(({canPush:it})=>{He&&it&&J(`github.com/${ot.owner}/${ot.repo}`)}).catch(()=>{}).finally(()=>He&&Y(!1)),()=>{He=!1}},[ot==null?void 0:ot.owner,ot==null?void 0:ot.repo]),M.useEffect(()=>{const He=++Pe.current,it=pt.trim();if(!it){S(null),v(null),w(!1);return}w(!0),v(null);const _n=setTimeout(()=>{$N(it).then(qt=>{He===Pe.current&&S(qt)}).catch(qt=>{He===Pe.current&&(S(null),v(qt instanceof Error?qt.message:String(qt)))}).finally(()=>{He===Pe.current&&w(!1)})},200);return()=>clearTimeout(_n)},[r,Ne,pt]),M.useEffect(()=>{const He=++Ie.current;if(r!=="paper"||le){ce(!1);return}const it=V.trim(),_n=vbt(it);if(!_n&&it.length<3){q([]),ue(""),ce(!1);return}z(null),ce(!0),q([]),ue("");const qt=setTimeout(()=>{if(_n){Hv(_n).then(Nt=>{var pn;He===Ie.current&&(ae(Nt),o||l(((pn=Nt.title)==null?void 0:pn.trim())||Nt.paperId))}).catch(Nt=>He===Ie.current&&z(Nt instanceof Error?Nt.message:String(Nt))).finally(()=>He===Ie.current&&ce(!1));return}HN(it).then(Nt=>{He===Ie.current&&(q(Nt),ue(it))}).catch(Nt=>He===Ie.current&&z(Nt instanceof Error?Nt.message:String(Nt))).finally(()=>He===Ie.current&&ce(!1))},350);return()=>clearTimeout(qt)},[r,le,V,o]);async function tt(He){var _n;const it=++Ie.current;ce(!0),z(null);try{const qt=await Hv(He);if(it!==Ie.current)return;ae(qt),q([]),o||l(((_n=qt.title)==null?void 0:_n.trim())||qt.paperId)}catch(qt){it===Ie.current&&z(qt instanceof Error?qt.message:String(qt))}finally{it===Ie.current&&ce(!1)}}function Ft(){Ie.current+=1,$e.current+=1,ae(null),se(""),q([]),ue(""),ce(!1),C(!1),_(""),m(!1),It.current.paper={name:o?a:"",nameTouched:o,path:"",pathTouched:!1},o||l("")}function ke(He){if(He===r)return;Ie.current+=1,$e.current+=1,It.current[r]={name:a,nameTouched:o,path:d,pathTouched:h};const it=It.current[He];s(He),z(null),v(null),S(null),ce(!1),C(!1),l(it.name),c(it.nameTouched),_(it.path),m(it.pathTouched)}async function Re(){if(x)return;const He=++$e.current;C(!0),z(null);try{const it=await wQe();if(He!==$e.current||!it)return;if(m(!0),S(null),w(!0),_(it),ze(_n=>_n+1),r==="folder"&&!o){const _n=it.replace(/[\\/]+$/,"").split(/[\\/]/).pop();_n&&l(_n)}}catch(it){He===$e.current&&z(it instanceof Error?it.message:String(it))}finally{He===$e.current&&C(!1)}}async function Xe(He){if(He.preventDefault(),!!An){N(!0),z(null);try{const it=await SQe({name:a.trim(),path:pt.trim(),createFolder:r!=="folder",requireNewFolder:r==="blank",initializeGit:!0,githubSyncEnabled:H,locale:E(),...r==="paper"&&le?{paperId:le.paperId,cloneUrl:le.repoUrl??void 0}:{}});e(it.project,it.githubPublicationError)}catch(it){z(it instanceof Error?it.message:String(it))}finally{N(!1)}}}const nt=a.trim(),st=r==="paper"&&le&&!le.repoUrl?le.paperId:null,St=r==="folder"&&(g==null?void 0:g.gitState)==="ready"?g.resolvedPath??null:null,mt=nt!==""&&(r==="blank"||st!==null||St!==null);M.useEffect(()=>{if(!mt)return;const He=window.setTimeout(()=>{NQe({name:nt,paperId:st??void 0,path:St??void 0,locale:E()}).catch(()=>{})},1200);return()=>window.clearTimeout(He)},[mt,nt,st,St]);const Wt=(g==null?void 0:g.gitVersion)===null,fn=r==="folder"&&!!pt.trim()&&g!==null&&g.exists===!1,hn=r==="blank"&&(g==null?void 0:g.exists)===!0,At=!!pt.trim()&&(g==null?void 0:g.exists)===!0&&g.directory===!1,jn=r==="paper"&&!!(le!=null&&le.repoUrl)&&(g==null?void 0:g.empty)===!1,nn=r==="paper"&&!!le&&!(le!=null&&le.repoUrl)&&(g==null?void 0:g.empty)===!1,nr=r==="folder"&&((g==null?void 0:g.gitState)==="detached"||(g==null?void 0:g.gitState)==="invalid"),lr=h&&!pt.trim()||At||jn||nn,bn=h&&!pt.trim()||At||hn,Je=h&&!pt.trim()?M7():At?z7():hn?yge():null,ht=h&&!pt.trim()?M7():At?z7():jn?mbe():nn?Fme():null,An=!!(a.trim()&&pt.trim())&&!j&&!x&&!b&&g!==null&&!k&&!Wt&&!fn&&!hn&&!At&&!jn&&!nn&&!nr&&(r!=="paper"||!!le)&&(!H||typeof F=="string"&&!$&&!B),rr=X??`github.com/${F??"you"}/${Z}`,Ge=F===void 0||$||B,Bt=r==="paper"&&!le&&V.trim().length>=3&&_e===V.trim()&&!oe&&re.length===0&&!T;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:Xe,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:()=>ke("blank"),children:Cge()}),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:()=>ke("folder"),children:Kge()}),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:()=>ke("paper"),children:n1e()})]}),r==="paper"&&!le&&f.jsxs("label",{className:"!font-normal",children:[C1e(),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:V,onChange:He=>{z(null),ue(""),se(He.target.value)},placeholder:L1e()}),!Bt&&f.jsx("span",{className:"repo-hint",children:oe?zbe():xbe()}),Bt&&f.jsx("span",{className:"project-path-notice block",children:h1e()}),re.length>0&&f.jsx("div",{className:"paper-results",children:re.map(He=>f.jsxs("button",{type:"button",onClick:()=>void tt(He.paperId),children:[f.jsx(nh,{children:He.title}),f.jsx("span",{className:"id",children:He.paperId})]},He.paperId))})]}),le&&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(nh,{className:"block",children:le.title||le.paperId}),le.repoUrl&&f.jsx("div",{className:"id",children:ybt(le.repoUrl)})]}),f.jsx(Ue,{size:"small",type:"button","aria-label":Ige(),onClick:Ft,children:Rge()})]}),!le.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(yN,{size:16})," ",g1e()]}),f.jsx("span",{className:"text-sm font-normal text-accent-amber",children:y1e()})]})]}),(r!=="paper"||le)&&f.jsxs(f.Fragment,{children:[r==="blank"&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:T7()}),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:a,onChange:He=>{c(!0),l(He.target.value)},placeholder:A7()})]}),r==="paper"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:le!=null&&le.repoUrl?rge():ib()}),f.jsx("input",{className:"text-sm font-normal",value:pt,onChange:He=>{m(!0),S(null),_(He.target.value)},"aria-describedby":lr?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),b&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:j7()}),lr&&f.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:ht})]}):r==="folder"&&!t?f.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":d?Vme({path:we(d)}):E7(),disabled:x,title:d||void 0,onClick:()=>void Re(),children:[f.jsx(Gf,{className:d?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),f.jsx("span",{className:d?"text-sm":"placeholder",children:x?Jme():d||E7()}),f.jsx(Ha,{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:ib()}),f.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:d,onChange:He=>{m(!0),S(null),_(He.target.value)},placeholder:"/home/user/project",spellCheck:!1,dir:"ltr"})]}):a.trim()?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:ib()}),f.jsx("input",{className:"text-sm font-normal",value:pt,onChange:He=>{m(!0),S(null),_(He.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":bn?"blank-destination-description":void 0,spellCheck:!1}),b&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:j7()}),bn&&f.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Je})]}):null,r!=="blank"&&pt&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:T7()}),f.jsx("input",{className:"text-sm font-normal",value:a,onChange:He=>{c(!0),l(He.target.value)},placeholder:A7()})]}),Wt&&f.jsx("div",{className:"project-path-notice error",children:a1e()}),!Wt&&r==="folder"&&d.trim()&&!b&&(g==null?void 0:g.exists)===!1&&f.jsx("div",{className:"project-path-notice error",children:U1e()}),!Wt&&r==="folder"&&d.trim()&&!b&&At&&f.jsx("div",{className:"project-path-notice error",children:Z1e()}),!Wt&&r==="folder"&&!b&&(g==null?void 0:g.gitState)==="detached"&&f.jsx("div",{className:"project-path-notice error",children:Pge()}),!Wt&&r==="folder"&&!b&&(g==null?void 0:g.gitState)==="invalid"&&f.jsx("div",{className:"project-path-notice error",children:W1e()}),k&&f.jsx("div",{className:"project-path-notice error",role:"alert",children:k})]}),T&&f.jsx("div",{className:"error",role:"alert",children:T}),(r!=="paper"||le)&&pt&&(r!=="blank"||a.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${H&&F===null?" text-accent-red":" text-text"}`,"aria-expanded":D,"aria-controls":"new-project-advanced-settings",onClick:()=>O(He=>!He),children:[H?F===null?Dme():Bme():Ame(),f.jsx($a,{className:D?"rotate-180":"",size:16})]}),D&&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:H,onChange:He=>P(He.target.checked),disabled:j}),f.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:$1e()})]}),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:Ge?tbe({repository:we(rr)}):X?cbe({repository:we(rr)}):ibe({repository:we(rr)})}),f.jsx("span",{children:Qge()}),F===null&&f.jsx("span",{children:kbe({command:we("gh auth login")})})]})]})]}),f.jsxs("div",{className:"actions new-project-actions",children:[n&&f.jsx(Ue,{type:"button",onClick:n,children:jge()}),f.jsx(Ue,{variant:"primary",className:"ms-auto",disabled:!An,children:j?_ge():r==="paper"?le!=null&&le.repoUrl?oge():N7():r==="folder"?Mbe():N7()})]})]})}function tR({onClose:e,onCreated:n,remote:t=!1}){const r=M.useRef(null),s=M.useRef(e);return s.current=e,M.useEffect(()=>{const a=r.current;if(!a)return;const l=document.activeElement instanceof HTMLElement?document.activeElement:null,o=()=>[...a.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(a.querySelector("[data-initial-focus]")??o()[0]??a).focus();const c=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),s.current();return}if(d.key==="Enter"&&(d.metaKey||d.ctrlKey)&&!d.altKey&&d.shiftKey){d.preventDefault(),d.stopPropagation();return}if(d.key!=="Tab")return;const _=o();if(_.length===0){d.preventDefault(),a.focus();return}const h=_[0],m=_[_.length-1];d.shiftKey&&document.activeElement===h?(d.preventDefault(),m.focus()):!d.shiftKey&&document.activeElement===m&&(d.preventDefault(),h.focus())};return document.addEventListener("keydown",c,!0),()=>{document.removeEventListener("keydown",c,!0),l==null||l.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:a=>{a.target===a.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:PE()}),f.jsx(wbt,{onCancel:e,onCreated:n,remote:t})]})})}function Sbt({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const a=M.useRef(null),l=M.useRef(r),o=M.useRef(n);l.current=r,o.current=n,M.useEffect(()=>{const d=a.current;if(!d)return;const _=document.activeElement instanceof HTMLElement?document.activeElement:null,h=()=>[...d.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(h()[0]??d).focus();const m=g=>{if(g.key==="Escape"){g.preventDefault(),o.current||l.current();return}if(g.key!=="Tab")return;const S=h();if(S.length===0){g.preventDefault(),d.focus();return}const k=S[0],v=S[S.length-1];g.shiftKey&&document.activeElement===k?(g.preventDefault(),v.focus()):!g.shiftKey&&document.activeElement===v&&(g.preventDefault(),k.focus())};return document.addEventListener("keydown",m,!0),()=>{document.removeEventListener("keydown",m,!0),_==null||_.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:d=>{!n&&d.target===d.currentTarget&&r()},children:f.jsxs("div",{ref:a,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:j3e()}),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:u3e({name:Ra(e.name)})}),f.jsx("p",{className:"m-0",children:c?q3e():K3e()}),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(Ue,{disabled:n,onClick:r,children:y3e()}),f.jsx(Ue,{variant:"danger",disabled:n,onClick:s,children:n?I3e():R3e()})]})]})})}function WC(){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 KC({projects:e,onOpen:n,onCreated:t,onDeleted:r,remote:s=!1}){const[a,l]=M.useState(!1),[o,c]=M.useState(null),[d,_]=M.useState(null),[h,m]=M.useState(null),[g,S]=M.useState({}),k=M.useRef(0),v=e.map(w=>w.id).join("\0");M.useEffect(()=>{let w=!0,x=null;const C=()=>{x=null;const T=++k.current;vQe().then(z=>{!w||T!==k.current||S(Object.fromEntries(z.map(D=>[D.projectId,D])))}).catch(()=>{})},j=()=>{x===null&&(x=setTimeout(C,100))};C();const N=ket(j);return()=>{w=!1,N(),x!==null&&clearTimeout(x)}},[v]);async function b(w){c(w.id),_(null);try{await AQe(w.id),_(null),m(null),r(w.id)}catch(x){_(x instanceof Error?x.message:String(x))}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:c6e()}),f.jsxs(Ue,{onClick:()=>l(!0),children:[f.jsx(Bx,{size:15})," ",PE()]})]}),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:i6e()}),f.jsx("span",{children:B7()}),f.jsx("span",{children:$7()}),f.jsx("span",{children:H7()})]}),e.length===0?f.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:t6e()}):[...e].sort((w,x)=>{var N,T;const C=((N=g[w.id])==null?void 0:N.lastMessageAt)??w.createdAt;return(((T=g[x.id])==null?void 0:T.lastMessageAt)??x.createdAt)-C||w.name.localeCompare(x.name)}).map(w=>{const x=g[w.id],C=w.githubEnabled?w.githubUrl??(w.githubOwner&&w.githubRepo?`https://github.com/${w.githubOwner}/${w.githubRepo}`:null):null,j=C?w.githubOwner&&w.githubRepo?`${w.githubOwner}/${w.githubRepo}`:C.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):FE(),N=x?x.activeAgents>0?n3e({count:Vt(x.activeAgents)}):m6e():"—",T=x?x.totalAgents===1?S6e():a3e({count:Vt(x.totalAgents)}):"—",z=x?x.runningExperiments>0?N6e({count:Vt(x.runningExperiments)}):x.totalExperiments===0?Nx():P7({count:Vt(x.totalExperiments)}):"—",D=x&&x.runningExperiments>0?P7({count:Vt(x.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":QI({name:Ra(w.name)}),onClick:()=>n(w.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:w.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:[C3e()," ",La(w.createdAt)]}),w.paperId&&f.jsx("span",{"aria-hidden":"true",children:"·"}),w.paperId&&f.jsxs("span",{children:[g3e()," ",we(w.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":Rv({name:Ra(w.name)}),disabled:o===w.id,onClick:O=>{O.stopPropagation(),_(null),m(w)},children:f.jsx(_d,{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:B7()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[x&&x.activeAgents>0&&f.jsx(WC,{}),N]}),f.jsx("span",{className:"text-xs text-muted",children:T})]}),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:$7()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[x&&x.runningExperiments>0&&f.jsx(WC,{}),z]}),D&&f.jsx("span",{className:"text-xs text-muted",children:D})]}),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:H7()}),C?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:C,target:"_blank",rel:"noreferrer","aria-label":sp({name:Ra(w.name)}),children:[f.jsx("span",{className:"inline-flex shrink-0",children:f.jsx(ym,{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:we(j)})]}):f.jsx("span",{className:"text-sm text-text pointer-events-none",children:j})]})]},w.id)})]})})]}),a&&f.jsx(tR,{remote:s,onClose:()=>l(!1),onCreated:(w,x)=>{l(!1),t(w,x)}}),h&&f.jsx(Sbt,{project:h,deleting:o===h.id,error:d,onClose:()=>{_(null),m(null)},onConfirm:()=>void b(h)})]})}function kbt({runs:e,experiments:n,emptyHint:t,onOpen:r,onOpenLogs:s,onOpenCode:a,onCancel:l}){const[o,c]=M.useState(new Set),[d,_]=M.useState(null),h=new Map;for(const S of e){const k=h.get(S.experimentId);k?k.push(S):h.set(S.experimentId,[S])}for(const S of h.values())S.sort((k,v)=>v.createdAt-k.createdAt);const m=[...n].sort((S,k)=>{var w,x,C,j;const v=((x=(w=h.get(S.id))==null?void 0:w[0])==null?void 0:x.createdAt)??S.createdAt;return(((j=(C=h.get(k.id))==null?void 0:C[0])==null?void 0:j.createdAt)??k.createdAt)-v});if(m.length===0)return f.jsx("div",{className:"empty-state absolute inset-0 flex flex-col items-center justify-center gap-2.5 p-6 text-center text-subtext [&_p]:max-w-[46ch] [&_p]:m-0 [&_p]:leading-normal [&_p]:text-balance [&_p.empty-state-title]:text-2xl [&_p.empty-state-title]:font-normal [&_p.empty-state-title]:text-text [&_p.empty-state-hint]:text-lg [&_p.empty-state-hint]:text-subtext experiments-empty-state [&_p]:text-2xl",children:f.jsx("p",{children:t??tue()})});async function g(S){_(null),c(k=>new Set(k).add(S));try{await l(S)}catch(k){c(v=>{const b=new Set(v);return b.delete(S),b}),_(k instanceof Error?k.message:String(k))}}return f.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[d&&f.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[Pue()," ",d]}),f.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":Rue(),children:m.map(S=>{const k=h.get(S.id)??[],v=k[0]??null,b=k.find(j=>j.status==="running"||j.status==="starting"),w=b??v,x=!!(b&&(b.cancelRequested||o.has(b.id))),C=b?x?"cancelling":Fi(b):v?Fi(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(S,"preview"),onDoubleClick:()=>r(S,"keepOpen"),onAuxClick:j=>{j.button===1&&(j.preventDefault(),r(S,"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",...wr(j=>r(S,j),{stopPropagation:!0}),children:S.title||S.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:S.branchName,children:[f.jsx(Kp,{size:14,"aria-hidden":"true"}),f.jsx("code",{children:S.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(ko,{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?cue():gue({count:Vt(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?La(v.createdAt):iue()})})]}),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":DO({name:S.title||S.slug}),onClick:j=>j.stopPropagation(),onDoubleClick:j=>j.stopPropagation(),onAuxClick:j=>j.stopPropagation(),children:[f.jsxs(Ue,{size:"small",disabled:!w,title:w?hue():Zce(),...wr(j=>{w&&s(S.id,w.id,j)},{stopPropagation:!0}),children:[f.jsx(Zu,{size:15}),Iue()]}),f.jsxs(Ue,{size:"small",title:gE({branch:we(S.branchName)}),...wr(j=>a(S.id,j),{stopPropagation:!0}),children:[f.jsx(Wp,{size:15}),jue()]}),b&&f.jsxs(Ue,{size:"small",variant:"danger",className:"[@container((max-width:_560px))]:ms-auto",disabled:x,title:x?yue():Cue(),onClick:()=>void g(b.id),children:[f.jsx(wN,{size:15}),x?aie():zE()]})]})]},S.id)})})]})}function Cbt({onClose:e,onCreateProject:n}){const[t,r]=M.useState(!1),[s,a]=M.useState(null),l=M.useRef(null),o=M.useCallback(c=>{t||(r(!0),a(null),c().catch(()=>a(TWe())).finally(()=>r(!1)))},[t]);return M.useEffect(()=>{const c=d=>{d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),o(e))};return document.addEventListener("keydown",c,!0),()=>document.removeEventListener("keydown",c,!0)},[e,o]),M.useEffect(()=>{const c=l.current;if(!c)return;const d=document.activeElement instanceof HTMLElement?document.activeElement:null,_=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(_()[0]??c).focus();const h=m=>{if(m.key!=="Tab")return;const g=_();if(g.length===0){m.preventDefault(),c.focus();return}const S=g[0],k=g[g.length-1];m.shiftKey&&document.activeElement===S?(m.preventDefault(),k.focus()):!m.shiftKey&&document.activeElement===k&&(m.preventDefault(),S.focus())};return document.addEventListener("keydown",h,!0),()=>{document.removeEventListener("keydown",h,!0),d==null||d.focus()}},[]),Bc.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:l,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(Gt,{className:"absolute end-3.5 top-3.5","aria-label":oWe(),onClick:()=>o(e),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(Gx,{})}),f.jsxs("div",{children:[f.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:pWe()}),f.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:$We()})]})]}),f.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[f.jsxs("p",{dir:"auto",children:[LWe()," ",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:NWe()}),rWe()]}),f.jsx("p",{dir:"auto",children:SWe()})]}),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(Ue,{onClick:()=>o(n),disabled:t,children:dWe()}),f.jsx(Ue,{variant:"primary",onClick:()=>o(e),disabled:t,children:t?aa():vWe()})]})]})}),document.body)}function Or(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function Hm(){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}})}Y0.prototype=Hm.prototype={constructor:Y0,on:function(e,n){var t=this._,r=Nbt(e+"",t),s,a=-1,l=r.length;if(arguments.length<2){for(;++a0)for(var t=new Array(s),r=0,s,a;r=0&&(n=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),XC.hasOwnProperty(n)?{space:XC[n],local:e}:e}function jbt(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===ix&&n.documentElement.namespaceURI===ix?n.createElement(e):n.createElementNS(t,e)}}function Abt(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function nR(e){var n=Pm(e);return(n.local?Abt:jbt)(n)}function Tbt(){}function O4(e){return e==null?Tbt:function(){return this.querySelector(e)}}function Mbt(e){typeof e!="function"&&(e=O4(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=x&&(x=w+1);!(j=v[x])&&++x=0;)(l=r[s])&&(a&&l.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(l,a),a=l);return this}function rvt(e){e||(e=svt);function n(h,m){return h&&m?e(h.__data__,m.__data__):!h-!m}for(var t=this._groups,r=t.length,s=new Array(r),a=0;an?1:e>=n?0:NaN}function ivt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function avt(){return Array.from(this)}function ovt(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?bvt:typeof n=="function"?xvt:vvt)(e,n,t??"")):od(this.node(),e)}function od(e,n){return e.style.getPropertyValue(n)||oR(e).getComputedStyle(e,null).getPropertyValue(n)}function wvt(e){return function(){delete this[e]}}function Svt(e,n){return function(){this[e]=n}}function kvt(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function Cvt(e,n){return arguments.length>1?this.each((n==null?wvt:typeof n=="function"?kvt:Svt)(e,n)):this.node()[e]}function lR(e){return e.trim().split(/^|\s+/)}function I4(e){return e.classList||new cR(e)}function cR(e){this._node=e,this._names=lR(e.getAttribute("class")||"")}cR.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 uR(e,n){for(var t=I4(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function Jvt(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,a;t()=>e;function ax(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:a,x:l,y:o,dx:c,dy:d,dispatch:_}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:_}})}ax.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function c2t(e){return!e.ctrlKey&&!e.button}function u2t(){return this.parentNode}function d2t(e,n){return n??{x:e.x,y:e.y}}function f2t(){return navigator.maxTouchPoints||"ontouchstart"in this}function mR(){var e=c2t,n=u2t,t=d2t,r=f2t,s={},a=Hm("start","drag","end"),l=0,o,c,d,_,h=0;function m(C){C.on("mousedown.drag",g).filter(r).on("touchstart.drag",v).on("touchmove.drag",b,l2t).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(C,j){if(!(_||!e.call(this,C,j))){var N=x(this,n.call(this,C,j),C,j,"mouse");N&&(fi(C.view).on("mousemove.drag",S,ch).on("mouseup.drag",k,ch),_R(C.view),gv(C),d=!1,o=C.clientX,c=C.clientY,N("start",C))}}function S(C){if(Gu(C),!d){var j=C.clientX-o,N=C.clientY-c;d=j*j+N*N>h}s.mouse("drag",C)}function k(C){fi(C.view).on("mousemove.drag mouseup.drag",null),pR(C.view,d),Gu(C),s.mouse("end",C)}function v(C,j){if(e.call(this,C,j)){var N=C.changedTouches,T=n.call(this,C,j),z=N.length,D,O;for(D=0;D>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?j0(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?j0(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=_2t.exec(e))?new Zs(n[1],n[2],n[3],1):(n=p2t.exec(e))?new Zs(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=m2t.exec(e))?j0(n[1],n[2],n[3],n[4]):(n=g2t.exec(e))?j0(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=b2t.exec(e))?r9(n[1],n[2]/100,n[3]/100,1):(n=v2t.exec(e))?r9(n[1],n[2]/100,n[3]/100,n[4]):ZC.hasOwnProperty(e)?e9(ZC[e]):e==="transparent"?new Zs(NaN,NaN,NaN,0):null}function e9(e){return new Zs(e>>16&255,e>>8&255,e&255,1)}function j0(e,n,t,r){return r<=0&&(e=n=t=NaN),new Zs(e,n,t,r)}function w2t(e){return e instanceof Fh||(e=Tc(e)),e?(e=e.rgb(),new Zs(e.r,e.g,e.b,e.opacity)):new Zs}function ox(e,n,t,r){return arguments.length===1?w2t(e):new Zs(e,n,t,r??1)}function Zs(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}B4(Zs,ox,gR(Fh,{brighter(e){return e=e==null?Mp:Math.pow(Mp,e),new Zs(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?uh:Math.pow(uh,e),new Zs(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Zs(Ec(this.r),Ec(this.g),Ec(this.b),Rp(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:t9,formatHex:t9,formatHex8:S2t,formatRgb:n9,toString:n9}));function t9(){return`#${vc(this.r)}${vc(this.g)}${vc(this.b)}`}function S2t(){return`#${vc(this.r)}${vc(this.g)}${vc(this.b)}${vc((isNaN(this.opacity)?1:this.opacity)*255)}`}function n9(){const e=Rp(this.opacity);return`${e===1?"rgb(":"rgba("}${Ec(this.r)}, ${Ec(this.g)}, ${Ec(this.b)}${e===1?")":`, ${e})`}`}function Rp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ec(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vc(e){return e=Ec(e),(e<16?"0":"")+e.toString(16)}function r9(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Ji(e,n,t,r)}function bR(e){if(e instanceof Ji)return new Ji(e.h,e.s,e.l,e.opacity);if(e instanceof Fh||(e=Tc(e)),!e)return new Ji;if(e instanceof Ji)return e;e=e.rgb();var n=e.r/255,t=e.g/255,r=e.b/255,s=Math.min(n,t,r),a=Math.max(n,t,r),l=NaN,o=a-s,c=(a+s)/2;return o?(n===a?l=(t-r)/o+(t0&&c<1?0:l,new Ji(l,o,c,e.opacity)}function k2t(e,n,t,r){return arguments.length===1?bR(e):new Ji(e,n,t,r??1)}function Ji(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}B4(Ji,k2t,gR(Fh,{brighter(e){return e=e==null?Mp:Math.pow(Mp,e),new Ji(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?uh:Math.pow(uh,e),new Ji(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 Zs(bv(e>=240?e-240:e+120,s,r),bv(e,s,r),bv(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new Ji(s9(this.h),A0(this.s),A0(this.l),Rp(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=Rp(this.opacity);return`${e===1?"hsl(":"hsla("}${s9(this.h)}, ${A0(this.s)*100}%, ${A0(this.l)*100}%${e===1?")":`, ${e})`}`}}));function s9(e){return e=(e||0)%360,e<0?e+360:e}function A0(e){return Math.max(0,Math.min(1,e||0))}function bv(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 $4=e=>()=>e;function C2t(e,n){return function(t){return e+t*n}}function E2t(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 N2t(e){return(e=+e)==1?vR:function(n,t){return t-n?E2t(n,t,e):$4(isNaN(n)?t:n)}}function vR(e,n){var t=n-e;return t?C2t(e,t):$4(isNaN(e)?n:e)}const Dp=(function e(n){var t=N2t(n);function r(s,a){var l=t((s=ox(s)).r,(a=ox(a)).r),o=t(s.g,a.g),c=t(s.b,a.b),d=vR(s.opacity,a.opacity);return function(_){return s.r=l(_),s.g=o(_),s.b=c(_),s.opacity=d(_),s+""}}return r.gamma=e,r})(1);function z2t(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,r=n.slice(),s;return function(a){for(s=0;st&&(a=n.slice(t,a),o[l]?o[l]+=a:o[++l]=a),(r=r[0])===(s=s[0])?o[l]?o[l]+=s:o[++l]=s:(o[++l]=null,c.push({i:l,x:Aa(r,s)})),t=vv.lastIndex;return t180?_+=360:_-d>180&&(d+=360),m.push({i:h.push(s(h)+"rotate(",null,r)-2,x:Aa(d,_)})):_&&h.push(s(h)+"rotate("+_+r)}function o(d,_,h,m){d!==_?m.push({i:h.push(s(h)+"skewX(",null,r)-2,x:Aa(d,_)}):_&&h.push(s(h)+"skewX("+_+r)}function c(d,_,h,m,g,S){if(d!==h||_!==m){var k=g.push(s(g)+"scale(",null,",",null,")");S.push({i:k-4,x:Aa(d,h)},{i:k-2,x:Aa(_,m)})}else(h!==1||m!==1)&&g.push(s(g)+"scale("+h+","+m+")")}return function(d,_){var h=[],m=[];return d=e(d),_=e(_),a(d.translateX,d.translateY,_.translateX,_.translateY,h,m),l(d.rotate,_.rotate,h,m),o(d.skewX,_.skewX,h,m),c(d.scaleX,d.scaleY,_.scaleX,_.scaleY,h,m),d=_=null,function(g){for(var S=-1,k=m.length,v;++S=0&&e._call.call(void 0,n),e=e._next;--ld}function o9(){Mc=(Op=fh.now())+Fm,ld=Tf=0;try{U2t()}finally{ld=0,G2t(),Mc=0}}function q2t(){var e=fh.now(),n=e-Op;n>SR&&(Fm-=n,Op=e)}function G2t(){for(var e,n=Lp,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:Lp=t);Mf=e,ux(r)}function ux(e){if(!ld){Tf&&(Tf=clearTimeout(Tf));var n=e-Mc;n>24?(e<1/0&&(Tf=setTimeout(o9,e-fh.now()-Fm)),wf&&(wf=clearInterval(wf))):(wf||(Op=fh.now(),wf=setInterval(q2t,SR)),ld=1,kR(o9))}}function l9(e,n,t){var r=new Ip;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var V2t=Hm("start","end","cancel","interrupt"),W2t=[],ER=0,c9=1,dx=2,Z0=3,u9=4,fx=5,Q0=6;function Um(e,n,t,r,s,a){var l=e.__transition;if(!l)e.__transition={};else if(t in l)return;K2t(e,t,{name:n,index:r,group:s,on:V2t,tween:W2t,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:ER})}function P4(e,n){var t=oa(e,n);if(t.state>ER)throw new Error("too late; already scheduled");return t}function Wa(e,n){var t=oa(e,n);if(t.state>Z0)throw new Error("too late; already running");return t}function oa(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function K2t(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=CR(a,0,t.time);function a(d){t.state=c9,t.timer.restart(l,t.delay,t.time),t.delay<=d&&l(d-t.delay)}function l(d){var _,h,m,g;if(t.state!==c9)return c();for(_ in r)if(g=r[_],g.name===t.name){if(g.state===Z0)return l9(l);g.state===u9?(g.state=Q0,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[_]):+_dx&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function kxt(e,n,t){var r,s,a=Sxt(n)?P4:Wa;return function(){var l=a(this,e),o=l.on;o!==r&&(s=(r=o).copy()).on(n,t),l.on=s}}function Cxt(e,n){var t=this._id;return arguments.length<2?oa(this.node(),t).on.on(e):this.each(kxt(t,e,n))}function Ext(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function Nxt(){return this.on("end.remove",Ext(this._id))}function zxt(e){var n=this._name,t=this._id;typeof e!="function"&&(e=O4(e));for(var r=this._groups,s=r.length,a=new Array(s),l=0;l()=>e;function Jxt(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 wo(e,n,t){this.k=e,this.x=n,this.y=t}wo.prototype={constructor:wo,scale:function(e){return e===1?this:new wo(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new wo(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 qm=new wo(1,0,0);AR.prototype=wo.prototype;function AR(e){for(;!e.__zoom;)if(!(e=e.parentNode))return qm;return e.__zoom}function xv(e){e.stopImmediatePropagation()}function Sf(e){e.preventDefault(),e.stopImmediatePropagation()}function eyt(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function tyt(){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 d9(){return this.__zoom||qm}function nyt(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ryt(){return navigator.maxTouchPoints||"ontouchstart"in this}function syt(e,n,t){var r=e.invertX(n[0][0])-t[0][0],s=e.invertX(n[1][0])-t[1][0],a=e.invertY(n[0][1])-t[0][1],l=e.invertY(n[1][1])-t[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),l>a?(a+l)/2:Math.min(0,a)||Math.max(0,l))}function TR(){var e=eyt,n=tyt,t=syt,r=nyt,s=ryt,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],o=250,c=X0,d=Hm("start","zoom","end"),_,h,m,g=500,S=150,k=0,v=10;function b(W){W.property("__zoom",d9).on("wheel.zoom",z,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",O).filter(s).on("touchstart.zoom",H).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(W,Z,G,X){var J=W.selection?W.selection():W;J.property("__zoom",d9),W!==J?j(W,Z,G,X):J.interrupt().each(function(){N(this,arguments).event(X).start().zoom(null,typeof Z=="function"?Z.apply(this,arguments):Z).end()})},b.scaleBy=function(W,Z,G,X){b.scaleTo(W,function(){var J=this.__zoom.k,$=typeof Z=="function"?Z.apply(this,arguments):Z;return J*$},G,X)},b.scaleTo=function(W,Z,G,X){b.transform(W,function(){var J=n.apply(this,arguments),$=this.__zoom,L=G==null?C(J):typeof G=="function"?G.apply(this,arguments):G,B=$.invert(L),Y=typeof Z=="function"?Z.apply(this,arguments):Z;return t(x(w($,Y),L,B),J,l)},G,X)},b.translateBy=function(W,Z,G,X){b.transform(W,function(){return t(this.__zoom.translate(typeof Z=="function"?Z.apply(this,arguments):Z,typeof G=="function"?G.apply(this,arguments):G),n.apply(this,arguments),l)},null,X)},b.translateTo=function(W,Z,G,X,J){b.transform(W,function(){var $=n.apply(this,arguments),L=this.__zoom,B=X==null?C($):typeof X=="function"?X.apply(this,arguments):X;return t(qm.translate(B[0],B[1]).scale(L.k).translate(typeof Z=="function"?-Z.apply(this,arguments):-Z,typeof G=="function"?-G.apply(this,arguments):-G),$,l)},X,J)};function w(W,Z){return Z=Math.max(a[0],Math.min(a[1],Z)),Z===W.k?W:new wo(Z,W.x,W.y)}function x(W,Z,G){var X=Z[0]-G[0]*W.k,J=Z[1]-G[1]*W.k;return X===W.x&&J===W.y?W:new wo(W.k,X,J)}function C(W){return[(+W[0][0]+ +W[1][0])/2,(+W[0][1]+ +W[1][1])/2]}function j(W,Z,G,X){W.on("start.zoom",function(){N(this,arguments).event(X).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(X).end()}).tween("zoom",function(){var J=this,$=arguments,L=N(J,$).event(X),B=n.apply(J,$),Y=G==null?C(B):typeof G=="function"?G.apply(J,$):G,V=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),se=J.__zoom,le=typeof Z=="function"?Z.apply(J,$):Z,ae=c(se.invert(Y).concat(V/se.k),le.invert(Y).concat(V/le.k));return function(re){if(re===1)re=le;else{var q=ae(re),oe=V/q[2];re=new wo(oe,Y[0]-q[0]*oe,Y[1]-q[1]*oe)}L.zoom(null,re)}})}function N(W,Z,G){return!G&&W.__zooming||new T(W,Z)}function T(W,Z){this.that=W,this.args=Z,this.active=0,this.sourceEvent=null,this.extent=n.apply(W,Z),this.taps=0}T.prototype={event:function(W){return W&&(this.sourceEvent=W),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(W,Z){return this.mouse&&W!=="mouse"&&(this.mouse[1]=Z.invert(this.mouse[0])),this.touch0&&W!=="touch"&&(this.touch0[1]=Z.invert(this.touch0[0])),this.touch1&&W!=="touch"&&(this.touch1[1]=Z.invert(this.touch1[0])),this.that.__zoom=Z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(W){var Z=fi(this.that).datum();d.call(W,this.that,new Jxt(W,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:d}),Z)}};function z(W,...Z){if(!e.apply(this,arguments))return;var G=N(this,Z).event(W),X=this.__zoom,J=Math.max(a[0],Math.min(a[1],X.k*Math.pow(2,r.apply(this,arguments)))),$=Zi(W);if(G.wheel)(G.mouse[0][0]!==$[0]||G.mouse[0][1]!==$[1])&&(G.mouse[1]=X.invert(G.mouse[0]=$)),clearTimeout(G.wheel);else{if(X.k===J)return;G.mouse=[$,X.invert($)],J0(this),G.start()}Sf(W),G.wheel=setTimeout(L,S),G.zoom("mouse",t(x(w(X,J),G.mouse[0],G.mouse[1]),G.extent,l));function L(){G.wheel=null,G.end()}}function D(W,...Z){if(m||!e.apply(this,arguments))return;var G=W.currentTarget,X=N(this,Z,!0).event(W),J=fi(W.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",V,!0),$=Zi(W,G),L=W.clientX,B=W.clientY;_R(W.view),xv(W),X.mouse=[$,this.__zoom.invert($)],J0(this),X.start();function Y(se){if(Sf(se),!X.moved){var le=se.clientX-L,ae=se.clientY-B;X.moved=le*le+ae*ae>k}X.event(se).zoom("mouse",t(x(X.that.__zoom,X.mouse[0]=Zi(se,G),X.mouse[1]),X.extent,l))}function V(se){J.on("mousemove.zoom mouseup.zoom",null),pR(se.view,X.moved),Sf(se),X.event(se).end()}}function O(W,...Z){if(e.apply(this,arguments)){var G=this.__zoom,X=Zi(W.changedTouches?W.changedTouches[0]:W,this),J=G.invert(X),$=G.k*(W.shiftKey?.5:2),L=t(x(w(G,$),X,J),n.apply(this,Z),l);Sf(W),o>0?fi(this).transition().duration(o).call(j,L,X,W):fi(this).call(b.transform,L,X,W)}}function H(W,...Z){if(e.apply(this,arguments)){var G=W.touches,X=G.length,J=N(this,Z,W.changedTouches.length===X).event(W),$,L,B,Y;for(xv(W),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.`},hh=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],MR=["Enter"," ","Escape"],RR={"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 cd;(function(e){e.Strict="strict",e.Loose="loose"})(cd||(cd={}));var Nc;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Nc||(Nc={}));var _h;(function(e){e.Partial="partial",e.Full="full"})(_h||(_h={}));const DR={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var yl;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(yl||(yl={}));var Bp;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Bp||(Bp={}));var vt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(vt||(vt={}));const f9={[vt.Left]:vt.Right,[vt.Right]:vt.Left,[vt.Top]:vt.Bottom,[vt.Bottom]:vt.Top};function LR(e){return e===null?null:e?"valid":"invalid"}const OR=e=>"id"in e&&"source"in e&&"target"in e,iyt=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),U4=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Uh=(e,n=[0,0])=>{const{width:t,height:r}=Do(e),s=e.origin??n,a=t*s[0],l=r*s[1];return{x:e.position.x-a,y:e.position.y-l}},ayt=(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 a=typeof s=="string";let l=!n.nodeLookup&&!a?s:void 0;n.nodeLookup&&(l=a?n.nodeLookup.get(s):U4(s)?s:n.nodeLookup.get(s.id));const o=l?$p(l,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Gm(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Vm(t)},qh=(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=Gm(t,$p(s)),r=!0)}),r?Vm(t):{x:0,y:0,width:0,height:0}},q4=(e,n,[t,r,s]=[0,0,1],a=!1,l=!1)=>{const o=(n.x-t)/s,c=(n.y-r)/s,d=n.width/s,_=n.height/s,h=[];for(const m of e.values()){const{measured:g,selectable:S=!0,hidden:k=!1}=m;if(l&&!S||k)continue;const v=g.width??m.width??m.initialWidth??0,b=g.height??m.height??m.initialHeight??0,{x:w,y:x}=m.internals.positionAbsolute,C=HR(o,c,d,_,w,x,v,b),j=v*b,N=a&&C>0;(!m.internals.handleBounds||N||C>=j||m.dragging)&&h.push(m)}return h},oyt=(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 lyt(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 cyt({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:a},l){if(e.size===0)return!0;const o=lyt(e,l),c=qh(o),d=V4(c,n,t,(l==null?void 0:l.minZoom)??s,(l==null?void 0:l.maxZoom)??a,(l==null?void 0:l.padding)??.1);return await r.setViewport(d,{duration:l==null?void 0:l.duration,ease:l==null?void 0:l.ease,interpolate:l==null?void 0:l.interpolate}),!0}function IR({nodeId:e,nextPosition:n,nodeLookup:t,nodeOrigin:r=[0,0],nodeExtent:s,onError:a}){const l=t.get(e),o=l.parentId?t.get(l.parentId):void 0,{x:c,y:d}=o?o.internals.positionAbsolute:{x:0,y:0},_=l.origin??r;let h=l.extent||s;if(l.extent==="parent"&&!l.expandParent)if(!o)a==null||a("005",ia.error005());else{const g=o.measured.width,S=o.measured.height;g&&S&&(h=[[c,d],[c+g,d+S]])}else o&&Dc(l.extent)&&(h=[[l.extent[0][0]+c,l.extent[0][1]+d],[l.extent[1][0]+c,l.extent[1][1]+d]]);const m=Dc(h)?Rc(n,h,l.measured):n;return(l.measured.width===void 0||l.measured.height===void 0)&&(a==null||a("015",ia.error015())),{position:{x:m.x-c+(l.measured.width??0)*_[0],y:m.y-d+(l.measured.height??0)*_[1]},positionAbsolute:m}}async function uyt({nodesToRemove:e=[],edgesToRemove:n=[],nodes:t,edges:r,onBeforeDelete:s}){const a=new Set(e.map(m=>m.id)),l=[];for(const m of t){if(m.deletable===!1)continue;const g=a.has(m.id),S=!g&&m.parentId&&l.find(k=>k.id===m.parentId);(g||S)&&l.push(m)}const o=new Set(n.map(m=>m.id)),c=r.filter(m=>m.deletable!==!1),_=oyt(l,c);for(const m of c)o.has(m.id)&&!_.find(S=>S.id===m.id)&&_.push(m);if(!s)return{edges:_,nodes:l};const h=await s({nodes:l,edges:_});return typeof h=="boolean"?h?{edges:_,nodes:l}:{edges:[],nodes:[]}:h}const ud=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),Rc=(e={x:0,y:0},n,t)=>({x:ud(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:ud(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function BR(e,n,t){const{width:r,height:s}=Do(t),{x:a,y:l}=t.internals.positionAbsolute;return Rc(e,[[a,l],[a+r,l+s]],n)}const h9=(e,n,t)=>et?-ud(Math.abs(e-t),1,n)/n:0,G4=(e,n,t=15,r=40)=>{const s=h9(e.x,r,n.width-r)*t,a=h9(e.y,r,n.height-r)*t;return[s,a]},Gm=(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)}),hx=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),Vm=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),ph=(e,n=[0,0])=>{var s,a;const{x:t,y:r}=U4(e)?e.internals.positionAbsolute:Uh(e,n);return{x:t,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},$p=(e,n=[0,0])=>{var s,a;const{x:t,y:r}=U4(e)?e.internals.positionAbsolute:Uh(e,n);return{x:t,y:r,x2:t+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},$R=(e,n)=>Vm(Gm(hx(e),hx(n))),HR=(e,n,t,r,s,a,l,o)=>{const c=Math.max(0,Math.min(e+t,s+l)-Math.max(e,s)),d=Math.max(0,Math.min(n+r,a+o)-Math.max(n,a));return Math.ceil(c*d)},Hp=(e,n)=>HR(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),_9=e=>ea(e.width)&&ea(e.height)&&ea(e.x)&&ea(e.y),ea=e=>!isNaN(e)&&isFinite(e),PR=(e,n)=>(t,r)=>{},Gh=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Vh=({x:e,y:n},[t,r,s],a=!1,l=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return a?Gh(o,l):o},dd=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function Eu(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 dyt(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=Eu(e,t),s=Eu(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=Eu(e.top??e.y??0,t),s=Eu(e.bottom??e.y??0,t),a=Eu(e.left??e.x??0,n),l=Eu(e.right??e.x??0,n);return{top:r,right:l,bottom:s,left:a,x:a+l,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function fyt(e,n,t,r,s,a){const{x:l,y:o}=dd(e,[n,t,r]),{x:c,y:d}=dd({x:e.x+e.width,y:e.y+e.height},[n,t,r]),_=s-c,h=a-d;return{left:Math.floor(l),top:Math.floor(o),right:Math.floor(_),bottom:Math.floor(h)}}const V4=(e,n,t,r,s,a)=>{const l=dyt(a,n,t),o=(n-l.x)/e.width,c=(t-l.y)/e.height,d=Math.min(o,c),_=ud(d,r,s),h=e.x+e.width/2,m=e.y+e.height/2,g=n/2-h*_,S=t/2-m*_,k=fyt(e,g,S,_,n,t),v={left:Math.min(k.left-l.left,0),top:Math.min(k.top-l.top,0),right:Math.min(k.right-l.right,0),bottom:Math.min(k.bottom-l.bottom,0)};return{x:g-v.left+v.right,y:S-v.top+v.bottom,zoom:_}},mh=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Dc(e){return e!=null&&e!=="parent"}function Do(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 FR(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 UR(e,n={width:0,height:0},t,r,s){const a={...e},l=r.get(t);if(l){const o=l.origin||s;a.x+=l.internals.positionAbsolute.x-(n.width??0)*o[0],a.y+=l.internals.positionAbsolute.y-(n.height??0)*o[1]}return a}function p9(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function hyt(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function _yt(e){return{...RR,...e||{}}}function Pf(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:a,y:l}=ta(e),o=Vh({x:a-((s==null?void 0:s.left)??0),y:l-((s==null?void 0:s.top)??0)},r),{x:c,y:d}=t?Gh(o,n):o;return{xSnapped:c,ySnapped:d,...o}}const W4=e=>({width:e.offsetWidth,height:e.offsetHeight}),qR=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},pyt=["INPUT","SELECT","TEXTAREA"];function GR(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:pyt.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const VR=e=>"clientX"in e,ta=(e,n)=>{var a,l;const t=VR(e),r=t?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,s=t?e.clientY:(l=e.touches)==null?void 0:l[0].clientY;return{x:r-((n==null?void 0:n.left)??0),y:s-((n==null?void 0:n.top)??0)}},m9=(e,n,t,r,s)=>{const a=n.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(l=>{const o=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:s,position:l.getAttribute("data-handlepos"),x:(o.left-t.left)/r,y:(o.top-t.top)/r,...W4(l)}})};function WR({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:a,targetControlX:l,targetControlY:o}){const c=e*.125+s*.375+l*.375+t*.125,d=n*.125+a*.375+o*.375+r*.125,_=Math.abs(c-e),h=Math.abs(d-n);return[c,d,_,h]}function R0(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function g9({pos:e,x1:n,y1:t,x2:r,y2:s,c:a}){switch(e){case vt.Left:return[n-R0(n-r,a),t];case vt.Right:return[n+R0(r-n,a),t];case vt.Top:return[n,t-R0(t-s,a)];case vt.Bottom:return[n,t+R0(s-t,a)]}}function KR({sourceX:e,sourceY:n,sourcePosition:t=vt.Bottom,targetX:r,targetY:s,targetPosition:a=vt.Top,curvature:l=.25}){const[o,c]=g9({pos:t,x1:e,y1:n,x2:r,y2:s,c:l}),[d,_]=g9({pos:a,x1:r,y1:s,x2:e,y2:n,c:l}),[h,m,g,S]=WR({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:c,targetControlX:d,targetControlY:_});return[`M${e},${n} C${o},${c} ${d},${_} ${r},${s}`,h,m,g,S]}function YR({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,a=t0}const byt=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,vyt=(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)),xyt=(e,n,t={})=>{var a;if(!e.source||!e.target)return(a=t.onError)==null||a.call(t,"006",ia.error006()),n;const r=t.getEdgeId||byt;let s;return OR(e)?s={...e}:s={...e,id:r(e)},vyt(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function XR({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,a,l,o]=YR({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,a,l,o]}const b9={[vt.Left]:{x:-1,y:0},[vt.Right]:{x:1,y:0},[vt.Top]:{x:0,y:-1},[vt.Bottom]:{x:0,y:1}},yyt=({source:e,sourcePosition:n=vt.Bottom,target:t})=>n===vt.Left||n===vt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function wyt({source:e,sourcePosition:n=vt.Bottom,target:t,targetPosition:r=vt.Top,center:s,offset:a,stepPosition:l}){const o=b9[n],c=b9[r],d={x:e.x+o.x*a,y:e.y+o.y*a},_={x:t.x+c.x*a,y:t.y+c.y*a},h=yyt({source:d,sourcePosition:n,target:_}),m=h.x!==0?"x":"y",g=h[m];let S=[],k,v;const b={x:0,y:0},w={x:0,y:0},[,,x,C]=YR({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(o[m]*c[m]===-1){m==="x"?(k=s.x??d.x+(_.x-d.x)*l,v=s.y??(d.y+_.y)/2):(k=s.x??(d.x+_.x)/2,v=s.y??d.y+(_.y-d.y)*l);const z=[{x:k,y:d.y},{x:k,y:_.y}],D=[{x:d.x,y:v},{x:_.x,y:v}];o[m]===g?S=m==="x"?z:D:S=m==="x"?D:z}else{const z=[{x:d.x,y:_.y}],D=[{x:_.x,y:d.y}];if(m==="x"?S=o.x===g?D:z:S=o.y===g?z:D,n===r){const W=Math.abs(e[m]-t[m]);if(W<=a){const Z=Math.min(a-1,a-W);o[m]===g?b[m]=(d[m]>e[m]?-1:1)*Z:w[m]=(_[m]>t[m]?-1:1)*Z}}if(n!==r){const W=m==="x"?"y":"x",Z=o[m]===c[W],G=d[W]>_[W],X=d[W]<_[W];(o[m]===1&&(!Z&&G||Z&&X)||o[m]!==1&&(!Z&&X||Z&&G))&&(S=m==="x"?z:D)}const O={x:d.x+b.x,y:d.y+b.y},H={x:_.x+w.x,y:_.y+w.y},P=Math.max(Math.abs(O.x-S[0].x),Math.abs(H.x-S[0].x)),F=Math.max(Math.abs(O.y-S[0].y),Math.abs(H.y-S[0].y));P>=F?(k=(O.x+H.x)/2,v=S[0].y):(k=S[0].x,v=(O.y+H.y)/2)}const j={x:d.x+b.x,y:d.y+b.y},N={x:_.x+w.x,y:_.y+w.y};return[[e,...j.x!==S[0].x||j.y!==S[0].y?[j]:[],...S,...N.x!==S[S.length-1].x||N.y!==S[S.length-1].y?[N]:[],t],k,v,x,C]}function Syt(e,n,t,r){const s=Math.min(v9(e,n)/2,v9(n,t)/2,r),{x:a,y:l}=n;if(e.x===a&&a===t.x||e.y===l&&l===t.y)return`L${a} ${l}`;if(e.y===l){const d=e.xt.id===n):e[0])||null}function px(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function Cyt(e,{id:n,defaultColor:t,defaultMarkerStart:r,defaultMarkerEnd:s}){const a=new Set;return e.reduce((l,o)=>([o.markerStart||r,o.markerEnd||s].forEach(c=>{if(c&&typeof c=="object"){const d=px(c,n);a.has(d)||(l.push({id:d,color:c.color||t,...c}),a.add(d))}}),l),[]).sort((l,o)=>l.id.localeCompare(o.id))}const ZR=1e3,Eyt=10,K4={nodeOrigin:[0,0],nodeExtent:hh,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Nyt={...K4,checkEquality:!0};function Y4(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function zyt(e,n,t){const r=Y4(K4,t);for(const s of e.values())if(s.parentId)Z4(s,e,n,r);else{const a=Uh(s,r.nodeOrigin),l=Dc(s.extent)?s.extent:r.nodeExtent,o=Rc(a,l,Do(s));s.internals.positionAbsolute=o}}function jyt(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 a={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(a):s.type==="target"&&r.push(a)}return{source:t,target:r}}function X4(e){return e==="manual"}function mx(e,n,t,r={}){var _,h;const s=Y4(Nyt,r),a={i:0},l=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!X4(s.zIndexMode)?ZR:0;let c=e.length>0,d=!1;n.clear(),t.clear();for(const m of e){let g=l.get(m.id);if(s.checkEquality&&m===(g==null?void 0:g.internals.userNode))n.set(m.id,g);else{const S=Uh(m,s.nodeOrigin),k=Dc(m.extent)?m.extent:s.nodeExtent,v=Rc(S,k,Do(m));g={...s.defaults,...m,measured:{width:(_=m.measured)==null?void 0:_.width,height:(h=m.measured)==null?void 0:h.height},internals:{positionAbsolute:v,handleBounds:jyt(m,g),z:QR(m,o,s.zIndexMode),userNode:m}},n.set(m.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(c=!1),m.parentId&&Z4(g,n,t,r,a),d||(d=m.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:d}}function Ayt(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 Z4(e,n,t,r,s){const{elevateNodesOnSelect:a,nodeOrigin:l,nodeExtent:o,zIndexMode:c}=Y4(K4,r),d=e.parentId,_=n.get(d);if(!_){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Ayt(e,t),s&&!_.parentId&&_.internals.rootParentIndex===void 0&&c==="auto"&&(_.internals.rootParentIndex=++s.i,_.internals.z=_.internals.z+s.i*Eyt),s&&_.internals.rootParentIndex!==void 0&&(s.i=_.internals.rootParentIndex);const h=a&&!X4(c)?ZR:0,{x:m,y:g,z:S}=Tyt(e,_,l,o,h,c),{positionAbsolute:k}=e.internals,v=m!==k.x||g!==k.y;(v||S!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:m,y:g}:k,z:S}})}function QR(e,n,t){const r=ea(e.zIndex)?e.zIndex:0;return X4(t)?r:r+(e.selected?n:0)}function Tyt(e,n,t,r,s,a){const{x:l,y:o}=n.internals.positionAbsolute,c=Do(e),d=Uh(e,t),_=Dc(e.extent)?Rc(d,e.extent,c):d;let h=Rc({x:l+_.x,y:o+_.y},r,c);e.extent==="parent"&&(h=BR(h,c,n));const m=QR(e,s,a),g=n.internals.z??0;return{x:h.x,y:h.y,z:g>=m?g+1:m}}function Q4(e,n,t,r=[0,0]){var l;const s=[],a=new Map;for(const o of e){const c=n.get(o.parentId);if(!c)continue;const d=((l=a.get(o.parentId))==null?void 0:l.expandedRect)??ph(c),_=$R(d,o.rect);a.set(o.parentId,{expandedRect:_,parent:c})}return a.size>0&&a.forEach(({expandedRect:o,parent:c},d)=>{var x;const _=c.internals.positionAbsolute,h=Do(c),m=c.origin??r,g=o.x<_.x?Math.round(Math.abs(_.x-o.x)):0,S=o.y<_.y?Math.round(Math.abs(_.y-o.y)):0,k=Math.max(h.width,Math.round(o.width)),v=Math.max(h.height,Math.round(o.height)),b=(k-h.width)*m[0],w=(v-h.height)*m[1];(g>0||S>0||b||w)&&(s.push({id:d,type:"position",position:{x:c.position.x-g+b,y:c.position.y-S+w}}),(x=t.get(d))==null||x.forEach(C=>{e.some(j=>j.id===C.id)||s.push({id:C.id,type:"position",position:{x:C.position.x+g,y:C.position.y+S}})})),(h.width0){const g=Q4(m,n,t,s);d.push(...g)}return{changes:d,updatedInternals:c}}async function Ryt({delta:e,panZoom:n,transform:t,translateExtent:r,width:s,height:a}){if(!n||!e.x&&!e.y)return!1;const l=await n.setViewportConstrained({x:t[0]+e.x,y:t[1]+e.y,zoom:t[2]},[[0,0],[s,a]],r);return!!l&&(l.x!==t[0]||l.y!==t[1]||l.k!==t[2])}function S9(e,n,t,r,s,a){let l=s;const o=r.get(l)||new Map;r.set(l,o.set(t,n)),l=`${s}-${e}`;const c=r.get(l)||new Map;if(r.set(l,c.set(t,n)),a){l=`${s}-${e}-${a}`;const d=r.get(l)||new Map;r.set(l,d.set(t,n))}}function JR(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:a,sourceHandle:l=null,targetHandle:o=null}=r,c={edgeId:r.id,source:s,target:a,sourceHandle:l,targetHandle:o},d=`${s}-${l}--${a}-${o}`,_=`${a}-${o}--${s}-${l}`;S9("source",c,_,e,s,l),S9("target",c,d,e,a,o),n.set(r.id,r)}}function eD(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:eD(t,n):!1}function k9(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 Dyt(e,n,t,r){const s=new Map;for(const[a,l]of e)if((l.selected||l.id===r)&&(!l.parentId||!eD(l,e))&&(l.draggable||n&&typeof l.draggable>"u")){const o=e.get(a);o&&s.set(a,{id:a,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 yv({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var l,o,c;const s=[];for(const[d,_]of n){const h=(l=t.get(d))==null?void 0:l.internals.userNode;h&&s.push({...h,position:_.position,dragging:r})}if(!e)return[s[0],s];const a=(o=t.get(e))==null?void 0:o.internals.userNode;return[a?{...a,position:((c=n.get(e))==null?void 0:c.position)||a.position,dragging:r}:s[0],s]}function Lyt({dragItems:e,snapGrid:n,x:t,y:r}){const s=e.values().next().value;if(!s)return null;const a={x:t-s.distance.x,y:r-s.distance.y},l=Gh(a,n);return{x:l.x-a.x,y:l.y-a.y}}function Oyt({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let a={x:null,y:null},l=0,o=new Map,c=!1,d={x:0,y:0},_=null,h=!1,m=null,g=!1,S=!1,k=null;function v({noDragClassName:w,handleSelector:x,domNode:C,isSelectable:j,nodeId:N,nodeClickDistance:T=0}){m=fi(C);function z({x:P,y:F}){const{nodeLookup:W,nodeExtent:Z,snapGrid:G,snapToGrid:X,nodeOrigin:J,onNodeDrag:$,onSelectionDrag:L,onError:B,updateNodePositions:Y}=n();a={x:P,y:F};let V=!1;const se=o.size>1,le=se&&Z?hx(qh(o)):null,ae=se&&X?Lyt({dragItems:o,snapGrid:G,x:P,y:F}):null;for(const[re,q]of o){if(!W.has(re))continue;let oe={x:P-q.distance.x,y:F-q.distance.y};X&&(oe=ae?{x:Math.round(oe.x+ae.x),y:Math.round(oe.y+ae.y)}:Gh(oe,G));let ce=null;if(se&&Z&&!q.extent&&le){const{positionAbsolute:Ne}=q.internals,ze=Ne.x-le.x+Z[0][0],Ie=Ne.x+q.measured.width-le.x2+Z[1][0],Pe=Ne.y-le.y+Z[0][1],$e=Ne.y+q.measured.height-le.y2+Z[1][1];ce=[[ze,Pe],[Ie,$e]]}const{position:_e,positionAbsolute:ue}=IR({nodeId:re,nextPosition:oe,nodeLookup:W,nodeExtent:ce||Z,nodeOrigin:J,onError:B});V=V||q.position.x!==_e.x||q.position.y!==_e.y,q.position=_e,q.internals.positionAbsolute=ue}if(S=S||V,!!V&&(Y(o,!0),k&&(r||$||!N&&L))){const[re,q]=yv({nodeId:N,dragItems:o,nodeLookup:W});r==null||r(k,o,re,q),$==null||$(k,re,q),N||L==null||L(k,q)}}async function D(){if(!_)return;const{transform:P,panBy:F,autoPanSpeed:W,autoPanOnNodeDrag:Z}=n();if(!Z){c=!1,cancelAnimationFrame(l);return}const[G,X]=G4(d,_,W);(G!==0||X!==0)&&(a.x=(a.x??0)-G/P[2],a.y=(a.y??0)-X/P[2],await F({x:G,y:X})&&z(a)),l=requestAnimationFrame(D)}function O(P){var se;const{nodeLookup:F,multiSelectionActive:W,nodesDraggable:Z,transform:G,snapGrid:X,snapToGrid:J,selectNodesOnDrag:$,onNodeDragStart:L,onSelectionDragStart:B,unselectNodesAndEdges:Y}=n();h=!0,(!$||!j)&&!W&&N&&((se=F.get(N))!=null&&se.selected||Y()),j&&$&&N&&(e==null||e(N));const V=Pf(P.sourceEvent,{transform:G,snapGrid:X,snapToGrid:J,containerBounds:_});if(a=V,o=Dyt(F,Z,V,N),o.size>0&&(t||L||!N&&B)){const[le,ae]=yv({nodeId:N,dragItems:o,nodeLookup:F});t==null||t(P.sourceEvent,o,le,ae),L==null||L(P.sourceEvent,le,ae),N||B==null||B(P.sourceEvent,ae)}}const H=mR().clickDistance(T).on("start",P=>{const{domNode:F,nodeDragThreshold:W,transform:Z,snapGrid:G,snapToGrid:X}=n();_=(F==null?void 0:F.getBoundingClientRect())||null,g=!1,S=!1,k=P.sourceEvent,W===0&&O(P),a=Pf(P.sourceEvent,{transform:Z,snapGrid:G,snapToGrid:X,containerBounds:_}),d=ta(P.sourceEvent,_)}).on("drag",P=>{const{autoPanOnNodeDrag:F,transform:W,snapGrid:Z,snapToGrid:G,nodeDragThreshold:X,nodeLookup:J}=n(),$=Pf(P.sourceEvent,{transform:W,snapGrid:Z,snapToGrid:G,containerBounds:_});if(k=P.sourceEvent,(P.sourceEvent.type==="touchmove"&&P.sourceEvent.touches.length>1||N&&!J.has(N))&&(g=!0),!g){if(!c&&F&&h&&(c=!0,D()),!h){const L=ta(P.sourceEvent,_),B=L.x-d.x,Y=L.y-d.y;Math.sqrt(B*B+Y*Y)>X&&O(P)}(a.x!==$.xSnapped||a.y!==$.ySnapped)&&o&&h&&(d=ta(P.sourceEvent,_),z($))}}).on("end",P=>{if(!h||g){g&&o.size>0&&n().updateNodePositions(o,!1);return}if(c=!1,h=!1,cancelAnimationFrame(l),o.size>0){const{nodeLookup:F,updateNodePositions:W,onNodeDragStop:Z,onSelectionDragStop:G}=n();if(S&&(W(o,!1),S=!1),s||Z||!N&&G){const[X,J]=yv({nodeId:N,dragItems:o,nodeLookup:F,dragging:!1});s==null||s(P.sourceEvent,o,X,J),Z==null||Z(P.sourceEvent,X,J),N||G==null||G(P.sourceEvent,J)}}}).filter(P=>{const F=P.target;return!P.button&&(!w||!k9(F,`.${w}`,C))&&(!x||k9(F,x,C))});m.call(H)}function b(){m==null||m.on(".drag",null)}return{update:v,destroy:b}}function Iyt(e,n,t){const r=[],s={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const a of n.values())Hp(s,ph(a))>0&&r.push(a);return r}const Byt=250;function $yt(e,n,t,r){var o,c;let s=[],a=1/0;const l=Iyt(e,t,n+Byt);for(const d of l){const _=[...((o=d.internals.handleBounds)==null?void 0:o.source)??[],...((c=d.internals.handleBounds)==null?void 0:c.target)??[]];for(const h of _){if(r.nodeId===h.nodeId&&r.type===h.type&&r.id===h.id)continue;const{x:m,y:g}=Lc(d,h,h.position,!0),S=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(g-e.y,2));S>n||(S1){const d=r.type==="source"?"target":"source";return s.find(_=>_.type===d)??s[0]}return s[0]}function tD(e,n,t,r,s,a=!1){var d,_,h;const l=r.get(e);if(!l)return null;const o=s==="strict"?(d=l.internals.handleBounds)==null?void 0:d[n]:[...((_=l.internals.handleBounds)==null?void 0:_.source)??[],...((h=l.internals.handleBounds)==null?void 0:h.target)??[]],c=(t?o==null?void 0:o.find(m=>m.id===t):o==null?void 0:o[0])??null;return c&&a?{...c,...Lc(l,c,c.position,!0)}:c}function nD(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function Hyt(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const rD=()=>!0;function Pyt(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:a,isTarget:l,domNode:o,nodeLookup:c,lib:d,autoPanOnConnect:_,flowId:h,panBy:m,cancelConnection:g,onConnectStart:S,onConnect:k,onConnectEnd:v,isValidConnection:b=rD,onReconnectEnd:w,updateConnection:x,getTransform:C,getFromHandle:j,autoPanSpeed:N,dragThreshold:T=1,handleDomNode:z}){const D=qR(e.target);let O=0,H;const{x:P,y:F}=ta(e),W=nD(a,z),Z=o==null?void 0:o.getBoundingClientRect();let G=!1;if(!Z||!W)return;const X=tD(s,W,r,c,n);if(!X)return;let J=ta(e,Z),$=!1,L=null,B=!1,Y=null;function V(){if(!_||!Z)return;const[_e,ue]=G4(J,Z,N);m({x:_e,y:ue}),O=requestAnimationFrame(V)}const se={...X,nodeId:s,type:W,position:X.position},le=c.get(s);let re={inProgress:!0,isValid:null,from:Lc(le,se,vt.Left,!0),fromHandle:se,fromPosition:se.position,fromNode:le,to:J,toHandle:null,toPosition:f9[se.position],toNode:null,pointer:J};function q(){G=!0,x(re),S==null||S(e,{nodeId:s,handleId:r,handleType:W})}T===0&&q();function oe(_e){if(!G){const{x:$e,y:It}=ta(_e),yt=$e-P,qe=It-F;if(!(yt*yt+qe*qe>T*T))return;q()}if(!j()||!se){ce(_e);return}const ue=C();J=ta(_e,Z),H=$yt(Vh(J,ue,!1,[1,1]),t,c,se),$||(V(),$=!0);const Ne=sD(_e,{handle:H,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:l?"target":"source",isValidConnection:b,doc:D,lib:d,flowId:h,nodeLookup:c});Y=Ne.handleDomNode,L=Ne.connection,B=Hyt(!!H,Ne.isValid);const ze=c.get(s),Ie=ze?Lc(ze,se,vt.Left,!0):re.from,Pe={...re,from:Ie,isValid:B,to:Ne.toHandle&&B?dd({x:Ne.toHandle.x,y:Ne.toHandle.y},ue):J,toHandle:Ne.toHandle,toPosition:B&&Ne.toHandle?Ne.toHandle.position:f9[se.position],toNode:Ne.toHandle?c.get(Ne.toHandle.nodeId):null,pointer:J};x(Pe),re=Pe}function ce(_e){if(!("touches"in _e&&_e.touches.length>0)){if(G){(H||Y)&&L&&B&&(k==null||k(L));const{inProgress:ue,...Ne}=re,ze={...Ne,toPosition:re.toHandle?re.toPosition:null};v==null||v(_e,ze),a&&(w==null||w(_e,ze))}g(),cancelAnimationFrame(O),$=!1,B=!1,L=null,Y=null,D.removeEventListener("mousemove",oe),D.removeEventListener("mouseup",ce),D.removeEventListener("touchmove",oe),D.removeEventListener("touchend",ce)}}D.addEventListener("mousemove",oe),D.addEventListener("mouseup",ce),D.addEventListener("touchmove",oe),D.addEventListener("touchend",ce)}function sD(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:a,doc:l,lib:o,flowId:c,isValidConnection:d=rD,nodeLookup:_}){const h=a==="target",m=n?l.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:g,y:S}=ta(e),k=l.elementFromPoint(g,S),v=k!=null&&k.classList.contains(`${o}-flow__handle`)?k:m,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const w=nD(void 0,v),x=v.getAttribute("data-nodeid"),C=v.getAttribute("data-handleid"),j=v.classList.contains("connectable"),N=v.classList.contains("connectableend");if(!x||!w)return b;const T={source:h?x:r,sourceHandle:h?C:s,target:h?r:x,targetHandle:h?s:C};b.connection=T;const D=j&&N&&(t===cd.Strict?h&&w==="source"||!h&&w==="target":x!==r||C!==s);b.isValid=D&&d(T),b.toHandle=tD(x,w,C,_,t,!0)}return b}const gx={onPointerDown:Pyt,isValid:sD};function Fyt({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=fi(e);function a({translateExtent:o,width:c,height:d,zoomStep:_=1,pannable:h=!0,zoomable:m=!0,inversePan:g=!1}){const S=x=>{if(x.sourceEvent.type!=="wheel"||!n)return;const C=t(),j=x.sourceEvent.ctrlKey&&mh()?10:1,N=-x.sourceEvent.deltaY*(x.sourceEvent.deltaMode===1?.05:x.sourceEvent.deltaMode?1:.002)*_,T=C[2]*Math.pow(2,N*j);n.scaleTo(T)};let k=[0,0];const v=x=>{(x.sourceEvent.type==="mousedown"||x.sourceEvent.type==="touchstart")&&(k=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY])},b=x=>{const C=t();if(x.sourceEvent.type!=="mousemove"&&x.sourceEvent.type!=="touchmove"||!n)return;const j=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY],N=[j[0]-k[0],j[1]-k[1]];k=j;const T=r()*Math.max(C[2],Math.log(C[2]))*(g?-1:1),z={x:C[0]-N[0]*T,y:C[1]-N[1]*T},D=[[0,0],[c,d]];n.setViewportConstrained({x:z.x,y:z.y,zoom:C[2]},D,o)},w=TR().on("start",v).on("zoom",h?b:null).on("zoom.wheel",m?S:null);s.call(w,{})}function l(){s.on("zoom",null)}return{update:a,destroy:l,pointer:Zi}}const Wm=e=>({x:e.x,y:e.y,zoom:e.k}),wv=({x:e,y:n,zoom:t})=>qm.translate(e,n).scale(t),Bu=(e,n)=>e.target.closest(`.${n}`),iD=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),Uyt=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Sv=(e,n=0,t=Uyt,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},aD=e=>{const n=e.ctrlKey&&mh()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function qyt({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:a,zoomOnPinch:l,onPanZoomStart:o,onPanZoom:c,onPanZoomEnd:d}){return _=>{if(Bu(_,n))return _.ctrlKey&&_.preventDefault(),!1;_.preventDefault(),_.stopImmediatePropagation();const h=t.property("__zoom").k||1;if(_.ctrlKey&&l){const v=Zi(_),b=aD(_),w=h*Math.pow(2,b);r.scaleTo(t,w,v,_);return}const m=_.deltaMode===1?20:1;let g=s===Nc.Vertical?0:_.deltaX*m,S=s===Nc.Horizontal?0:_.deltaY*m;!mh()&&_.shiftKey&&s!==Nc.Vertical&&(g=_.deltaY*m,S=0),r.translateBy(t,-(g/h)*a,-(S/h)*a,{internal:!0});const k=Wm(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(_,k),e.panScrollTimeout=setTimeout(()=>{d==null||d(_,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(_,k))}}function Gyt({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const a=r.type==="wheel",l=!n&&a&&!r.ctrlKey,o=Bu(r,e);if(r.ctrlKey&&a&&o&&r.preventDefault(),l||o)return null;r.preventDefault(),t.call(this,r,s)}}function Vyt({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var a,l,o;if((a=r.sourceEvent)!=null&&a.internal)return;const s=Wm(r.transform);e.mouseButton=((l=r.sourceEvent)==null?void 0:l.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 Wyt({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return a=>{var l,o;e.usedRightMouseButton=!!(t&&iD(n,e.mouseButton??0)),(l=a.sourceEvent)!=null&&l.sync||r([a.transform.x,a.transform.y,a.transform.k]),s&&!((o=a.sourceEvent)!=null&&o.internal)&&(s==null||s(a.sourceEvent,Wm(a.transform)))}}function Kyt({zoomPanValues:e,panOnDrag:n,panOnScroll:t,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:a}){return l=>{var o;if(!((o=l.sourceEvent)!=null&&o.internal)&&(e.isZoomingOrPanning=!1,a&&iD(n,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&a(l.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=Wm(l.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(l.sourceEvent,c)},t?150:0)}}}function Yyt({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:a,userSelectionActive:l,noWheelClassName:o,noPanClassName:c,lib:d,connectionInProgress:_}){return h=>{var v;const m=e||n,g=t&&h.ctrlKey,S=h.type==="wheel";if(h.button===1&&h.type==="mousedown"&&(Bu(h,`${d}-flow__node`)||Bu(h,`${d}-flow__edge`)))return!0;if(!r&&!m&&!s&&!a&&!t||l||_&&!S||Bu(h,o)&&S||Bu(h,c)&&(!S||s&&S&&!e)||!t&&h.ctrlKey&&S)return!1;if(!t&&h.type==="touchstart"&&((v=h.touches)==null?void 0:v.length)>1)return h.preventDefault(),!1;if(!m&&!s&&!g&&S||!r&&(h.type==="mousedown"||h.type==="touchstart")||Array.isArray(r)&&!r.includes(h.button)&&h.type==="mousedown")return!1;const k=Array.isArray(r)&&r.includes(h.button)||!h.button||h.button<=1;return(!h.ctrlKey||S)&&k}}function Xyt({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:a,onPanZoomStart:l,onPanZoomEnd:o,onDraggingChange:c}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},_=e.getBoundingClientRect(),h=TR().scaleExtent([n,t]).translateExtent(r),m=fi(e).call(h);w({x:s.x,y:s.y,zoom:ud(s.zoom,n,t)},[[0,0],[_.width,_.height]],r);const g=m.on("wheel.zoom"),S=m.on("dblclick.zoom");h.wheelDelta(aD);async function k(H,P){return m?new Promise(F=>{h==null||h.interpolate((P==null?void 0:P.interpolate)==="linear"?Hf:X0).transform(Sv(m,P==null?void 0:P.duration,P==null?void 0:P.ease,()=>F(!0)),H)}):!1}function v({noWheelClassName:H,noPanClassName:P,onPaneContextMenu:F,userSelectionActive:W,panOnScroll:Z,panOnDrag:G,panOnScrollMode:X,panOnScrollSpeed:J,preventScrolling:$,zoomOnPinch:L,zoomOnScroll:B,zoomOnDoubleClick:Y,zoomActivationKeyPressed:V,lib:se,onTransformChange:le,connectionInProgress:ae,paneClickDistance:re,selectionOnDrag:q}){W&&!d.isZoomingOrPanning&&b();const oe=Z&&!V&&!W;h.clickDistance(q?1/0:!ea(re)||re<0?0:re);const ce=oe?qyt({zoomPanValues:d,noWheelClassName:H,d3Selection:m,d3Zoom:h,panOnScrollMode:X,panOnScrollSpeed:J,zoomOnPinch:L,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:o}):Gyt({noWheelClassName:H,preventScrolling:$,d3ZoomHandler:g});m.on("wheel.zoom",ce,{passive:!1});const _e=Vyt({zoomPanValues:d,onDraggingChange:c,onPanZoomStart:l});h.on("start",_e);const ue=Wyt({zoomPanValues:d,panOnDrag:G,onPaneContextMenu:!!F,onPanZoom:a,onTransformChange:le});h.on("zoom",ue);const Ne=Kyt({zoomPanValues:d,panOnDrag:G,panOnScroll:Z,onPaneContextMenu:F,onPanZoomEnd:o,onDraggingChange:c});h.on("end",Ne);const ze=Yyt({zoomActivationKeyPressed:V,panOnDrag:G,zoomOnScroll:B,panOnScroll:Z,zoomOnDoubleClick:Y,zoomOnPinch:L,userSelectionActive:W,noPanClassName:P,noWheelClassName:H,lib:se,connectionInProgress:ae});h.filter(ze),Y?m.on("dblclick.zoom",S):m.on("dblclick.zoom",null)}function b(){h.on("zoom",null)}async function w(H,P,F){const W=wv(H),Z=h==null?void 0:h.constrain()(W,P,F);return Z&&await k(Z),Z}async function x(H,P){const F=wv(H);return await k(F,P),F}function C(H){if(m){const P=wv(H),F=m.property("__zoom");(F.k!==H.zoom||F.x!==H.x||F.y!==H.y)&&(h==null||h.transform(m,P,null,{sync:!0}))}}function j(){const H=m?AR(m.node()):{x:0,y:0,k:1};return{x:H.x,y:H.y,zoom:H.k}}async function N(H,P){return m?new Promise(F=>{h==null||h.interpolate((P==null?void 0:P.interpolate)==="linear"?Hf:X0).scaleTo(Sv(m,P==null?void 0:P.duration,P==null?void 0:P.ease,()=>F(!0)),H)}):!1}async function T(H,P){return m?new Promise(F=>{h==null||h.interpolate((P==null?void 0:P.interpolate)==="linear"?Hf:X0).scaleBy(Sv(m,P==null?void 0:P.duration,P==null?void 0:P.ease,()=>F(!0)),H)}):!1}function z(H){h==null||h.scaleExtent(H)}function D(H){h==null||h.translateExtent(H)}function O(H){const P=!ea(H)||H<0?0:H;h==null||h.clickDistance(P)}return{update:v,destroy:b,setViewport:x,setViewportConstrained:w,getViewport:j,scaleTo:N,scaleBy:T,setScaleExtent:z,setTranslateExtent:D,syncViewport:C,setClickDistance:O}}var fd;(function(e){e.Line="line",e.Handle="handle"})(fd||(fd={}));function Zyt({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:a}){const l=e-n,o=t-r,c=[l>0?1:l<0?-1:0,o>0?1:o<0?-1:0];return l&&s&&(c[0]=c[0]*-1),o&&a&&(c[1]=c[1]*-1),c}function C9(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 vl(e,n){return Math.max(0,n-e)}function xl(e,n){return Math.max(0,e-n)}function D0(e,n,t){return Math.max(0,n-e,e-t)}function E9(e,n){return e?!n:n}function Qyt(e,n,t,r,s,a,l,o){let{affectsX:c,affectsY:d}=n;const{isHorizontal:_,isVertical:h}=n,m=_&&h,{xSnapped:g,ySnapped:S}=t,{minWidth:k,maxWidth:v,minHeight:b,maxHeight:w}=r,{x,y:C,width:j,height:N,aspectRatio:T}=e;let z=Math.floor(_?g-e.pointerX:0),D=Math.floor(h?S-e.pointerY:0);const O=j+(c?-z:z),H=N+(d?-D:D),P=-a[0]*j,F=-a[1]*N;let W=D0(O,k,v),Z=D0(H,b,w);if(l){let J=0,$=0;c&&z<0?J=vl(x+z+P,l[0][0]):!c&&z>0&&(J=xl(x+O+P,l[1][0])),d&&D<0?$=vl(C+D+F,l[0][1]):!d&&D>0&&($=xl(C+H+F,l[1][1])),W=Math.max(W,J),Z=Math.max(Z,$)}if(o){let J=0,$=0;c&&z>0?J=xl(x+z,o[0][0]):!c&&z<0&&(J=vl(x+O,o[1][0])),d&&D>0?$=xl(C+D,o[0][1]):!d&&D<0&&($=vl(C+H,o[1][1])),W=Math.max(W,J),Z=Math.max(Z,$)}if(s){if(_){const J=D0(O/T,b,w)*T;if(W=Math.max(W,J),l){let $=0;!c&&!d||c&&!d&&m?$=xl(C+F+O/T,l[1][1])*T:$=vl(C+F+(c?z:-z)/T,l[0][1])*T,W=Math.max(W,$)}if(o){let $=0;!c&&!d||c&&!d&&m?$=vl(C+O/T,o[1][1])*T:$=xl(C+(c?z:-z)/T,o[0][1])*T,W=Math.max(W,$)}}if(h){const J=D0(H*T,k,v)/T;if(Z=Math.max(Z,J),l){let $=0;!c&&!d||d&&!c&&m?$=xl(x+H*T+P,l[1][0])/T:$=vl(x+(d?D:-D)*T+P,l[0][0])/T,Z=Math.max(Z,$)}if(o){let $=0;!c&&!d||d&&!c&&m?$=vl(x+H*T,o[1][0])/T:$=xl(x+(d?D:-D)*T,o[0][0])/T,Z=Math.max(Z,$)}}}D=D+(D<0?Z:-Z),z=z+(z<0?W:-W),s&&(m?O>H*T?D=(E9(c,d)?-z:z)/T:z=(E9(c,d)?-D:D)*T:_?(D=z/T,d=c):(z=D*T,c=d));const G=c?x+z:x,X=d?C+D:C;return{width:j+(c?-z:z),height:N+(d?-D:D),x:a[0]*z*(c?-1:1)+G,y:a[1]*D*(d?-1:1)+X}}const oD={width:0,height:0,x:0,y:0},Jyt={...oD,pointerX:0,pointerY:0,aspectRatio:1};function e4t(e,n,t){const r=n.position.x+e.position.x,s=n.position.y+e.position.y,a=e.measured.width??0,l=e.measured.height??0,o=t[0]*a,c=t[1]*l;return[[r-o,s-c],[r+a-o,s+l-c]]}function t4t({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const a=fi(e);let l={controlDirection:C9("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function o({controlPosition:d,boundaries:_,keepAspectRatio:h,resizeDirection:m,onResizeStart:g,onResize:S,onResizeEnd:k,shouldResize:v}){let b={...oD},w={...Jyt};l={boundaries:_,resizeDirection:m,keepAspectRatio:h,controlDirection:C9(d)};let x,C=null,j=[],N,T,z,D=!1;const O=mR().on("start",H=>{const{nodeLookup:P,transform:F,snapGrid:W,snapToGrid:Z,nodeOrigin:G,paneDomNode:X}=t();if(x=P.get(n),!x)return;C=(X==null?void 0:X.getBoundingClientRect())??null;const{xSnapped:J,ySnapped:$}=Pf(H.sourceEvent,{transform:F,snapGrid:W,snapToGrid:Z,containerBounds:C});b={width:x.measured.width??0,height:x.measured.height??0,x:x.position.x??0,y:x.position.y??0},w={...b,pointerX:J,pointerY:$,aspectRatio:b.width/b.height},N=void 0,T=Dc(x.extent)?x.extent:void 0,x.parentId&&(x.extent==="parent"||x.expandParent)&&(N=P.get(x.parentId)),N&&x.extent==="parent"&&(T=[[0,0],[N.measured.width,N.measured.height]]),j=[],z=void 0;for(const[L,B]of P)if(B.parentId===n&&(j.push({id:L,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){const Y=e4t(B,x,B.origin??G);z?z=[[Math.min(Y[0][0],z[0][0]),Math.min(Y[0][1],z[0][1])],[Math.max(Y[1][0],z[1][0]),Math.max(Y[1][1],z[1][1])]]:z=Y}g==null||g(H,{...b})}).on("drag",H=>{const{transform:P,snapGrid:F,snapToGrid:W,nodeOrigin:Z}=t(),G=Pf(H.sourceEvent,{transform:P,snapGrid:F,snapToGrid:W,containerBounds:C}),X=[];if(!x)return;const{x:J,y:$,width:L,height:B}=b,Y={},V=x.origin??Z,{width:se,height:le,x:ae,y:re}=Qyt(w,l.controlDirection,G,l.boundaries,l.keepAspectRatio,V,T,z),q=se!==L,oe=le!==B,ce=ae!==J&&q,_e=re!==$&&oe;if(!ce&&!_e&&!q&&!oe)return;if((ce||_e||V[0]===1||V[1]===1)&&(Y.x=ce?ae:b.x,Y.y=_e?re:b.y,b.x=Y.x,b.y=Y.y,j.length>0)){const Ie=ae-J,Pe=re-$;for(const $e of j)$e.position={x:$e.position.x-Ie+V[0]*(se-L),y:$e.position.y-Pe+V[1]*(le-B)},X.push($e)}if((q||oe)&&(Y.width=q&&(!l.resizeDirection||l.resizeDirection==="horizontal")?se:b.width,Y.height=oe&&(!l.resizeDirection||l.resizeDirection==="vertical")?le:b.height,b.width=Y.width,b.height=Y.height),N&&x.expandParent){const Ie=V[0]*(Y.width??0);Y.x&&Y.x{D&&(k==null||k(H,{...b}),s==null||s({...b}),D=!1)});a.call(O)}function c(){a.on(".drag",null)}return{update:o,destroy:c}}var kv={exports:{}},Cv={},Ev={exports:{}},Nv={};/** - * @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 N9;function n4t(){if(N9)return Nv;N9=1;var e=Ch();function n(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,s=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function o(h,m){var g=m(),S=r({inst:{value:g,getSnapshot:m}}),k=S[0].inst,v=S[1];return a(function(){k.value=g,k.getSnapshot=m,c(k)&&v({inst:k})},[h,g,m]),s(function(){return c(k)&&v({inst:k}),h(function(){c(k)&&v({inst:k})})},[h]),l(g),g}function c(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!t(h,g)}catch{return!0}}function d(h,m){return m()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:o;return Nv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,Nv}var z9;function r4t(){return z9||(z9=1,Ev.exports=n4t()),Ev.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 j9;function s4t(){if(j9)return Cv;j9=1;var e=Ch(),n=r4t();function t(d,_){return d===_&&(d!==0||1/d===1/_)||d!==d&&_!==_}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,a=e.useRef,l=e.useEffect,o=e.useMemo,c=e.useDebugValue;return Cv.useSyncExternalStoreWithSelector=function(d,_,h,m,g){var S=a(null);if(S.current===null){var k={hasValue:!1,value:null};S.current=k}else k=S.current;S=o(function(){function b(N){if(!w){if(w=!0,x=N,N=m(N),g!==void 0&&k.hasValue){var T=k.value;if(g(T,N))return C=T}return C=N}if(T=C,r(x,N))return T;var z=m(N);return g!==void 0&&g(T,z)?(x=N,T):(x=N,C=z)}var w=!1,x,C,j=h===void 0?null:h;return[function(){return b(_())},j===null?void 0:function(){return b(j())}]},[_,h,m,g]);var v=s(d,S[0],S[1]);return l(function(){k.hasValue=!0,k.value=v},[v]),c(v),v},Cv}var A9;function i4t(){return A9||(A9=1,kv.exports=s4t()),kv.exports}var a4t=i4t();const o4t=kh(a4t),l4t={},T9=e=>{let n;const t=new Set,r=(_,h)=>{const m=typeof _=="function"?_(n):_;if(!Object.is(m,n)){const g=n;n=h??(typeof m!="object"||m===null)?m:Object.assign({},n,m),t.forEach(S=>S(n,g))}},s=()=>n,c={setState:r,getState:s,getInitialState:()=>d,subscribe:_=>(t.add(_),()=>t.delete(_)),destroy:()=>{(l4t?"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()}},d=n=e(r,s,c);return c},c4t=e=>e?T9(e):T9,{useDebugValue:u4t}=et,{useSyncExternalStoreWithSelector:d4t}=o4t,f4t=e=>e;function lD(e,n=f4t,t){const r=d4t(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return u4t(r),r}const M9=(e,n)=>{const t=c4t(e),r=(s,a=n)=>lD(t,s,a);return Object.assign(r,t),r},h4t=(e,n)=>e?M9(e,n):M9;function Jn(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 Km=M.createContext(null),_4t=Km.Provider,cD=ia.error001("react");function dn(e,n){const t=M.useContext(Km);if(t===null)throw new Error(cD);return lD(t,e,n)}function tr(){const e=M.useContext(Km);if(e===null)throw new Error(cD);return M.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const R9={display:"none"},p4t={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},uD="react-flow__node-desc",dD="react-flow__edge-desc",m4t="react-flow__aria-live",g4t=e=>e.ariaLiveMessage,b4t=e=>e.ariaLabelConfig;function v4t({rfId:e}){const n=dn(g4t);return f.jsx("div",{id:`${m4t}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:p4t,children:n})}function x4t({rfId:e,disableKeyboardA11y:n}){const t=dn(b4t);return f.jsxs(f.Fragment,{children:[f.jsx("div",{id:`${uD}-${e}`,style:R9,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),f.jsx("div",{id:`${dD}-${e}`,style:R9,children:t["edge.a11yDescription.default"]}),!n&&f.jsx(v4t,{rfId:e})]})}const Ym=M.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},a)=>{const l=`${e}`.split("-");return f.jsx("div",{className:Or(["react-flow__panel",t,...l]),style:r,ref:a,...s,children:n})});Ym.displayName="Panel";const D9="https://reactflow.dev?utm_source=attribution";function y4t({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:f.jsx(Ym,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${D9}`,children:f.jsx("a",{href:D9,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const w4t=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}},L0=e=>e.id;function S4t(e,n){return Jn(e.selectedNodes.map(L0),n.selectedNodes.map(L0))&&Jn(e.selectedEdges.map(L0),n.selectedEdges.map(L0))}function k4t({onSelectionChange:e}){const n=tr(),{selectedNodes:t,selectedEdges:r}=dn(w4t,S4t);return M.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(a=>a(s))},[t,r,e]),null}const C4t=e=>!!e.onSelectionChangeHandlers;function E4t({onSelectionChange:e}){const n=dn(C4t);return e||n?f.jsx(k4t,{onSelectionChange:e}):null}const fD=[0,0],N4t={x:0,y:0,zoom:1},z4t=["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"],L9=[...z4t,"rfId"],j4t=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}),O9={translateExtent:hh,nodeOrigin:fD,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function A4t(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:a,setNodeExtent:l,reset:o,setDefaultNodesAndEdges:c}=dn(j4t,Jn),d=tr();M.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{_.current=O9,o()}),[]);const _=M.useRef(O9);return M.useEffect(()=>{for(const h of L9){const m=e[h],g=_.current[h];m!==g&&(typeof e[h]>"u"||(h==="nodes"?n(m):h==="edges"?t(m):h==="minZoom"?r(m):h==="maxZoom"?s(m):h==="translateExtent"?a(m):h==="nodeExtent"?l(m):h==="ariaLabelConfig"?d.setState({ariaLabelConfig:_yt(m)}):h==="fitView"?d.setState({fitViewQueued:m}):h==="fitViewOptions"?d.setState({fitViewOptions:m}):d.setState({[h]:m})))}_.current=e},L9.map(h=>e[h])),null}function I9(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function T4t(e){var r;const[n,t]=M.useState(e==="system"?null:e);return M.useEffect(()=>{if(e!=="system"){t(e);return}const s=I9(),a=()=>t(s!=null&&s.matches?"dark":"light");return a(),s==null||s.addEventListener("change",a),()=>{s==null||s.removeEventListener("change",a)}},[e]),n!==null?n:(r=I9())!=null&&r.matches?"dark":"light"}const B9=typeof document<"u"?document:null;function gh(e=null,n={target:B9,actInsideInputWithModifier:!0}){const[t,r]=M.useState(!1),s=M.useRef(!1),a=M.useRef(new Set([])),[l,o]=M.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(h=>typeof h=="string").map(h=>h.replace("+",` -`).replace(` - -`,` -+`).split(` -`)),_=d.reduce((h,m)=>h.concat(...m),[]);return[d,_]}return[[],[]]},[e]);return M.useEffect(()=>{const c=(n==null?void 0:n.target)??B9,d=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const _=g=>{var v,b;if(s.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!s.current||s.current&&!d)&&GR(g))return!1;const k=H9(g.code,o);if(a.current.add(g[k]),$9(l,a.current,!1)){const w=((b=(v=g.composedPath)==null?void 0:v.call(g))==null?void 0:b[0])||g.target,x=(w==null?void 0:w.nodeName)==="BUTTON"||(w==null?void 0:w.nodeName)==="A";n.preventDefault!==!1&&(s.current||!x)&&g.preventDefault(),r(!0)}},h=g=>{const S=H9(g.code,o);$9(l,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(g[S]),g.key==="Meta"&&a.current.clear(),s.current=!1},m=()=>{a.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",_),c==null||c.addEventListener("keyup",h),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c==null||c.removeEventListener("keydown",_),c==null||c.removeEventListener("keyup",h),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,r]),t}function $9(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function H9(e,n){return n.includes(e)?"code":"key"}const M4t=()=>{const e=tr();return M.useMemo(()=>({zoomIn:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1.2,n):!1},zoomOut:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1/1.2,n):!1},zoomTo:async(n,t)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(n,t):!1},getZoom:()=>e.getState().transform[2],setViewport:async(n,t)=>{const{transform:[r,s,a],panZoom:l}=e.getState();return l?(await l.setViewport({x:n.x??r,y:n.y??s,zoom:n.zoom??a},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:a,maxZoom:l,panZoom:o}=e.getState(),c=V4(n,r,s,a,l,(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:a,domNode:l}=e.getState();if(!l)return n;const{x:o,y:c}=l.getBoundingClientRect(),d={x:n.x-o,y:n.y-c},_=t.snapGrid??s,h=t.snapToGrid??a;return Vh(d,r,h,_)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:a}=r.getBoundingClientRect(),l=dd(n,t);return{x:l.x+s,y:l.y+a}}}),[])};function hD(e,n){const t=[],r=new Map,s=[];for(const a of e)if(a.type==="add"){s.push(a);continue}else if(a.type==="remove"||a.type==="replace")r.set(a.id,[a]);else{const l=r.get(a.id);l?l.push(a):r.set(a.id,[a])}for(const a of n){const l=r.get(a.id);if(!l){t.push(a);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){t.push({...l[0].item});continue}const o={...a};for(const c of l)R4t(c,o);t.push(o)}return s.length&&s.forEach(a=>{a.index!==void 0?t.splice(a.index,0,{...a.item}):t.push({...a.item})}),t}function R4t(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 D4t(e,n){return hD(e,n)}function L4t(e,n){return hD(e,n)}function mc(e,n){return{id:e,type:"select",selected:n}}function $u(e,n=new Set,t=!1){const r=[];for(const[s,a]of e){const l=n.has(s);!(a.selected===void 0&&!l)&&a.selected!==l&&(t&&(a.selected=l),r.push(mc(a.id,l)))}return r}function P9({items:e=[],lookup:n}){var s;const t=[],r=new Map(e.map(a=>[a.id,a]));for(const[a,l]of e.entries()){const o=n.get(l.id),c=((s=o==null?void 0:o.internals)==null?void 0:s.userNode)??o;c!==void 0&&c!==l&&t.push({id:l.id,item:l,type:"replace"}),c===void 0&&t.push({item:l,type:"add",index:a})}for(const[a]of n)r.get(a)===void 0&&t.push({id:a,type:"remove"});return t}function F9(e){return{id:e.id,type:"remove"}}const O4t=PR();function I4t(e,n,t={}){return xyt(e,n,{...t,onError:t.onError??O4t})}const U9=e=>iyt(e),B4t=e=>OR(e);function _D(e){return M.forwardRef(e)}const $4t=typeof window<"u"?M.useLayoutEffect:M.useEffect;function q9(e){const[n,t]=M.useState(BigInt(0)),[r]=M.useState(()=>H4t(()=>t(s=>s+BigInt(1))));return $4t(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function H4t(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const pD=M.createContext(null);function P4t({children:e}){const n=tr(),t=M.useCallback(o=>{const{nodes:c=[],setNodes:d,hasDefaultNodes:_,onNodesChange:h,nodeLookup:m,fitViewQueued:g,onNodesChangeMiddlewareMap:S}=n.getState();let k=c;for(const b of o)k=typeof b=="function"?b(k):b;let v=P9({items:k,lookup:m});for(const b of S.values())v=b(v);_&&d(k),v.length>0?h==null||h(v):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:w,setNodes:x}=n.getState();b&&x(w)})},[]),r=q9(t),s=M.useCallback(o=>{const{edges:c=[],setEdges:d,hasDefaultEdges:_,onEdgesChange:h,edgeLookup:m}=n.getState();let g=c;for(const S of o)g=typeof S=="function"?S(g):S;_?d(g):h&&h(P9({items:g,lookup:m}))},[]),a=q9(s),l=M.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return f.jsx(pD.Provider,{value:l,children:e})}function F4t(){const e=M.useContext(pD);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const U4t=e=>!!e.panZoom;function J4(){const e=M4t(),n=tr(),t=F4t(),r=dn(U4t),s=M.useMemo(()=>{const a=h=>n.getState().nodeLookup.get(h),l=h=>{t.nodeQueue.push(h)},o=h=>{t.edgeQueue.push(h)},c=h=>{var b,w;const{nodeLookup:m,nodeOrigin:g}=n.getState(),S=U9(h)?h:m.get(h.id),k=S.parentId?UR(S.position,S.measured,S.parentId,m,g):S.position,v={...S,position:k,width:((b=S.measured)==null?void 0:b.width)??S.width,height:((w=S.measured)==null?void 0:w.height)??S.height};return ph(v)},d=(h,m,g={replace:!1})=>{l(S=>S.map(k=>{if(k.id===h){const v=typeof m=="function"?m(k):m;return g.replace&&U9(v)?v:{...k,...v}}return k}))},_=(h,m,g={replace:!1})=>{o(S=>S.map(k=>{if(k.id===h){const v=typeof m=="function"?m(k):m;return g.replace&&B4t(v)?v:{...k,...v}}return k}))};return{getNodes:()=>n.getState().nodes.map(h=>({...h})),getNode:h=>{var m;return(m=a(h))==null?void 0:m.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:h=[]}=n.getState();return h.map(m=>({...m}))},getEdge:h=>n.getState().edgeLookup.get(h),setNodes:l,setEdges:o,addNodes:h=>{const m=Array.isArray(h)?h:[h];t.nodeQueue.push(g=>[...g,...m])},addEdges:h=>{const m=Array.isArray(h)?h:[h];t.edgeQueue.push(g=>[...g,...m])},toObject:()=>{const{nodes:h=[],edges:m=[],transform:g}=n.getState(),[S,k,v]=g;return{nodes:h.map(b=>({...b})),edges:m.map(b=>({...b})),viewport:{x:S,y:k,zoom:v}}},deleteElements:async({nodes:h=[],edges:m=[]})=>{const{nodes:g,edges:S,onNodesDelete:k,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:w,onDelete:x,onBeforeDelete:C}=n.getState(),{nodes:j,edges:N}=await uyt({nodesToRemove:h,edgesToRemove:m,nodes:g,edges:S,onBeforeDelete:C}),T=N.length>0,z=j.length>0;if(T){const D=N.map(F9);v==null||v(N),w(D)}if(z){const D=j.map(F9);k==null||k(j),b(D)}return(z||T)&&(x==null||x({nodes:j,edges:N})),{deletedNodes:j,deletedEdges:N}},getIntersectingNodes:(h,m=!0,g)=>{const S=_9(h),k=S?h:c(h),v=g!==void 0;return k?(g||n.getState().nodes).filter(b=>{const w=n.getState().nodeLookup.get(b.id);if(w&&!S&&(b.id===h.id||!w.internals.positionAbsolute))return!1;const x=ph(v?b:w),C=Hp(x,k);return m&&C>0||C>=x.width*x.height||C>=k.width*k.height}):[]},isNodeIntersecting:(h,m,g=!0)=>{const k=_9(h)?h:c(h);if(!k)return!1;const v=Hp(k,m);return g&&v>0||v>=m.width*m.height||v>=k.width*k.height},updateNode:d,updateNodeData:(h,m,g={replace:!1})=>{d(h,S=>{const k=typeof m=="function"?m(S):m;return g.replace?{...S,data:k}:{...S,data:{...S.data,...k}}},g)},updateEdge:_,updateEdgeData:(h,m,g={replace:!1})=>{_(h,S=>{const k=typeof m=="function"?m(S):m;return g.replace?{...S,data:k}:{...S,data:{...S.data,...k}}},g)},getNodesBounds:h=>{const{nodeLookup:m,nodeOrigin:g}=n.getState();return ayt(h,{nodeLookup:m,nodeOrigin:g})},getHandleConnections:({type:h,id:m,nodeId:g})=>{var S;return Array.from(((S=n.getState().connectionLookup.get(`${g}-${h}${m?`-${m}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:h,handleId:m,nodeId:g})=>{var S;return Array.from(((S=n.getState().connectionLookup.get(`${g}${h?m?`-${h}-${m}`:`-${h}`:""}`))==null?void 0:S.values())??[])},fitView:async h=>{const m=n.getState().fitViewResolver??hyt();return n.setState({fitViewQueued:!0,fitViewOptions:h,fitViewResolver:m}),t.nodeQueue.push(g=>[...g]),m.promise}}},[]);return M.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const G9=e=>e.selected,q4t=typeof window<"u"?window:void 0;function G4t({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=tr(),{deleteElements:r}=J4(),s=gh(e,{actInsideInputWithModifier:!1}),a=gh(n,{target:q4t});M.useEffect(()=>{if(s){const{edges:l,nodes:o}=t.getState();r({nodes:o.filter(G9),edges:l.filter(G9)}),t.setState({nodesSelectionActive:!1})}},[s]),M.useEffect(()=>{t.setState({multiSelectionActive:a})},[a])}function V4t(e){const n=tr();M.useEffect(()=>{const t=()=>{var s,a,l,o;if(!e.current||!(((a=(s=e.current).checkVisibility)==null?void 0:a.call(s))??!0))return!1;const r=W4(e.current);(r.height===0||r.width===0)&&((o=(l=n.getState()).onError)==null||o.call(l,"004",ia.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 Xm={position:"absolute",width:"100%",height:"100%",top:0,left:0},W4t=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function K4t({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:a=Nc.Free,zoomOnDoubleClick:l=!0,panOnDrag:o=!0,defaultViewport:c,translateExtent:d,minZoom:_,maxZoom:h,zoomActivationKeyCode:m,preventScrolling:g=!0,children:S,noWheelClassName:k,noPanClassName:v,onViewportChange:b,isControlledViewport:w,paneClickDistance:x,selectionOnDrag:C}){const j=tr(),N=M.useRef(null),{userSelectionActive:T,lib:z,connectionInProgress:D}=dn(W4t,Jn),O=gh(m),H=M.useRef();V4t(N);const P=M.useCallback(F=>{b==null||b({x:F[0],y:F[1],zoom:F[2]}),w||j.setState({transform:F})},[b,w]);return M.useEffect(()=>{if(N.current){H.current=Xyt({domNode:N.current,minZoom:_,maxZoom:h,translateExtent:d,viewport:c,onDraggingChange:G=>j.setState(X=>X.paneDragging===G?X:{paneDragging:G}),onPanZoomStart:(G,X)=>{const{onViewportChangeStart:J,onMoveStart:$}=j.getState();$==null||$(G,X),J==null||J(X)},onPanZoom:(G,X)=>{const{onViewportChange:J,onMove:$}=j.getState();$==null||$(G,X),J==null||J(X)},onPanZoomEnd:(G,X)=>{const{onViewportChangeEnd:J,onMoveEnd:$}=j.getState();$==null||$(G,X),J==null||J(X)}});const{x:F,y:W,zoom:Z}=H.current.getViewport();return j.setState({panZoom:H.current,transform:[F,W,Z],domNode:N.current.closest(".react-flow")}),()=>{var G;(G=H.current)==null||G.destroy()}}},[]),M.useEffect(()=>{var F;(F=H.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:a,zoomOnDoubleClick:l,panOnDrag:o,zoomActivationKeyPressed:O,preventScrolling:g,noPanClassName:v,userSelectionActive:T,noWheelClassName:k,lib:z,onTransformChange:P,connectionInProgress:D,selectionOnDrag:C,paneClickDistance:x})},[e,n,t,r,s,a,l,o,O,g,v,T,k,z,P,D,C,x]),f.jsx("div",{className:"react-flow__renderer",ref:N,style:Xm,children:S})}const Y4t=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function X4t(){const{userSelectionActive:e,userSelectionRect:n}=dn(Y4t,Jn);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 zv=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},Z4t=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function Q4t({isSelecting:e,selectionKeyPressed:n,selectionMode:t=_h.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:a,selectionOnDrag:l,onSelectionStart:o,onSelectionEnd:c,onPaneClick:d,onPaneContextMenu:_,onPaneScroll:h,onPaneMouseEnter:m,onPaneMouseMove:g,onPaneMouseLeave:S,children:k}){const v=M.useRef(0),b=tr(),{userSelectionActive:w,elementsSelectable:x,dragging:C,panBy:j,autoPanSpeed:N}=dn(Z4t,Jn),T=x&&(e||w),z=M.useRef(null),D=M.useRef(),O=M.useRef(new Set),H=M.useRef(new Set),P=M.useRef(!1),F=M.useRef(!1),W=M.useRef({x:0,y:0}),Z=M.useRef(!1),G=q=>{if(F.current||P.current||b.getState().connection.inProgress){F.current=!1,P.current=!1;return}d==null||d(q),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},X=q=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){q.preventDefault();return}_==null||_(q)},J=h?q=>h(q):void 0,$=q=>{F.current&&(q.stopPropagation(),F.current=!1)},L=q=>{var $e,It;const{domNode:oe,transform:ce}=b.getState();if(D.current=oe==null?void 0:oe.getBoundingClientRect(),!D.current)return;const _e=q.target===z.current;if(!_e&&!!q.target.closest(".nokey")||!e||!(l&&_e||n)||q.button!==0||!q.isPrimary)return;(It=($e=q.target)==null?void 0:$e.setPointerCapture)==null||It.call($e,q.pointerId),F.current=!1;const{x:ze,y:Ie}=ta(q.nativeEvent,D.current),Pe=Vh({x:ze,y:Ie},ce);b.setState({userSelectionRect:{width:0,height:0,startX:Pe.x,startY:Pe.y,x:ze,y:Ie}}),_e||(q.stopPropagation(),q.preventDefault())};function B(q,oe){const{userSelectionRect:ce}=b.getState();if(!ce)return;const{transform:_e,nodeLookup:ue,edgeLookup:Ne,connectionLookup:ze,triggerNodeChanges:Ie,triggerEdgeChanges:Pe,defaultEdgeOptions:$e}=b.getState(),It={x:ce.startX,y:ce.startY},{x:yt,y:qe}=dd(It,_e),jt={startX:It.x,startY:It.y,x:qFt.id)),H.current=new Set;const tt=($e==null?void 0:$e.selectable)??!0;for(const Ft of O.current){const ke=ze.get(Ft);if(ke)for(const{edgeId:Re}of ke.values()){const Xe=Ne.get(Re);Xe&&(Xe.selectable??tt)&&H.current.add(Re)}}if(!p9(pt,O.current)){const Ft=$u(ue,O.current,!0);Ie(Ft)}if(!p9(ot,H.current)){const Ft=$u(Ne,H.current);Pe(Ft)}b.setState({userSelectionRect:jt,userSelectionActive:!0,nodesSelectionActive:!1})}function Y(){if(!s||!D.current)return;const[q,oe]=G4(W.current,D.current,N);j({x:q,y:oe}).then(ce=>{if(!F.current||!ce){v.current=requestAnimationFrame(Y);return}const{x:_e,y:ue}=W.current;B(_e,ue),v.current=requestAnimationFrame(Y)})}const V=()=>{cancelAnimationFrame(v.current),v.current=0,Z.current=!1};M.useEffect(()=>()=>V(),[]);const se=q=>{const{userSelectionRect:oe,transform:ce,resetSelectedElements:_e}=b.getState();if(!D.current||!oe)return;const{x:ue,y:Ne}=ta(q.nativeEvent,D.current);W.current={x:ue,y:Ne};const ze=dd({x:oe.startX,y:oe.startY},ce);if(!F.current){const Ie=n?0:a;if(Math.hypot(ue-ze.x,Ne-ze.y)<=Ie)return;_e(),o==null||o(q)}F.current=!0,Z.current||(Y(),Z.current=!0),B(ue,Ne)},le=q=>{var oe,ce;if(!T){q.target===z.current&&b.getState().connection.inProgress&&(P.current=!0);return}q.button===0&&((ce=(oe=q.target)==null?void 0:oe.releasePointerCapture)==null||ce.call(oe,q.pointerId),!w&&q.target===z.current&&b.getState().userSelectionRect&&(G==null||G(q)),b.setState({userSelectionActive:!1,userSelectionRect:null}),F.current&&(c==null||c(q),b.setState({nodesSelectionActive:O.current.size>0})),V())},ae=q=>{var oe,ce;(ce=(oe=q.target)==null?void 0:oe.releasePointerCapture)==null||ce.call(oe,q.pointerId),V()},re=r===!0||Array.isArray(r)&&r.includes(0);return f.jsxs("div",{className:Or(["react-flow__pane",{draggable:re,dragging:C,selection:e}]),onClick:T?void 0:zv(G,z),onContextMenu:zv(X,z),onWheel:zv(J,z),onPointerEnter:T?void 0:m,onPointerMove:T?se:g,onPointerUp:le,onPointerCancel:T?ae:void 0,onPointerDownCapture:T?L:void 0,onClickCapture:T?$:void 0,onPointerLeave:S,ref:z,style:Xm,children:[k,f.jsx(X4t,{})]})}function bx({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:a,multiSelectionActive:l,nodeLookup:o,onError:c}=n.getState(),d=o.get(e);if(!d){c==null||c("012",ia.error012(e));return}n.setState({nodesSelectionActive:!1}),d.selected?(t||d.selected&&l)&&(a({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var _;return(_=r==null?void 0:r.current)==null?void 0:_.blur()})):s([e])}function mD({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:a,nodeClickDistance:l}){const o=tr(),[c,d]=M.useState(!1),_=M.useRef();return M.useEffect(()=>{_.current=Oyt({getStoreItems:()=>o.getState(),onNodeMouseDown:h=>{bx({id:h,store:o,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),M.useEffect(()=>{if(!(n||!e.current||!_.current))return _.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:s,nodeClickDistance:l}),()=>{var h;(h=_.current)==null||h.destroy()}},[t,r,n,a,e,s,l]),c}const J4t=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function gD(){const e=tr();return M.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:a,nodesDraggable:l,onError:o,updateNodePositions:c,nodeLookup:d,nodeOrigin:_}=e.getState(),h=new Map,m=J4t(l),g=s?a[0]:5,S=s?a[1]:5,k=t.direction.x*g*t.factor,v=t.direction.y*S*t.factor;for(const[,b]of d){if(!m(b))continue;let w={x:b.internals.positionAbsolute.x+k,y:b.internals.positionAbsolute.y+v};s&&(w=Gh(w,a));const{position:x,positionAbsolute:C}=IR({nodeId:b.id,nextPosition:w,nodeLookup:d,nodeExtent:r,nodeOrigin:_,onError:o});b.position=x,b.internals.positionAbsolute=C,h.set(b.id,b)}c(h)},[])}const ew=M.createContext(null),ewt=ew.Provider;ew.Consumer;const bD=()=>M.useContext(ew),twt=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),vD=M.createContext(null);function nwt({children:e}){const n=dn(twt,Jn);return f.jsx(vD.Provider,{value:n,children:e})}function rwt(){const e=M.useContext(vD);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const swt={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},iwt=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:a,connection:l}=r,{fromHandle:o,toHandle:c,isValid:d}=l;if(!o&&!s)return swt;const _=(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:_,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:a===cd.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:_&&d}};function awt({type:e="source",position:n=vt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:a=!0,id:l,onConnect:o,children:c,className:d,onMouseDown:_,onTouchStart:h,...m},g){var Z,G;const S=l||null,k=e==="target",v=tr(),b=bD(),{connectOnClick:w,noPanClassName:x,rfId:C}=rwt(),{connectingFrom:j,connectingTo:N,clickConnecting:T,isPossibleEndHandle:z,connectionInProcess:D,clickConnectionInProcess:O,valid:H}=dn(iwt(b,S,e),Jn);b||(G=(Z=v.getState()).onError)==null||G.call(Z,"010",ia.error010());const P=X=>{const{defaultEdgeOptions:J,onConnect:$,hasDefaultEdges:L}=v.getState(),B={...J,...X};if(L){const{edges:Y,setEdges:V,onError:se}=v.getState();V(I4t(B,Y,{onError:se}))}$==null||$(B),o==null||o(B)},F=X=>{if(!b)return;const J=VR(X.nativeEvent);if(s&&(J&&X.button===0||!J)){const $=v.getState();gx.onPointerDown(X.nativeEvent,{handleDomNode:X.currentTarget,autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:k,handleId:S,nodeId:b,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:(...L)=>{var B,Y;return(Y=(B=v.getState()).onConnectEnd)==null?void 0:Y.call(B,...L)},updateConnection:$.updateConnection,onConnect:P,isValidConnection:t||((...L)=>{var B,Y;return((Y=(B=v.getState()).isValidConnection)==null?void 0:Y.call(B,...L))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}J?_==null||_(X):h==null||h(X)},W=X=>{const{onClickConnectStart:J,onClickConnectEnd:$,connectionClickStartHandle:L,connectionMode:B,isValidConnection:Y,lib:V,rfId:se,nodeLookup:le,connection:ae}=v.getState();if(!b||!L&&!s)return;if(!L){J==null||J(X.nativeEvent,{nodeId:b,handleId:S,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:S}});return}const re=qR(X.target),q=t||Y,{connection:oe,isValid:ce}=gx.isValid(X.nativeEvent,{handle:{nodeId:b,id:S,type:e},connectionMode:B,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:q,flowId:se,doc:re,lib:V,nodeLookup:le});ce&&oe&&P(oe);const _e=structuredClone(ae);delete _e.inProgress,_e.toPosition=_e.toHandle?_e.toHandle.position:null,$==null||$(X,_e),v.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":S,"data-nodeid":b,"data-handlepos":n,"data-id":`${C}-${b}-${S}-${e}`,className:Or(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",x,d,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:a,clickconnecting:T,connectingfrom:j,connectingto:N,valid:H,connectionindicator:r&&(!D||z)&&(D||O?a:s)}]),onMouseDown:F,onTouchStart:F,onClick:w?W:void 0,ref:g,...m,children:c})}const Ml=M.memo(_D(awt));function owt({data:e,isConnectable:n,sourcePosition:t=vt.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(Ml,{type:"source",position:t,isConnectable:n})]})}function lwt({data:e,isConnectable:n,targetPosition:t=vt.Top,sourcePosition:r=vt.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(Ml,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,f.jsx(Ml,{type:"source",position:r,isConnectable:n})]})}function cwt(){return null}function uwt({data:e,isConnectable:n,targetPosition:t=vt.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(Ml,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Pp={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},V9={input:owt,default:lwt,output:uwt,group:cwt};function dwt(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 fwt=e=>{const{width:n,height:t,x:r,y:s}=qh(e.nodeLookup,{filter:a=>!!a.selected});return{width:ea(n)?n:null,height:ea(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 hwt({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=tr(),{width:s,height:a,transformString:l,userSelectionActive:o}=dn(fwt,Jn),c=gD(),d=M.useRef(null);M.useEffect(()=>{var g;t||(g=d.current)==null||g.focus({preventScroll:!0})},[t]);const _=!o&&s!==null&&a!==null;if(mD({nodeRef:d,disabled:!_}),!_)return null;const h=e?g=>{const S=r.getState().nodes.filter(k=>k.selected);e(g,S)}:void 0,m=g=>{Object.prototype.hasOwnProperty.call(Pp,g.key)&&(g.preventDefault(),c({direction:Pp[g.key],factor:g.shiftKey?4:1}))};return f.jsx("div",{className:Or(["react-flow__nodesselection","react-flow__container",n]),style:{transform:l},children:f.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:t?void 0:-1,onKeyDown:t?void 0:m,style:{width:s,height:a}})})}const W9=typeof window<"u"?window:void 0,_wt=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function xD({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:l,paneClickDistance:o,deleteKeyCode:c,selectionKeyCode:d,selectionOnDrag:_,selectionMode:h,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:S,panActivationKeyCode:k,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:x,panOnScroll:C,panOnScrollSpeed:j,panOnScrollMode:N,zoomOnDoubleClick:T,panOnDrag:z,autoPanOnSelection:D,defaultViewport:O,translateExtent:H,minZoom:P,maxZoom:F,preventScrolling:W,onSelectionContextMenu:Z,noWheelClassName:G,noPanClassName:X,disableKeyboardA11y:J,onViewportChange:$,isControlledViewport:L}){const{nodesSelectionActive:B,userSelectionActive:Y}=dn(_wt,Jn),V=gh(d,{target:W9}),se=gh(k,{target:W9}),le=se||z,ae=se||C,re=_&&le!==!0,q=V||Y||re;return G4t({deleteKeyCode:c,multiSelectionKeyCode:S}),f.jsx(K4t,{onPaneContextMenu:a,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:x,panOnScroll:ae,panOnScrollSpeed:j,panOnScrollMode:N,zoomOnDoubleClick:T,panOnDrag:!V&&le,defaultViewport:O,translateExtent:H,minZoom:P,maxZoom:F,zoomActivationKeyCode:v,preventScrolling:W,noWheelClassName:G,noPanClassName:X,onViewportChange:$,isControlledViewport:L,paneClickDistance:o,selectionOnDrag:re,children:f.jsxs(Q4t,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:le,autoPanOnSelection:D,isSelecting:!!q,selectionMode:h,selectionKeyPressed:V,paneClickDistance:o,selectionOnDrag:re,children:[e,B&&f.jsx(hwt,{onSelectionContextMenu:Z,noPanClassName:X,disableKeyboardA11y:J})]})})}xD.displayName="FlowRenderer";const pwt=M.memo(xD),mwt=e=>n=>e?q4(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 gwt(e){return dn(M.useCallback(mwt(e),[e]),Jn)}const bwt=e=>e.updateNodeInternals;function vwt(){const e=dn(bwt),[n]=M.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(t=>{const r=new Map;t.forEach(s=>{const a=s.target.getAttribute("data-id");r.set(a,{id:a,nodeElement:s.target,force:!0})}),e(r)}));return M.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function xwt({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=tr(),a=M.useRef(null),l=M.useRef(null),o=M.useRef(e.sourcePosition),c=M.useRef(e.targetPosition),d=M.useRef(n),_=t&&!!e.internals.handleBounds;return M.useEffect(()=>{a.current&&!e.hidden&&(!_||l.current!==a.current)&&(l.current&&(r==null||r.unobserve(l.current)),r==null||r.observe(a.current),l.current=a.current)},[_,e.hidden]),M.useEffect(()=>()=>{l.current&&(r==null||r.unobserve(l.current),l.current=null)},[]),M.useEffect(()=>{if(a.current){const h=d.current!==n,m=o.current!==e.sourcePosition,g=c.current!==e.targetPosition;(h||m||g)&&(d.current=n,o.current=e.sourcePosition,c.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),a}function ywt({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:a,onDoubleClick:l,nodesDraggable:o,elementsSelectable:c,nodesConnectable:d,nodesFocusable:_,resizeObserver:h,noDragClassName:m,noPanClassName:g,disableKeyboardA11y:S,rfId:k,nodeTypes:v,nodeClickDistance:b,onError:w}){const{node:x,internals:C,isParent:j}=dn(q=>{const oe=q.nodeLookup.get(e),ce=q.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:ce}},Jn);let N=x.type||"default",T=(v==null?void 0:v[N])||V9[N];T===void 0&&(w==null||w("003",ia.error003(N)),N="default",T=(v==null?void 0:v.default)||V9.default);const z=!!(x.draggable||o&&typeof x.draggable>"u"),D=!!(x.selectable||c&&typeof x.selectable>"u"),O=!!(x.connectable||d&&typeof x.connectable>"u"),H=!!(x.focusable||_&&typeof x.focusable>"u"),P=tr(),F=FR(x),W=xwt({node:x,nodeType:N,hasDimensions:F,resizeObserver:h}),Z=mD({nodeRef:W,disabled:x.hidden||!z,noDragClassName:m,handleSelector:x.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:b}),G=gD();if(x.hidden)return null;const X=Do(x),J=dwt(x),$=D||z||n||t||r||s,L=t?q=>t(q,{...C.userNode}):void 0,B=r?q=>r(q,{...C.userNode}):void 0,Y=s?q=>s(q,{...C.userNode}):void 0,V=a?q=>a(q,{...C.userNode}):void 0,se=l?q=>l(q,{...C.userNode}):void 0,le=q=>{const{selectNodesOnDrag:oe,nodeDragThreshold:ce}=P.getState();D&&(!oe||!z||ce>0)&&bx({id:e,store:P,nodeRef:W}),n&&n(q,{...C.userNode})},ae=q=>{if(!(GR(q.nativeEvent)||S)){if(MR.includes(q.key)&&D){const oe=q.key==="Escape";bx({id:e,store:P,unselect:oe,nodeRef:W})}else if(z&&x.selected&&Object.prototype.hasOwnProperty.call(Pp,q.key)){q.preventDefault();const{ariaLabelConfig:oe}=P.getState();P.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:q.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),G({direction:Pp[q.key],factor:q.shiftKey?4:1})}}},re=()=>{var ze;if(S||!((ze=W.current)!=null&&ze.matches(":focus-visible")))return;const{transform:q,width:oe,height:ce,autoPanOnNodeFocus:_e,setCenter:ue}=P.getState();if(!_e)return;q4(new Map([[e,x]]),{x:0,y:0,width:oe,height:ce},q,!0).length>0||ue(x.position.x+X.width/2,x.position.y+X.height/2,{zoom:q[2]})};return f.jsx("div",{className:Or(["react-flow__node",`react-flow__node-${N}`,{[g]:z},x.className,{selected:x.selected,selectable:D,parent:j,draggable:z,dragging:Z}]),ref:W,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:F?"visible":"hidden",...x.style,...J},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:B,onMouseLeave:Y,onContextMenu:V,onClick:le,onDoubleClick:se,onKeyDown:H?ae:void 0,tabIndex:H?0:void 0,onFocus:H?re:void 0,role:x.ariaRole??(H?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${uD}-${k}`,"aria-label":x.ariaLabel,...x.domAttributes,children:f.jsx(ewt,{value:e,children:f.jsx(T,{id:e,data:x.data,type:N,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:x.selected??!1,selectable:D,draggable:z,deletable:x.deletable??!0,isConnectable:O,sourcePosition:x.sourcePosition,targetPosition:x.targetPosition,dragging:Z,dragHandle:x.dragHandle,zIndex:C.z,parentId:x.parentId,...X})})})}var wwt=M.memo(ywt);const Swt=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function yD(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:a}=dn(Swt,Jn),l=gwt(e.onlyRenderVisibleElements),o=vwt();return f.jsx("div",{className:"react-flow__nodes",style:Xm,children:l.map(c=>f.jsx(wwt,{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:a},c))})}yD.displayName="NodeRenderer";const kwt=M.memo(yD);function Cwt(e){return dn(M.useCallback(t=>{if(!e)return t.edges.map(s=>s.id);const r=[];if(t.width&&t.height)for(const s of t.edges){const a=t.nodeLookup.get(s.source),l=t.nodeLookup.get(s.target);a&&l&&gyt({sourceNode:a,targetNode:l,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),Jn)}const Ewt=({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"})},Nwt=({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"})},K9={[Bp.Arrow]:Ewt,[Bp.ArrowClosed]:Nwt};function zwt(e){const n=tr();return M.useMemo(()=>{var s,a;return Object.prototype.hasOwnProperty.call(K9,e)?K9[e]:((a=(s=n.getState()).onError)==null||a.call(s,"009",ia.error009(e)),null)},[e])}const jwt=({id:e,type:n,color:t,width:r=12.5,height:s=12.5,markerUnits:a="strokeWidth",strokeWidth:l,orient:o="auto-start-reverse"})=>{const c=zwt(n);return c?f.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:o,refX:"0",refY:"0",children:f.jsx(c,{color:t,strokeWidth:l})}):null},wD=({defaultColor:e,rfId:n})=>{const t=dn(a=>a.edges),r=dn(a=>a.defaultEdgeOptions),s=M.useMemo(()=>Cyt(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(a=>f.jsx(jwt,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};wD.displayName="MarkerDefinitions";var Awt=M.memo(wD);function SD({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:a,labelBgPadding:l=[2,4],labelBgBorderRadius:o=2,children:c,className:d,..._}){const[h,m]=M.useState({x:1,y:0,width:0,height:0}),g=Or(["react-flow__edge-textwrapper",d]),S=M.useRef(null);return M.useEffect(()=>{if(S.current){const k=S.current.getBBox();m({x:k.x,y:k.y,width:k.width,height:k.height})}},[t]),t?f.jsxs("g",{transform:`translate(${e-h.width/2} ${n-h.height/2})`,className:g,visibility:h.width?"visible":"hidden",..._,children:[s&&f.jsx("rect",{width:h.width+2*l[0],x:-l[0],y:-l[1],height:h.height+2*l[1],className:"react-flow__edge-textbg",style:a,rx:o,ry:o}),f.jsx("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:S,style:r,children:t}),c]}):null}SD.displayName="EdgeText";const Twt=M.memo(SD);function Zm({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:o,labelBgBorderRadius:c,interactionWidth:d=20,..._}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{..._,d:e,fill:"none",className:Or(["react-flow__edge-path",_.className])}),d?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,r&&ea(n)&&ea(t)?f.jsx(Twt,{x:n,y:t,label:r,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:o,labelBgBorderRadius:c}):null]})}function Y9({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===vt.Left||e===vt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function kD({sourceX:e,sourceY:n,sourcePosition:t=vt.Bottom,targetX:r,targetY:s,targetPosition:a=vt.Top}){const[l,o]=Y9({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,d]=Y9({pos:a,x1:r,y1:s,x2:e,y2:n}),[_,h,m,g]=WR({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:l,sourceControlY:o,targetControlX:c,targetControlY:d});return[`M${e},${n} C${l},${o} ${c},${d} ${r},${s}`,_,h,m,g]}function CD(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,sourcePosition:l,targetPosition:o,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:v,interactionWidth:b})=>{const[w,x,C]=kD({sourceX:t,sourceY:r,sourcePosition:l,targetX:s,targetY:a,targetPosition:o}),j=e.isInternal?void 0:n;return f.jsx(Zm,{id:j,path:w,labelX:x,labelY:C,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:v,interactionWidth:b})})}const Mwt=CD({isInternal:!1}),ED=CD({isInternal:!0});Mwt.displayName="SimpleBezierEdge";ED.displayName="SimpleBezierEdgeInternal";function ND(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,label:l,labelStyle:o,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:h,style:m,sourcePosition:g=vt.Bottom,targetPosition:S=vt.Top,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:w})=>{const[x,C,j]=_x({sourceX:t,sourceY:r,sourcePosition:g,targetX:s,targetY:a,targetPosition:S,borderRadius:b==null?void 0:b.borderRadius,offset:b==null?void 0:b.offset,stepPosition:b==null?void 0:b.stepPosition}),N=e.isInternal?void 0:n;return f.jsx(Zm,{id:N,path:x,labelX:C,labelY:j,label:l,labelStyle:o,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:h,style:m,markerEnd:k,markerStart:v,interactionWidth:w})})}const zD=ND({isInternal:!1}),jD=ND({isInternal:!0});zD.displayName="SmoothStepEdge";jD.displayName="SmoothStepEdgeInternal";function AD(e){return M.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return f.jsx(zD,{...t,id:r,pathOptions:M.useMemo(()=>{var a;return{borderRadius:0,offset:(a=t.pathOptions)==null?void 0:a.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const Rwt=AD({isInternal:!1}),TD=AD({isInternal:!0});Rwt.displayName="StepEdge";TD.displayName="StepEdgeInternal";function MD(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,label:l,labelStyle:o,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:h,style:m,markerEnd:g,markerStart:S,interactionWidth:k})=>{const[v,b,w]=XR({sourceX:t,sourceY:r,targetX:s,targetY:a}),x=e.isInternal?void 0:n;return f.jsx(Zm,{id:x,path:v,labelX:b,labelY:w,label:l,labelStyle:o,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:h,style:m,markerEnd:g,markerStart:S,interactionWidth:k})})}const Dwt=MD({isInternal:!1}),RD=MD({isInternal:!0});Dwt.displayName="StraightEdge";RD.displayName="StraightEdgeInternal";function DD(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,sourcePosition:l=vt.Bottom,targetPosition:o=vt.Top,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:w})=>{const[x,C,j]=KR({sourceX:t,sourceY:r,sourcePosition:l,targetX:s,targetY:a,targetPosition:o,curvature:b==null?void 0:b.curvature}),N=e.isInternal?void 0:n;return f.jsx(Zm,{id:N,path:x,labelX:C,labelY:j,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:v,interactionWidth:w})})}const Lwt=DD({isInternal:!1}),LD=DD({isInternal:!0});Lwt.displayName="BezierEdge";LD.displayName="BezierEdgeInternal";const X9={default:LD,straight:RD,step:TD,smoothstep:jD,simplebezier:ED},Z9={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},Owt=(e,n,t)=>t===vt.Left?e-n:t===vt.Right?e+n:e,Iwt=(e,n,t)=>t===vt.Top?e-n:t===vt.Bottom?e+n:e,Q9="react-flow__edgeupdater";function J9({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:a,onMouseOut:l,type:o}){return f.jsx("circle",{onMouseDown:s,onMouseEnter:a,onMouseOut:l,className:Or([Q9,`${Q9}-${o}`]),cx:Owt(n,r,e),cy:Iwt(t,r,e),r,stroke:"transparent",fill:"transparent"})}function Bwt({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:a,targetY:l,sourcePosition:o,targetPosition:c,onReconnect:d,onReconnectStart:_,onReconnectEnd:h,setReconnecting:m,setUpdateHover:g}){const S=tr(),k=(C,j)=>{if(C.button!==0)return;const{autoPanOnConnect:N,domNode:T,connectionMode:z,connectionRadius:D,lib:O,onConnectStart:H,cancelConnection:P,nodeLookup:F,rfId:W,panBy:Z,updateConnection:G}=S.getState(),X=j.type==="target",J=(B,Y)=>{m(!1),h==null||h(B,t,j.type,Y)},$=B=>d==null?void 0:d(t,B),L=(B,Y)=>{m(!0),_==null||_(C,t,j.type),H==null||H(B,Y)};gx.onPointerDown(C.nativeEvent,{autoPanOnConnect:N,connectionMode:z,connectionRadius:D,domNode:T,handleId:j.id,nodeId:j.nodeId,nodeLookup:F,isTarget:X,edgeUpdaterType:j.type,lib:O,flowId:W,cancelConnection:P,panBy:Z,isValidConnection:(...B)=>{var Y,V;return((V=(Y=S.getState()).isValidConnection)==null?void 0:V.call(Y,...B))??!0},onConnect:$,onConnectStart:L,onConnectEnd:(...B)=>{var Y,V;return(V=(Y=S.getState()).onConnectEnd)==null?void 0:V.call(Y,...B)},onReconnectEnd:J,updateConnection:G,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.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=()=>g(!0),x=()=>g(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(J9,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:v,onMouseEnter:w,onMouseOut:x,type:"source"}),(e===!0||e==="target")&&f.jsx(J9,{position:c,centerX:a,centerY:l,radius:n,onMouseDown:b,onMouseEnter:w,onMouseOut:x,type:"target"})]})}function $wt({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:a,onContextMenu:l,onMouseEnter:o,onMouseMove:c,onMouseLeave:d,reconnectRadius:_,onReconnect:h,onReconnectStart:m,onReconnectEnd:g,rfId:S,edgeTypes:k,noPanClassName:v,onError:b,disableKeyboardA11y:w}){let x=dn(ue=>ue.edgeLookup.get(e));const C=dn(ue=>ue.defaultEdgeOptions);x=C?{...C,...x}:x;let j=x.type||"default",N=(k==null?void 0:k[j])||X9[j];N===void 0&&(b==null||b("011",ia.error011(j)),j="default",N=(k==null?void 0:k.default)||X9.default);const T=!!(x.focusable||n&&typeof x.focusable>"u"),z=typeof h<"u"&&(x.reconnectable||t&&typeof x.reconnectable>"u"),D=!!(x.selectable||r&&typeof x.selectable>"u"),O=M.useRef(null),[H,P]=M.useState(!1),[F,W]=M.useState(!1),Z=tr(),{zIndex:G=x.zIndex,sourceX:X,sourceY:J,targetX:$,targetY:L,sourcePosition:B,targetPosition:Y}=dn(M.useCallback(ue=>{const Ne=ue.nodeLookup.get(x.source),ze=ue.nodeLookup.get(x.target);if(!Ne||!ze)return Z9;const Ie=kyt({id:e,sourceNode:Ne,targetNode:ze,sourceHandle:x.sourceHandle||null,targetHandle:x.targetHandle||null,connectionMode:ue.connectionMode,onError:b}),Pe=myt({selected:x.selected,zIndex:x.zIndex,sourceNode:Ne,targetNode:ze,elevateOnSelect:ue.elevateEdgesOnSelect,zIndexMode:ue.zIndexMode});return{...Ie||Z9,zIndex:Pe}},[x.source,x.target,x.sourceHandle,x.targetHandle,x.selected,x.zIndex]),Jn),V=M.useMemo(()=>x.markerStart?`url('#${px(x.markerStart,S)}')`:void 0,[x.markerStart,S]),se=M.useMemo(()=>x.markerEnd?`url('#${px(x.markerEnd,S)}')`:void 0,[x.markerEnd,S]);if(x.hidden||X===null||J===null||$===null||L===null)return null;const le=ue=>{var Pe;const{addSelectedEdges:Ne,unselectNodesAndEdges:ze,multiSelectionActive:Ie}=Z.getState();D&&(Z.setState({nodesSelectionActive:!1}),x.selected&&Ie?(ze({nodes:[],edges:[x]}),(Pe=O.current)==null||Pe.blur()):Ne([e])),s&&s(ue,x)},ae=a?ue=>{a(ue,{...x})}:void 0,re=l?ue=>{l(ue,{...x})}:void 0,q=o?ue=>{o(ue,{...x})}:void 0,oe=c?ue=>{c(ue,{...x})}:void 0,ce=d?ue=>{d(ue,{...x})}:void 0,_e=ue=>{var Ne;if(!w&&MR.includes(ue.key)&&D){const{unselectNodesAndEdges:ze,addSelectedEdges:Ie}=Z.getState();ue.key==="Escape"?((Ne=O.current)==null||Ne.blur(),ze({edges:[x]})):Ie([e])}};return f.jsx("svg",{style:{zIndex:G},children:f.jsxs("g",{className:Or(["react-flow__edge",`react-flow__edge-${j}`,x.className,v,{selected:x.selected,animated:x.animated,inactive:!D&&!s,updating:H,selectable:D}]),onClick:le,onDoubleClick:ae,onContextMenu:re,onMouseEnter:q,onMouseMove:oe,onMouseLeave:ce,onKeyDown:T?_e:void 0,tabIndex:T?0:void 0,role:x.ariaRole??(T?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":x.ariaLabel===null?void 0:x.ariaLabel||`Edge from ${x.source} to ${x.target}`,"aria-describedby":T?`${dD}-${S}`:void 0,ref:O,...x.domAttributes,children:[!F&&f.jsx(N,{id:e,source:x.source,target:x.target,type:x.type,selected:x.selected,animated:x.animated,selectable:D,deletable:x.deletable??!0,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,sourceX:X,sourceY:J,targetX:$,targetY:L,sourcePosition:B,targetPosition:Y,data:x.data,style:x.style,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerStart:V,markerEnd:se,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth}),z&&f.jsx(Bwt,{edge:x,isReconnectable:z,reconnectRadius:_,onReconnect:h,onReconnectStart:m,onReconnectEnd:g,sourceX:X,sourceY:J,targetX:$,targetY:L,sourcePosition:B,targetPosition:Y,setUpdateHover:P,setReconnecting:W})]})})}var Hwt=M.memo($wt);const Pwt=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function OD({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:a,onEdgeContextMenu:l,onEdgeMouseEnter:o,onEdgeMouseMove:c,onEdgeMouseLeave:d,onEdgeClick:_,reconnectRadius:h,onEdgeDoubleClick:m,onReconnectStart:g,onReconnectEnd:S,disableKeyboardA11y:k}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:w,onError:x}=dn(Pwt,Jn),C=Cwt(n);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(Awt,{defaultColor:e,rfId:t}),C.map(j=>f.jsx(Hwt,{id:j,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:w,noPanClassName:s,onReconnect:a,onContextMenu:l,onMouseEnter:o,onMouseMove:c,onMouseLeave:d,onClick:_,reconnectRadius:h,onDoubleClick:m,onReconnectStart:g,onReconnectEnd:S,rfId:t,onError:x,edgeTypes:r,disableKeyboardA11y:k},j))]})}OD.displayName="EdgeRenderer";const Fwt=M.memo(OD),Uwt=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function qwt({children:e}){const n=dn(Uwt);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function Gwt(e){const n=J4(),t=M.useRef(!1);M.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const Vwt=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function Wwt(e){const n=dn(Vwt),t=tr();return M.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function Kwt(e){return e.connection.inProgress?{...e.connection,to:Vh(e.connection.to,e.transform)}:{...e.connection}}function Ywt(e){return Kwt}function Xwt(e){const n=Ywt();return dn(n,Jn)}const Zwt=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Qwt({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:a,height:l,isValid:o,inProgress:c}=dn(Zwt,Jn);return!(a&&s&&c)?null:f.jsx("svg",{style:e,width:a,height:l,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:Or(["react-flow__connection",LR(o)]),children:f.jsx(ID,{style:n,type:t,CustomComponent:r,isValid:o})})})}const ID=({style:e,type:n=yl.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:a,fromNode:l,fromHandle:o,fromPosition:c,to:d,toNode:_,toHandle:h,toPosition:m,pointer:g}=Xwt();if(!s)return;if(t)return f.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:l,fromHandle:o,fromX:a.x,fromY:a.y,toX:d.x,toY:d.y,fromPosition:c,toPosition:m,connectionStatus:LR(r),toNode:_,toHandle:h,pointer:g});let S="";const k={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:d.x,targetY:d.y,targetPosition:m};switch(n){case yl.Bezier:[S]=KR(k);break;case yl.SimpleBezier:[S]=kD(k);break;case yl.Step:[S]=_x({...k,borderRadius:0});break;case yl.SmoothStep:[S]=_x(k);break;default:[S]=XR(k)}return f.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:e})};ID.displayName="ConnectionLine";const Jwt={};function eE(e=Jwt){M.useRef(e),tr(),M.useEffect(()=>{},[e])}function e5t(){tr(),M.useRef(!1),M.useEffect(()=>{},[])}function BD({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:a,onEdgeDoubleClick:l,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:_,onSelectionContextMenu:h,onSelectionStart:m,onSelectionEnd:g,connectionLineType:S,connectionLineStyle:k,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:w,selectionOnDrag:x,selectionMode:C,multiSelectionKeyCode:j,panActivationKeyCode:N,zoomActivationKeyCode:T,deleteKeyCode:z,onlyRenderVisibleElements:D,elementsSelectable:O,defaultViewport:H,translateExtent:P,minZoom:F,maxZoom:W,preventScrolling:Z,defaultMarkerColor:G,zoomOnScroll:X,zoomOnPinch:J,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:B,zoomOnDoubleClick:Y,panOnDrag:V,autoPanOnSelection:se,onPaneClick:le,onPaneMouseEnter:ae,onPaneMouseMove:re,onPaneMouseLeave:q,onPaneScroll:oe,onPaneContextMenu:ce,paneClickDistance:_e,nodeClickDistance:ue,onEdgeContextMenu:Ne,onEdgeMouseEnter:ze,onEdgeMouseMove:Ie,onEdgeMouseLeave:Pe,reconnectRadius:$e,onReconnect:It,onReconnectStart:yt,onReconnectEnd:qe,noDragClassName:jt,noWheelClassName:pt,noPanClassName:ot,disableKeyboardA11y:tt,nodeExtent:Ft,rfId:ke,viewport:Re,onViewportChange:Xe}){return eE(e),eE(n),e5t(),Gwt(t),Wwt(Re),f.jsx(pwt,{onPaneClick:le,onPaneMouseEnter:ae,onPaneMouseMove:re,onPaneMouseLeave:q,onPaneContextMenu:ce,onPaneScroll:oe,paneClickDistance:_e,deleteKeyCode:z,selectionKeyCode:w,selectionOnDrag:x,selectionMode:C,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:j,panActivationKeyCode:N,zoomActivationKeyCode:T,elementsSelectable:O,zoomOnScroll:X,zoomOnPinch:J,zoomOnDoubleClick:Y,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:B,panOnDrag:V,autoPanOnSelection:se,defaultViewport:H,translateExtent:P,minZoom:F,maxZoom:W,onSelectionContextMenu:h,preventScrolling:Z,noDragClassName:jt,noWheelClassName:pt,noPanClassName:ot,disableKeyboardA11y:tt,onViewportChange:Xe,isControlledViewport:!!Re,children:f.jsxs(qwt,{children:[f.jsx(Fwt,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:l,onReconnect:It,onReconnectStart:yt,onReconnectEnd:qe,onlyRenderVisibleElements:D,onEdgeContextMenu:Ne,onEdgeMouseEnter:ze,onEdgeMouseMove:Ie,onEdgeMouseLeave:Pe,reconnectRadius:$e,defaultMarkerColor:G,noPanClassName:ot,disableKeyboardA11y:tt,rfId:ke}),f.jsx(Qwt,{style:k,type:S,component:v,containerStyle:b}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(kwt,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:_,nodeClickDistance:ue,onlyRenderVisibleElements:D,noPanClassName:ot,noDragClassName:jt,disableKeyboardA11y:tt,nodeExtent:Ft,rfId:ke}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}BD.displayName="GraphView";const t5t=M.memo(BD),n5t=PR(),tE=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:l,fitViewOptions:o,minZoom:c=.5,maxZoom:d=2,nodeOrigin:_,nodeExtent:h,zIndexMode:m="basic"}={})=>{const g=new Map,S=new Map,k=new Map,v=new Map,b=r??n??[],w=t??e??[],x=_??[0,0],C=h??hh;JR(k,v,b);const{nodesInitialized:j}=mx(w,g,S,{nodeOrigin:x,nodeExtent:C,zIndexMode:m});let N=[0,0,1];if(l&&s&&a){const T=qh(g,{filter:H=>!!((H.width||H.initialWidth)&&(H.height||H.initialHeight))}),{x:z,y:D,zoom:O}=V4(T,s,a,c,d,(o==null?void 0:o.padding)??.1);N=[z,D,O]}return{rfId:"1",width:s??0,height:a??0,transform:N,nodes:w,nodesInitialized:j,nodeLookup:g,parentLookup:S,edges:b,edgeLookup:v,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:d,translateExtent:hh,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:cd.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,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:l??!1,fitViewOptions:o,fitViewResolver:null,connection:{...DR},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:n5t,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:RR,zIndexMode:m,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},r5t=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:l,fitViewOptions:o,minZoom:c,maxZoom:d,nodeOrigin:_,nodeExtent:h,zIndexMode:m})=>h4t((g,S)=>{async function k(){const{nodeLookup:v,panZoom:b,fitViewOptions:w,fitViewResolver:x,width:C,height:j,minZoom:N,maxZoom:T}=S();b&&(await cyt({nodes:v,width:C,height:j,panZoom:b,minZoom:N,maxZoom:T},w),x==null||x.resolve(!0),g({fitViewResolver:null}))}return{...tE({nodes:e,edges:n,width:s,height:a,fitView:l,fitViewOptions:o,minZoom:c,maxZoom:d,nodeOrigin:_,nodeExtent:h,defaultNodes:t,defaultEdges:r,zIndexMode:m}),setNodes:v=>{const{nodeLookup:b,parentLookup:w,nodeOrigin:x,elevateNodesOnSelect:C,fitViewQueued:j,zIndexMode:N,nodesSelectionActive:T}=S(),{nodesInitialized:z,hasSelectedNodes:D}=mx(v,b,w,{nodeOrigin:x,nodeExtent:h,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:N}),O=T&&D;j&&z?(k(),g({nodes:v,nodesInitialized:z,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:O})):g({nodes:v,nodesInitialized:z,nodesSelectionActive:O})},setEdges:v=>{const{connectionLookup:b,edgeLookup:w}=S();JR(b,w,v),g({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:w}=S();w(v),g({hasDefaultNodes:!0})}if(b){const{setEdges:w}=S();w(b),g({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:w,parentLookup:x,domNode:C,nodeOrigin:j,nodeExtent:N,debug:T,fitViewQueued:z,zIndexMode:D}=S(),{changes:O,updatedInternals:H}=Myt(v,w,x,C,j,N,D);H&&(zyt(w,x,{nodeOrigin:j,nodeExtent:N,zIndexMode:D}),z?(k(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(O==null?void 0:O.length)>0&&(T&&console.log("React Flow: trigger node changes",O),b==null||b(O)))},updateNodePositions:(v,b=!1)=>{const w=[];let x=[];const{nodeLookup:C,triggerNodeChanges:j,connection:N,updateConnection:T,onNodesChangeMiddlewareMap:z}=S();for(const[D,O]of v){const H=C.get(D),P=!!(H!=null&&H.expandParent&&(H!=null&&H.parentId)&&(O!=null&&O.position)),F={id:D,type:"position",position:P?{x:Math.max(0,O.position.x),y:Math.max(0,O.position.y)}:O.position,dragging:b};if(H&&N.inProgress&&N.fromNode.id===H.id){const W=Lc(H,N.fromHandle,vt.Left,!0);T({...N,from:W})}P&&H.parentId&&w.push({id:D,parentId:H.parentId,rect:{...O.internals.positionAbsolute,width:O.measured.width??0,height:O.measured.height??0}}),x.push(F)}if(w.length>0){const{parentLookup:D,nodeOrigin:O}=S(),H=Q4(w,C,D,O);x.push(...H)}for(const D of z.values())x=D(x);j(x)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:w,nodes:x,hasDefaultNodes:C,debug:j}=S();if(v!=null&&v.length){if(C){const N=D4t(v,x);w(N)}j&&console.log("React Flow: trigger node changes",v),b==null||b(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:w,edges:x,hasDefaultEdges:C,debug:j}=S();if(v!=null&&v.length){if(C){const N=L4t(v,x);w(N)}j&&console.log("React Flow: trigger edge changes",v),b==null||b(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:w,nodeLookup:x,triggerNodeChanges:C,triggerEdgeChanges:j}=S();if(b){const N=v.map(T=>mc(T,!0));C(N);return}C($u(x,new Set([...v]),!0)),j($u(w))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:w,nodeLookup:x,triggerNodeChanges:C,triggerEdgeChanges:j}=S();if(b){const N=v.map(T=>mc(T,!0));j(N);return}j($u(w,new Set([...v]))),C($u(x,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:w,nodes:x,nodeLookup:C,triggerNodeChanges:j,triggerEdgeChanges:N}=S(),T=v||x,z=b||w,D=[];for(const H of T){if(!H.selected)continue;const P=C.get(H.id);P&&(P.selected=!1),D.push(mc(H.id,!1))}const O=[];for(const H of z)H.selected&&O.push(mc(H.id,!1));j(D),N(O)},setMinZoom:v=>{const{panZoom:b,maxZoom:w}=S();b==null||b.setScaleExtent([v,w]),g({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:w}=S();b==null||b.setScaleExtent([w,v]),g({maxZoom:v})},setTranslateExtent:v=>{var b;(b=S().panZoom)==null||b.setTranslateExtent(v),g({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:w,triggerEdgeChanges:x,elementsSelectable:C}=S();if(!C)return;const j=b.reduce((T,z)=>z.selected?[...T,mc(z.id,!1)]:T,[]),N=v.reduce((T,z)=>z.selected?[...T,mc(z.id,!1)]:T,[]);w(j),x(N)},setNodeExtent:v=>{const{nodes:b,nodeLookup:w,parentLookup:x,nodeOrigin:C,elevateNodesOnSelect:j,nodeExtent:N,zIndexMode:T}=S();v[0][0]===N[0][0]&&v[0][1]===N[0][1]&&v[1][0]===N[1][0]&&v[1][1]===N[1][1]||(mx(b,w,x,{nodeOrigin:C,nodeExtent:v,elevateNodesOnSelect:j,checkEquality:!1,zIndexMode:T}),g({nodeExtent:v}))},panBy:v=>{const{transform:b,width:w,height:x,panZoom:C,translateExtent:j}=S();return Ryt({delta:v,panZoom:C,transform:b,translateExtent:j,width:w,height:x})},setCenter:async(v,b,w)=>{const{width:x,height:C,maxZoom:j,panZoom:N}=S();if(!N)return!1;const T=typeof(w==null?void 0:w.zoom)<"u"?w.zoom:j;return await N.setViewport({x:x/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:()=>{g({connection:{...DR}})},updateConnection:v=>{g({connection:v})},reset:()=>g({...tE()})}},Object.is);function s5t({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:a,initialMinZoom:l,initialMaxZoom:o,initialFitViewOptions:c,fitView:d,nodeOrigin:_,nodeExtent:h,zIndexMode:m,children:g}){const[S]=M.useState(()=>r5t({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:d,minZoom:l,maxZoom:o,fitViewOptions:c,nodeOrigin:_,nodeExtent:h,zIndexMode:m}));return f.jsx(_4t,{value:S,children:f.jsx(P4t,{children:f.jsx(nwt,{children:g})})})}function i5t({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:a,height:l,fitView:o,fitViewOptions:c,minZoom:d,maxZoom:_,nodeOrigin:h,nodeExtent:m,zIndexMode:g}){return M.useContext(Km)?f.jsx(f.Fragment,{children:e}):f.jsx(s5t,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:a,initialHeight:l,fitView:o,initialFitViewOptions:c,initialMinZoom:d,initialMaxZoom:_,nodeOrigin:h,nodeExtent:m,zIndexMode:g,children:e})}const a5t={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function o5t({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:a,edgeTypes:l,onNodeClick:o,onEdgeClick:c,onInit:d,onMove:_,onMoveStart:h,onMoveEnd:m,onConnect:g,onConnectStart:S,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:w,onNodeMouseMove:x,onNodeMouseLeave:C,onNodeContextMenu:j,onNodeDoubleClick:N,onNodeDragStart:T,onNodeDrag:z,onNodeDragStop:D,onNodesDelete:O,onEdgesDelete:H,onDelete:P,onSelectionChange:F,onSelectionDragStart:W,onSelectionDrag:Z,onSelectionDragStop:G,onSelectionContextMenu:X,onSelectionStart:J,onSelectionEnd:$,onBeforeDelete:L,connectionMode:B,connectionLineType:Y=yl.Bezier,connectionLineStyle:V,connectionLineComponent:se,connectionLineContainerStyle:le,deleteKeyCode:ae="Backspace",selectionKeyCode:re="Shift",selectionOnDrag:q=!1,selectionMode:oe=_h.Full,panActivationKeyCode:ce="Space",multiSelectionKeyCode:_e=mh()?"Meta":"Control",zoomActivationKeyCode:ue=mh()?"Meta":"Control",snapToGrid:Ne,snapGrid:ze,onlyRenderVisibleElements:Ie=!1,selectNodesOnDrag:Pe,nodesDraggable:$e,autoPanOnNodeFocus:It,nodesConnectable:yt,nodesFocusable:qe,nodeOrigin:jt=fD,edgesFocusable:pt,edgesReconnectable:ot,elementsSelectable:tt=!0,defaultViewport:Ft=N4t,minZoom:ke=.5,maxZoom:Re=2,translateExtent:Xe=hh,preventScrolling:nt=!0,nodeExtent:st,defaultMarkerColor:St="#b1b1b7",zoomOnScroll:mt=!0,zoomOnPinch:Wt=!0,panOnScroll:fn=!1,panOnScrollSpeed:hn=.5,panOnScrollMode:At=Nc.Free,zoomOnDoubleClick:jn=!0,panOnDrag:nn=!0,onPaneClick:nr,onPaneMouseEnter:lr,onPaneMouseMove:bn,onPaneMouseLeave:Je,onPaneScroll:ht,onPaneContextMenu:An,paneClickDistance:rr=1,nodeClickDistance:Ge=0,children:Bt,onReconnect:He,onReconnectStart:it,onReconnectEnd:_n,onEdgeContextMenu:qt,onEdgeDoubleClick:Nt,onEdgeMouseEnter:pn,onEdgeMouseMove:ls,onEdgeMouseLeave:Tn,reconnectRadius:Os=10,onNodesChange:la,onEdgesChange:Zr,noDragClassName:Sn="nodrag",noWheelClassName:Mn="nowheel",noPanClassName:kn="nopan",fitView:xs,fitViewOptions:cr,connectOnClick:Qr,attributionPosition:Ir,proOptions:Si,defaultEdgeOptions:Wn,elevateNodesOnSelect:pr=!0,elevateEdgesOnSelect:Tt=!1,disableKeyboardA11y:Kn=!1,autoPanOnConnect:Un,autoPanOnNodeDrag:Ze,autoPanOnSelection:Rt=!0,autoPanSpeed:ki,connectionRadius:cs,isValidConnection:us,onError:Jr,style:Ci,id:Xt,nodeDragThreshold:Js,connectionDragThreshold:Gr,viewport:ei,onViewportChange:Vr,width:ur,height:Zt,colorMode:ca="light",debug:Is,onScroll:kr,ariaLabelConfig:Bs,zIndexMode:ys="basic",...mr},Gi){const $s=Xt||"1",Ka=T4t(ca),ws=M.useCallback(Ss=>{Ss.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),kr==null||kr(Ss)},[kr]);return f.jsx("div",{"data-testid":"rf__wrapper",...mr,onScroll:ws,style:{...Ci,...a5t},ref:Gi,className:Or(["react-flow",s,Ka]),id:Xt,role:"application",children:f.jsxs(i5t,{nodes:e,edges:n,width:ur,height:Zt,fitView:xs,fitViewOptions:cr,minZoom:ke,maxZoom:Re,nodeOrigin:jt,nodeExtent:st,zIndexMode:ys,children:[f.jsx(A4t,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:g,onConnectStart:S,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:$e,autoPanOnNodeFocus:It,nodesConnectable:yt,nodesFocusable:qe,edgesFocusable:pt,edgesReconnectable:ot,elementsSelectable:tt,elevateNodesOnSelect:pr,elevateEdgesOnSelect:Tt,minZoom:ke,maxZoom:Re,nodeExtent:st,onNodesChange:la,onEdgesChange:Zr,snapToGrid:Ne,snapGrid:ze,connectionMode:B,translateExtent:Xe,connectOnClick:Qr,defaultEdgeOptions:Wn,fitView:xs,fitViewOptions:cr,onNodesDelete:O,onEdgesDelete:H,onDelete:P,onNodeDragStart:T,onNodeDrag:z,onNodeDragStop:D,onSelectionDrag:Z,onSelectionDragStart:W,onSelectionDragStop:G,onMove:_,onMoveStart:h,onMoveEnd:m,noPanClassName:kn,nodeOrigin:jt,rfId:$s,autoPanOnConnect:Un,autoPanOnNodeDrag:Ze,autoPanSpeed:ki,onError:Jr,connectionRadius:cs,isValidConnection:us,selectNodesOnDrag:Pe,nodeDragThreshold:Js,connectionDragThreshold:Gr,onBeforeDelete:L,debug:Is,ariaLabelConfig:Bs,zIndexMode:ys}),f.jsx(t5t,{onInit:d,onNodeClick:o,onEdgeClick:c,onNodeMouseEnter:w,onNodeMouseMove:x,onNodeMouseLeave:C,onNodeContextMenu:j,onNodeDoubleClick:N,nodeTypes:a,edgeTypes:l,connectionLineType:Y,connectionLineStyle:V,connectionLineComponent:se,connectionLineContainerStyle:le,selectionKeyCode:re,selectionOnDrag:q,selectionMode:oe,deleteKeyCode:ae,multiSelectionKeyCode:_e,panActivationKeyCode:ce,zoomActivationKeyCode:ue,onlyRenderVisibleElements:Ie,defaultViewport:Ft,translateExtent:Xe,minZoom:ke,maxZoom:Re,preventScrolling:nt,zoomOnScroll:mt,zoomOnPinch:Wt,zoomOnDoubleClick:jn,panOnScroll:fn,panOnScrollSpeed:hn,panOnScrollMode:At,panOnDrag:nn,autoPanOnSelection:Rt,onPaneClick:nr,onPaneMouseEnter:lr,onPaneMouseMove:bn,onPaneMouseLeave:Je,onPaneScroll:ht,onPaneContextMenu:An,paneClickDistance:rr,nodeClickDistance:Ge,onSelectionContextMenu:X,onSelectionStart:J,onSelectionEnd:$,onReconnect:He,onReconnectStart:it,onReconnectEnd:_n,onEdgeContextMenu:qt,onEdgeDoubleClick:Nt,onEdgeMouseEnter:pn,onEdgeMouseMove:ls,onEdgeMouseLeave:Tn,reconnectRadius:Os,defaultMarkerColor:St,noDragClassName:Sn,noWheelClassName:Mn,noPanClassName:kn,rfId:$s,disableKeyboardA11y:Kn,nodeExtent:st,viewport:ei,onViewportChange:Vr}),f.jsx(E4t,{onSelectionChange:F}),Bt,f.jsx(y4t,{proOptions:Si,position:Ir}),f.jsx(x4t,{rfId:$s,disableKeyboardA11y:Kn})]})})}var l5t=_D(o5t);function c5t({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:Or(["react-flow__background-pattern",t,r])})}function u5t({radius:e,className:n}){return f.jsx("circle",{cx:e,cy:e,r:e,className:Or(["react-flow__background-pattern","dots",n])})}var Co;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Co||(Co={}));const d5t={[Co.Dots]:1,[Co.Lines]:1,[Co.Cross]:6},f5t=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function $D({id:e,variant:n=Co.Dots,gap:t=20,size:r,lineWidth:s=1,offset:a=0,color:l,bgColor:o,style:c,className:d,patternClassName:_}){const h=M.useRef(null),{transform:m,patternId:g}=dn(f5t,Jn),S=r||d5t[n],k=n===Co.Dots,v=n===Co.Cross,b=Array.isArray(t)?t:[t,t],w=[b[0]*m[2]||1,b[1]*m[2]||1],x=S*m[2],C=Array.isArray(a)?a:[a,a],j=v?[x,x]:w,N=[C[0]*m[2]||1+j[0]/2,C[1]*m[2]||1+j[1]/2],T=`${g}${e||""}`;return f.jsxs("svg",{className:Or(["react-flow__background",d]),style:{...c,...Xm,"--xy-background-color-props":o,"--xy-background-pattern-color-props":l},ref:h,"data-testid":"rf__background",children:[f.jsx("pattern",{id:T,x:m[0]%w[0],y:m[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${N[0]},-${N[1]})`,children:k?f.jsx(u5t,{radius:x/2,className:_}):f.jsx(c5t,{dimensions:j,lineWidth:s,variant:n,className:_})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${T})`})]})}$D.displayName="Background";const h5t=M.memo($D);function _5t(){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 p5t(){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 m5t(){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 g5t(){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 b5t(){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 O0({children:e,className:n,...t}){return f.jsx("button",{type:"button",className:Or(["react-flow__controls-button",n]),...t,children:e})}const v5t=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function HD({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:a,onZoomOut:l,onFitView:o,onInteractiveChange:c,className:d,children:_,position:h="bottom-left",orientation:m="vertical","aria-label":g}){const S=tr(),{isInteractive:k,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:w}=dn(v5t,Jn),{zoomIn:x,zoomOut:C,fitView:j}=J4(),N=()=>{x(),a==null||a()},T=()=>{C(),l==null||l()},z=()=>{j(s),o==null||o()},D=()=>{S.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),c==null||c(!k)},O=m==="horizontal"?"horizontal":"vertical";return f.jsxs(Ym,{className:Or(["react-flow__controls",O,d]),position:h,style:e,"data-testid":"rf__controls","aria-label":g??w["controls.ariaLabel"],children:[n&&f.jsxs(f.Fragment,{children:[f.jsx(O0,{onClick:N,className:"react-flow__controls-zoomin",title:w["controls.zoomIn.ariaLabel"],"aria-label":w["controls.zoomIn.ariaLabel"],disabled:b,children:f.jsx(_5t,{})}),f.jsx(O0,{onClick:T,className:"react-flow__controls-zoomout",title:w["controls.zoomOut.ariaLabel"],"aria-label":w["controls.zoomOut.ariaLabel"],disabled:v,children:f.jsx(p5t,{})})]}),t&&f.jsx(O0,{className:"react-flow__controls-fitview",onClick:z,title:w["controls.fitView.ariaLabel"],"aria-label":w["controls.fitView.ariaLabel"],children:f.jsx(m5t,{})}),r&&f.jsx(O0,{className:"react-flow__controls-interactive",onClick:D,title:w["controls.interactive.ariaLabel"],"aria-label":w["controls.interactive.ariaLabel"],children:k?f.jsx(b5t,{}):f.jsx(g5t,{})}),_]})}HD.displayName="Controls";M.memo(HD);function x5t({id:e,x:n,y:t,width:r,height:s,style:a,color:l,strokeColor:o,strokeWidth:c,className:d,borderRadius:_,shapeRendering:h,selected:m,onClick:g}){const{background:S,backgroundColor:k}=a||{},v=l||S||k;return f.jsx("rect",{className:Or(["react-flow__minimap-node",{selected:m},d]),x:n,y:t,rx:_,ry:_,width:r,height:s,style:{fill:v,stroke:o,strokeWidth:c},shapeRendering:h,onClick:g?b=>g(b,e):void 0})}const y5t=M.memo(x5t),w5t=e=>e.nodes.map(n=>n.id),jv=e=>e instanceof Function?e:()=>e;function S5t({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:a=y5t,onClick:l}){const o=dn(w5t,Jn),c=jv(n),d=jv(e),_=jv(t),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:o.map(m=>f.jsx(C5t,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:d,nodeClassNameFunc:_,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:a,onClick:l,shapeRendering:h},m))})}function k5t({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:a,shapeRendering:l,NodeComponent:o,onClick:c}){const{node:d,x:_,y:h,width:m,height:g}=dn(S=>{const k=S.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:x,height:C}=Do(v);return{node:v,x:b,y:w,width:x,height:C}},Jn);return!d||d.hidden||!FR(d)?null:f.jsx(o,{x:_,y:h,width:m,height:g,style:d.style,selected:!!d.selected,className:r(d),color:n(d),borderRadius:s,strokeColor:t(d),strokeWidth:a,shapeRendering:l,onClick:c,id:d.id})}const C5t=M.memo(k5t);var E5t=M.memo(S5t);const N5t=200,z5t=150,j5t=e=>!e.hidden,A5t=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?$R(qh(e.nodeLookup,{filter:j5t}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},T5t="react-flow__minimap-desc";function PD({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:a=5,nodeStrokeWidth:l,nodeComponent:o,bgColor:c,maskColor:d,maskStrokeColor:_,maskStrokeWidth:h,position:m="bottom-right",onClick:g,onNodeClick:S,pannable:k=!1,zoomable:v=!1,ariaLabel:b,inversePan:w,zoomStep:x=1,offsetScale:C=5}){const j=tr(),N=M.useRef(null),{boundingRect:T,viewBB:z,rfId:D,panZoom:O,translateExtent:H,flowWidth:P,flowHeight:F,ariaLabelConfig:W}=dn(A5t,Jn),Z=(e==null?void 0:e.width)??N5t,G=(e==null?void 0:e.height)??z5t,X=T.width/Z,J=T.height/G,$=Math.max(X,J),L=$*Z,B=$*G,Y=C*$,V=T.x-(L-T.width)/2-Y,se=T.y-(B-T.height)/2-Y,le=L+Y*2,ae=B+Y*2,re=`${T5t}-${D}`,q=M.useRef(0),oe=M.useRef();q.current=$,M.useEffect(()=>{if(N.current&&O)return oe.current=Fyt({domNode:N.current,panZoom:O,getTransform:()=>j.getState().transform,getViewScale:()=>q.current}),()=>{var Ne;(Ne=oe.current)==null||Ne.destroy()}},[O]),M.useEffect(()=>{var Ne;(Ne=oe.current)==null||Ne.update({translateExtent:H,width:P,height:F,inversePan:w,pannable:k,zoomStep:x,zoomable:v})},[k,v,w,x,H,P,F]);const ce=g?Ne=>{var Pe;const[ze,Ie]=((Pe=oe.current)==null?void 0:Pe.pointer(Ne))||[0,0];g(Ne,{x:ze,y:Ie})}:void 0,_e=S?M.useCallback((Ne,ze)=>{const Ie=j.getState().nodeLookup.get(ze).internals.userNode;S(Ne,Ie)},[]):void 0,ue=b??W["minimap.ariaLabel"];return f.jsx(Ym,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof _=="string"?_:void 0,"--xy-minimap-mask-stroke-width-props":typeof h=="number"?h*$: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 l=="number"?l:void 0},className:Or(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:Z,height:G,viewBox:`${V} ${se} ${le} ${ae}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":re,ref:N,onClick:ce,children:[ue&&f.jsx("title",{id:re,children:ue}),f.jsx(E5t,{onClick:_e,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:a,nodeClassName:s,nodeStrokeWidth:l,nodeComponent:o}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${V-Y},${se-Y}h${le+Y*2}v${ae+Y*2}h${-le-Y*2}z - M${z.x},${z.y}h${z.width}v${z.height}h${-z.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}PD.displayName="MiniMap";M.memo(PD);const M5t=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,R5t={[fd.Line]:"right",[fd.Handle]:"bottom-right"};function D5t({nodeId:e,position:n,variant:t=fd.Handle,className:r,style:s=void 0,children:a,color:l,minWidth:o=10,minHeight:c=10,maxWidth:d=Number.MAX_VALUE,maxHeight:_=Number.MAX_VALUE,keepAspectRatio:h=!1,resizeDirection:m,autoScale:g=!0,shouldResize:S,onResizeStart:k,onResize:v,onResizeEnd:b}){const w=bD(),x=typeof e=="string"?e:w,C=tr(),j=M.useRef(null),N=t===fd.Handle,T=dn(M.useCallback(M5t(N&&g),[N,g]),Jn),z=M.useRef(null),D=n??R5t[t];M.useEffect(()=>{if(!(!j.current||!x))return z.current||(z.current=t4t({domNode:j.current,nodeId:x,getStoreItems:()=>{const{nodeLookup:H,transform:P,snapGrid:F,snapToGrid:W,nodeOrigin:Z,domNode:G}=C.getState();return{nodeLookup:H,transform:P,snapGrid:F,snapToGrid:W,nodeOrigin:Z,paneDomNode:G}},onChange:(H,P)=>{const{triggerNodeChanges:F,nodeLookup:W,parentLookup:Z,nodeOrigin:G}=C.getState(),X=[],J={x:H.x,y:H.y},$=W.get(x);if($&&$.expandParent&&$.parentId){const L=$.origin??G,B=H.width??$.measured.width??0,Y=H.height??$.measured.height??0,V={id:$.id,parentId:$.parentId,rect:{width:B,height:Y,...UR({x:H.x??$.position.x,y:H.y??$.position.y},{width:B,height:Y},$.parentId,W,L)}},se=Q4([V],W,Z,G);X.push(...se),J.x=H.x?Math.max(L[0]*B,H.x):void 0,J.y=H.y?Math.max(L[1]*Y,H.y):void 0}if(J.x!==void 0&&J.y!==void 0){const L={id:x,type:"position",position:{...J}};X.push(L)}if(H.width!==void 0&&H.height!==void 0){const B={id:x,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:H.width,height:H.height}};X.push(B)}for(const L of P){const B={...L,type:"position"};X.push(B)}F(X)},onEnd:({width:H,height:P})=>{const F={id:x,type:"dimensions",resizing:!1,dimensions:{width:H,height:P}};C.getState().triggerNodeChanges([F])}})),z.current.update({controlPosition:D,boundaries:{minWidth:o,minHeight:c,maxWidth:d,maxHeight:_},keepAspectRatio:h,resizeDirection:m,onResizeStart:k,onResize:v,onResizeEnd:b,shouldResize:S}),()=>{var H;(H=z.current)==null||H.destroy()}},[D,o,c,d,_,h,k,v,b,S]);const O=D.split("-");return f.jsx("div",{className:Or(["react-flow__resize-control","nodrag",...O,t,r]),ref:j,style:{...s,scale:T,...l&&{[N?"backgroundColor":"borderColor"]:l}},children:a})}M.memo(D5t);function L5t(){const[e,n]=M.useState(0),[t,r]=M.useState(0);return{ref:M.useCallback(a=>{if(!a)return;function l(){n(a.offsetWidth),r(a.offsetHeight)}const o=new ResizeObserver(l),c=new MutationObserver(l);return o.observe(a),c.observe(a,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),l(),()=>{o.disconnect(),c.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const I0=8;function O5t(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:a},l]=M.useState({viewWidth:0,viewHeight:0});M.useEffect(()=>{function _(){l({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",_),_(),()=>window.removeEventListener("resize",_)},[]);let o=0,c=0,d=0;if(e){const{distance:_}=e;switch(e.anchor){case"left":o=e.x-t-_,c=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+_,c=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,c=e.y+e.height+_;break;case"above":o=e.x+e.width/2-t/2,c=e.y-r-_;break}const h=o,m=c;o=Math.min(Math.max(o,I0),a-t-I0),c=Math.min(Math.max(c,I0),s-r-I0),d=e.anchor==="left"||e.anchor==="right"?m-c:h-o}return{x:o,y:c,arrowAdjustment:d}}const Av=380,Tv=12,I5t=350,B5t=150,vx=new EventTarget;function $5t(){vx.dispatchEvent(new Event("move"))}function H5t(e,n){const[t,r]=M.useState(null),s=M.useRef(void 0),a=M.useRef(void 0);M.useEffect(()=>{const d=()=>{window.clearTimeout(s.current),window.clearTimeout(a.current),r(null)};return vx.addEventListener("move",d),()=>{vx.removeEventListener("move",d),window.clearTimeout(s.current),window.clearTimeout(a.current)}},[]),M.useEffect(()=>{r(d=>{var h;if(!d)return d;const _=((h=e.current)==null?void 0:h.getBoundingClientRect())??null;return _&&d.x===_.x&&d.y===_.y&&d.width===_.width&&d.height===_.height?d:_})},[e,n]);const l=M.useCallback(()=>{window.clearTimeout(a.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{var d;r(((d=e.current)==null?void 0:d.getBoundingClientRect())??null)},I5t)},[e]),o=M.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(a.current),a.current=window.setTimeout(()=>r(null),B5t)},[]),c=M.useCallback(()=>window.clearTimeout(a.current),[]);return{rect:t,onMouseEnter:l,onMouseLeave:o,keepOpen:c}}function P5t(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 F5t({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:a,onOpenCode:l,onMouseEnter:o,onMouseLeave:c}){const d=L5t(),_=s.right+Tv+Av<=window.innerWidth,h=s.x-Tv-Av>=0,m=_?"right":h?"left":s.y>window.innerHeight/2?"above":"below",{x:g,y:S}=O5t({x:s.x,y:s.y,width:s.width,height:s.height,anchor:m,distance:Tv},d),[k,v]=M.useState(null),b=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null;M.useEffect(()=>{if(v(null),!b)return;let H=!1;return RQe(b).then(P=>{let F=P.diff;if(P.truncated){const X=F.lastIndexOf(` -diff --git `);F=X!==-1?F.slice(0,X+1):F.slice(0,F.lastIndexOf(` -`)+1)}let W=[];try{W=F.trim()?W2(F):[]}catch{return}if(P.truncated&&W.every(X=>X.hunks.length===0))return;let Z=0,G=0;for(const X of W){const J=R4(X);Z+=J.additions,G+=J.deletions}H||v({fileCount:W.length,additions:Z,deletions:G,truncated:P.truncated})}).catch(()=>{}),()=>{H=!0}},[b]);const w={done:0,failed:0,cancelled:0,live:0};for(const H of n)H.status==="done"?w.done+=1:H.status==="failed"?w.failed+=1:H.status==="cancelled"?w.cancelled+=1:w.live+=1;const x=t?dp((t.endedAt??Date.now())-t.createdAt):null,C=(t==null?void 0:t.status)==="failed"&&t.resultMarkdown?t.resultMarkdown:null,j=e.description||(C?null:t==null?void 0:t.resultMarkdown)||null,N=M.useRef(null),[T,z]=M.useState(!1),[D,O]=M.useState(!1);return M.useEffect(()=>{z(!1)},[j]),M.useEffect(()=>{const H=N.current;H&&O(H.scrollHeight>H.clientHeight+1)},[j,T]),Bc.createPortal(f.jsxs("div",{ref:d.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:Av,left:g,top:S,visibility:d.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(ko,{status:t?Fi(t):"idle"})]}),e.title&&f.jsx("div",{className:"hc-title",children:e.title}),f.jsxs("div",{className:"hc-actions",children:[a&&f.jsxs("button",{type:"button",...wr(a),children:[f.jsx(Zu,{size:13}),Yle()]}),f.jsxs("button",{type:"button",...wr(l),children:[f.jsx(Wp,{size:13}),Ile()]})]}),j&&f.jsx("div",{className:`hc-body${T?" expanded":""}`,ref:N,children:j}),j&&(D||T)&&f.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>z(H=>!H),children:T?NE():Jse()}),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?N0e():T0e({count:Vt(n.length)}),...w.done>0?[r0e({count:Vt(w.done)})]:[],...w.failed>0?[o0e({count:Vt(w.failed)})]:[],...w.cancelled>0?[J_e({count:Vt(w.cancelled)})]:[],...w.live>0?[v0e({count:Vt(w.live)})]:[]])}),t&&Ux(t.backend)&&f.jsx(d4,{backend:t.backend}),x&&f.jsx("span",{children:x}),t&&f.jsx("span",{children:La(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(Kp,{size:12}),e.branchName]}),r&&f.jsxs("span",{children:[Gle()," ",f.jsx("span",{children:r})]})]}),k&&k.fileCount>0&&f.jsx("div",{className:"hc-git-row",title:k.truncated?oI({parent:we(r??"parent")}):rI({parent:we(r??"parent")}),children:f.jsxs("span",{children:[k.truncated&&"≥ ",f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",k.additions]})," ",f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",k.deletions]})," · ",k.fileCount===1&&!k.truncated?S0e():k.truncated?p0e({count:Vt(k.fileCount)}):d0e({count:Vt(k.fileCount)})]})})]}),f.jsxs("div",{className:"hc-foot",children:[f.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),f.jsxs("span",{children:[Ple()," ",P5t(e.createdAt)]})]})]}),document.body)}const nE=["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(" "),U5t=264,rE=132,ep=44,q5t=72,G5t=148,V5t=44;function W5t(e){const n=new Map(e.map(a=>[a.id,{exp:a,children:[]}])),t=[];for(const a of e){const l=n.get(a.id),o=a.parentExperimentId?n.get(a.parentExperimentId):void 0;o?o.children.push(l):t.push(l)}const r=(a,l)=>a.exp.createdAt-l.exp.createdAt,s=a=>{a.children.sort(r),a.children.forEach(s)};return t.sort(r),t.forEach(s),t}function K5t(e,n){const t=new Map,r=o=>{const c=t.get(o)??1+o.children.reduce((d,_)=>d+r(_),0);return t.set(o,c),c},s=new Map,a=o=>{const c=s.get(o)??(n(o)||o.children.some(a));return s.set(o,c),c};function l(o){if(n(o)){const _=[];let h=0;for(const m of o.children)a(m)?_.push(...l(m)):h+=r(m);return h>0&&_.push({kind:"elided",id:`el-${o.exp.id}`,count:h,children:[]}),[{kind:"exp",exp:o.exp,children:_}]}if(!a(o))return[];let c=0;const d=[];return(function _(h){c+=1;for(const m of h.children)n(m)?d.push(...l(m)):a(m)?_(m):c+=r(m)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:c,children:d}]}return e.flatMap(l)}function xx(e){return e.kind==="exp"?U5t:G5t}function B0(e){return e.kind==="exp"?e.exp.id:e.id}function tp(e){if(e.children.length===0)return xx(e);const n=e.children.reduce((t,r)=>t+tp(r),0)+ep*(e.children.length-1);return Math.max(xx(e),n)}function Y5t(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const X5t=M.memo(function({data:n}){Oc();const{exp:t,latestRun:r,runs:s,isBaseline:a,parentSlug:l,githubOwner:o,githubRepo:c,onOpenView:d,onOpenCode:_}=n,h=r?Fi(r):void 0,m=h==="running"||h==="starting"||h==="cancelling",g=a?UWe():m?sKe():vo(),S=s.slice(-8),k=M.useRef(null),v=H5t(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] ${m?"live":""}`,onMouseEnter:v.onMouseEnter,onMouseLeave:v.onMouseLeave,children:[f.jsx(Ml,{type:"target",position:vt.Top}),f.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...wr(b=>d(t.id,"overview",b)),children:[f.jsxs("div",{className:"node-eyebrow",children:[f.jsx("span",{children:g}),f.jsx(ko,{status:h??"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:UKe()}),S.length>0?f.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:S.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 ${Y5t(Fi(b))}`,title:dT(Fi(b))},b.id))}):f.jsx("span",{children:TKe()}),f.jsx("span",{className:"flex-1"}),r&&f.jsx("span",{children:La(r.createdAt)})]})]}),f.jsxs("div",{className:"node-actions",onClick:b=>b.stopPropagation(),children:[s.length>0&&f.jsxs("button",{className:"node-action",title:LKe(),...wr(b=>d(t.id,"terminal",b)),children:[f.jsx(Zu,{size:13}),pN()]}),f.jsxs("button",{className:"node-action",title:gE({branch:we(t.branchName)}),...wr(b=>_(t.id,t.branchName,"files",b)),children:[f.jsx(Wp,{size:13}),mKe()]}),o&&c&&f.jsx("a",{className:"node-action node-action-ext",title:sp({name:we(t.branchName)}),"aria-label":sp({name:we(t.branchName)}),href:Xp(o,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:b=>b.stopPropagation(),children:f.jsx(ym,{size:13})})]}),f.jsx(Ml,{type:"source",position:vt.Bottom}),v.rect&&f.jsx(F5t,{exp:t,runs:s,latestRun:r,parentSlug:l,anchor:v.rect,onOpenLogs:s.length>0?b=>d(t.id,"terminal",b):void 0,onOpenCode:b=>_(t.id,t.branchName,"files",b),onMouseEnter:v.keepOpen,onMouseLeave:v.onMouseLeave})]})}),Z5t=M.memo(function({data:n}){Oc();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:WKe(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[f.jsx(Ml,{type:"target",position:vt.Top}),f.jsx(Dx,{size:14}),f.jsxs("span",{className:"elided-node-label",children:[t===1?eKe():XWe({count:Vt(t)}),f.jsx("span",{className:"elided-node-sub",children:$Ke()})]}),f.jsx(Ml,{type:"source",position:vt.Bottom})]})}),Q5t={exp:X5t,elided:Z5t},FD={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},J5t={...FD.style,strokeDasharray:"4 4"};function e3t({experiments:e,runs:n,project:t,onOpenView:r,onOpenCode:s,agentSessionId:a,onShowProjectScope:l}){const{nodes:o,edges:c}=M.useMemo(()=>{const d=new Map;for(const b of n){const w=d.get(b.experimentId);w?w.push(b):d.set(b.experimentId,[b])}for(const b of d.values())b.sort((w,x)=>w.createdAt-x.createdAt);const _=[],h=[],m=b=>!a||b.exp.chatSessionId===a,g=K5t(W5t(e),m),S=new Map(e.map(b=>[b.id,b.slug]));function k(b,w,x){const C=w-xx(b)/2;if(b.kind==="exp"){const T=d.get(b.exp.id)??[];_.push({id:b.exp.id,type:"exp",position:{x:C,y:x},data:{exp:b.exp,latestRun:T[T.length-1]??null,runs:T,isBaseline:!b.exp.parentExperimentId,parentSlug:b.exp.parentExperimentId?S.get(b.exp.parentExperimentId)??null:null,githubOwner:t.githubEnabled?t.githubOwner:"",githubRepo:t.githubEnabled?t.githubRepo:"",onOpenView:r,onOpenCode:s}})}else _.push({id:b.id,type:"elided",position:{x:C,y:x+(rE-V5t)/2},data:{count:b.count,onShowProjectScope:l}});if(b.children.length===0)return;const j=b.children.reduce((T,z)=>T+tp(z),0)+ep*(b.children.length-1);let N=w-j/2;for(const T of b.children){const z=tp(T),D=b.kind==="elided"||T.kind==="elided";h.push({id:`e-${B0(b)}-${B0(T)}`,source:B0(b),target:B0(T),...D?{style:J5t}:{}}),k(T,N+z/2,x+rE+q5t),N+=z+ep}}let v=0;for(const b of g){const w=tp(b);k(b,v+w/2,0),v+=w+ep}return{nodes:_,edges:h}},[e,n,r,s,t.githubOwner,t.githubRepo,t.githubEnabled,a,l]);return e.length===0?f.jsxs("div",{className:nE,children:[f.jsx("p",{className:"empty-state-title",children:NKe()}),f.jsx("p",{className:"empty-state-hint",children:fKe()})]}):o.length===0&&a?f.jsxs("div",{className:nE,children:[f.jsx("p",{className:"empty-state-title",children:SKe()}),f.jsx("p",{className:"empty-state-hint",children:lKe()})]}):f.jsx(l5t,{className:"[&_.react-flow\\_\\_node.react-flow\\_\\_node-exp.selectable]:cursor-default [&_.react-flow\\_\\_node.react-flow\\_\\_node-elided.selectable]:cursor-pointer [&_.react-flow\\_\\_handle]:opacity-0 [&_.react-flow\\_\\_handle]:pointer-events-none [&_.react-flow\\_\\_attribution]:hidden!",nodes:o,edges:c,nodeTypes:Q5t,defaultEdgeOptions:FD,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:$5t,minZoom:.15,fitView:!0,fitViewOptions:{padding:.25,maxZoom:1},children:f.jsx(h5t,{variant:Co.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},a??"project")}const sE=["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(" "),Mv=(e,n)=>e.id===n.id&&e.view===n.view,Nu=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,tw=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,kf=(e,n,t)=>`${e}:${n??""}:${tw(t)}`,UD=e=>({...e,lineScrollRequest:void 0});function Cf(e){return typeof e=="object"&&"path"in e?UD(e):e}const zu=(e,n)=>e.branch===n.branch;function Yt(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:${tw(e)}`:`experiment:${e.id}:${e.view}`}function Ef(e,n){const t=e.filter(r=>Yt(r)!==n);return t.length===e.length?e:t}function t3t(e){return e!==void 0}function iE(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1};if(e===Rf&&n){const r={path:$v,source:"artifacts"},s="experiments";return{...t,rightTab:s,tabHistory:[r,s],experimentsTabOpen:!0,fileTabs:[r],contentTabOrder:[Yt(r)],panelOpen:!0}}if(e===ON){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(Yt),panelOpen:!0}}if(e===IN){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Yt),panelOpen:!0}}return t}function n3t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function r3t(e,n,t,r,s){let a=e,l;const o=n==null?void 0:n.replace(/\/+$/,""),c=r==null?void 0:r.replace(/\/+$/,"");if(a.startsWith("artifacts/"))return a=a.slice(10),a?{path:a,source:"artifacts"}:null;if(a==="~"||a.startsWith("~/"))return{path:a,source:"abs"};const d=m=>{const g=v=>v.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[S,k]=[g(a),g(m)];return S===k?"":S.startsWith(`${k}/`)?S.slice(k.length).replace(/^\/+/,""):null},_=a.startsWith("/")&&c?d(c):null,h=a.startsWith("/")&&o?d(o):null;if(!a.startsWith("/"))l=t;else{if(_!==null)return _?{path:_,source:"artifacts"}:null;if(h!==null)a=h;else{const m=s?n3t(s):"[^/]+",g=a.match(new RegExp(`/files/${m}/(.+)$`)),S=g?null:a.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),k=g||S?null:a.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(g)return{path:g[1],source:"artifacts"};S?(l=S[1],a=S[2]):k&&(a=k[1])}}return a?a.startsWith("/")?{path:a,source:"abs"}:{path:a,sessionId:l}:null}function s3t(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const yx="orx:panel-width",qD="orx:experiments-view";function i3t(){try{return localStorage.getItem(qD)==="tree"?"tree":"table"}catch{return"table"}}const bh=360,a3t=10,o3t=272,l3t=380,c3t=o3t+56,u3t=80,d3t=48;function np(){return Math.max(bh,window.innerWidth-c3t-l3t)}function f3t(){const e=np();try{const n=Number(localStorage.getItem(yx));if(Number.isFinite(n)&&n>=bh)return Math.min(n,e)}catch{}return Math.max(bh,Math.min(760,e,Math.round(window.innerWidth*.42)))}function Nf(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 aE(e){const n=M.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}function oE({runtime:e}){var Es;const n=Oc(),{status:t}=lT(e.kind==="local"),[r,s]=M.useState(null),[a,l]=M.useState(null),o=M.useRef(void 0);o.current=a==null?void 0:a.tourCompleted;const c=M.useRef(!1),[d,_]=M.useState(null),h=M.useRef(null),[m,g]=M.useState(null),[S,k]=M.useState([]),[v,b]=M.useState([]),w=M.useRef(v);w.current=v;const x=M.useRef(new Map),C=M.useRef(new Set),j=M.useRef(null),N=M.useRef(!1),T=M.useRef(new Map),z=M.useRef(new Map),D=M.useRef(0),O=M.useRef(S);O.current=S;const[H,P]=M.useState(null),[F,W]=M.useState(i3t),[Z,G]=M.useState("project"),X=M.useRef(null),{open:J,setOpen:$,ref:L}=Va(X),[B,Y]=M.useState(null),[V,se]=M.useState(!1),le=S.every(ie=>ie.chatSessionId),ae=B&&le?Z:"project",re=M.useMemo(()=>ae!=="agent"?S:S.filter(ie=>ie.chatSessionId===B),[S,ae,B]),q=M.useMemo(()=>{if(ae!=="agent")return v;const ie=new Set(re.map(ve=>ve.id));return v.filter(ve=>ie.has(ve.experimentId))},[v,re,ae]);M.useEffect(()=>{try{localStorage.setItem(qD,F)}catch{}},[F]);const[oe,ce]=M.useState(null),[_e,ue]=M.useState("experiments"),[Ne,ze]=M.useState([]),[Ie,Pe]=M.useState(!1),[$e,It]=M.useState(!1),[yt,qe]=M.useState(!1),[jt,pt]=M.useState([]),[ot,tt]=M.useState([]),Ft=M.useRef(new Map),ke=M.useRef(0),[Re,Xe]=M.useState([]),[nt,st]=M.useState([]),[St,mt]=M.useState([]),[Wt,fn]=M.useState([]),[hn,At]=M.useState(null),[jn,nn]=M.useState("files"),[nr,lr]=M.useState(new Set),[bn,Je]=M.useState(!1),[ht,An]=M.useState(!1),[rr,Ge]=M.useState(f3t),[Bt,He]=M.useState(!0),[it,_n]=M.useState(!1),[qt,Nt]=M.useState(!1),[pn,ls]=M.useState("chat"),[Tn,Os]=M.useState(null),la=M.useRef(new Map),Zr=M.useRef(iE()),Sn=M.useRef(null),Mn=M.useRef(!1),kn=M.useRef(Ne);kn.current=Ne;const xs=M.useRef(Wt);xs.current=Wt;const cr=M.useRef(null),Qr=M.useCallback(ie=>{const ve=[...ie];xs.current=ve,fn(ve)},[]),Ir=M.useCallback(ie=>{cr.current=ie,At(ie)},[]),Si=M.useCallback(ie=>{const ve=Yt(ie);pt(Oe=>Ef(Oe,ve)),tt(Oe=>Ef(Oe,ve)),Xe(Oe=>Ef(Oe,ve)),st(Oe=>Ef(Oe,ve)),mt(Oe=>Ef(Oe,ve));const Ce=Js.current;Ce&&"path"in ie&&Ft.current.delete(kf(Ce,Sn.current,ie));const De=kn.current.filter(Oe=>Yt(Oe)!==ve);kn.current=De,ze(De)},[]),Wn=M.useCallback(ie=>{Mn.current=!1;const ve=Yt(ie),Ce=[...kn.current.filter(De=>Yt(De)!==ve),Cf(ie)];kn.current=Ce,ze(Ce),ue(ie)},[]),pr=M.useCallback((ie,ve)=>{Mn.current=!1;const Ce=Yt(ie),De=cr.current,Oe=Rft({order:xs.current,previewKey:De?Yt(De):null},Ce,ve);Oe.replacedKey&&De&&typeof De!="string"&&Yt(De)===Oe.replacedKey&&Si(De),Qr(Oe.order),Oe.previewKey===null?Ir(null):Oe.previewKey===Ce&&Ir(Cf(ie));const gt=[...kn.current.filter(ft=>Yt(ft)!==Ce),Cf(ie)];kn.current=gt,ze(gt),ue(ie)},[Si,Qr,Ir]),Tt=M.useCallback(ie=>{const ve=cr.current;ve&&Yt(ve)===Yt(ie)&&Ir(null)},[Ir]);M.useEffect(()=>{let ie=!1;const ve=De=>{const Oe=cr.current,gt=De.target;if(gt instanceof Element&>.closest("input, textarea, [contenteditable='true']")!==null){ie=!1;return}if(Oe&&Yt(Oe)===Yt(Zr.current.rightTab)&&(De.metaKey||De.ctrlKey)&&!De.altKey&&!De.shiftKey&&De.key.toLowerCase()==="k"){De.preventDefault(),ie=!0;return}if(ie&&De.key==="Enter"){De.preventDefault(),ie=!1;const $t=cr.current;$t&&Tt($t);return}ie=!1},Ce=()=>{ie=!1};return window.addEventListener("keydown",ve),window.addEventListener("blur",Ce),window.addEventListener("pointerdown",Ce),()=>{window.removeEventListener("keydown",ve),window.removeEventListener("blur",Ce),window.removeEventListener("pointerdown",Ce)}},[Tt]);const Kn=M.useCallback((ie,ve)=>{Mn.current=!1;const Ce=Yt(ie),De=cr.current;De&&Yt(De)===Ce&&Ir(null);const Oe=Dft({order:xs.current,previewKey:De?Yt(De):null},Ce,kn.current.map(Yt));Qr(Oe.order);const gt=kn.current.filter($t=>Yt($t)!==Ce);if(kn.current=gt,ze(gt),!ve)return;const ft=Oe.fallbackKey?gt.find($t=>Yt($t)===Oe.fallbackKey):void 0;ft?ue(ft):(Je(!1),An(!1))},[Qr,Ir]),Un=M.useCallback(ie=>{ie!=="chat"&&(Mn.current=!1),ls(ie)},[]);Zr.current={rightTab:Cf(_e),tabHistory:Ne,experimentsTabOpen:Ie,filesTabOpen:$e,artifactsTabOpen:yt,expTabs:jt,fileTabs:ot,planTabs:Re,subagentTabs:nt,codeTabs:St,contentTabOrder:xs.current,previewTab:cr.current,filesView:jn,filesToggled:nr,selectedRunId:oe,scope:Z,panelOpen:bn,panelMax:ht};const Ze=M.useCallback(ie=>{const ve=Sn.current;if(ve===ie)return;ve&&la.current.set(ve,Zr.current);let Ce=ie?la.current.get(ie):void 0;if(!Ce){const De=ie===Rf&&o.current===!1&&!c.current;De&&(c.current=!0,se(!0)),Ce=iE(ie??void 0,De)}if(ie&&Mn.current){Mn.current=!1;const De="experiments";Ce={...Ce,rightTab:De,tabHistory:[...Ce.tabHistory.filter(Oe=>Yt(Oe)!==Yt(De)),De],experimentsTabOpen:!0,panelOpen:!0}}ue(Ce.rightTab),kn.current=Ce.tabHistory,ze(Ce.tabHistory),Pe(Ce.experimentsTabOpen),It(Ce.filesTabOpen),qe(Ce.artifactsTabOpen),pt(Ce.expTabs),tt(Ce.fileTabs),Xe(Ce.planTabs),st(Ce.subagentTabs),mt(Ce.codeTabs),Qr(Ce.contentTabOrder),Ir(Ce.previewTab),nn(Ce.filesView),lr(Ce.filesToggled),ce(Ce.selectedRunId),G(Ce.scope),Je(Ce.panelOpen),An(Ce.panelMax),Sn.current=ie,Y(ie)},[Qr,Ir]),Rt=(a==null?void 0:a.onboardingCompleted)??!1,[ki,cs]=M.useState(!1),us=M.useCallback(()=>cs(!0),[]),Jr=M.useCallback(async()=>{const ie=await iS({tourCompleted:!0});l(ve=>ve&&{...ve,tourCompleted:ie.tourCompleted}),cs(!1)},[]),Ci=M.useCallback(async()=>{await Jr(),Nt(!0)},[Jr]);M.useEffect(()=>{!m||!r0(m)||it||!Rt||a!=null&&a.tourCompleted||us()},[m,it,Rt,us,a==null?void 0:a.tourCompleted]);const Xt=(r==null?void 0:r.find(ie=>ie.id===m))??null;M.useEffect(()=>{const ie=it||d||a===null?null:Xt==null?void 0:Xt.name;document.title=ie?`${Ra(ie)} — OpenResearch`:"OpenResearch"},[it,d,a,Xt]);const Js=M.useRef(m);Js.current=m;const Gr=M.useCallback(()=>{ls("chat"),Pe(!0),Wn("experiments"),Je(!0),Sn.current||(Mn.current=!0)},[Wn]),ei=M.useCallback(()=>{_(null),s(null),l(null),Promise.allSettled([bQe(),xQe()]).then(([ie,ve])=>{const Ce=[];ie.status==="fulfilled"?(s(ie.value),g(De=>{var Oe;return De&&ie.value.some(gt=>gt.id===De)?De:((Oe=ie.value[0])==null?void 0:Oe.id)??null})):Ce.push(Yq()),ve.status==="fulfilled"?(h.current=ve.value.preferredAgent,l(ve.value)):Ce.push(cG()),Ce.length>0&&_(hG({items:new Intl.ListFormat(E()).format(Ce)}))})},[]);M.useEffect(()=>{ei()},[ei]);const Vr=M.useRef(Promise.resolve()),ur=M.useRef(0),Zt=M.useCallback(ie=>{const ve=++ur.current;l(De=>De&&{...De,preferredAgent:ie});const Ce=Vr.current.then(()=>iS({preferredAgent:ie})).then(De=>{h.current=De.preferredAgent,ve===ur.current&&l(Oe=>Oe&&{...Oe,preferredAgent:De.preferredAgent})}).catch(De=>{throw ve===ur.current&&l(Oe=>Oe&&{...Oe,preferredAgent:h.current}),De});return Vr.current=Ce.catch(()=>{}),Ce},[]);M.useEffect(()=>{const ie=()=>Ge(ve=>Math.min(ve,np()));return window.addEventListener("resize",ie),()=>window.removeEventListener("resize",ie)},[]);const ca=M.useCallback(ie=>{N.current=!1,T.current.clear(),z.current.clear();const ve=++D.current;Px(ie).then(Ce=>{if(Js.current!==ie||j.current!==ie||D.current!==ve)return;T.current=new Map(Ce.map(Oe=>[Oe.id,Oe]));const De=[...z.current.values()].some(Oe=>{const gt=T.current.get(Oe.id);return!gt||gt.status!=="running"&>.updatedAt<=Oe.updatedAt});z.current.clear();for(const Oe of Ce){const gt=x.current.get(Oe.id);(!gt||gt.updatedAt{const gt=new Map(Ce.map(ft=>[ft.id,ft]));for(const ft of Oe){const $t=gt.get(ft.id);(!$t||$t.updatedAt<=ft.updatedAt)&>.set(ft.id,ft)}return[...gt.values()]}),N.current=!0,De&&Gr()}).catch(()=>{D.current===ve&&z.current.clear()})},[Gr]);M.useEffect(()=>{if(!m)return;const ie=Sn.current;ie&&la.current.set(ie,Zr.current),Sn.current=null,Mn.current=!1,Y(null),j.current=m,x.current.clear(),C.current.clear(),jQe(m).catch(()=>{}),k([]),b([]),P(null),ce(null),pt([]),tt([]),se(!1),Xe([]),st([]),mt([]),Qr([]),Ir(null),nn("files"),lr(new Set),kn.current=[],ze([]),ue("experiments"),Pe(!1),It(!1),qe(!1),Je(!1),An(!1),G("project"),TQe(m).then(k).catch(()=>{}),ca(m),lS(m).then(P).catch(()=>{})},[ca,m,Qr,Ir]);const Is=M.useCallback(()=>{const ie=Js.current;ie&&lS(ie).then(P).catch(()=>{})},[]),kr=M.useCallback(()=>{Is(),ls("chat"),qe(!0),Wn("artifacts"),Je(!0)},[Is,Wn]);Tet({onReconnect:()=>{const ie=Js.current;ie&&(j.current=ie,x.current.clear(),C.current.clear(),ca(ie))},onRun:ie=>{if(ie.projectId!==Js.current||ie.projectId!==j.current)return;const ve=x.current.get(ie.id),Ce=C.current.has(ie.id);if(ve&&ve.updatedAt>ie.updatedAt||(x.current.set(ie.id,ie),C.current.add(ie.id),b(gt=>Nf(gt,ie)),ie.status!=="running"||(ve==null?void 0:ve.status)==="running"))return;const De=T.current.get(ie.id),Oe=N.current&&(!De||De.status!=="running"&&De.updatedAt<=ie.updatedAt);Ce&&ve||Oe?Gr():N.current||z.current.set(ie.id,ie)},onExperiment:ie=>{ie.projectId===Js.current&&k(ve=>Nf(ve,ie))},onProject:ie=>{s(ve=>ve?Nf(ve,ie):[ie])},onArtifacts:ie=>{ie===Js.current&&Is()}});const Bs=M.useCallback(()=>G("project"),[]),ys=M.useCallback((ie,ve="overview",Ce="preview")=>{const De={id:ie,view:ve};pt(Oe=>Oe.some(gt=>Mv(gt,De))?Oe:[...Oe,De]),pr(De,Ce),Je(!0)},[pr]),mr=M.useCallback((ie,ve="preview")=>{const Ce=w.current.filter(Oe=>Oe.id===ie||Oe.id.startsWith(ie)),De=Ce.length===1?Ce[0]:null;De&&(ce(De.id),ys(De.experimentId,"terminal",ve))},[ys]),Gi=M.useMemo(()=>new Map(S.map(ie=>{var ve;return[ie.id,((ve=ie.title)==null?void 0:ve.trim())||ie.slug||vo()]})),[S,n]),$s=aE(Gi),Ka=M.useMemo(()=>{const ie=new Map;for(const ve of v)ie.set(ve.id,$s.get(ve.experimentId)??vo());return ie},[$s,v,n]),ws=aE(Ka),Ss=M.useCallback(ie=>{const ve=ws.get(ie);if(ve)return ve;const Ce=[...ws].filter(([De])=>De.startsWith(ie));return Ce.length===1?Ce[0][1]:""},[ws]),Ei=M.useCallback(ie=>{const ve=$s.get(ie);if(ve)return ve;const Ce=[...$s].filter(([De])=>De.startsWith(ie));return Ce.length===1?Ce[0][1]:""},[$s]),ti=M.useCallback((ie,ve="preview")=>{const Ce=O.current.filter(De=>De.id===ie||De.id.startsWith(ie));Ce.length===1&&ys(Ce[0].id,"overview",ve)},[ys]),$l=M.useCallback(ie=>{const ve=jt.findIndex(Ce=>Mv(Ce,ie));ve!==-1&&(pt(Ce=>Ce.filter((De,Oe)=>Oe!==ve)),Kn(ie,Yt(_e)===Yt(ie)))},[jt,Kn,_e]),sr=M.useCallback((ie,ve="preview")=>{const Ce=UD(ie);tt(De=>{const Oe=De.findIndex(ft=>Nu(ft,ie));if(Oe===-1)return[...De,Ce];const gt=De.slice();return gt[Oe]=Ce,gt}),pr(ie,ve),Je(!0)},[pr]),In=M.useCallback((ie,ve,Ce,De,Oe,gt)=>{const ft=r==null?void 0:r.find(fs=>fs.id===m),$t=r3t(ie,ft==null?void 0:ft.repoPath,ve,(ft==null?void 0:ft.artifactsDir)??(ft==null?void 0:ft.filesDir),ft==null?void 0:ft.slug);if(!$t)return null;const Rn=Oe?O.current.find(fs=>fs.id===Oe||Oe.length>=6&&fs.id.startsWith(Oe)):void 0,Kr=Ce??(Rn==null?void 0:Rn.branchName),Ns=$t.source==null||$t.source==="repo";return Kr&&Ns&&($t.ref=Kr),gt&&!$t.ref&&Ns&&($t.branchLabel=gt),De!=null&&($t.line=De,$t.lineScrollRequest=++ke.current),$t},[r,m]),ua=M.useCallback((ie,ve,Ce,De,Oe,gt,ft="preview")=>{const $t=In(ie,ve,Ce,De,Oe,gt);$t&&sr($t,ft)},[sr,In]),Sd=M.useCallback(ie=>sr({path:ie,source:"artifacts"},"keepOpen"),[sr]),Vc=M.useCallback((ie,ve,Ce,De,Oe,gt="preview")=>{const ft=In(ie,ve,Oe,Ce,De);ft&&sr(ft,gt)},[sr,In]),ir=M.useCallback((ie,ve)=>{Tt(ie),ve()},[Tt]),Hs=M.useCallback(ie=>{const ve=ot.findIndex(Ce=>Nu(Ce,ie));ve!==-1&&(tt(Ce=>Ce.filter((De,Oe)=>Oe!==ve)),m&&Ft.current.delete(kf(m,B,ie)),B===Rf&&Nu(ie,{path:$v,source:"artifacts"})&&se(!1),Kn(ie,Yt(_e)===Yt(ie)))},[B,ot,Kn,m,_e]),Hl=M.useCallback(ie=>{ie.lineScrollRequest!==void 0&&ue(ve=>typeof ve!="object"||!("path"in ve)||!Nu(ve,ie)||ve.lineScrollRequest!==ie.lineScrollRequest?ve:Cf(ve))},[]),da=M.useCallback((ie,ve,Ce,De="preview")=>{const Oe={kind:"plan",sessionId:ve,promptId:Ce,plan:ie};Xe(gt=>{const ft=gt.findIndex(Rn=>Rn.promptId===Ce);if(ft===-1)return[...gt,Oe];const $t=gt.slice();return $t[ft]=Oe,$t}),pr(Oe,De),Je(!0)},[pr]),fa=M.useCallback(ie=>{const ve=Re.findIndex(Ce=>Ce.promptId===ie.promptId);ve!==-1&&(Xe(Ce=>Ce.filter((De,Oe)=>Oe!==ve)),Kn(ie,Yt(_e)===Yt(ie)))},[Kn,Re,_e]),Ni=M.useCallback((ie,ve,Ce,De="preview")=>{const Oe={kind:"subagent",sessionId:ie,spawnPartId:ve,label:Ce};st(gt=>gt.some(ft=>ft.spawnPartId===ve)?gt:[...gt,Oe]),pr(Oe,De),Je(!0)},[pr]),Pl=M.useCallback(ie=>{const ve=nt.findIndex(Ce=>Ce.spawnPartId===ie.spawnPartId);ve!==-1&&(st(Ce=>Ce.filter((De,Oe)=>Oe!==ve)),Kn(ie,Yt(_e)===Yt(ie)))},[Kn,_e,nt]),[Ya,Xa]=M.useState({});M.useEffect(()=>{if(Xa(ft=>{const $t=new Set(nt.map(Rn=>Rn.spawnPartId));return Object.keys(ft).every(Rn=>$t.has(Rn))?ft:Object.fromEntries(Object.entries(ft).filter(([Rn])=>$t.has(Rn)))}),nt.length===0)return;let ie=!0;const ve=new Set,Ce=(ft,$t,Rn)=>{Xa(Kr=>{var fs;let Ns=Kr;for(const ji of $t)if(!(Rn&&ve.has(ji.spawnPartId)))for(const Bo of ft){const pa=y4(Bo.parts,ji.spawnPartId);if(!pa)continue;Rn||ve.add(ji.spawnPartId);const Vi={label:R0t(pa),running:((fs=pa.state)==null?void 0:fs.status)==="running"},$o=Ns[ji.spawnPartId];(!$o||$o.label!==Vi.label||$o.running!==Vi.running)&&(Ns===Kr&&(Ns={...Kr}),Ns[ji.spawnPartId]=Vi);break}return Ns})};let De=0;const Oe=()=>{const ft=++De;for(const $t of new Set(nt.map(Rn=>Rn.sessionId)))Lu($t).then(({messages:Rn})=>{ie&&ft===De&&Ce(Rn,nt.filter(Kr=>Kr.sessionId===$t),!0)}).catch(()=>{})};Oe();const gt=Vf(ft=>{if(ft.type==="reconnected"){ve.clear(),Oe();return}if(ft.type!=="message")return;const $t=nt.filter(Rn=>Rn.sessionId===ft.sessionId);$t.length&&Ce([ft.message],$t,!1)});return()=>{ie=!1,gt()}},[nt]);const Bn=M.useCallback((ie,ve,Ce="files",De="preview")=>{const Oe={code:!0,experimentId:ie,branch:ve,view:Ce,toggled:new Set};mt(gt=>gt.some(ft=>zu(ft,Oe))?gt.map(ft=>zu(ft,Oe)?{...ft,experimentId:ie,view:Ce}:ft):[...gt,Oe]),pr(Oe,De),Je(!0)},[pr]),ks=M.useCallback((ie,ve)=>{mt(Ce=>Ce.map(De=>zu(De,ie)?{...De,...ve}:De))},[]),Br=M.useCallback(ie=>{const ve=St.findIndex(Ce=>zu(Ce,ie));ve!==-1&&(mt(Ce=>Ce.filter((De,Oe)=>Oe!==ve)),Kn(ie,Yt(_e)===Yt(ie)))},[St,Kn,_e]),es=M.useCallback(()=>{ls("chat"),It(!0),Wn("files"),Je(!0)},[Wn]),gr=M.useCallback(ie=>{ie==="experiments"?Pe(!1):ie==="files"?It(!1):qe(!1),Kn(ie,_e===ie)},[Kn,_e]),Lo=ie=>{ie.preventDefault(),ie.currentTarget.setPointerCapture(ie.pointerId);const Ce=document.body.style.userSelect;document.body.style.userSelect="none";const De=ht,Oe=ie.clientX,gt=rr;let ft=!1;function $t(){window.removeEventListener("pointermove",Rn),window.removeEventListener("pointerup",$t),window.removeEventListener("pointercancel",$t),document.body.style.userSelect=Ce}function Rn(Kr){if(De){const Bo=Kr.clientX-Oe;if(ft||Bofs+u3t){An(!0);return}An(!1);const ji=Math.min(Math.max(Ns,bh),fs);Ge(ji);try{localStorage.setItem(yx,String(ji))}catch{}}window.addEventListener("pointermove",Rn),window.addEventListener("pointerup",$t),window.addEventListener("pointercancel",$t)},ts=(ie,ve)=>{s(Ce=>Ce?Nf(Ce,ie):[ie]),g(ie.id),_n(!1),ve&&(Os({projectId:ie.id,message:ve}),Un("git"))},Oo=ie=>{s(ve=>ve&&ve.filter(Ce=>Ce.id!==ie)),m===ie&&g(null)},Wr=typeof _e=="object"&&"id"in _e?_e:null,Yn=typeof _e=="object"&&"path"in _e?_e:null,ha=B===Rf&&V?ot.find(ie=>Nu(ie,{path:$v,source:"artifacts"})):void 0,br=ha?[ha]:[],ds=typeof _e=="object"&&"kind"in _e&&_e.kind==="plan"?_e:null,$r=typeof _e=="object"&&"kind"in _e&&_e.kind==="subagent"?_e:null,Ps=typeof _e=="object"&&"code"in _e?_e:null,dr=Ps?St.find(ie=>zu(ie,Ps))??null:null,Za=new Map;for(const ie of[...jt,...ot,...Re,...nt,...St])Za.set(Yt(ie),ie);const ni=ha?Yt(ha):null,_a=Wt.filter(ie=>ie!==ni).map(ie=>Za.get(ie)).filter(t3t),Cs=ie=>hn!==null&&Yt(hn)===Yt(ie),Io=ie=>f.jsx(bl,{active:Yn!==null&&Nu(Yn,ie),label:ie.path.split("/").pop()||ie.path,icon:f.jsx(CN,{size:12,className:"shrink-0"}),preview:Cs(ie),onSelect:()=>Wn(ie),onPromote:()=>Tt(ie),onClose:()=>Hs(ie)},`file:${tw(ie)}`),zi=Wr?S.find(ie=>ie.id===Wr.id)??null:null,Fl=dr?S.find(ie=>ie.id===dr.experimentId)??null:null,kd=ie=>{var Ce,De;if("path"in ie)return Io(ie);if("id"in ie){const Oe=S.find(gt=>gt.id===ie.id);return f.jsx(bl,{active:Wr!==null&&Mv(Wr,ie),label:Oe?Oe.title||Oe.slug:"…",icon:ie.view==="overview"?f.jsx(DXe,{size:12,className:"shrink-0"}):f.jsx(Zu,{size:12,className:"shrink-0"}),preview:Cs(ie),onSelect:()=>Wn(ie),onPromote:()=>Tt(ie),onClose:()=>$l(ie)},Yt(ie))}if("kind"in ie&&ie.kind==="plan")return f.jsx(bl,{active:ds!==null&&ds.promptId===ie.promptId,label:SE(),icon:f.jsx($x,{size:12,className:"shrink-0"}),preview:Cs(ie),onSelect:()=>Wn(ie),onPromote:()=>Tt(ie),onClose:()=>fa(ie)},Yt(ie));if("kind"in ie)return f.jsx(bl,{active:$r!==null&&$r.spawnPartId===ie.spawnPartId,label:((Ce=Ya[ie.spawnPartId])==null?void 0:Ce.label)??ie.label??gG(),shimmer:((De=Ya[ie.spawnPartId])==null?void 0:De.running)??!1,icon:f.jsx(Hx,{size:12,className:"shrink-0"}),preview:Cs(ie),onSelect:()=>Wn(ie),onPromote:()=>Tt(ie),onClose:()=>Pl(ie)},Yt(ie));const ve=S.find(Oe=>Oe.id===ie.experimentId);return f.jsx(bl,{active:dr!==null&&zu(dr,ie),label:(ve==null?void 0:ve.slug)??ie.branch,icon:f.jsx(Gf,{size:12,className:"shrink-0"}),preview:Cs(ie),onSelect:()=>Wn(ie),onPromote:()=>Tt(ie),onClose:()=>Br(ie)},Yt(ie))};if(d)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsxs("div",{className:sE,children:[f.jsx("p",{children:d}),f.jsx(Ue,{variant:"primary",onClick:ei,children:zc()})]}),e.kind==="ssh"&&f.jsx(Af,{runtime:e,corner:!0})]});if(r===null||a===null)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsx("div",{className:sE,children:f.jsx(Mt,{})}),e.kind==="ssh"&&f.jsx(Af,{runtime:e,corner:!0})]});if(r.length===0)return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsx(FC,{}),Rt?f.jsx(KC,{remote:e.kind==="ssh",projects:r,onOpen:g,onCreated:ts,onDeleted:Oo}):f.jsx(hbt,{preferredAgent:a.preferredAgent,onDone:(ie,ve)=>{j_t(),h.current=ve,s([ie]),g(ie.id),l(Ce=>({...Ce??{tourCompleted:!1},onboardingCompleted:!0,preferredAgent:ve}))}}),e.kind==="ssh"&&f.jsx(Af,{runtime:e,corner:!0})]});const Qa=f.jsx(dbt,{projectName:((Es=r.find(ie=>ie.id===m))==null?void 0:Es.name)??"",onHome:()=>_n(!0),onNewProject:()=>Nt(!0),onRepository:()=>Un("git"),onCollapse:()=>He(!1)});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsx(FC,{}),e.kind==="local"&&f.jsx(Gft,{status:t}),it?f.jsxs(f.Fragment,{children:[f.jsx(KC,{remote:e.kind==="ssh",projects:r,onOpen:ie=>{g(ie),_n(!1)},onCreated:ts,onDeleted:Oo}),e.kind==="ssh"&&f.jsx(Af,{runtime:e,corner:!0})]}):f.jsxs("div",{className:"app-body flex flex-1 min-h-0 py-0 px-3.5",children:[m&&f.jsx(V0t,{projectId:m,projectName:(Xt==null?void 0:Xt.name)??"",railHeader:Qa,railOpen:Bt,onShowRail:()=>He(!0),mainView:pn,onSelectMainView:Un,experimentsActive:pn==="chat"&&bn&&_e==="experiments",filesActive:pn==="chat"&&bn&&_e==="files",artifactsActive:pn==="chat"&&bn&&_e==="artifacts",onOpenExperiments:Gr,onOpenArtifacts:kr,onOpenFile:Vc,onOpenRun:mr,runExperimentName:Ss,onOpenExperiment:ti,experimentName:Ei,onOpenPlan:da,onOpenSubagent:Ni,onOpenWorktree:es,composerPrefill:Xt&&r0(Xt.id)&&(a==null?void 0:a.tourCompleted)===!1?gQe:null,runtime:e,onOpenDemoWelcome:Xt&&r0(Xt.id)?us:void 0,onActiveSessionChange:Ze,preferredAgent:a.preferredAgent,onPreferredAgentChange:Zt,children:pn==="skills"?f.jsx(U1t,{}):pn!=="chat"?f.jsx(__t,{remote:e.kind==="ssh",tab:pn,project:Xt,githubPublicationError:Tn&&Tn.projectId===(Xt==null?void 0:Xt.id)?Tn.message:null,onProjectUpdate:ie=>{s(ve=>ve?Nf(ve,ie):[ie]),ie.githubEnabled&&Os(null)},onSelectTab:Un}):null}),pn==="chat"&&bn&&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 ${ht?"max":""}`,style:ht?void 0:{width:rr},"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 ${ht?"cursor-e-resize":"cursor-col-resize"}`,title:ht?oq():rq(),onPointerDown:Lo}),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:[br.map(Io),$e&&f.jsx(bl,{active:_e==="files",label:jq(),icon:f.jsx(Gf,{size:12,className:"shrink-0"}),onSelect:()=>Wn("files"),onClose:()=>gr("files")}),yt&&f.jsx(bl,{active:_e==="artifacts",label:WU(),icon:f.jsx(Ox,{size:12,className:"shrink-0"}),onSelect:()=>Wn("artifacts"),onClose:()=>gr("artifacts")}),Ie&&f.jsx(bl,{active:_e==="experiments",label:Cq(),icon:f.jsx(Lx,{size:12,className:"shrink-0"}),onSelect:()=>Wn("experiments"),onClose:()=>gr("experiments")}),_a.map(kd)]}),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(Gt,{title:ht?O6():L6(),"aria-label":ht?O6():L6(),onClick:()=>An(ie=>!ie),children:ht?f.jsx(DZe,{size:14}):f.jsx(TZe,{size:14})}),f.jsx(Gt,{title:M6(),"aria-label":M6(),onClick:()=>{Mn.current=!1,Je(!1),An(!1)},children:f.jsx(Ur,{size:14})})]})]}),_e==="artifacts"?f.jsx(bo,{children:Xt&&f.jsx(L1t,{project:Xt,artifacts:H,onChanged:Is,onOpenFile:Sd,onOpenStorage:e.kind==="ssh"?void 0:()=>Un("storage")},Xt.id)}):_e==="experiments"?f.jsxs(bo,{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:L,children:[f.jsx(Gt,{size:"small",ref:X,className:"experiment-scope-trigger",active:ae==="agent",title:gq({scope:ae==="agent"?R6():D6()}),"aria-label":Rq(),"aria-expanded":J,onClick:()=>$(ie=>!ie),children:f.jsx(mZe,{size:16,strokeWidth:2.5})}),J&&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(Mr,{"aria-pressed":ae==="agent",disabled:!B||!le,title:B?le?void 0:Iq():Gq(),onClick:()=>{G("agent"),$(!1)},children:[f.jsx("span",{children:R6()}),ae==="agent"&&f.jsx(_i,{size:13})]}),f.jsxs(Mr,{"aria-pressed":ae==="project",onClick:()=>{G("project"),$(!1)},children:[f.jsx("span",{children:D6()}),ae==="project"&&f.jsx(_i,{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":yq(),children:[f.jsx("button",{className:F==="table"?"active":"","aria-pressed":F==="table",onClick:()=>W("table"),children:yG()}),f.jsx("button",{className:F==="tree"?"active":"","aria-pressed":F==="tree",onClick:()=>W("tree"),children:CG()})]})]})]}),f.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:F==="tree"?Xt&&f.jsx(e3t,{experiments:S,runs:q,project:Xt,onOpenView:ys,onOpenCode:Bn,agentSessionId:ae==="agent"?B:null,onShowProjectScope:Bs}):f.jsx(kbt,{runs:q,emptyHint:ae==="agent"&&S.length>0?Pq():void 0,experiments:re,onOpen:(ie,ve)=>{ys(ie.id,"overview",ve)},onOpenLogs:(ie,ve,Ce)=>{ce(ve),ys(ie,"terminal",Ce)},onOpenCode:(ie,ve)=>{const Ce=S.find(De=>De.id===ie);Ce&&Bn(Ce.id,Ce.branchName,"files",ve)},onCancel:PN})})]}):_e==="files"?f.jsx(bo,{children:Xt?f.jsx(k1t,{sessionId:B??void 0,project:Xt,view:jn,toggled:nr,onViewChange:nn,onToggledChange:lr,onOpenFile:(ie,ve,Ce,De)=>ua(ie,ve,Ce,void 0,void 0,void 0,De)},`files:${B??`project:${Xt.id}`}`):f.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:f.jsx(qu,{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(EN,{size:22}),f.jsx("p",{children:iG()})]})})})}):Yn?f.jsx(bo,{children:m&&f.jsx(ubt,{remote:e.kind==="ssh",projectId:m,path:Yn.path,source:Yn.source,sessionId:Yn.source==="artifacts"?B??void 0:Yn.sessionId,gitRef:Yn.ref,line:Yn.line,branchLabel:s3t(Yn,Xt==null?void 0:Xt.baselineBranch),onOpenFile:(ie,ve,Ce,De)=>ir(Yn,()=>ua(ie,ve,Ce,void 0,void 0,void 0,De)),scrollPosition:Ft.current.get(kf(m,B,Yn)),onScrollPositionChange:ie=>{Ft.current.set(kf(m,B,Yn),ie)},lineScrollRequest:Yn.lineScrollRequest,onLineScrollRequestHandled:()=>Hl(Yn),onEdit:()=>Tt(Yn)},kf(m,B,Yn))}):ds?f.jsx(bo,{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(Oa,{text:ds.plan,onOpenFile:(ie,ve,Ce,De,Oe)=>ir(ds,()=>ua(ie,ds.sessionId,De,ve,Ce,void 0,Oe))})})}):$r?f.jsx(W0t,{sessionId:$r.sessionId,spawnPartId:$r.spawnPartId,onOpenFile:(ie,ve,Ce,De,Oe)=>ir($r,()=>Vc(ie,$r.sessionId,ve,Ce,De,Oe)),onOpenRun:(ie,ve)=>ir($r,()=>mr(ie,ve)),runExperimentName:Ss,onOpenExperiment:(ie,ve)=>ir($r,()=>ti(ie,ve)),experimentName:Ei,onOpenSubagent:(ie,ve,Ce)=>ir($r,()=>Ni($r.sessionId,ie,ve,Ce))},$r.spawnPartId):dr?f.jsx(bo,{children:m&&Xt&&dr&&Fl&&f.jsx(w1t,{projectId:m,project:Xt,experiment:Fl,view:dr.view,toggled:dr.toggled,onViewChange:ie=>ks(dr,{view:ie}),onToggledChange:ie=>ks(dr,{toggled:ie}),onOpenFile:(ie,ve,Ce,De)=>ir(dr,()=>ua(ie,ve,Ce,void 0,void 0,Fl.branchName,De))},`code:${dr.branch}`)}):f.jsx(bo,{children:Wr&&zi&&Xt&&f.jsx(K1t,{experiment:zi,project:Xt,view:Wr.view,runs:v,selectedRunId:oe,onSelectRun:ce,parentExperiment:S.find(ie=>ie.id===zi.parentExperimentId)??null,onOpenView:(ie,ve,Ce)=>{ve&&ce(ve),ir(Wr,()=>ys(zi.id,ie,Ce))},onOpenCode:(ie,ve)=>ir(Wr,()=>Bn(zi.id,zi.branchName,ie,ve))},`${Wr.id}:${Wr.view}`)})]})]}),qt&&f.jsx(tR,{remote:e.kind==="ssh",onClose:()=>Nt(!1),onCreated:(ie,ve)=>{Nt(!1),ts(ie,ve)}}),ki&&!it&&Xt&&r0(Xt.id)&&f.jsx(Cbt,{onClose:Jr,onCreateProject:Ci})]})}const h3t="data:image/svg+xml,"+encodeURIComponent('');function _3t(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?h3t:"/favicon.svg")}function lE(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function p3t(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!lE("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&nz(n),!lE("orx:locale")&&t&&_E(t)&&mN(t)}function m3t(e){return e.includes("ssh ")&&e.includes("failed")}function cE({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:qE({host:we(e)})}),f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:Lv()}),f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:K7e()})]})})}function uE({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var D,O,H;const{session:s}=e,[a,l]=M.useState(s.installPaths),[o,c]=M.useState(!1),[d,_]=M.useState(null);M.useEffect(()=>l(s.installPaths),[(D=s.installPaths)==null?void 0:D.binary,(O=s.installPaths)==null?void 0:O.database,(H=s.installPaths)==null?void 0:H.cache]);async function h(){if(a){c(!0);try{await mJe(a)}catch(P){Ms(P instanceof Error?P.message:String(P),"error")}finally{c(!1)}}}async function m(P=!1){r(P?s.error:null),c(!0);try{await gJe()}catch(F){Ms(F instanceof Error?F.message:String(F),"error")}finally{c(!1)}}async function g(){c(!0);try{await VN()}catch(P){Ms(P instanceof Error?P.message:String(P),"error")}finally{c(!1)}}async function S(){c(!0);try{_(await WN())}catch(P){Ms(P instanceof Error?P.message:String(P),"error")}finally{c(!1)}}async function k(){if(d){c(!0);try{await KN(d),_(null)}catch(P){_(null),Ms(P instanceof Error?P.message:String(P),"error")}finally{c(!1)}}}async function v(){c(!0);try{await bJe()}catch(P){Ms(P instanceof Error?P.message:String(P),"error")}finally{c(!1)}}const b=s.status==="applying"||o,w=s.status==="needsInstall",x=s.status==="needsUpdate",C=a&&w,j=["connecting","applying","reconnecting"].includes(s.status),N=s.status==="disconnected"&&s.error!==null&&m3t(s.error)&&t!==s.error&&!s.canStartNewHost,T=w?wSe():x?Rke():s.status==="applying"?e7e({host:we(s.host)}):s.status==="reconnecting"?o8e({host:we(s.host)}):s.status==="disconnected"?s.error?q7e({host:we(s.host)}):s.canStartNewHost?nSe({host:we(s.host)}):qE({host:we(s.host)}):v7e({host:we(s.host)}),z=s.error??(s.canStartNewHost?Q7e():w?DSe({user:we(s.user??""),host:we(s.host)}):x?jke({host:we(s.host)}):s.status==="applying"?X6e():s.status==="reconnecting"?r8e():s.status==="disconnected"?I7e():p7e());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:[j&&f.jsx(Mt,{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}),!N&&f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:z})]})]}),N&&f.jsx(h4,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void m(!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:bSe()}),[["binary",aSe()],["database",_Se()],["cache",uSe()]].map(([P,F])=>f.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[F,f.jsx(Wf,{value:a[P],onChange:W=>l({...a,[P]:W.target.value}),disabled:b,dir:"ltr"})]},P)),!s.error&&f.jsx("div",{className:"flex justify-end pt-1",children:f.jsx(Ue,{variant:"primary",disabled:b,onClick:()=>void h(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Mt,{})," ",ESe()]}):x?G7():tN()})})]}),x&&a&&f.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&f.jsx(Ue,{variant:"primary",disabled:b,onClick:()=>void h(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Mt,{})," ",Ike()]}):G7()})}),s.status==="disconnected"&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?f.jsxs(Ue,{variant:"primary",disabled:o,onClick:()=>void v(),children:[o?f.jsx(Mt,{}):null,s.error?U7():g8e()]}):f.jsxs(Ue,{variant:"primary",disabled:o,onClick:()=>void m(),children:[o?f.jsx(Mt,{}):null,U7()]})}),(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(Ue,{disabled:o,onClick:()=>void g(),children:Ov()})}),x&&s.error&&f.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[f.jsx(Ue,{disabled:o,onClick:()=>void g(),children:Ov()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid m(),children:[o?f.jsx(Mt,{}):null,F7()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid S(),children:[o?f.jsx(Mt,{}):null,GE()]})]}),w&&s.error&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsxs(Ue,{variant:"primary",disabled:o,onClick:()=>void m(),children:[o?f.jsx(Mt,{}):null,F7()]})})]})}),d&&f.jsx(AT,{host:s.host,preview:d,currentClientAttached:!1,stopping:o,onClose:()=>{o||_(null)},onConfirm:()=>void k()})]})}function g3t({children:e}){const n=M.useRef(null);return M.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 b3t(){const e=location.pathname==="/remote-launch",[n,t]=M.useState(null),[r,s]=M.useState(null),a=M.useRef(!1),l=M.useRef(!1),o=M.useRef(!1),[c,d]=M.useState(null);if(M.useEffect(()=>{if(e)return;let m=!0,g;const S=async()=>{try{const k=await hJe();if(!m)return;k.kind==="ssh"&&(o.current||(o.current=!0,p3t(k)),k.session.status==="connected"?(a.current=!0,l.current=!0,d(null)):k.session.status==="disconnected"&&k.session.error===null&&(l.current=!1)),t(v=>JSON.stringify(v)===JSON.stringify(k)?v:k),s(null),k.kind==="ssh"&&(g=window.setTimeout(()=>void S(),2e3))}catch(k){m&&(s(k instanceof Error?k.message:String(k)),g=window.setTimeout(()=>void S(),2e3))}};return S(),()=>{m=!1,g!==void 0&&window.clearTimeout(g)}},[e]),M.useEffect(()=>{const m=(n==null?void 0:n.kind)==="ssh";_3t(m),m&&(!a.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(Mt,{})," ",XSe()]});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(Ue,{onClick:()=>location.reload(),children:zc()})]}):f.jsx(Mt,{})});if(n.kind==="local")return f.jsx(oE,{runtime:n});if(!(l.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?f.jsx(cE,{host:n.session.host}):f.jsx(uE,{runtime:n,retriedInteractiveError:c,setRetriedInteractiveError:d});const h=n.session.status!=="connected"||r!==null;return f.jsxs("div",{className:"relative h-full",children:[f.jsx("div",{className:"h-full",inert:h,children:f.jsx(oE,{runtime:n})}),h&&f.jsx(g3t,{children:r?f.jsx(cE,{host:n.session.host,overlay:!0}):f.jsx(uE,{runtime:n,overlay:!0,retriedInteractiveError:c,setRetriedInteractiveError:d})})]})}const v3t=E();document.documentElement.lang=v3t;document.documentElement.dir="ltr";vO.createRoot(document.getElementById("root")).render(f.jsxs(M.StrictMode,{children:[f.jsx(b3t,{}),f.jsx(Ent,{})]})); diff --git a/ui/dist/assets/index-QVaY9_5_.css b/ui/dist/assets/index-QVaY9_5_.css new file mode 100644 index 00000000..acb43bf4 --- /dev/null +++ b/ui/dist/assets/index-QVaY9_5_.css @@ -0,0 +1 @@ +/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--spacing:.25rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:6px;--radius-md:8px;--radius-2xl:1rem;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-3xl:64px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--color-diff-selection:var(--surface)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-selection:color-mix(in oklab, var(--surface) 76%, var(--primary))}}:root,:host{--color-diff-gutter-selection:var(--surface)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-gutter-selection:color-mix(in oklab, var(--surface) 68%, var(--primary))}}:root,:host{--color-diff-insert-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-gutter:color-mix(in oklab, var(--base) 84%, var(--accent-green))}}:root,:host{--color-diff-delete-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-gutter:color-mix(in oklab, var(--base) 86%, var(--accent-red))}}:root,:host{--color-diff-insert-code:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-code:color-mix(in oklab, var(--base) 91%, var(--accent-green))}}:root,:host{--color-diff-delete-code:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-code:color-mix(in oklab, var(--base) 92%, var(--accent-red))}}:root,:host{--color-diff-insert-edit:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-edit:color-mix(in oklab, var(--base) 72%, var(--accent-green))}}:root,:host{--color-diff-delete-edit:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-edit:color-mix(in oklab, var(--base) 78%, var(--accent-red))}}:root,:host{--color-diff-omit-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-omit-gutter:color-mix(in oklab, var(--base) 86%, var(--text))}}}@layer base{*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--base);color:var(--text);font-family:var(--sans);font-size:1rem;line-height:1.45;overflow:hidden}::selection{background:var(--highlight)}.chat-thread-inner ::selection{background:var(--chat-annotation-highlight)}::highlight(chat-annotations){background:var(--chat-annotation-highlight)}.file-view-editarea::selection{background:var(--editor-selection)}button{font:inherit;color:inherit;cursor:pointer;background:0 0;border:none;padding:0}input,textarea,select{font:inherit;color:var(--text);background:var(--base);border:1px solid var(--border);border-radius:var(--radius-md);outline:none;padding:6px 10px}input:focus,textarea:focus,select:focus{border-color:var(--text)}input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--border);border-radius:var(--radius-sm);background-clip:padding-box;border:2px solid #0000}::-webkit-scrollbar-track{background:0 0}}@layer vendor{.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-color-default:inherit;--xy-node-border-default:1px solid #1a192b;--xy-node-background-color-default:#fff;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #00000014;--xy-node-boxshadow-selected-default:0 0 0 .5px #1a192b;--xy-node-border-radius-default:3px;--xy-handle-background-color-default:#1a192b;--xy-handle-border-color-default:#fff;--xy-selection-background-color-default:#0059dc14;--xy-selection-border-default:1px dotted #0059dccc;--xy-controls-button-background-color-default:#fefefe;--xy-controls-button-background-color-hover-default:#f4f4f4;--xy-controls-button-color-default:inherit;--xy-controls-button-color-hover-default:inherit;--xy-controls-button-border-color-default:#eee;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#fff;--xy-edge-label-color-default:inherit;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#777;--xy-background-pattern-lines-color-default:#777;--xy-background-pattern-cross-color-default:#777;--xy-node-color-default:#f8f8f8;--xy-node-border-default:1px solid #3c3c3c;--xy-node-background-color-default:#1e1e1e;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #ffffff14;--xy-node-boxshadow-selected-default:0 0 0 .5px #999;--xy-handle-background-color-default:#bebebe;--xy-handle-border-color-default:#1e1e1e;--xy-selection-background-color-default:#c8c8dc14;--xy-selection-border-default:1px dotted #c8c8dccc;--xy-controls-button-background-color-default:#2b2b2b;--xy-controls-button-background-color-hover-default:#3e3e3e;--xy-controls-button-color-default:#f8f8f8;--xy-controls-button-color-hover-default:#fff;--xy-controls-button-border-color-default:#5b5b5b;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#141414;--xy-edge-label-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{-webkit-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color,var(--xy-handle-border-color-default));border-radius:100%;width:6px;min-width:5px;height:6px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{box-shadow:var(--xy-controls-box-shadow,var(--xy-controls-box-shadow-default));flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{background:var(--xy-controls-button-background-color,var(--xy-controls-button-background-color-default));border:none;border-bottom:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)));width:26px;height:26px;color:var(--xy-controls-button-color-props,var(--xy-controls-button-color,var(--xy-controls-button-color-default)));cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border-radius:var(--xy-node-border-radius,var(--xy-node-border-radius-default));width:150px;color:var(--xy-node-color,var(--xy-node-color-default));text-align:center;border:var(--xy-node-border,var(--xy-node-border-default));background-color:var(--xy-node-background-color,var(--xy-node-background-color-default));padding:10px;font-size:12px}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover,var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected,var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color,var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var(--xy-controls-button-background-color-hover-props,var(--xy-controls-button-background-color-hover,var(--xy-controls-button-background-color-hover-default)));color:var(--xy-controls-button-color-hover-props,var(--xy-controls-button-color-hover,var(--xy-controls-button-color-hover-default)))}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)))}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color,var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color,var(--xy-edge-label-color-default))}.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;top:0;right:0;bottom:0;left:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2)format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff)format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff)format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff)format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2)format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff)format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2)format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff)format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2)format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff)format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2)format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff)format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2)format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff)format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2)format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff)format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff)format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff)format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff)format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2)format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff)format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2)format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff)format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2)format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff)format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC)format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff)format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2)format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff)format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2)format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff)format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf)format("truetype")}.katex{text-indent:0;text-rendering:auto;font:1.21em/1.2 KaTeX_Main,Times New Roman,serif;position:relative}.katex *{border-color:currentColor;-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.16.47"}.katex .katex-mathml{clip-path:inset(50%);border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{white-space:nowrap;width:min-content;position:relative}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.katex .vlist-r{display:table-row}.katex .vlist{vertical-align:bottom;display:table-cell;position:relative}.katex .vlist>span{height:0;display:block;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.katex .vbox{flex-direction:column;align-items:baseline;display:inline-flex}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{flex-direction:row;display:inline-flex}.katex .thinbox{width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{line-height:0;display:inline}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline{border-bottom-style:dashed;width:100%;display:inline-block}.katex .sqrt>.root{margin-left:.277778em;margin-right:-.555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.833333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.714286em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.857143em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14286em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71429em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96286em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55429em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.416667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.583333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.833333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.347222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.416667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.486111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.694444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.833333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44028em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.289352em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.347222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.405093em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.520833em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.578704em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.694444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.833333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.289296em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.385728em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.433944em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.578592em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.694311em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.833173em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.200965em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.241158em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.281351em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.321543em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.361736em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.401929em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.482315em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.694534em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.833601em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{width:.12em;display:inline-block}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{min-width:1px;display:inline-block}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;height:inherit;width:100%;display:block;position:absolute}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{width:50.2%;position:absolute;left:0;overflow:hidden}.katex .halfarrow-right{width:50.2%;position:absolute;right:0;overflow:hidden}.katex .brace-left{width:25.1%;position:absolute;left:0;overflow:hidden}.katex .brace-center{width:50%;position:absolute;left:25%;overflow:hidden}.katex .brace-right{width:25.1%;position:absolute;right:0;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{text-align:left;display:inline-block;position:absolute;right:calc(50% + .3em)}.katex .cd-label-right{text-align:right;display:inline-block;position:absolute;left:calc(50% + .3em)}.katex-display{text-align:center;margin:1em 0;display:block}.katex-display>.katex{text-align:center;white-space:nowrap;display:block}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo}:root{--diff-background-color:initial;--diff-text-color:initial;--diff-font-family:Consolas,Courier,monospace;--diff-selection-background-color:#b3d7ff;--diff-selection-text-color:var(--diff-text-color);--diff-gutter-insert-background-color:#d6fedb;--diff-gutter-insert-text-color:var(--diff-text-color);--diff-gutter-delete-background-color:#fadde0;--diff-gutter-delete-text-color:var(--diff-text-color);--diff-gutter-selected-background-color:#fffce0;--diff-gutter-selected-text-color:var(--diff-text-color);--diff-code-insert-background-color:#eaffee;--diff-code-insert-text-color:var(--diff-text-color);--diff-code-delete-background-color:#fdeff0;--diff-code-delete-text-color:var(--diff-text-color);--diff-code-insert-edit-background-color:#c0dc91;--diff-code-insert-edit-text-color:var(--diff-text-color);--diff-code-delete-edit-background-color:#f39ea2;--diff-code-delete-edit-text-color:var(--diff-text-color);--diff-code-selected-background-color:#fffce0;--diff-code-selected-text-color:var(--diff-text-color);--diff-omit-gutter-line-color:#cb2a1d}.diff{background-color:var(--diff-background-color);border-collapse:collapse;color:var(--diff-text-color);table-layout:fixed;width:100%}.diff::selection{background-color:#b3d7ff;background-color:var(--diff-selection-background-color);color:var(--diff-selection-text-color)}.diff td{vertical-align:top;padding-top:0;padding-bottom:0}.diff-line{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);line-height:1.5}.diff-gutter>a{color:inherit;display:block}.diff-gutter{cursor:pointer;text-align:right;-webkit-user-select:none;user-select:none;padding:0 1ch}.diff-gutter-insert{background-color:#d6fedb;background-color:var(--diff-gutter-insert-background-color);color:var(--diff-gutter-insert-text-color)}.diff-gutter-delete{background-color:#fadde0;background-color:var(--diff-gutter-delete-background-color);color:var(--diff-gutter-delete-text-color)}.diff-gutter-omit{cursor:default}.diff-gutter-selected{background-color:#fffce0;background-color:var(--diff-gutter-selected-background-color);color:var(--diff-gutter-selected-text-color)}.diff-code{word-wrap:break-word;white-space:pre-wrap;word-break:break-all;padding:0 0 0 .5em}.diff-code-edit{color:inherit}.diff-code-insert{background-color:#eaffee;background-color:var(--diff-code-insert-background-color);color:var(--diff-code-insert-text-color)}.diff-code-insert .diff-code-edit{background-color:#c0dc91;background-color:var(--diff-code-insert-edit-background-color);color:var(--diff-code-insert-edit-text-color)}.diff-code-delete{background-color:#fdeff0;background-color:var(--diff-code-delete-background-color);color:var(--diff-code-delete-text-color)}.diff-code-delete .diff-code-edit{background-color:#f39ea2;background-color:var(--diff-code-delete-edit-background-color);color:var(--diff-code-delete-edit-text-color)}.diff-code-selected{background-color:#fffce0;background-color:var(--diff-code-selected-background-color);color:var(--diff-code-selected-text-color)}.diff-widget-content{vertical-align:top}.diff-gutter-col{width:7ch}.diff-gutter-omit{height:0}.diff-gutter-omit:before{background-color:#cb2a1d;background-color:var(--diff-omit-gutter-line-color);content:" ";white-space:pre;width:2px;height:100%;margin-left:4.6ch;display:block;overflow:hidden}.diff-decoration{-webkit-user-select:none;user-select:none;line-height:1.5}.diff-decoration-content{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);padding:0}}@layer components;@layer utilities{.\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-14{inset:calc(var(--spacing) * -14)}.-inset-\[7px\]{top:-7px;right:-7px;bottom:-7px;left:-7px}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{inset-block:0}.start-0{inset-inline-start:calc(var(--spacing) * 0)}.start-1\/2{inset-inline-start:50%}.start-2{inset-inline-start:calc(var(--spacing) * 2)}.start-3{inset-inline-start:calc(var(--spacing) * 3)}.-end-\[3px\]{inset-inline-end:-3px}.end-0{inset-inline-end:calc(var(--spacing) * 0)}.end-1\.5{inset-inline-end:calc(var(--spacing) * 1.5)}.end-3\.5{inset-inline-end:calc(var(--spacing) * 3.5)}.top-0{top:0}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-\[calc\(100\%_\+_6px\)\]{top:calc(100% + 6px)}.bottom-0{bottom:0}.bottom-\[calc\(100\%_\+_4px\)\]{bottom:calc(100% + 4px)}.bottom-\[calc\(100\%_\+_6px\)\]{bottom:calc(100% + 6px)}.bottom-\[calc\(100\%_\+_8px\)\]{bottom:calc(100% + 8px)}.bottom-full{bottom:100%}.left-1\/2{left:50%}.z-0{z-index:0}.z-1{z-index:1}.z-2{z-index:2}.z-4{z-index:4}.z-5{z-index:5}.z-6{z-index:6}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-60{z-index:60}.z-100{z-index:100}.z-200{z-index:200}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.m-3{margin:calc(var(--spacing) * 3)}.m-5{margin:calc(var(--spacing) * 5)}.mx-0{margin-inline:0}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.-my-0\.5{margin-block:calc(var(--spacing) * -.5)}.my-0{margin-block:0}.my-2{margin-block:calc(var(--spacing) * 2)}.my-2\.5{margin-block:calc(var(--spacing) * 2.5)}.my-3{margin-block:calc(var(--spacing) * 3)}.my-3\.5{margin-block:calc(var(--spacing) * 3.5)}.my-\[5px\]{margin-block:5px}.ms-0{margin-inline-start:0}.ms-1{margin-inline-start:var(--spacing)}.ms-3\.5{margin-inline-start:calc(var(--spacing) * 3.5)}.ms-6{margin-inline-start:calc(var(--spacing) * 6)}.ms-auto{margin-inline-start:auto}.me-0{margin-inline-end:0}.me-2{margin-inline-end:calc(var(--spacing) * 2)}.me-3\.5{margin-inline-end:calc(var(--spacing) * 3.5)}.mt-0{margin-top:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-4\.5{margin-top:calc(var(--spacing) * 4.5)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-5\.5{margin-top:calc(var(--spacing) * 5.5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-7{margin-top:calc(var(--spacing) * 7)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-\[5px\]{margin-top:5px}.mt-\[13px\]{margin-top:13px}.mt-auto{margin-top:auto}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-3\.5{margin-bottom:calc(var(--spacing) * 3.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-4\.5{margin-bottom:calc(var(--spacing) * 4.5)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-5\.5{margin-bottom:calc(var(--spacing) * 5.5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.box-border{box-sizing:border-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.field-sizing-content{field-sizing:content}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-10\.5{height:calc(var(--spacing) * 10.5)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-40{height:calc(var(--spacing) * 40)}.h-\[7px\]{height:7px}.h-\[9px\]{height:9px}.h-\[13px\]{height:13px}.h-\[15px\]{height:15px}.h-\[min\(42rem\,calc\(100vh-2\.5rem\)\)\]{height:min(42rem,100vh - 2.5rem)}.h-\[min\(48rem\,calc\(100vh-2\.5rem\)\)\]{height:min(48rem,100vh - 2.5rem)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-45{max-height:calc(var(--spacing) * 45)}.max-h-50{max-height:calc(var(--spacing) * 50)}.max-h-65{max-height:calc(var(--spacing) * 65)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-85{max-height:calc(var(--spacing) * 85)}.max-h-95{max-height:calc(var(--spacing) * 95)}.max-h-100{max-height:calc(var(--spacing) * 100)}.max-h-\[calc\(100vh_-_var\(--modal-top\)_-_48px\)\]{max-height:calc(100vh - var(--modal-top) - 48px)}.max-h-\[calc\(100vh_-_var\(--new-project-modal-top\)_-_1\.25rem\)\]{max-height:calc(100vh - var(--new-project-modal-top) - 1.25rem)}.max-h-\[min\(70vh\,_720px\)\]{max-height:min(70vh,720px)}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-19\.5{min-height:calc(var(--spacing) * 19.5)}.min-h-22{min-height:calc(var(--spacing) * 22)}.min-h-41{min-height:calc(var(--spacing) * 41)}.min-h-dvh{min-height:100dvh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\/5{width:40%}.w-4{width:calc(var(--spacing) * 4)}.w-4\/5{width:80%}.w-5{width:calc(var(--spacing) * 5)}.w-6\.5{width:calc(var(--spacing) * 6.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-9\.5{width:calc(var(--spacing) * 9.5)}.w-10\.5{width:calc(var(--spacing) * 10.5)}.w-24{width:calc(var(--spacing) * 24)}.w-37{width:calc(var(--spacing) * 37)}.w-40{width:calc(var(--spacing) * 40)}.w-52{width:calc(var(--spacing) * 52)}.w-66{width:calc(var(--spacing) * 66)}.w-68{width:calc(var(--spacing) * 68)}.w-70{width:calc(var(--spacing) * 70)}.w-72{width:calc(var(--spacing) * 72)}.w-110{width:calc(var(--spacing) * 110)}.w-120{width:calc(var(--spacing) * 120)}.w-160{width:calc(var(--spacing) * 160)}.w-200{width:calc(var(--spacing) * 200)}.w-\[7px\]{width:7px}.w-\[9px\]{width:9px}.w-\[13px\]{width:13px}.w-\[15px\]{width:15px}.w-\[min\(440px\,_calc\(100vw_-_48px\)\)\]{width:min(440px,100vw - 48px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-36{max-width:calc(var(--spacing) * 36)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-55{max-width:calc(var(--spacing) * 55)}.max-w-60{max-width:calc(var(--spacing) * 60)}.max-w-64{max-width:calc(var(--spacing) * 64)}.max-w-65{max-width:calc(var(--spacing) * 65)}.max-w-68{max-width:calc(var(--spacing) * 68)}.max-w-72{max-width:calc(var(--spacing) * 72)}.max-w-120{max-width:calc(var(--spacing) * 120)}.max-w-155{max-width:calc(var(--spacing) * 155)}.max-w-160{max-width:calc(var(--spacing) * 160)}.max-w-230{max-width:calc(var(--spacing) * 230)}.max-w-290{max-width:calc(var(--spacing) * 290)}.max-w-\[88\%\]{max-width:88%}.max-w-\[94vw\]{max-width:94vw}.max-w-full{max-width:100%}.max-w-readable{max-width:var(--readable-col)}.min-w-0{min-width:0}.min-w-24{min-width:calc(var(--spacing) * 24)}.min-w-44{min-width:calc(var(--spacing) * 44)}.min-w-47\.5{min-width:calc(var(--spacing) * 47.5)}.min-w-55{min-width:calc(var(--spacing) * 55)}.min-w-57\.5{min-width:calc(var(--spacing) * 57.5)}.min-w-60{min-width:calc(var(--spacing) * 60)}.min-w-80{min-width:calc(var(--spacing) * 80)}.min-w-85{min-width:calc(var(--spacing) * 85)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.basis-full{flex-basis:100%}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\[or-pulse_1\.2s_ease-in-out_infinite\]{animation:1.2s ease-in-out infinite or-pulse}.animate-\[spin_0\.8s_linear_infinite\]{animation:.8s linear infinite spin}.animate-\[spin_0\.9s_linear_infinite\]{animation:.9s linear infinite spin}.animate-\[title-char-in_240ms_ease-out_both\]{animation:.24s ease-out both title-char-in}.animate-pulse{animation:var(--animate-pulse)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-e-resize{cursor:e-resize}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.\[scrollbar-width\:none\]{scrollbar-width:none}.\[scrollbar-gutter\:stable\]{scrollbar-gutter:stable}.\[scrollbar-gutter\:stable_both-edges\]{scrollbar-gutter:stable both-edges}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-\[8\.5rem_5rem\]{grid-template-columns:8.5rem 5rem}.grid-cols-\[9rem_minmax\(0\,1fr\)\]{grid-template-columns:9rem minmax(0,1fr)}.grid-cols-\[24px_minmax\(0\,_1fr\)\]{grid-template-columns:24px minmax(0,1fr)}.grid-cols-\[24px_minmax\(0\,_1fr\)_28px\]{grid-template-columns:24px minmax(0,1fr) 28px}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[minmax\(0\,1fr\)_9rem_9rem_minmax\(18rem\,max-content\)\]{grid-template-columns:minmax(0,1fr) 9rem 9rem minmax(18rem,max-content)}.grid-cols-\[minmax\(0\,_1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[minmax\(12rem\,18rem\)_minmax\(12rem\,18rem\)\]{grid-template-columns:minmax(12rem,18rem) minmax(12rem,18rem)}.grid-cols-\[minmax\(180px\,_260px\)_minmax\(0\,_1fr\)\]{grid-template-columns:minmax(180px,260px) minmax(0,1fr)}.grid-cols-\[repeat\(2\,_minmax\(0\,_1fr\)\)\]{grid-template-columns:repeat(2,minmax(0,1fr))}.\!flex-col{flex-direction:column!important}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.\!items-stretch{align-items:stretch!important}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-4\.5{gap:calc(var(--spacing) * 4.5)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-\[0\.4em\]{gap:.4em}.gap-\[3px\]{gap:3px}.gap-\[5px\]{gap:5px}.gap-\[7px\]{gap:7px}.gap-\[9px\]{gap:9px}.gap-px{gap:1px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.gap-x-4\.5{column-gap:calc(var(--spacing) * 4.5)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-x-12{column-gap:calc(var(--spacing) * 12)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2\.5{row-gap:calc(var(--spacing) * 2.5)}.gap-y-4{row-gap:calc(var(--spacing) * 4)}.gap-y-\[3px\]{row-gap:3px}.gap-y-\[7px\]{row-gap:7px}.gap-y-\[9px\]{row-gap:9px}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border-variant>:not(:last-child)){border-color:var(--border-variant)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[3px\]{border-radius:3px}.rounded-\[16px\]{border-radius:16px}.rounded-\[inherit\]{border-radius:inherit}.rounded-\[var\(--radius-md\)_var\(--radius-md\)_0_0\]{border-radius:var(--radius-md) var(--radius-md) 0 0}.rounded-full{border-radius:999px}.rounded-lg{border-radius:10px}.rounded-md{border-radius:8px}.rounded-none{border-radius:0}.rounded-sm{border-radius:6px}.rounded-xl{border-radius:12px}.rounded-xs{border-radius:4px}.rounded-s-none{border-start-start-radius:0;border-end-start-radius:0}.rounded-e-none{border-start-end-radius:0;border-end-end-radius:0}.rounded-b-lg{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-x-0{border-inline-style:var(--tw-border-style);border-inline-width:0}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-s-2{border-inline-start-style:var(--tw-border-style);border-inline-start-width:2px}.border-s-\[3px\]{border-inline-start-style:var(--tw-border-style);border-inline-start-width:3px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-solid{--tw-border-style:solid;border-style:solid}.border-accent-amber,.border-accent-amber\/45{border-color:var(--accent-amber)}@supports (color:color-mix(in lab,red,red)){.border-accent-amber\/45{border-color:color-mix(in oklab,var(--accent-amber) 45%,transparent)}}.border-accent-blue,.border-accent-blue\/45{border-color:var(--accent-blue)}@supports (color:color-mix(in lab,red,red)){.border-accent-blue\/45{border-color:color-mix(in oklab,var(--accent-blue) 45%,transparent)}}.border-accent-green,.border-accent-green\/45{border-color:var(--accent-green)}@supports (color:color-mix(in lab,red,red)){.border-accent-green\/45{border-color:color-mix(in oklab,var(--accent-green) 45%,transparent)}}.border-accent-red{border-color:var(--accent-red)}.border-border{border-color:var(--border)}.border-border-strong{border-color:var(--border-strong)}.border-border-variant{border-color:var(--border-variant)}.border-primary,.border-primary\/45{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,var(--primary) 45%,transparent)}}.border-transparent{border-color:#0000}.border-s-accent-blue{border-inline-start-color:var(--accent-blue)}.border-s-accent-red{border-inline-start-color:var(--accent-red)}.border-s-border{border-inline-start-color:var(--border)}.border-s-border-variant{border-inline-start-color:var(--border-variant)}.border-s-plan-caret{border-inline-start-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.border-s-plan-caret{border-inline-start-color:color-mix(in oklab,var(--base) 35%,var(--text))}}.border-e-border-variant{border-inline-end-color:var(--border-variant)}.border-t-border{border-top-color:var(--border)}.border-t-border-variant{border-top-color:var(--border-variant)}.border-t-primary{border-top-color:var(--primary)}.border-b-accent-amber{border-bottom-color:var(--accent-amber)}.border-b-border{border-bottom-color:var(--border)}.border-b-border-variant{border-bottom-color:var(--border-variant)}.border-b-divider-subtle{border-bottom-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.border-b-divider-subtle{border-bottom-color:color-mix(in oklab,var(--text) 7%,transparent)}}.bg-accent{background-color:var(--accent)}.bg-accent-amber-subtle{background-color:var(--accent-amber-subtle)}.bg-accent-blue{background-color:var(--accent-blue)}.bg-accent-blue-subtle{background-color:var(--accent-blue-subtle)}.bg-accent-green-subtle{background-color:var(--accent-green-subtle)}.bg-accent-red-subtle{background-color:var(--accent-red-subtle)}.bg-accent-teal{background-color:var(--accent-teal)}.bg-background{background-color:var(--base)}.bg-border-variant{background-color:var(--border-variant)}.bg-canvas{background-color:var(--canvas)}.bg-current{background-color:currentColor}.bg-hover-faint{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-faint{background-color:color-mix(in oklab,var(--text) 3%,transparent)}}.bg-hover-muted{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-muted{background-color:color-mix(in oklab,var(--text) 8%,transparent)}}.bg-hover-subtle{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-subtle{background-color:color-mix(in oklab,var(--text) 10%,transparent)}}.bg-modal-backdrop{background-color:#1d1b1a6b}.bg-modal-backdrop-light{background-color:#1d1b1a66}.bg-muted{background-color:var(--muted)}.bg-panel{background-color:var(--panel)}.bg-primary{background-color:var(--primary)}.bg-primary-subtle{background-color:var(--primary-subtle)}.bg-skill-blue-subtle{background-color:var(--skill-blue-subtle)}.bg-surface{background-color:var(--surface)}.bg-surface-bright{background-color:var(--surface-bright)}.bg-terminal{background-color:var(--term-bg)}.bg-text{background-color:var(--text)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.bg-none{background-image:none}.object-contain{object-fit:contain}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-7{padding:calc(var(--spacing) * 7)}.p-8{padding:calc(var(--spacing) * 8)}.p-\[1\.5px\]{padding:1.5px}.p-\[3px\]{padding:3px}.p-\[5px\]{padding:5px}.p-px{padding:1px}.px-0{padding-inline:0}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-4\.5{padding-inline:calc(var(--spacing) * 4.5)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-7{padding-inline:calc(var(--spacing) * 7)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[9px\]{padding-inline:9px}.px-\[11px\]{padding-inline:11px}.px-\[13px\]{padding-inline:13px}.px-\[15px\]{padding-inline:15px}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-4\.5{padding-block:calc(var(--spacing) * 4.5)}.py-5\.5{padding-block:calc(var(--spacing) * 5.5)}.py-6\.5{padding-block:calc(var(--spacing) * 6.5)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-\[3px\]{padding-block:3px}.py-\[5px\]{padding-block:5px}.py-\[7px\]{padding-block:7px}.py-\[9px\]{padding-block:9px}.py-\[11px\]{padding-block:11px}.py-px{padding-block:1px}.ps-1{padding-inline-start:var(--spacing)}.ps-1\.5{padding-inline-start:calc(var(--spacing) * 1.5)}.ps-2{padding-inline-start:calc(var(--spacing) * 2)}.ps-2\.5{padding-inline-start:calc(var(--spacing) * 2.5)}.ps-3{padding-inline-start:calc(var(--spacing) * 3)}.ps-4{padding-inline-start:calc(var(--spacing) * 4)}.ps-4\.5{padding-inline-start:calc(var(--spacing) * 4.5)}.ps-5{padding-inline-start:calc(var(--spacing) * 5)}.ps-\[2ch\]{padding-inline-start:2ch}.pe-0{padding-inline-end:0}.pe-1{padding-inline-end:var(--spacing)}.pe-1\.5{padding-inline-end:calc(var(--spacing) * 1.5)}.pe-2{padding-inline-end:calc(var(--spacing) * 2)}.pe-2\.5{padding-inline-end:calc(var(--spacing) * 2.5)}.pe-4{padding-inline-end:calc(var(--spacing) * 4)}.pe-8{padding-inline-end:calc(var(--spacing) * 8)}.pe-10{padding-inline-end:calc(var(--spacing) * 10)}.pe-14{padding-inline-end:calc(var(--spacing) * 14)}.pe-\[1ch\]{padding-inline-end:1ch}.pt-0{padding-top:0}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-4\.5{padding-top:calc(var(--spacing) * 4.5)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-6\.5{padding-top:calc(var(--spacing) * 6.5)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pt-\[var\(--modal-top\)\]{padding-top:var(--modal-top)}.pt-\[var\(--new-project-modal-top\)\]{padding-top:var(--new-project-modal-top)}.pb-0{padding-bottom:0}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-3\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pb-15{padding-bottom:calc(var(--spacing) * 15)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.pl-\[2ch\]{padding-left:2ch}.text-center{text-align:center}.text-end{text-align:end}.text-right{text-align:right}.text-start{text-align:start}.align-baseline{vertical-align:baseline}.font-\[inherit\]{font-family:inherit}.font-mono{font-family:var(--mono)}.font-sans{font-family:var(--sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-0{--tw-leading:0px;line-height:0}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-\[1\.3\]{--tw-leading:1.3;line-height:1.3}.leading-\[1\.4\]{--tw-leading:1.4;line-height:1.4}.leading-\[1\.6\]{--tw-leading:1.6;line-height:1.6}.leading-\[1\.08\]{--tw-leading:1.08;line-height:1.08}.leading-\[1\.45\]{--tw-leading:1.45;line-height:1.45}.leading-\[1\.55\]{--tw-leading:1.55;line-height:1.55}.leading-\[1\.62\]{--tw-leading:1.62;line-height:1.62}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\!font-medium{--tw-font-weight:var(--font-weight-medium)!important;font-weight:var(--font-weight-medium)!important}.\!font-normal{--tw-font-weight:var(--font-weight-normal)!important;font-weight:var(--font-weight-normal)!important}.font-\[375\]{--tw-font-weight:375;font-weight:375}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.01em\]{--tw-tracking:-.01em;letter-spacing:-.01em}.tracking-\[-0\.02em\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\[-0\.015em\]{--tw-tracking:-.015em;letter-spacing:-.015em}.tracking-\[-0\.035em\]{--tw-tracking:-.035em;letter-spacing:-.035em}.tracking-\[0\.05em\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\[0\.06em\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\[0\.08em\]{--tw-tracking:.08em;letter-spacing:.08em}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\[tab-size\:4\]{-moz-tab-size:4;tab-size:4}.\!text-accent-red{color:var(--accent-red)!important}.text-accent-amber{color:var(--accent-amber)}.text-accent-blue{color:var(--accent-blue)}.text-accent-green{color:var(--accent-green)}.text-accent-orange{color:var(--accent-orange)}.text-accent-purple{color:var(--accent-purple)}.text-accent-red{color:var(--accent-red)}.text-accent-teal{color:var(--accent-teal)}.text-background{color:var(--base)}.text-inherit{color:inherit}.text-muted{color:var(--muted)}.text-primary{color:var(--primary)}.text-skill-blue{color:var(--skill-blue)}.text-skill-blue-slash{color:var(--skill-blue-slash)}.text-subtext{color:var(--subtext)}.text-text{color:var(--text)}.text-transparent{color:#0000}.text-white{color:#fff}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.decoration-border-strong{-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.underline-offset-2{text-underline-offset:2px}.underline-offset-3{text-underline-offset:3px}.caret-text{caret-color:var(--text)}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-card{--tw-shadow:0 14px 36px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.shadow-card{--tw-shadow:0 14px 36px var(--tw-shadow-color,color-mix(in oklab, var(--text) 6%, transparent))}}.shadow-card{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-control{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-control-subtle{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-dropdown{--tw-shadow:0 10px 26px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-elevated{--tw-shadow:0 6px 24px var(--tw-shadow-color,var(--text)), 0 1px 4px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.shadow-elevated{--tw-shadow:0 6px 24px var(--tw-shadow-color,color-mix(in oklab, var(--text) 5%, transparent)), 0 1px 4px var(--tw-shadow-color,color-mix(in oklab, var(--text) 4%, transparent))}}.shadow-elevated{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-file-line{--tw-shadow:inset 2px 0 0 var(--tw-shadow-color,var(--accent-blue));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-floating{--tw-shadow:0 8px 24px var(--tw-shadow-color,#00000024);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-hairline{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-logo{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-menu{--tw-shadow:0 12px 32px var(--tw-shadow-color,#0000002e);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-modal{--tw-shadow:0 24px 60px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-plan{--tw-shadow:0 2px 10px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-plan-menu{--tw-shadow:0 6px 20px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-popover{--tw-shadow:0 4px 16px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-tree{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-3xl{--tw-blur:blur(var(--blur-3xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,border-color\,color\]{transition-property:background,border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,border-color\]{transition-property:background,border-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,color\]{transition-property:background,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,background\]{transition-property:border-color,background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,box-shadow\]{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,color\]{transition-property:border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[box-shadow\]{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,color\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-80{--tw-duration:80ms;transition-duration:80ms}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-standard{--tw-ease:ease;transition-timing-function:ease}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[--new-project-modal-top\:clamp\(4rem\,20vh\,24rem\)\]{--new-project-modal-top:clamp(4rem, 20vh, 24rem)}.\[font\:inherit\]{font:inherit}.\[grid-area\:actions\]{grid-area:actions}.\[grid-area\:meta\]{grid-area:meta}.\[grid-area\:name\]{grid-area:name}.\[grid-template-areas\:\'name_meta\'_\'actions_actions\'\]{grid-template-areas:"name meta""actions actions"}.group-focus-within\:pointer-events-auto:is(:where(.group):focus-within *){pointer-events:auto}.group-focus-within\:opacity-100:is(:where(.group):focus-within *),.group-focus-within\/turn\:opacity-100:is(:where(.group\/turn):focus-within *){opacity:1}@media(hover:hover){.group-hover\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto}.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/skill\:opacity-100:is(:where(.group\/skill):hover *),.group-hover\/turn\:opacity-100:is(:where(.group\/turn):hover *){opacity:1}}.group-focus\:opacity-100:is(:where(.group):focus *){opacity:1}.group-focus-visible\:opacity-0:is(:where(.group):focus-visible *){opacity:0}.group-focus-visible\:opacity-100:is(:where(.group):focus-visible *){opacity:1}.placeholder\:text-muted::placeholder{color:var(--muted)}.before\:content-\[attr\(data-line\)\]:before{--tw-content:attr(data-line);content:var(--tw-content)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:start-0:after{content:var(--tw-content);inset-inline-start:calc(var(--spacing) * 0)}.after\:end-0:after{content:var(--tw-content);inset-inline-end:calc(var(--spacing) * 0)}.after\:top-full:after{content:var(--tw-content);top:100%}.after\:h-2:after{content:var(--tw-content);height:calc(var(--spacing) * 2)}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:bg-surface-bright:focus-within{background-color:var(--surface-bright)}@media(hover:hover){.hover\:border-border-strong:hover{border-color:var(--border-strong)}.hover\:border-text:hover{border-color:var(--text)}.hover\:bg-skill-blue-subtle:hover{background-color:var(--skill-blue-subtle)}.hover\:bg-surface:hover{background-color:var(--surface)}.hover\:bg-surface-bright:hover{background-color:var(--surface-bright)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-accent-red:hover{color:var(--accent-red)}.hover\:text-text:hover{color:var(--text)}.hover\:underline:hover{text-decoration-line:underline}.hover\:decoration-primary:hover{-webkit-text-decoration-color:var(--primary);text-decoration-color:var(--primary)}}.focus\:pointer-events-auto:focus{pointer-events:auto}.focus\:border-text:focus{border-color:var(--text)}.focus\:opacity-100:focus,.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-offset-\[-2px\]:focus-visible{outline-offset:-2px}.focus-visible\:outline-text:focus-visible{outline-color:var(--text)}.focus-visible\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.disabled\:cursor-default:disabled{cursor:default}.disabled\:opacity-45:disabled{opacity:.45}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-52:disabled{opacity:.52}@media(min-width:1120px){.min-\[1120px\]\:col-start-1{grid-column-start:1}.min-\[1120px\]\:col-start-2{grid-column-start:2}.min-\[1120px\]\:row-start-1{grid-row-start:1}.min-\[1120px\]\:row-start-2{grid-row-start:2}.min-\[1120px\]\:mt-0{margin-top:0}.min-\[1120px\]\:grid{display:grid}.min-\[1120px\]\:grid-cols-\[minmax\(0\,_1\.1fr\)_minmax\(28rem\,_1fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(28rem,1fr)}.min-\[1120px\]\:grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.min-\[1120px\]\:content-center{align-content:center}.min-\[1120px\]\:gap-x-20{column-gap:calc(var(--spacing) * 20)}.min-\[1120px\]\:gap-y-10{row-gap:calc(var(--spacing) * 10)}.min-\[1120px\]\:self-end{align-self:flex-end}.min-\[1120px\]\:self-start{align-self:flex-start}}@media(min-width:40rem){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:px-12{padding-inline:calc(var(--spacing) * 12)}}@media(min-width:64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&_\+_\.settings-stack-section\]\:mt-6+.settings-stack-section{margin-top:calc(var(--spacing) * 6)}.\[\&_\.actions\]\:mt-1\.5 .actions{margin-top:calc(var(--spacing) * 1.5)}.\[\&_\.actions\]\:flex .actions{display:flex}.\[\&_\.actions\]\:justify-end .actions{justify-content:flex-end}.\[\&_\.actions\]\:gap-2\.5 .actions{gap:calc(var(--spacing) * 2.5)}.\[\&_\.artifact-img\]\:mx-0 .artifact-img{margin-inline:0}.\[\&_\.artifact-img\]\:my-3 .artifact-img{margin-block:calc(var(--spacing) * 3)}.\[\&_\.artifact-img\]\:block .artifact-img{display:block}.\[\&_\.artifact-img_img\]\:h-auto .artifact-img img{height:auto}.\[\&_\.artifact-img_img\]\:max-w-full .artifact-img img{max-width:100%}.\[\&_\.artifact-img_img\]\:rounded-sm .artifact-img img{border-radius:6px}.\[\&_\.artifact-img_img\]\:border .artifact-img img{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.artifact-img_img\]\:border-border .artifact-img img{border-color:var(--border)}.\[\&_\.artifact-img-caption\]\:mt-1 .artifact-img-caption{margin-top:var(--spacing)}.\[\&_\.artifact-img-caption\]\:block .artifact-img-caption{display:block}.\[\&_\.artifact-img-caption\]\:text-center .artifact-img-caption{text-align:center}.\[\&_\.artifact-img-caption\]\:text-sm .artifact-img-caption{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.artifact-img-caption\]\:text-subtext .artifact-img-caption{color:var(--subtext)}.\[\&_\.backend-badge\]\:text-text .backend-badge{color:var(--text)}.\[\&_\.backend-detail\]\:text-muted .backend-detail{color:var(--muted)}.\[\&_\.backend-name\]\:font-medium .backend-name{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.badge\]\:ms-2 .badge{margin-inline-start:calc(var(--spacing) * 2)}.\[\&_\.brand\]\:flex .brand{display:flex}.\[\&_\.brand\]\:h-full .brand{height:100%}.\[\&_\.brand\]\:w-full .brand{width:100%}.\[\&_\.brand\]\:min-w-0 .brand{min-width:0}.\[\&_\.brand\]\:items-center .brand{align-items:center}.\[\&_\.brand\]\:justify-between .brand{justify-content:space-between}.\[\&_\.brand\]\:gap-2 .brand{gap:calc(var(--spacing) * 2)}.\[\&_\.brand\]\:rounded-sm .brand{border-radius:6px}.\[\&_\.brand\]\:border .brand{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.brand\]\:border-transparent .brand{border-color:#0000}.\[\&_\.brand\]\:px-1\.5 .brand{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.brand\]\:py-1 .brand{padding-block:var(--spacing)}.\[\&_\.brand\]\:text-base .brand{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.brand\]\:font-semibold .brand{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.brand\]\:text-text .brand{color:var(--text)}.\[\&_\.brand_\.brand-project\]\:min-w-0 .brand .brand-project{min-width:0}.\[\&_\.brand_\.brand-project\]\:overflow-hidden .brand .brand-project{overflow:hidden}.\[\&_\.brand_\.brand-project\]\:text-xl .brand .brand-project{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\.brand_\.brand-project\]\:text-ellipsis .brand .brand-project{text-overflow:ellipsis}.\[\&_\.brand_\.brand-project\]\:whitespace-nowrap .brand .brand-project{white-space:nowrap}.\[\&_\.brand_svg\]\:shrink-0 .brand svg{flex-shrink:0}.\[\&_\.brand-project-copy\]\:flex .brand-project-copy{display:flex}.\[\&_\.brand-project-copy\]\:min-w-0 .brand-project-copy{min-width:0}.\[\&_\.brand-project-copy\]\:flex-col .brand-project-copy{flex-direction:column}.\[\&_\.brand-project-copy\]\:gap-\[3px\] .brand-project-copy{gap:3px}.\[\&_\.brand-project-copy\]\:text-start .brand-project-copy{text-align:start}.\[\&_\.brand-project-copy\]\:leading-\[1\.15\] .brand-project-copy{--tw-leading:1.15;line-height:1.15}.\[\&_\.brand-project-label\]\:text-xs .brand-project-label{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.brand-project-label\]\:font-medium .brand-project-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.brand-project-label\]\:tracking-\[0\.04em\] .brand-project-label{--tw-tracking:.04em;letter-spacing:.04em}.\[\&_\.brand-project-label\]\:text-muted .brand-project-label{color:var(--muted)}.\[\&_\.brand-project-label\]\:uppercase .brand-project-label{text-transform:uppercase}.\[\&_\.brand\.open\]\:border-border .brand.open{border-color:var(--border)}.\[\&_\.brand\.open\]\:bg-surface .brand.open{background-color:var(--surface)}.\[\&_\.brand\.open_\.project-chevron\]\:rotate-180 .brand.open .project-chevron{rotate:180deg}.\[\&_\.brand\.open_\.project-chevron\]\:opacity-100 .brand.open .project-chevron{opacity:1}.\[\&_\.brand\:hover\]\:border-border .brand:hover{border-color:var(--border)}.\[\&_\.brand\:hover\]\:bg-surface .brand:hover{background-color:var(--surface)}.\[\&_\.brand\:hover_\.project-chevron\]\:opacity-100 .brand:hover .project-chevron{opacity:1}.\[\&_\.btn\]\:inline-flex .btn{display:inline-flex}.\[\&_\.btn\]\:items-center .btn{align-items:center}.\[\&_\.btn\]\:gap-\[5px\] .btn{gap:5px}.\[\&_\.busy-dot\]\:h-\[7px\] .busy-dot{height:7px}.\[\&_\.busy-dot\]\:w-\[7px\] .busy-dot{width:7px}.\[\&_\.busy-dot\]\:shrink-0 .busy-dot{flex-shrink:0}.\[\&_\.busy-dot\]\:animate-\[or-pulse_1\.2s_infinite\] .busy-dot{animation:1.2s infinite or-pulse}.\[\&_\.busy-dot\]\:rounded-full .busy-dot{border-radius:999px}.\[\&_\.busy-dot\]\:bg-primary .busy-dot{background-color:var(--primary)}.\[\&_\.busy-dot\.waiting\]\:animate-none .busy-dot.waiting{animation:none}.\[\&_\.chev\]\:w-3 .chev{width:calc(var(--spacing) * 3)}.\[\&_\.chev\]\:shrink-0 .chev{flex-shrink:0}.\[\&_\.chev\]\:text-xs .chev{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.chev\]\:text-muted .chev{color:var(--muted)}.\[\&_\.count-badge\]\:inline-flex .count-badge{display:inline-flex}.\[\&_\.count-badge\]\:h-4\.5 .count-badge{height:calc(var(--spacing) * 4.5)}.\[\&_\.count-badge\]\:min-w-4\.5 .count-badge{min-width:calc(var(--spacing) * 4.5)}.\[\&_\.count-badge\]\:items-center .count-badge{align-items:center}.\[\&_\.count-badge\]\:justify-center .count-badge{justify-content:center}.\[\&_\.count-badge\]\:rounded-md .count-badge{border-radius:8px}.\[\&_\.count-badge\]\:border .count-badge{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.count-badge\]\:border-border .count-badge{border-color:var(--border)}.\[\&_\.count-badge\]\:bg-canvas .count-badge{background-color:var(--canvas)}.\[\&_\.count-badge\]\:px-\[5px\] .count-badge{padding-inline:5px}.\[\&_\.count-badge\]\:py-0 .count-badge{padding-block:0}.\[\&_\.count-badge\]\:text-xs .count-badge{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.count-badge\]\:font-medium .count-badge{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.count-badge\]\:text-text .count-badge{color:var(--text)}.\[\&_\.elided-node-label\]\:flex .elided-node-label{display:flex}.\[\&_\.elided-node-label\]\:flex-col .elided-node-label{flex-direction:column}.\[\&_\.elided-node-label\]\:leading-\[1\.3\] .elided-node-label{--tw-leading:1.3;line-height:1.3}.\[\&_\.elided-node-sub\]\:text-muted .elided-node-sub{color:var(--muted)}.\[\&_\.error\]\:basis-full .error{flex-basis:100%}.\[\&_\.error\]\:text-base .error{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.error\]\:text-sm .error{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.error\]\:whitespace-pre-wrap .error{white-space:pre-wrap}.\[\&_\.error\]\:text-accent-red .error{color:var(--accent-red)}.\[\&_\.file-chip\]\:mx-px .file-chip{margin-inline:1px}.\[\&_\.file-chip\]\:my-0 .file-chip{margin-block:0}.\[\&_\.file-chip\]\:inline-flex .file-chip{display:inline-flex}.\[\&_\.file-chip\]\:max-w-full .file-chip{max-width:100%}.\[\&_\.file-chip\]\:cursor-pointer .file-chip{cursor:pointer}.\[\&_\.file-chip\]\:items-center .file-chip{align-items:center}.\[\&_\.file-chip\]\:gap-1 .file-chip{gap:var(--spacing)}.\[\&_\.file-chip\]\:rounded-xs .file-chip{border-radius:4px}.\[\&_\.file-chip\]\:border .file-chip{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.file-chip\]\:border-border-variant .file-chip{border-color:var(--border-variant)}.\[\&_\.file-chip\]\:bg-panel .file-chip{background-color:var(--panel)}.\[\&_\.file-chip\]\:px-1\.5 .file-chip{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.file-chip\]\:py-0 .file-chip{padding-block:0}.\[\&_\.file-chip\]\:align-baseline .file-chip{vertical-align:baseline}.\[\&_\.file-chip\]\:font-mono .file-chip{font-family:var(--mono)}.\[\&_\.file-chip\]\:text-sm .file-chip{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.file-chip\]\:font-medium .file-chip{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.file-chip\]\:text-text .file-chip{color:var(--text)}.\[\&_\.file-chip_svg\]\:flex-none .file-chip svg{flex:none}.\[\&_\.file-chip_svg\]\:opacity-60 .file-chip svg{opacity:.6}.\[\&_\.file-chip-label\]\:max-w-65 .file-chip-label{max-width:calc(var(--spacing) * 65)}.\[\&_\.file-chip-label\]\:overflow-hidden .file-chip-label{overflow:hidden}.\[\&_\.file-chip-label\]\:text-ellipsis .file-chip-label{text-overflow:ellipsis}.\[\&_\.file-chip-label\]\:whitespace-nowrap .file-chip-label{white-space:nowrap}.\[\&_\.file-chip\:hover\:not\(\:disabled\)\]\:bg-surface .file-chip:hover:not(:disabled){background-color:var(--surface)}.\[\&_\.file-chip\:hover\:not\(\:disabled\)\]\:text-primary .file-chip:hover:not(:disabled){color:var(--primary)}.\[\&_\.files-pill\]\:rounded-sm .files-pill{border-radius:6px}.\[\&_\.files-pill\]\:px-2 .files-pill{padding-inline:calc(var(--spacing) * 2)}.\[\&_\.files-pill\]\:py-\[5px\] .files-pill{padding-block:5px}.\[\&_\.files-pill_code\]\:text-xs .files-pill code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.folder-picker-chevron\]\:flex-none .folder-picker-chevron{flex:none}.\[\&_\.folder-picker-chevron\]\:text-muted .folder-picker-chevron{color:var(--muted)}.\[\&_\.folder-picker-control\]\:flex .folder-picker-control{display:flex}.\[\&_\.folder-picker-control\]\:w-full .folder-picker-control{width:100%}.\[\&_\.folder-picker-control\]\:min-w-0 .folder-picker-control{min-width:0}.\[\&_\.folder-picker-control\]\:cursor-pointer .folder-picker-control{cursor:pointer}.\[\&_\.folder-picker-control\]\:items-center .folder-picker-control{align-items:center}.\[\&_\.folder-picker-control\]\:gap-\[9px\] .folder-picker-control{gap:9px}.\[\&_\.folder-picker-control\]\:overflow-hidden .folder-picker-control{overflow:hidden}.\[\&_\.folder-picker-control\]\:rounded-md .folder-picker-control{border-radius:8px}.\[\&_\.folder-picker-control\]\:border .folder-picker-control{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.folder-picker-control\]\:border-border .folder-picker-control{border-color:var(--border)}.\[\&_\.folder-picker-control\]\:bg-background .folder-picker-control{background-color:var(--base)}.\[\&_\.folder-picker-control\]\:px-2\.5 .folder-picker-control{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.folder-picker-control\]\:py-2 .folder-picker-control{padding-block:calc(var(--spacing) * 2)}.\[\&_\.folder-picker-control\]\:text-start .folder-picker-control{text-align:start}.\[\&_\.folder-picker-control\]\:transition-\[border-color\,box-shadow\] .folder-picker-control{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_\.folder-picker-control\]\:duration-120 .folder-picker-control{--tw-duration:.12s;transition-duration:.12s}.\[\&_\.folder-picker-control\]\:ease-standard .folder-picker-control{--tw-ease:ease;transition-timing-function:ease}.\[\&_\.folder-picker-control_\.placeholder\]\:text-muted .folder-picker-control .placeholder{color:var(--muted)}.\[\&_\.folder-picker-control_span\]\:min-w-0 .folder-picker-control span{min-width:0}.\[\&_\.folder-picker-control_span\]\:flex-1 .folder-picker-control span{flex:1}.\[\&_\.folder-picker-control_span\]\:overflow-hidden .folder-picker-control span{overflow:hidden}.\[\&_\.folder-picker-control_span\]\:text-ellipsis .folder-picker-control span{text-overflow:ellipsis}.\[\&_\.folder-picker-control_span\]\:whitespace-nowrap .folder-picker-control span{white-space:nowrap}.\[\&_\.folder-picker-control\:disabled\]\:cursor-default .folder-picker-control:disabled{cursor:default}.\[\&_\.folder-picker-control\:disabled\]\:opacity-65 .folder-picker-control:disabled{opacity:.65}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-2 .folder-picker-control:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-offset-2 .folder-picker-control:focus-visible{outline-offset:2px}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-text .folder-picker-control:focus-visible{outline-color:var(--text)}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-solid .folder-picker-control:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)\]\:border-muted .folder-picker-control:hover:not(:disabled){border-color:var(--muted)}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)\]\:shadow-control-subtle .folder-picker-control:hover:not(:disabled){--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)_\.folder-picker-chevron\]\:text-subtext .folder-picker-control:hover:not(:disabled) .folder-picker-chevron{color:var(--subtext)}.\[\&_\.folder-picker-hint\]\:text-sm .folder-picker-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.folder-picker-hint\]\:leading-\[1\.4\] .folder-picker-hint{--tw-leading:1.4;line-height:1.4}.\[\&_\.folder-picker-hint\]\:font-normal .folder-picker-hint{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.folder-picker-hint\]\:text-subtext .folder-picker-hint{color:var(--subtext)}.\[\&_\.folder-picker-icon\]\:flex-none .folder-picker-icon{flex:none}.\[\&_\.folder-picker-icon\]\:text-current .folder-picker-icon{color:currentColor}.\[\&_\.form-seg\]\:mb-0\.5 .form-seg{margin-bottom:calc(var(--spacing) * .5)}.\[\&_\.form-seg\]\:self-start .form-seg{align-self:flex-start}.\[\&_\.form-seg_button\]\:px-3 .form-seg button{padding-inline:calc(var(--spacing) * 3)}.\[\&_\.form-seg_button\]\:py-\[5px\] .form-seg button{padding-block:5px}.\[\&_\.ftree-footer\]\:mt-2\.5 .ftree-footer{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.ftree-footer\]\:max-w-full .ftree-footer{max-width:100%}.\[\&_\.ftree-footer\]\:rounded-md .ftree-footer{border-radius:8px}.\[\&_\.ftree-footer\]\:border .ftree-footer{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.ftree-footer\]\:border-border .ftree-footer{border-color:var(--border)}.\[\&_\.ftree-footer\]\:bg-background .ftree-footer{background-color:var(--base)}.\[\&_\.ftree-footer\]\:px-2\.5 .ftree-footer{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.ftree-footer\]\:py-1\.5 .ftree-footer{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\.ftree-footer_code\]\:max-w-95 .ftree-footer code{max-width:calc(var(--spacing) * 95)}.\[\&_\.hc-actions\]\:mt-2\.5 .hc-actions{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-actions\]\:flex .hc-actions{display:flex}.\[\&_\.hc-actions\]\:items-center .hc-actions{align-items:center}.\[\&_\.hc-actions\]\:gap-1\.5 .hc-actions{gap:calc(var(--spacing) * 1.5)}.\[\&_\.hc-actions_button\]\:inline-flex .hc-actions button{display:inline-flex}.\[\&_\.hc-actions_button\]\:min-w-21 .hc-actions button{min-width:calc(var(--spacing) * 21)}.\[\&_\.hc-actions_button\]\:items-center .hc-actions button{align-items:center}.\[\&_\.hc-actions_button\]\:justify-center .hc-actions button{justify-content:center}.\[\&_\.hc-actions_button\]\:gap-\[5px\] .hc-actions button{gap:5px}.\[\&_\.hc-actions_button\]\:rounded-md .hc-actions button{border-radius:8px}.\[\&_\.hc-actions_button\]\:border .hc-actions button{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.hc-actions_button\]\:border-border .hc-actions button{border-color:var(--border)}.\[\&_\.hc-actions_button\]\:bg-background .hc-actions button{background-color:var(--base)}.\[\&_\.hc-actions_button\]\:px-2\.5 .hc-actions button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.hc-actions_button\]\:py-1\.5 .hc-actions button{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\.hc-actions_button\]\:text-sm .hc-actions button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-actions_button\]\:font-medium .hc-actions button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.hc-actions_button\]\:text-text .hc-actions button{color:var(--text)}.\[\&_\.hc-actions_button\:hover\]\:border-border-hover-strong .hc-actions button:hover{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.hc-actions_button\:hover\]\:border-border-hover-strong .hc-actions button:hover{border-color:color-mix(in oklab,var(--border) 55%,var(--text))}}.\[\&_\.hc-actions_button\:hover\]\:bg-canvas .hc-actions button:hover{background-color:var(--canvas)}.\[\&_\.hc-body\]\:mt-2\.5 .hc-body{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-body\]\:line-clamp-10 .hc-body{-webkit-line-clamp:10;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-body\]\:border-t .hc-body{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-body\]\:border-t-border-variant .hc-body{border-top-color:var(--border-variant)}.\[\&_\.hc-body\]\:pt-2\.5 .hc-body{padding-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-body\]\:leading-\[1\.6\] .hc-body{--tw-leading:1.6;line-height:1.6}.\[\&_\.hc-body\]\:whitespace-pre-line .hc-body{white-space:pre-line}.\[\&_\.hc-body\.expanded\]\:line-clamp-none .hc-body.expanded{-webkit-line-clamp:unset;-webkit-box-orient:horizontal;display:block;overflow:visible}.\[\&_\.hc-body\.expanded\]\:block .hc-body.expanded{display:block}.\[\&_\.hc-body\.expanded\]\:max-h-\[45vh\] .hc-body.expanded{max-height:45vh}.\[\&_\.hc-body\.expanded\]\:overflow-x-hidden .hc-body.expanded{overflow-x:hidden}.\[\&_\.hc-body\.expanded\]\:overflow-y-auto .hc-body.expanded{overflow-y:auto}.\[\&_\.hc-body\.expanded\]\:pb-1 .hc-body.expanded{padding-bottom:var(--spacing)}.\[\&_\.hc-branch\]\:inline-flex .hc-branch{display:inline-flex}.\[\&_\.hc-branch\]\:min-w-0 .hc-branch{min-width:0}.\[\&_\.hc-branch\]\:items-center .hc-branch{align-items:center}.\[\&_\.hc-branch\]\:gap-1 .hc-branch{gap:var(--spacing)}.\[\&_\.hc-branch\]\:overflow-hidden .hc-branch{overflow:hidden}.\[\&_\.hc-branch\]\:text-ellipsis .hc-branch{text-overflow:ellipsis}.\[\&_\.hc-branch\]\:whitespace-nowrap .hc-branch{white-space:nowrap}.\[\&_\.hc-failure\]\:mt-2 .hc-failure{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-failure\]\:line-clamp-3 .hc-failure{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-failure\]\:text-accent-red .hc-failure{color:var(--accent-red)}.\[\&_\.hc-foot\]\:mt-2 .hc-foot{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-foot\]\:flex .hc-foot{display:flex}.\[\&_\.hc-foot\]\:items-center .hc-foot{align-items:center}.\[\&_\.hc-foot\]\:justify-between .hc-foot{justify-content:space-between}.\[\&_\.hc-foot\]\:gap-2\.5 .hc-foot{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-foot\]\:text-xs .hc-foot{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-foot\]\:text-muted .hc-foot{color:var(--muted)}.\[\&_\.hc-foot_\.hc-command\]\:min-w-0 .hc-foot .hc-command{min-width:0}.\[\&_\.hc-foot_\.hc-command\]\:overflow-hidden .hc-foot .hc-command{overflow:hidden}.\[\&_\.hc-foot_\.hc-command\]\:text-ellipsis .hc-foot .hc-command{text-overflow:ellipsis}.\[\&_\.hc-foot_\.hc-command\]\:whitespace-nowrap .hc-foot .hc-command{white-space:nowrap}.\[\&_\.hc-git\]\:mt-2\.5 .hc-git{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-git\]\:flex .hc-git{display:flex}.\[\&_\.hc-git\]\:flex-col .hc-git{flex-direction:column}.\[\&_\.hc-git\]\:gap-1 .hc-git{gap:var(--spacing)}.\[\&_\.hc-git\]\:border-t .hc-git{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-git\]\:border-t-border-variant .hc-git{border-top-color:var(--border-variant)}.\[\&_\.hc-git\]\:pt-2 .hc-git{padding-top:calc(var(--spacing) * 2)}.\[\&_\.hc-git\]\:text-xs .hc-git{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-git\]\:text-text .hc-git{color:var(--text)}.\[\&_\.hc-git-row\]\:flex .hc-git-row{display:flex}.\[\&_\.hc-git-row\]\:min-w-0 .hc-git-row{min-width:0}.\[\&_\.hc-git-row\]\:flex-wrap .hc-git-row{flex-wrap:wrap}.\[\&_\.hc-git-row\]\:items-center .hc-git-row{align-items:center}.\[\&_\.hc-git-row\]\:gap-2\.5 .hc-git-row{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-head\]\:flex .hc-head{display:flex}.\[\&_\.hc-head\]\:items-baseline .hc-head{align-items:baseline}.\[\&_\.hc-head\]\:justify-between .hc-head{justify-content:space-between}.\[\&_\.hc-head\]\:gap-2\.5 .hc-head{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-slug\]\:min-w-0 .hc-slug{min-width:0}.\[\&_\.hc-slug\]\:overflow-hidden .hc-slug{overflow:hidden}.\[\&_\.hc-slug\]\:text-sm .hc-slug{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-slug\]\:font-semibold .hc-slug{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.hc-slug\]\:text-ellipsis .hc-slug{text-overflow:ellipsis}.\[\&_\.hc-slug\]\:whitespace-nowrap .hc-slug{white-space:nowrap}.\[\&_\.hc-stats\]\:mt-2\.5 .hc-stats{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-stats\]\:flex .hc-stats{display:flex}.\[\&_\.hc-stats\]\:flex-wrap .hc-stats{flex-wrap:wrap}.\[\&_\.hc-stats\]\:items-center .hc-stats{align-items:center}.\[\&_\.hc-stats\]\:gap-3 .hc-stats{gap:calc(var(--spacing) * 3)}.\[\&_\.hc-stats\]\:border-t .hc-stats{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-stats\]\:border-t-border-variant .hc-stats{border-top-color:var(--border-variant)}.\[\&_\.hc-stats\]\:pt-2\.5 .hc-stats{padding-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-stats\]\:text-xs .hc-stats{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-stats\]\:text-text .hc-stats{color:var(--text)}.\[\&_\.hc-title\]\:mt-\[3px\] .hc-title{margin-top:3px}.\[\&_\.hc-title\]\:text-text .hc-title{color:var(--text)}.\[\&_\.hc-toggle\]\:mt-1 .hc-toggle{margin-top:var(--spacing)}.\[\&_\.hc-toggle\]\:text-sm .hc-toggle{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-toggle\]\:font-medium .hc-toggle{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.hc-toggle\]\:text-muted .hc-toggle{color:var(--muted)}.\[\&_\.hc-toggle\:hover\]\:text-text .hc-toggle:hover{color:var(--text)}.\[\&_\.home-inner\]\:max-w-140 .home-inner{max-width:calc(var(--spacing) * 140)}.\[\&_\.home-inner\]\:max-w-300 .home-inner{max-width:calc(var(--spacing) * 300)}.\[\&_\.home-inner\]\:pt-0 .home-inner{padding-top:0}.\[\&_\.home-inner\]\:pt-24 .home-inner{padding-top:calc(var(--spacing) * 24)}.\[\&_\.home-inner\]\:pb-0 .home-inner{padding-bottom:0}.\[\&_\.icon-btn\]\:ms-2 .icon-btn{margin-inline-start:calc(var(--spacing) * 2)}.\[\&_\.icon-btn\]\:align-middle .icon-btn{vertical-align:middle}.\[\&_\.id\]\:text-xs .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.id\]\:text-muted .id{color:var(--muted)}.\[\&_\.k\]\:text-sm .k{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.k\]\:font-medium .k{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.k\]\:text-subtext .k{color:var(--subtext)}.\[\&_\.k\]\:text-text .k{color:var(--text)}.\[\&_\.katex\]\:text-prose-emphasis .katex{font-size:1.05em}.\[\&_\.katex-display\]\:mx-0 .katex-display{margin-inline:0}.\[\&_\.katex-display\]\:my-3 .katex-display{margin-block:calc(var(--spacing) * 3)}.\[\&_\.katex-display\]\:overflow-x-auto .katex-display{overflow-x:auto}.\[\&_\.katex-display\]\:overflow-y-hidden .katex-display{overflow-y:hidden}.\[\&_\.katex-display\]\:px-0 .katex-display{padding-inline:0}.\[\&_\.katex-display\]\:py-0\.5 .katex-display{padding-block:calc(var(--spacing) * .5)}.\[\&_\.kv\]\:grid-cols-\[132px_minmax\(0\,_1fr\)\] .kv{grid-template-columns:132px minmax(0,1fr)}.\[\&_\.kv\]\:items-center .kv{align-items:center}.\[\&_\.kv\]\:gap-x-4\.5 .kv{column-gap:calc(var(--spacing) * 4.5)}.\[\&_\.kv\]\:gap-y-1\.5 .kv{row-gap:calc(var(--spacing) * 1.5)}.\[\&_\.kv\]\:gap-y-\[9px\] .kv{row-gap:9px}.\[\&_\.kv_\.k\]\:text-sm .kv .k{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.kv_\.v\]\:flex .kv .v{display:flex}.\[\&_\.kv_\.v\]\:min-w-0 .kv .v{min-width:0}.\[\&_\.kv_\.v\]\:flex-wrap .kv .v{flex-wrap:wrap}.\[\&_\.kv_\.v\]\:items-center .kv .v{align-items:center}.\[\&_\.kv_\.v\]\:gap-\[7px\] .kv .v{gap:7px}.\[\&_\.kv_\.v\]\:font-sans .kv .v{font-family:var(--sans)}.\[\&_\.kv_\.v\]\:text-base .kv .v{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.kv_\.v\]\:break-normal .kv .v{overflow-wrap:normal;word-break:normal}.\[\&_\.md\]\:max-w-readable .md{max-width:var(--readable-col)}.\[\&_\.md\]\:text-base .md{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.md\]\:leading-\[1\.65\] .md{--tw-leading:1.65;line-height:1.65}.\[\&_\.md\]\:text-text .md{color:var(--text)}.\[\&_\.md_h1\]\:mx-0 .md h1{margin-inline:0}.\[\&_\.md_h1\]\:mt-4\.5 .md h1{margin-top:calc(var(--spacing) * 4.5)}.\[\&_\.md_h1\]\:mb-2 .md h1{margin-bottom:calc(var(--spacing) * 2)}.\[\&_\.md_h1\]\:text-2xl .md h1{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_\.md_h2\]\:mx-0 .md h2{margin-inline:0}.\[\&_\.md_h2\]\:mt-4 .md h2{margin-top:calc(var(--spacing) * 4)}.\[\&_\.md_h2\]\:mb-2 .md h2{margin-bottom:calc(var(--spacing) * 2)}.\[\&_\.md_h2\]\:text-xl .md h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\.md_h3\]\:text-lg .md h3{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_\.model-id\]\:block .model-id{display:block}.\[\&_\.model-id\]\:text-xs .model-id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.model-id\]\:text-muted .model-id{color:var(--muted)}.\[\&_\.model-item\]\:ps-6 .model-item{padding-inline-start:calc(var(--spacing) * 6)}.\[\&_\.model-item\]\:whitespace-nowrap .model-item{white-space:nowrap}.\[\&_\.model-item\:disabled\]\:cursor-default .model-item:disabled{cursor:default}.\[\&_\.model-item\:disabled\]\:text-muted .model-item:disabled{color:var(--muted)}.\[\&_\.model-item\:disabled\:hover\]\:bg-transparent .model-item:disabled:hover{background-color:#0000}.\[\&_\.new-project-actions\]\:mt-2\.5 .new-project-actions{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.new-project-actions\]\:justify-start .new-project-actions{justify-content:flex-start}.\[\&_\.node-action\]\:inline-flex .node-action{display:inline-flex}.\[\&_\.node-action\]\:items-center .node-action{align-items:center}.\[\&_\.node-action\]\:gap-\[5px\] .node-action{gap:5px}.\[\&_\.node-action\]\:rounded-sm .node-action{border-radius:6px}.\[\&_\.node-action\]\:px-1\.5 .node-action{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.node-action\]\:py-\[3px\] .node-action{padding-block:3px}.\[\&_\.node-action\]\:text-sm .node-action{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-action\]\:font-medium .node-action{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.node-action\]\:text-text .node-action{color:var(--text)}.\[\&_\.node-action\]\:no-underline .node-action{text-decoration-line:none}.\[\&_\.node-action-ext\]\:ms-auto .node-action-ext{margin-inline-start:auto}.\[\&_\.node-action-ext\]\:px-\[5px\] .node-action-ext{padding-inline:5px}.\[\&_\.node-action-ext\]\:py-\[3px\] .node-action-ext{padding-block:3px}.\[\&_\.node-action\:hover\]\:bg-surface .node-action:hover{background-color:var(--surface)}.\[\&_\.node-action\:hover\]\:text-text .node-action:hover{color:var(--text)}.\[\&_\.node-actions\]\:mt-2 .node-actions{margin-top:calc(var(--spacing) * 2)}.\[\&_\.node-actions\]\:flex .node-actions{display:flex}.\[\&_\.node-actions\]\:items-center .node-actions{align-items:center}.\[\&_\.node-actions\]\:gap-\[3px\] .node-actions{gap:3px}.\[\&_\.node-actions\]\:border-t .node-actions{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.node-actions\]\:border-t-border-variant .node-actions{border-top-color:var(--border-variant)}.\[\&_\.node-actions\]\:pt-1\.5 .node-actions{padding-top:calc(var(--spacing) * 1.5)}.\[\&_\.node-eyebrow\]\:mb-1\.5 .node-eyebrow{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_\.node-eyebrow\]\:flex .node-eyebrow{display:flex}.\[\&_\.node-eyebrow\]\:items-center .node-eyebrow{align-items:center}.\[\&_\.node-eyebrow\]\:justify-between .node-eyebrow{justify-content:space-between}.\[\&_\.node-eyebrow\]\:gap-2 .node-eyebrow{gap:calc(var(--spacing) * 2)}.\[\&_\.node-eyebrow\]\:text-xs .node-eyebrow{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.node-eyebrow\]\:font-medium .node-eyebrow{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.node-eyebrow\]\:text-muted .node-eyebrow{color:var(--muted)}.\[\&_\.node-head\]\:flex .node-head{display:flex}.\[\&_\.node-head\]\:min-w-0 .node-head{min-width:0}.\[\&_\.node-head\]\:items-center .node-head{align-items:center}.\[\&_\.node-head\]\:gap-\[7px\] .node-head{gap:7px}.\[\&_\.node-meta\]\:mt-2 .node-meta{margin-top:calc(var(--spacing) * 2)}.\[\&_\.node-meta\]\:flex .node-meta{display:flex}.\[\&_\.node-meta\]\:items-center .node-meta{align-items:center}.\[\&_\.node-meta\]\:gap-2 .node-meta{gap:calc(var(--spacing) * 2)}.\[\&_\.node-meta\]\:text-xs .node-meta{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.node-meta\]\:text-muted .node-meta{color:var(--muted)}.\[\&_\.node-overview-link\]\:block .node-overview-link{display:block}.\[\&_\.node-overview-link\]\:w-full .node-overview-link{width:100%}.\[\&_\.node-overview-link\]\:cursor-pointer .node-overview-link{cursor:pointer}.\[\&_\.node-overview-link\]\:border-0 .node-overview-link{border-style:var(--tw-border-style);border-width:0}.\[\&_\.node-overview-link\]\:bg-transparent .node-overview-link{background-color:#0000}.\[\&_\.node-overview-link\]\:p-0 .node-overview-link{padding:0}.\[\&_\.node-overview-link\]\:text-start .node-overview-link{text-align:start}.\[\&_\.node-overview-link\]\:text-inherit .node-overview-link{color:inherit}.\[\&_\.node-overview-link\]\:\[font\:inherit\] .node-overview-link{font:inherit}.\[\&_\.node-overview-link\:focus-visible\]\:rounded-xs .node-overview-link:focus-visible{border-radius:4px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-2 .node-overview-link:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-offset-4 .node-overview-link:focus-visible{outline-offset:4px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-accent .node-overview-link:focus-visible{outline-color:var(--accent)}.\[\&_\.node-overview-link\:focus-visible\]\:outline-solid .node-overview-link:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&_\.node-overview-link\:hover_\.node-slug\]\:underline .node-overview-link:hover .node-slug{text-decoration-line:underline}.\[\&_\.node-overview-link\:hover_\.node-slug\]\:underline-offset-\[3px\] .node-overview-link:hover .node-slug{text-underline-offset:3px}.\[\&_\.node-slug\]\:min-w-0 .node-slug{min-width:0}.\[\&_\.node-slug\]\:flex-1 .node-slug{flex:1}.\[\&_\.node-slug\]\:overflow-hidden .node-slug{overflow:hidden}.\[\&_\.node-slug\]\:text-sm .node-slug{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-slug\]\:font-semibold .node-slug{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.node-slug\]\:text-ellipsis .node-slug{text-overflow:ellipsis}.\[\&_\.node-slug\]\:whitespace-nowrap .node-slug{white-space:nowrap}.\[\&_\.node-slug\]\:text-text .node-slug{color:var(--text)}.\[\&_\.node-status\]\:h-2 .node-status{height:calc(var(--spacing) * 2)}.\[\&_\.node-status\]\:w-2 .node-status{width:calc(var(--spacing) * 2)}.\[\&_\.node-status\]\:shrink-0 .node-status{flex-shrink:0}.\[\&_\.node-status\]\:rounded-full .node-status{border-radius:999px}.\[\&_\.node-title\]\:mt-1 .node-title{margin-top:var(--spacing)}.\[\&_\.node-title\]\:line-clamp-2 .node-title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.node-title\]\:text-sm .node-title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-title\]\:text-text .node-title{color:var(--text)}.\[\&_\.openresearch-diff-file\]\:w-full .openresearch-diff-file{width:100%}.\[\&_\.openresearch-diff-file\]\:text-sm .openresearch-diff-file{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.openresearch-diff-file\]\:leading-\[1\.55\] .openresearch-diff-file{--tw-leading:1.55;line-height:1.55}.\[\&_\.openresearch-diff-file\]\:\[--diff-background-color\:var\(--base\)\] .openresearch-diff-file{--diff-background-color:var(--base)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-background-color\:var\(--color-diff-delete-code\)\] .openresearch-diff-file{--diff-code-delete-background-color:var(--color-diff-delete-code)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-edit-background-color\:var\(--color-diff-delete-edit\)\] .openresearch-diff-file{--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-edit-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-delete-edit-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-delete-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-background-color\:var\(--color-diff-insert-code\)\] .openresearch-diff-file{--diff-code-insert-background-color:var(--color-diff-insert-code)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-edit-background-color\:var\(--color-diff-insert-edit\)\] .openresearch-diff-file{--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-edit-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-insert-edit-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-insert-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-selected-background-color\:var\(--diff-selection-background-color\)\] .openresearch-diff-file{--diff-code-selected-background-color:var(--diff-selection-background-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-selected-text-color\:var\(--diff-selection-text-color\)\] .openresearch-diff-file{--diff-code-selected-text-color:var(--diff-selection-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-font-family\:var\(--mono\)\] .openresearch-diff-file{--diff-font-family:var(--mono)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-delete-background-color\:var\(--color-diff-delete-gutter\)\] .openresearch-diff-file{--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-delete-text-color\:var\(--accent-red\)\] .openresearch-diff-file{--diff-gutter-delete-text-color:var(--accent-red)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-insert-background-color\:var\(--color-diff-insert-gutter\)\] .openresearch-diff-file{--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-insert-text-color\:var\(--accent-green\)\] .openresearch-diff-file{--diff-gutter-insert-text-color:var(--accent-green)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-selected-background-color\:var\(--color-diff-gutter-selection\)\] .openresearch-diff-file{--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-selected-text-color\:var\(--diff-selection-text-color\)\] .openresearch-diff-file{--diff-gutter-selected-text-color:var(--diff-selection-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-omit-gutter-line-color\:var\(--color-diff-omit-gutter\)\] .openresearch-diff-file{--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-selection-background-color\:var\(--color-diff-selection\)\] .openresearch-diff-file{--diff-selection-background-color:var(--color-diff-selection)}.\[\&_\.openresearch-diff-file\]\:\[--diff-selection-text-color\:var\(--primary\)\] .openresearch-diff-file{--diff-selection-text-color:var(--primary)}.\[\&_\.openresearch-diff-file\]\:\[--diff-text-color\:var\(--text\)\] .openresearch-diff-file{--diff-text-color:var(--text)}.\[\&_\.openresearch-diff-file_\.diff-code\]\:px-4 .openresearch-diff-file .diff-code{padding-inline:calc(var(--spacing) * 4)}.\[\&_\.openresearch-diff-file_\.diff-code\]\:py-0 .openresearch-diff-file .diff-code{padding-block:0}.\[\&_\.openresearch-diff-file_\.diff-code\]\:break-normal .openresearch-diff-file .diff-code{overflow-wrap:normal;word-break:normal}.\[\&_\.openresearch-diff-file_\.diff-code\]\:wrap-normal .openresearch-diff-file .diff-code{overflow-wrap:normal}.\[\&_\.openresearch-diff-file_\.diff-code\]\:whitespace-pre .openresearch-diff-file .diff-code{white-space:pre}.\[\&_\.openresearch-diff-file_\.diff-hunk_\+_\.diff-hunk_\.diff-line\:first-child_\>_td\]\:border-t .openresearch-diff-file .diff-hunk+.diff-hunk .diff-line:first-child>td{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.openresearch-diff-file_\.diff-hunk_\+_\.diff-hunk_\.diff-line\:first-child_\>_td\]\:border-t-border .openresearch-diff-file .diff-hunk+.diff-hunk .diff-line:first-child>td{border-top-color:var(--border)}.\[\&_\.openresearch-diff-file_\.diff-line\]\:leading-\[1\.55\] .openresearch-diff-file .diff-line{--tw-leading:1.55;line-height:1.55}.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-delete\)\]\:bg-diff-delete-code .openresearch-diff-file .diff-line:has(.diff-code-delete){background-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-delete\)\]\:bg-diff-delete-code .openresearch-diff-file .diff-line:has(.diff-code-delete){background-color:color-mix(in oklab,var(--base) 92%,var(--accent-red))}}.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-insert\)\]\:bg-diff-insert-code .openresearch-diff-file .diff-line:has(.diff-code-insert){background-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-insert\)\]\:bg-diff-insert-code .openresearch-diff-file .diff-line:has(.diff-code-insert){background-color:color-mix(in oklab,var(--base) 91%,var(--accent-green))}}.\[\&_\.openresearch-diff-file\.diff-unified\]\:table-auto .openresearch-diff-file.diff-unified{table-layout:auto}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:first-child\]\:hidden .openresearch-diff-file.diff-unified .diff-line>td:first-child{display:none}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:sticky .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){position:sticky}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:start-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:z-1 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){z-index:1}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:w-\[1\%\] .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){width:1%}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:cursor-default .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){cursor:default}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:border-e .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:border-e-border .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){border-inline-end-color:var(--border)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:ps-3\.5 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-inline-start:calc(var(--spacing) * 3.5)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pe-2\.5 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-inline-end:calc(var(--spacing) * 2.5)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pt-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-top:0}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pb-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-bottom:0}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:text-end .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){text-align:end}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:whitespace-nowrap .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){white-space:nowrap}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:text-diff-gutter-text .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:text-diff-gutter-text .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){color:color-mix(in oklab,var(--text) 45%,var(--base))}}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:select-none .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){-webkit-user-select:none;user-select:none}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:first-child\]\:collapse .openresearch-diff-file.diff-unified col.diff-gutter-col:first-child{visibility:collapse}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:first-child\]\:w-0 .openresearch-diff-file.diff-unified col.diff-gutter-col:first-child{width:0}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:nth-child\(2\)\]\:w-\[1\%\] .openresearch-diff-file.diff-unified col.diff-gutter-col:nth-child(2){width:1%}.\[\&_\.paper-destination\]\:flex .paper-destination{display:flex}.\[\&_\.paper-destination\]\:items-center .paper-destination{align-items:center}.\[\&_\.paper-destination\]\:gap-2\.5 .paper-destination{gap:calc(var(--spacing) * 2.5)}.\[\&_\.paper-destination\]\:rounded-md .paper-destination{border-radius:8px}.\[\&_\.paper-destination\]\:border .paper-destination{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-destination\]\:border-border .paper-destination{border-color:var(--border)}.\[\&_\.paper-destination\]\:bg-background .paper-destination{background-color:var(--base)}.\[\&_\.paper-destination\]\:ps-3 .paper-destination{padding-inline-start:calc(var(--spacing) * 3)}.\[\&_\.paper-destination\]\:pe-2 .paper-destination{padding-inline-end:calc(var(--spacing) * 2)}.\[\&_\.paper-destination\]\:pt-2 .paper-destination{padding-top:calc(var(--spacing) * 2)}.\[\&_\.paper-destination\]\:pb-2 .paper-destination{padding-bottom:calc(var(--spacing) * 2)}.\[\&_\.paper-destination_\.btn\]\:flex-none .paper-destination .btn{flex:none}.\[\&_\.paper-destination_code\]\:min-w-0 .paper-destination code{min-width:0}.\[\&_\.paper-destination_code\]\:flex-1 .paper-destination code{flex:1}.\[\&_\.paper-destination_code\]\:overflow-hidden .paper-destination code{overflow:hidden}.\[\&_\.paper-destination_code\]\:text-sm .paper-destination code{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-destination_code\]\:font-normal .paper-destination code{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.paper-destination_code\]\:text-ellipsis .paper-destination code{text-overflow:ellipsis}.\[\&_\.paper-destination_code\]\:whitespace-nowrap .paper-destination code{white-space:nowrap}.\[\&_\.paper-destination_code\]\:text-text .paper-destination code{color:var(--text)}.\[\&_\.paper-pick\]\:flex .paper-pick{display:flex}.\[\&_\.paper-pick\]\:items-center .paper-pick{align-items:center}.\[\&_\.paper-pick\]\:justify-between .paper-pick{justify-content:space-between}.\[\&_\.paper-pick\]\:gap-2\.5 .paper-pick{gap:calc(var(--spacing) * 2.5)}.\[\&_\.paper-pick\]\:rounded-md .paper-pick{border-radius:8px}.\[\&_\.paper-pick\]\:border .paper-pick{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-pick\]\:border-border .paper-pick{border-color:var(--border)}.\[\&_\.paper-pick\]\:bg-surface .paper-pick{background-color:var(--surface)}.\[\&_\.paper-pick\]\:px-3 .paper-pick{padding-inline:calc(var(--spacing) * 3)}.\[\&_\.paper-pick\]\:py-2\.5 .paper-pick{padding-block:calc(var(--spacing) * 2.5)}.\[\&_\.paper-pick_\.id\]\:text-xs .paper-pick .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.paper-pick_\.id\]\:text-muted .paper-pick .id{color:var(--muted)}.\[\&_\.paper-pick_\.meta\]\:min-w-0 .paper-pick .meta{min-width:0}.\[\&_\.paper-pick_\.title\]\:text-sm .paper-pick .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-pick_\.title\]\:font-medium .paper-pick .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.paper-results\]\:flex .paper-results{display:flex}.\[\&_\.paper-results\]\:max-h-60 .paper-results{max-height:calc(var(--spacing) * 60)}.\[\&_\.paper-results\]\:flex-col .paper-results{flex-direction:column}.\[\&_\.paper-results\]\:overflow-y-auto .paper-results{overflow-y:auto}.\[\&_\.paper-results\]\:rounded-md .paper-results{border-radius:8px}.\[\&_\.paper-results\]\:border .paper-results{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-results\]\:border-border .paper-results{border-color:var(--border)}.\[\&_\.paper-results_\.id\]\:text-xs .paper-results .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.paper-results_\.id\]\:text-muted .paper-results .id{color:var(--muted)}.\[\&_\.paper-results_\.title\]\:text-sm .paper-results .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-results_\.title\]\:font-medium .paper-results .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.paper-results_button\]\:flex .paper-results button{display:flex}.\[\&_\.paper-results_button\]\:cursor-pointer .paper-results button{cursor:pointer}.\[\&_\.paper-results_button\]\:flex-col .paper-results button{flex-direction:column}.\[\&_\.paper-results_button\]\:items-start .paper-results button{align-items:flex-start}.\[\&_\.paper-results_button\]\:gap-0\.5 .paper-results button{gap:calc(var(--spacing) * .5)}.\[\&_\.paper-results_button\]\:border-0 .paper-results button{border-style:var(--tw-border-style);border-width:0}.\[\&_\.paper-results_button\]\:border-b .paper-results button{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_\.paper-results_button\]\:border-b-border-variant .paper-results button{border-bottom-color:var(--border-variant)}.\[\&_\.paper-results_button\]\:bg-transparent .paper-results button{background-color:#0000}.\[\&_\.paper-results_button\]\:bg-none .paper-results button{background-image:none}.\[\&_\.paper-results_button\]\:px-2\.5 .paper-results button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.paper-results_button\]\:py-2 .paper-results button{padding-block:calc(var(--spacing) * 2)}.\[\&_\.paper-results_button\]\:text-start .paper-results button{text-align:start}.\[\&_\.paper-results_button\]\:text-text .paper-results button{color:var(--text)}.\[\&_\.paper-results_button\]\:\[font\:inherit\] .paper-results button{font:inherit}.\[\&_\.paper-results_button\:hover\]\:bg-surface .paper-results button:hover{background-color:var(--surface)}.\[\&_\.paper-results_button\:last-child\]\:border-b-0 .paper-results button:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_\.path\]\:flex .path{display:flex}.\[\&_\.path\]\:min-w-0 .path{min-width:0}.\[\&_\.path\]\:flex-1 .path{flex:1}.\[\&_\.path\]\:items-center .path{align-items:center}.\[\&_\.path\]\:gap-2 .path{gap:calc(var(--spacing) * 2)}.\[\&_\.path_code\]\:min-w-0 .path code{min-width:0}.\[\&_\.path_code\]\:flex-1 .path code{flex:1}.\[\&_\.path_code\]\:overflow-hidden .path code{overflow:hidden}.\[\&_\.path_code\]\:font-mono .path code{font-family:var(--mono)}.\[\&_\.path_code\]\:text-xs .path code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.path_code\]\:font-semibold .path code{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.path_code\]\:text-ellipsis .path code{text-overflow:ellipsis}.\[\&_\.path_code\]\:whitespace-nowrap .path code{white-space:nowrap}.\[\&_\.path_code\]\:text-text .path code{color:var(--text)}.\[\&_\.progress\]\:mx-0 .progress{margin-inline:0}.\[\&_\.progress\]\:mt-2 .progress{margin-top:calc(var(--spacing) * 2)}.\[\&_\.progress\]\:mb-0 .progress{margin-bottom:0}.\[\&_\.progress-track\]\:h-\[5px\] .progress-track{height:5px}.\[\&_\.progress-track\]\:border-0 .progress-track{border-style:var(--tw-border-style);border-width:0}.\[\&_\.progress-track\]\:bg-border .progress-track{background-color:var(--border)}.\[\&_\.project-back\]\:shrink-0 .project-back{flex-shrink:0}.\[\&_\.project-chevron\]\:text-muted .project-chevron{color:var(--muted)}.\[\&_\.project-chevron\]\:opacity-0 .project-chevron{opacity:0}.\[\&_\.project-chevron\]\:transition-transform .project-chevron{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_\.project-chevron\]\:duration-120 .project-chevron{--tw-duration:.12s;transition-duration:.12s}.\[\&_\.project-chevron\]\:ease-standard .project-chevron{--tw-ease:ease;transition-timing-function:ease}.\[\&_\.project-default-title\]\:text-base .project-default-title,.\[\&_\.project-field-label\]\:text-base .project-field-label{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-field-label\]\:font-medium .project-field-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.project-field-label\]\:text-text .project-field-label{color:var(--text)}.\[\&_\.project-location-field\]\:flex .project-location-field{display:flex}.\[\&_\.project-location-field\]\:flex-col .project-location-field{flex-direction:column}.\[\&_\.project-location-field\]\:gap-2 .project-location-field{gap:calc(var(--spacing) * 2)}.\[\&_\.project-location-label\]\:text-base .project-location-label{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-location-label\]\:font-medium .project-location-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.project-location-label\]\:text-text .project-location-label{color:var(--text)}.\[\&_\.project-menu\]\:start-0 .project-menu{inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\.project-menu\]\:z-70 .project-menu{z-index:70}.\[\&_\.project-menu\]\:w-52\.5 .project-menu{width:calc(var(--spacing) * 52.5)}.\[\&_\.project-path-notice\]\:rounded-sm .project-path-notice{border-radius:6px}.\[\&_\.project-path-notice\]\:border .project-path-notice{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.project-path-notice\]\:border-border-variant .project-path-notice{border-color:var(--border-variant)}.\[\&_\.project-path-notice\]\:bg-surface .project-path-notice{background-color:var(--surface)}.\[\&_\.project-path-notice\]\:px-\[11px\] .project-path-notice{padding-inline:11px}.\[\&_\.project-path-notice\]\:py-\[9px\] .project-path-notice{padding-block:9px}.\[\&_\.project-path-notice\]\:text-base .project-path-notice{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-path-notice\]\:text-sm .project-path-notice{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.project-path-notice\]\:leading-\[1\.4\] .project-path-notice{--tw-leading:1.4;line-height:1.4}.\[\&_\.project-path-notice\]\:leading-relaxed .project-path-notice{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_\.project-path-notice\]\:text-subtext .project-path-notice{color:var(--subtext)}.\[\&_\.project-path-notice\]\:text-text .project-path-notice{color:var(--text)}.\[\&_\.project-path-notice\.error\]\:border-danger-notice-border .project-path-notice.error{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.project-path-notice\.error\]\:border-danger-notice-border .project-path-notice.error{border-color:color-mix(in srgb,var(--accent-red) 35%,var(--border-variant))}}.\[\&_\.project-switcher\]\:relative .project-switcher{position:relative}.\[\&_\.project-switcher\]\:min-w-0 .project-switcher{min-width:0}.\[\&_\.project-switcher\]\:flex-1 .project-switcher{flex:1}.\[\&_\.project-switcher\]\:self-stretch .project-switcher{align-self:stretch}.\[\&_\.rail-body\]\:min-h-0 .rail-body{min-height:0}.\[\&_\.rail-body\]\:flex-1 .rail-body{flex:1}.\[\&_\.rail-body\]\:overflow-y-auto .rail-body{overflow-y:auto}.\[\&_\.rail-body\]\:px-2 .rail-body{padding-inline:calc(var(--spacing) * 2)}.\[\&_\.rail-body\]\:py-1 .rail-body{padding-block:var(--spacing)}.\[\&_\.react-flow\\_\\_attribution\]\:hidden\! .react-flow__attribution{display:none!important}.\[\&_\.react-flow\\_\\_handle\]\:pointer-events-none .react-flow__handle{pointer-events:none}.\[\&_\.react-flow\\_\\_handle\]\:opacity-0 .react-flow__handle{opacity:0}.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-elided\.selectable\]\:cursor-pointer .react-flow__node.react-flow__node-elided.selectable{cursor:pointer}.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-exp\.selectable\]\:cursor-default .react-flow__node.react-flow__node-exp.selectable{cursor:default}.\[\&_\.repo-hint\]\:text-sm .repo-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.repo-hint\]\:font-normal .repo-hint{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.repo-hint\]\:text-muted .repo-hint{color:var(--muted)}.\[\&_\.repo-hint\.ok\]\:text-accent-teal .repo-hint.ok{color:var(--accent-teal)}.\[\&_\.row2\]\:grid .row2{display:grid}.\[\&_\.row2\]\:grid-cols-2 .row2{grid-template-columns:repeat(2,minmax(0,1fr))}.\[\&_\.row2\]\:gap-2\.5 .row2{gap:calc(var(--spacing) * 2.5)}.\[\&_\.run-chip_svg\]\:text-primary .run-chip svg{color:var(--primary)}.\[\&_\.run-chip_svg\]\:opacity-100 .run-chip svg{opacity:1}.\[\&_\.sel\]\:font-medium .sel{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.sel\]\:text-text .sel{color:var(--text)}.\[\&_\.session-dot\]\:inline-flex .session-dot{display:inline-flex}.\[\&_\.session-dot\]\:w-3\.5 .session-dot{width:calc(var(--spacing) * 3.5)}.\[\&_\.session-dot\]\:shrink-0 .session-dot{flex-shrink:0}.\[\&_\.session-dot\]\:items-center .session-dot{align-items:center}.\[\&_\.session-dot\]\:justify-center .session-dot{justify-content:center}.\[\&_\.session-menu-btn\]\:mx-0 .session-menu-btn{margin-inline:0}.\[\&_\.session-menu-btn\]\:-my-0\.5 .session-menu-btn{margin-block:calc(var(--spacing) * -.5)}.\[\&_\.session-menu-btn\]\:hidden .session-menu-btn{display:none}.\[\&_\.session-menu-btn\]\:h-4 .session-menu-btn{height:calc(var(--spacing) * 4)}.\[\&_\.session-menu-btn\]\:w-4 .session-menu-btn{width:calc(var(--spacing) * 4)}.\[\&_\.session-menu-btn\]\:shrink-0 .session-menu-btn{flex-shrink:0}.\[\&_\.session-menu-btn\]\:items-center .session-menu-btn{align-items:center}.\[\&_\.session-menu-btn\]\:justify-center .session-menu-btn{justify-content:center}.\[\&_\.session-menu-btn\]\:rounded-sm .session-menu-btn{border-radius:6px}.\[\&_\.session-menu-btn\]\:text-muted .session-menu-btn{color:var(--muted)}.\[\&_\.session-menu-btn\:hover\]\:bg-panel .session-menu-btn:hover{background-color:var(--panel)}.\[\&_\.session-menu-btn\:hover\]\:text-text .session-menu-btn:hover{color:var(--text)}.\[\&_\.session-time\]\:shrink-0 .session-time{flex-shrink:0}.\[\&_\.session-time\]\:text-xs .session-time{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.session-time\]\:text-muted .session-time{color:var(--muted)}.\[\&_\.session-title\]\:min-w-0 .session-title{min-width:0}.\[\&_\.session-title\]\:flex-1 .session-title{flex:1}.\[\&_\.session-title\]\:overflow-hidden .session-title{overflow:hidden}.\[\&_\.session-title\]\:text-ellipsis .session-title{text-overflow:ellipsis}.\[\&_\.session-title\]\:whitespace-nowrap .session-title{white-space:nowrap}.\[\&_\.session-title-input\]\:mx-0 .session-title-input{margin-inline:0}.\[\&_\.session-title-input\]\:-my-0\.5 .session-title-input{margin-block:calc(var(--spacing) * -.5)}.\[\&_\.session-title-input\]\:min-w-0 .session-title-input{min-width:0}.\[\&_\.session-title-input\]\:flex-1 .session-title-input{flex:1}.\[\&_\.session-title-input\]\:rounded-sm .session-title-input{border-radius:6px}.\[\&_\.session-title-input\]\:border .session-title-input{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.session-title-input\]\:border-primary .session-title-input{border-color:var(--primary)}.\[\&_\.session-title-input\]\:bg-background .session-title-input{background-color:var(--base)}.\[\&_\.session-title-input\]\:px-\[5px\] .session-title-input{padding-inline:5px}.\[\&_\.session-title-input\]\:py-px .session-title-input{padding-block:1px}.\[\&_\.session-title-input\]\:text-text .session-title-input{color:var(--text)}.\[\&_\.session-title-input\]\:outline-none .session-title-input{--tw-outline-style:none;outline-style:none}.\[\&_\.session-title-input\]\:\[font\:inherit\] .session-title-input{font:inherit}.\[\&_\.settings-card\]\:mb-0 .settings-card,.\[\&_\.settings-card-head\]\:mb-0 .settings-card-head{margin-bottom:0}.\[\&_\.settings-card-head\]\:justify-between .settings-card-head{justify-content:space-between}.\[\&_\.settings-card-head\]\:pb-3 .settings-card-head{padding-bottom:calc(var(--spacing) * 3)}.\[\&_\.settings-card-head_h3\]\:m-0 .settings-card-head h3{margin:0}.\[\&_\.settings-form\]\:mt-6 .settings-form{margin-top:calc(var(--spacing) * 6)}.\[\&_\.settings-form\]\:border-t-0 .settings-form{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&_\.settings-form\]\:pt-0 .settings-form{padding-top:0}.\[\&_\.settings-sub\]\:mb-3 .settings-sub{margin-bottom:calc(var(--spacing) * 3)}.\[\&_\.skill-chip\]\:me-0\.5 .skill-chip{margin-inline-end:calc(var(--spacing) * .5)}.\[\&_\.skill-chip\]\:align-baseline .skill-chip{vertical-align:baseline}.\[\&_\.skill-desc\]\:text-sm .skill-desc{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.skill-desc\]\:text-subtext .skill-desc{color:var(--subtext)}.\[\&_\.skill-name\]\:text-sm .skill-name{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.spinner\]\:h-5\.5 .spinner{height:calc(var(--spacing) * 5.5)}.\[\&_\.spinner\]\:w-5\.5 .spinner{width:calc(var(--spacing) * 5.5)}.\[\&_\.spinner\]\:border-\[3px\] .spinner{border-style:var(--tw-border-style);border-width:3px}.\[\&_\.stats\]\:flex .stats{display:flex}.\[\&_\.stats\]\:shrink-0 .stats{flex-shrink:0}.\[\&_\.stats\]\:items-center .stats{align-items:center}.\[\&_\.stats\]\:gap-2 .stats{gap:calc(var(--spacing) * 2)}.\[\&_\.stats\]\:font-mono .stats{font-family:var(--mono)}.\[\&_\.stats\]\:text-xs .stats{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.stats\]\:font-medium .stats{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.stats\]\:tabular-nums .stats{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.\[\&_\.status-badge\]\:text-text .status-badge{color:var(--text)}.\[\&_\.tab-close\]\:inline-flex .tab-close{display:inline-flex}.\[\&_\.tab-close\]\:h-3\.5 .tab-close{height:calc(var(--spacing) * 3.5)}.\[\&_\.tab-close\]\:w-3\.5 .tab-close{width:calc(var(--spacing) * 3.5)}.\[\&_\.tab-close\]\:shrink-0 .tab-close{flex-shrink:0}.\[\&_\.tab-close\]\:items-center .tab-close{align-items:center}.\[\&_\.tab-close\]\:justify-center .tab-close{justify-content:center}.\[\&_\.tab-close\]\:rounded-xs .tab-close{border-radius:4px}.\[\&_\.tab-close\]\:text-muted .tab-close{color:var(--muted)}.\[\&_\.tab-close\:hover\]\:bg-hover-strong .tab-close:hover{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.tab-close\:hover\]\:bg-hover-strong .tab-close:hover{background-color:color-mix(in oklab,var(--text) 15%,transparent)}}.\[\&_\.tab-close\:hover\]\:text-text .tab-close:hover{color:var(--text)}.\[\&_\.tab-label\]\:grid .tab-label{display:grid}.\[\&_\.tab-label\]\:min-w-0 .tab-label{min-width:0}.\[\&_\.tab-label\]\:grid-cols-\[minmax\(0\,_1fr\)\] .tab-label{grid-template-columns:minmax(0,1fr)}.\[\&_\.tab-label\]\:overflow-hidden .tab-label,.\[\&_\.tab-label_\>_span\]\:overflow-hidden .tab-label>span{overflow:hidden}.\[\&_\.tab-label_\>_span\]\:pe-1 .tab-label>span{padding-inline-end:var(--spacing)}.\[\&_\.tab-label_\>_span\]\:text-ellipsis .tab-label>span{text-overflow:ellipsis}.\[\&_\.tab-label_\>_span\]\:whitespace-nowrap .tab-label>span{white-space:nowrap}.\[\&_\.tab-label_\>_span\]\:\[grid-area\:1_\/_1\] .tab-label>span{grid-area:1/1}.\[\&_\.tab-label\:\:after\]\:invisible .tab-label:after{visibility:hidden}.\[\&_\.tab-label\:\:after\]\:overflow-hidden .tab-label:after{overflow:hidden}.\[\&_\.tab-label\:\:after\]\:pe-1 .tab-label:after{padding-inline-end:var(--spacing)}.\[\&_\.tab-label\:\:after\]\:font-medium .tab-label:after{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.tab-label\:\:after\]\:text-ellipsis .tab-label:after{text-overflow:ellipsis}.\[\&_\.tab-label\:\:after\]\:whitespace-nowrap .tab-label:after{white-space:nowrap}.\[\&_\.tab-label\:\:after\]\:content-\[attr\(data-label\)\] .tab-label:after{--tw-content:attr(data-label);content:var(--tw-content)}.\[\&_\.tab-label\:\:after\]\:\[grid-area\:1_\/_1\] .tab-label:after{grid-area:1/1}.\[\&_\.title\]\:max-w-60 .title{max-width:calc(var(--spacing) * 60)}.\[\&_\.title\]\:overflow-hidden .title{overflow:hidden}.\[\&_\.title\]\:text-sm .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.title\]\:font-medium .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.title\]\:text-ellipsis .title{text-overflow:ellipsis}.\[\&_\.title\]\:whitespace-nowrap .title{white-space:nowrap}.\[\&_\.unread-dot\]\:h-\[7px\] .unread-dot{height:7px}.\[\&_\.unread-dot\]\:w-\[7px\] .unread-dot{width:7px}.\[\&_\.unread-dot\]\:shrink-0 .unread-dot{flex-shrink:0}.\[\&_\.unread-dot\]\:rounded-full .unread-dot{border-radius:999px}.\[\&_\.unread-dot\]\:bg-primary .unread-dot{background-color:var(--primary)}.\[\&_\.v\]\:flex .v{display:flex}.\[\&_\.v\]\:min-w-0 .v{min-width:0}.\[\&_\.v\]\:flex-wrap .v{flex-wrap:wrap}.\[\&_\.v\]\:items-center .v{align-items:center}.\[\&_\.v\]\:gap-2 .v{gap:calc(var(--spacing) * 2)}.\[\&_\.v\]\:font-sans .v{font-family:var(--sans)}.\[\&_\.v\]\:text-base .v{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.v\]\:break-words .v{overflow-wrap:break-word}.\[\&_\.v\]\:break-all .v{word-break:break-all}.\[\&_\.v\]\:text-text .v{color:var(--text)}.\[\&_\:where\(\[data-tip\]\)\]\:relative :where([data-tip]){position:relative}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:pointer-events-none :where([data-tip]):after{pointer-events:none}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:invisible :where([data-tip]):after{visibility:hidden}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:absolute :where([data-tip]):after{position:absolute}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:top-\[calc\(100\%_\+_6px\)\] :where([data-tip]):after{top:calc(100% + 6px)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:left-1\/2 :where([data-tip]):after{left:50%}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:z-\[9999\] :where([data-tip]):after{z-index:9999}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:w-max :where([data-tip]):after{width:max-content}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:max-w-none :where([data-tip]):after{max-width:none}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:-translate-x-1\/2 :where([data-tip]):after{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:rounded-sm :where([data-tip]):after{border-radius:6px}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:bg-text :where([data-tip]):after{background-color:var(--text)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:px-2 :where([data-tip]):after{padding-inline:calc(var(--spacing) * 2)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:py-\[5px\] :where([data-tip]):after{padding-block:5px}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:text-xs :where([data-tip]):after{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:leading-none :where([data-tip]):after{--tw-leading:1;line-height:1}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:font-medium :where([data-tip]):after{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:whitespace-nowrap :where([data-tip]):after{white-space:nowrap}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:text-background :where([data-tip]):after{color:var(--base)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:opacity-0 :where([data-tip]):after{opacity:0}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:content-\[attr\(data-tip\)\] :where([data-tip]):after{--tw-content:attr(data-tip);content:var(--tw-content)}.\[\&_\:where\(\[data-tip\]\)\:is\(\:hover\,\:focus-visible\)\:\:after\]\:visible :where([data-tip]):is(:hover,:focus-visible):after{visibility:visible}.\[\&_\:where\(\[data-tip\]\)\:is\(\:hover\,\:focus-visible\)\:\:after\]\:opacity-100 :where([data-tip]):is(:hover,:focus-visible):after{opacity:1}.\[\&_\>_\*\:first-child\]\:mt-0>:first-child{margin-top:0}.\[\&_\>_\*\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\>_\.changes-note\]\:mx-4>.changes-note{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.changes-note\]\:my-3\.5>.changes-note{margin-block:calc(var(--spacing) * 3.5)}.\[\&_\>_\.diff-explorer\]\:mx-4>.diff-explorer{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.diff-explorer\]\:mt-3\.5>.diff-explorer{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.diff-explorer\]\:mb-0>.diff-explorer{margin-bottom:0}.\[\&_\>_\.error\]\:mx-0>.error{margin-inline:0}.\[\&_\>_\.error\]\:mt-0>.error{margin-top:0}.\[\&_\>_\.error\]\:mt-3\.5>.error{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.error\]\:mb-3>.error{margin-bottom:calc(var(--spacing) * 3)}.\[\&_\>_\.error\]\:text-base>.error{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\>_\.error\]\:whitespace-pre-wrap>.error{white-space:pre-wrap}.\[\&_\>_\.error\]\:text-accent-red>.error{color:var(--accent-red)}.\[\&_\>_\.openresearch-diff\]\:mx-4>.openresearch-diff{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.openresearch-diff\]\:mt-3\.5>.openresearch-diff{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.openresearch-diff\]\:mb-0>.openresearch-diff{margin-bottom:0}.\[\&_\>_\.project-default-row\:first-child\]\:border-t-0>.project-default-row:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&_\>_\.project-default-row\:first-child\]\:pt-0>.project-default-row:first-child{padding-top:0}.\[\&_\>_\.seg\]\:rounded-sm>.seg{border-radius:6px}.\[\&_\>_\.seg\]\:p-0\.5>.seg{padding:calc(var(--spacing) * .5)}.\[\&_\>_\.seg_button\]\:px-2>.seg button{padding-inline:calc(var(--spacing) * 2)}.\[\&_\>_\.seg_button\]\:py-0\.5>.seg button{padding-block:calc(var(--spacing) * .5)}.\[\&_\>_\.seg_button\]\:text-sm>.seg button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\>_\.seg_button\]\:font-medium>.seg button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\>_\.truncated-notice\]\:mx-4>.truncated-notice{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.truncated-notice\]\:mt-3\.5>.truncated-notice{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.truncated-notice\]\:mb-0>.truncated-notice{margin-bottom:0}.\[\&_\>_\:first-child\]\:mt-3\.5>:first-child{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\>_h2\]\:mx-0>h2{margin-inline:0}.\[\&_\>_h2\]\:mt-0>h2{margin-top:0}.\[\&_\>_h2\]\:mb-1\.5>h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_\>_h2\]\:text-xl>h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\>_label\]\:gap-2>label{gap:calc(var(--spacing) * 2)}.\[\&_\>_p\]\:m-0>p{margin:0}.\[\&_\>_p\]\:text-sm>p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\>_p\]\:leading-relaxed>p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_\>_p\]\:text-text>p{color:var(--text)}.\[\&_\>_span\]\:inline-flex>span{display:inline-flex}.\[\&_\>_span\]\:items-center>span{align-items:center}.\[\&_\>_span\]\:gap-\[5px\]>span{gap:5px}.\[\&_\>_svg\]\:shrink-0>svg{flex-shrink:0}.\[\&_\>_svg\]\:text-muted>svg{color:var(--muted)}.\[\&_\>_svg\]\:text-subtext>svg{color:var(--subtext)}.\[\&_\>_svg\.file-tree-chevron\]\:text-muted>svg.file-tree-chevron{color:var(--muted)}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:start-auto [data-tip-align=end]:after{inset-inline-start:auto}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:end-0 [data-tip-align=end]:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:translate-none [data-tip-align=end]:after{translate:none}.\[\&_\[data-tip-align\=\'start\'\]\:\:after\]\:start-0 [data-tip-align=start]:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\[data-tip-align\=\'start\'\]\:\:after\]\:translate-none [data-tip-align=start]:after{translate:none}.\[\&_a\]\:text-sm a{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_a\]\:whitespace-nowrap a{white-space:nowrap}.\[\&_a\]\:text-primary a{color:var(--primary)}.\[\&_a\]\:text-subtext a{color:var(--subtext)}.\[\&_blockquote\]\:mx-0 blockquote{margin-inline:0}.\[\&_blockquote\]\:my-1\.5 blockquote{margin-block:calc(var(--spacing) * 1.5)}.\[\&_blockquote\]\:border-s-\[3px\] blockquote{border-inline-start-style:var(--tw-border-style);border-inline-start-width:3px}.\[\&_blockquote\]\:border-s-border blockquote{border-inline-start-color:var(--border)}.\[\&_blockquote\]\:ps-2\.5 blockquote{padding-inline-start:calc(var(--spacing) * 2.5)}.\[\&_blockquote\]\:pe-0 blockquote{padding-inline-end:0}.\[\&_blockquote\]\:pt-0\.5 blockquote{padding-top:calc(var(--spacing) * .5)}.\[\&_blockquote\]\:pb-0\.5 blockquote{padding-bottom:calc(var(--spacing) * .5)}.\[\&_blockquote\]\:text-subtext blockquote{color:var(--subtext)}.\[\&_button\]\:absolute button{position:absolute}.\[\&_button\]\:-top-\[5px\] button{top:-5px}.\[\&_button\]\:-right-\[5px\] button{right:-5px}.\[\&_button\]\:-mb-px button{margin-bottom:-1px}.\[\&_button\]\:flex button{display:flex}.\[\&_button\]\:grid button{display:grid}.\[\&_button\]\:inline-flex button{display:inline-flex}.\[\&_button\]\:h-4 button{height:calc(var(--spacing) * 4)}.\[\&_button\]\:w-4 button{width:calc(var(--spacing) * 4)}.\[\&_button\]\:w-full button{width:100%}.\[\&_button\]\:cursor-pointer button{cursor:pointer}.\[\&_button\]\:grid-cols-\[18px_minmax\(0\,_1fr\)_auto_auto\] button{grid-template-columns:18px minmax(0,1fr) auto auto}.\[\&_button\]\:grid-cols-\[minmax\(72px\,_0\.7fr\)_minmax\(100px\,_1fr\)_minmax\(70px\,_0\.7fr\)_60px_16px\] button{grid-template-columns:minmax(72px,.7fr) minmax(100px,1fr) minmax(70px,.7fr) 60px 16px}.\[\&_button\]\:flex-col button{flex-direction:column}.\[\&_button\]\:items-center button{align-items:center}.\[\&_button\]\:items-start button{align-items:flex-start}.\[\&_button\]\:justify-center button{justify-content:center}.\[\&_button\]\:gap-0\.5 button{gap:calc(var(--spacing) * .5)}.\[\&_button\]\:gap-3\.5 button{gap:calc(var(--spacing) * 3.5)}.\[\&_button\]\:gap-\[7px\] button{gap:7px}.\[\&_button\]\:rounded-full button{border-radius:999px}.\[\&_button\]\:rounded-sm button{border-radius:6px}.\[\&_button\]\:rounded-xs button{border-radius:4px}.\[\&_button\]\:border button{border-style:var(--tw-border-style);border-width:1px}.\[\&_button\]\:border-0 button{border-style:var(--tw-border-style);border-width:0}.\[\&_button\]\:border-b button{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_button\]\:border-b-2 button{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.\[\&_button\]\:border-border button{border-color:var(--border)}.\[\&_button\]\:border-b-border-variant button{border-bottom-color:var(--border-variant)}.\[\&_button\]\:border-b-transparent button{border-bottom-color:#0000}.\[\&_button\]\:bg-surface button{background-color:var(--surface)}.\[\&_button\]\:bg-transparent button{background-color:#0000}.\[\&_button\]\:bg-none button{background-image:none}.\[\&_button\]\:p-0 button{padding:0}.\[\&_button\]\:p-0\.5 button{padding:calc(var(--spacing) * .5)}.\[\&_button\]\:px-0 button{padding-inline:0}.\[\&_button\]\:px-0\.5 button{padding-inline:calc(var(--spacing) * .5)}.\[\&_button\]\:px-2 button{padding-inline:calc(var(--spacing) * 2)}.\[\&_button\]\:px-2\.5 button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_button\]\:px-3 button{padding-inline:calc(var(--spacing) * 3)}.\[\&_button\]\:px-\[9px\] button{padding-inline:9px}.\[\&_button\]\:py-0\.5 button{padding-block:calc(var(--spacing) * .5)}.\[\&_button\]\:py-2 button{padding-block:calc(var(--spacing) * 2)}.\[\&_button\]\:py-\[3px\] button{padding-block:3px}.\[\&_button\]\:py-\[7px\] button{padding-block:7px}.\[\&_button\]\:py-\[11px\] button{padding-block:11px}.\[\&_button\]\:text-start button{text-align:start}.\[\&_button\]\:text-sm button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_button\]\:font-medium button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_button\]\:text-muted button{color:var(--muted)}.\[\&_button\]\:text-text button{color:var(--text)}.\[\&_button\]\:\[font\:inherit\] button{font:inherit}.\[\&_button\.active\]\:border-b-primary button.active{border-bottom-color:var(--primary)}.\[\&_button\.active\]\:bg-background button.active{background-color:var(--base)}.\[\&_button\.active\]\:bg-surface button.active{background-color:var(--surface)}.\[\&_button\.active\]\:shadow-diff-active button.active{--tw-shadow:inset 2px 0 0 var(--tw-shadow-color,var(--text));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_button\.active\]\:shadow-segment button.active{--tw-shadow:0 1px 3px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.\[\&_button\.active\]\:shadow-segment button.active{--tw-shadow:0 1px 3px var(--tw-shadow-color,color-mix(in oklab, var(--text) 25%, transparent))}}.\[\&_button\.active\]\:shadow-segment button.active{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_button\:disabled\]\:cursor-default button:disabled{cursor:default}.\[\&_button\:disabled\]\:text-muted button:disabled{color:var(--muted)}.\[\&_button\:hover\]\:bg-panel button:hover{background-color:var(--panel)}.\[\&_button\:hover\]\:bg-surface button:hover{background-color:var(--surface)}.\[\&_button\:hover\]\:bg-text button:hover{background-color:var(--text)}.\[\&_button\:hover\]\:text-background button:hover{color:var(--base)}.\[\&_button\:hover\]\:text-text button:hover{color:var(--text)}.\[\&_button\:hover\]\:underline button:hover{text-decoration-line:underline}.\[\&_button\:hover\]\:underline-offset-2 button:hover{text-underline-offset:2px}.\[\&_button\:last-child\]\:border-b-0 button:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_button\:not\(\:disabled\)\:hover\]\:text-text button:not(:disabled):hover{color:var(--text)}.\[\&_code\]\:min-w-0 code{min-width:0}.\[\&_code\]\:flex-1 code{flex:1}.\[\&_code\]\:overflow-hidden code{overflow:hidden}.\[\&_code\]\:rounded-xs code{border-radius:4px}.\[\&_code\]\:border code{border-style:var(--tw-border-style);border-width:1px}.\[\&_code\]\:border-border-variant code{border-color:var(--border-variant)}.\[\&_code\]\:bg-panel code{background-color:var(--panel)}.\[\&_code\]\:px-\[5px\] code{padding-inline:5px}.\[\&_code\]\:py-px code{padding-block:1px}.\[\&_code\]\:text-left code{text-align:left}.\[\&_code\]\:font-mono code{font-family:var(--mono)}.\[\&_code\]\:text-sm code{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_code\]\:text-xs code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_code\]\:font-medium code{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_code\]\:text-ellipsis code{text-overflow:ellipsis}.\[\&_code\]\:whitespace-nowrap code{white-space:nowrap}.\[\&_code\]\:text-muted code{color:var(--muted)}.\[\&_code\]\:text-primary code{color:var(--primary)}.\[\&_code\]\:text-text code{color:var(--text)}.\[\&_code\]\:\[direction\:rtl\] code{direction:rtl}.\[\&_h1\]\:m-0 h1{margin:0}.\[\&_h1\]\:mx-0 h1{margin-inline:0}.\[\&_h1\]\:mt-0 h1{margin-top:0}.\[\&_h1\]\:mt-3 h1{margin-top:calc(var(--spacing) * 3)}.\[\&_h1\]\:mt-7 h1{margin-top:calc(var(--spacing) * 7)}.\[\&_h1\]\:mb-1\.5 h1{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h1\]\:mb-3\.5 h1{margin-bottom:calc(var(--spacing) * 3.5)}.\[\&_h1\]\:text-3xl h1{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\[\&_h1\]\:text-4xl h1{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.\[\&_h1\]\:text-xl h1{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h1\]\:text-prose-emphasis h1{font-size:1.05em}.\[\&_h1\]\:leading-\[1\.18\] h1{--tw-leading:1.18;line-height:1.18}.\[\&_h1\]\:leading-tight h1{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\[\&_h1\]\:font-semibold h1{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h1\]\:text-text h1{color:var(--text)}.\[\&_h2\]\:m-0 h2{margin:0}.\[\&_h2\]\:mx-0 h2{margin-inline:0}.\[\&_h2\]\:mt-0 h2{margin-top:0}.\[\&_h2\]\:mt-3 h2{margin-top:calc(var(--spacing) * 3)}.\[\&_h2\]\:mt-7 h2{margin-top:calc(var(--spacing) * 7)}.\[\&_h2\]\:mb-1\.5 h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h2\]\:mb-2\.5 h2{margin-bottom:calc(var(--spacing) * 2.5)}.\[\&_h2\]\:mb-3\.5 h2{margin-bottom:calc(var(--spacing) * 3.5)}.\[\&_h2\]\:flex h2{display:flex}.\[\&_h2\]\:items-center h2{align-items:center}.\[\&_h2\]\:gap-2 h2{gap:calc(var(--spacing) * 2)}.\[\&_h2\]\:text-3xl h2{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\[\&_h2\]\:text-4xl h2{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.\[\&_h2\]\:text-5xl h2{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.\[\&_h2\]\:text-lg h2{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_h2\]\:text-sm h2{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_h2\]\:text-xl h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h2\]\:text-prose-emphasis h2{font-size:1.05em}.\[\&_h2\]\:leading-tight h2{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\[\&_h2\]\:font-medium h2{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_h2\]\:font-semibold h2{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h2\]\:tracking-\[-0\.02em\] h2{--tw-tracking:-.02em;letter-spacing:-.02em}.\[\&_h2\]\:tracking-\[-0\.015em\] h2{--tw-tracking:-.015em;letter-spacing:-.015em}.\[\&_h2\]\:text-text h2{color:var(--text)}.\[\&_h3\]\:mx-0 h3{margin-inline:0}.\[\&_h3\]\:mt-0 h3{margin-top:0}.\[\&_h3\]\:mt-1\.5 h3{margin-top:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:mt-3 h3{margin-top:calc(var(--spacing) * 3)}.\[\&_h3\]\:mt-5\.5 h3{margin-top:calc(var(--spacing) * 5.5)}.\[\&_h3\]\:mb-0 h3{margin-bottom:0}.\[\&_h3\]\:mb-1\.5 h3{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:mb-2 h3{margin-bottom:calc(var(--spacing) * 2)}.\[\&_h3\]\:mb-2\.5 h3{margin-bottom:calc(var(--spacing) * 2.5)}.\[\&_h3\]\:mb-3 h3{margin-bottom:calc(var(--spacing) * 3)}.\[\&_h3\]\:text-base h3{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_h3\]\:text-xl h3{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h3\]\:text-prose-emphasis h3{font-size:1.05em}.\[\&_h3\]\:leading-\[1\.35\] h3{--tw-leading:1.35;line-height:1.35}.\[\&_h3\]\:font-semibold h3{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h3\]\:text-text h3{color:var(--text)}.\[\&_h4\]\:mx-0 h4{margin-inline:0}.\[\&_h4\]\:mt-0 h4{margin-top:0}.\[\&_h4\]\:mt-3 h4{margin-top:calc(var(--spacing) * 3)}.\[\&_h4\]\:mt-4\.5 h4{margin-top:calc(var(--spacing) * 4.5)}.\[\&_h4\]\:mb-1 h4{margin-bottom:var(--spacing)}.\[\&_h4\]\:mb-1\.5 h4{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h4\]\:text-lg h4{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_h4\]\:text-sm h4{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_h4\]\:text-prose-emphasis h4{font-size:1.05em}.\[\&_h4\]\:leading-\[1\.4\] h4{--tw-leading:1.4;line-height:1.4}.\[\&_h4\]\:font-semibold h4{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h4\]\:text-accent-amber h4{color:var(--accent-amber)}.\[\&_h4\]\:text-text h4{color:var(--text)}.\[\&_img\]\:block img{display:block}.\[\&_img\]\:h-13 img{height:calc(var(--spacing) * 13)}.\[\&_img\]\:h-auto img{height:auto}.\[\&_img\]\:max-h-40 img{max-height:calc(var(--spacing) * 40)}.\[\&_img\]\:w-13 img{width:calc(var(--spacing) * 13)}.\[\&_img\]\:max-w-55 img{max-width:calc(var(--spacing) * 55)}.\[\&_img\]\:max-w-full img{max-width:100%}.\[\&_img\]\:rounded-sm img{border-radius:6px}.\[\&_img\]\:rounded-xs img{border-radius:4px}.\[\&_img\]\:border img{border-style:var(--tw-border-style);border-width:1px}.\[\&_img\]\:border-border img{border-color:var(--border)}.\[\&_img\]\:border-border-variant img{border-color:var(--border-variant)}.\[\&_img\]\:object-cover img{object-fit:cover}.\[\&_input\]\:m-0 input{margin:0}.\[\&_input\]\:w-full input{width:100%}.\[\&_input\]\:min-w-55 input{min-width:calc(var(--spacing) * 55)}.\[\&_input\]\:flex-1 input{flex:1}.\[\&_input\]\:rounded-none input{border-radius:0}.\[\&_input\]\:border-0 input{border-style:var(--tw-border-style);border-width:0}.\[\&_input\]\:border-b input{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_input\]\:border-b-border-variant input{border-bottom-color:var(--border-variant)}.\[\&_input\]\:bg-transparent input{background-color:#0000}.\[\&_input\]\:bg-none input{background-image:none}.\[\&_input\]\:px-2\.5 input{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_input\]\:py-2 input{padding-block:calc(var(--spacing) * 2)}.\[\&_input\]\:font-sans input{font-family:var(--sans)}.\[\&_input\]\:text-sm input{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_input\]\:font-normal input{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_input\]\:text-text input{color:var(--text)}.\[\&_input\]\:outline-none input{--tw-outline-style:none;outline-style:none}.\[\&_input\:\:placeholder\]\:text-subtext input::placeholder{color:var(--subtext)}.\[\&_label\]\:flex label{display:flex}.\[\&_label\]\:flex-col label{flex-direction:column}.\[\&_label\]\:gap-1 label{gap:var(--spacing)}.\[\&_label\]\:text-sm label{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_label\]\:font-medium label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_label\]\:text-text label{color:var(--text)}.\[\&_legend\]\:mb-1\.5 legend{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_legend\]\:text-base legend{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_legend\]\:font-medium legend{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_li\:\:marker\]\:text-primary li::marker{color:var(--primary)}.\[\&_ol\]\:mx-0 ol{margin-inline:0}.\[\&_ol\]\:my-1\.5 ol{margin-block:calc(var(--spacing) * 1.5)}.\[\&_ol\]\:ps-5\.5 ol{padding-inline-start:calc(var(--spacing) * 5.5)}.\[\&_p\]\:m-0 p{margin:0}.\[\&_p\]\:mx-0 p{margin-inline:0}.\[\&_p\]\:my-2\.5 p{margin-block:calc(var(--spacing) * 2.5)}.\[\&_p\]\:mt-\[3px\] p{margin-top:3px}.\[\&_p\]\:mb-0 p{margin-bottom:0}.\[\&_p\]\:max-w-80 p{max-width:calc(var(--spacing) * 80)}.\[\&_p\]\:max-w-105 p{max-width:calc(var(--spacing) * 105)}.\[\&_p\]\:max-w-\[46ch\] p{max-width:46ch}.\[\&_p\]\:text-2xl p{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_p\]\:text-sm p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_p\]\:leading-\[1\.55\] p{--tw-leading:1.55;line-height:1.55}.\[\&_p\]\:leading-normal p{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_p\]\:text-balance p{text-wrap:balance}.\[\&_p\]\:text-subtext p{color:var(--subtext)}.\[\&_p\]\:text-text p{color:var(--text)}.\[\&_p_\+_p\]\:mt-3 p+p{margin-top:calc(var(--spacing) * 3)}.\[\&_p\.empty-state-hint\]\:text-lg p.empty-state-hint{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_p\.empty-state-hint\]\:text-subtext p.empty-state-hint{color:var(--subtext)}.\[\&_p\.empty-state-title\]\:text-2xl p.empty-state-title{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_p\.empty-state-title\]\:font-normal p.empty-state-title{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_p\.empty-state-title\]\:text-text p.empty-state-title{color:var(--text)}.\[\&_pre\]\:m-0 pre{margin:0}.\[\&_pre\]\:overflow-x-auto pre{overflow-x:auto}.\[\&_pre\]\:rounded-md pre{border-radius:8px}.\[\&_pre\]\:border pre{border-style:var(--tw-border-style);border-width:1px}.\[\&_pre\]\:border-border-muted pre{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_pre\]\:border-border-muted pre{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.\[\&_pre\]\:bg-surface pre{background-color:var(--surface)}.\[\&_pre\]\:px-3 pre{padding-inline:calc(var(--spacing) * 3)}.\[\&_pre\]\:py-2 pre{padding-block:calc(var(--spacing) * 2)}.\[\&_pre\]\:text-sm pre{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_pre\]\:text-text pre{color:var(--text)}.\[\&_pre_code\]\:border-0 pre code{border-style:var(--tw-border-style);border-width:0}.\[\&_pre_code\]\:bg-transparent pre code{background-color:#0000}.\[\&_pre_code\]\:bg-none pre code{background-image:none}.\[\&_pre_code\]\:p-0 pre code{padding:0}.\[\&_pre_code\]\:font-normal pre code{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_pre_code\]\:text-inherit pre code{color:inherit}.\[\&_select\]\:font-sans select{font-family:var(--sans)}.\[\&_select\]\:text-sm select{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_select\]\:font-normal select{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_select\]\:text-text select{color:var(--text)}.\[\&_span\]\:absolute span{position:absolute}.\[\&_span\]\:start-\[3px\] span{inset-inline-start:3px}.\[\&_span\]\:top-\[3px\] span{top:3px}.\[\&_span\]\:h-3\.5 span{height:calc(var(--spacing) * 3.5)}.\[\&_span\]\:w-3\.5 span{width:calc(var(--spacing) * 3.5)}.\[\&_span\]\:translate-x-4 span{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&_span\]\:overflow-hidden span{overflow:hidden}.\[\&_span\]\:rounded-full span{border-radius:999px}.\[\&_span\]\:bg-background span{background-color:var(--base)}.\[\&_span\]\:bg-muted span{background-color:var(--muted)}.\[\&_span\]\:text-ellipsis span{text-overflow:ellipsis}.\[\&_span\]\:whitespace-nowrap span{white-space:nowrap}.\[\&_span\]\:transition-\[translate\,background\] span{transition-property:translate,background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_span\]\:duration-120 span{--tw-duration:.12s;transition-duration:.12s}.\[\&_span\]\:ease-standard span{--tw-ease:ease;transition-timing-function:ease}.\[\&_strong\]\:font-medium strong{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_strong\]\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_strong\]\:text-accent-amber strong{color:var(--accent-amber)}.\[\&_strong\]\:text-text strong{color:var(--text)}.\[\&_summary\]\:flex summary{display:flex}.\[\&_summary\]\:w-fit summary{width:fit-content}.\[\&_summary\]\:max-w-full summary{max-width:100%}.\[\&_summary\]\:cursor-pointer summary{cursor:pointer}.\[\&_summary\]\:list-none summary{list-style-type:none}.\[\&_summary\]\:items-center summary{align-items:center}.\[\&_summary\]\:gap-2 summary{gap:calc(var(--spacing) * 2)}.\[\&_summary\]\:rounded-sm summary{border-radius:6px}.\[\&_summary\]\:px-1 summary{padding-inline:var(--spacing)}.\[\&_summary\]\:py-\[3px\] summary{padding-block:3px}.\[\&_summary\]\:select-none summary{-webkit-user-select:none;user-select:none}.\[\&_summary_\.plan-chevron\]\:transition-transform summary .plan-chevron{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_summary_\.plan-chevron\]\:duration-120 summary .plan-chevron{--tw-duration:.12s;transition-duration:.12s}.\[\&_summary_\.plan-chevron\]\:ease-standard summary .plan-chevron{--tw-ease:ease;transition-timing-function:ease}.\[\&_summary\:\:-webkit-details-marker\]\:hidden summary::-webkit-details-marker{display:none}.\[\&_summary\:\:after\]\:text-muted summary:after{color:var(--muted)}.\[\&_summary\:\:after\]\:transition-transform summary:after{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_summary\:\:after\]\:duration-80 summary:after{--tw-duration:80ms;transition-duration:80ms}.\[\&_summary\:\:after\]\:ease-standard summary:after{--tw-ease:ease;transition-timing-function:ease}.\[\&_summary\:\:after\]\:content-\[\'›\'\] summary:after{--tw-content:"›";content:var(--tw-content)}.\[\&_summary\:hover\]\:bg-surface summary:hover{background-color:var(--surface)}.\[\&_svg\]\:block svg{display:block}.\[\&_svg\]\:h-\[1em\] svg{height:1em}.\[\&_svg\]\:h-full svg{height:100%}.\[\&_svg\]\:w-\[1em\] svg{width:1em}.\[\&_svg\]\:w-full svg{width:100%}.\[\&_svg\]\:flex-none svg{flex:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\]\:text-muted svg{color:var(--muted)}.\[\&_table\]\:mx-0 table{margin-inline:0}.\[\&_table\]\:my-2\.5 table{margin-block:calc(var(--spacing) * 2.5)}.\[\&_table\]\:block table{display:block}.\[\&_table\]\:w-max table{width:max-content}.\[\&_table\]\:max-w-full table{max-width:100%}.\[\&_table\]\:border-collapse table{border-collapse:collapse}.\[\&_table\]\:overflow-x-auto table{overflow-x:auto}.\[\&_table\]\:rounded-md table{border-radius:8px}.\[\&_table\]\:border table{border-style:var(--tw-border-style);border-width:1px}.\[\&_table\]\:border-border table{border-color:var(--border)}.\[\&_table\]\:text-sm table{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_tbody_tr\:hover_td\]\:bg-surface-bright tbody tr:hover td{background-color:var(--surface-bright)}.\[\&_td\]\:h-12 td{height:calc(var(--spacing) * 12)}.\[\&_td\]\:border-b td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_td\]\:border-b-border-variant td{border-bottom-color:var(--border-variant)}.\[\&_td\]\:border-b-divider-faint td{border-bottom-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_td\]\:border-b-divider-faint td{border-bottom-color:color-mix(in oklab,var(--text) 6%,transparent)}}.\[\&_td\]\:px-3 td{padding-inline:calc(var(--spacing) * 3)}.\[\&_td\]\:px-3\.5 td{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_td\]\:py-2 td{padding-block:calc(var(--spacing) * 2)}.\[\&_td\]\:ps-0 td{padding-inline-start:0}.\[\&_td\]\:pe-2\.5 td{padding-inline-end:calc(var(--spacing) * 2.5)}.\[\&_td\]\:pt-0 td{padding-top:0}.\[\&_td\]\:pb-0 td{padding-bottom:0}.\[\&_td\]\:text-start td{text-align:start}.\[\&_td\]\:align-middle td{vertical-align:middle}.\[\&_td\]\:break-normal td{overflow-wrap:normal;word-break:normal}.\[\&_td\]\:break-words td{overflow-wrap:break-word}.\[\&_td\]\:whitespace-nowrap td{white-space:nowrap}.\[\&_td\]\:text-text td{color:var(--text)}.\[\&_td\:first-child\]\:w-\[32\%\] td:first-child{width:32%}.\[\&_td\:first-child\]\:wrap-anywhere td:first-child{overflow-wrap:anywhere}.\[\&_td\:last-child\]\:w-29 td:last-child{width:calc(var(--spacing) * 29)}.\[\&_td\:last-child\]\:text-end td:last-child{text-align:end}.\[\&_td\:last-child\]\:whitespace-nowrap td:last-child{white-space:nowrap}.\[\&_td\[colspan\]\]\:text-start td[colspan]{text-align:start}.\[\&_td\[colspan\]\]\:whitespace-normal td[colspan]{white-space:normal}.\[\&_textarea\]\:field-sizing-content textarea{field-sizing:content}.\[\&_textarea\]\:max-h-45 textarea{max-height:calc(var(--spacing) * 45)}.\[\&_textarea\]\:min-h-18 textarea{min-height:calc(var(--spacing) * 18)}.\[\&_textarea\]\:flex-1 textarea{flex:1}.\[\&_textarea\]\:resize-none textarea{resize:none}.\[\&_textarea\]\:border-0 textarea{border-style:var(--tw-border-style);border-width:0}.\[\&_textarea\]\:bg-transparent textarea{background-color:#0000}.\[\&_textarea\]\:bg-none textarea{background-image:none}.\[\&_textarea\]\:px-3 textarea{padding-inline:calc(var(--spacing) * 3)}.\[\&_textarea\]\:pt-2\.5 textarea{padding-top:calc(var(--spacing) * 2.5)}.\[\&_textarea\]\:pb-1 textarea{padding-bottom:var(--spacing)}.\[\&_textarea\]\:font-mono textarea{font-family:var(--mono)}.\[\&_textarea\]\:text-base textarea{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_textarea\]\:text-sm textarea{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_th\]\:sticky th{position:sticky}.\[\&_th\]\:top-0 th{top:0}.\[\&_th\]\:z-1 th{z-index:1}.\[\&_th\]\:border-b th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_th\]\:border-b-border th{border-bottom-color:var(--border)}.\[\&_th\]\:border-b-border-variant th{border-bottom-color:var(--border-variant)}.\[\&_th\]\:bg-background th{background-color:var(--base)}.\[\&_th\]\:px-3 th{padding-inline:calc(var(--spacing) * 3)}.\[\&_th\]\:px-3\.5 th{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_th\]\:py-2 th{padding-block:calc(var(--spacing) * 2)}.\[\&_th\]\:text-start th{text-align:start}.\[\&_th\]\:text-sm th{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_th\]\:font-medium th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_th\]\:break-normal th{overflow-wrap:normal;word-break:normal}.\[\&_th\]\:break-words th{overflow-wrap:break-word}.\[\&_th\]\:text-text th{color:var(--text)}.\[\&_thead_th\]\:border-b thead th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_thead_th\]\:border-b-border thead th{border-bottom-color:var(--border)}.\[\&_thead_th\]\:bg-surface thead th{background-color:var(--surface)}.\[\&_thead_th\]\:font-medium thead th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_thead_th\]\:text-text thead th{color:var(--text)}.\[\&_tr\.clickable\]\:cursor-pointer tr.clickable{cursor:pointer}.\[\&_tr\.clickable\:hover_td\]\:bg-canvas tr.clickable:hover td{background-color:var(--canvas)}.\[\&_tr\:last-child_td\]\:border-b-0 tr:last-child td{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_ul\]\:mx-0 ul{margin-inline:0}.\[\&_ul\]\:my-1\.5 ul{margin-block:calc(var(--spacing) * 1.5)}.\[\&_ul\]\:ps-5\.5 ul{padding-inline-start:calc(var(--spacing) * 5.5)}.\[\&\+\&\]\:border-t+.\[\&\+\&\]\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&\+\&\]\:border-border-variant+.\[\&\+\&\]\:border-border-variant{border-color:var(--border-variant)}.\[\&\.active\]\:border-border.active{border-color:var(--border)}.\[\&\.active\]\:bg-background.active{background-color:var(--base)}.\[\&\.active\]\:bg-panel.active{background-color:var(--panel)}.\[\&\.active\]\:bg-surface.active{background-color:var(--surface)}.\[\&\.active\]\:font-medium.active{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&\.active\]\:text-muted.active{color:var(--muted)}.\[\&\.active\]\:text-primary.active{color:var(--primary)}.\[\&\.active\]\:text-text.active{color:var(--text)}.\[\&\.active\:\:after\]\:absolute.active:after{position:absolute}.\[\&\.active\:\:after\]\:start-0.active:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&\.active\:\:after\]\:end-0.active:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\.active\:\:after\]\:-bottom-px.active:after{bottom:-1px}.\[\&\.active\:\:after\]\:h-px.active:after{height:1px}.\[\&\.active\:\:after\]\:bg-background.active:after{background-color:var(--base)}.\[\&\.active\:\:after\]\:content-\[\'\'\].active:after{--tw-content:"";content:var(--tw-content)}.\[\&\.align-right\]\:start-auto.align-right{inset-inline-start:auto}.\[\&\.align-right\]\:end-0.align-right{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\.approved\]\:text-accent-green.approved{color:var(--accent-green)}.\[\&\.approved\:\:before\]\:content-\[\'✓_\'\].approved:before{--tw-content:"✓ ";content:var(--tw-content)}.\[\&\.archive\]\:text-accent-amber.archive{color:var(--accent-amber)}.\[\&\.chosen\]\:text-accent-green.chosen{color:var(--accent-green)}.\[\&\.chosen\:\:before\]\:content-\[\'✓_\'\].chosen:before{--tw-content:"✓ ";content:var(--tw-content)}.\[\&\.clamped\]\:relative.clamped{position:relative}.\[\&\.clamped\]\:max-h-\[9\.5em\].clamped{max-height:9.5em}.\[\&\.clamped\]\:overflow-hidden.clamped{overflow:hidden}.\[\&\.clamped\:\:after\]\:pointer-events-none.clamped:after{pointer-events:none}.\[\&\.clamped\:\:after\]\:absolute.clamped:after{position:absolute}.\[\&\.clamped\:\:after\]\:inset-x-0.clamped:after{inset-inline:0}.\[\&\.clamped\:\:after\]\:top-auto.clamped:after{top:auto}.\[\&\.clamped\:\:after\]\:bottom-0.clamped:after{bottom:0}.\[\&\.clamped\:\:after\]\:h-8\.5.clamped:after{height:calc(var(--spacing) * 8.5)}.\[\&\.clamped\:\:after\]\:bg-\[linear-gradient\(to_bottom\,_transparent\,_var\(--surface\)\)\].clamped:after{background-image:linear-gradient(to bottom,transparent,var(--surface))}.\[\&\.clamped\:\:after\]\:content-\[\'\'\].clamped:after{--tw-content:"";content:var(--tw-content)}.\[\&\.closable\]\:max-w-60.closable{max-width:calc(var(--spacing) * 60)}.\[\&\.closable\]\:pe-0\.5.closable{padding-inline-end:calc(var(--spacing) * .5)}.\[\&\.code\]\:text-accent-orange.code{color:var(--accent-orange)}.\[\&\.doc\]\:px-7.doc{padding-inline:calc(var(--spacing) * 7)}.\[\&\.doc\]\:pt-4\.5.doc{padding-top:calc(var(--spacing) * 4.5)}.\[\&\.doc\]\:pb-12.doc{padding-bottom:calc(var(--spacing) * 12)}.\[\&\.doc_\.artifact-md\]\:mx-auto.doc .artifact-md{margin-inline:auto}.\[\&\.doc_\.artifact-md\]\:my-0.doc .artifact-md{margin-block:0}.\[\&\.doc_\.artifact-md\]\:max-w-readable.doc .artifact-md{max-width:var(--readable-col)}.\[\&\.document\]\:text-subtext.document{color:var(--subtext)}.\[\&\.drop-down\]\:top-\[calc\(100\%_\+_4px\)\].drop-down{top:calc(100% + 4px)}.\[\&\.drop-down\]\:bottom-auto.drop-down{bottom:auto}.\[\&\.editing\]\:cursor-default.editing{cursor:default}.\[\&\.editing\]\:bg-surface.editing{background-color:var(--surface)}.\[\&\.editing_\.session-menu-btn\]\:hidden.editing .session-menu-btn,.\[\&\.editing_\.session-time\]\:hidden.editing .session-time{display:none}.\[\&\.err\]\:bg-accent-red.err{background-color:var(--accent-red)}.\[\&\.expanded_\.diff-file-header\]\:border-b.expanded .diff-file-header{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&\.expanded_\.diff-file-header\]\:border-b-border.expanded .diff-file-header{border-bottom-color:var(--border)}.\[\&\.fail\]\:border-\[1\.5px\].fail{border-style:var(--tw-border-style);border-width:1.5px}.\[\&\.fail\]\:border-danger-outline.fail{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\.fail\]\:border-danger-outline.fail{border-color:color-mix(in oklab,var(--accent-red) 55%,transparent)}}.\[\&\.failed\]\:text-accent-red.failed{color:var(--accent-red)}.\[\&\.image\]\:text-accent-purple.image{color:var(--accent-purple)}.\[\&\.live\]\:animate-\[or-pulse_1\.2s_ease-in-out_infinite\].live{animation:1.2s ease-in-out infinite or-pulse}.\[\&\.live\]\:border-accent-teal.live{border-color:var(--accent-teal)}.\[\&\.live\]\:bg-accent-teal.live{background-color:var(--accent-teal)}.\[\&\.live\]\:shadow-tree-live.live{--tw-shadow:0 2px 12px var(--tw-shadow-color,#209a8433);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.markdown\]\:text-accent-blue.markdown{color:var(--accent-blue)}.\[\&\.max\]\:fixed.max{position:fixed}.\[\&\.max\]\:inset-2\.5.max{inset:calc(var(--spacing) * 2.5)}.\[\&\.max\]\:z-60.max{z-index:60}.\[\&\.max\]\:m-0.max{margin:0}.\[\&\.max\]\:shadow-panel-max.max{--tw-shadow:0 12px 40px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.\[\&\.max\]\:shadow-panel-max.max{--tw-shadow:0 12px 40px var(--tw-shadow-color,color-mix(in oklab, var(--text) 22%, transparent))}}.\[\&\.max\]\:shadow-panel-max.max{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.menu-open_\.session-menu-btn\]\:inline-flex.menu-open .session-menu-btn{display:inline-flex}.\[\&\.menu-open_\.session-time\]\:hidden.menu-open .session-time{display:none}.\[\&\.muted\]\:text-muted.muted{color:var(--muted)}.\[\&\.ok\]\:bg-accent-green.ok{background-color:var(--accent-green)}.\[\&\.on\]\:bg-primary.on{background-color:var(--primary)}.\[\&\.on\]\:text-background.on{color:var(--base)}.\[\&\.open\]\:rotate-90.open{rotate:90deg}.\[\&\.other\]\:border-\[1\.5px\].other{border-style:var(--tw-border-style);border-width:1.5px}.\[\&\.other\]\:border-border.other{border-color:var(--border)}.\[\&\.pass\]\:bg-accent-green.pass{background-color:var(--accent-green)}.\[\&\.pdf\]\:text-accent-red.pdf{color:var(--accent-red)}.\[\&\.permission\]\:border-s-accent-amber.permission{border-inline-start-color:var(--accent-amber)}.\[\&\.plan\]\:border-s-accent-blue.plan{border-inline-start-color:var(--accent-blue)}.\[\&\.question\]\:border-s-accent-purple.question{border-inline-start-color:var(--accent-purple)}.\[\&\.rail-hidden\]\:max-w-none.rail-hidden{max-width:none}.\[\&\.rail-hidden\]\:px-0\.5.rail-hidden{padding-inline:calc(var(--spacing) * .5)}.\[\&\.rail-hidden\]\:py-0.rail-hidden{padding-block:0}.\[\&\.readonly\]\:opacity-60.readonly{opacity:.6}.\[\&\.rejected\]\:text-accent-amber.rejected,.\[\&\.revised\]\:text-accent-amber.revised{color:var(--accent-amber)}.\[\&\.sel\]\:border-primary.sel{border-color:var(--primary)}.\[\&\.sel\]\:bg-primary-subtle.sel{background-color:var(--primary-subtle)}.\[\&\.selected\]\:border-accent.selected{border-color:var(--accent)}.\[\&\.selected\]\:bg-panel.selected{background-color:var(--panel)}.\[\&\.selected\]\:shadow-selected.selected{--tw-shadow:0 0 0 1px var(--tw-shadow-color,var(--accent));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.selected\:hover\]\:bg-panel.selected:hover{background-color:var(--panel)}.\[\&\.session-menu\]\:start-auto.session-menu{inset-inline-start:auto}.\[\&\.session-menu\]\:end-1\.5.session-menu{inset-inline-end:calc(var(--spacing) * 1.5)}.\[\&\.session-menu\]\:top-\[calc\(100\%_-_2px\)\].session-menu{top:calc(100% - 2px)}.\[\&\.session-menu\]\:min-w-35.session-menu{min-width:calc(var(--spacing) * 35)}.\[\&\.spreadsheet\]\:text-accent-green.spreadsheet,.\[\&\.status-add\]\:text-accent-green.status-add{color:var(--accent-green)}.\[\&\.status-copy\]\:text-accent-blue.status-copy{color:var(--accent-blue)}.\[\&\.status-delete\]\:text-accent-red.status-delete{color:var(--accent-red)}.\[\&\.status-rename\]\:text-accent-blue.status-rename{color:var(--accent-blue)}.\[\&\.unread_\.session-title\]\:font-semibold.unread .session-title{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&\.warn\]\:bg-accent-amber.warn{background-color:var(--accent-amber)}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}.\[\&\:\:after\]\:absolute:after{position:absolute}.\[\&\:\:after\]\:start-0:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&\:\:after\]\:end-0:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\:\:after\]\:top-full:after{top:100%}.\[\&\:\:after\]\:h-6:after{height:calc(var(--spacing) * 6)}.\[\&\:\:after\]\:bg-\[linear-gradient\(to_bottom\,_var\(--base\)\,_transparent\)\]:after{background-image:linear-gradient(to bottom,var(--base),transparent)}.\[\&\:\:after\]\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.\[\&\:active\]\:bg-resizer-hover:active{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\]\:bg-resizer-hover:active{background-color:color-mix(in oklab,var(--text) 12%,transparent)}}.\[\&\:active\:not\(\:disabled\)\]\:border-primary-active:active:not(:disabled){border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:border-primary-active:active:not(:disabled){border-color:color-mix(in oklab,var(--primary) 80%,var(--text))}}.\[\&\:active\:not\(\:disabled\)\]\:bg-danger-active:active:not(:disabled){background-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:bg-danger-active:active:not(:disabled){background-color:color-mix(in oklab,var(--accent-red) 14%,transparent)}}.\[\&\:active\:not\(\:disabled\)\]\:bg-highlight:active:not(:disabled){background-color:var(--highlight)}.\[\&\:active\:not\(\:disabled\)\]\:bg-primary-active:active:not(:disabled){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:bg-primary-active:active:not(:disabled){background-color:color-mix(in oklab,var(--primary) 80%,var(--text))}}.\[\&\:disabled\]\:cursor-default:disabled{cursor:default}.\[\&\:focus\]\:border-accent-blue:focus{border-color:var(--accent-blue)}.\[\&\:focus-visible\]\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&\:focus-visible\]\:outline-offset-2:focus-visible{outline-offset:2px}.\[\&\:focus-visible\]\:outline-text:focus-visible{outline-color:var(--text)}.\[\&\:focus-visible\]\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&\:focus-within_\.session-menu-btn\]\:inline-flex:focus-within .session-menu-btn{display:inline-flex}.\[\&\:focus-within_\.session-time\]\:hidden:focus-within .session-time{display:none}.\[\&\:has\(input\:checked\)\]\:border-accent:has(input:checked){border-color:var(--accent)}.\[\&\:has\(input\:checked\)\]\:bg-primary-subtle:has(input:checked){background-color:var(--primary-subtle)}.\[\&\:hover\]\:border-primary:hover{border-color:var(--primary)}.\[\&\:hover\]\:border-text:hover{border-color:var(--text)}.\[\&\:hover\]\:bg-canvas:hover{background-color:var(--canvas)}.\[\&\:hover\]\:bg-panel:hover{background-color:var(--panel)}.\[\&\:hover\]\:bg-resizer-hover:hover{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\]\:bg-resizer-hover:hover{background-color:color-mix(in oklab,var(--text) 12%,transparent)}}.\[\&\:hover\]\:bg-surface:hover{background-color:var(--surface)}.\[\&\:hover\]\:bg-text:hover{background-color:var(--text)}.\[\&\:hover\]\:text-background:hover{color:var(--base)}.\[\&\:hover\]\:text-text:hover{color:var(--text)}.\[\&\:hover\]\:underline:hover{text-decoration-line:underline}.\[\&\:hover\]\:shadow-tree-hover:hover{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\:hover_\.ft-row-delete\]\:opacity-100:hover .ft-row-delete,.\[\&\:hover_\.md-code-copy\]\:opacity-100:hover .md-code-copy{opacity:1}.\[\&\:hover_\.session-menu-btn\]\:inline-flex:hover .session-menu-btn{display:inline-flex}.\[\&\:hover_\.session-time\]\:hidden:hover .session-time{display:none}.\[\&\:hover\:not\(\.active\)\]\:bg-surface:hover:not(.active){background-color:var(--surface)}.\[\&\:hover\:not\(\.on\)\]\:bg-highlight:hover:not(.on){background-color:var(--highlight)}.\[\&\:hover\:not\(\.on\)\]\:text-text:hover:not(.on){color:var(--text)}.\[\&\:hover\:not\(\:disabled\)\]\:border-accent-blue:hover:not(:disabled){border-color:var(--accent-blue)}.\[\&\:hover\:not\(\:disabled\)\]\:border-border-strong:hover:not(:disabled){border-color:var(--border-strong)}.\[\&\:hover\:not\(\:disabled\)\]\:border-primary-hover:hover:not(:disabled){border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:border-primary-hover:hover:not(:disabled){border-color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:border-text:hover:not(:disabled){border-color:var(--text)}.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-amber-subtle:hover:not(:disabled){background-color:var(--accent-amber-subtle)}.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-blue\/90:hover:not(:disabled){background-color:var(--accent-blue)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-blue\/90:hover:not(:disabled){background-color:color-mix(in oklab,var(--accent-blue) 90%,transparent)}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-danger-hover:hover:not(:disabled){background-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-danger-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--accent-red) 8%,transparent)}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-primary-hover:hover:not(:disabled){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-primary-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-stop-hover:hover:not(:disabled){background-color:var(--surface)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-stop-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--surface) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-surface:hover:not(:disabled){background-color:var(--surface)}.\[\&\:hover\:not\(\:disabled\)\]\:text-accent-red:hover:not(:disabled){color:var(--accent-red)}.\[\&\:hover\:not\(\:disabled\)\]\:text-text:hover:not(:disabled){color:var(--text)}.\[\&\:last-child\]\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:absolute:not(.active)+.tab:not(.active):before{position:absolute}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:-start-px:not(.active)+.tab:not(.active):before{inset-inline-start:-1px}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:top-2\.5:not(.active)+.tab:not(.active):before{top:calc(var(--spacing) * 2.5)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:bottom-2\.5:not(.active)+.tab:not(.active):before{bottom:calc(var(--spacing) * 2.5)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:w-px:not(.active)+.tab:not(.active):before{width:1px}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:bg-border:not(.active)+.tab:not(.active):before{background-color:var(--border)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:content-\[\'\'\]:not(.active)+.tab:not(.active):before{--tw-content:"";content:var(--tw-content)}.\[\&\>\.settings-form\:first-child\]\:mt-0>.settings-form:first-child{margin-top:0}.\[\&\>div\:first-child\]\:border-t-0>div:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&\[data-tip\]\:\:after\]\:top-auto[data-tip]:after{top:auto}.\[\&\[data-tip\]\:\:after\]\:bottom-\[calc\(100\%_\+_6px\)\][data-tip]:after{bottom:calc(100% + 6px)}.\[\&\[open\]_summary_\.plan-chevron\]\:rotate-90[open] summary .plan-chevron,.\[\&\[open\]_summary\:\:after\]\:rotate-90[open] summary:after{rotate:90deg}.chat-header.rail-hidden>.\[\.chat-header\.rail-hidden_\>_\&\:first-child\]\:me-3:first-child{margin-inline-end:calc(var(--spacing) * 3)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.atrule\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.atrule{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.attr-name\]\:text-syntax-green,.openresearch-diff,.file-view) .token.attr-name{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.attr-value\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.attr-value,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.boolean\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.boolean{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.builtin\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.builtin{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.cdata\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.cdata{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.cdata\]\:italic,.openresearch-diff,.file-view) .token.cdata{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.char\]\:text-syntax-green,.openresearch-diff,.file-view) .token.char{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.class-name\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.class-name{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.comment\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.comment{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.comment\]\:italic,.openresearch-diff,.file-view) .token.comment{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.constant\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.constant{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.decorator\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.decorator,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.def\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.def{color:var(--syntax-blue)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.deleted\]\:text-syntax-red,.openresearch-diff,.file-view) .token.deleted{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.entity\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.entity{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.function\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.function{color:var(--syntax-blue)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.important\]\:text-syntax-red,.openresearch-diff,.file-view) .token.important{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.inserted\]\:text-syntax-green,.openresearch-diff,.file-view) .token.inserted{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.keyword\]\:text-syntax-purple,.openresearch-diff,.file-view) .token.keyword{color:var(--syntax-purple)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.namespace\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.namespace{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.number\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.number{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.operator\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.operator{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.parameter\]\:text-syntax-text,.openresearch-diff,.file-view) .token.parameter{color:var(--syntax-text)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.prolog\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.prolog{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.prolog\]\:italic,.openresearch-diff,.file-view) .token.prolog{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.property\]\:text-syntax-red,.openresearch-diff,.file-view) .token.property{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.punctuation\]\:text-syntax-text,.openresearch-diff,.file-view) .token.punctuation{color:var(--syntax-text)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.regex\]\:text-syntax-green,.openresearch-diff,.file-view) .token.regex,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.selector\]\:text-syntax-green,.openresearch-diff,.file-view) .token.selector,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.string\]\:text-syntax-green,.openresearch-diff,.file-view) .token.string{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.symbol\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.symbol{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.tag\]\:text-syntax-red,.openresearch-diff,.file-view) .token.tag{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.url\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.url{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.variable\]\:text-syntax-red,.openresearch-diff,.file-view) .token.variable{color:var(--syntax-red)}@container (max-width:400px){.\[\@container\(\(max-width\:_400px\)\)\]\:grid-cols-\[minmax\(0\,_1fr\)\]{grid-template-columns:minmax(0,1fr)}.\[\@container\(\(max-width\:_400px\)\)\]\:\!flex-row{flex-direction:row!important}.\[\@container\(\(max-width\:_400px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@container\(\(max-width\:_400px\)\)\]\:\!items-center{align-items:center!important}.\[\@container\(\(max-width\:_400px\)\)\]\:justify-start{justify-content:flex-start}.\[\@container\(\(max-width\:_400px\)\)\]\:gap-3{gap:calc(var(--spacing) * 3)}.\[\@container\(\(max-width\:_400px\)\)\]\:\[grid-template-areas\:\'name\'_\'meta\'_\'actions\'\]{grid-template-areas:"name""meta""actions"}}@container (max-width:560px){.\[\@container\(\(max-width\:_560px\)\)\]\:ms-auto{margin-inline-start:auto}.\[\@container\(\(max-width\:_560px\)\)\]\:grid-cols-\[minmax\(0\,_1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.\[\@container\(\(max-width\:_560px\)\)\]\:flex-col{flex-direction:column}.\[\@container\(\(max-width\:_560px\)\)\]\:items-end{align-items:flex-end}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-1\.5{gap:calc(var(--spacing) * 1.5)}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-y-\[9px\]{row-gap:9px}}@container (max-width:720px){.\[\@container\(\(max-width\:_720px\)\)\]\:hidden{display:none}.\[\@container\(\(max-width\:_720px\)\)\]\:\!w-full{width:100%!important}}@container (max-width:960px){.\[\@container\(\(max-width\:_960px\)\)\]\:static{position:static}.\[\@container\(\(max-width\:_960px\)\)\]\:max-h-55{max-height:calc(var(--spacing) * 55)}.\[\@container\(\(max-width\:_960px\)\)\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(max-width:520px){.\[\@media\(\(max-width\:_520px\)\)\]\:flex-col{flex-direction:column}.\[\@media\(\(max-width\:_520px\)\)\]\:items-start{align-items:flex-start}}@media(max-width:600px){.\[\@media\(\(max-width\:_600px\)\)\]\:col-span-2{grid-column:span 2/span 2}.\[\@media\(\(max-width\:_600px\)\)\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.\[\@media\(\(max-width\:_640px\)\)\]\:flex-col{flex-direction:column}.\[\@media\(\(max-width\:_640px\)\)\]\:items-stretch{align-items:stretch}.\[\@media\(\(max-width\:_640px\)\)\]\:justify-start{justify-content:flex-start}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv\]\:grid-cols-1 .kv{grid-template-columns:repeat(1,minmax(0,1fr))}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv\]\:gap-\[3px\] .kv{gap:3px}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv_\.v_\+_\.k\]\:mt-\[7px\] .kv .v+.k{margin-top:7px}}@media(max-width:720px){.\[\@media\(\(max-width\:_720px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@media\(\(max-width\:_720px\)\)\]\:px-4\.5{padding-inline:calc(var(--spacing) * 4.5)}.\[\@media\(\(max-width\:_720px\)\)\]\:pt-5{padding-top:calc(var(--spacing) * 5)}.\[\@media\(\(max-width\:_720px\)\)\]\:pb-8{padding-bottom:calc(var(--spacing) * 8)}.\[\@media\(\(max-width\:_720px\)\)\]\:\[\&_button\]\:grid-cols-\[65px_1fr_60px_16px\] button{grid-template-columns:65px 1fr 60px 16px}.\[\@media\(\(max-width\:_720px\)\)\]\:\[\&_button_\>_\:nth-child\(3\)\]\:hidden button>:nth-child(3){display:none}}@media(max-width:960px){.\[\@media\(\(max-width\:_960px\)\)\]\:col-span-3{grid-column:span 3/span 3}.\[\@media\(\(max-width\:_960px\)\)\]\:mb-1{margin-bottom:var(--spacing)}.\[\@media\(\(max-width\:_960px\)\)\]\:block{display:block}.\[\@media\(\(max-width\:_960px\)\)\]\:hidden{display:none}.\[\@media\(\(max-width\:_960px\)\)\]\:grid-cols-\[minmax\(0\,0\.8fr\)_minmax\(0\,0\.8fr\)_minmax\(0\,1\.4fr\)\]{grid-template-columns:minmax(0,.8fr) minmax(0,.8fr) minmax(0,1.4fr)}.\[\@media\(\(max-width\:_960px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@media\(\(max-width\:_960px\)\)\]\:items-start{align-items:flex-start}.\[\@media\(\(max-width\:_960px\)\)\]\:gap-x-4{column-gap:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:gap-y-3{row-gap:calc(var(--spacing) * 3)}.\[\@media\(\(max-width\:_960px\)\)\]\:px-4{padding-inline:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:py-4{padding-block:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:pt-6{padding-top:calc(var(--spacing) * 6)}.\[\@media\(\(max-width\:_960px\)\)\]\:break-all{word-break:break-all}.\[\@media\(\(max-width\:_960px\)\)\]\:whitespace-normal{white-space:normal}}@media(prefers-reduced-motion:reduce){.\[\@media\(\(prefers-reduced-motion\:_reduce\)\)\]\:animate-none{animation:none}}a.\[a\&\:hover\]\:border-muted:hover{border-color:var(--muted)}button.\[button\&\]\:inline-flex{display:inline-flex}button.\[button\&\]\:h-\[13px\]{height:13px}button.\[button\&\]\:w-\[13px\]{width:13px}button.\[button\&\]\:cursor-pointer{cursor:pointer}button.\[button\&\]\:items-center{align-items:center}button.\[button\&\]\:justify-center{justify-content:center}button.\[button\&\]\:border-0{border-style:var(--tw-border-style);border-width:0}button.\[button\&\]\:bg-transparent{background-color:#0000}button.\[button\&\]\:p-0{padding:0}button.\[button\&_\>_svg\]\:transition-transform>svg{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}button.\[button\&_\>_svg\]\:duration-120>svg{--tw-duration:.12s;transition-duration:.12s}button.\[button\&_\>_svg\]\:ease-standard>svg{--tw-ease:ease;transition-timing-function:ease}button.\[button\&_\>_svg\.open\]\:rotate-90>svg.open{rotate:90deg}button.\[button\&\:hover\]\:border-muted:hover{border-color:var(--muted)}}:root{--base:#fff;--canvas:#faf8f4;--panel:#f3f0ea;--surface:#faf7f2;--surface-bright:#fdfbfb;--highlight:#fdf3f1;--chat-annotation-highlight:#b8d4ff;--text:#1d1b1a;--subtext:#737373;--muted:#a1a1a1;--primary:#9a2036;--primary-subtle:#f7e9ec;--border:#d4d4d4;--border-variant:#e5e5e5;--accent-orange:#da642c;--accent-red:#d94654;--accent-teal:#209a84;--accent-blue:#3a8dff;--accent-amber:#da9100;--accent-green:#5eb64c;--accent-purple:#9c5cff;--accent-green-subtle:#e7f4e5;--accent-amber-subtle:#fff3e1;--accent-teal-subtle:#e1f3f0;--accent-red-subtle:#fbe9ea;--accent-blue-subtle:#e5f0ff;--skill-blue:#184f91;--skill-blue-subtle:#d9e9fb;--skill-blue-slash:#7fa6d2;--accent-purple-subtle:#f1e8ff;--dots-muted:#e3ded5;--dots-strong:#bdb6a8;--mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;--sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;--modal-top:min(30vh, 260px);--term-bg:#1a1a1a;--term-foreground:#e6e1e0;--term-selection:#2c3441;--tool-shimmer:var(--text)}@supports (color:color-mix(in lab,red,red)){:root{--tool-shimmer:color-mix(in srgb, var(--text) 58%, var(--subtext))}}:root{--editor-selection:var(--primary)}@supports (color:color-mix(in lab,red,red)){:root{--editor-selection:color-mix(in oklab, var(--primary) 22%, transparent)}}:root{--readable-col:840px;--border-strong:var(--border);--accent:var(--primary);--teal:var(--accent-teal);--green:var(--accent-green);--red:var(--accent-red);--amber:var(--accent-amber);--syntax-comment:#a0a1a7;--syntax-text:#383a42;--syntax-red:#e45649;--syntax-orange:#986801;--syntax-green:#50a14f;--syntax-yellow:#c18401;--syntax-cyan:#56b6c2;--syntax-purple:#a626a4;--syntax-blue:#4078f2;color-scheme:light}:root[data-theme=dark]{--base:#0e0c0c;--canvas:#141110;--panel:#221f1e;--surface:#1d1b1a;--surface-bright:#130f0f;--highlight:#393433;--chat-annotation-highlight:#244e7a;--text:#e6e1e0;--subtext:#a68e8b;--muted:#737373;--primary:#ffb3ad;--primary-subtle:#33191b;--border:#525252;--border-variant:#404040;--accent-amber:#e67e22;--accent-green-subtle:#1c2b18;--accent-amber-subtle:#33260f;--accent-teal-subtle:#12332d;--accent-red-subtle:#331418;--accent-blue-subtle:#10233a;--skill-blue:#79adf0;--skill-blue-subtle:#183452;--skill-blue-slash:#527ca8;--accent-purple-subtle:#251933;--dots-muted:#2a2523;--dots-strong:#555;--syntax-comment:#7f848e;--syntax-text:#abb2bf;--syntax-red:#e06c75;--syntax-orange:#d19a66;--syntax-green:#98c379;--syntax-yellow:#e5c07b;--syntax-purple:#c678dd;--syntax-blue:#61afef;color-scheme:dark}.tinker-logo{clip-path:inset(34% 9%)}:root[data-theme=dark] .tinker-logo{filter:invert();mix-blend-mode:screen}:root[lang=fa] #root :where(p,h1,h2,h3,h4,h5,h6,button,label,li,th,td,dt,dd,[role=status],[role=alert]),.md :where(p,h1,h2,h3,h4,li,th,td,blockquote),:root[lang=fa] #root .file-view-note{unicode-bidi:plaintext}:where(pre,code:not(.path-front-ellipsis),.font-mono,.xterm,.openresearch-diff){direction:ltr;unicode-bidi:isolate}.path-front-ellipsis{unicode-bidi:isolate}@keyframes or-pulse{50%{opacity:.35}}@keyframes tool-target-reveal{0%{opacity:0;filter:blur(1.5px)}to{opacity:1;filter:blur()}}@keyframes tool-running-shimmer{0%{background-position:200% 0}to{background-position:-100% 0}}@keyframes tool-running-shimmer-icon{0%,to{color:var(--muted);opacity:.35}50%{color:var(--tool-shimmer);opacity:1}}.tool-running-shimmer{color:#0000;background:linear-gradient(100deg,var(--muted) 12%,var(--subtext) 34%,var(--tool-shimmer) 50%,var(--subtext) 66%,var(--muted) 88%);-webkit-text-fill-color:transparent;background-size:300% 100%;-webkit-background-clip:text;background-clip:text;animation:1.75s linear infinite tool-running-shimmer}.tool-running-shimmer::selection{color:var(--text);-webkit-text-fill-color:var(--text)}.tool-running-shimmer-icon{color:var(--muted);animation:1.75s ease-in-out infinite tool-running-shimmer-icon}.tool-group-summary .tool-group-label{transition:color .12s}.tool-group-summary:hover .tool-group-label,.tool-group-summary:hover .tool-chevron{color:var(--text)}.tool-group-disclosure{grid-template-rows:0fr;transition:grid-template-rows .22s cubic-bezier(.2,.75,.25,1);display:grid}.tool-group-disclosure.open{grid-template-rows:1fr}.tool-group-disclosure-inner{min-height:0;position:relative;overflow:hidden}.tool-target-reveal{animation:.18s cubic-bezier(.2,.75,.25,1) tool-target-reveal}.tool-target,.tool-target-more{color:inherit;cursor:pointer;font-weight:inherit;text-align:inherit;text-underline-offset:3px;-webkit-text-decoration-skip-ink:auto;text-decoration-skip-ink:auto;text-decoration-line:underline;text-decoration-thickness:.6px;transition:color .14s,text-decoration-color .14s;display:inline}.tool-line,.tool-group-summary{font-weight:375}.tool-group-rows .tool-line{font-size:var(--text-sm)}.msg-assistant .md table{margin-block:14px;margin-inline:auto}.msg-assistant .md th,.msg-assistant .md td{padding-block:10px}.msg-assistant .md figure{width:fit-content;max-width:100%;margin-inline:auto}.md .file-chip{padding-block:.5px;line-height:1.3}.md .file-chip .file-chip-open{color:currentColor;opacity:.6}.md .file-chip .file-chip-label{text-decoration-line:underline;-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong);text-underline-offset:2px;text-decoration-thickness:.6px}.md .file-chip:hover:not(:disabled) .file-chip-label,.md .file-chip:focus-visible .file-chip-label{-webkit-text-decoration-color:var(--primary);text-decoration-color:var(--primary)}.md .file-chip:disabled .file-chip-label{text-decoration-line:none}.md .file-chip:disabled .file-chip-open{display:none}.msg-assistant .md img{max-width:100%;height:auto;margin-inline:auto;display:block}.md[data-streaming=true] .katex-error{visibility:hidden}.tool-target{-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.tool-target-more{text-decoration-color:#0000}.project-row:hover .project-row-title{text-underline-offset:2px;text-decoration-line:underline}.project-row:has(.project-row-secondary:hover) .project-row-title{text-decoration-line:none}@media(hover:none){.project-row-delete{opacity:1;pointer-events:auto}}.tool-target:hover,.tool-target-more:hover{color:var(--primary);-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.tool-target:focus-visible,.tool-target-more:focus-visible{color:var(--primary);-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong);outline:1px solid var(--border-strong);outline-offset:2px}@media(prefers-reduced-motion:reduce){.activity-pulse{animation:none}.tool-group-disclosure{transition:none}.tool-target-reveal{animation:none}.tool-running-shimmer{color:var(--subtext);-webkit-text-fill-color:currentColor;background:0 0;animation:none}.tool-running-shimmer-icon{animation:none}}@media(forced-colors:active){.tool-running-shimmer{color:canvastext;-webkit-text-fill-color:currentColor;background:0 0;animation:none}.tool-running-shimmer::selection{color:highlighttext;-webkit-text-fill-color:HighlightText}.tool-running-shimmer-icon{color:canvastext;animation:none}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes title-char-in{0%{opacity:0;filter:blur(4px);transform:translateY(.15em)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes pulse{50%{opacity:.5}} diff --git a/ui/dist/assets/index-wEP0FPnn.js b/ui/dist/assets/index-wEP0FPnn.js new file mode 100644 index 00000000..df5c5f61 --- /dev/null +++ b/ui/dist/assets/index-wEP0FPnn.js @@ -0,0 +1,1056 @@ +var EO=Object.defineProperty;var v6=e=>{throw TypeError(e)};var NO=(e,n,t)=>n in e?EO(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Y1=(e,n,t)=>NO(e,typeof n!="symbol"?n+"":n,t),b6=(e,n,t)=>n.has(e)||v6("Cannot "+t);var ir=(e,n,t)=>(b6(e,n,"read from private field"),t?t.call(e):n.get(e)),fi=(e,n,t)=>n.has(e)?v6("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),cs=(e,n,t,r)=>(b6(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t);var x6=(e,n,t,r)=>({set _(s){cs(e,n,s,t)},get _(){return ir(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 a of s)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function t(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=t(s);fetch(s.href,a)}})();function Th(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X1={exports:{}},vf={};/** + * @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 y6;function zO(){if(y6)return vf;y6=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,s,a){var l=null;if(a!==void 0&&(l=""+a),s.key!==void 0&&(l=""+s.key),"key"in s){a={};for(var o in s)o!=="key"&&(a[o]=s[o])}else a=s;return s=a.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:a}}return vf.Fragment=n,vf.jsx=t,vf.jsxs=t,vf}var w6;function jO(){return w6||(w6=1,X1.exports=zO()),X1.exports}var f=jO(),Z1={exports:{}},Gt={};/** + * @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 S6;function AO(){if(S6)return Gt;S6=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"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),m=Symbol.iterator;function g(B){return B===null||typeof B!="object"?null:(B=m&&B[m]||B["@@iterator"],typeof B=="function"?B:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,b={};function v(B,Y,V){this.props=B,this.context=Y,this.refs=b,this.updater=V||S}v.prototype.isReactComponent={},v.prototype.setState=function(B,Y){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,Y,"setState")},v.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function x(){}x.prototype=v.prototype;function y(B,Y,V){this.props=B,this.context=Y,this.refs=b,this.updater=V||S}var C=y.prototype=new x;C.constructor=y,k(C,v.prototype),C.isPureReactComponent=!0;var j=Array.isArray;function N(){}var T={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function D(B,Y,V){var ie=V.ref;return{$$typeof:e,type:B,key:Y,ref:ie!==void 0?ie:null,props:V}}function O(B,Y){return D(B.type,Y,B.props)}function H(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function P(B){var Y={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(V){return Y[V]})}var F=/\/+/g;function W(B,Y){return typeof B=="object"&&B!==null&&B.key!=null?P(""+B.key):Y.toString(36)}function Z(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(N,N):(B.status="pending",B.then(function(Y){B.status==="pending"&&(B.status="fulfilled",B.value=Y)},function(Y){B.status==="pending"&&(B.status="rejected",B.reason=Y)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function U(B,Y,V,ie,le){var ae=typeof B;(ae==="undefined"||ae==="boolean")&&(B=null);var re=!1;if(B===null)re=!0;else switch(ae){case"bigint":case"string":case"number":re=!0;break;case"object":switch(B.$$typeof){case e:case n:re=!0;break;case _:return re=B._init,U(re(B._payload),Y,V,ie,le)}}if(re)return le=le(B),re=ie===""?"."+W(B,0):ie,j(le)?(V="",re!=null&&(V=re.replace(F,"$&/")+"/"),U(le,Y,V,"",function(ce){return ce})):le!=null&&(H(le)&&(le=O(le,V+(le.key==null||B&&B.key===le.key?"":(""+le.key).replace(F,"$&/")+"/")+re)),Y.push(le)),1;re=0;var q=ie===""?".":ie+":";if(j(B))for(var oe=0;oe>>1,L=U[$];if(0>>1;$s(V,J))ies(le,V)?(U[$]=le,U[ie]=J,$=ie):(U[$]=V,U[Y]=J,$=Y);else if(ies(le,J))U[$]=le,U[ie]=J,$=ie;else break e}}return X}function s(U,X){var J=U.sortIndex-X.sortIndex;return J!==0?J:U.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var c=[],d=[],_=1,h=null,m=3,g=!1,S=!1,k=!1,b=!1,v=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function C(U){for(var X=t(d);X!==null;){if(X.callback===null)r(d);else if(X.startTime<=U)r(d),X.sortIndex=X.expirationTime,n(c,X);else break;X=t(d)}}function j(U){if(k=!1,C(U),!S)if(t(c)!==null)S=!0,N||(N=!0,P());else{var X=t(d);X!==null&&Z(j,X.startTime-U)}}var N=!1,T=-1,z=5,D=-1;function O(){return b?!0:!(e.unstable_now()-DU&&O());){var $=h.callback;if(typeof $=="function"){h.callback=null,m=h.priorityLevel;var L=$(h.expirationTime<=U);if(U=e.unstable_now(),typeof L=="function"){h.callback=L,C(U),X=!0;break t}h===t(c)&&r(c),C(U)}else r(c);h=t(c)}if(h!==null)X=!0;else{var B=t(d);B!==null&&Z(j,B.startTime-U),X=!1}}break e}finally{h=null,m=J,g=!1}X=void 0}}finally{X?P():N=!1}}}var P;if(typeof y=="function")P=function(){y(H)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,W=F.port2;F.port1.onmessage=H,P=function(){W.postMessage(null)}}else P=function(){v(H,0)};function Z(U,X){T=v(function(){U(e.unstable_now())},X)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(U){U.callback=null},e.unstable_forceFrameRate=function(U){0>U||125$?(U.sortIndex=J,n(d,U),t(c)===null&&U===t(d)&&(k?(x(T),T=-1):k=!0,Z(j,J-$))):(U.sortIndex=L,n(c,U),S||g||(S=!0,N||(N=!0,P()))),U},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(U){var X=m;return function(){var J=m;m=X;try{return U.apply(this,arguments)}finally{m=J}}}})(ev)),ev}var E6;function MO(){return E6||(E6=1,J1.exports=TO()),J1.exports}var tv={exports:{}},bs={};/** + * @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 N6;function RO(){if(N6)return bs;N6=1;var e=Mh();function n(c){var d="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(),tv.exports=RO(),tv.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 j6;function DO(){if(j6)return bf;j6=1;var e=MO(),n=Mh(),t=xE();function r(i){var u="https://react.dev/errors/"+i;if(1L||(i.current=$[L],$[L]=null,L--)}function V(i,u){L++,$[L]=i.current,i.current=u}var ie=B(null),le=B(null),ae=B(null),re=B(null);function q(i,u){switch(V(ae,u),V(le,i),V(ie,null),u.nodeType){case 9:case 11:i=(i=u.documentElement)&&(i=i.namespaceURI)?P3(i):0;break;default:if(i=u.tagName,u=u.namespaceURI)u=P3(u),i=F3(u,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Y(ie),V(ie,i)}function oe(){Y(ie),Y(le),Y(ae)}function ce(i){i.memoizedState!==null&&V(re,i);var u=ie.current,p=F3(u,i.type);u!==p&&(V(le,i),V(ie,p))}function _e(i){le.current===i&&(Y(ie),Y(le)),re.current===i&&(Y(re),_f._currentValue=J)}var de,ve;function Ce(i){if(de===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);de=u&&u[1]||"",ve=-1)":-1A||he[w]!==Se[A]){var Te=` +`+he[w].replace(" at new "," at ");return i.displayName&&Te.includes("")&&(Te=Te.replace("",i.displayName)),Te}while(1<=w&&0<=A);break}}}finally{Le=!1,Error.prepareStackTrace=p}return(p=i?i.displayName||i.name:"")?Ce(p):""}function He(i,u){switch(i.tag){case 26:case 27:case 5:return Ce(i.type);case 16:return Ce("Lazy");case 13:return i.child!==u&&u!==null?Ce("Suspense Fallback"):Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 15:return Ue(i.type,!1);case 11:return Ue(i.type.render,!1);case 1:return Ue(i.type,!0);case 31:return Ce("Activity");default:return""}}function Bt(i){try{var u="",p=null;do u+=He(i,p),p=i,i=i.return;while(i);return u}catch(w){return` +Error generating stack: `+w.message+` +`+w.stack}}var Et=Object.prototype.hasOwnProperty,Nt=e.unstable_scheduleCallback,cn=e.unstable_cancelCallback,vt=e.unstable_shouldYield,rt=e.unstable_requestPaint,Je=e.unstable_now,qt=e.unstable_getCurrentPriorityLevel,we=e.unstable_ImmediatePriority,Oe=e.unstable_UserBlockingPriority,Xe=e.unstable_NormalPriority,st=e.unstable_LowPriority,tt=e.unstable_IdlePriority,zt=e.log,bt=e.unstable_setDisableYieldValue,Rt=null,et=null;function Vt(i){if(typeof zt=="function"&&bt(i),et&&typeof et.setStrictMode=="function")try{et.setStrictMode(Rt,i)}catch{}}var jt=Math.clz32?Math.clz32:ur,Gn=Math.log,nn=Math.LN2;function ur(i){return i>>>=0,i===0?32:31-(Gn(i)/nn|0)|0}var yr=256,An=262144,Vn=4194304;function rn(i){var u=i&42;if(u!==0)return u;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function wn(i,u,p){var w=i.pendingLanes;if(w===0)return 0;var A=0,R=i.suspendedLanes,K=i.pingedLanes;i=i.warmLanes;var ee=w&134217727;return ee!==0?(w=ee&~R,w!==0?A=rn(w):(K&=ee,K!==0?A=rn(K):p||(p=ee&~i,p!==0&&(A=rn(p))))):(ee=w&~R,ee!==0?A=rn(ee):K!==0?A=rn(K):p||(p=w&~i,p!==0&&(A=rn(p)))),A===0?0:u!==0&&u!==A&&(u&R)===0&&(R=A&-A,p=u&-u,R>=p||R===32&&(p&4194048)!==0)?u:A}function Sn(i,u){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&u)===0}function dt(i,u){switch(i){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 i=Vn;return Vn<<=1,(Vn&62914560)===0&&(Vn=4194304),i}function Ye(i){for(var u=[],p=0;31>p;p++)u.push(i);return u}function at(i,u){i.pendingLanes|=u,u!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function on(i,u,p,w,A,R){var K=i.pendingLanes;i.pendingLanes=p,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=p,i.entangledLanes&=p,i.errorRecoveryDisabledLanes&=p,i.shellSuspendCounter=0;var ee=i.entanglements,he=i.expirationTimes,Se=i.hiddenUpdates;for(p=K&~p;0"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Oo=/[\n"\\]/g;function Kn(i){return i.replace(Oo,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Ci(i,u,p,w,A,R,K,ee){i.name="",K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?i.type=K:i.removeAttribute("type"),u!=null?K==="number"?(u===0&&i.value===""||i.value!=u)&&(i.value=""+wr(u)):i.value!==""+wr(u)&&(i.value=""+wr(u)):K!=="submit"&&K!=="reset"||i.removeAttribute("value"),u!=null?ti(i,K,wr(u)):p!=null?ti(i,K,wr(p)):w!=null&&i.removeAttribute("value"),A==null&&R!=null&&(i.defaultChecked=!!R),A!=null&&(i.checked=A&&typeof A!="function"&&typeof A!="symbol"),ee!=null&&typeof ee!="function"&&typeof ee!="symbol"&&typeof ee!="boolean"?i.name=""+wr(ee):i.removeAttribute("name")}function ua(i,u,p,w,A,R,K,ee){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(i.type=R),u!=null||p!=null){if(!(R!=="submit"&&R!=="reset"||u!=null)){ei(i);return}p=p!=null?""+wr(p):"",u=u!=null?""+wr(u):p,ee||u===i.value||(i.value=u),i.defaultValue=u}w=w??A,w=typeof w!="function"&&typeof w!="symbol"&&!!w,i.checked=ee?i.checked:!!w,i.defaultChecked=!!w,K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"&&(i.name=K),ei(i)}function ti(i,u,p){u==="number"&&$s(i.ownerDocument)===i||i.defaultValue===""+p||(i.defaultValue=""+p)}function ni(i,u,p,w){if(i=i.options,u){u={};for(var A=0;A"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ar=!1;if(hs)try{var rs={};Object.defineProperty(rs,"passive",{get:function(){Ar=!0}}),window.addEventListener("test",rs,rs),window.removeEventListener("test",rs,rs)}catch{Ar=!1}var Vr=null,_a=null,Ns=null;function Ya(){if(Ns)return Ns;var i,u=_a,p=u.length,w,A="value"in Vr?Vr.value:Vr.textContent,R=A.length;for(i=0;i=Fo),Dd=" ",te=!1;function me(i,u){switch(i){case"keyup":return e_.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ze(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var je=!1;function Ge(i,u){switch(i){case"compositionend":return ze(u);case"keypress":return u.which!==32?null:(te=!0,Dd);case"textInput":return i=u.data,i===Dd&&te?null:i;default:return null}}function kt(i,u){if(je)return i==="compositionend"||!Qc&&me(i,u)?(i=Ya(),Ns=_a=Vr=null,je=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:p,offset:u-i};i=w}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=Ln(p)}}function va(i,u){return i&&u?i===u?!0:i&&i.nodeType===3?!1:u&&u.nodeType===3?va(i,u.parentNode):"contains"in i?i.contains(u):i.compareDocumentPosition?!!(i.compareDocumentPosition(u)&16):!1:!1}function Mr(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var u=$s(i.document);u instanceof i.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)i=u.contentWindow;else break;u=$s(i.document)}return u}function Go(i){var u=i&&i.nodeName&&i.nodeName.toLowerCase();return u&&(u==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||u==="textarea"||i.contentEditable==="true")}var js=hs&&"documentMode"in document&&11>=document.documentMode,Jc=null,ig=null,Bd=null,ag=!1;function cw(i,u,p){var w=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;ag||Jc==null||Jc!==$s(w)||(w=Jc,"selectionStart"in w&&Go(w)?w={start:w.selectionStart,end:w.selectionEnd}:(w=(w.ownerDocument&&w.ownerDocument.defaultView||window).getSelection(),w={anchorNode:w.anchorNode,anchorOffset:w.anchorOffset,focusNode:w.focusNode,focusOffset:w.focusOffset}),Bd&&qo(Bd,w)||(Bd=w,w=V_(ig,"onSelect"),0>=K,A-=K,ba=1<<32-jt(u)+A|p<Jt?(mn=pt,pt=null):mn=pt.sibling;var yn=Ne(be,pt,ye[Jt],Re);if(yn===null){pt===null&&(pt=mn);break}i&&pt&&yn.alternate===null&&u(be,pt),pe=R(yn,pe,Jt),xn===null?wt=yn:xn.sibling=yn,xn=yn,pt=mn}if(Jt===ye.length)return p(be,pt),gn&&Qa(be,Jt),wt;if(pt===null){for(;JtJt?(mn=pt,pt=null):mn=pt.sibling;var hl=Ne(be,pt,yn.value,Re);if(hl===null){pt===null&&(pt=mn);break}i&&pt&&hl.alternate===null&&u(be,pt),pe=R(hl,pe,Jt),xn===null?wt=hl:xn.sibling=hl,xn=hl,pt=mn}if(yn.done)return p(be,pt),gn&&Qa(be,Jt),wt;if(pt===null){for(;!yn.done;Jt++,yn=ye.next())yn=De(be,yn.value,Re),yn!==null&&(pe=R(yn,pe,Jt),xn===null?wt=yn:xn.sibling=yn,xn=yn);return gn&&Qa(be,Jt),wt}for(pt=w(pt);!yn.done;Jt++,yn=ye.next())yn=Ae(pt,be,Jt,yn.value,Re),yn!==null&&(i&&yn.alternate!==null&&pt.delete(yn.key===null?Jt:yn.key),pe=R(yn,pe,Jt),xn===null?wt=yn:xn.sibling=yn,xn=yn);return i&&pt.forEach(function(CO){return u(be,CO)}),gn&&Qa(be,Jt),wt}function qn(be,pe,ye,Re){if(typeof ye=="object"&&ye!==null&&ye.type===k&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case g:e:{for(var wt=ye.key;pe!==null;){if(pe.key===wt){if(wt=ye.type,wt===k){if(pe.tag===7){p(be,pe.sibling),Re=A(pe,ye.props.children),Re.return=be,be=Re;break e}}else if(pe.elementType===wt||typeof wt=="object"&&wt!==null&&wt.$$typeof===z&&ac(wt)===pe.type){p(be,pe.sibling),Re=A(pe,ye.props),qd(Re,ye),Re.return=be,be=Re;break e}p(be,pe);break}else u(be,pe);pe=pe.sibling}ye.type===k?(Re=tc(ye.props.children,be.mode,Re,ye.key),Re.return=be,be=Re):(Re=c_(ye.type,ye.key,ye.props,null,be.mode,Re),qd(Re,ye),Re.return=be,be=Re)}return K(be);case S:e:{for(wt=ye.key;pe!==null;){if(pe.key===wt)if(pe.tag===4&&pe.stateNode.containerInfo===ye.containerInfo&&pe.stateNode.implementation===ye.implementation){p(be,pe.sibling),Re=A(pe,ye.children||[]),Re.return=be,be=Re;break e}else{p(be,pe);break}else u(be,pe);pe=pe.sibling}Re=hg(ye,be.mode,Re),Re.return=be,be=Re}return K(be);case z:return ye=ac(ye),qn(be,pe,ye,Re)}if(Z(ye))return ft(be,pe,ye,Re);if(P(ye)){if(wt=P(ye),typeof wt!="function")throw Error(r(150));return ye=wt.call(ye),Mt(be,pe,ye,Re)}if(typeof ye.then=="function")return qn(be,pe,m_(ye),Re);if(ye.$$typeof===y)return qn(be,pe,f_(be,ye),Re);g_(be,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint"?(ye=""+ye,pe!==null&&pe.tag===6?(p(be,pe.sibling),Re=A(pe,ye),Re.return=be,be=Re):(p(be,pe),Re=fg(ye,be.mode,Re),Re.return=be,be=Re),K(be)):p(be,pe)}return function(be,pe,ye,Re){try{Ud=0;var wt=qn(be,pe,ye,Re);return uu=null,wt}catch(pt){if(pt===cu||pt===__)throw pt;var xn=ai(29,pt,null,be.mode);return xn.lanes=Re,xn.return=be,xn}finally{}}}var lc=Mw(!0),Rw=Mw(!1),Xo=!1;function Cg(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Eg(i,u){i=i.updateQueue,u.updateQueue===i&&(u.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Zo(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Qo(i,u,p){var w=i.updateQueue;if(w===null)return null;if(w=w.shared,(En&2)!==0){var A=w.pending;return A===null?u.next=u:(u.next=A.next,A.next=u),w.pending=u,u=l_(i),mw(i,null,p),u}return o_(i,w,u,p),l_(i)}function Gd(i,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var w=u.lanes;w&=i.pendingLanes,p|=w,u.lanes=p,Tt(i,p)}}function Ng(i,u){var p=i.updateQueue,w=i.alternate;if(w!==null&&(w=w.updateQueue,p===w)){var A=null,R=null;if(p=p.firstBaseUpdate,p!==null){do{var K={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};R===null?A=R=K:R=R.next=K,p=p.next}while(p!==null);R===null?A=R=u:R=R.next=u}else A=R=u;p={baseState:w.baseState,firstBaseUpdate:A,lastBaseUpdate:R,shared:w.shared,callbacks:w.callbacks},i.updateQueue=p;return}i=p.lastBaseUpdate,i===null?p.firstBaseUpdate=u:i.next=u,p.lastBaseUpdate=u}var zg=!1;function Vd(){if(zg){var i=lu;if(i!==null)throw i}}function Wd(i,u,p,w){zg=!1;var A=i.updateQueue;Xo=!1;var R=A.firstBaseUpdate,K=A.lastBaseUpdate,ee=A.shared.pending;if(ee!==null){A.shared.pending=null;var he=ee,Se=he.next;he.next=null,K===null?R=Se:K.next=Se,K=he;var Te=i.alternate;Te!==null&&(Te=Te.updateQueue,ee=Te.lastBaseUpdate,ee!==K&&(ee===null?Te.firstBaseUpdate=Se:ee.next=Se,Te.lastBaseUpdate=he))}if(R!==null){var De=A.baseState;K=0,Te=Se=he=null,ee=R;do{var Ne=ee.lane&-536870913,Ae=Ne!==ee.lane;if(Ae?(pn&Ne)===Ne:(w&Ne)===Ne){Ne!==0&&Ne===ou&&(zg=!0),Te!==null&&(Te=Te.next={lane:0,tag:ee.tag,payload:ee.payload,callback:null,next:null});e:{var ft=i,Mt=ee;Ne=u;var qn=p;switch(Mt.tag){case 1:if(ft=Mt.payload,typeof ft=="function"){De=ft.call(qn,De,Ne);break e}De=ft;break e;case 3:ft.flags=ft.flags&-65537|128;case 0:if(ft=Mt.payload,Ne=typeof ft=="function"?ft.call(qn,De,Ne):ft,Ne==null)break e;De=h({},De,Ne);break e;case 2:Xo=!0}}Ne=ee.callback,Ne!==null&&(i.flags|=64,Ae&&(i.flags|=8192),Ae=A.callbacks,Ae===null?A.callbacks=[Ne]:Ae.push(Ne))}else Ae={lane:Ne,tag:ee.tag,payload:ee.payload,callback:ee.callback,next:null},Te===null?(Se=Te=Ae,he=De):Te=Te.next=Ae,K|=Ne;if(ee=ee.next,ee===null){if(ee=A.shared.pending,ee===null)break;Ae=ee,ee=Ae.next,Ae.next=null,A.lastBaseUpdate=Ae,A.shared.pending=null}}while(!0);Te===null&&(he=De),A.baseState=he,A.firstBaseUpdate=Se,A.lastBaseUpdate=Te,R===null&&(A.shared.lanes=0),rl|=K,i.lanes=K,i.memoizedState=De}}function Dw(i,u){if(typeof i!="function")throw Error(r(191,i));i.call(u)}function Lw(i,u){var p=i.callbacks;if(p!==null)for(i.callbacks=null,i=0;iR?R:8;var K=U.T,ee={};U.T=ee,Wg(i,!1,u,p);try{var he=A(),Se=U.S;if(Se!==null&&Se(ee,he),he!==null&&typeof he=="object"&&typeof he.then=="function"){var Te=_L(he,w);Xd(i,u,Te,di(i))}else Xd(i,u,w,di(i))}catch(De){Xd(i,u,{then:function(){},status:"rejected",reason:De},di())}finally{X.p=R,K!==null&&ee.types!==null&&(K.types=ee.types),U.T=K}}function xL(){}function Gg(i,u,p,w){if(i.tag!==5)throw Error(r(476));var A=h5(i).queue;f5(i,A,u,J,p===null?xL:function(){return _5(i),p(w)})}function h5(i){var u=i.memoizedState;if(u!==null)return u;u={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:no,lastRenderedState:J},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:no,lastRenderedState:p},next:null},i.memoizedState=u,i=i.alternate,i!==null&&(i.memoizedState=u),u}function _5(i){var u=h5(i);u.next===null&&(u=i.alternate.memoizedState),Xd(i,u.next.queue,{},di())}function Vg(){return as(_f)}function p5(){return Er().memoizedState}function m5(){return Er().memoizedState}function yL(i){for(var u=i.return;u!==null;){switch(u.tag){case 24:case 3:var p=di();i=Zo(p);var w=Qo(u,i,p);w!==null&&(Ws(w,u,p),Gd(w,u,p)),u={cache:yg()},i.payload=u;return}u=u.return}}function wL(i,u,p){var w=di();p={lane:w,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},N_(i)?v5(u,p):(p=ug(i,u,p,w),p!==null&&(Ws(p,i,w),b5(p,u,w)))}function g5(i,u,p){var w=di();Xd(i,u,p,w)}function Xd(i,u,p,w){var A={lane:w,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(N_(i))v5(u,A);else{var R=i.alternate;if(i.lanes===0&&(R===null||R.lanes===0)&&(R=u.lastRenderedReducer,R!==null))try{var K=u.lastRenderedState,ee=R(K,p);if(A.hasEagerState=!0,A.eagerState=ee,vs(ee,K))return o_(i,u,A,0),Yn===null&&a_(),!1}catch{}finally{}if(p=ug(i,u,A,w),p!==null)return Ws(p,i,w),b5(p,u,w),!0}return!1}function Wg(i,u,p,w){if(w={lane:2,revertLane:C1(),gesture:null,action:w,hasEagerState:!1,eagerState:null,next:null},N_(i)){if(u)throw Error(r(479))}else u=ug(i,p,w,2),u!==null&&Ws(u,i,2)}function N_(i){var u=i.alternate;return i===Xt||u!==null&&u===Xt}function v5(i,u){fu=x_=!0;var p=i.pending;p===null?u.next=u:(u.next=p.next,p.next=u),i.pending=u}function b5(i,u,p){if((p&4194048)!==0){var w=u.lanes;w&=i.pendingLanes,p|=w,u.lanes=p,Tt(i,p)}}var Zd={readContext:as,use:S_,useCallback:vr,useContext:vr,useEffect:vr,useImperativeHandle:vr,useLayoutEffect:vr,useInsertionEffect:vr,useMemo:vr,useReducer:vr,useRef:vr,useState:vr,useDebugValue:vr,useDeferredValue:vr,useTransition:vr,useSyncExternalStore:vr,useId:vr,useHostTransitionStatus:vr,useFormState:vr,useActionState:vr,useOptimistic:vr,useMemoCache:vr,useCacheRefresh:vr};Zd.useEffectEvent=vr;var x5={readContext:as,use:S_,useCallback:function(i,u){return As().memoizedState=[i,u===void 0?null:u],i},useContext:as,useEffect:r5,useImperativeHandle:function(i,u,p){p=p!=null?p.concat([i]):null,C_(4194308,4,o5.bind(null,u,i),p)},useLayoutEffect:function(i,u){return C_(4194308,4,i,u)},useInsertionEffect:function(i,u){C_(4,2,i,u)},useMemo:function(i,u){var p=As();u=u===void 0?null:u;var w=i();if(cc){Vt(!0);try{i()}finally{Vt(!1)}}return p.memoizedState=[w,u],w},useReducer:function(i,u,p){var w=As();if(p!==void 0){var A=p(u);if(cc){Vt(!0);try{p(u)}finally{Vt(!1)}}}else A=u;return w.memoizedState=w.baseState=A,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:A},w.queue=i,i=i.dispatch=wL.bind(null,Xt,i),[w.memoizedState,i]},useRef:function(i){var u=As();return i={current:i},u.memoizedState=i},useState:function(i){i=Hg(i);var u=i.queue,p=g5.bind(null,Xt,u);return u.dispatch=p,[i.memoizedState,p]},useDebugValue:Ug,useDeferredValue:function(i,u){var p=As();return qg(p,i,u)},useTransition:function(){var i=Hg(!1);return i=f5.bind(null,Xt,i.queue,!0,!1),As().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,u,p){var w=Xt,A=As();if(gn){if(p===void 0)throw Error(r(407));p=p()}else{if(p=u(),Yn===null)throw Error(r(349));(pn&127)!==0||Pw(w,u,p)}A.memoizedState=p;var R={value:p,getSnapshot:u};return A.queue=R,r5(Uw.bind(null,w,R,i),[i]),w.flags|=2048,_u(9,{destroy:void 0},Fw.bind(null,w,R,p,u),null),p},useId:function(){var i=As(),u=Yn.identifierPrefix;if(gn){var p=xa,w=ba;p=(w&~(1<<32-jt(w)-1)).toString(32)+p,u="_"+u+"R_"+p,p=y_++,0<\/script>",R=R.removeChild(R.firstChild);break;case"select":R=typeof w.is=="string"?K.createElement("select",{is:w.is}):K.createElement("select"),w.multiple?R.multiple=!0:w.size&&(R.size=w.size);break;default:R=typeof w.is=="string"?K.createElement(A,{is:w.is}):K.createElement(A)}}R[Cn]=u,R[Pn]=w;e:for(K=u.child;K!==null;){if(K.tag===5||K.tag===6)R.appendChild(K.stateNode);else if(K.tag!==4&&K.tag!==27&&K.child!==null){K.child.return=K,K=K.child;continue}if(K===u)break e;for(;K.sibling===null;){if(K.return===null||K.return===u)break e;K=K.return}K.sibling.return=K.return,K=K.sibling}u.stateNode=R;e:switch(ls(R,A,w),A){case"button":case"input":case"select":case"textarea":w=!!w.autoFocus;break e;case"img":w=!0;break e;default:w=!1}w&&so(u)}}return nr(u),o1(u,u.type,i===null?null:i.memoizedProps,u.pendingProps,p),null;case 6:if(i&&u.stateNode!=null)i.memoizedProps!==w&&so(u);else{if(typeof w!="string"&&u.stateNode===null)throw Error(r(166));if(i=ae.current,iu(u)){if(i=u.stateNode,p=u.memoizedProps,w=null,A=is,A!==null)switch(A.tag){case 27:case 5:w=A.memoizedProps}i[Cn]=u,i=!!(i.nodeValue===p||w!==null&&w.suppressHydrationWarning===!0||$3(i.nodeValue,p)),i||Ko(u,!0)}else i=W_(i).createTextNode(w),i[Cn]=u,u.stateNode=i}return nr(u),null;case 31:if(p=u.memoizedState,i===null||i.memoizedState!==null){if(w=iu(u),p!==null){if(i===null){if(!w)throw Error(r(318));if(i=u.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Cn]=u}else nc(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;nr(u),i=!1}else p=gg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),i=!0;if(!i)return u.flags&256?(li(u),u):(li(u),null);if((u.flags&128)!==0)throw Error(r(558))}return nr(u),null;case 13:if(w=u.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(A=iu(u),w!==null&&w.dehydrated!==null){if(i===null){if(!A)throw Error(r(318));if(A=u.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(r(317));A[Cn]=u}else nc(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;nr(u),A=!1}else A=gg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=A),A=!0;if(!A)return u.flags&256?(li(u),u):(li(u),null)}return li(u),(u.flags&128)!==0?(u.lanes=p,u):(p=w!==null,i=i!==null&&i.memoizedState!==null,p&&(w=u.child,A=null,w.alternate!==null&&w.alternate.memoizedState!==null&&w.alternate.memoizedState.cachePool!==null&&(A=w.alternate.memoizedState.cachePool.pool),R=null,w.memoizedState!==null&&w.memoizedState.cachePool!==null&&(R=w.memoizedState.cachePool.pool),R!==A&&(w.flags|=2048)),p!==i&&p&&(u.child.flags|=8192),M_(u,u.updateQueue),nr(u),null);case 4:return oe(),i===null&&j1(u.stateNode.containerInfo),nr(u),null;case 10:return eo(u.type),nr(u),null;case 19:if(Y(Cr),w=u.memoizedState,w===null)return nr(u),null;if(A=(u.flags&128)!==0,R=w.rendering,R===null)if(A)Jd(w,!1);else{if(br!==0||i!==null&&(i.flags&128)!==0)for(i=u.child;i!==null;){if(R=b_(i),R!==null){for(u.flags|=128,Jd(w,!1),i=R.updateQueue,u.updateQueue=i,M_(u,i),u.subtreeFlags=0,i=p,p=u.child;p!==null;)gw(p,i),p=p.sibling;return V(Cr,Cr.current&1|2),gn&&Qa(u,w.treeForkCount),u.child}i=i.sibling}w.tail!==null&&Je()>I_&&(u.flags|=128,A=!0,Jd(w,!1),u.lanes=4194304)}else{if(!A)if(i=b_(R),i!==null){if(u.flags|=128,A=!0,i=i.updateQueue,u.updateQueue=i,M_(u,i),Jd(w,!0),w.tail===null&&w.tailMode==="hidden"&&!R.alternate&&!gn)return nr(u),null}else 2*Je()-w.renderingStartTime>I_&&p!==536870912&&(u.flags|=128,A=!0,Jd(w,!1),u.lanes=4194304);w.isBackwards?(R.sibling=u.child,u.child=R):(i=w.last,i!==null?i.sibling=R:u.child=R,w.last=R)}return w.tail!==null?(i=w.tail,w.rendering=i,w.tail=i.sibling,w.renderingStartTime=Je(),i.sibling=null,p=Cr.current,V(Cr,A?p&1|2:p&1),gn&&Qa(u,w.treeForkCount),i):(nr(u),null);case 22:case 23:return li(u),Ag(),w=u.memoizedState!==null,i!==null?i.memoizedState!==null!==w&&(u.flags|=8192):w&&(u.flags|=8192),w?(p&536870912)!==0&&(u.flags&128)===0&&(nr(u),u.subtreeFlags&6&&(u.flags|=8192)):nr(u),p=u.updateQueue,p!==null&&M_(u,p.retryQueue),p=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(p=i.memoizedState.cachePool.pool),w=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(w=u.memoizedState.cachePool.pool),w!==p&&(u.flags|=2048),i!==null&&Y(ic),null;case 24:return p=null,i!==null&&(p=i.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),eo(Rr),nr(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function NL(i,u){switch(pg(u),u.tag){case 1:return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 3:return eo(Rr),oe(),i=u.flags,(i&65536)!==0&&(i&128)===0?(u.flags=i&-65537|128,u):null;case 26:case 27:case 5:return _e(u),null;case 31:if(u.memoizedState!==null){if(li(u),u.alternate===null)throw Error(r(340));nc()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 13:if(li(u),i=u.memoizedState,i!==null&&i.dehydrated!==null){if(u.alternate===null)throw Error(r(340));nc()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 19:return Y(Cr),null;case 4:return oe(),null;case 10:return eo(u.type),null;case 22:case 23:return li(u),Ag(),i!==null&&Y(ic),i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 24:return eo(Rr),null;case 25:return null;default:return null}}function q5(i,u){switch(pg(u),u.tag){case 3:eo(Rr),oe();break;case 26:case 27:case 5:_e(u);break;case 4:oe();break;case 31:u.memoizedState!==null&&li(u);break;case 13:li(u);break;case 19:Y(Cr);break;case 10:eo(u.type);break;case 22:case 23:li(u),Ag(),i!==null&&Y(ic);break;case 24:eo(Rr)}}function ef(i,u){try{var p=u.updateQueue,w=p!==null?p.lastEffect:null;if(w!==null){var A=w.next;p=A;do{if((p.tag&i)===i){w=void 0;var R=p.create,K=p.inst;w=R(),K.destroy=w}p=p.next}while(p!==A)}}catch(ee){Hn(u,u.return,ee)}}function tl(i,u,p){try{var w=u.updateQueue,A=w!==null?w.lastEffect:null;if(A!==null){var R=A.next;w=R;do{if((w.tag&i)===i){var K=w.inst,ee=K.destroy;if(ee!==void 0){K.destroy=void 0,A=u;var he=p,Se=ee;try{Se()}catch(Te){Hn(A,he,Te)}}}w=w.next}while(w!==R)}}catch(Te){Hn(u,u.return,Te)}}function G5(i){var u=i.updateQueue;if(u!==null){var p=i.stateNode;try{Lw(u,p)}catch(w){Hn(i,i.return,w)}}}function V5(i,u,p){p.props=uc(i.type,i.memoizedProps),p.state=i.memoizedState;try{p.componentWillUnmount()}catch(w){Hn(i,u,w)}}function tf(i,u){try{var p=i.ref;if(p!==null){switch(i.tag){case 26:case 27:case 5:var w=i.stateNode;break;case 30:w=i.stateNode;break;default:w=i.stateNode}typeof p=="function"?i.refCleanup=p(w):p.current=w}}catch(A){Hn(i,u,A)}}function ya(i,u){var p=i.ref,w=i.refCleanup;if(p!==null)if(typeof w=="function")try{w()}catch(A){Hn(i,u,A)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(A){Hn(i,u,A)}else p.current=null}function W5(i){var u=i.type,p=i.memoizedProps,w=i.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&w.focus();break e;case"img":p.src?w.src=p.src:p.srcSet&&(w.srcset=p.srcSet)}}catch(A){Hn(i,i.return,A)}}function l1(i,u,p){try{var w=i.stateNode;YL(w,i.type,p,u),w[Pn]=u}catch(A){Hn(i,i.return,A)}}function K5(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&ll(i.type)||i.tag===4}function c1(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||K5(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&ll(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function u1(i,u,p){var w=i.tag;if(w===5||w===6)i=i.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(i,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(i),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=gr));else if(w!==4&&(w===27&&ll(i.type)&&(p=i.stateNode,u=null),i=i.child,i!==null))for(u1(i,u,p),i=i.sibling;i!==null;)u1(i,u,p),i=i.sibling}function R_(i,u,p){var w=i.tag;if(w===5||w===6)i=i.stateNode,u?p.insertBefore(i,u):p.appendChild(i);else if(w!==4&&(w===27&&ll(i.type)&&(p=i.stateNode),i=i.child,i!==null))for(R_(i,u,p),i=i.sibling;i!==null;)R_(i,u,p),i=i.sibling}function Y5(i){var u=i.stateNode,p=i.memoizedProps;try{for(var w=i.type,A=u.attributes;A.length;)u.removeAttributeNode(A[0]);ls(u,w,p),u[Cn]=i,u[Pn]=p}catch(R){Hn(i,i.return,R)}}var io=!1,Or=!1,d1=!1,X5=typeof WeakSet=="function"?WeakSet:Set,es=null;function zL(i,u){if(i=i.containerInfo,M1=e0,i=Mr(i),Go(i)){if("selectionStart"in i)var p={start:i.selectionStart,end:i.selectionEnd};else e:{p=(p=i.ownerDocument)&&p.defaultView||window;var w=p.getSelection&&p.getSelection();if(w&&w.rangeCount!==0){p=w.anchorNode;var A=w.anchorOffset,R=w.focusNode;w=w.focusOffset;try{p.nodeType,R.nodeType}catch{p=null;break e}var K=0,ee=-1,he=-1,Se=0,Te=0,De=i,Ne=null;t:for(;;){for(var Ae;De!==p||A!==0&&De.nodeType!==3||(ee=K+A),De!==R||w!==0&&De.nodeType!==3||(he=K+w),De.nodeType===3&&(K+=De.nodeValue.length),(Ae=De.firstChild)!==null;)Ne=De,De=Ae;for(;;){if(De===i)break t;if(Ne===p&&++Se===A&&(ee=K),Ne===R&&++Te===w&&(he=K),(Ae=De.nextSibling)!==null)break;De=Ne,Ne=De.parentNode}De=Ae}p=ee===-1||he===-1?null:{start:ee,end:he}}else p=null}p=p||{start:0,end:0}}else p=null;for(R1={focusedElem:i,selectionRange:p},e0=!1,es=u;es!==null;)if(u=es,i=u.child,(u.subtreeFlags&1028)!==0&&i!==null)i.return=u,es=i;else for(;es!==null;){switch(u=es,R=u.alternate,i=u.flags,u.tag){case 0:if((i&4)!==0&&(i=u.updateQueue,i=i!==null?i.events:null,i!==null))for(p=0;p title"))),ls(R,w,p),R[Cn]=i,qe(R),w=R;break e;case"link":var K=n6("link","href",A).get(w+(p.href||""));if(K){for(var ee=0;eeqn&&(K=qn,qn=Mt,Mt=K);var be=ga(ee,Mt),pe=ga(ee,qn);if(be&&pe&&(Ae.rangeCount!==1||Ae.anchorNode!==be.node||Ae.anchorOffset!==be.offset||Ae.focusNode!==pe.node||Ae.focusOffset!==pe.offset)){var ye=De.createRange();ye.setStart(be.node,be.offset),Ae.removeAllRanges(),Mt>qn?(Ae.addRange(ye),Ae.extend(pe.node,pe.offset)):(ye.setEnd(pe.node,pe.offset),Ae.addRange(ye))}}}}for(De=[],Ae=ee;Ae=Ae.parentNode;)Ae.nodeType===1&&De.push({element:Ae,left:Ae.scrollLeft,top:Ae.scrollTop});for(typeof ee.focus=="function"&&ee.focus(),ee=0;eep?32:p,U.T=null,p=v1,v1=null;var R=il,K=uo;if(Kr=0,bu=il=null,uo=0,(En&6)!==0)throw Error(r(331));var ee=En;if(En|=4,o3(R.current),s3(R,R.current,K,p),En=ee,lf(0,!1),et&&typeof et.onPostCommitFiberRoot=="function")try{et.onPostCommitFiberRoot(Rt,R)}catch{}return!0}finally{X.p=A,U.T=w,C3(i,u)}}function N3(i,u,p){u=Ai(p,u),u=Zg(i.stateNode,u,2),i=Qo(i,u,2),i!==null&&(at(i,2),wa(i))}function Hn(i,u,p){if(i.tag===3)N3(i,i,p);else for(;u!==null;){if(u.tag===3){N3(u,i,p);break}else if(u.tag===1){var w=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&(sl===null||!sl.has(w))){i=Ai(p,i),p=z5(2),w=Qo(u,p,2),w!==null&&(j5(p,w,u,i),at(w,2),wa(w));break}}u=u.return}}function w1(i,u,p){var w=i.pingCache;if(w===null){w=i.pingCache=new TL;var A=new Set;w.set(u,A)}else A=w.get(u),A===void 0&&(A=new Set,w.set(u,A));A.has(p)||(_1=!0,A.add(p),i=OL.bind(null,i,u,p),u.then(i,i))}function OL(i,u,p){var w=i.pingCache;w!==null&&w.delete(u),i.pingedLanes|=i.suspendedLanes&p,i.warmLanes&=~p,Yn===i&&(pn&p)===p&&(br===4||br===3&&(pn&62914560)===pn&&300>Je()-O_?(En&2)===0&&xu(i,0):p1|=p,vu===pn&&(vu=0)),wa(i)}function z3(i,u){u===0&&(u=un()),i=ec(i,u),i!==null&&(at(i,u),wa(i))}function IL(i){var u=i.memoizedState,p=0;u!==null&&(p=u.retryLane),z3(i,p)}function BL(i,u){var p=0;switch(i.tag){case 31:case 13:var w=i.stateNode,A=i.memoizedState;A!==null&&(p=A.retryLane);break;case 19:w=i.stateNode;break;case 22:w=i.stateNode._retryCache;break;default:throw Error(r(314))}w!==null&&w.delete(u),z3(i,p)}function $L(i,u){return Nt(i,u)}var U_=null,wu=null,S1=!1,q_=!1,k1=!1,ol=0;function wa(i){i!==wu&&i.next===null&&(wu===null?U_=wu=i:wu=wu.next=i),q_=!0,S1||(S1=!0,PL())}function lf(i,u){if(!k1&&q_){k1=!0;do for(var p=!1,w=U_;w!==null;){if(i!==0){var A=w.pendingLanes;if(A===0)var R=0;else{var K=w.suspendedLanes,ee=w.pingedLanes;R=(1<<31-jt(42|i)+1)-1,R&=A&~(K&~ee),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(p=!0,M3(w,R))}else R=pn,R=wn(w,w===Yn?R:0,w.cancelPendingCommit!==null||w.timeoutHandle!==-1),(R&3)===0||Sn(w,R)||(p=!0,M3(w,R));w=w.next}while(p);k1=!1}}function HL(){j3()}function j3(){q_=S1=!1;var i=0;ol!==0&&ZL()&&(i=ol);for(var u=Je(),p=null,w=U_;w!==null;){var A=w.next,R=A3(w,u);R===0?(w.next=null,p===null?U_=A:p.next=A,A===null&&(wu=p)):(p=w,(i!==0||(R&3)!==0)&&(q_=!0)),w=A}Kr!==0&&Kr!==5||lf(i),ol!==0&&(ol=0)}function A3(i,u){for(var p=i.suspendedLanes,w=i.pingedLanes,A=i.expirationTimes,R=i.pendingLanes&-62914561;0ee)break;var Te=he.transferSize,De=he.initiatorType;Te&&H3(De)&&(he=he.responseEnd,K+=Te*(he"u"?null:document;function Q3(i,u,p){var w=Su;if(w&&typeof u=="string"&&u){var A=Kn(u);A='link[rel="'+i+'"][href="'+A+'"]',typeof p=="string"&&(A+='[crossorigin="'+p+'"]'),Z3.has(A)||(Z3.add(A),i={rel:i,crossOrigin:p,href:u},w.querySelector(A)===null&&(u=w.createElement("link"),ls(u,"link",i),qe(u),w.head.appendChild(u)))}}function aO(i){fo.D(i),Q3("dns-prefetch",i,null)}function oO(i,u){fo.C(i,u),Q3("preconnect",i,u)}function lO(i,u,p){fo.L(i,u,p);var w=Su;if(w&&i&&u){var A='link[rel="preload"][as="'+Kn(u)+'"]';u==="image"&&p&&p.imageSrcSet?(A+='[imagesrcset="'+Kn(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(A+='[imagesizes="'+Kn(p.imageSizes)+'"]')):A+='[href="'+Kn(i)+'"]';var R=A;switch(u){case"style":R=ku(i);break;case"script":R=Cu(i)}Oi.has(R)||(i=h({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:i,as:u},p),Oi.set(R,i),w.querySelector(A)!==null||u==="style"&&w.querySelector(ff(R))||u==="script"&&w.querySelector(hf(R))||(u=w.createElement("link"),ls(u,"link",i),qe(u),w.head.appendChild(u)))}}function cO(i,u){fo.m(i,u);var p=Su;if(p&&i){var w=u&&typeof u.as=="string"?u.as:"script",A='link[rel="modulepreload"][as="'+Kn(w)+'"][href="'+Kn(i)+'"]',R=A;switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=Cu(i)}if(!Oi.has(R)&&(i=h({rel:"modulepreload",href:i},u),Oi.set(R,i),p.querySelector(A)===null)){switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(hf(R)))return}w=p.createElement("link"),ls(w,"link",i),qe(w),p.head.appendChild(w)}}}function uO(i,u,p){fo.S(i,u,p);var w=Su;if(w&&i){var A=_n(w).hoistableStyles,R=ku(i);u=u||"default";var K=A.get(R);if(!K){var ee={loading:0,preload:null};if(K=w.querySelector(ff(R)))ee.loading=5;else{i=h({rel:"stylesheet",href:i,"data-precedence":u},p),(p=Oi.get(R))&&H1(i,p);var he=K=w.createElement("link");qe(he),ls(he,"link",i),he._p=new Promise(function(Se,Te){he.onload=Se,he.onerror=Te}),he.addEventListener("load",function(){ee.loading|=1}),he.addEventListener("error",function(){ee.loading|=2}),ee.loading|=4,Y_(K,u,w)}K={type:"stylesheet",instance:K,count:1,state:ee},A.set(R,K)}}}function dO(i,u){fo.X(i,u);var p=Su;if(p&&i){var w=_n(p).hoistableScripts,A=Cu(i),R=w.get(A);R||(R=p.querySelector(hf(A)),R||(i=h({src:i,async:!0},u),(u=Oi.get(A))&&P1(i,u),R=p.createElement("script"),qe(R),ls(R,"link",i),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},w.set(A,R))}}function fO(i,u){fo.M(i,u);var p=Su;if(p&&i){var w=_n(p).hoistableScripts,A=Cu(i),R=w.get(A);R||(R=p.querySelector(hf(A)),R||(i=h({src:i,async:!0,type:"module"},u),(u=Oi.get(A))&&P1(i,u),R=p.createElement("script"),qe(R),ls(R,"link",i),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},w.set(A,R))}}function J3(i,u,p,w){var A=(A=ae.current)?K_(A):null;if(!A)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=ku(p.href),p=_n(A).hoistableStyles,w=p.get(u),w||(w={type:"style",instance:null,count:0,state:null},p.set(u,w)),w):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){i=ku(p.href);var R=_n(A).hoistableStyles,K=R.get(i);if(K||(A=A.ownerDocument||A,K={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(i,K),(R=A.querySelector(ff(i)))&&!R._p&&(K.instance=R,K.state.loading=5),Oi.has(i)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},Oi.set(i,p),R||hO(A,i,p,K.state))),u&&w===null)throw Error(r(528,""));return K}if(u&&w!==null)throw Error(r(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=Cu(p),p=_n(A).hoistableScripts,w=p.get(u),w||(w={type:"script",instance:null,count:0,state:null},p.set(u,w)),w):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function ku(i){return'href="'+Kn(i)+'"'}function ff(i){return'link[rel="stylesheet"]['+i+"]"}function e6(i){return h({},i,{"data-precedence":i.precedence,precedence:null})}function hO(i,u,p,w){i.querySelector('link[rel="preload"][as="style"]['+u+"]")?w.loading=1:(u=i.createElement("link"),w.preload=u,u.addEventListener("load",function(){return w.loading|=1}),u.addEventListener("error",function(){return w.loading|=2}),ls(u,"link",p),qe(u),i.head.appendChild(u))}function Cu(i){return'[src="'+Kn(i)+'"]'}function hf(i){return"script[async]"+i}function t6(i,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var w=i.querySelector('style[data-href~="'+Kn(p.href)+'"]');if(w)return u.instance=w,qe(w),w;var A=h({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return w=(i.ownerDocument||i).createElement("style"),qe(w),ls(w,"style",A),Y_(w,p.precedence,i),u.instance=w;case"stylesheet":A=ku(p.href);var R=i.querySelector(ff(A));if(R)return u.state.loading|=4,u.instance=R,qe(R),R;w=e6(p),(A=Oi.get(A))&&H1(w,A),R=(i.ownerDocument||i).createElement("link"),qe(R);var K=R;return K._p=new Promise(function(ee,he){K.onload=ee,K.onerror=he}),ls(R,"link",w),u.state.loading|=4,Y_(R,p.precedence,i),u.instance=R;case"script":return R=Cu(p.src),(A=i.querySelector(hf(R)))?(u.instance=A,qe(A),A):(w=p,(A=Oi.get(R))&&(w=h({},p),P1(w,A)),i=i.ownerDocument||i,A=i.createElement("script"),qe(A),ls(A,"link",w),i.head.appendChild(A),u.instance=A);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(w=u.instance,u.state.loading|=4,Y_(w,p.precedence,i));return u.instance}function Y_(i,u,p){for(var w=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),A=w.length?w[w.length-1]:null,R=A,K=0;K title"):null)}function _O(i,u,p){if(p===1||u.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return i=u.disabled,typeof u.precedence=="string"&&i==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function s6(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function pO(i,u,p,w){if(p.type==="stylesheet"&&(typeof w.media!="string"||matchMedia(w.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var A=ku(w.href),R=u.querySelector(ff(A));if(R){u=R._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(i.count++,i=Z_.bind(i),u.then(i,i)),p.state.loading|=4,p.instance=R,qe(R);return}R=u.ownerDocument||u,w=e6(w),(A=Oi.get(A))&&H1(w,A),R=R.createElement("link"),qe(R);var K=R;K._p=new Promise(function(ee,he){K.onload=ee,K.onerror=he}),ls(R,"link",w),p.instance=R}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(p,u),(u=p.state.preload)&&(p.state.loading&3)===0&&(i.count++,p=Z_.bind(i),u.addEventListener("load",p),u.addEventListener("error",p))}}var F1=0;function mO(i,u){return i.stylesheets&&i.count===0&&J_(i,i.stylesheets),0F1?50:800)+u);return i.unsuspend=p,function(){i.unsuspend=null,clearTimeout(w),clearTimeout(A)}}:null}function Z_(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)J_(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Q_=null;function J_(i,u){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Q_=new Map,u.forEach(gO,i),Q_=null,Z_.call(i))}function gO(i,u){if(!(u.state.loading&4)){var p=Q_.get(i);if(p)var w=p.get(null);else{p=new Map,Q_.set(i,p);for(var A=i.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Q1.exports=DO(),Q1.exports}var OO=LO();const IO={},BO="en",zx=["en","zh-CN","fa"],yE="orx:locale",jx=["localStorage","preferredLanguage","baseLocale"],T6=[],Kf=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let M6=!1,E=()=>{var t;let e=jx;!Kf&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=kE(window.location.href));const n=$O(e);if(n)return M6||(M6=!0,wE(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function $O(e,n){let t;for(const r of e){if(r==="baseLocale")t=BO;else if(r==="preferredLanguage"&&!Kf)t=qO();else if(r==="localStorage"&&!Kf)t=localStorage.getItem(yE)??void 0;else if(CE(r)&&cp.has(r)){const a=cp.get(r);if(a){const l=a.getLocale();if(l instanceof Promise)continue;if(l!==void 0)return FO(l)}}const s=Yf(t);if(s)return s}}const HO=e=>{window.location.reload()};let wE=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=E()}catch{}const s=[];let a=jx;!Kf&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(a=kE(window.location.href));for(const c of a)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(yE,e);else if(CE(c)&&cp.has(c)){const d=cp.get(c);if(d){let _=d.setLocale(e);_ instanceof Promise&&(_=_.catch(h=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:h})}),s.push(_))}}}const l=()=>{!Kf&&t.reload&&window.location&&e!==r&&HO()};if(s.length)return Promise.all(s).then(()=>{l()});l()},PO=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function Yf(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of zx)if(t.toLowerCase()===n)return t}function SE(e){return!!e&&zx.some(n=>n===e)}function FO(e){const n=Yf(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${zx.join(", ")}`)}function UO(e,n){return e.exec(n.href)}function qO(){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=Yf(t.fullTag);if(r)return r;const s=Yf(t.baseTag);if(s)return s}}function GO(e){return VO(e)}function VO(e){const n=typeof e=="string"?new URL(e,PO()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&Yf(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let R6,D6;function WO(e){if(T6.length===0)return;const n=typeof e=="string"?e:e.href;if(R6===n)return D6;const t=new URL(n,"http://example.com"),r=GO(t),s=r.href===t.href?[t]:[t,r];let a;for(const l of s){for(const o of T6){const c=new IO(o.match,l.href);if(UO(c,l)){a=o;break}}if(a)break}return R6=n,D6=a,a}function kE(e){const n=WO(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:jx}const cp=new Map;function CE(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const KO=e=>`Actions for ${e==null?void 0:e.name}`,YO=e=>`${e==null?void 0:e.name} 的操作`,XO=e=>`عملیات ${e==null?void 0:e.name}`,ZO=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YO(e):t==="fa"?XO(e):KO(e)}),QO=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,JO=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,eI=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,tI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JO(e):t==="fa"?eI(e):QO(e)}),nI=e=>`Branch: ${e==null?void 0:e.branch}`,rI=e=>`分支:${e==null?void 0:e.branch}`,sI=e=>`شاخه: ${e==null?void 0:e.branch}`,iI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rI(e):t==="fa"?sI(e):nI(e)}),aI=e=>`Browse code on ${e==null?void 0:e.branch}`,oI=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,lI=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,EE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oI(e):t==="fa"?lI(e):aI(e)}),cI=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,uI=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,dI=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,fI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uI(e):t==="fa"?dI(e):cI(e)}),hI=e=>`Collapse ${e==null?void 0:e.name}`,_I=e=>`折叠 ${e==null?void 0:e.name}`,pI=e=>`بستن ${e==null?void 0:e.name}`,mI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_I(e):t==="fa"?pI(e):hI(e)}),gI=e=>`Committed changes versus ${e==null?void 0:e.parent}`,vI=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,bI=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,xI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vI(e):t==="fa"?bI(e):gI(e)}),yI=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,wI=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,SI=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,kI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wI(e):t==="fa"?SI(e):yI(e)}),CI=e=>`Copy ${e==null?void 0:e.value}`,EI=e=>`复制 ${e==null?void 0:e.value}`,NI=e=>`کپی ${e==null?void 0:e.value}`,zI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EI(e):t==="fa"?NI(e):CI(e)}),jI=e=>`Delete ${e==null?void 0:e.name}`,AI=e=>`删除 ${e==null?void 0:e.name}`,TI=e=>`حذف ${e==null?void 0:e.name}`,Ib=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?AI(e):t==="fa"?TI(e):jI(e)}),MI=e=>`Download ${e==null?void 0:e.name}`,RI=e=>`下载 ${e==null?void 0:e.name}`,DI=e=>`بارگیری ${e==null?void 0:e.name}`,L6=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?RI(e):t==="fa"?DI(e):MI(e)}),LI=e=>`Expand ${e==null?void 0:e.name}`,OI=e=>`展开 ${e==null?void 0:e.name}`,II=e=>`باز کردن ${e==null?void 0:e.name}`,BI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OI(e):t==="fa"?II(e):LI(e)}),$I=e=>`Hide additional ${e==null?void 0:e.target}`,HI=e=>`隐藏其余${e==null?void 0:e.target}`,PI=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,FI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HI(e):t==="fa"?PI(e):$I(e)}),UI=e=>`Hide error details for ${e==null?void 0:e.activity}`,qI=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,GI=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,VI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qI(e):t==="fa"?GI(e):UI(e)}),WI=e=>`${e==null?void 0:e.count} consecutive identical calls`,KI=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,YI=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,XI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KI(e):t==="fa"?YI(e):WI(e)}),ZI=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,QI=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,JI=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,eB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QI(e):t==="fa"?JI(e):ZI(e)}),tB=e=>`Open ${e==null?void 0:e.branch} on GitHub`,nB=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,rB=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,NE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nB(e):t==="fa"?rB(e):tB(e)}),sB=e=>`Open experiment ${e==null?void 0:e.name}`,iB=e=>`打开实验 ${e==null?void 0:e.name}`,aB=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,oB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iB(e):t==="fa"?aB(e):sB(e)}),lB=e=>`Open ${e==null?void 0:e.path} in the right pane`,cB=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,uB=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,dB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cB(e):t==="fa"?uB(e):lB(e)}),fB=e=>`Open ${e==null?void 0:e.name}`,hB=e=>`打开 ${e==null?void 0:e.name}`,_B=e=>`باز کردن ${e==null?void 0:e.name}`,pB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hB(e):t==="fa"?_B(e):fB(e)}),mB=e=>`Open logs for run ${e==null?void 0:e.run}`,gB=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,vB=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,bB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gB(e):t==="fa"?vB(e):mB(e)}),xB=e=>`Open ${e==null?void 0:e.name} on GitHub`,yB=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,wB=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,up=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yB(e):t==="fa"?wB(e):xB(e)}),SB=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,kB=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,CB=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,EB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kB(e):t==="fa"?CB(e):SB(e)}),NB=e=>`Overleaf — ${e==null?void 0:e.status}`,zB=e=>`Overleaf — ${e==null?void 0:e.status}`,jB=e=>`Overleaf — ${e==null?void 0:e.status}`,AB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zB(e):t==="fa"?jB(e):NB(e)}),TB=e=>`Preview /${e==null?void 0:e.name} skill`,MB=e=>`预览 /${e==null?void 0:e.name} 技能`,RB=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,DB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MB(e):t==="fa"?RB(e):TB(e)}),LB=e=>`Remove annotation ${e==null?void 0:e.number}`,OB=e=>`移除批注 ${e==null?void 0:e.number}`,IB=e=>`حذف یادداشت ${e==null?void 0:e.number}`,BB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OB(e):t==="fa"?IB(e):LB(e)}),$B=e=>`Remove ${e==null?void 0:e.name}`,HB=e=>`移除 ${e==null?void 0:e.name}`,PB=e=>`حذف ${e==null?void 0:e.name}`,FB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HB(e):t==="fa"?PB(e):$B(e)}),UB=e=>`Remove queued message: ${e==null?void 0:e.text}`,qB=e=>`移除排队消息:${e==null?void 0:e.text}`,GB=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,VB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qB(e):t==="fa"?GB(e):UB(e)}),WB=e=>`Retry queued message: ${e==null?void 0:e.text}`,KB=e=>`重试排队消息:${e==null?void 0:e.text}`,YB=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,XB=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KB(e):t==="fa"?YB(e):WB(e)}),ZB=e=>`Run ${e==null?void 0:e.id}`,QB=e=>`运行 ${e==null?void 0:e.id}`,JB=e=>`اجرای ${e==null?void 0:e.id}`,e$=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QB(e):t==="fa"?JB(e):ZB(e)}),t$=e=>`Show error details for ${e==null?void 0:e.activity}`,n$=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,r$=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,s$=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?n$(e):t==="fa"?r$(e):t$(e)}),i$=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,a$=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,o$=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,l$=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?a$(e):t==="fa"?o$(e):i$(e)}),c$=e=>`${e==null?void 0:e.name} skill`,u$=e=>`${e==null?void 0:e.name} 技能`,d$=e=>`مهارت ${e==null?void 0:e.name}`,f$=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?u$(e):t==="fa"?d$(e):c$(e)}),h$=e=>`Value for ${e==null?void 0:e.name}`,_$=e=>`${e==null?void 0:e.name} 的值`,p$=e=>`مقدار ${e==null?void 0:e.name}`,m$=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_$(e):t==="fa"?p$(e):h$(e)}),g$=()=>"Agent reported back",v$=()=>"智能体已返回结果",b$=()=>"عامل نتیجه را گزارش کرد",x$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v$():t==="fa"?b$():g$()}),y$=()=>"Browse",w$=()=>"浏览",S$=()=>"مرور",k$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w$():t==="fa"?S$():y$()}),C$=()=>"Browsing…",E$=()=>"正在浏览…",N$=()=>"در حال مرور…",z$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E$():t==="fa"?N$():C$()}),j$=()=>"Checked experiment status and updated notes",A$=()=>"已检查实验状态并更新笔记",T$=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",M$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A$():t==="fa"?T$():j$()}),R$=()=>"Closed an agent",D$=()=>"已关闭智能体",L$=()=>"عامل بسته شد",O$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D$():t==="fa"?L$():R$()}),I$=()=>"Compacted context",B$=()=>"上下文已压缩",$$=()=>"زمینه فشرده شد",H$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B$():t==="fa"?$$():I$()}),P$=()=>"Compacting context…",F$=()=>"正在压缩上下文…",U$=()=>"در حال فشرده‌سازی زمینه…",q$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F$():t==="fa"?U$():P$()}),G$=e=>`Created ${e==null?void 0:e.target}`,V$=e=>`已创建 ${e==null?void 0:e.target}`,W$=e=>`${e==null?void 0:e.target} ایجاد شد`,K$=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?V$(e):t==="fa"?W$(e):G$(e)}),Y$=()=>"Delegate",X$=()=>"委派",Z$=()=>"واگذاری",Q$=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X$():t==="fa"?Z$():Y$()}),J$=()=>"Delegating…",eH=()=>"正在委派…",tH=()=>"در حال واگذاری…",nH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eH():t==="fa"?tH():J$()}),rH=e=>`Deleted ${e==null?void 0:e.target}`,sH=e=>`已删除 ${e==null?void 0:e.target}`,iH=e=>`${e==null?void 0:e.target} حذف شد`,aH=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sH(e):t==="fa"?iH(e):rH(e)}),oH=()=>"Edit",lH=()=>"编辑",cH=()=>"ویرایش",uH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lH():t==="fa"?cH():oH()}),dH=e=>`Edited ${e==null?void 0:e.target}`,fH=e=>`已编辑 ${e==null?void 0:e.target}`,hH=e=>`${e==null?void 0:e.target} ویرایش شد`,_H=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fH(e):t==="fa"?hH(e):dH(e)}),pH=()=>"Editing…",mH=()=>"正在编辑…",gH=()=>"در حال ویرایش…",vH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mH():t==="fa"?gH():pH()}),bH=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,xH=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,yH=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,wH=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xH(e):t==="fa"?yH(e):bH(e)}),SH=e=>`Listed files matching ${e==null?void 0:e.pattern}`,kH=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,CH=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,EH=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kH(e):t==="fa"?CH(e):SH(e)}),NH=()=>"Load",zH=()=>"加载",jH=()=>"بارگیری",AH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zH():t==="fa"?jH():NH()}),TH=()=>"Loaded a skill",MH=()=>"已加载技能",RH=()=>"یک مهارت بارگیری شد",DH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MH():t==="fa"?RH():TH()}),LH=e=>`Loaded ${e==null?void 0:e.name} skill`,OH=e=>`已加载技能 ${e==null?void 0:e.name}`,IH=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,BH=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OH(e):t==="fa"?IH(e):LH(e)}),$H=()=>"Loading…",HH=()=>"正在加载…",PH=()=>"در حال بارگیری…",FH=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HH():t==="fa"?PH():$H()}),UH=e=>`Opened ${e==null?void 0:e.target}`,qH=e=>`已打开 ${e==null?void 0:e.target}`,GH=e=>`${e==null?void 0:e.target} باز شد`,VH=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qH(e):t==="fa"?GH(e):UH(e)}),WH=e=>`Ran ${e==null?void 0:e.command}`,KH=e=>`已运行 ${e==null?void 0:e.command}`,YH=e=>`${e==null?void 0:e.command} اجرا شد`,XH=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KH(e):t==="fa"?YH(e):WH(e)}),ZH=()=>"Ran a sub-agent",QH=()=>"已运行子智能体",JH=()=>"یک عامل فرعی اجرا شد",eP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QH():t==="fa"?JH():ZH()}),tP=()=>"Read",nP=()=>"读取",rP=()=>"خواندن",sP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nP():t==="fa"?rP():tP()}),iP=()=>"Read experiment notes",aP=()=>"已读取实验笔记",oP=()=>"یادداشت‌های آزمایش خوانده شد",lP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aP():t==="fa"?oP():iP()}),cP=()=>"Read a paper",uP=()=>"已读取论文",dP=()=>"یک مقاله خوانده شد",fP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uP():t==="fa"?dP():cP()}),hP=e=>`Read ${e==null?void 0:e.name} skill`,_P=e=>`已读取技能 ${e==null?void 0:e.name}`,pP=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,nv=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_P(e):t==="fa"?pP(e):hP(e)}),mP=e=>`Read ${e==null?void 0:e.target}`,gP=e=>`已读取 ${e==null?void 0:e.target}`,vP=e=>`${e==null?void 0:e.target} خوانده شد`,xf=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gP(e):t==="fa"?vP(e):mP(e)}),bP=()=>"Read a web page",xP=()=>"已读取网页",yP=()=>"یک صفحهٔ وب خوانده شد",wP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xP():t==="fa"?yP():bP()}),SP=()=>"Reading…",kP=()=>"正在读取…",CP=()=>"در حال خواندن…",EP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kP():t==="fa"?CP():SP()}),NP=()=>"Resumed an agent",zP=()=>"已恢复智能体",jP=()=>"عامل از سر گرفته شد",AP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zP():t==="fa"?jP():NP()}),TP=()=>"Review",MP=()=>"查看",RP=()=>"بازبینی",DP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MP():t==="fa"?RP():TP()}),LP=()=>"Reviewed run log",OP=()=>"已查看运行日志",IP=()=>"گزارش اجرا بازبینی شد",BP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OP():t==="fa"?IP():LP()}),$P=()=>"Reviewed run logs",HP=()=>"已查看运行日志",PP=()=>"گزارش‌های اجرا بازبینی شد",FP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HP():t==="fa"?PP():$P()}),UP=()=>"Reviewed experiment status and notes",qP=()=>"已查看实验状态和笔记",GP=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",VP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qP():t==="fa"?GP():UP()}),WP=()=>"Reviewing…",KP=()=>"正在查看…",YP=()=>"در حال بازبینی…",XP=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KP():t==="fa"?YP():WP()}),ZP=()=>"Run",QP=()=>"运行",JP=()=>"اجرا",eF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QP():t==="fa"?JP():ZP()}),tF=()=>"Running…",nF=()=>"正在运行…",rF=()=>"در حال اجرا…",zE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nF():t==="fa"?rF():tF()}),sF=()=>"Search",iF=()=>"搜索",aF=()=>"جست‌وجو",oF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iF():t==="fa"?aF():sF()}),lF=()=>"Searched alphaXiv full text",cF=()=>"已搜索 alphaXiv 全文",uF=()=>"متن کامل alphaXiv جست‌وجو شد",dF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cF():t==="fa"?uF():lF()}),fF=()=>"Searched alphaXiv semantically",hF=()=>"已对 alphaXiv 进行语义搜索",_F=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",pF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hF():t==="fa"?_F():fF()}),mF=()=>"Searched bioRxiv",gF=()=>"已搜索 bioRxiv",vF=()=>"bioRxiv جست‌وجو شد",bF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gF():t==="fa"?vF():mF()}),xF=()=>"Searched code",yF=()=>"已搜索代码",wF=()=>"کد جست‌وجو شد",rv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yF():t==="fa"?wF():xF()}),SF=e=>`Searched code for “${e==null?void 0:e.pattern}”`,kF=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,CF=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,sv=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kF(e):t==="fa"?CF(e):SF(e)}),EF=e=>`Searched images for “${e==null?void 0:e.query}”`,NF=e=>`已搜索图片“${e==null?void 0:e.query}”`,zF=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,jF=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NF(e):t==="fa"?zF(e):EF(e)}),AF=()=>"Searched the literature",TF=()=>"已搜索文献",MF=()=>"منابع علمی جست‌وجو شد",O6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TF():t==="fa"?MF():AF()}),RF=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,DF=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,LF=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,OF=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DF(e):t==="fa"?LF(e):RF(e)}),IF=()=>"Searched OpenAlex",BF=()=>"已搜索 OpenAlex",$F=()=>"OpenAlex جست‌وجو شد",HF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BF():t==="fa"?$F():IF()}),PF=e=>`Searched the web for “${e==null?void 0:e.query}”`,FF=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,UF=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,I6=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FF(e):t==="fa"?UF(e):PF(e)}),qF=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,GF=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,VF=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,WF=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GF(e):t==="fa"?VF(e):qF(e)}),KF=()=>"Searching…",YF=()=>"正在搜索…",XF=()=>"در حال جست‌وجو…",ZF=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YF():t==="fa"?XF():KF()}),QF=()=>"Sent input to an agent",JF=()=>"已向智能体发送输入",eU=()=>"ورودی به عامل فرستاده شد",tU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JF():t==="fa"?eU():QF()}),nU=()=>"Spawned an agent",rU=()=>"已创建智能体",sU=()=>"یک عامل ساخته شد",iU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rU():t==="fa"?sU():nU()}),aU=()=>"Sub-agent",oU=()=>"子智能体",lU=()=>"عامل فرعی",cU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oU():t==="fa"?lU():aU()}),uU=()=>"Sub-agent interrupted",dU=()=>"子智能体已中断",fU=()=>"عامل فرعی متوقف شد",hU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dU():t==="fa"?fU():uU()}),_U=()=>"Sub-agent started",pU=()=>"子智能体已启动",mU=()=>"عامل فرعی آغاز شد",gU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pU():t==="fa"?mU():_U()}),vU=()=>"Updated experiment notes",bU=()=>"已更新实验笔记",xU=()=>"یادداشت‌های آزمایش به‌روز شد",yU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bU():t==="fa"?xU():vU()}),wU=()=>"Waiting on an agent",SU=()=>"正在等待智能体",kU=()=>"در انتظار عامل",CU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SU():t==="fa"?kU():wU()}),EU=e=>`Approval required: ${e==null?void 0:e.label}`,NU=e=>`需要批准:${e==null?void 0:e.label}`,zU=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,B6=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NU(e):t==="fa"?zU(e):EU(e)}),jU=()=>"The CLI is retrying the turn.",AU=()=>"CLI 正在重试本轮。",TU=()=>"CLI در حال تلاش دوباره برای این نوبت است.",MU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AU():t==="fa"?TU():jU()}),RU=()=>"Continue is available.",DU=()=>"可以继续。",LU=()=>"ادامه در دسترس است.",OU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DU():t==="fa"?LU():RU()}),IU=()=>"Retry is available.",BU=()=>"可以重试。",$U=()=>"تلاش دوباره در دسترس است.",HU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BU():t==="fa"?$U():IU()}),PU=()=>"Running a tool",FU=()=>"正在运行工具",UU=()=>"در حال اجرای ابزار",qU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FU():t==="fa"?UU():PU()}),GU=()=>"Tool activity completed",VU=()=>"工具活动已完成",WU=()=>"فعالیت ابزار کامل شد",KU=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VU():t==="fa"?WU():GU()}),YU=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,XU=e=>`工具活动失败:${e==null?void 0:e.labels}`,ZU=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,QU=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XU(e):t==="fa"?ZU(e):YU(e)}),JU=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,eq=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,tq=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,nq=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eq(e):t==="fa"?tq(e):JU(e)}),rq=()=>"Turn did not finish.",sq=()=>"本轮未完成。",iq=()=>"این نوبت کامل نشد.",aq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sq():t==="fa"?iq():rq()}),oq=()=>"Artifacts",lq=()=>"产物",cq=()=>"خروجی‌ها",uq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lq():t==="fa"?cq():oq()}),dq=()=>"Close panel",fq=()=>"关闭面板",hq=()=>"بستن پنل",$6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fq():t==="fa"?hq():dq()}),_q=()=>"Current task",pq=()=>"当前任务",mq=()=>"وظیفهٔ فعلی",H6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pq():t==="fa"?mq():_q()}),gq=()=>"Drag to resize panel",vq=()=>"拖动以调整面板大小",bq=()=>"برای تغییر اندازهٔ پنل بکشید",xq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vq():t==="fa"?bq():gq()}),yq=()=>"Drag toward the center to restore panel",wq=()=>"向中央拖动以恢复面板",Sq=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",kq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wq():t==="fa"?Sq():yq()}),Cq=()=>"Entire project",Eq=()=>"整个项目",Nq=()=>"کل پروژه",P6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eq():t==="fa"?Nq():Cq()}),zq=()=>"Expand panel",jq=()=>"展开面板",Aq=()=>"گسترش پنل",F6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jq():t==="fa"?Aq():zq()}),Tq=e=>`Experiment filter: ${e==null?void 0:e.scope}`,Mq=e=>`实验筛选:${e==null?void 0:e.scope}`,Rq=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,Dq=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Mq(e):t==="fa"?Rq(e):Tq(e)}),Lq=()=>"Experiment view",Oq=()=>"实验视图",Iq=()=>"نمای آزمایش",Bq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oq():t==="fa"?Iq():Lq()}),$q=()=>"Experiments",Hq=()=>"实验",Pq=()=>"آزمایش‌ها",Fq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hq():t==="fa"?Pq():$q()}),Uq=()=>"Files",qq=()=>"文件",Gq=()=>"فایل‌ها",Vq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qq():t==="fa"?Gq():Uq()}),Wq=()=>"Filter experiments",Kq=()=>"筛选实验",Yq=()=>"فیلتر آزمایش‌ها",Xq=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kq():t==="fa"?Yq():Wq()}),Zq=()=>"Current task filtering is unavailable for unattributed experiments",Qq=()=>"存在无法归属的实验时,不能按当前任务筛选",Jq=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",eG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qq():t==="fa"?Jq():Zq()}),tG=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",nG=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",rG=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",sG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nG():t==="fa"?rG():tG()}),iG=()=>"Open a task to filter to its experiments",aG=()=>"请打开一个任务以筛选其实验",oG=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",lG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aG():t==="fa"?oG():iG()}),cG=()=>"projects",uG=()=>"项目",dG=()=>"پروژه‌ها",fG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uG():t==="fa"?dG():cG()}),hG=()=>"Restore panel",_G=()=>"还原面板",pG=()=>"بازگرداندن اندازهٔ پنل",U6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_G():t==="fa"?pG():hG()}),mG=()=>"Retry",gG=()=>"重试",vG=()=>"تلاش دوباره",Rc=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gG():t==="fa"?vG():mG()}),bG=()=>"Select a project to browse its files.",xG=()=>"选择一个项目以浏览其文件。",yG=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",wG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xG():t==="fa"?yG():bG()}),SG=()=>"settings",kG=()=>"设置",CG=()=>"تنظیمات",EG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kG():t==="fa"?CG():SG()}),NG=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,zG=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,jG=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,AG=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zG(e):t==="fa"?jG(e):NG(e)}),TG=()=>"Sub-agent",MG=()=>"子智能体",RG=()=>"عامل فرعی",DG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MG():t==="fa"?RG():TG()}),LG=()=>"Table",OG=()=>"表格",IG=()=>"جدول",BG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OG():t==="fa"?IG():LG()}),$G=()=>"Tree",HG=()=>"树状图",PG=()=>"درخت",FG=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HG():t==="fa"?PG():$G()}),UG=e=>`Collapse ${e==null?void 0:e.name}`,qG=e=>`折叠 ${e==null?void 0:e.name}`,GG=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,VG=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qG(e):t==="fa"?GG(e):UG(e)}),WG=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,KG=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,YG=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,Ax=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KG(e):t==="fa"?YG(e):WG(e)}),XG=e=>`Delete folder ${e==null?void 0:e.name}`,ZG=e=>`删除文件夹 ${e==null?void 0:e.name}`,QG=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,JG=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZG(e):t==="fa"?QG(e):XG(e)}),eV=e=>`Expand ${e==null?void 0:e.name}`,tV=e=>`展开 ${e==null?void 0:e.name}`,nV=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,rV=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tV(e):t==="fa"?nV(e):eV(e)}),sV=()=>"Binary or unsupported file — no inline preview.",iV=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",aV=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",oV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iV():t==="fa"?aV():sV()}),lV=()=>"Copy path",cV=()=>"复制路径",uV=()=>"کپی مسیر",jE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cV():t==="fa"?uV():lV()}),dV=()=>"Artifact not found",fV=()=>"找不到产物",hV=()=>"خروجی پیدا نشد",_V=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fV():t==="fa"?hV():dV()}),pV=()=>"Open raw",mV=()=>"打开原始文件",gV=()=>"باز کردن فایل خام",vV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mV():t==="fa"?gV():pV()}),bV=()=>"Click an artifact to view it",xV=()=>"点击产物即可查看",yV=()=>"برای مشاهده، یک خروجی را انتخاب کنید",wV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xV():t==="fa"?yV():bV()}),SV=()=>"Copy artifacts directory path",kV=()=>"复制产物目录路径",CV=()=>"کپی مسیر پوشهٔ خروجی‌ها",EV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kV():t==="fa"?CV():SV()}),NV=()=>"Delete artifact",zV=()=>"删除产物",jV=()=>"حذف خروجی",q6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zV():t==="fa"?jV():NV()}),AV=()=>"Delete folder",TV=()=>"删除文件夹",MV=()=>"حذف پوشه",RV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TV():t==="fa"?MV():AV()}),DV=()=>"Failed to load:",LV=()=>"加载失败:",OV=()=>"بارگیری ناموفق بود:",IV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LV():t==="fa"?OV():DV()}),BV=()=>"File truncated — showing the first 512 KB.",$V=()=>"文件已截断——仅显示前 512 KB。",HV=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",PV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$V():t==="fa"?HV():BV()}),FV=()=>"Listing truncated — the folder has more artifacts.",UV=()=>"列表已截断——文件夹中还有更多产物。",qV=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",GV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UV():t==="fa"?qV():FV()}),VV=()=>"Loading…",WV=()=>"正在加载…",KV=()=>"در حال بارگیری…",YV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WV():t==="fa"?KV():VV()}),XV=()=>"Loading artifacts…",ZV=()=>"正在加载产物…",QV=()=>"در حال بارگیری خروجی‌ها…",JV=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZV():t==="fa"?QV():XV()}),eW=()=>"Modified",tW=()=>"修改时间",nW=()=>"ویرایش‌شده",rW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tW():t==="fa"?nW():eW()}),sW=()=>"No artifacts yet",iW=()=>"尚无产物",aW=()=>"هنوز خروجی‌ای وجود ندارد",oW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iW():t==="fa"?aW():sW()}),lW=()=>"Open raw in new tab",cW=()=>"在新标签页中打开原始文件",uW=()=>"باز کردن فایل خام در زبانهٔ جدید",G6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cW():t==="fa"?uW():lW()}),dW=()=>"Storage settings",fW=()=>"存储设置",hW=()=>"تنظیمات ذخیره‌سازی",V6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fW():t==="fa"?hW():dW()}),_W=()=>"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:",pW=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件:",mW=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید:",gW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pW():t==="fa"?mW():_W()}),vW=()=>"File too large to preview inline.",bW=()=>"文件太大,无法内嵌预览。",xW=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",yW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bW():t==="fa"?xW():vW()}),wW=()=>"This is the baseline branch, so there is no parent comparison.",SW=()=>"这是基线分支,因此没有父分支可供比较。",kW=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",CW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SW():t==="fa"?kW():wW()}),EW=()=>"Failed to load changes:",NW=()=>"加载更改失败:",zW=()=>"بارگیری تغییرات ناموفق بود:",jW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NW():t==="fa"?zW():EW()}),AW=()=>"Loading changes…",TW=()=>"正在加载更改…",MW=()=>"در حال بارگیری تغییرات…",RW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TW():t==="fa"?MW():AW()}),DW=()=>"No committed changes from the parent branch.",LW=()=>"与父分支相比没有已提交的更改。",OW=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",IW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LW():t==="fa"?OW():DW()}),BW=e=>`agent ${e==null?void 0:e.number}`,$W=e=>`智能体 ${e==null?void 0:e.number}`,HW=e=>`عامل ${e==null?void 0:e.number}`,W6=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$W(e):t==="fa"?HW(e):BW(e)}),PW=()=>"agent sessions",FW=()=>"智能体会话",UW=()=>"نشست‌های عامل‌ها",qW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FW():t==="fa"?UW():PW()}),GW=()=>"All sessions",VW=()=>"所有会话",WW=()=>"همهٔ نشست‌ها",KW=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VW():t==="fa"?WW():GW()}),YW=e=>`${e==null?void 0:e.count} annotations`,XW=e=>`${e==null?void 0:e.count} 条批注`,ZW=e=>`${e==null?void 0:e.count} یادداشت`,QW=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XW(e):t==="fa"?ZW(e):YW(e)}),JW=()=>"Archive",eK=()=>"归档",tK=()=>"بایگانی",nK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eK():t==="fa"?tK():JW()}),rK=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",sK=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",iK=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",aK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sK():t==="fa"?iK():rK()}),oK=()=>"Asked about selected text",lK=()=>"已询问所选文本",cK=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",uK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lK():t==="fa"?cK():oK()}),dK=()=>"Attachment",fK=()=>"附件",hK=()=>"پیوست",_K=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fK():t==="fa"?hK():dK()}),pK=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,mK=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,gK=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,vK=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mK(e):t==="fa"?gK(e):pK(e)}),bK=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",xK=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",yK=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",wK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xK():t==="fa"?yK():bK()}),SK=()=>"Wait for the turn to finish before running a command.",kK=()=>"请等待本轮结束后再运行命令。",CK=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",EK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kK():t==="fa"?CK():SK()}),NK=e=>`Exited with code ${e==null?void 0:e.code}`,zK=e=>`退出码 ${e==null?void 0:e.code}`,jK=e=>`با کد ${e==null?void 0:e.code} خارج شد`,AK=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zK(e):t==="fa"?jK(e):NK(e)}),TK=e=>`Command not run: ${e==null?void 0:e.error}`,MK=e=>`命令未运行:${e==null?void 0:e.error}`,RK=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,K6=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MK(e):t==="fa"?RK(e):TK(e)}),DK=()=>"Collapse tool activity",LK=()=>"折叠工具活动",OK=()=>"بستن فعالیت ابزارها",IK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LK():t==="fa"?OK():DK()}),BK=()=>"Continue",$K=()=>"继续",HK=()=>"ادامه",PK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$K():t==="fa"?HK():BK()}),FK=e=>`Delete “${e==null?void 0:e.title}”? + +Its transcript will be permanently removed.`,UK=e=>`删除“${e==null?void 0:e.title}”? + +其对话记录将被永久移除。`,qK=e=>`«${e==null?void 0:e.title}» حذف شود؟ + +رونوشت آن برای همیشه حذف خواهد شد.`,GK=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UK(e):t==="fa"?qK(e):FK(e)}),VK=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,WK=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,KK=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,YK=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WK(e):t==="fa"?KK(e):VK(e)}),XK=()=>"Could not exit Plan mode. Try again.",ZK=()=>"无法退出计划模式。请重试。",QK=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",JK=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZK():t==="fa"?QK():XK()}),eY=()=>"Expand tool activity",tY=()=>"展开工具活动",nY=()=>"باز کردن فعالیت ابزارها",rY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tY():t==="fa"?nY():eY()}),sY=()=>"experiments",iY=()=>"实验",aY=()=>"آزمایش‌ها",oY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iY():t==="fa"?aY():sY()}),lY=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,cY=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,uY=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,dY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cY(e):t==="fa"?uY(e):lY(e)}),fY=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,hY=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,_Y=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,pY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hY(e):t==="fa"?_Y(e):fY(e)}),mY=e=>`Message not sent: ${e==null?void 0:e.error}`,gY=e=>`消息未发送:${e==null?void 0:e.error}`,vY=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,bY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gY(e):t==="fa"?vY(e):mY(e)}),xY=()=>"New session",yY=()=>"新会话",wY=()=>"نشست جدید",Y6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yY():t==="fa"?wY():xY()}),SY=()=>"No active sessions",kY=()=>"没有活跃会话",CY=()=>"نشست فعالی وجود ندارد",EY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kY():t==="fa"?CY():SY()}),NY=()=>"No activity",zY=()=>"无活动",jY=()=>"بدون فعالیت",AY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zY():t==="fa"?jY():NY()}),TY=()=>"No archived sessions",MY=()=>"没有已归档的会话",RY=()=>"نشست بایگانی‌شده‌ای وجود ندارد",DY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MY():t==="fa"?RY():TY()}),LY=()=>"No sessions yet",OY=()=>"还没有会话",IY=()=>"هنوز نشستی وجود ندارد",BY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OY():t==="fa"?IY():LY()}),$Y=()=>"1 annotation",HY=()=>"1 条批注",PY=()=>"۱ یادداشت",FY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HY():t==="fa"?PY():$Y()}),UY=()=>"Open sub-agent transcript",qY=()=>"打开子智能体记录",GY=()=>"باز کردن متن گفت‌وگوی عامل فرعی",VY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qY():t==="fa"?GY():UY()}),WY=()=>"About this demo",KY=()=>"关于此演示",YY=()=>"دربارهٔ این نسخهٔ نمایشی",X6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KY():t==="fa"?YY():WY()}),XY=()=>"Accept and auto mode",ZY=()=>"接受并使用自动模式",QY=()=>"پذیرش و حالت خودکار",JY=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZY():t==="fa"?QY():XY()}),eX=()=>"Accept and bypass all",tX=()=>"接受并跳过所有审批",nX=()=>"پذیرش و عبور از همهٔ تأییدها",rX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tX():t==="fa"?nX():eX()}),sX=()=>"Active",iX=()=>"活跃",aX=()=>"فعال",oX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iX():t==="fa"?aX():sX()}),lX=()=>"All",cX=()=>"全部",uX=()=>"همه",dX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cX():t==="fa"?uX():lX()}),fX=()=>"Allow",hX=()=>"允许",_X=()=>"اجازه دادن",pX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hX():t==="fa"?_X():fX()}),mX=()=>"Approval required",gX=()=>"需要批准",vX=()=>"نیازمند تأیید",bX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gX():t==="fa"?vX():mX()}),xX=()=>"Archived",yX=()=>"已归档",wX=()=>"بایگانی‌شده",Z6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yX():t==="fa"?wX():xX()}),SX=()=>"Artifacts",kX=()=>"产物",CX=()=>"خروجی‌ها",EX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kX():t==="fa"?CX():SX()}),NX=()=>"Ask about this",zX=()=>"询问此内容",jX=()=>"دربارهٔ این بپرسید",AX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zX():t==="fa"?jX():NX()}),TX=()=>"Attach a PDF or image",MX=()=>"附加 PDF 或图片",RX=()=>"پیوست PDF یا تصویر",Q6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MX():t==="fa"?RX():TX()}),DX=()=>"Bash",LX=()=>"Bash",OX=()=>"Bash",AE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LX():t==="fa"?OX():DX()}),IX=()=>"Browsed the web",BX=()=>"已浏览网页",$X=()=>"وب مرور شد",J6=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BX():t==="fa"?$X():IX()}),HX=()=>"Built the project",PX=()=>"已构建项目",FX=()=>"پروژه ساخته شد",UX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PX():t==="fa"?FX():HX()}),qX=()=>"Cancel",GX=()=>"取消",VX=()=>"لغو",TE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GX():t==="fa"?VX():qX()}),WX=()=>"Cancelled an experiment run",KX=()=>"已取消实验运行",YX=()=>"اجرای آزمایش لغو شد",XX=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KX():t==="fa"?YX():WX()}),ZX=()=>"Checked code style",QX=()=>"已检查代码风格",JX=()=>"سبک کد بررسی شد",eZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QX():t==="fa"?JX():ZX()}),tZ=()=>"Checked compute options",nZ=()=>"已检查算力选项",rZ=()=>"گزینه‌های رایانشی بررسی شد",sZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nZ():t==="fa"?rZ():tZ()}),iZ=()=>"Checked experiment status",aZ=()=>"已检查实验状态",oZ=()=>"وضعیت آزمایش بررسی شد",e7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aZ():t==="fa"?oZ():iZ()}),lZ=()=>"Checked Git status",cZ=()=>"已检查 Git 状态",uZ=()=>"وضعیت Git بررسی شد",dZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cZ():t==="fa"?uZ():lZ()}),fZ=()=>"Checked local times",hZ=()=>"已查询当地时间",_Z=()=>"زمان‌های محلی بررسی شد",pZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hZ():t==="fa"?_Z():fZ()}),mZ=()=>"Checked market data",gZ=()=>"已查询市场数据",vZ=()=>"داده‌های بازار بررسی شد",bZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gZ():t==="fa"?vZ():mZ()}),xZ=()=>"Checked sports data",yZ=()=>"已查询体育数据",wZ=()=>"داده‌های ورزشی بررسی شد",SZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yZ():t==="fa"?wZ():xZ()}),kZ=()=>"Checked the weather",CZ=()=>"已查询天气",EZ=()=>"آب‌وهوا بررسی شد",NZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CZ():t==="fa"?EZ():kZ()}),zZ=()=>"Checked types",jZ=()=>"已检查类型",AZ=()=>"نوع‌ها بررسی شد",TZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jZ():t==="fa"?AZ():zZ()}),MZ=()=>"Clear annotations",RZ=()=>"清除批注",DZ=()=>"پاک کردن یادداشت‌ها",t7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RZ():t==="fa"?DZ():MZ()}),LZ=()=>"Customize",OZ=()=>"自定义",IZ=()=>"سفارشی‌سازی",BZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OZ():t==="fa"?IZ():LZ()}),$Z=()=>"Data sources",HZ=()=>"数据源",PZ=()=>"منابع داده",iv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HZ():t==="fa"?PZ():$Z()}),FZ=()=>"Delegated a task to a new agent",UZ=()=>"已将任务委派给新智能体",qZ=()=>"وظیفه به عامل جدید واگذار شد",GZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UZ():t==="fa"?qZ():FZ()}),VZ=()=>"Delete",WZ=()=>"删除",KZ=()=>"حذف",ME=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WZ():t==="fa"?KZ():VZ()}),YZ=()=>"Deny",XZ=()=>"拒绝",ZZ=()=>"رد کردن",QZ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XZ():t==="fa"?ZZ():YZ()}),JZ=()=>"Edit and re-send",eQ=()=>"编辑并重新发送",tQ=()=>"ویرایش و ارسال دوباره",n7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eQ():t==="fa"?tQ():JZ()}),nQ=()=>"Edit message",rQ=()=>"编辑消息",sQ=()=>"ویرایش پیام",iQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rQ():t==="fa"?sQ():nQ()}),aQ=()=>"Edited a file",oQ=()=>"已编辑文件",lQ=()=>"فایل ویرایش شد",r7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oQ():t==="fa"?lQ():aQ()}),cQ=()=>"Exit Bash mode",uQ=()=>"退出 Bash 模式",dQ=()=>"خروج از حالت Bash",s7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uQ():t==="fa"?dQ():cQ()}),fQ=()=>"Exit Plan mode",hQ=()=>"退出计划模式",_Q=()=>"خروج از حالت طرح",i7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hQ():t==="fa"?_Q():fQ()}),pQ=()=>"Experiments",mQ=()=>"实验",gQ=()=>"آزمایش‌ها",vQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mQ():t==="fa"?gQ():pQ()}),bQ=()=>"Failed:",xQ=()=>"失败:",yQ=()=>"ناموفق:",Tx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xQ():t==="fa"?yQ():bQ()}),wQ=()=>"Files",SQ=()=>"文件",kQ=()=>"فایل‌ها",CQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SQ():t==="fa"?kQ():wQ()}),EQ=()=>"Filter sessions",NQ=()=>"筛选会话",zQ=()=>"فیلتر نشست‌ها",a7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NQ():t==="fa"?zQ():EQ()}),jQ=()=>"is unavailable.",AQ=()=>"不可用。",TQ=()=>"در دسترس نیست.",MQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AQ():t==="fa"?TQ():jQ()}),RQ=()=>"Later queued messages will wait until this is retried or removed.",DQ=()=>"后续排队的消息会等待此消息重试或移除。",LQ=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",OQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DQ():t==="fa"?LQ():RQ()}),IQ=()=>"Listed files",BQ=()=>"已列出文件",$Q=()=>"فایل‌ها فهرست شد",o7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BQ():t==="fa"?$Q():IQ()}),HQ=()=>"Listed project runs",PQ=()=>"已列出项目运行",FQ=()=>"اجراهای پروژه فهرست شد",UQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PQ():t==="fa"?FQ():HQ()}),qQ=()=>"Listed projects",GQ=()=>"已列出项目",VQ=()=>"پروژه‌ها فهرست شد",WQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GQ():t==="fa"?VQ():qQ()}),KQ=()=>"Loading conversation…",YQ=()=>"正在加载对话…",XQ=()=>"در حال بارگیری گفتگو…",ZQ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YQ():t==="fa"?XQ():KQ()}),QQ=()=>"Next version",JQ=()=>"下一版本",eJ=()=>"نسخهٔ بعدی",l7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JQ():t==="fa"?eJ():QQ()}),tJ=()=>"Open the session this agent spawned",nJ=()=>"打开此智能体创建的会话",rJ=()=>"باز کردن نشست ساخته‌شده توسط این عامل",sJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nJ():t==="fa"?rJ():tJ()}),iJ=()=>"Opened web pages",aJ=()=>"已打开网页",oJ=()=>"صفحه‌های وب باز شد",lJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aJ():t==="fa"?oJ():iJ()}),cJ=()=>"Plan",uJ=()=>"计划",dJ=()=>"طرح",fJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uJ():t==="fa"?dJ():cJ()}),hJ=()=>"Plan approved",_J=()=>"计划已批准",pJ=()=>"طرح تأیید شد",mJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_J():t==="fa"?pJ():hJ()}),gJ=()=>"Plan rejected",vJ=()=>"计划已拒绝",bJ=()=>"طرح رد شد",xJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vJ():t==="fa"?bJ():gJ()}),yJ=()=>"Plan resolved",wJ=()=>"计划已处理",SJ=()=>"طرح تعیین تکلیف شد",kJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wJ():t==="fa"?SJ():yJ()}),CJ=()=>"Plan revision requested",EJ=()=>"已请求修改计划",NJ=()=>"درخواست بازنگری طرح ثبت شد",zJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EJ():t==="fa"?NJ():CJ()}),jJ=()=>"Previous version",AJ=()=>"上一版本",TJ=()=>"نسخهٔ قبلی",c7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AJ():t==="fa"?TJ():jJ()}),MJ=()=>"Ran a command",RJ=()=>"已运行命令",DJ=()=>"فرمان اجرا شد",LJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RJ():t==="fa"?DJ():MJ()}),OJ=()=>"Ran tests",IJ=()=>"已运行测试",BJ=()=>"آزمون‌ها اجرا شد",$J=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IJ():t==="fa"?BJ():OJ()}),HJ=()=>"Read a file",PJ=()=>"已读取文件",FJ=()=>"فایل خوانده شد",UJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PJ():t==="fa"?FJ():HJ()}),qJ=()=>"Read Git history",GJ=()=>"已读取 Git 历史",VJ=()=>"تاریخچهٔ Git خوانده شد",WJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GJ():t==="fa"?VJ():qJ()}),KJ=()=>"Read project details",YJ=()=>"已读取项目详情",XJ=()=>"جزئیات پروژه خوانده شد",ZJ=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YJ():t==="fa"?XJ():KJ()}),QJ=()=>"Reject",JJ=()=>"拒绝",eee=()=>"رد کردن",tee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JJ():t==="fa"?eee():QJ()}),nee=()=>"Remove",ree=()=>"移除",see=()=>"حذف",iee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ree():t==="fa"?see():nee()}),aee=()=>"Remove annotation",oee=()=>"移除批注",lee=()=>"حذف یادداشت",cee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oee():t==="fa"?lee():aee()}),uee=()=>"Remove file",dee=()=>"移除文件",fee=()=>"حذف فایل",u7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dee():t==="fa"?fee():uee()}),hee=()=>"Remove image",_ee=()=>"移除图片",pee=()=>"حذف تصویر",d7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ee():t==="fa"?pee():hee()}),mee=()=>"Remove queued message",gee=()=>"移除排队消息",vee=()=>"حذف پیام صف",f7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gee():t==="fa"?vee():mee()}),bee=()=>"Rename",xee=()=>"重命名",yee=()=>"تغییر نام",RE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xee():t==="fa"?yee():bee()}),wee=()=>"Reviewed code changes",See=()=>"已审查代码更改",kee=()=>"تغییرات کد بازبینی شد",Cee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?See():t==="fa"?kee():wee()}),Eee=()=>"Run",Nee=()=>"运行",zee=()=>"اجرا",h7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nee():t==="fa"?zee():Eee()}),jee=()=>"Selected chat text",Aee=()=>"已选聊天文本",Tee=()=>"متن انتخاب‌شدهٔ گفتگو",Mee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aee():t==="fa"?Tee():jee()}),Ree=()=>"Selected text:",Dee=()=>"已选文本:",Lee=()=>"متن انتخاب‌شده:",Oee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dee():t==="fa"?Lee():Ree()}),Iee=()=>"Send",Bee=()=>"发送",$ee=()=>"ارسال",Bb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bee():t==="fa"?$ee():Iee()}),Hee=()=>"Session options",Pee=()=>"会话选项",Fee=()=>"گزینه‌های نشست",_7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pee():t==="fa"?Fee():Hee()}),Uee=()=>"Session title",qee=()=>"会话标题",Gee=()=>"عنوان نشست",Vee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qee():t==="fa"?Gee():Uee()}),Wee=()=>"Show sidebar",Kee=()=>"显示侧边栏",Yee=()=>"نمایش نوار کناری",p7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kee():t==="fa"?Yee():Wee()}),Xee=()=>"Started an experiment run",Zee=()=>"已启动实验运行",Qee=()=>"اجرای آزمایش آغاز شد",Jee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zee():t==="fa"?Qee():Xee()}),ete=()=>"Reading the project to suggest where to start…",tte=()=>"正在阅读项目以建议从哪里开始…",nte=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",rte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tte():t==="fa"?nte():ete()}),ste=()=>"Starter prompts",ite=()=>"入门提示",ate=()=>"پیشنهادهای شروع",ote=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ite():t==="fa"?ate():ste()}),lte=()=>"Stop",cte=()=>"停止",ute=()=>"توقف",m7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cte():t==="fa"?ute():lte()}),dte=()=>"Submit",fte=()=>"提交",hte=()=>"ارسال",_te=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fte():t==="fa"?hte():dte()}),pte=()=>"Task",mte=()=>"任务",gte=()=>"وظیفه",vte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mte():t==="fa"?gte():pte()}),bte=()=>"Tool failed",xte=()=>"工具失败",yte=()=>"ابزار ناموفق بود",wte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xte():t==="fa"?yte():bte()}),Ste=()=>"Used tools",kte=()=>"已使用工具",Cte=()=>"ابزارها استفاده شد",DE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kte():t==="fa"?Cte():Ste()}),Ete=()=>"View full plan",Nte=()=>"查看完整计划",zte=()=>"مشاهدهٔ طرح کامل",jte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nte():t==="fa"?zte():Ete()}),Ate=()=>"Waited for an experiment run",Tte=()=>"已等待实验运行",Mte=()=>"برای اجرای آزمایش صبر شد",Rte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tte():t==="fa"?Mte():Ate()}),Dte=()=>"Waiting for your input…",Lte=()=>"正在等待你的输入…",Ote=()=>"منتظر ورودی شما…",Ite=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lte():t==="fa"?Ote():Dte()}),Bte=()=>"What should we research?",$te=()=>"我们应该研究什么?",Hte=()=>"چه چیزی را پژوهش کنیم؟",Pte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$te():t==="fa"?Hte():Bte()}),Fte=()=>"You, mid-task",Ute=()=>"你(任务进行中)",qte=()=>"شما، هنگام انجام وظیفه",Gte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ute():t==="fa"?qte():Fte()}),Vte=()=>"Pasted image",Wte=()=>"粘贴的图片",Kte=()=>"تصویر جای‌گذاری‌شده",Yte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wte():t==="fa"?Kte():Vte()}),Xte=()=>"Plan",Zte=()=>"计划",Qte=()=>"طرح",LE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zte():t==="fa"?Qte():Xte()}),Jte=()=>"Plan mode — ready to proceed?",ene=()=>"计划模式 — 准备好继续了吗?",tne=()=>"حالت طرح — آماده‌اید ادامه دهید؟",nne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ene():t==="fa"?tne():Jte()}),rne=()=>"Proposed plan",sne=()=>"提议的计划",ine=()=>"طرح پیشنهادی",g7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sne():t==="fa"?ine():rne()}),ane=()=>"Question",one=()=>"问题",lne=()=>"پرسش",cne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?one():t==="fa"?lne():ane()}),une=()=>"Queued",dne=()=>"已排队",fne=()=>"در صف",hne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dne():t==="fa"?fne():une()}),_ne=()=>"Recents",pne=()=>"最近",mne=()=>"اخیر",OE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pne():t==="fa"?mne():_ne()}),gne=()=>"Re-check its setup.",vne=()=>"请重新检查其设置。",bne=()=>"راه‌اندازی آن را دوباره بررسی کنید.",xne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vne():t==="fa"?bne():gne()}),yne=()=>"Could not recover this turn. Try again.",wne=()=>"无法恢复本轮。请重试。",Sne=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",kne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wne():t==="fa"?Sne():yne()}),Cne=()=>"Could not remove the queued message. Try again.",Ene=()=>"无法移除排队消息。请重试。",Nne=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",zne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ene():t==="fa"?Nne():Cne()}),jne=e=>`Could not re-send: ${e==null?void 0:e.error}`,Ane=e=>`无法重新发送:${e==null?void 0:e.error}`,Tne=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,Mne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ane(e):t==="fa"?Tne(e):jne(e)}),Rne=()=>"Resolved",Dne=()=>"已处理",Lne=()=>"رسیدگی شد",One=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dne():t==="fa"?Lne():Rne()}),Ine=()=>"Could not retry the queued message. Try again.",Bne=()=>"无法重试排队消息。请重试。",$ne=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",Hne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bne():t==="fa"?$ne():Ine()}),Pne=()=>"run logs",Fne=()=>"运行日志",Une=()=>"گزارش‌های اجرا",qne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fne():t==="fa"?Une():Pne()}),Gne=()=>"Scroll to bottom",Vne=()=>"滚动到底部",Wne=()=>"رفتن به پایین گفتگو",v7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vne():t==="fa"?Wne():Gne()}),Kne=()=>"The selected harness is unavailable",Yne=()=>"所选智能体工具不可用",Xne=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",av=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yne():t==="fa"?Xne():Kne()}),Zne=()=>"The chat session was not created",Qne=()=>"未能创建聊天会话",Jne=()=>"نشست گفت‌وگو ایجاد نشد",ere=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qne():t==="fa"?Jne():Zne()}),tre=()=>" · Spawned by another agent",nre=()=>" · 由另一个智能体创建",rre=()=>" · ساخته‌شده به‌دست عامل دیگر",sre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nre():t==="fa"?rre():tre()}),ire=()=>"Starting…",are=()=>"正在启动…",ore=()=>"در حال شروع…",lre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?are():t==="fa"?ore():ire()}),cre=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,ure=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,dre=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,fre=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ure(e):t==="fa"?dre(e):cre(e)}),hre=()=>"Could not stop the turn. Try again.",_re=()=>"无法停止本轮。请重试。",pre=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",mre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_re():t==="fa"?pre():hre()}),gre=e=>`Could not switch fork: ${e==null?void 0:e.error}`,vre=e=>`无法切换分支:${e==null?void 0:e.error}`,bre=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,xre=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vre(e):t==="fa"?bre(e):gre(e)}),yre=()=>"The agent",wre=()=>"智能体",Sre=()=>"عامل",kre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wre():t==="fa"?Sre():yre()}),Cre=()=>"Thinking",Ere=()=>"正在思考",Nre=()=>"در حال فکر کردن",zre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ere():t==="fa"?Nre():Cre()}),jre=()=>"Could not toggle Plan mode. Try again.",Are=()=>"无法切换计划模式。请重试。",Tre=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",b7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Are():t==="fa"?Tre():jre()}),Mre=()=>"This turn did not finish.",Rre=()=>"本轮未完成。",Dre=()=>"این نوبت کامل نشد.",Lre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rre():t==="fa"?Dre():Mre()}),Ore=()=>"Type a custom answer…",Ire=()=>"输入自定义回答…",Bre=()=>"پاسخ دلخواه را بنویسید…",$re=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ire():t==="fa"?Bre():Ore()}),Hre=()=>"Unarchive",Pre=()=>"取消归档",Fre=()=>"خارج کردن از بایگانی",Ure=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pre():t==="fa"?Fre():Hre()}),qre=()=>"Untitled",Gre=()=>"未命名",Vre=()=>"بدون عنوان",ov=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gre():t==="fa"?Vre():qre()}),Wre=()=>"Could not update permissions. Try again.",Kre=()=>"无法更新权限。请重试。",Yre=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",Xre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kre():t==="fa"?Yre():Wre()}),Zre=()=>"Working…",Qre=()=>"正在工作…",Jre=()=>"در حال کار…",Mx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qre():t==="fa"?Jre():Zre()}),ese=()=>"Close tab",tse=()=>"关闭标签页",nse=()=>"بستن زبانه",rse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tse():t==="fa"?nse():ese()}),sse=()=>"Changes",ise=()=>"更改",ase=()=>"تغییرات",ose=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ise():t==="fa"?ase():sse()}),lse=()=>"Code browser view",cse=()=>"代码浏览器视图",use=()=>"نمای مرورگر کد",dse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cse():t==="fa"?use():lse()}),fse=()=>"Files",hse=()=>"文件",_se=()=>"فایل‌ها",pse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hse():t==="fa"?_se():fse()}),mse=()=>"Refresh",gse=()=>"刷新",vse=()=>"تازه‌سازی",x7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gse():t==="fa"?vse():mse()}),bse=()=>"listing truncated",xse=()=>"列表已截断",yse=()=>"فهرست کوتاه شده است",wse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xse():t==="fa"?yse():bse()}),Sse=()=>"No files.",kse=()=>"没有文件。",Cse=()=>"فایلی وجود ندارد.",Ese=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kse():t==="fa"?Cse():Sse()}),Nse=()=>"Refresh failed:",zse=()=>"刷新失败:",jse=()=>"تازه‌سازی ناموفق بود:",Ase=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zse():t==="fa"?jse():Nse()}),Tse=()=>"Cancelling…",Mse=()=>"正在取消…",Rse=()=>"در حال لغو…",Dse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mse():t==="fa"?Rse():Tse()}),Lse=()=>"Checking…",Ose=()=>"正在检查…",Ise=()=>"در حال بررسی…",Kp=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ose():t==="fa"?Ise():Lse()}),Bse=()=>"Copied",$se=()=>"已复制",Hse=()=>"کپی شد",Xf=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$se():t==="fa"?Hse():Bse()}),Pse=e=>`Failed to load: ${e==null?void 0:e.error}`,Fse=e=>`加载失败:${e==null?void 0:e.error}`,Use=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,IE=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Fse(e):t==="fa"?Use(e):Pse(e)}),qse=()=>"Loading…",Gse=()=>"正在加载…",Vse=()=>"در حال بارگیری…",BE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gse():t==="fa"?Vse():qse()}),Wse=e=>`+ ${e==null?void 0:e.count} more`,Kse=e=>`另有 ${e==null?void 0:e.count} 项`,Yse=e=>`${e==null?void 0:e.count}+ مورد دیگر`,Xse=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Kse(e):t==="fa"?Yse(e):Wse(e)}),Zse=()=>"Rendered view",Qse=()=>"渲染视图",Jse=()=>"نمای رندرشده",dp=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qse():t==="fa"?Jse():Zse()}),eie=()=>"Save",tie=()=>"保存",nie=()=>"ذخیره",Ll=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tie():t==="fa"?nie():eie()}),rie=()=>"Saving…",sie=()=>"正在保存…",iie=()=>"در حال ذخیره…",oa=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sie():t==="fa"?iie():rie()}),aie=()=>"Show less",oie=()=>"收起",lie=()=>"نمایش کمتر",$E=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oie():t==="fa"?lie():aie()}),cie=()=>"Show more",uie=()=>"展开",die=()=>"نمایش بیشتر",fie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uie():t==="fa"?die():cie()}),hie=()=>"Stop",_ie=()=>"停止",pie=()=>"توقف",HE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ie():t==="fa"?pie():hie()}),mie=()=>"Stopping…",gie=()=>"正在停止…",vie=()=>"در حال توقف…",bie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gie():t==="fa"?vie():mie()}),xie=()=>"View source",yie=()=>"查看源代码",wie=()=>"نمایش متن منبع",$u=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yie():t==="fa"?wie():xie()}),Sie=e=>`Hugging Face token — ${e==null?void 0:e.summary}`,kie=e=>`Hugging Face 令牌 — ${e==null?void 0:e.summary}`,Cie=e=>`توکن Hugging Face — ${e==null?void 0:e.summary}`,Eie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kie(e):t==="fa"?Cie(e):Sie(e)}),Nie=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,zie=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,jie=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,Aie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zie(e):t==="fa"?jie(e):Nie(e)}),Tie=()=>"No credentials required; this computer is always available.",Mie=()=>"无需凭据;此计算机始终可用。",Rie=()=>"نیازی به اطلاعات ورود نیست؛ این رایانه همیشه در دسترس است.",Die=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mie():t==="fa"?Rie():Tie()}),Lie=e=>`Modal token — ${e==null?void 0:e.summary}`,Oie=e=>`Modal 令牌 — ${e==null?void 0:e.summary}`,Iie=e=>`توکن Modal — ${e==null?void 0:e.summary}`,Bie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Oie(e):t==="fa"?Iie(e):Lie(e)}),$ie=e=>`OpenResearch login and SSH key — ${e==null?void 0:e.summary}`,Hie=e=>`OpenResearch 登录信息和 SSH 密钥 — ${e==null?void 0:e.summary}`,Pie=e=>`ورود OpenResearch و کلید SSH — ${e==null?void 0:e.summary}`,Fie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hie(e):t==="fa"?Pie(e):$ie(e)}),Uie=e=>`Ray Jobs endpoint — ${e==null?void 0:e.summary}`,qie=e=>`Ray Jobs 端点 — ${e==null?void 0:e.summary}`,Gie=e=>`endpoint مربوط به Ray Jobs — ${e==null?void 0:e.summary}`,Vie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qie(e):t==="fa"?Gie(e):Uie(e)}),Wie=e=>`SSH config — ${e==null?void 0:e.summary}`,Kie=e=>`SSH 配置 — ${e==null?void 0:e.summary}`,Yie=e=>`پیکربندی SSH — ${e==null?void 0:e.summary}`,Xie=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Kie(e):t==="fa"?Yie(e):Wie(e)}),Zie=e=>`SSH config and keys — ${e==null?void 0:e.summary}`,Qie=e=>`SSH 配置和密钥 — ${e==null?void 0:e.summary}`,Jie=e=>`پیکربندی و کلیدهای SSH — ${e==null?void 0:e.summary}`,eae=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Qie(e):t==="fa"?Jie(e):Zie(e)}),tae=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,nae=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,rae=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,sae=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nae(e):t==="fa"?rae(e):tae(e)}),iae=()=>"Runs as a remote Hugging Face Job",aae=()=>"作为远程 Hugging Face Job 运行",oae=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",lae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aae():t==="fa"?oae():iae()}),cae=()=>"Runs as a Job on your Kubernetes cluster",uae=()=>"作为 Kubernetes 集群上的 Job 运行",dae=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",fae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uae():t==="fa"?dae():cae()}),hae=()=>"Runs directly on this computer",_ae=()=>"直接在此计算机上运行",pae=()=>"مستقیماً روی این رایانه اجرا می‌شود",mae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ae():t==="fa"?pae():hae()}),gae=()=>"Runs in a remote Modal sandbox",vae=()=>"在远程 Modal 沙箱中运行",bae=()=>"در sandbox دوردست Modal اجرا می‌شود",xae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vae():t==="fa"?bae():gae()}),yae=()=>"Runs on an ephemeral OpenResearch box",wae=()=>"在临时 OpenResearch 主机上运行",Sae=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",kae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wae():t==="fa"?Sae():yae()}),Cae=()=>"Runs on the connected Ray cluster",Eae=()=>"在已连接的 Ray 集群上运行",Nae=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",zae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eae():t==="fa"?Nae():Cae()}),jae=()=>"Runs as a scheduled job on your Slurm cluster",Aae=()=>"作为 Slurm 集群上的调度作业运行",Tae=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",Mae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aae():t==="fa"?Tae():jae()}),Rae=()=>"Runs on a host from your SSH config",Dae=()=>"在 SSH 配置中的主机上运行",Lae=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",Oae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dae():t==="fa"?Lae():Rae()}),Iae=()=>"Runs through Tinker’s remote compute",Bae=()=>"通过 Tinker 远程算力运行",$ae=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",Hae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bae():t==="fa"?$ae():Iae()}),Pae=()=>"HF Jobs",Fae=()=>"HF Jobs",Uae=()=>"HF Jobs",qae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fae():t==="fa"?Uae():Pae()}),Gae=()=>"Kubernetes",Vae=()=>"Kubernetes",Wae=()=>"Kubernetes",Kae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vae():t==="fa"?Wae():Gae()}),Yae=()=>"This machine",Xae=()=>"此计算机",Zae=()=>"این رایانه",PE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xae():t==="fa"?Zae():Yae()}),Qae=()=>"Modal",Jae=()=>"Modal",eoe=()=>"Modal",toe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jae():t==="fa"?eoe():Qae()}),noe=()=>"OpenResearch",roe=()=>"OpenResearch",soe=()=>"OpenResearch",ioe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?roe():t==="fa"?soe():noe()}),aoe=()=>"Ray",ooe=()=>"Ray",loe=()=>"Ray",coe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ooe():t==="fa"?loe():aoe()}),uoe=()=>"Slurm",doe=()=>"Slurm",foe=()=>"Slurm",hoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?doe():t==="fa"?foe():uoe()}),_oe=()=>"SSH",poe=()=>"SSH",moe=()=>"SSH",goe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?poe():t==="fa"?moe():_oe()}),voe=()=>"Tinker",boe=()=>"Tinker",xoe=()=>"Tinker",yoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?boe():t==="fa"?xoe():voe()}),woe=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",Soe=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",koe=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",Coe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Soe():t==="fa"?koe():woe()}),Eoe=()=>"A Kubernetes Job is created in the selected context and namespace from the project’s .orx/k8s.yaml manifest.",Noe=()=>"系统根据项目的 .orx/k8s.yaml 清单,在所选上下文和命名空间中创建 Kubernetes Job。",zoe=()=>"بر پایهٔ مانیفست .orx/k8s.yaml پروژه، یک Kubernetes Job در زمینه و فضای نام انتخاب‌شده ساخته می‌شود.",joe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Noe():t==="fa"?zoe():Eoe()}),Aoe=()=>"The experiment runs as a supervised process on this computer and uses its CPU, memory, and GPUs.",Toe=()=>"实验作为受监管进程在此计算机上运行,并使用其 CPU、内存和 GPU。",Moe=()=>"آزمایش به‌صورت فرایندی تحت نظارت روی این رایانه اجرا می‌شود و از CPU، حافظه و GPUهای آن استفاده می‌کند.",Roe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Toe():t==="fa"?Moe():Aoe()}),Doe=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",Loe=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",Ooe=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",Ioe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Loe():t==="fa"?Ooe():Doe()}),Boe=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",$oe=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",Hoe=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",Poe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$oe():t==="fa"?Hoe():Boe()}),Foe=()=>"The run is submitted to the Ray Jobs endpoint, and the connected Ray cluster executes it.",Uoe=()=>"运行会提交到 Ray Jobs 端点,并由已连接的 Ray 集群执行。",qoe=()=>"اجرا به endpoint مربوط به Ray Jobs فرستاده و توسط خوشهٔ متصل Ray اجرا می‌شود.",Goe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uoe():t==="fa"?qoe():Foe()}),Voe=()=>"The login node receives an sbatch job using the saved partition, account, and time limit; the cluster schedules the work.",Woe=()=>"登录节点使用已保存的分区、账户和时间限制接收 sbatch 作业;集群负责调度。",Koe=()=>"گرهٔ ورود یک کار sbatch با پارتیشن، حساب و محدودیت زمانی ذخیره‌شده دریافت می‌کند و خوشه آن را زمان‌بندی می‌کند.",Yoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Woe():t==="fa"?Koe():Voe()}),Xoe=()=>"The project is copied to the selected SSH host and runs there. Logs and status return to this dashboard.",Zoe=()=>"项目会复制到所选 SSH 主机并在那里运行。日志和状态会返回此控制台。",Qoe=()=>"پروژه به میزبان SSH انتخاب‌شده کپی و همان‌جا اجرا می‌شود. گزارش‌ها و وضعیت به این داشبورد برمی‌گردند.",Joe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zoe():t==="fa"?Qoe():Xoe()}),ele=()=>"A controller runs here while the Tinker SDK sends model operations to remote compute. This computer must stay awake and online.",tle=()=>"控制器在此计算机上运行,Tinker SDK 将模型操作发送到远程算力。此计算机必须保持唤醒和联网。",nle=()=>"کنترل‌گر روی این رایانه اجرا می‌شود و Tinker SDK عملیات مدل را به رایانش دوردست می‌فرستد. این رایانه باید روشن و آنلاین بماند.",rle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tle():t==="fa"?nle():ele()}),sle=()=>"Context window",ile=()=>"上下文窗口",ale=()=>"پنجرهٔ زمینه",ole=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ile():t==="fa"?ale():sle()}),lle=()=>"Context window used",cle=()=>"已使用的上下文窗口",ule=()=>"پنجرهٔ زمینهٔ استفاده‌شده",dle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cle():t==="fa"?ule():lle()}),fle=e=>`${e==null?void 0:e.value} tokens`,hle=e=>`${e==null?void 0:e.value} 个 token`,_le=e=>`${e==null?void 0:e.value} توکن`,ple=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hle(e):t==="fa"?_le(e):fle(e)}),mle=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,gle=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,vle=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,ble=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gle(e):t==="fa"?vle(e):mle(e)}),xle=()=>"No runs yet — ask the agent to launch one.",yle=()=>"尚无运行——让智能体启动一个。",wle=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",Sle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yle():t==="fa"?wle():xle()}),kle=()=>"Run",Cle=()=>"运行",Ele=()=>"اجرا",y7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cle():t==="fa"?Ele():kle()}),Nle=()=>"Switch run",zle=()=>"切换运行",jle=()=>"تغییر اجرا",Ale=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zle():t==="fa"?jle():Nle()}),Tle=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,Mle=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,Rle=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,Dle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Mle(e):t==="fa"?Rle(e):Tle(e)}),Lle=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,Ole=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,Ile=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,Ble=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ole(e):t==="fa"?Ile(e):Lle(e)}),$le=e=>`${e==null?void 0:e.value}m`,Hle=e=>`${e==null?void 0:e.value} 分钟`,Ple=e=>`${e==null?void 0:e.value} دقیقه`,Fle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hle(e):t==="fa"?Ple(e):$le(e)}),Ule=e=>`${e==null?void 0:e.value}s`,qle=e=>`${e==null?void 0:e.value} 秒`,Gle=e=>`${e==null?void 0:e.value} ثانیه`,Vle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qle(e):t==="fa"?Gle(e):Ule(e)}),Wle=()=>"Code",Kle=()=>"代码",Yle=()=>"کد",Xle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kle():t==="fa"?Yle():Wle()}),Zle=()=>"created",Qle=()=>"创建于",Jle=()=>"ایجادشده",ece=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qle():t==="fa"?Jle():Zle()}),tce=()=>"from",nce=()=>"来自",rce=()=>"از",sce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nce():t==="fa"?rce():tce()}),ice=()=>"Logs",ace=()=>"日志",oce=()=>"گزارش‌ها",lce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ace():t==="fa"?oce():ice()}),cce=()=>"Latest run",uce=()=>"最新运行",dce=()=>"آخرین اجرا",fce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uce():t==="fa"?dce():cce()}),hce=()=>"Code",_ce=()=>"代码",pce=()=>"کد",mce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ce():t==="fa"?pce():hce()}),gce=()=>"Commit",vce=()=>"提交",bce=()=>"کامیت",xce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vce():t==="fa"?bce():gce()}),yce=()=>"created",wce=()=>"创建于",Sce=()=>"ایجادشده",kce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wce():t==="fa"?Sce():yce()}),Cce=()=>"Description",Ece=()=>"说明",Nce=()=>"توضیحات",zce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ece():t==="fa"?Nce():Cce()}),jce=()=>"Duration",Ace=()=>"时长",Tce=()=>"مدت",Mce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ace():t==="fa"?Tce():jce()}),Rce=()=>"exit",Dce=()=>"退出码",Lce=()=>"خروج",Oce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dce():t==="fa"?Lce():Rce()}),Ice=()=>"from",Bce=()=>"来自",$ce=()=>"از",Hce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bce():t==="fa"?$ce():Ice()}),Pce=()=>"Logs",Fce=()=>"日志",Uce=()=>"گزارش‌ها",qce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fce():t==="fa"?Uce():Pce()}),Gce=()=>"Run",Vce=()=>"运行",Wce=()=>"اجرا",Kce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vce():t==="fa"?Wce():Gce()}),Yce=()=>"Run history",Xce=()=>"运行历史",Zce=()=>"تاریخچهٔ اجرا",Qce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xce():t==="fa"?Zce():Yce()}),Jce=()=>"Started",eue=()=>"开始时间",tue=()=>"آغاز",nue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eue():t==="fa"?tue():Jce()}),rue=()=>"Runs",sue=()=>"运行",iue=()=>"اجراها",aue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sue():t==="fa"?iue():rue()}),oue=()=>"No runs yet",lue=()=>"还没有运行",cue=()=>"هنوز اجرایی وجود ندارد",uue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lue():t==="fa"?cue():oue()}),due=()=>"No experiments yet.",fue=()=>"还没有实验。",hue=()=>"هنوز آزمایشی وجود ندارد.",_ue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fue():t==="fa"?hue():due()}),pue=()=>"Not run yet",mue=()=>"尚未运行",gue=()=>"هنوز اجرا نشده",vue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mue():t==="fa"?gue():pue()}),bue=()=>"1 run",xue=()=>"1 次运行",yue=()=>"۱ اجرا",wue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xue():t==="fa"?yue():bue()}),Sue=()=>"Open logs",kue=()=>"打开日志",Cue=()=>"باز کردن گزارش‌ها",Eue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kue():t==="fa"?Cue():Sue()}),Nue=e=>`${e==null?void 0:e.count} runs`,zue=e=>`${e==null?void 0:e.count} 次运行`,jue=e=>`${e==null?void 0:e.count} اجرا`,Aue=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zue(e):t==="fa"?jue(e):Nue(e)}),Tue=()=>"Stop requested",Mue=()=>"已请求停止",Rue=()=>"درخواست توقف ثبت شد",Due=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mue():t==="fa"?Rue():Tue()}),Lue=()=>"Stop run",Oue=()=>"停止运行",Iue=()=>"توقف اجرا",Bue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oue():t==="fa"?Iue():Lue()}),$ue=()=>"Code",Hue=()=>"代码",Pue=()=>"کد",Fue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hue():t==="fa"?Pue():$ue()}),Uue=()=>"Experiments",que=()=>"实验",Gue=()=>"آزمایش‌ها",Vue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?que():t==="fa"?Gue():Uue()}),Wue=()=>"Logs",Kue=()=>"日志",Yue=()=>"گزارش‌ها",Xue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kue():t==="fa"?Yue():Wue()}),Zue=()=>"Stop failed:",Que=()=>"停止失败:",Jue=()=>"توقف ناموفق بود:",ede=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Que():t==="fa"?Jue():Zue()}),tde=()=>"Clipboard access is unavailable.",nde=()=>"无法访问剪贴板。",rde=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",sde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nde():t==="fa"?rde():tde()}),ide=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,ade=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,ode=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,lde=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ade(e):t==="fa"?ode(e):ide(e)}),cde=()=>"Duplicate",ude=()=>"创建副本",dde=()=>"ایجاد نسخهٔ تکراری",fde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ude():t==="fa"?dde():cde()}),hde=e=>`File actions for ${e==null?void 0:e.path}`,_de=e=>`${e==null?void 0:e.path} 的文件操作`,pde=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,mde=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_de(e):t==="fa"?pde(e):hde(e)}),gde=()=>"Open",vde=()=>"打开",bde=()=>"باز کردن",xde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vde():t==="fa"?bde():gde()}),yde=e=>`Rename ${e==null?void 0:e.path}`,wde=e=>`重命名 ${e==null?void 0:e.path}`,Sde=e=>`تغییر نام ${e==null?void 0:e.path}`,kde=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wde(e):t==="fa"?Sde(e):yde(e)}),Cde=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,Ede=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,Nde=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,zde=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ede(e):t==="fa"?Nde(e):Cde(e)}),jde=()=>"Binary file — no inline preview.",Ade=()=>"二进制文件——无法内嵌预览。",Tde=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",Mde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ade():t==="fa"?Tde():jde()}),Rde=()=>"This file changed on disk. Your edits have not been overwritten.",Dde=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",Lde=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",w7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dde():t==="fa"?Lde():Rde()}),Ode=()=>"Compile failed",Ide=()=>"编译失败",Bde=()=>"کامپایل ناموفق بود",$de=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ide():t==="fa"?Bde():Ode()}),Hde=()=>"Compile PDF",Pde=()=>"编译 PDF",Fde=()=>"کامپایل PDF",S7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pde():t==="fa"?Fde():Hde()}),Ude=()=>"Compiled, but the engine reported errors — check the output below.",qde=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",Gde=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",Vde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qde():t==="fa"?Gde():Ude()}),Wde=()=>"Copy command",Kde=()=>"复制命令",Yde=()=>"کپی فرمان",Xde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kde():t==="fa"?Yde():Wde()}),Zde=()=>"Copy install command",Qde=()=>"复制安装命令",Jde=()=>"کپی فرمان نصب",efe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qde():t==="fa"?Jde():Zde()}),tfe=()=>"This file was deleted on disk. Your edits have not been discarded.",nfe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",rfe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",k7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nfe():t==="fa"?rfe():tfe()}),sfe=()=>"Discard my edits and reload",ife=()=>"放弃我的编辑并重新加载",afe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",ofe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ife():t==="fa"?afe():sfe()}),lfe=()=>"Discard unsaved changes and close this file?",cfe=()=>"要丢弃未保存的更改并关闭此文件吗?",ufe=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",dfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cfe():t==="fa"?ufe():lfe()}),ffe=()=>"Dismiss",hfe=()=>"关闭",_fe=()=>"بستن",C7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hfe():t==="fa"?_fe():ffe()}),pfe=()=>"Dismiss compile message",mfe=()=>"关闭编译消息",gfe=()=>"بستن پیام کامپایل",vfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mfe():t==="fa"?gfe():pfe()}),bfe=()=>"Dismiss Overleaf message",xfe=()=>"关闭 Overleaf 消息",yfe=()=>"بستن پیام Overleaf",wfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xfe():t==="fa"?yfe():bfe()}),Sfe=()=>"Download",kfe=()=>"下载",Cfe=()=>"بارگیری",FE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kfe():t==="fa"?Cfe():Sfe()}),Efe=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,Nfe=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,zfe=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,jfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nfe(e):t==="fa"?zfe(e):Efe(e)}),Afe=()=>"Failed to load file:",Tfe=()=>"加载文件失败:",Mfe=()=>"بارگیری فایل ناموفق بود:",Rfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tfe():t==="fa"?Mfe():Afe()}),Dfe=()=>"File truncated — showing the first 512 KB.",Lfe=()=>"文件已截断——仅显示前 512 KB。",Ofe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",Ife=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lfe():t==="fa"?Ofe():Dfe()}),Bfe=()=>"The page below stops partway — the full file could not be loaded.",$fe=()=>"下方页面在中途结束——无法加载完整文件。",Hfe=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",Pfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$fe():t==="fa"?Hfe():Bfe()}),Ffe=e=>`Rendered HTML: ${e==null?void 0:e.name}`,Ufe=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,qfe=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,Gfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ufe(e):t==="fa"?qfe(e):Ffe(e)}),Vfe=()=>"Loading…",Wfe=()=>"正在加载…",Kfe=()=>"در حال بارگیری…",UE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wfe():t==="fa"?Kfe():Vfe()}),Yfe=()=>"File not found.",Xfe=()=>"找不到文件。",Zfe=()=>"فایل پیدا نشد.",Qfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xfe():t==="fa"?Zfe():Yfe()}),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,n={})=>{const t=n.locale??E();return t==="zh-CN"?ehe(e):t==="fa"?the(e):Jfe(e)}),rhe=e=>`File not found on branch ${e==null?void 0:e.branch}.`,she=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,ihe=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,ahe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?she(e):t==="fa"?ihe(e):rhe(e)}),ohe=()=>"File not found on disk.",lhe=()=>"磁盘上找不到此文件。",che=()=>"فایل روی دیسک پیدا نشد.",uhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lhe():t==="fa"?che():ohe()}),dhe=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,fhe=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,hhe=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,_he=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fhe(e):t==="fa"?hhe(e):dhe(e)}),phe=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,mhe=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,ghe=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,vhe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mhe(e):t==="fa"?ghe(e):phe(e)}),bhe=()=>"Open in default editor",xhe=()=>"在默认编辑器中打开",yhe=()=>"باز کردن در ویرایشگر پیش‌فرض",E7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xhe():t==="fa"?yhe():bhe()}),whe=()=>"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.",She=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",khe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",Che=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?She():t==="fa"?khe():whe()}),Ehe=()=>"Overwrite disk file",Nhe=()=>"覆盖磁盘文件",zhe=()=>"بازنویسی فایل روی دیسک",jhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nhe():t==="fa"?zhe():Ehe()}),Ahe=()=>"Compiled PDF is out of date",The=()=>"已编译的 PDF 不是最新版本",Mhe=()=>"PDF کامپایل‌شده به‌روز نیست",Rhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?The():t==="fa"?Mhe():Ahe()}),Dhe=()=>"project clone",Lhe=()=>"项目克隆",Ohe=()=>"کلون پروژه",o0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lhe():t==="fa"?Ohe():Dhe()}),Ihe=()=>"Recompile PDF",Bhe=()=>"重新编译 PDF",$he=()=>"کامپایل دوبارهٔ PDF",N7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bhe():t==="fa"?$he():Ihe()}),Hhe=()=>"Reloading will discard your unsaved edits.",Phe=()=>"重新加载将丢弃未保存的编辑。",Fhe=()=>"بارگذاری مجدد، ویرایش‌های ذخیره‌نشده شما را حذف می‌کند.",Uhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Phe():t==="fa"?Fhe():Hhe()}),qhe=()=>"Reload file",Ghe=()=>"重新加载文件",Vhe=()=>"بارگیری دوبارهٔ فایل",z7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ghe():t==="fa"?Vhe():qhe()}),Whe=()=>"Reload from disk",Khe=()=>"从磁盘重新加载",Yhe=()=>"بارگذاری مجدد از دیسک",Xhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Khe():t==="fa"?Yhe():Whe()}),Zhe=()=>"Save failed",Qhe=()=>"保存失败",Jhe=()=>"ذخیره ناموفق بود",e_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qhe():t==="fa"?Jhe():Zhe()}),t_e=()=>"Saving…",n_e=()=>"正在保存…",r_e=()=>"در حال ذخیره…",s_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n_e():t==="fa"?r_e():t_e()}),i_e=()=>"Selected — press ⌘C",a_e=()=>"已选中 — 按 ⌘C 复制",o_e=()=>"انتخاب شد — برای کپی ⌘C را بزنید",l_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a_e():t==="fa"?o_e():i_e()}),c_e=()=>"session’s worktree",u_e=()=>"会话工作树",d_e=()=>"درخت کاری نشست",l0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u_e():t==="fa"?d_e():c_e()}),f_e=()=>"Show compiled PDF",h_e=()=>"显示已编译的 PDF",__e=()=>"نمایش PDF کامپایل‌شده",j7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h_e():t==="fa"?__e():f_e()}),p_e=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",m_e=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",g_e=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",v_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m_e():t==="fa"?g_e():p_e()}),b_e=()=>"This session's worktree isn't available — showing the project clone's copy.",x_e=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",y_e=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",w_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x_e():t==="fa"?y_e():b_e()}),S_e=()=>"Unsaved",k_e=()=>"未保存",C_e=()=>"ذخیره نشده",E_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k_e():t==="fa"?C_e():S_e()}),N_e=()=>"Unsaved — ⌘S or click away to save",z_e=()=>"未保存 — 按 ⌘S 或点击其他位置保存",j_e=()=>"ذخیره نشده — ⌘S را بزنید یا برای ذخیره بیرون کلیک کنید",A_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z_e():t==="fa"?j_e():N_e()}),T_e=()=>"Update orx on the remote machine to edit this file safely.",M_e=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",R_e=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",D_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M_e():t==="fa"?R_e():T_e()}),L_e=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",O_e=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",I_e=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",B_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O_e():t==="fa"?I_e():L_e()}),$_e=()=>"Back to preview",H_e=()=>"返回预览",P_e=()=>"بازگشت به پیش‌نمایش",F_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H_e():t==="fa"?P_e():$_e()}),U_e=e=>`${e==null?void 0:e.count} changed files`,q_e=e=>`${e==null?void 0:e.count} 个已更改文件`,G_e=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,V_e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?q_e(e):t==="fa"?G_e(e):U_e(e)}),W_e=()=>"Changed files",K_e=()=>"已更改文件",Y_e=()=>"فایل‌های تغییرکرده",X_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K_e():t==="fa"?Y_e():W_e()}),Z_e=()=>"Diff preview truncated",Q_e=()=>"差异预览已截断",J_e=()=>"پیش‌نمایش تفاوت کوتاه شده است",e0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q_e():t==="fa"?J_e():Z_e()}),t0e=e=>`${e==null?void 0:e.count} files shown (partial)`,n0e=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,r0e=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,s0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?n0e(e):t==="fa"?r0e(e):t0e(e)}),i0e=()=>"No changes.",a0e=()=>"没有更改。",o0e=()=>"تغییری وجود ندارد.",l0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a0e():t==="fa"?o0e():i0e()}),c0e=()=>"No complete file preview was available before the cutoff.",u0e=()=>"在截断位置之前没有完整的文件预览。",d0e=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",f0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u0e():t==="fa"?d0e():c0e()}),h0e=()=>"No textual diff for this file.",_0e=()=>"此文件没有文本差异。",p0e=()=>"برای این فایل تفاوت متنی وجود ندارد.",m0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_0e():t==="fa"?p0e():h0e()}),g0e=()=>"1 changed file",v0e=()=>"1 个已更改文件",b0e=()=>"۱ فایل تغییرکرده",x0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v0e():t==="fa"?b0e():g0e()}),y0e=()=>"1 file shown (partial)",w0e=()=>"显示 1 个文件(部分)",S0e=()=>"۱ فایل نمایش داده شده (ناقص)",k0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w0e():t==="fa"?S0e():y0e()}),C0e=()=>"Unable to parse this diff.",E0e=()=>"无法解析此差异。",N0e=()=>"خواندن این تفاوت ممکن نبود.",z0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E0e():t==="fa"?N0e():C0e()}),j0e=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,A0e=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,T0e=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,M0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?A0e(e):t==="fa"?T0e(e):j0e(e)}),R0e=()=>"View full diff",D0e=()=>"查看完整差异",L0e=()=>"نمایش تفاوت کامل",O0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D0e():t==="fa"?L0e():R0e()}),I0e=()=>"Create a token ↗",B0e=()=>"创建令牌 ↗",$0e=()=>"ساخت توکن ↗",H0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B0e():t==="fa"?$0e():I0e()}),P0e=()=>"All projects",F0e=()=>"所有项目",U0e=()=>"همهٔ پروژه‌ها",A7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F0e():t==="fa"?U0e():P0e()}),q0e=()=>"Configure Repository",G0e=()=>"配置仓库",V0e=()=>"پیکربندی مخزن",W0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G0e():t==="fa"?V0e():q0e()}),K0e=()=>"Create a new project",Y0e=()=>"新建项目",X0e=()=>"ایجاد پروژهٔ جدید",Z0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y0e():t==="fa"?X0e():K0e()}),Q0e=()=>"Hide sidebar",J0e=()=>"隐藏侧边栏",epe=()=>"پنهان کردن نوار کناری",T7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J0e():t==="fa"?epe():Q0e()}),tpe=()=>"Project",npe=()=>"项目",rpe=()=>"پروژه",spe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?npe():t==="fa"?rpe():tpe()}),ipe=e=>`${e==null?void 0:e.count} cancelled`,ape=e=>`${e==null?void 0:e.count} 次取消`,ope=e=>`${e==null?void 0:e.count} لغوشده`,lpe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ape(e):t==="fa"?ope(e):ipe(e)}),cpe=e=>`${e==null?void 0:e.count} done`,upe=e=>`${e==null?void 0:e.count} 次完成`,dpe=e=>`${e==null?void 0:e.count} تمام‌شده`,fpe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?upe(e):t==="fa"?dpe(e):cpe(e)}),hpe=e=>`${e==null?void 0:e.count} failed`,_pe=e=>`${e==null?void 0:e.count} 次失败`,ppe=e=>`${e==null?void 0:e.count} ناموفق`,mpe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_pe(e):t==="fa"?ppe(e):hpe(e)}),gpe=e=>`${e==null?void 0:e.count} files`,vpe=e=>`${e==null?void 0:e.count} 个文件`,bpe=e=>`${e==null?void 0:e.count} فایل`,xpe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vpe(e):t==="fa"?bpe(e):gpe(e)}),ype=e=>`${e==null?void 0:e.count}+ files`,wpe=e=>`至少 ${e==null?void 0:e.count} 个文件`,Spe=e=>`بیش از ${e==null?void 0:e.count} فایل`,kpe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wpe(e):t==="fa"?Spe(e):ype(e)}),Cpe=e=>`${e==null?void 0:e.count} live`,Epe=e=>`${e==null?void 0:e.count} 次进行中`,Npe=e=>`${e==null?void 0:e.count} فعال`,zpe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Epe(e):t==="fa"?Npe(e):Cpe(e)}),jpe=()=>"1 file",Ape=()=>"1 个文件",Tpe=()=>"۱ فایل",Mpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ape():t==="fa"?Tpe():jpe()}),Rpe=()=>"1 run",Dpe=()=>"1 次运行",Lpe=()=>"۱ اجرا",Ope=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dpe():t==="fa"?Lpe():Rpe()}),Ipe=e=>`${e==null?void 0:e.count} runs`,Bpe=e=>`${e==null?void 0:e.count} 次运行`,$pe=e=>`${e==null?void 0:e.count} اجرا`,Hpe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Bpe(e):t==="fa"?$pe(e):Ipe(e)}),Ppe=()=>"No instances yet.",Fpe=()=>"还没有实例。",Upe=()=>"هنوز نمونه‌ای وجود ندارد.",qpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fpe():t==="fa"?Upe():Ppe()}),Gpe=()=>"Nothing running right now.",Vpe=()=>"当前没有运行中的实例。",Wpe=()=>"اکنون چیزی در حال اجرا نیست.",Kpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vpe():t==="fa"?Wpe():Gpe()}),Ype=()=>"Select a project to see its history.",Xpe=()=>"请选择一个项目以查看其历史记录。",Zpe=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",Qpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xpe():t==="fa"?Zpe():Ype()}),Jpe=()=>"Select a project to see its runs.",eme=()=>"请选择一个项目以查看其运行。",tme=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",nme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eme():t==="fa"?tme():Jpe()}),rme=()=>"View history",sme=()=>"查看历史记录",ime=()=>"مشاهدهٔ تاریخچه",ame=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sme():t==="fa"?ime():rme()}),ome=e=>`View history (${e==null?void 0:e.count})`,lme=e=>`查看历史记录(${e==null?void 0:e.count})`,cme=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,ume=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lme(e):t==="fa"?cme(e):ome(e)}),dme=()=>"The engine exited without producing a PDF or a log.",fme=()=>"引擎已退出,但没有生成 PDF 或日志。",hme=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",_me=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fme():t==="fa"?hme():dme()}),pme=()=>"Loading…",mme=()=>"正在加载…",gme=()=>"در حال بارگیری…",vme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mme():t==="fa"?gme():pme()}),bme=()=>"Copy",xme=()=>"复制",yme=()=>"کپی",qE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xme():t==="fa"?yme():bme()}),wme=()=>"Copy code",Sme=()=>"复制代码",kme=()=>"کپی کد",Cme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sme():t==="fa"?kme():wme()}),Eme=()=>"Download",Nme=()=>"下载",zme=()=>"بارگیری",GE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nme():t==="fa"?zme():Eme()}),jme=()=>"This browser can’t preview this media format.",Ame=()=>"此浏览器无法预览该媒体格式。",Tme=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",Mme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ame():t==="fa"?Tme():jme()}),Rme=()=>" · CLI configuration",Dme=()=>" · CLI 配置",Lme=()=>" · پیکربندی CLI",VE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dme():t==="fa"?Lme():Rme()}),Ome=()=>"· Default",Ime=()=>"· 默认",Bme=()=>"· پیش‌فرض",WE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ime():t==="fa"?Bme():Ome()}),$me=()=>"Default model",Hme=()=>"默认模型",Pme=()=>"مدل پیش‌فرض",M7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hme():t==="fa"?Pme():$me()}),Fme=()=>"Detecting harnesses…",Ume=()=>"正在检测智能体工具…",qme=()=>"در حال شناسایی ابزارهای عامل…",Gme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ume():t==="fa"?qme():Fme()}),Vme=()=>"Effort",Wme=()=>"推理强度",Kme=()=>"میزان استدلال",Yme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wme():t==="fa"?Kme():Vme()}),Xme=()=>"Fast speed ·",Zme=()=>"快速 ·",Qme=()=>"سرعت بالا ·",Jme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zme():t==="fa"?Qme():Xme()}),ege=()=>"Mode",tge=()=>"模式",nge=()=>"حالت",R7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tge():t==="fa"?nge():ege()}),rge=()=>"Model",sge=()=>"模型",ige=()=>"مدل",lv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sge():t==="fa"?ige():rge()}),age=e=>`${e==null?void 0:e.count} more — search to find`,oge=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,lge=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,cge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oge(e):t==="fa"?lge(e):age(e)}),uge=()=>"Not available",dge=()=>"不可用",fge=()=>"در دسترس نیست",hge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dge():t==="fa"?fge():uge()}),_ge=()=>"Search models…",pge=()=>"搜索模型…",mge=()=>"جست‌وجوی مدل‌ها…",gge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pge():t==="fa"?mge():_ge()}),vge=()=>"Sessions keep their harness. Start a new chat to switch.",bge=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",xge=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",yge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bge():t==="fa"?xge():vge()}),wge=()=>"Speed",Sge=()=>"速度",kge=()=>"سرعت",D7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sge():t==="fa"?kge():wge()}),Cge=()=>"Unavailable",Ege=()=>"不可用",Nge=()=>"در دسترس نیست",KE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ege():t==="fa"?Nge():Cge()}),zge=e=>`Use “${e==null?void 0:e.id}” as the model ID`,jge=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,Age=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,Tge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jge(e):t==="fa"?Age(e):zge(e)}),Mge=()=>"Variant",Rge=()=>"变体",Dge=()=>"گونه",Lge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rge():t==="fa"?Dge():Mge()}),Oge=()=>"Advanced",Ige=()=>"高级",Bge=()=>"پیشرفته",$ge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ige():t==="fa"?Bge():Oge()}),Hge=()=>"Advanced · Connect GitHub",Pge=()=>"高级 · 连接 GitHub",Fge=()=>"پیشرفته · اتصال GitHub",Uge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pge():t==="fa"?Fge():Hge()}),qge=()=>"Advanced · GitHub sync on",Gge=()=>"高级 · GitHub 同步已开启",Vge=()=>"پیشرفته · همگام‌سازی GitHub روشن است",Wge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gge():t==="fa"?Vge():qge()}),Kge=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",Yge=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",Xge=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",Zge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yge():t==="fa"?Xge():Kge()}),Qge=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,Jge=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,e1e=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,t1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Jge(e):t==="fa"?e1e(e):Qge(e)}),n1e=()=>"Choose an existing project folder",r1e=()=>"选择现有项目文件夹",s1e=()=>"انتخاب پوشهٔ موجود پروژه",L7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r1e():t==="fa"?s1e():n1e()}),i1e=()=>"Choosing…",a1e=()=>"正在选择…",o1e=()=>"در حال انتخاب…",l1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a1e():t==="fa"?o1e():i1e()}),c1e=()=>"Clone destination",u1e=()=>"克隆位置",d1e=()=>"مقصد کلون",f1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u1e():t==="fa"?d1e():c1e()}),h1e=()=>"Clone paper project",_1e=()=>"克隆论文项目",p1e=()=>"کلون پروژهٔ مقاله",m1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_1e():t==="fa"?p1e():h1e()}),g1e=()=>"Create project",v1e=()=>"创建项目",b1e=()=>"ایجاد پروژه",O7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v1e():t==="fa"?b1e():g1e()}),x1e=()=>"Creating…",y1e=()=>"正在创建…",w1e=()=>"در حال ایجاد…",S1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y1e():t==="fa"?w1e():x1e()}),k1e=()=>"Choose a different destination. This path is a file, not a folder.",C1e=()=>"请选择其他位置。此路径是文件,不是文件夹。",E1e=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",I7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C1e():t==="fa"?E1e():k1e()}),N1e=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",z1e=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",j1e=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",A1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z1e():t==="fa"?j1e():N1e()}),T1e=()=>"Blank project",M1e=()=>"空白项目",R1e=()=>"پروژهٔ خالی",D1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M1e():t==="fa"?R1e():T1e()}),L1e=()=>"Cancel",O1e=()=>"取消",I1e=()=>"لغو",B1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O1e():t==="fa"?I1e():L1e()}),$1e=()=>"Change",H1e=()=>"更改",P1e=()=>"تغییر",F1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H1e():t==="fa"?P1e():$1e()}),U1e=()=>"Change selected paper",q1e=()=>"更改所选论文",G1e=()=>"تغییر مقالهٔ انتخاب‌شده",V1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q1e():t==="fa"?G1e():U1e()}),W1e=()=>"Check out a Git branch before using this folder.",K1e=()=>"使用此文件夹前,请先检出一个 Git 分支。",Y1e=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",X1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K1e():t==="fa"?Y1e():W1e()}),Z1e=()=>"Checking project location.",Q1e=()=>"正在检查项目位置。",J1e=()=>"در حال بررسی محل پروژه.",B7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q1e():t==="fa"?J1e():Z1e()}),eve=()=>"Existing folder",tve=()=>"现有文件夹",nve=()=>"پوشهٔ موجود",rve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tve():t==="fa"?nve():eve()}),sve=()=>"Experiment branches will be pushed to the remote GitHub repository.",ive=()=>"实验分支将推送到远程 GitHub 仓库。",ave=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",ove=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ive():t==="fa"?ave():sve()}),lve=()=>"From a paper",cve=()=>"从论文创建",uve=()=>"از یک مقاله",dve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cve():t==="fa"?uve():lve()}),fve=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",hve=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",_ve=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",pve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hve():t==="fa"?_ve():fve()}),mve=()=>"my-research",gve=()=>"my-research",vve=()=>"my-research",$7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gve():t==="fa"?vve():mve()}),bve=()=>"No papers found. Try an arXiv ID, URL, or a different title.",xve=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",yve=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",wve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xve():t==="fa"?yve():bve()}),Sve=()=>"No public repository found on alphaXiv",kve=()=>"在 alphaXiv 上未找到公开仓库",Cve=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",Eve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kve():t==="fa"?Cve():Sve()}),Nve=()=>"OpenResearch will start a blank project with this paper's PDF.",zve=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",jve=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",Ave=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zve():t==="fa"?jve():Nve()}),Tve=()=>"Paper",Mve=()=>"论文",Rve=()=>"مقاله",Dve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mve():t==="fa"?Rve():Tve()}),Lve=()=>"Project location",Ove=()=>"项目位置",Ive=()=>"محل پروژه",cv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ove():t==="fa"?Ive():Lve()}),Bve=()=>"Project name",$ve=()=>"项目名称",Hve=()=>"نام پروژه",H7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ve():t==="fa"?Hve():Bve()}),Pve=()=>"Search for a paper by arXiv ID, URL, or title",Fve=()=>"按 arXiv ID、网址或标题搜索论文",Uve=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",qve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fve():t==="fa"?Uve():Pve()}),Gve=()=>"Sync experiments to GitHub",Vve=()=>"将实验同步到 GitHub",Wve=()=>"همگام‌سازی آزمایش‌ها با GitHub",Kve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vve():t==="fa"?Wve():Gve()}),Yve=()=>"That folder no longer exists. Choose it again.",Xve=()=>"该文件夹已不存在。请重新选择。",Zve=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",Qve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xve():t==="fa"?Zve():Yve()}),Jve=()=>"The selected folder contains an invalid Git repository.",ebe=()=>"所选文件夹包含无效的 Git 仓库。",tbe=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",nbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ebe():t==="fa"?tbe():Jve()}),rbe=()=>"The selected path is not a folder.",sbe=()=>"所选路径不是文件夹。",ibe=()=>"مسیر انتخاب‌شده پوشه نیست.",abe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sbe():t==="fa"?ibe():rbe()}),obe=e=>`Checking ${e==null?void 0:e.repository}.`,lbe=e=>`正在检查 ${e==null?void 0:e.repository}。`,cbe=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,ube=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lbe(e):t==="fa"?cbe(e):obe(e)}),dbe=e=>`Creates ${e==null?void 0:e.repository}.`,fbe=e=>`将创建 ${e==null?void 0:e.repository}。`,hbe=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,_be=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fbe(e):t==="fa"?hbe(e):dbe(e)}),pbe=e=>`Pushes to ${e==null?void 0:e.repository}.`,mbe=e=>`将推送到 ${e==null?void 0:e.repository}。`,gbe=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,vbe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mbe(e):t==="fa"?gbe(e):pbe(e)}),bbe=()=>"Project location is required.",xbe=()=>"必须填写项目位置。",ybe=()=>"محل پروژه الزامی است.",P7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xbe():t==="fa"?ybe():bbe()}),wbe=()=>"Choose a different destination. The paper repository needs a new or empty folder.",Sbe=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",kbe=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",Cbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sbe():t==="fa"?kbe():wbe()}),Ebe=()=>"A linked public code repository is cloned without credentials.",Nbe=()=>"关联的公开代码仓库无需凭据即可克隆。",zbe=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",jbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nbe():t==="fa"?zbe():Ebe()}),Abe=e=>`Run ${e==null?void 0:e.command} before creating the project.`,Tbe=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,Mbe=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,Rbe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tbe(e):t==="fa"?Mbe(e):Abe(e)}),Dbe=()=>"Searching alphaXiv…",Lbe=()=>"正在搜索 alphaXiv…",Obe=()=>"در حال جست‌وجوی alphaXiv…",Ibe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lbe():t==="fa"?Obe():Dbe()}),Bbe=()=>"Use folder",$be=()=>"使用文件夹",Hbe=()=>"استفاده از پوشه",Pbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$be():t==="fa"?Hbe():Bbe()}),Fbe=()=>"Can’t reach OpenResearch. This page is no longer live.",Ube=()=>"无法连接 OpenResearch。此页面已不再实时同步。",qbe=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",$b=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ube():t==="fa"?qbe():Fbe()}),Gbe=()=>"A workspace for your research agents",Vbe=()=>"面向研究智能体的工作空间",Wbe=()=>"فضای کاری برای عامل‌های پژوهشی شما",Kbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vbe():t==="fa"?Wbe():Gbe()}),Ybe=()=>"Add papers that represent your research interests, including papers by other authors.",Xbe=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",Zbe=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",Qbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xbe():t==="fa"?Zbe():Ybe()}),Jbe=()=>"API key",e2e=()=>"API 密钥",t2e=()=>"کلید API",YE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e2e():t==="fa"?t2e():Jbe()}),n2e=()=>"AI/ML",r2e=()=>"人工智能与机器学习",s2e=()=>"هوش مصنوعی و یادگیری ماشین",i2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r2e():t==="fa"?s2e():n2e()}),a2e=()=>"Biology",o2e=()=>"生物学",l2e=()=>"زیست‌شناسی",c2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o2e():t==="fa"?l2e():a2e()}),u2e=()=>"Other",d2e=()=>"其他",f2e=()=>"سایر",h2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d2e():t==="fa"?f2e():u2e()}),_2e=()=>"Physics",p2e=()=>"物理学",m2e=()=>"فیزیک",g2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p2e():t==="fa"?m2e():_2e()}),v2e=()=>"Back",b2e=()=>"返回",x2e=()=>"بازگشت",F7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b2e():t==="fa"?x2e():v2e()}),y2e=()=>"Check failed",w2e=()=>"检查失败",S2e=()=>"بررسی ناموفق بود",k2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w2e():t==="fa"?S2e():y2e()}),C2e=()=>"Checking",E2e=()=>"正在检查",N2e=()=>"در حال بررسی",z2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E2e():t==="fa"?N2e():C2e()}),j2e=()=>"Checking Git…",A2e=()=>"正在检查 Git…",T2e=()=>"در حال بررسی Git…",M2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A2e():t==="fa"?T2e():j2e()}),R2e=()=>"Choose a coding agent",D2e=()=>"选择编程智能体",L2e=()=>"یک عامل کدنویسی انتخاب کنید",O2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D2e():t==="fa"?L2e():R2e()}),I2e=()=>"Choose a coding agent to continue.",B2e=()=>"选择一个编程智能体以继续。",$2e=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",H2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B2e():t==="fa"?$2e():I2e()}),P2e=()=>"Choose at least one research area to continue.",F2e=()=>"请至少选择一个研究领域后再继续。",U2e=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",q2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F2e():t==="fa"?U2e():P2e()}),G2e=()=>"Choose one or more.",V2e=()=>"请选择一项或多项。",W2e=()=>"یک یا چند مورد را انتخاب کنید.",K2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V2e():t==="fa"?W2e():G2e()}),Y2e=()=>"Choose your preferred coding agent",X2e=()=>"请选择首选编程智能体",Z2e=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",Q2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X2e():t==="fa"?Z2e():Y2e()}),J2e=()=>"Consolidate your research",exe=()=>"集中管理研究",txe=()=>"پژوهش خود را یکپارچه کنید",nxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?exe():t==="fa"?txe():J2e()}),rxe=()=>"Continue",sxe=()=>"继续",ixe=()=>"ادامه",U7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sxe():t==="fa"?ixe():rxe()}),axe=()=>"Describe your research area to continue.",oxe=()=>"请描述你的研究领域后再继续。",lxe=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",cxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oxe():t==="fa"?lxe():axe()}),uxe=()=>"Detecting Claude Code, Codex, OpenCode…",dxe=()=>"正在检测 Claude Code、Codex、OpenCode…",fxe=()=>"در حال شناسایی Claude Code، Codex و OpenCode…",hxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dxe():t==="fa"?fxe():uxe()}),_xe=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",pxe=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",mxe=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",gxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pxe():t==="fa"?mxe():_xe()}),vxe=()=>"Everything stays local",bxe=()=>"一切都保留在本地",xxe=()=>"همه‌چیز محلی می‌ماند",yxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bxe():t==="fa"?xxe():vxe()}),wxe=()=>"Get started",Sxe=()=>"开始使用",kxe=()=>"شروع",Cxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sxe():t==="fa"?kxe():wxe()}),Exe=()=>"Git is required for local experiments. Install Git, then re-check.",Nxe=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",zxe=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",jxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nxe():t==="fa"?zxe():Exe()}),Axe=()=>"Ground your agents",Txe=()=>"为智能体提供可靠依据",Mxe=()=>"عامل‌هایتان را به منابع متصل کنید",Rxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Txe():t==="fa"?Mxe():Axe()}),Dxe=()=>"Install broken",Lxe=()=>"安装损坏",Oxe=()=>"نصب خراب است",Ixe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lxe():t==="fa"?Oxe():Dxe()}),Bxe=()=>"Install Git to continue",$xe=()=>"请安装 Git 后再继续",Hxe=()=>"برای ادامه Git را نصب کنید",Pxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$xe():t==="fa"?Hxe():Bxe()}),Fxe=()=>"Local Git",Uxe=()=>"本地 Git",qxe=()=>"Git محلی",Gxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uxe():t==="fa"?qxe():Fxe()}),Vxe=()=>"Not detected",Wxe=()=>"未检测到",Kxe=()=>"شناسایی نشد",q7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wxe():t==="fa"?Kxe():Vxe()}),Yxe=()=>"Not found",Xxe=()=>"未找到",Zxe=()=>"پیدا نشد",XE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xxe():t==="fa"?Zxe():Yxe()}),Qxe=()=>"Not signed in",Jxe=()=>"未登录",eye=()=>"وارد نشده",tye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jxe():t==="fa"?eye():Qxe()}),nye=()=>"OpenResearch uses a coding agent already installed on this machine.",rye=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",sye=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",iye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rye():t==="fa"?sye():nye()}),aye=()=>"Other research area",oye=()=>"其他研究领域",lye=()=>"حوزهٔ پژوهشی دیگر",cye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oye():t==="fa"?lye():aye()}),uye=()=>"Re-check",dye=()=>"重新检查",fye=()=>"بررسی دوباره",hye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dye():t==="fa"?fye():uye()}),_ye=()=>"Ready",pye=()=>"已就绪",mye=()=>"آماده",gye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pye():t==="fa"?mye():_ye()}),vye=()=>"Re-check Git before continuing",bye=()=>"请重新检查 Git 后再继续",xye=()=>"پیش از ادامه Git را دوباره بررسی کنید",yye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bye():t==="fa"?xye():vye()}),wye=()=>"Representative papers",Sye=()=>"代表性论文",kye=()=>"مقاله‌های شاخص",Cye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sye():t==="fa"?kye():wye()}),Eye=()=>"Research background",Nye=()=>"研究背景",zye=()=>"پیشینهٔ پژوهشی",jye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nye():t==="fa"?zye():Eye()}),Aye=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",Tye=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",Mye=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",G7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tye():t==="fa"?Mye():Aye()}),Rye=()=>"Search alphaXiv by title to link a paper…",Dye=()=>"按标题搜索 alphaXiv 以关联论文…",Lye=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",Oye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dye():t==="fa"?Lye():Rye()}),Iye=()=>"Searching alphaXiv…",Bye=()=>"正在搜索 alphaXiv…",$ye=()=>"در حال جست‌وجوی alphaXiv…",Hye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bye():t==="fa"?$ye():Iye()}),Pye=()=>"Selected",Fye=()=>"已选择",Uye=()=>"انتخاب‌شده",qye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fye():t==="fa"?Uye():Pye()}),Gye=()=>"Setting things up…",Vye=()=>"正在设置…",Wye=()=>"در حال راه‌اندازی…",Kye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vye():t==="fa"?Wye():Gye()}),Yye=()=>"Sign in to at least one coding agent to continue",Xye=()=>"请至少登录一个编程智能体后再继续",Zye=()=>"برای ادامه، وارد دست‌کم یک عامل برنامه‌نویسی شوید",Qye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xye():t==="fa"?Zye():Yye()}),Jye=()=>"Sign in to at least one agent to continue.",e4e=()=>"请登录至少一个智能体以继续。",t4e=()=>"برای ادامه دست‌کم به یک عامل وارد شوید.",n4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e4e():t==="fa"?t4e():Jye()}),r4e=()=>"Signed in",s4e=()=>"已登录",i4e=()=>"وارد شده",a4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s4e():t==="fa"?i4e():r4e()}),o4e=()=>"Connected to alphaXiv, bioRxiv, and OpenAlex to ground your agents in the latest research.",l4e=()=>"已连接 alphaXiv、bioRxiv 和 OpenAlex,让智能体以最新研究为依据。",c4e=()=>"به alphaXiv، bioRxiv و OpenAlex متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",u4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l4e():t==="fa"?c4e():o4e()}),d4e=()=>"· Step 1 of 2",f4e=()=>"· 第 1 步,共 2 步",h4e=()=>"· مرحلهٔ ۱ از ۲",_4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f4e():t==="fa"?h4e():d4e()}),p4e=()=>"· Step 2 of 2",m4e=()=>"· 第 2 步,共 2 步",g4e=()=>"· مرحلهٔ ۲ از ۲",v4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m4e():t==="fa"?g4e():p4e()}),b4e=()=>"Tell us about your research",x4e=()=>"介绍一下你的研究",y4e=()=>"از پژوهش خود بگویید",w4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x4e():t==="fa"?y4e():b4e()}),S4e=()=>"Tell us your other research area",k4e=()=>"告诉我们你的其他研究领域",C4e=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",E4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k4e():t==="fa"?C4e():S4e()}),N4e=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",z4e=()=>"在一处跟踪实验、产物、算力、技能和代码。",j4e=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",A4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z4e():t==="fa"?j4e():N4e()}),T4e=()=>"Unable to verify",M4e=()=>"无法验证",R4e=()=>"تأیید ممکن نیست",D4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M4e():t==="fa"?R4e():T4e()}),L4e=()=>"Update required",O4e=()=>"需要更新",I4e=()=>"نیازمند به‌روزرسانی",B4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O4e():t==="fa"?I4e():L4e()}),$4e=()=>"Waiting for the Git check",H4e=()=>"正在等待 Git 检查",P4e=()=>"در انتظار بررسی Git",F4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H4e():t==="fa"?P4e():$4e()}),U4e=()=>"Waiting for the local tool checks",q4e=()=>"正在等待本地工具检查",G4e=()=>"در انتظار بررسی ابزارهای محلی",V4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q4e():t==="fa"?G4e():U4e()}),W4e=()=>"What areas are you interested in?",K4e=()=>"你对哪些领域感兴趣?",Y4e=()=>"به چه حوزه‌هایی علاقه دارید؟",X4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K4e():t==="fa"?Y4e():W4e()}),Z4e=()=>"Your code, data, and experiment history stay on your machine.",Q4e=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",J4e=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",ewe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q4e():t==="fa"?J4e():Z4e()}),twe=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",nwe=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",rwe=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",swe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nwe():t==="fa"?rwe():twe()}),iwe=()=>"Changed here and on Overleaf — choose which copy to keep",awe=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",owe=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",lwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?awe():t==="fa"?owe():iwe()}),cwe=()=>"Create a token ↗",uwe=()=>"创建令牌 ↗",dwe=()=>"ساخت توکن ↗",fwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uwe():t==="fa"?dwe():cwe()}),hwe=()=>"Overleaf Git token",_we=()=>"Overleaf Git 令牌",pwe=()=>"توکن Git در Overleaf",mwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_we():t==="fa"?pwe():hwe()}),gwe=()=>"In step with Overleaf",vwe=()=>"已与 Overleaf 同步",bwe=()=>"با Overleaf همگام است",ZE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vwe():t==="fa"?bwe():gwe()}),xwe=()=>"The last sync did not finish.",ywe=()=>"上次同步未完成。",wwe=()=>"آخرین همگام‌سازی کامل نشد.",Swe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ywe():t==="fa"?wwe():xwe()}),kwe=()=>"Link and sync",Cwe=()=>"关联并同步",Ewe=()=>"پیوند و همگام‌سازی",Nwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cwe():t==="fa"?Ewe():kwe()}),zwe=()=>"My projects ↗",jwe=()=>"我的项目 ↗",Awe=()=>"پروژه‌های من ↗",Twe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jwe():t==="fa"?Awe():zwe()}),Mwe=()=>"Nothing could be synced.",Rwe=()=>"没有内容可以同步。",Dwe=()=>"هیچ موردی قابل همگام‌سازی نبود.",Lwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rwe():t==="fa"?Dwe():Mwe()}),Owe=()=>"Cancel",Iwe=()=>"取消",Bwe=()=>"لغو",$we=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iwe():t==="fa"?Bwe():Owe()}),Hwe=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",Pwe=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",Fwe=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",Uwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pwe():t==="fa"?Fwe():Hwe()}),qwe=()=>"Keep this copy",Gwe=()=>"保留此副本",Vwe=()=>"نگه داشتن این نسخه",Wwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gwe():t==="fa"?Vwe():qwe()}),Kwe=()=>"Open in Overleaf",Ywe=()=>"在 Overleaf 中打开",Xwe=()=>"باز کردن در Overleaf",Zwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ywe():t==="fa"?Xwe():Kwe()}),Qwe=()=>"Replace the Overleaf token",Jwe=()=>"替换 Overleaf 令牌",e5e=()=>"جایگزینی توکن Overleaf",V7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jwe():t==="fa"?e5e():Qwe()}),t5e=()=>"Sync now",n5e=()=>"立即同步",r5e=()=>"همگام‌سازی اکنون",s5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n5e():t==="fa"?r5e():t5e()}),i5e=()=>"Unlink",a5e=()=>"取消关联",o5e=()=>"قطع پیوند",l5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a5e():t==="fa"?o5e():i5e()}),c5e=()=>"Upload a copy as a new project ↗",u5e=()=>"上传副本作为新项目 ↗",d5e=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",f5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u5e():t==="fa"?d5e():c5e()}),h5e=()=>"Use Overleaf's",_5e=()=>"使用 Overleaf 的副本",p5e=()=>"استفاده از نسخهٔ Overleaf",m5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_5e():t==="fa"?p5e():h5e()}),g5e=()=>"This paper stays in step with Overleaf.",v5e=()=>"此论文将与 Overleaf 保持同步。",b5e=()=>"این مقاله با Overleaf همگام می‌ماند.",x5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v5e():t==="fa"?b5e():g5e()}),y5e=e=>`Pulled ${e==null?void 0:e.paths}.`,w5e=e=>`已拉取 ${e==null?void 0:e.paths}。`,S5e=e=>`${e==null?void 0:e.paths} دریافت شد.`,k5e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?w5e(e):t==="fa"?S5e(e):y5e(e)}),C5e=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,E5e=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,N5e=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,z5e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?E5e(e):t==="fa"?N5e(e):C5e(e)}),j5e=e=>`Pushed ${e==null?void 0:e.paths}.`,A5e=e=>`已推送 ${e==null?void 0:e.paths}。`,T5e=e=>`${e==null?void 0:e.paths} ارسال شد.`,M5e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?A5e(e):t==="fa"?T5e(e):j5e(e)}),R5e=()=>"Save the file first",D5e=()=>"请先保存文件",L5e=()=>"ابتدا فایل را ذخیره کنید",O5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D5e():t==="fa"?L5e():R5e()}),I5e=()=>"Save this file to sync it with Overleaf",B5e=()=>"保存此文件以与 Overleaf 同步",$5e=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",QE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B5e():t==="fa"?$5e():I5e()}),H5e=()=>"Save token",P5e=()=>"保存令牌",F5e=()=>"ذخیرهٔ توکن",U5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P5e():t==="fa"?F5e():H5e()}),q5e=()=>"Send this paper to Overleaf",G5e=()=>"将此论文发送到 Overleaf",V5e=()=>"ارسال مقاله به Overleaf",W5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G5e():t==="fa"?V5e():q5e()}),K5e=()=>"Overleaf sync failed",Y5e=()=>"Overleaf 同步失败",X5e=()=>"همگام‌سازی با Overleaf ناموفق بود",Z5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y5e():t==="fa"?X5e():K5e()}),Q5e=()=>"Syncing with Overleaf…",J5e=()=>"正在与 Overleaf 同步…",e3e=()=>"در حال همگام‌سازی با Overleaf…",t3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J5e():t==="fa"?e3e():Q5e()}),n3e=()=>"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.",r3e=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",s3e=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",i3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r3e():t==="fa"?s3e():n3e()}),a3e=()=>"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.",o3e=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",l3e=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",c3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o3e():t==="fa"?l3e():a3e()}),u3e=()=>"Toggle Plan mode for this chat",d3e=()=>"切换此聊天的计划模式",f3e=()=>"تغییر حالت طرح این گفت‌وگو",h3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d3e():t==="fa"?f3e():u3e()}),_3e=()=>"Accept and auto mode",p3e=()=>"接受并使用自动模式",m3e=()=>"پذیرش و حالت خودکار",g3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p3e():t==="fa"?m3e():_3e()}),v3e=()=>"Accept and bypass all",b3e=()=>"接受并跳过所有审批",x3e=()=>"پذیرش و عبور از همهٔ تأییدها",y3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b3e():t==="fa"?x3e():v3e()}),w3e=()=>"Accept plan",S3e=()=>"接受计划",k3e=()=>"پذیرش طرح",C3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S3e():t==="fa"?k3e():w3e()}),E3e=e=>`${e==null?void 0:e.agent} proposed a plan`,N3e=e=>`${e==null?void 0:e.agent} 提出了一个计划`,z3e=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,j3e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?N3e(e):t==="fa"?z3e(e):E3e(e)}),A3e=e=>`${e==null?void 0:e.agent} is ready to proceed`,T3e=e=>`${e==null?void 0:e.agent} 已准备好继续`,M3e=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,R3e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?T3e(e):t==="fa"?M3e(e):A3e(e)}),D3e=()=>"Back",L3e=()=>"返回",O3e=()=>"بازگشت",I3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L3e():t==="fa"?O3e():D3e()}),B3e=()=>"More approval options",$3e=()=>"更多批准选项",H3e=()=>"گزینه‌های تأیید بیشتر",P3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$3e():t==="fa"?H3e():B3e()}),F3e=()=>"Open plan",U3e=()=>"打开计划",q3e=()=>"باز کردن طرح",G3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U3e():t==="fa"?q3e():F3e()}),V3e=()=>"Reject",W3e=()=>"拒绝",K3e=()=>"رد کردن",Y3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W3e():t==="fa"?K3e():V3e()}),X3e=()=>"Revise",Z3e=()=>"修改",Q3e=()=>"بازنگری",J3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z3e():t==="fa"?Q3e():X3e()}),e6e=()=>"Revise…",t6e=()=>"修改…",n6e=()=>"بازنگری…",r6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t6e():t==="fa"?n6e():e6e()}),s6e=()=>"What should change? (optional)",i6e=()=>"需要更改什么?(可选)",a6e=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",o6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i6e():t==="fa"?a6e():s6e()}),l6e=e=>`${e==null?void 0:e.count} active`,c6e=e=>`${e==null?void 0:e.count} 个活跃`,u6e=e=>`${e==null?void 0:e.count} فعال`,d6e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?c6e(e):t==="fa"?u6e(e):l6e(e)}),f6e=e=>`${e==null?void 0:e.count} total agents`,h6e=e=>`共 ${e==null?void 0:e.count} 个智能体`,_6e=e=>`در مجموع ${e==null?void 0:e.count} عامل`,p6e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?h6e(e):t==="fa"?_6e(e):f6e(e)}),m6e=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,g6e=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,v6e=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,b6e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?g6e(e):t==="fa"?v6e(e):m6e(e)}),x6e=()=>"Agents",y6e=()=>"智能体",w6e=()=>"عامل‌ها",W7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y6e():t==="fa"?w6e():x6e()}),S6e=()=>"arXiv paper ID:",k6e=()=>"arXiv 论文 ID:",C6e=()=>"شناسهٔ مقالهٔ arXiv:",E6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k6e():t==="fa"?C6e():S6e()}),N6e=()=>"Cancel",z6e=()=>"取消",j6e=()=>"لغو",A6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z6e():t==="fa"?j6e():N6e()}),T6e=()=>"Created",M6e=()=>"创建时间",R6e=()=>"ایجادشده",D6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M6e():t==="fa"?R6e():T6e()}),L6e=()=>"Delete project?",O6e=()=>"删除项目?",I6e=()=>"پروژه حذف شود؟",B6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O6e():t==="fa"?I6e():L6e()}),$6e=()=>"Delete project",H6e=()=>"删除项目",P6e=()=>"حذف پروژه",F6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H6e():t==="fa"?P6e():$6e()}),U6e=()=>"Deleting…",q6e=()=>"正在删除…",G6e=()=>"در حال حذف…",V6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q6e():t==="fa"?G6e():U6e()}),W6e=()=>"Experiments",K6e=()=>"实验",Y6e=()=>"آزمایش‌ها",K7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K6e():t==="fa"?Y6e():W6e()}),X6e=()=>"The local folder and linked GitHub repository are kept.",Z6e=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",Q6e=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",J6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z6e():t==="fa"?Q6e():X6e()}),e7e=()=>"The local folder is kept.",t7e=()=>"本地文件夹会保留。",n7e=()=>"پوشهٔ محلی نگه داشته می‌شود.",r7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t7e():t==="fa"?n7e():e7e()}),s7e=()=>"New project",i7e=()=>"新建项目",a7e=()=>"پروژهٔ جدید",JE=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i7e():t==="fa"?a7e():s7e()}),o7e=()=>"No projects yet — create one to get started.",l7e=()=>"尚无项目——新建一个即可开始。",c7e=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",u7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l7e():t==="fa"?c7e():o7e()}),d7e=()=>"Project",f7e=()=>"项目",h7e=()=>"پروژه",_7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f7e():t==="fa"?h7e():d7e()}),p7e=()=>"Projects",m7e=()=>"项目",g7e=()=>"پروژه‌ها",v7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m7e():t==="fa"?g7e():p7e()}),b7e=()=>"Repository",x7e=()=>"仓库",y7e=()=>"مخزن",Y7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x7e():t==="fa"?y7e():b7e()}),w7e=()=>"Idle",S7e=()=>"空闲",k7e=()=>"بیکار",C7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S7e():t==="fa"?k7e():w7e()}),E7e=()=>"Local",N7e=()=>"本地",z7e=()=>"محلی",eN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N7e():t==="fa"?z7e():E7e()}),j7e=()=>"1 total agent",A7e=()=>"共 1 个智能体",T7e=()=>"در مجموع ۱ عامل",M7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A7e():t==="fa"?T7e():j7e()}),R7e=e=>`${e==null?void 0:e.count} running`,D7e=e=>`${e==null?void 0:e.count} 个运行中`,L7e=e=>`${e==null?void 0:e.count} در حال اجرا`,O7e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?D7e(e):t==="fa"?L7e(e):R7e(e)}),I7e=e=>`${e==null?void 0:e.count} total`,B7e=e=>`共 ${e==null?void 0:e.count} 个`,$7e=e=>`در مجموع ${e==null?void 0:e.count}`,X7=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?B7e(e):t==="fa"?$7e(e):I7e(e)}),H7e=e=>`${e==null?void 0:e.value}d`,P7e=e=>`${e==null?void 0:e.value} 天`,F7e=e=>`${e==null?void 0:e.value}ر`,U7e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?P7e(e):t==="fa"?F7e(e):H7e(e)}),q7e=e=>`${e==null?void 0:e.value}h`,G7e=e=>`${e==null?void 0:e.value} 小时`,V7e=e=>`${e==null?void 0:e.value}س`,W7e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?G7e(e):t==="fa"?V7e(e):q7e(e)}),K7e=e=>`${e==null?void 0:e.value}m`,Y7e=e=>`${e==null?void 0:e.value} 分钟`,X7e=e=>`${e==null?void 0:e.value}د`,Z7e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Y7e(e):t==="fa"?X7e(e):K7e(e)}),Q7e=()=>"now",J7e=()=>"现在",eSe=()=>"اکنون",tSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J7e():t==="fa"?eSe():Q7e()}),nSe=()=>"Installing the compatible binary. This may take a few minutes.",rSe=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",sSe=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",iSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rSe():t==="fa"?sSe():nSe()}),aSe=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,oSe=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,lSe=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,cSe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oSe(e):t==="fa"?lSe(e):aSe(e)}),uSe=()=>"Check again",dSe=()=>"再次检查",fSe=()=>"بررسی دوباره",Z7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dSe():t==="fa"?fSe():uSe()}),hSe=()=>"Closing…",_Se=()=>"正在关闭…",pSe=()=>"در حال بستن…",mSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Se():t==="fa"?pSe():hSe()}),gSe=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,vSe=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,bSe=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,xSe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vSe(e):t==="fa"?bSe(e):gSe(e)}),ySe=()=>"Preparing your remote workspace…",wSe=()=>"正在准备远程工作区…",SSe=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",kSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wSe():t==="fa"?SSe():ySe()}),CSe=e=>`Connecting to ${e==null?void 0:e.host}`,ESe=e=>`正在连接到 ${e==null?void 0:e.host}`,NSe=e=>`در حال اتصال به ${e==null?void 0:e.host}`,zSe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ESe(e):t==="fa"?NSe(e):CSe(e)}),jSe=()=>"Close remote host picker",ASe=()=>"关闭远程主机选择器",TSe=()=>"بستن انتخاب‌گر میزبان راه‌دور",MSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ASe():t==="fa"?TSe():jSe()}),RSe=()=>"Choose a configured SSH host.",DSe=()=>"选择已配置的 SSH 主机。",LSe=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",OSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DSe():t==="fa"?LSe():RSe()}),ISe=()=>"Connect to remote",BSe=()=>"连接到远程主机",$Se=()=>"اتصال به میزبان راه‌دور",tN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BSe():t==="fa"?$Se():ISe()}),HSe=()=>"Disconnect",PSe=()=>"断开连接",FSe=()=>"قطع اتصال",Hb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PSe():t==="fa"?FSe():HSe()}),USe=()=>"Your remote work is still running. Reconnect when you’re ready.",qSe=()=>"你的远程工作仍在运行。准备好后可以重新连接。",GSe=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",VSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qSe():t==="fa"?GSe():USe()}),WSe=e=>`Disconnected from ${e==null?void 0:e.host}`,KSe=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,YSe=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,nN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KSe(e):t==="fa"?YSe(e):WSe(e)}),XSe=e=>`Could not connect to ${e==null?void 0:e.host}`,ZSe=e=>`无法连接到 ${e==null?void 0:e.host}`,QSe=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,JSe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZSe(e):t==="fa"?QSe(e):XSe(e)}),eke=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",tke=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",nke=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",rke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tke():t==="fa"?nke():eke()}),ske=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",ike=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",ake=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",oke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ike():t==="fa"?ake():ske()}),lke=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,cke=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,uke=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,dke=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cke(e):t==="fa"?uke(e):lke(e)}),fke=()=>"OpenResearch binary",hke=()=>"OpenResearch 二进制文件",_ke=()=>"فایل اجرایی OpenResearch",pke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hke():t==="fa"?_ke():fke()}),mke=()=>"Repository cache",gke=()=>"仓库缓存",vke=()=>"حافظهٔ نهان مخزن",bke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gke():t==="fa"?vke():mke()}),xke=()=>"OpenResearch Database",yke=()=>"OpenResearch 数据库",wke=()=>"پایگاه دادهٔ OpenResearch",Ske=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yke():t==="fa"?wke():xke()}),kke=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",Cke=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",Eke=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",Nke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cke():t==="fa"?Eke():kke()}),zke=()=>"Install OpenResearch?",jke=()=>"安装 OpenResearch?",Ake=()=>"OpenResearch نصب شود؟",Tke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jke():t==="fa"?Ake():zke()}),Mke=()=>"Installing…",Rke=()=>"正在安装…",Dke=()=>"در حال نصب…",Lke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rke():t==="fa"?Dke():Mke()}),Oke=()=>"No matching SSH hosts",Ike=()=>"没有匹配的 SSH 主机",Bke=()=>"میزبان SSH منطبقی پیدا نشد",$ke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ike():t==="fa"?Bke():Oke()}),Hke=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,Pke=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,Fke=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,Uke=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Pke(e):t==="fa"?Fke(e):Hke(e)}),qke=()=>"Open remote",Gke=()=>"打开远程工作区",Vke=()=>"باز کردن راه‌دور",Wke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gke():t==="fa"?Vke():qke()}),Kke=()=>"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.",Yke=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",Xke=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",Zke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yke():t==="fa"?Xke():Kke()}),Qke=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",Jke=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",e8e=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",t8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jke():t==="fa"?e8e():Qke()}),n8e=()=>"Preparing remote workspace…",r8e=()=>"正在准备远程工作区…",s8e=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",i8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r8e():t==="fa"?s8e():n8e()}),a8e=()=>"Reconnect",o8e=()=>"重新连接",l8e=()=>"اتصال دوباره",Q7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o8e():t==="fa"?l8e():a8e()}),c8e=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",u8e=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",d8e=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",f8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u8e():t==="fa"?d8e():c8e()}),h8e=e=>`Reconnecting to ${e==null?void 0:e.host}`,_8e=e=>`正在重新连接到 ${e==null?void 0:e.host}`,p8e=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,m8e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_8e(e):t==="fa"?p8e(e):h8e(e)}),g8e=()=>"Search SSH hosts",v8e=()=>"搜索 SSH 主机",b8e=()=>"جستجوی میزبان‌های SSH",J7=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v8e():t==="fa"?b8e():g8e()}),x8e=e=>`SSH: ${e==null?void 0:e.host}`,y8e=e=>`SSH:${e==null?void 0:e.host}`,w8e=e=>`SSH: ${e==null?void 0:e.host}`,uv=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?y8e(e):t==="fa"?w8e(e):x8e(e)}),S8e=()=>"Start a new OpenResearch host",k8e=()=>"启动新的 OpenResearch 主机",C8e=()=>"راه‌اندازی میزبان جدید OpenResearch",E8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k8e():t==="fa"?C8e():S8e()}),N8e=e=>`End ${e==null?void 0:e.count} pending approvals.`,z8e=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,j8e=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,A8e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?z8e(e):t==="fa"?j8e(e):N8e(e)}),T8e=()=>"Stop OpenResearch",M8e=()=>"停止 OpenResearch",R8e=()=>"توقف OpenResearch",D8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M8e():t==="fa"?R8e():T8e()}),L8e=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,O8e=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,I8e=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,B8e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?O8e(e):t==="fa"?I8e(e):L8e(e)}),$8e=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,H8e=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,P8e=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,F8e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?H8e(e):t==="fa"?P8e(e):$8e(e)}),U8e=()=>"Stop OpenResearch on host",q8e=()=>"停止主机上的 OpenResearch",G8e=()=>"توقف OpenResearch روی میزبان",rN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q8e():t==="fa"?G8e():U8e()}),V8e=()=>"This will also:",W8e=()=>"这还将:",K8e=()=>"این کار همچنین:",Y8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W8e():t==="fa"?K8e():V8e()}),X8e=()=>"End 1 pending approval.",Z8e=()=>"结束 1 个待审批请求。",Q8e=()=>"۱ تأیید در انتظار را پایان می‌دهد.",J8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z8e():t==="fa"?Q8e():X8e()}),eCe=()=>"Leave 1 submitted experiment running.",tCe=()=>"让 1 个已提交实验继续运行。",nCe=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",rCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tCe():t==="fa"?nCe():eCe()}),sCe=()=>"Disconnect 1 other client.",iCe=()=>"断开 1 个其他客户端。",aCe=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",oCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iCe():t==="fa"?aCe():sCe()}),lCe=()=>"Keep 1 queued message saved.",cCe=()=>"保留 1 条排队消息。",uCe=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",dCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cCe():t==="fa"?uCe():lCe()}),fCe=()=>"Interrupt 1 active agent turn.",hCe=()=>"中断 1 个活动代理任务。",_Ce=()=>"۱ نوبت فعال عامل را قطع می‌کند.",pCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hCe():t==="fa"?_Ce():fCe()}),mCe=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,gCe=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,vCe=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,bCe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gCe(e):t==="fa"?vCe(e):mCe(e)}),xCe=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,yCe=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,wCe=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,SCe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yCe(e):t==="fa"?wCe(e):xCe(e)}),kCe=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,CCe=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,ECe=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,NCe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?CCe(e):t==="fa"?ECe(e):kCe(e)}),zCe=()=>"Stopping host…",jCe=()=>"正在停止主机…",ACe=()=>"در حال توقف میزبان…",TCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jCe():t==="fa"?ACe():zCe()}),MCe=()=>"Update",RCe=()=>"更新",DCe=()=>"به‌روزرسانی",eS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RCe():t==="fa"?DCe():MCe()}),LCe=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,OCe=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,ICe=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,BCe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OCe(e):t==="fa"?ICe(e):LCe(e)}),$Ce=()=>"Update OpenResearch?",HCe=()=>"更新 OpenResearch?",PCe=()=>"OpenResearch به‌روزرسانی شود؟",FCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HCe():t==="fa"?PCe():$Ce()}),UCe=()=>"Updating…",qCe=()=>"正在更新…",GCe=()=>"در حال به‌روزرسانی…",VCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qCe():t==="fa"?GCe():UCe()}),WCe=()=>"Disable syncing",KCe=()=>"关闭同步",YCe=()=>"غیرفعال کردن همگام‌سازی",XCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KCe():t==="fa"?YCe():WCe()}),ZCe=()=>"Enable GitHub syncing",QCe=()=>"启用 GitHub 同步",JCe=()=>"فعال‌سازی همگام‌سازی GitHub",e9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QCe():t==="fa"?JCe():ZCe()}),t9e=()=>"Enabling…",n9e=()=>"正在启用…",r9e=()=>"در حال فعال‌سازی…",s9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n9e():t==="fa"?r9e():t9e()}),i9e=()=>"Updating…",a9e=()=>"正在更新…",o9e=()=>"در حال به‌روزرسانی…",l9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a9e():t==="fa"?o9e():i9e()}),c9e=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,u9e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,d9e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,f9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?u9e(e):t==="fa"?d9e(e):c9e(e)}),h9e=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,_9e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,p9e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,m9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_9e(e):t==="fa"?p9e(e):h9e(e)}),g9e=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`,v9e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,b9e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,x9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?v9e(e):t==="fa"?b9e(e):g9e(e)}),y9e=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,w9e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,S9e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,k9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?w9e(e):t==="fa"?S9e(e):y9e(e)}),C9e=()=>"CLI is retrying…",E9e=()=>"CLI 正在重试…",N9e=()=>"CLI در حال تلاش دوباره است…",z9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E9e():t==="fa"?N9e():C9e()}),j9e=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,A9e=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,T9e=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,M9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?A9e(e):t==="fa"?T9e(e):j9e(e)}),R9e=()=>"Sending again…",D9e=()=>"正在重新发送…",L9e=()=>"در حال ارسال دوباره…",O9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D9e():t==="fa"?L9e():R9e()}),I9e=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,B9e=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,$9e=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,H9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?B9e(e):t==="fa"?$9e(e):I9e(e)}),P9e=()=>"Retrying…",F9e=()=>"正在重试…",U9e=()=>"در حال تلاش دوباره…",sN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F9e():t==="fa"?U9e():P9e()}),q9e=()=>"Default speed",G9e=()=>"默认速度",V9e=()=>"سرعت پیش‌فرض",W9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G9e():t==="fa"?V9e():q9e()}),K9e=()=>"Standard",Y9e=()=>"标准",X9e=()=>"استاندارد",Z9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y9e():t==="fa"?X9e():K9e()}),Q9e=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,J9e=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,eEe=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,tEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?J9e(e):t==="fa"?eEe(e):Q9e(e)}),nEe=()=>"Appearance",rEe=()=>"外观",sEe=()=>"ظاهر",iEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rEe():t==="fa"?sEe():nEe()}),aEe=()=>"Check",oEe=()=>"检查",lEe=()=>"بررسی",cEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oEe():t==="fa"?lEe():aEe()}),uEe=()=>"Check again",dEe=()=>"再次检查",fEe=()=>"بررسی دوباره",hEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dEe():t==="fa"?fEe():uEe()}),_Ee=()=>"Check for updates",pEe=()=>"检查更新",mEe=()=>"بررسی به‌روزرسانی",gEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pEe():t==="fa"?mEe():_Ee()}),vEe=()=>"Check now",bEe=()=>"立即检查",xEe=()=>"اکنون بررسی کن",yEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bEe():t==="fa"?xEe():vEe()}),wEe=()=>"Check setup",SEe=()=>"检查设置",kEe=()=>"بررسی راه‌اندازی",CEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SEe():t==="fa"?kEe():wEe()}),EEe=()=>"orx checks a few times a day on its own.",NEe=()=>"orx 每天会自动检查几次。",zEe=()=>"orx روزی چند بار خودکار بررسی می‌کند.",jEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NEe():t==="fa"?zEe():EEe()}),AEe=()=>"Choose a flavor",TEe=()=>"选择配置",MEe=()=>"انتخاب پیکربندی",REe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TEe():t==="fa"?MEe():AEe()}),DEe=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,LEe=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,OEe=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,IEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LEe(e):t==="fa"?OEe(e):DEe(e)}),BEe=()=>"clean",$Ee=()=>"无更改",HEe=()=>"بدون تغییر",PEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ee():t==="fa"?HEe():BEe()}),FEe=e=>`Already linked at ${e==null?void 0:e.link}.`,UEe=e=>`已链接到 ${e==null?void 0:e.link}。`,qEe=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,GEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UEe(e):t==="fa"?qEe(e):FEe(e)}),VEe=e=>`Linked ${e==null?void 0:e.link}.`,WEe=e=>`已链接 ${e==null?void 0:e.link}。`,KEe=e=>`${e==null?void 0:e.link} پیوند شد.`,YEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WEe(e):t==="fa"?KEe(e):VEe(e)}),XEe=()=>"Connect",ZEe=()=>"连接",QEe=()=>"اتصال",Rx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZEe():t==="fa"?QEe():XEe()}),JEe=()=>"Connected via GitHub CLI",eNe=()=>"已通过 GitHub CLI 连接",tNe=()=>"از طریق GitHub CLI متصل است",iN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eNe():t==="fa"?tNe():JEe()}),nNe=()=>"Connecting…",rNe=()=>"正在连接…",sNe=()=>"در حال اتصال…",aN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rNe():t==="fa"?sNe():nNe()}),iNe=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",aNe=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",oNe=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",lNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aNe():t==="fa"?oNe():iNe()}),cNe=()=>"the current project",uNe=()=>"当前项目",dNe=()=>"پروژهٔ فعلی",fNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uNe():t==="fa"?dNe():cNe()}),hNe=e=>`${e==null?void 0:e.value} (custom)`,_Ne=e=>`${e==null?void 0:e.value}(自定义)`,pNe=e=>`${e==null?void 0:e.value} (سفارشی)`,mNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ne(e):t==="fa"?pNe(e):hNe(e)}),gNe=()=>"detached",vNe=()=>"分离头指针",bNe=()=>"جدا از شاخه",oN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vNe():t==="fa"?bNe():gNe()}),xNe=()=>"Disconnected",yNe=()=>"已断开连接",wNe=()=>"قطع اتصال",lN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yNe():t==="fa"?wNe():xNe()}),SNe=()=>"Environment broken",kNe=()=>"环境损坏",CNe=()=>"محیط خراب است",ENe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kNe():t==="fa"?CNe():SNe()}),NNe=()=>"Environment not built",zNe=()=>"环境尚未构建",jNe=()=>"محیط ساخته نشده است",ANe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zNe():t==="fa"?jNe():NNe()}),TNe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,MNe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,RNe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,DNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MNe(e):t==="fa"?RNe(e):TNe(e)}),LNe=()=>"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.",ONe=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",INe=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",BNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ONe():t==="fa"?INe():LNe()}),$Ne=()=>"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.",HNe=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",PNe=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",FNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HNe():t==="fa"?PNe():$Ne()}),UNe=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",qNe=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",GNe=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",VNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qNe():t==="fa"?GNe():UNe()}),WNe=()=>"has changes",KNe=()=>"有更改",YNe=()=>"دارای تغییر",XNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KNe():t==="fa"?YNe():WNe()}),ZNe=()=>"~/.cache/huggingface/token (hf auth login)",QNe=()=>"~/.cache/huggingface/token(hf auth login)",JNe=()=>"~/.cache/huggingface/token (hf auth login)",eze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QNe():t==="fa"?JNe():ZNe()}),tze=()=>"HF_TOKEN environment variable",nze=()=>"HF_TOKEN 环境变量",rze=()=>"متغیر محیطی HF_TOKEN",sze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nze():t==="fa"?rze():tze()}),ize=()=>"~/.openresearch/env",aze=()=>"~/.openresearch/env",oze=()=>"~/.openresearch/env",lze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aze():t==="fa"?oze():ize()}),cze=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}.`,uze=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,dze=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,fze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uze(e):t==="fa"?dze(e):cze(e)}),hze=()=>"Install",_ze=()=>"安装",pze=()=>"نصب",mze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ze():t==="fa"?pze():hze()}),gze=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.`,vze=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,bze=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,xze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vze(e):t==="fa"?bze(e):gze(e)}),yze=e=>`Install the ${e==null?void 0:e.command} command`,wze=e=>`安装 ${e==null?void 0:e.command} 命令`,Sze=e=>`نصب فرمان ${e==null?void 0:e.command}`,kze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wze(e):t==="fa"?Sze(e):yze(e)}),Cze=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",Eze=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",Nze=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",zze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eze():t==="fa"?Nze():Cze()}),jze=()=>"Install the new release now instead of waiting for the background update.",Aze=()=>"立即安装新版本,无需等待后台更新。",Tze=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",Mze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aze():t==="fa"?Tze():jze()}),Rze=()=>"kubectl default",Dze=()=>"kubectl 默认值",Lze=()=>"پیش‌فرض kubectl",Oze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dze():t==="fa"?Lze():Rze()}),Ize=e=>`kubectl default (${e==null?void 0:e.context})`,Bze=e=>`kubectl 默认值(${e==null?void 0:e.context})`,$ze=e=>`پیش‌فرض kubectl (${e==null?void 0:e.context})`,Hze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Bze(e):t==="fa"?$ze(e):Ize(e)}),Pze=()=>"Language",Fze=()=>"语言",Uze=()=>"زبان",qze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fze():t==="fa"?Uze():Pze()}),Gze=e=>`Not signed in. Run ${e==null?void 0:e.command} in a terminal to connect your OpenResearch account.`,Vze=e=>`尚未登录。请在终端中运行 ${e==null?void 0:e.command} 以连接你的 OpenResearch 账户。`,Wze=e=>`وارد نشده‌اید. برای اتصال حساب OpenResearch خود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,Kze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Vze(e):t==="fa"?Wze(e):Gze(e)}),Yze=()=>"Make default",Xze=()=>"设为默认值",Zze=()=>"پیش‌فرض شود",Qze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xze():t==="fa"?Zze():Yze()}),Jze=e=>`The manifest must define one Job. orx injects the run script, environment, labels, and timeout. Use ${e==null?void 0:e.placeholder} in resource names, or override the default path with ${e==null?void 0:e.command}.`,eje=e=>`清单必须定义一个 Job。orx 会注入运行脚本、环境、标签和超时设置。请在资源名称中使用 ${e==null?void 0:e.placeholder},或通过 ${e==null?void 0:e.command} 覆盖默认路径。`,tje=e=>`مانیفست باید یک Job تعریف کند. orx اسکریپت اجرا، محیط، برچسب‌ها و مهلت زمانی را تزریق می‌کند. از ${e==null?void 0:e.placeholder} در نام منابع استفاده کنید، یا مسیر پیش‌فرض را با ${e==null?void 0:e.command} تغییر دهید.`,nje=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eje(e):t==="fa"?tje(e):Jze(e)}),rje=()=>"Provisioned (Modal import failing)",sje=()=>"已预配(Modal 导入失败)",ije=()=>"آماده شده (درون‌ریزی Modal ناموفق است)",aje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sje():t==="fa"?ije():rje()}),oje=()=>"MODAL_TOKEN_ID environment variable",lje=()=>"MODAL_TOKEN_ID 环境变量",cje=()=>"متغیر محیطی MODAL_TOKEN_ID",uje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lje():t==="fa"?cje():oje()}),dje=()=>"~/.modal.toml (modal token new)",fje=()=>"~/.modal.toml(modal token new)",hje=()=>"~/.modal.toml (modal token new)",_je=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fje():t==="fa"?hje():dje()}),pje=e=>`No Modal token found. Run ${e==null?void 0:e.command}, or add ${e==null?void 0:e.id} and ${e==null?void 0:e.secret} in the Environment tab.`,mje=e=>`未找到 Modal 令牌。请运行 ${e==null?void 0:e.command},或在“环境”标签页中添加 ${e==null?void 0:e.id} 和 ${e==null?void 0:e.secret}。`,gje=e=>`توکن Modal پیدا نشد. ${e==null?void 0:e.command} را اجرا کنید، یا ${e==null?void 0:e.id} و ${e==null?void 0:e.secret} را در زبانهٔ محیط اضافه کنید.`,vje=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mje(e):t==="fa"?gje(e):pje(e)}),bje=()=>"~/.openresearch/env",xje=()=>"~/.openresearch/env",yje=()=>"~/.openresearch/env",wje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xje():t==="fa"?yje():bje()}),Sje=e=>`${e==null?void 0:e.count} available — ${e==null?void 0:e.models}`,kje=e=>`${e==null?void 0:e.count} 个可用 — ${e==null?void 0:e.models}`,Cje=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,Eje=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kje(e):t==="fa"?Cje(e):Sje(e)}),Nje=e=>`Needs ${e==null?void 0:e.tool}`,zje=e=>`需要 ${e==null?void 0:e.tool}`,jje=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,Aje=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zje(e):t==="fa"?jje(e):Nje(e)}),Tje=()=>"Needs tools",Mje=()=>"缺少工具",Rje=()=>"به ابزارها نیاز دارد",Dje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mje():t==="fa"?Rje():Tje()}),Lje=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,Oje=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,Ije=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,Bje=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Oje(e):t==="fa"?Ije(e):Lje(e)}),$je=()=>"New runs use SSH; choose a host when launching.",Hje=()=>"新运行将使用 SSH;启动时请选择主机。",Pje=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",Fje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hje():t==="fa"?Pje():$je()}),Uje=()=>"New token",qje=()=>"新令牌",Gje=()=>"توکن جدید",Vje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qje():t==="fa"?Gje():Uje()}),Wje=()=>"No default flavor",Kje=()=>"不设默认配置",Yje=()=>"بدون پیکربندی پیش‌فرض",Xje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kje():t==="fa"?Yje():Wje()}),Zje=()=>"none",Qje=()=>"无",Jje=()=>"هیچ‌کدام",Dx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qje():t==="fa"?Jje():Zje()}),eAe=()=>"Not built yet",tAe=()=>"尚未构建",nAe=()=>"هنوز ساخته نشده",rAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tAe():t==="fa"?nAe():eAe()}),sAe=()=>"Not connected",iAe=()=>"未连接",aAe=()=>"متصل نیست",cN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iAe():t==="fa"?aAe():sAe()}),oAe=()=>"not found on PATH",lAe=()=>"在 PATH 中未找到",cAe=()=>"در PATH پیدا نشد",uAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lAe():t==="fa"?cAe():oAe()}),dAe=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,fAe=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,hAe=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,_Ae=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fAe(e):t==="fa"?hAe(e):dAe(e)}),pAe=()=>"not initialized",mAe=()=>"尚未初始化",gAe=()=>"راه‌اندازی نشده",vAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mAe():t==="fa"?gAe():pAe()}),bAe=()=>"Not set",xAe=()=>"未设置",yAe=()=>"تنظیم نشده",wAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xAe():t==="fa"?yAe():bAe()}),SAe=()=>"OAuth (subscription login)",kAe=()=>"OAuth(订阅登录)",CAe=()=>"OAuth (ورود با اشتراک)",EAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kAe():t==="fa"?CAe():SAe()}),NAe=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.`,zAe=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,jAe=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,AAe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zAe(e):t==="fa"?jAe(e):NAe(e)}),TAe=()=>"Account",MAe=()=>"账户",RAe=()=>"حساب",Lx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MAe():t==="fa"?RAe():TAe()}),DAe=()=>"Add one with",LAe=()=>"使用以下命令添加:",OAe=()=>"یکی با این فرمان اضافه کنید:",IAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LAe():t==="fa"?OAe():DAe()}),BAe=()=>"Add variable",$Ae=()=>"添加变量",HAe=()=>"افزودن متغیر",PAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ae():t==="fa"?HAe():BAe()}),FAe=()=>"Agent models",UAe=()=>"智能体模型",qAe=()=>"مدل‌های عامل",GAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UAe():t==="fa"?qAe():FAe()}),VAe=()=>"Anonymous usage analytics",WAe=()=>"匿名使用情况分析",KAe=()=>"تحلیل ناشناس استفاده",tS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WAe():t==="fa"?KAe():VAe()}),YAe=()=>"Auth",XAe=()=>"身份验证",ZAe=()=>"احراز هویت",QAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XAe():t==="fa"?ZAe():YAe()}),JAe=()=>"Authentication",eTe=()=>"身份验证",tTe=()=>"احراز هویت",nTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eTe():t==="fa"?tTe():JAe()}),rTe=()=>"Back to Compute",sTe=()=>"返回算力设置",iTe=()=>"بازگشت به رایانش",uN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sTe():t==="fa"?iTe():rTe()}),aTe=()=>"Backend",oTe=()=>"后端",lTe=()=>"بک‌اند",cTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oTe():t==="fa"?lTe():aTe()}),uTe=()=>"Baseline",dTe=()=>"基线",fTe=()=>"خط مبنا",hTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dTe():t==="fa"?fTe():uTe()}),_Te=()=>"Binary",pTe=()=>"可执行文件",mTe=()=>"فایل اجرایی",gTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pTe():t==="fa"?mTe():_Te()}),vTe=()=>"Cancel",bTe=()=>"取消",xTe=()=>"لغو",Rh=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bTe():t==="fa"?xTe():vTe()}),yTe=()=>"Cancel new variable",wTe=()=>"取消新变量",STe=()=>"لغو متغیر جدید",kTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wTe():t==="fa"?STe():yTe()}),CTe=()=>"Checking compute targets…",ETe=()=>"正在检查算力目标…",NTe=()=>"در حال بررسی مقصدهای رایانشی…",zTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ETe():t==="fa"?NTe():CTe()}),jTe=()=>"Checking credentials…",ATe=()=>"正在检查凭据…",TTe=()=>"در حال بررسی اطلاعات ورود…",MTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ATe():t==="fa"?TTe():jTe()}),RTe=()=>"Checking kubectl…",DTe=()=>"正在检查 kubectl…",LTe=()=>"در حال بررسی kubectl…",OTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DTe():t==="fa"?LTe():RTe()}),ITe=()=>"Checking Modal…",BTe=()=>"正在检查 Modal…",$Te=()=>"در حال بررسی Modal…",HTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BTe():t==="fa"?$Te():ITe()}),PTe=()=>"Choose a preset flavor",FTe=()=>"选择预设规格",UTe=()=>"یک پیکربندی آماده انتخاب کنید",nS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FTe():t==="fa"?UTe():PTe()}),qTe=()=>"Cluster",GTe=()=>"集群",VTe=()=>"خوشه",WTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GTe():t==="fa"?VTe():qTe()}),KTe=()=>"cluster default",YTe=()=>"集群默认值",XTe=()=>"پیش‌فرض خوشه",rS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YTe():t==="fa"?XTe():KTe()}),ZTe=()=>"cluster default (e.g. 4h, 30m)",QTe=()=>"集群默认值(例如 4h、30m)",JTe=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",eMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QTe():t==="fa"?JTe():ZTe()}),tMe=()=>"Cluster unreachable",nMe=()=>"无法连接集群",rMe=()=>"خوشه در دسترس نیست",sMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nMe():t==="fa"?rMe():tMe()}),iMe=()=>"Compute",aMe=()=>"算力",oMe=()=>"رایانش",dN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aMe():t==="fa"?oMe():iMe()}),lMe=()=>"Connect compute backends and choose where new runs execute.",cMe=()=>"连接算力后端,并选择新运行的执行位置。",uMe=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",dMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cMe():t==="fa"?uMe():lMe()}),fMe=()=>"Connected",hMe=()=>"已连接",_Me=()=>"متصل",Ox=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hMe():t==="fa"?_Me():fMe()}),pMe=()=>"Context",mMe=()=>"上下文",gMe=()=>"زمینه",vMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mMe():t==="fa"?gMe():pMe()}),bMe=()=>"Current",xMe=()=>"当前",yMe=()=>"فعلی",wMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xMe():t==="fa"?yMe():bMe()}),SMe=()=>"Currently off:",kMe=()=>"当前已关闭:",CMe=()=>"اکنون خاموش است:",EMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kMe():t==="fa"?CMe():SMe()}),NMe=()=>"Custom flavor",zMe=()=>"自定义规格",jMe=()=>"پیکربندی سفارشی",AMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zMe():t==="fa"?jMe():NMe()}),TMe=()=>"Custom flavor…",MMe=()=>"自定义规格…",RMe=()=>"پیکربندی سفارشی…",DMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MMe():t==="fa"?RMe():TMe()}),LMe=()=>"Data directory",OMe=()=>"数据目录",IMe=()=>"پوشهٔ داده",BMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OMe():t==="fa"?IMe():LMe()}),$Me=()=>"default",HMe=()=>"默认",PMe=()=>"پیش‌فرض",FMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HMe():t==="fa"?PMe():$Me()}),UMe=()=>"Default",qMe=()=>"默认",GMe=()=>"پیش‌فرض",fN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qMe():t==="fa"?GMe():UMe()}),VMe=()=>"Default destination",WMe=()=>"默认目标",KMe=()=>"مقصد پیش‌فرض",YMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WMe():t==="fa"?KMe():VMe()}),XMe=()=>"Detecting hardware…",ZMe=()=>"正在检测硬件…",QMe=()=>"در حال شناسایی سخت‌افزار…",JMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZMe():t==="fa"?QMe():XMe()}),eRe=()=>"Detecting harnesses…",tRe=()=>"正在检测智能体工具…",nRe=()=>"در حال شناسایی ابزارهای عامل…",rRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tRe():t==="fa"?nRe():eRe()}),sRe=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",iRe=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",aRe=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",oRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iRe():t==="fa"?aRe():sRe()}),lRe=()=>"Effective URL",cRe=()=>"实际使用的网址",uRe=()=>"نشانی مؤثر",dRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cRe():t==="fa"?uRe():lRe()}),fRe=()=>"Enable GitHub syncing for new projects",hRe=()=>"为新项目启用 GitHub 同步",_Re=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",sS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hRe():t==="fa"?_Re():fRe()}),pRe=()=>"Environment",mRe=()=>"环境",gRe=()=>"محیط",Ix=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mRe():t==="fa"?gRe():pRe()}),vRe=()=>"Failed",bRe=()=>"失败",xRe=()=>"ناموفق",Bx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bRe():t==="fa"?xRe():vRe()}),yRe=()=>"General",wRe=()=>"常规",SRe=()=>"عمومی",kRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wRe():t==="fa"?SRe():yRe()}),CRe=()=>"GitHub publishing",ERe=()=>"GitHub 发布",NRe=()=>"انتشار در GitHub",zRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ERe():t==="fa"?NRe():CRe()}),jRe=()=>"Git token",ARe=()=>"Git 令牌",TRe=()=>"توکن Git",MRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ARe():t==="fa"?TRe():jRe()}),RRe=()=>"Harnesses",DRe=()=>"智能体工具",LRe=()=>"ابزارهای عامل",ORe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DRe():t==="fa"?LRe():RRe()}),IRe=()=>"hf_…",BRe=()=>"hf_…",$Re=()=>"hf_…",HRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BRe():t==="fa"?$Re():IRe()}),PRe=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",FRe=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",URe=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",qRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FRe():t==="fa"?URe():PRe()}),GRe=()=>"Hostname",VRe=()=>"主机名",WRe=()=>"نام میزبان",KRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VRe():t==="fa"?WRe():GRe()}),YRe=()=>"How it connects",XRe=()=>"连接方式",ZRe=()=>"نحوهٔ اتصال",QRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XRe():t==="fa"?ZRe():YRe()}),JRe=()=>"Initialize Git",eDe=()=>"初始化 Git",tDe=()=>"راه‌اندازی Git",nDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eDe():t==="fa"?tDe():JRe()}),rDe=()=>"Install",sDe=()=>"安装",iDe=()=>"نصب",hN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sDe():t==="fa"?iDe():rDe()}),aDe=()=>"Install broken",oDe=()=>"安装损坏",lDe=()=>"نصب خراب است",cDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oDe():t==="fa"?lDe():aDe()}),uDe=()=>"Install GitHub CLI",dDe=()=>"安装 GitHub CLI",fDe=()=>"نصب GitHub CLI",hDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dDe():t==="fa"?fDe():uDe()}),_De=()=>"Install updates automatically",pDe=()=>"自动安装更新",mDe=()=>"نصب خودکار به‌روزرسانی‌ها",iS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pDe():t==="fa"?mDe():_De()}),gDe=()=>"Instance history",vDe=()=>"实例历史",bDe=()=>"تاریخچهٔ نمونه‌ها",xDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vDe():t==="fa"?bDe():gDe()}),yDe=()=>"Invalid token",wDe=()=>"令牌无效",SDe=()=>"توکن نامعتبر",kDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wDe():t==="fa"?SDe():yDe()}),CDe=()=>"Jobs",EDe=()=>"Jobs",NDe=()=>"Jobs",zDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EDe():t==="fa"?NDe():CDe()}),jDe=()=>"Jobs / Dashboard URL",ADe=()=>"Jobs / 控制台网址",TDe=()=>"نشانی Jobs / داشبورد",MDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ADe():t==="fa"?TDe():jDe()}),RDe=()=>"Jobs permission unknown",DDe=()=>"Jobs 权限未知",LDe=()=>"مجوز Jobs نامشخص است",ODe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DDe():t==="fa"?LDe():RDe()}),IDe=()=>"Jobs: write OK",BDe=()=>"Jobs:写入正常",$De=()=>"Jobs: نوشتن مجاز است",HDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BDe():t==="fa"?$De():IDe()}),PDe=()=>"kubectl not found",FDe=()=>"未找到 kubectl",UDe=()=>"kubectl پیدا نشد",qDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FDe():t==="fa"?UDe():PDe()}),GDe=()=>"Latest",VDe=()=>"最新版本",WDe=()=>"جدیدترین",KDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VDe():t==="fa"?WDe():GDe()}),YDe=()=>"Loading…",XDe=()=>"正在加载…",ZDe=()=>"در حال بارگیری…",Ol=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XDe():t==="fa"?ZDe():YDe()}),QDe=()=>"Loading Ray settings…",JDe=()=>"正在加载 Ray 设置…",eLe=()=>"در حال بارگیری تنظیمات Ray…",tLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JDe():t==="fa"?eLe():QDe()}),nLe=()=>"Loading slurm settings…",rLe=()=>"正在加载 Slurm 设置…",sLe=()=>"در حال بارگیری تنظیمات Slurm…",iLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rLe():t==="fa"?sLe():nLe()}),aLe=()=>"Loading status…",oLe=()=>"正在加载状态…",lLe=()=>"در حال بارگیری وضعیت…",cLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oLe():t==="fa"?lLe():aLe()}),uLe=()=>"Local only",dLe=()=>"仅本地",fLe=()=>"فقط محلی",hLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dLe():t==="fa"?fLe():uLe()}),_Le=()=>"Local repository",pLe=()=>"本地仓库",mLe=()=>"مخزن محلی",gLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pLe():t==="fa"?mLe():_Le()}),vLe=()=>"Login node",bLe=()=>"登录节点",xLe=()=>"گرهٔ ورود",yLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bLe():t==="fa"?xLe():vLe()}),wLe=()=>"Make GitHub syncing the default?",SLe=()=>"将 GitHub 同步设为默认值?",kLe=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",CLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SLe():t==="fa"?kLe():wLe()}),ELe=()=>"Missing bash/tar",NLe=()=>"缺少 bash/tar",zLe=()=>"bash/tar موجود نیست",jLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NLe():t==="fa"?zLe():ELe()}),ALe=()=>"More compute options",TLe=()=>"更多算力选项",MLe=()=>"گزینه‌های رایانشی بیشتر",RLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TLe():t==="fa"?MLe():ALe()}),DLe=()=>"Move failed:",LLe=()=>"移动失败:",OLe=()=>"انتقال ناموفق بود:",ILe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LLe():t==="fa"?OLe():DLe()}),BLe=()=>"Moved. orx is now using the new location.",$Le=()=>"已移动。orx 现在使用新位置。",HLe=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",PLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Le():t==="fa"?HLe():BLe()}),FLe=()=>"Namespace",ULe=()=>"命名空间",qLe=()=>"فضای نام",GLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ULe():t==="fa"?qLe():FLe()}),VLe=()=>"New location",WLe=()=>"新位置",KLe=()=>"محل جدید",YLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WLe():t==="fa"?KLe():VLe()}),XLe=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",ZLe=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",QLe=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",JLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZLe():t==="fa"?QLe():XLe()}),eOe=()=>"New variable key",tOe=()=>"新变量键名",nOe=()=>"کلید متغیر جدید",rOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tOe():t==="fa"?nOe():eOe()}),sOe=()=>"New variable value",iOe=()=>"新变量值",aOe=()=>"مقدار متغیر جدید",oOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iOe():t==="fa"?aOe():sOe()}),lOe=()=>"No code, prompts, file contents, or account identifiers are sent.",cOe=()=>"不会发送代码、提示词、文件内容或账户标识符。",uOe=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",dOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cOe():t==="fa"?uOe():lOe()}),fOe=()=>"No hosts found in ~/.ssh/config.",hOe=()=>"在 ~/.ssh/config 中未找到主机。",_Oe=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",pOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hOe():t==="fa"?_Oe():fOe()}),mOe=()=>"No job-create permission",gOe=()=>"没有创建 Job 的权限",vOe=()=>"مجوز ساخت Job وجود ندارد",bOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gOe():t==="fa"?vOe():mOe()}),xOe=()=>"No job.write permission",yOe=()=>"没有 job.write 权限",wOe=()=>"مجوز job.write وجود ندارد",SOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yOe():t==="fa"?wOe():xOe()}),kOe=()=>"No key on this computer to register — load a registered key with",COe=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",EOe=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",NOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?COe():t==="fa"?EOe():kOe()}),zOe=()=>"No key on this computer yet — create one with",jOe=()=>"此计算机上还没有密钥——使用以下命令创建:",AOe=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",TOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jOe():t==="fa"?AOe():zOe()}),MOe=()=>"No Slurm CLI",ROe=()=>"无 Slurm CLI",DOe=()=>"بدون CLI اسلورم",LOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ROe():t==="fa"?DOe():MOe()}),OOe=()=>"No token",IOe=()=>"无令牌",BOe=()=>"بدون توکن",$Oe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IOe():t==="fa"?BOe():OOe()}),HOe=()=>"None registered",POe=()=>"未注册任何密钥",FOe=()=>"هیچ‌کدام ثبت نشده",UOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?POe():t==="fa"?FOe():HOe()}),qOe=()=>"Not checked",GOe=()=>"未检查",VOe=()=>"بررسی نشده",_N=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GOe():t==="fa"?VOe():qOe()}),WOe=()=>"Not configured",KOe=()=>"未配置",YOe=()=>"پیکربندی نشده",Yp=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KOe():t==="fa"?YOe():WOe()}),XOe=()=>"Not installed",ZOe=()=>"未安装",QOe=()=>"نصب نیست",JOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZOe():t==="fa"?QOe():XOe()}),eIe=()=>"Not now",tIe=()=>"暂不",nIe=()=>"اکنون نه",rIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tIe():t==="fa"?nIe():eIe()}),sIe=()=>"Not on this computer",iIe=()=>"不在此计算机上",aIe=()=>"روی این رایانه نیست",oIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iIe():t==="fa"?aIe():sIe()}),lIe=()=>"Not set (pass --host per launch)",cIe=()=>"未设置(每次启动时传入 --host)",uIe=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",dIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cIe():t==="fa"?uIe():lIe()}),fIe=()=>"Not set up",hIe=()=>"未设置",_Ie=()=>"راه‌اندازی نشده",pIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hIe():t==="fa"?_Ie():fIe()}),mIe=()=>"Not signed in",gIe=()=>"未登录",vIe=()=>"وارد نشده",bIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gIe():t==="fa"?vIe():mIe()}),xIe=()=>"On this computer",yIe=()=>"在此计算机上",wIe=()=>"روی این رایانه",SIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yIe():t==="fa"?wIe():xIe()}),kIe=()=>"Open a project to inspect its repository and GitHub publication state.",CIe=()=>"打开项目以查看其仓库和 GitHub 发布状态。",EIe=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",NIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CIe():t==="fa"?EIe():kIe()}),zIe=()=>"Open job page",jIe=()=>"打开作业页面",AIe=()=>"باز کردن صفحهٔ کار",aS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jIe():t==="fa"?AIe():zIe()}),TIe=()=>"Open on GitHub",MIe=()=>"在 GitHub 上打开",RIe=()=>"باز کردن در GitHub",oS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MIe():t==="fa"?RIe():TIe()}),DIe=()=>", or create one with",LIe=()=>",或使用以下命令创建:",OIe=()=>"، یا با این فرمان یکی بسازید:",IIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LIe():t==="fa"?OIe():DIe()}),BIe=()=>"Org",$Ie=()=>"组织",HIe=()=>"سازمان",PIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ie():t==="fa"?HIe():BIe()}),FIe=()=>"Orgs",UIe=()=>"组织",qIe=()=>"سازمان‌ها",GIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UIe():t==="fa"?qIe():FIe()}),VIe=()=>"orx can't update this install",WIe=()=>"orx 无法更新此安装",KIe=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",YIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WIe():t==="fa"?KIe():VIe()}),XIe=()=>"Overleaf",ZIe=()=>"Overleaf",QIe=()=>"Overleaf",JIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZIe():t==="fa"?QIe():XIe()}),eBe=()=>"Overleaf Git authentication token",tBe=()=>"Overleaf Git 身份验证令牌",nBe=()=>"توکن احراز هویت Git در Overleaf",rBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tBe():t==="fa"?nBe():eBe()}),sBe=()=>"Overridden by env",iBe=()=>"已被环境变量覆盖",aBe=()=>"بازنویسی‌شده توسط محیط",oBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iBe():t==="fa"?aBe():sBe()}),lBe=()=>"Partition",cBe=()=>"分区",uBe=()=>"پارتیشن",dBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cBe():t==="fa"?uBe():lBe()}),fBe=()=>"Partitions",hBe=()=>"分区",_Be=()=>"پارتیشن‌ها",pBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hBe():t==="fa"?_Be():fBe()}),mBe=()=>"Path",gBe=()=>"路径",vBe=()=>"مسیر",bBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gBe():t==="fa"?vBe():mBe()}),xBe=()=>"Plan",yBe=()=>"方案",wBe=()=>"سطح اشتراک",SBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yBe():t==="fa"?wBe():xBe()}),kBe=()=>"Project",CBe=()=>"项目",EBe=()=>"پروژه",NBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CBe():t==="fa"?EBe():kBe()}),zBe=()=>"Ray version",jBe=()=>"Ray 版本",ABe=()=>"نسخهٔ Ray",TBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jBe():t==="fa"?ABe():zBe()}),MBe=()=>"Reachable",RBe=()=>"可访问",DBe=()=>"در دسترس",LBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RBe():t==="fa"?DBe():MBe()}),OBe=()=>"Reading ~/.ssh/config…",IBe=()=>"正在读取 ~/.ssh/config…",BBe=()=>"در حال خواندن ‎~/.ssh/config…",pN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IBe():t==="fa"?BBe():OBe()}),$Be=()=>"Ready",HBe=()=>"就绪",PBe=()=>"آماده",$x=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HBe():t==="fa"?PBe():$Be()}),FBe=()=>"Ready to move",UBe=()=>"可以移动",qBe=()=>"آمادهٔ انتقال",GBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UBe():t==="fa"?qBe():FBe()}),VBe=()=>"Ready to use",WBe=()=>"可用",KBe=()=>"آمادهٔ استفاده",YBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WBe():t==="fa"?KBe():VBe()}),XBe=()=>"Refresh",ZBe=()=>"刷新",QBe=()=>"تازه‌سازی",Xp=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZBe():t==="fa"?QBe():XBe()}),JBe=()=>"Remotes",e$e=()=>"远程仓库",t$e=()=>"مخزن‌های دوردست",n$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e$e():t==="fa"?t$e():JBe()}),r$e=()=>"Repository",s$e=()=>"仓库",i$e=()=>"مخزن",a$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s$e():t==="fa"?i$e():r$e()}),o$e=()=>"Restart to finish updating",l$e=()=>"重新启动以完成更新",c$e=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",u$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l$e():t==="fa"?c$e():o$e()}),d$e=()=>"Run manifest",f$e=()=>"运行清单",h$e=()=>"مانیفست اجرا",_$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f$e():t==="fa"?h$e():d$e()}),p$e=()=>"Running instances",m$e=()=>"正在运行的实例",g$e=()=>"نمونه‌های در حال اجرا",v$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m$e():t==="fa"?g$e():p$e()}),b$e=()=>"Runtime",x$e=()=>"运行时间",y$e=()=>"زمان اجرا",w$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x$e():t==="fa"?y$e():b$e()}),S$e=()=>". Save it under that key if it's meant for HF Jobs.",k$e=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",C$e=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",E$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k$e():t==="fa"?C$e():S$e()}),N$e=()=>"Settings",z$e=()=>"设置",j$e=()=>"تنظیمات",mN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z$e():t==="fa"?j$e():N$e()}),A$e=()=>"Signed in",T$e=()=>"已登录",M$e=()=>"وارد شده",gN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T$e():t==="fa"?M$e():A$e()}),R$e=()=>"Source",D$e=()=>"来源",L$e=()=>"منبع",Hx=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D$e():t==="fa"?L$e():R$e()}),O$e=()=>"SSH key",I$e=()=>"SSH 密钥",B$e=()=>"کلید SSH",$$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I$e():t==="fa"?B$e():O$e()}),H$e=()=>"Started",P$e=()=>"开始时间",F$e=()=>"آغاز",U$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P$e():t==="fa"?F$e():H$e()}),q$e=()=>"State",G$e=()=>"状态",V$e=()=>"وضعیت",W$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G$e():t==="fa"?V$e():q$e()}),K$e=()=>"Status",Y$e=()=>"状态",X$e=()=>"وضعیت",Zp=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y$e():t==="fa"?X$e():K$e()}),Z$e=()=>"Storage",Q$e=()=>"存储",J$e=()=>"ذخیره‌سازی",eHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q$e():t==="fa"?J$e():Z$e()}),tHe=()=>"Sync",nHe=()=>"同步",rHe=()=>"همگام‌سازی",sHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nHe():t==="fa"?rHe():tHe()}),iHe=()=>"Syncing off",aHe=()=>"同步已关闭",oHe=()=>"همگام‌سازی خاموش",lHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aHe():t==="fa"?oHe():iHe()}),cHe=()=>"System",uHe=()=>"系统",dHe=()=>"سامانه",fHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uHe():t==="fa"?dHe():cHe()}),hHe=()=>"Test connection",_He=()=>"测试连接",pHe=()=>"آزمایش اتصال",mHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_He():t==="fa"?pHe():hHe()}),gHe=()=>"Testing…",vHe=()=>"正在测试…",bHe=()=>"در حال آزمایش…",xHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vHe():t==="fa"?bHe():gHe()}),yHe=()=>", then add it with",wHe=()=>",然后使用以下命令添加:",SHe=()=>"، سپس با این فرمان اضافه‌اش کنید:",kHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wHe():t==="fa"?SHe():yHe()}),CHe=()=>"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.",EHe=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",NHe=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",zHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EHe():t==="fa"?NHe():CHe()}),jHe=()=>"This saved destination is not configured. Set it up below or choose another backend.",AHe=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",THe=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",MHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AHe():t==="fa"?THe():jHe()}),RHe=()=>"This value looks like a Hugging Face token — compute runs only read it from",DHe=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",LHe=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",OHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DHe():t==="fa"?LHe():RHe()}),IHe=()=>"Time limit",BHe=()=>"时间限制",$He=()=>"محدودیت زمانی",HHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BHe():t==="fa"?$He():IHe()}),PHe=()=>"Token",FHe=()=>"令牌",UHe=()=>"توکن",vN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FHe():t==="fa"?UHe():PHe()}),qHe=()=>"Unable to verify",GHe=()=>"无法验证",VHe=()=>"تأیید ممکن نیست",WHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GHe():t==="fa"?VHe():qHe()}),KHe=()=>"Unknown",YHe=()=>"未知",XHe=()=>"نامشخص",bN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YHe():t==="fa"?XHe():KHe()}),ZHe=()=>"Update required",QHe=()=>"需要更新",JHe=()=>"نیازمند به‌روزرسانی",ePe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QHe():t==="fa"?JHe():ZHe()}),tPe=()=>"Updates",nPe=()=>"更新",rPe=()=>"به‌روزرسانی‌ها",lS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nPe():t==="fa"?rPe():tPe()}),sPe=()=>"Usage analytics",iPe=()=>"使用情况分析",aPe=()=>"تحلیل استفاده",oPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iPe():t==="fa"?aPe():sPe()}),lPe=()=>"value",cPe=()=>"值",uPe=()=>"مقدار",xN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cPe():t==="fa"?uPe():lPe()}),dPe=()=>"Variables available to runs and the research agent (API keys, tokens).",fPe=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",hPe=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",_Pe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fPe():t==="fa"?hPe():dPe()}),pPe=()=>"Version",mPe=()=>"版本",gPe=()=>"نسخه",yN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mPe():t==="fa"?gPe():pPe()}),vPe=()=>"What happens",bPe=()=>"执行内容",xPe=()=>"چه اتفاقی می‌افتد",yPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bPe():t==="fa"?xPe():vPe()}),wPe=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",SPe=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",kPe=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",CPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SPe():t==="fa"?kPe():wPe()}),EPe=()=>"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.",NPe=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",zPe=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",jPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NPe():t==="fa"?zPe():EPe()}),APe=()=>"Pick a login node first",TPe=()=>"请先选择登录节点",MPe=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",RPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TPe():t==="fa"?MPe():APe()}),DPe=()=>"Providers",LPe=()=>"提供商",OPe=()=>"ارائه‌دهندگان",IPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LPe():t==="fa"?OPe():DPe()}),BPe=()=>"Reconnect",$Pe=()=>"重新连接",HPe=()=>"اتصال دوباره",wN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Pe():t==="fa"?HPe():BPe()}),PPe=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,FPe=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,UPe=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,qPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FPe(e):t==="fa"?UPe(e):PPe(e)}),GPe=()=>"Reinstall with the orx installer to get automatic updates.",VPe=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",WPe=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",KPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VPe():t==="fa"?WPe():GPe()}),YPe=()=>"Re-link",XPe=()=>"重新链接",ZPe=()=>"پیوند دوباره",QPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XPe():t==="fa"?ZPe():YPe()}),JPe=()=>"Remove token",eFe=()=>"移除令牌",tFe=()=>"حذف توکن",nFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eFe():t==="fa"?tFe():JPe()}),rFe=()=>"Removing…",sFe=()=>"正在移除…",iFe=()=>"در حال حذف…",aFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sFe():t==="fa"?iFe():rFe()}),oFe=()=>"Replace anyway",lFe=()=>"仍要替换",cFe=()=>"به‌هرحال جایگزین کن",uFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lFe():t==="fa"?cFe():oFe()}),dFe=()=>"Replace token",fFe=()=>"替换令牌",hFe=()=>"جایگزینی توکن",_Fe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fFe():t==="fa"?hFe():dFe()}),pFe=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,mFe=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,gFe=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,vFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mFe(e):t==="fa"?gFe(e):pFe(e)}),bFe=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,xFe=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,yFe=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,wFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xFe(e):t==="fa"?yFe(e):bFe(e)}),SFe=()=>"Run `gh auth login` in your terminal.",kFe=()=>"请在终端中运行 `gh auth login`。",CFe=()=>"در پایانه `gh auth login` را اجرا کنید.",EFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kFe():t==="fa"?CFe():SFe()}),NFe=()=>"Saved",zFe=()=>"已保存",jFe=()=>"ذخیره شده",AFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zFe():t==="fa"?jFe():NFe()}),TFe=()=>"Set up",MFe=()=>"设置",RFe=()=>"راه‌اندازی",DFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MFe():t==="fa"?RFe():TFe()}),LFe=()=>"Set up environment",OFe=()=>"设置环境",IFe=()=>"راه‌اندازی محیط",BFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OFe():t==="fa"?IFe():LFe()}),$Fe=()=>"Setting up… (~30–60s)",HFe=()=>"正在设置…(约 30–60 秒)",PFe=()=>"در حال راه‌اندازی… (حدود ۳۰ تا ۶۰ ثانیه)",FFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HFe():t==="fa"?PFe():$Fe()}),UFe=()=>"Sign in",qFe=()=>"登录",GFe=()=>"ورود",VFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qFe():t==="fa"?GFe():UFe()}),WFe=()=>"The SSH connection closed before setup completed.",KFe=()=>"SSH 连接在设置完成前已关闭。",YFe=()=>"اتصال SSH پیش از تکمیل راه‌اندازی بسته شد.",cS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KFe():t==="fa"?YFe():WFe()}),XFe=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,ZFe=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,QFe=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,SN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZFe(e):t==="fa"?QFe(e):XFe(e)}),JFe=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",eUe=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",tUe=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",nUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eUe():t==="fa"?tUe():JFe()}),rUe=()=>"Dark",sUe=()=>"深色",iUe=()=>"تیره",aUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sUe():t==="fa"?iUe():rUe()}),oUe=()=>"Theme",lUe=()=>"主题",cUe=()=>"پوسته",uS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lUe():t==="fa"?cUe():oUe()}),uUe=()=>"Light",dUe=()=>"浅色",fUe=()=>"روشن",hUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dUe():t==="fa"?fUe():uUe()}),_Ue=()=>"System",pUe=()=>"系统",mUe=()=>"سیستم",gUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pUe():t==="fa"?mUe():_Ue()}),vUe=()=>"Update now",bUe=()=>"立即更新",xUe=()=>"اکنون به‌روزرسانی کن",yUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bUe():t==="fa"?xUe():vUe()}),wUe=e=>`Update to ${e==null?void 0:e.version}`,SUe=e=>`更新到 ${e==null?void 0:e.version}`,kUe=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,CUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SUe(e):t==="fa"?kUe(e):wUe(e)}),EUe=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",NUe=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",zUe=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",jUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NUe():t==="fa"?zUe():EUe()}),AUe=()=>"Updating default destination…",TUe=()=>"正在更新默认运行位置…",MUe=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",RUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TUe():t==="fa"?MUe():AUe()}),DUe=()=>"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.",LUe=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",OUe=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",IUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LUe():t==="fa"?OUe():DUe()}),BUe=()=>"Validating…",$Ue=()=>"正在验证…",HUe=()=>"در حال اعتبارسنجی…",PUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ue():t==="fa"?HUe():BUe()}),FUe=()=>"View settings",UUe=()=>"查看设置",qUe=()=>"مشاهدهٔ تنظیمات",GUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UUe():t==="fa"?qUe():FUe()}),VUe=()=>"Skill",WUe=()=>"技能",KUe=()=>"مهارت",kN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WUe():t==="fa"?KUe():VUe()}),YUe=()=>"Loading skill…",XUe=()=>"正在加载技能…",ZUe=()=>"در حال بارگیری مهارت…",QUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XUe():t==="fa"?ZUe():YUe()}),JUe=e=>`Delete the “${e==null?void 0:e.name}” skill?`,eqe=e=>`删除技能“${e==null?void 0:e.name}”?`,tqe=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,nqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eqe(e):t==="fa"?tqe(e):JUe(e)}),rqe=e=>`Delete skill ${e==null?void 0:e.name}`,sqe=e=>`删除技能 ${e==null?void 0:e.name}`,iqe=e=>`حذف مهارت ${e==null?void 0:e.name}`,aqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sqe(e):t==="fa"?iqe(e):rqe(e)}),oqe=e=>`Delete the “${e==null?void 0:e.name}” template?`,lqe=e=>`删除模板“${e==null?void 0:e.name}”?`,cqe=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,uqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lqe(e):t==="fa"?cqe(e):oqe(e)}),dqe=e=>`Delete template ${e==null?void 0:e.name}`,fqe=e=>`删除模板 ${e==null?void 0:e.name}`,hqe=e=>`حذف قالب ${e==null?void 0:e.name}`,_qe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fqe(e):t==="fa"?hqe(e):dqe(e)}),pqe=()=>"SKILL.md folders the agent discovers on its own and you invoke with /name in chat. Skills installed in your coding agents are picked up automatically.",mqe=()=>"智能体会自动发现的 SKILL.md 技能文件夹,你可以在聊天中通过 /name 调用。你的编码智能体中已安装的技能会自动纳入。",gqe=()=>"پوشه‌های SKILL.md که عامل خودش پیدا می‌کند و شما با ‎/name در گفتگو فراخوانی می‌کنید. مهارت‌های نصب‌شده در عامل‌های کدنویسی شما به‌طور خودکار در نظر گرفته می‌شوند.",vqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mqe():t==="fa"?gqe():pqe()}),bqe=()=>"Drop a SKILL.md or .zip here, or click to choose",xqe=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",yqe=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",wqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xqe():t==="fa"?yqe():bqe()}),Sqe=()=>"Drop a .tex or .zip here, or click to choose",kqe=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",Cqe=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",Eqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kqe():t==="fa"?Cqe():Sqe()}),Nqe=()=>"File too large (max 20 MB).",zqe=()=>"文件过大(最大 20 MB)。",jqe=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",CN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zqe():t==="fa"?jqe():Nqe()}),Aqe=()=>" + 1 file",Tqe=()=>" + 1 个文件",Mqe=()=>" + ۱ فایل",Rqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tqe():t==="fa"?Mqe():Aqe()}),Dqe=()=>"What the agent brings to every session, in every project: the skills it can use, and the LaTeX templates it writes papers into.",Lqe=()=>"智能体在每个项目的每个会话中都会携带的内容:可用的技能,以及撰写论文所用的 LaTeX 模板。",Oqe=()=>"آنچه عامل در هر نشست و در همهٔ پروژه‌ها همراه دارد: مهارت‌هایی که می‌تواند استفاده کند و قالب‌های LaTeX که مقاله‌ها را با آن‌ها می‌نویسد.",Iqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lqe():t==="fa"?Oqe():Dqe()}),Bqe=e=>` + ${e==null?void 0:e.count} files`,$qe=e=>` + ${e==null?void 0:e.count} 个文件`,Hqe=e=>` + ${e==null?void 0:e.count} فایل`,Pqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$qe(e):t==="fa"?Hqe(e):Bqe(e)}),Fqe=()=>"Could not load skills:",Uqe=()=>"无法加载技能:",qqe=()=>"بارگیری مهارت‌ها ممکن نشد:",Gqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uqe():t==="fa"?qqe():Fqe()}),Vqe=()=>"Could not load templates:",Wqe=()=>"无法加载模板:",Kqe=()=>"بارگیری قالب‌ها ممکن نشد:",Yqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wqe():t==="fa"?Kqe():Vqe()}),Xqe=()=>"Customize",Zqe=()=>"自定义",Qqe=()=>"سفارشی‌سازی",Jqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zqe():t==="fa"?Qqe():Xqe()}),eGe=()=>"Delete skill",tGe=()=>"删除技能",nGe=()=>"حذف مهارت",rGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tGe():t==="fa"?nGe():eGe()}),sGe=()=>"Delete template",iGe=()=>"删除模板",aGe=()=>"حذف قالب",oGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iGe():t==="fa"?aGe():sGe()}),lGe=()=>"LaTeX templates",cGe=()=>"LaTeX 模板",uGe=()=>"قالب‌های LaTeX",dGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cGe():t==="fa"?uGe():lGe()}),fGe=()=>"Loading skills…",hGe=()=>"正在加载技能…",_Ge=()=>"در حال بارگیری مهارت‌ها…",pGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hGe():t==="fa"?_Ge():fGe()}),mGe=()=>"Loading templates…",gGe=()=>"正在加载模板…",vGe=()=>"در حال بارگیری قالب‌ها…",bGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gGe():t==="fa"?vGe():mGe()}),xGe=()=>"No skills yet.",yGe=()=>"尚无技能。",wGe=()=>"هنوز مهارتی وجود ندارد.",SGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yGe():t==="fa"?wGe():xGe()}),kGe=()=>"No templates yet.",CGe=()=>"尚无模板。",EGe=()=>"هنوز قالبی وجود ندارد.",NGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CGe():t==="fa"?EGe():kGe()}),zGe=()=>"Skills",jGe=()=>"技能",AGe=()=>"مهارت‌ها",TGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jGe():t==="fa"?AGe():zGe()}),MGe=()=>"Uploading…",RGe=()=>"正在上传…",DGe=()=>"در حال بارگذاری…",LGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RGe():t==="fa"?DGe():MGe()}),OGe=()=>"A conference class or house style the agent writes papers into instead of its default preamble. Upload a .tex file or a .zip containing its .cls and .sty files. With exactly one template available, the agent uses it without asking.",IGe=()=>"智能体会使用会议文档类或内部样式来撰写论文,而不是使用默认导言。请上传 .tex 文件,或包含 .cls 和 .sty 文件的 .zip 压缩包。当恰好只有一个模板可用时,智能体会直接使用,无需询问。",BGe=()=>"عامل به‌جای مقدمهٔ پیش‌فرض، مقاله‌ها را با کلاس همایش یا سبک سازمانی می‌نویسد. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید. وقتی دقیقاً یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",$Ge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IGe():t==="fa"?BGe():OGe()}),HGe=()=>"Upload a SKILL.md file or a .zip of a skill folder.",PGe=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",FGe=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",UGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PGe():t==="fa"?FGe():HGe()}),qGe=()=>"Upload a .tex file or a .zip of a template folder.",GGe=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",VGe=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",WGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GGe():t==="fa"?VGe():qGe()}),KGe=()=>"Close SSH config",YGe=()=>"关闭 SSH 配置",XGe=()=>"بستن پیکربندی SSH",ZGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YGe():t==="fa"?XGe():KGe()}),QGe=()=>"Discard your unsaved SSH config changes?",JGe=()=>"要放弃未保存的 SSH 配置更改吗?",eVe=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",tVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JGe():t==="fa"?eVe():QGe()}),nVe=()=>"Loading SSH config…",rVe=()=>"正在加载 SSH 配置…",sVe=()=>"در حال بارگیری پیکربندی SSH…",iVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rVe():t==="fa"?sVe():nVe()}),aVe=()=>"SSH config saved",oVe=()=>"SSH 配置已保存",lVe=()=>"پیکربندی SSH ذخیره شد",cVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oVe():t==="fa"?lVe():aVe()}),uVe=()=>"SSH config",dVe=()=>"SSH 配置",fVe=()=>"پیکربندی SSH",hVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dVe():t==="fa"?fVe():uVe()}),_Ve=()=>"Configure SSH hosts…",pVe=()=>"配置 SSH 主机…",mVe=()=>"پیکربندی میزبان‌های SSH…",EN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pVe():t==="fa"?mVe():_Ve()}),gVe=()=>"Cancelled",vVe=()=>"已取消",bVe=()=>"لغوشده",xVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vVe():t==="fa"?bVe():gVe()}),yVe=()=>"Cancelling",wVe=()=>"正在取消",SVe=()=>"در حال لغو",kVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wVe():t==="fa"?SVe():yVe()}),CVe=()=>"Done",EVe=()=>"已完成",NVe=()=>"انجام‌شده",zVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EVe():t==="fa"?NVe():CVe()}),jVe=()=>"Editing",AVe=()=>"正在编辑",TVe=()=>"در حال ویرایش",MVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AVe():t==="fa"?TVe():jVe()}),RVe=()=>"Failed",DVe=()=>"失败",LVe=()=>"ناموفق",OVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DVe():t==="fa"?LVe():RVe()}),IVe=()=>"Idle",BVe=()=>"空闲",$Ve=()=>"بی‌کار",HVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BVe():t==="fa"?$Ve():IVe()}),PVe=()=>"Running",FVe=()=>"运行中",UVe=()=>"در حال اجرا",qVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FVe():t==="fa"?UVe():PVe()}),GVe=()=>"Starting",VVe=()=>"正在启动",WVe=()=>"در حال آغاز",KVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VVe():t==="fa"?WVe():GVe()}),YVe=()=>"Copying…",XVe=()=>"正在复制…",ZVe=()=>"در حال کپی…",QVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XVe():t==="fa"?ZVe():YVe()}),JVe=()=>"Finalizing…",eWe=()=>"正在完成…",tWe=()=>"در حال نهایی‌سازی…",nWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eWe():t==="fa"?tWe():JVe()}),rWe=e=>`${e==null?void 0:e.size} free at target`,sWe=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,iWe=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,aWe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sWe(e):t==="fa"?iWe(e):rWe(e)}),oWe=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.`,lWe=e=>`将所有 orx 数据移动到: +${e==null?void 0:e.path} + +存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,cWe=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ +${e==null?void 0:e.path} + +مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,uWe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lWe(e):t==="fa"?cWe(e):oWe(e)}),dWe=()=>"Move data here",fWe=()=>"将数据移动到此处",hWe=()=>"انتقال داده به اینجا",_We=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fWe():t==="fa"?hWe():dWe()}),pWe=()=>"Moving…",mWe=()=>"正在移动…",gWe=()=>"در حال جابه‌جایی…",vWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mWe():t==="fa"?gWe():pWe()}),bWe=()=>"Preparing…",xWe=()=>"正在准备…",yWe=()=>"در حال آماده‌سازی…",wWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xWe():t==="fa"?yWe():bWe()}),SWe=()=>" (same disk, instant)",kWe=()=>"(同一磁盘,可立即完成)",CWe=()=>" (روی همان دیسک، فوری)",EWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kWe():t==="fa"?CWe():SWe()}),NWe=()=>"default location",zWe=()=>"默认位置",jWe=()=>"محل پیش‌فرض",AWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zWe():t==="fa"?jWe():NWe()}),TWe=()=>"ORX_DATA_DIR environment variable",MWe=()=>"ORX_DATA_DIR 环境变量",RWe=()=>"متغیر محیطی ORX_DATA_DIR",DWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MWe():t==="fa"?RWe():TWe()}),LWe=()=>"your saved setting",OWe=()=>"已保存的设置",IWe=()=>"تنظیم ذخیره‌شدهٔ شما",BWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OWe():t==="fa"?IWe():LWe()}),$We=()=>"XDG_DATA_HOME",HWe=()=>"XDG_DATA_HOME",PWe=()=>"XDG_DATA_HOME",FWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HWe():t==="fa"?PWe():$We()}),UWe=()=>"Verifying…",qWe=()=>"正在验证…",GWe=()=>"در حال بررسی…",VWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qWe():t==="fa"?GWe():UWe()}),WWe=()=>"Loading…",KWe=()=>"正在加载…",YWe=()=>"در حال بارگیری…",XWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KWe():t==="fa"?YWe():WWe()}),ZWe=()=>"This sub-agent is no longer available.",QWe=()=>"此子智能体已不可用。",JWe=()=>"این عامل فرعی دیگر در دسترس نیست.",eKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QWe():t==="fa"?JWe():ZWe()}),tKe=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,nKe=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,rKe=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,sKe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nKe(e):t==="fa"?rKe(e):tKe(e)}),iKe=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,aKe=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,oKe=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,lKe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aKe(e):t==="fa"?oKe(e):iKe(e)}),cKe=()=>", a repo for training a mini-GPT from scratch.",uKe=()=>",一个从零训练迷你 GPT 的仓库。",dKe=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",fKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uKe():t==="fa"?dKe():cKe()}),hKe=()=>"Close",_Ke=()=>"关闭",pKe=()=>"بستن",mKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ke():t==="fa"?pKe():hKe()}),gKe=()=>"Create a new project",vKe=()=>"新建项目",bKe=()=>"ایجاد پروژهٔ جدید",xKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vKe():t==="fa"?bKe():gKe()}),yKe=()=>"Demo project",wKe=()=>"演示项目",SKe=()=>"پروژهٔ نمایشی",kKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wKe():t==="fa"?SKe():yKe()}),CKe=()=>"Explore the demo",EKe=()=>"探索演示项目",NKe=()=>"دیدن پروژهٔ نمایشی",zKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EKe():t==="fa"?NKe():CKe()}),jKe=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",AKe=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",TKe=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",MKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AKe():t==="fa"?TKe():jKe()}),RKe=()=>"nanochat",DKe=()=>"nanochat",LKe=()=>"nanochat",OKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DKe():t==="fa"?LKe():RKe()}),IKe=()=>"Couldn’t save your progress. Try again.",BKe=()=>"无法保存进度。请重试。",$Ke=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",HKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BKe():t==="fa"?$Ke():IKe()}),PKe=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",FKe=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",UKe=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",qKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FKe():t==="fa"?UKe():PKe()}),GKe=()=>"Welcome to OpenResearch",VKe=()=>"欢迎使用 OpenResearch",WKe=()=>"به OpenResearch خوش آمدید",KKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VKe():t==="fa"?WKe():GKe()}),YKe=()=>"Baseline",XKe=()=>"基线",ZKe=()=>"مبنا",QKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XKe():t==="fa"?ZKe():YKe()}),JKe=()=>"Experiment",eYe=()=>"实验",tYe=()=>"آزمایش",bo=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eYe():t==="fa"?tYe():JKe()}),nYe=e=>`${e==null?void 0:e.count} experiments`,rYe=e=>`${e==null?void 0:e.count} 个实验`,sYe=e=>`${e==null?void 0:e.count} آزمایش`,iYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rYe(e):t==="fa"?sYe(e):nYe(e)}),aYe=()=>"1 experiment",oYe=()=>"1 个实验",lYe=()=>"۱ آزمایش",cYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oYe():t==="fa"?lYe():aYe()}),uYe=()=>"Running",dYe=()=>"运行中",fYe=()=>"در حال اجرا",hYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dYe():t==="fa"?fYe():uYe()}),_Ye=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",pYe=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",mYe=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",gYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pYe():t==="fa"?mYe():_Ye()}),vYe=()=>"Ask the agent in chat to create and run your first experiment.",bYe=()=>"在聊天中让智能体创建并运行你的第一个实验。",xYe=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",yYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bYe():t==="fa"?xYe():vYe()}),wYe=()=>"Code",SYe=()=>"代码",kYe=()=>"کد",CYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SYe():t==="fa"?kYe():wYe()}),EYe=()=>"Logs",NYe=()=>"日志",zYe=()=>"گزارش‌ها",NN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NYe():t==="fa"?zYe():EYe()}),jYe=()=>"No experiments from the current task yet",AYe=()=>"当前任务尚无实验",TYe=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",MYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AYe():t==="fa"?TYe():jYe()}),RYe=()=>"No experiments yet",DYe=()=>"尚无实验",LYe=()=>"هنوز آزمایشی وجود ندارد",OYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DYe():t==="fa"?LYe():RYe()}),IYe=()=>"no runs",BYe=()=>"无运行",$Ye=()=>"بدون اجرا",HYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BYe():t==="fa"?$Ye():IYe()}),PYe=()=>"Open logs",FYe=()=>"打开日志",UYe=()=>"باز کردن گزارش‌ها",qYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FYe():t==="fa"?UYe():PYe()}),GYe=()=>"other tasks",VYe=()=>"其他任务",WYe=()=>"وظایف دیگر",KYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VYe():t==="fa"?WYe():GYe()}),YYe=()=>"Runs",XYe=()=>"运行",ZYe=()=>"اجراها",QYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XYe():t==="fa"?ZYe():YYe()}),JYe=()=>"Switch to Entire project to see all experiments",eXe=()=>"切换到“整个项目”以查看所有实验",tXe=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",nXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eXe():t==="fa"?tXe():JYe()}),rXe=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,sXe=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,iXe=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,aXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sXe(e):t==="fa"?iXe(e):rXe(e)}),oXe=()=>"Dismiss",lXe=()=>"关闭",cXe=()=>"بستن",uXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lXe():t==="fa"?cXe():oXe()}),dXe=()=>"macOS app",fXe=()=>"macOS 应用",hXe=()=>"برنامهٔ macOS",_Xe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fXe():t==="fa"?hXe():dXe()}),pXe=()=>"Installed with cargo",mXe=()=>"通过 cargo 安装",gXe=()=>"نصب‌شده با cargo",vXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mXe():t==="fa"?gXe():pXe()}),bXe=()=>"Installed with Homebrew",xXe=()=>"通过 Homebrew 安装",yXe=()=>"نصب‌شده با Homebrew",wXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xXe():t==="fa"?yXe():bXe()}),SXe=()=>"Installed with the orx installer",kXe=()=>"通过 orx 安装程序安装",CXe=()=>"نصب‌شده با نصب‌کنندهٔ orx",EXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kXe():t==="fa"?CXe():SXe()}),NXe=()=>"Managed by Nix",zXe=()=>"由 Nix 管理",jXe=()=>"مدیریت‌شده با Nix",AXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zXe():t==="fa"?jXe():NXe()}),TXe=()=>"Unknown install",MXe=()=>"未知安装方式",RXe=()=>"روش نصب نامشخص",DXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MXe():t==="fa"?RXe():TXe()}),LXe=()=>"Re-run your cargo install to update.",OXe=()=>"重新运行 cargo 安装命令以更新。",IXe=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",BXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OXe():t==="fa"?IXe():LXe()}),$Xe=()=>"Run brew upgrade to update.",HXe=()=>"运行 brew upgrade 以更新。",PXe=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",FXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HXe():t==="fa"?PXe():$Xe()}),UXe=()=>"Update it through your Nix configuration.",qXe=()=>"通过 Nix 配置进行更新。",GXe=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",VXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qXe():t==="fa"?GXe():UXe()}),WXe=e=>`Current worktree · ${e==null?void 0:e.branch}`,KXe=e=>`当前工作树 · ${e==null?void 0:e.branch}`,YXe=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,XXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KXe(e):t==="fa"?YXe(e):WXe(e)}),ZXe=e=>`Default branch · ${e==null?void 0:e.branch}`,QXe=e=>`默认分支 · ${e==null?void 0:e.branch}`,JXe=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,eZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QXe(e):t==="fa"?JXe(e):ZXe(e)}),tZe=e=>`detached at ${e==null?void 0:e.branch}`,nZe=e=>`分离于 ${e==null?void 0:e.branch}`,rZe=e=>`جدا در ${e==null?void 0:e.branch}`,sZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nZe(e):t==="fa"?rZe(e):tZe(e)}),iZe=()=>"Listing truncated.",aZe=()=>"列表已截断。",oZe=()=>"فهرست کوتاه شده است.",lZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aZe():t==="fa"?oZe():iZe()}),cZe=()=>"Loading…",uZe=()=>"正在加载…",dZe=()=>"در حال بارگیری…",fZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uZe():t==="fa"?dZe():cZe()}),hZe=()=>"No changes yet.",_Ze=()=>"尚无更改。",pZe=()=>"هنوز تغییری وجود ندارد.",mZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ze():t==="fa"?pZe():hZe()}),gZe=()=>"No files.",vZe=()=>"没有文件。",bZe=()=>"فایلی وجود ندارد.",xZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vZe():t==="fa"?bZe():gZe()}),yZe=()=>"Refresh failed:",wZe=()=>"刷新失败:",SZe=()=>"تازه‌سازی ناموفق بود:",kZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wZe():t==="fa"?SZe():yZe()}),Pb=new Set;function zN(e){if(e!==E()){wE(e,{reload:!1}),document.documentElement.lang=e;for(const n of Pb)n()}}function CZe(e){return Pb.add(e),()=>Pb.delete(e)}function Pc(){return M.useSyncExternalStore(CZe,E,E)}const ke=e=>`⁦${e}⁩`,Ra=e=>`⁨${e}⁩`,Yt=e=>new Intl.NumberFormat(E()).format(e);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jN=(...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 EZe=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 NZe=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 dS=e=>{const n=NZe(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 dv={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 zZe=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},jZe=M.createContext({}),AZe=()=>M.useContext(jZe),TZe=M.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:a,iconNode:l,...o},c)=>{const{size:d=24,strokeWidth:_=2,absoluteStrokeWidth:h=!1,color:m="currentColor",className:g=""}=AZe()??{},S=r??h?Number(t??_)*24/Number(n??d):t??_;return M.createElement("svg",{ref:c,...dv,width:n??d??dv.width,height:n??d??dv.height,stroke:e??m,strokeWidth:S,className:jN("lucide",g,s),...!a&&!zZe(o)&&{"aria-hidden":"true"},...o},[...l.map(([k,b])=>M.createElement(k,b)),...Array.isArray(a)?a:[a]])});/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nt=(e,n)=>{const t=M.forwardRef(({className:r,...s},a)=>M.createElement(TZe,{ref:a,iconNode:n,className:jN(`lucide-${EZe(dS(e))}`,`lucide-${e}`,r),...s}));return t.displayName=dS(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 MZe=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],RZe=nt("arrow-down",MZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const DZe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Zf=nt("arrow-left",DZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const LZe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],G0=nt("arrow-right",LZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OZe=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],IZe=nt("arrow-up-right",OZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const BZe=[["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"}]],AN=nt("blocks",BZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $Ze=[["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"}]],TN=nt("book-open",$Ze);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const HZe=[["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"}]],PZe=nt("calendar-days",HZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const FZe=[["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"}]],UZe=nt("chart-spline",FZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qZe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],mi=nt("check",qZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const GZe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$a=nt("chevron-down",GZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const VZe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],MN=nt("chevron-left",VZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WZe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ha=nt("chevron-right",WZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const KZe=[["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"}]],RN=nt("circle-alert",KZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const YZe=[["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"}]],XZe=nt("circle-question-mark",YZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZZe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],DN=nt("circle-stop",ZZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QZe=[["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"}]],LN=nt("circle-x",QZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JZe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],eQe=nt("clock-3",JZe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tQe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],nQe=nt("clock",tQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rQe=[["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"}]],sQe=nt("cloud-upload",rQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iQe=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Fb=nt("code",iQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aQe=[["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"}]],Qp=nt("copy",aQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oQe=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],ON=nt("corner-down-left",oQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lQe=[["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"}]],cQe=nt("cpu",lQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uQe=[["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"}]],dQe=nt("download",uQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fQe=[["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"}]],Px=nt("ellipsis",fQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hQe=[["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"}]],Dc=nt("external-link",hQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _Qe=[["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"}]],IN=nt("file-code",_Qe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pQe=[["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"}]],mQe=nt("file-output",pQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gQe=[["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"}]],td=nt("file-text",gQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vQe=[["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"}]],Fx=nt("flask-conical",vQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bQe=[["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"}]],BN=nt("folder-git-2",bQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xQe=[["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"}]],Qf=nt("folder-open",xQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yQe=[["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"}]],wQe=nt("folder-plus",yQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SQe=[["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"}]],Jp=nt("folder-tree",SQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kQe=[["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"}]],CQe=nt("funnel",kQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EQe=[["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"}]],em=nt("git-branch",EQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NQe=[["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"}]],zQe=nt("git-commit-horizontal",NQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jQe=[["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"}]],AQe=nt("globe",jQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const TQe=[["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"}]],MQe=nt("history",TQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const RQe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],$N=nt("info",RQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const DQe=[["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"}]],LQe=nt("laptop",DQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OQe=[["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"}]],IQe=nt("lightbulb",OQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const BQe=[["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"}]],fS=nt("lock",BQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $Qe=[["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"}]],HQe=nt("maximize-2",$Qe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PQe=[["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"}]],HN=nt("message-square-quote",PQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const FQe=[["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"}]],UQe=nt("minimize-2",FQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qQe=[["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"}]],GQe=nt("monitor",qQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const VQe=[["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"}]],WQe=nt("moon",VQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const KQe=[["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"}]],YQe=nt("mouse-pointer-click",KQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const XQe=[["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"}]],Ux=nt("package",XQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZQe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],PN=nt("panel-left",ZQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QQe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],FN=nt("panel-right",QQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JQe=[["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"}]],eJe=nt("paperclip",JQe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tJe=[["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"}]],qx=nt("pencil",tJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nJe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Gx=nt("plus",nJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rJe=[["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"}]],bd=nt("refresh-cw",rJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sJe=[["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"}]],UN=nt("rotate-cw",sJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iJe=[["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"}]],Vx=nt("scroll-text",iJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aJe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],qN=nt("search",aJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oJe=[["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"}]],hS=nt("server",oJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lJe=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],cJe=nt("settings-2",lJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uJe=[["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"}]],GN=nt("settings",uJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dJe=[["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"}]],VN=nt("sliders-horizontal",dJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fJe=[["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"}]],Dh=nt("square-terminal",fJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hJe=[["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"}]],_Je=nt("sun",hJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pJe=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],nd=nt("terminal",pJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mJe=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],gJe=nt("toggle-right",mJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vJe=[["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"}]],xd=nt("trash-2",vJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bJe=[["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"}]],WN=nt("triangle-alert",bJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xJe=[["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"}]],yJe=nt("upload",xJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wJe=[["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"}]],Wx=nt("users",wJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SJe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Zr=nt("x",SJe);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kJe=[["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"}]],CJe=nt("zap",kJe),fv="demo_nanochat_v1",c0=e=>e.startsWith("demo_"),$f="chat_demo_nanochat_v1",KN="chat_demo_nanochat_figures_v1",YN="chat_demo_nanochat_literature_v1",Ub="cpu-apple-silicon-pipeline-results.md",EJe="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 qb extends Error{constructor(t,r,s){super(t);Y1(this,"currentVersion");Y1(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function Hi(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}async function Fi(e){if(!e.ok){const n=await e.text().catch(()=>"");let t=n;try{const r=JSON.parse(n);if(typeof r=="object"&&r!==null&&("error"in r&&typeof r.error=="string"&&(t=r.error),e.status===409&&"code"in r&&r.code==="fileChanged"&&"exists"in r&&typeof r.exists=="boolean")){const s="currentVersion"in r&&typeof r.currentVersion=="string"?r.currentVersion:null;throw new qb(t,s,r.exists)}}catch(r){if(r instanceof qb)throw r}throw new Error(t||`HTTP ${e.status}`)}return await e.json()}const Ct=e=>fetch(e).then(n=>Fi(n)),It=(e,n)=>fetch(e,{method:"POST",headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(t=>Fi(t)),yd=(e,n)=>fetch(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Fi(t)),XN=(e,n)=>fetch(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Fi(t)),NJe=()=>Ct("/api/projects").then(e=>e.projects),zJe=()=>Ct("/api/projects/activity").then(e=>e.activity),jJe=()=>Ct("/api/settings/ui-state"),_S=e=>It("/api/settings/ui-state",e),AJe=(e,n)=>It("/api/onboarding/complete",{...e,...n}),ZN=(e="")=>{const n=e?`?path=${encodeURIComponent(e)}`:"";return Ct(`/api/project-path/status${n}`)},TJe=()=>It("/api/project-path/pick").then(e=>e.path),MJe=e=>It("/api/projects",e),QN=e=>Ct(`/api/papers/search?q=${encodeURIComponent(e)}`).then(n=>n.papers),RJe=()=>Ct("/api/github/account"),DJe=e=>Ct(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`),LJe=(e,n)=>Ct(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`),Gb=e=>Ct(`/api/papers/resolve?id=${encodeURIComponent(e)}`).then(n=>n.paper),OJe=e=>It("/api/projects/starter-prompts/prewarm",e),IJe=(e,n,t,r)=>Ct(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`),BJe=e=>It(`/api/projects/${e}/open`).then(n=>n.project),$Je=e=>fetch(`/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})`)}}),HJe=e=>Ct(`/api/projects/${e}/experiments`).then(n=>n.experiments),Kx=e=>Ct(`/api/projects/${e}/runs`).then(n=>n.runs),JN=e=>It(`/api/runs/${e}/cancel`).then(()=>{}),PJe=(e,n)=>Ct(`/api/runs/${e}/log?offset=${n}`),FJe=e=>Ct(`/api/runs/${e}/diff`),UJe=e=>Ct(`/api/experiments/${e}/diff`),Fc=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),pS=(e,n,t={})=>Ct(`/api/projects/${e}/file?${Fc(t,new URLSearchParams({path:n}))}`),mS=(e,n,t={})=>`/api/projects/${e}/file/raw?${Fc(t,new URLSearchParams({path:n}))}`,qJe=e=>Ct(`/api/files/abs?path=${encodeURIComponent(e)}`),GJe=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,VJe=(e,n,t,r)=>XN(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),WJe=(e,n,t,r={})=>yd(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),KJe=(e,n,t={})=>It(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),YJe=()=>Ct("/api/latex/engine"),XJe=(e,n,t={})=>It(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),ZJe=()=>Ct("/api/overleaf/settings"),ez=e=>It("/api/overleaf/token",{token:e}),QJe=()=>fetch("/api/overleaf/token",{method:"DELETE"}).then(e=>Fi(e)),JJe=(e,n,t={})=>Ct(`/api/projects/${e}/file/overleaf?${Fc(t,new URLSearchParams({path:n}))}`),eet=(e,n,t)=>It(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),tet=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf?${Fc(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>Fi(r)),net=(e,n,t={})=>It(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),ret=(e,n,t={})=>Ct(`/api/projects/${e}/file/overleaf/status?${Fc(t,new URLSearchParams({path:n}))}`),set=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${Fc(t,new URLSearchParams({path:n}))}`,Vb=(e,n={})=>{const t=Fc(n).toString();return Ct(`/api/projects/${e}/code-tree${t?`?${t}`:""}`)},tz=e=>Ct(`/api/chat/sessions/${e}/worktree`),tm=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,iet=()=>Ct("/api/settings/hf"),aet=e=>It("/api/settings/hf",{token:e}),oet=()=>Ct("/api/update"),cet=()=>It("/api/update/apply"),uet=e=>It("/api/update/auto",{enabled:e}),det=(e=!1)=>It("/api/update/install-cli",{force:e}),fet=()=>Ct("/api/settings/k8s"),het=e=>It("/api/settings/k8s",e),_et=()=>Ct("/api/settings/modal"),pet=()=>It("/api/settings/modal/provision"),met=()=>Ct("/api/settings/env").then(e=>e.vars),nz=(e,n)=>It("/api/settings/env",{key:e,value:n}).then(t=>t.vars),get=e=>fetch(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Fi(n)).then(n=>n.vars),vet=()=>Ct("/api/settings/data-dir"),bet=e=>It("/api/settings/data-dir/validate",{path:e}),xet=e=>It("/api/settings/data-dir/move",{path:e}),rz=()=>Ct("/api/settings/ssh").then(e=>e.hosts),yet=()=>Ct("/api/settings/ssh/config"),wet=(e,n)=>XN("/api/settings/ssh/config",{content:e,previousContent:n}),ket=e=>Ct(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`),Cet=()=>Ct("/_orx/runtime"),Eet=()=>Ct("/api/remote/sessions").then(e=>e.sessions),Net=(e,n)=>It("/api/remote/sessions",{host:e,uiPreferences:n}),zet=e=>It("/_orx/install",e),jet=()=>It("/_orx/reconnect"),sz=()=>It("/_orx/disconnect"),Aet=()=>It("/_orx/start-host"),iz=()=>Ct("/_orx/stop-host"),az=e=>It("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),Tet=()=>Ct("/api/settings/slurm"),Met=e=>It("/api/settings/slurm",e),Ret=()=>Ct("/api/settings/ray"),Det=e=>It("/api/settings/ray",e),Let=e=>It("/api/settings/ray/preflight",{address:e??null}),Oet=e=>Ct(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`),Iet=e=>It("/api/settings/compute/default",e),Bet=()=>Ct("/api/settings/local"),$et=()=>Ct("/api/settings/openresearch"),gS=e=>Ct(`/api/projects/${e}/files`),Het=(e,n)=>fetch(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Fi(t)),Pet=(e,n,t)=>yd(`/api/projects/${e}/files`,{path:n,...t}),Lh=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,oz=512e3,Fet=(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}}},lz=(e,n)=>fetch(Lh(e,n),{headers:{Range:`bytes=0-${oz-1}`}}).then(t=>{var s;if(t.status===404)return null;if(t.status===416&&t.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!t.ok)throw new Error(`HTTP ${t.status}`);const r=Number((s=t.headers.get("content-range"))==null?void 0:s.split("/").pop());return t.arrayBuffer().then(a=>Fet(a,Number.isFinite(r)&&r>a.byteLength))}),Uet=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",qet=(e,n)=>fetch(Lh(e,n),{method:"HEAD"}).then(t=>{if(t.status===404)return null;if(!t.ok)throw new Error(`HTTP ${t.status}`);const r=t.headers.get("x-openresearch-presentation");return{size:Number(t.headers.get("content-length"))||0,presentation:Uet(r)?r:"download"}}),Get=()=>Ct("/api/settings/profile"),Vet=()=>Ct("/api/settings/lit-sources"),Wet=e=>It("/api/settings/lit-sources",e),Yx=()=>Ct("/api/settings/projects"),cz=(e,n)=>It("/api/settings/projects",{githubForNewProjects:e,githubDefaultPromptSeen:n}),Ket=e=>Ct(`/api/projects/${e}/git`),Yet=e=>It(`/api/projects/${e}/git/init`),Xet=e=>It(`/api/projects/${e}/github`),Zet=e=>It(`/api/projects/${e}/github/disable`),Qet=()=>Ct("/api/settings/telemetry"),Jet=e=>It("/api/settings/telemetry",{enabled:e}),fp=e=>e.displayName??fz(e.id),hp="default";function nm(e,n){var l,o,c;const t=e==null?void 0:e.models.find(d=>d.id===n),r=(t==null?void 0:t.reasoningLevels)??((l=e==null?void 0:e.options)==null?void 0:l.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,a=s&&r.some(d=>d.id===s)?s:r.some(d=>d.id===hp)?hp:((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:a}}const Wb="default";function uz(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:Wb,label:Z9e(),description:W9e()},...t]:[]}function _p(e,n,t){var a;if(!e)return t??null;if(e.id!=="codex"||((a=e.models.find(l=>l.id===n))==null?void 0:a.serviceTiers)===void 0)return null;const s=uz(e,n);return s.length===0?Wb:t!=null&&s.some(l=>l.id===t)?t:Wb}function dz(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=nm(e,n);return r.length===0?hp:t&&r.some(a=>a.id===t)?t:s}const pp=(e=!1,n=!1)=>{const t=new URLSearchParams;e&&t.set("refresh","1"),n&&t.set("retry","1");const r=t.size>0?`?${t.toString()}`:"";return Ct(`/api/harnesses${r}`).then(s=>s.harnesses)},ett=()=>Ct("/api/skills").then(e=>e.skills),ttt=(e,n)=>Ct(`/api/skills/${encodeURIComponent(e)}${n?`?project=${encodeURIComponent(n)}`:""}`).then(t=>t.content),ntt=()=>Ct("/api/latex-templates").then(e=>e.templates),rtt=e=>It("/api/latex-templates",e).then(n=>n.template),stt=e=>fetch(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Fi(n)),itt=()=>Ct("/api/user-skills").then(e=>e.skills),att=e=>It("/api/user-skills",e).then(n=>n.skill),ott=e=>fetch(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Fi(n));function fz(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 V0=e=>Ct(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`).then(n=>n.sessions),ltt=(e,n,t={})=>It("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),ctt=e=>fetch(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>Fi(n)),utt=(e,n)=>yd(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),dtt=(e,n)=>yd(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),ftt=(e,n)=>yd(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),htt=(e,n)=>yd(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),Hu=e=>Ct(`/api/chat/sessions/${e}/messages`).then(n=>({messages:n.messages,queued:n.queued??[],activeLeafId:n.activeLeafId??null})),_tt=(e,n)=>fetch(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Fi(t)),ptt=(e,n)=>It(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),mtt=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,vS=(e,n,t={},r,s,a,l)=>It(`/api/chat/sessions/${e}/message`,{text:n,clientTurnId:a,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:r,annotations:s,mode:l}),gtt=(e,n)=>It(`/api/chat/sessions/${e}/shell`,{command:n}),vtt=(e,n,t,r={})=>It(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),btt=(e,n,t)=>It(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),xtt=(e,n)=>It(`/api/chat/sessions/${e}/branch`,{leafId:n}),ytt=e=>It(`/api/chat/sessions/${e}/interrupt`),wtt=(e,n)=>It(`/api/chat/sessions/${e}/respond`,n);function La(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 mp(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return Vle({value:Yt(n)});const t=Math.floor(n/60);if(t<60)return Fle({value:Yt(t)});const r=Math.floor(t/60);return r<24?Ble({hours:Yt(r),minutes:Yt(t%60)}):Dle({days:Yt(Math.floor(r/24)),hours:Yt(r%24)})}function Ta(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&r{rd==="system"&&Zx()});Zx();function Ntt(e){return Kb.add(e),()=>Kb.delete(e)}function pz(){return[M.useSyncExternalStore(Ntt,()=>rd,()=>rd),_z]}var Il=xE();const ztt=Th(Il);function Qx(){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 hv(){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(Qx,{}),"OpenResearch"]})}function jtt(e,n){if(!n)return e;const t=new Map(e.map(a=>[a.id,a]));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 Att(e,n,t){var l;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,a=(l=t.get(s))==null?void 0:l.filter(o=>o.role===e.role);return a!=null&&a.length?a:[e]}function Ttt(e,n,t,r){const s=e.filter(d=>!r(d.id)),a=new Map(s.map(d=>[d.id,d])),l=new Map;for(const d of s){const _=d.parentId??null,h=l.get(_);h?h.push(d):l.set(_,[d])}const o=new Set(n.map(d=>d.id)),c=new Map;for(const d of t){const _=Att(d,a,l),h=_.findIndex(m=>o.has(m.id));c.set(d.id,{count:_.length,index:h,prevId:h>0?_[h-1].id:void 0,nextId:h<_.length-1?_[h+1].id:void 0})}return c}function gp(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 Oh(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function mz(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||Oh(r)||!gp(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function gz(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=mz(n.parts);return t?{messageId:n.id,toolId:t}:null}function Mtt(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"||Oh(r)))return r.type==="text"&&!!r.text}return!1}const W0=new Map;function Rtt(e,n){let t=W0.get(e);return t||(t=new Set,W0.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&W0.delete(e)}}function Dtt(e){var n;(n=W0.get(e.runId))==null||n.forEach(t=>t(e))}const Yb=new Set;function Jf(e){return Yb.add(e),()=>{Yb.delete(e)}}function _l(e){Yb.forEach(n=>n(e))}function vz(e,n,t,r){const s=M.useRef(r);s.current=r,M.useEffect(()=>{if(!t||!n)return;let a=!1,l=!1,o=!1,c=null;const d=()=>{c&&clearInterval(c),c=null},_=()=>{c||(c=setInterval(()=>s.current(),5e3))},h=()=>{l=!1,V0(e).then(g=>{var S;a||l||(o=!!((S=g.find(k=>k.id===n))!=null&&S.busy),o?_():d())}).catch(()=>{})},m=Jf(g=>{if(g.type==="reconnected"){s.current(),h();return}g.type!=="busy"||g.sessionId!==n||(l=!0,g.busy!==o&&(o=g.busy,o?_():(d(),s.current())))});return h(),()=>{a=!0,m(),d()}},[t,e,n])}const Xb=new Set;function Ltt(e){return Xb.add(e),()=>{Xb.delete(e)}}function pl(){Xb.forEach(e=>e())}const Zb=new Set;function Jx(e){return Zb.add(e),()=>{Zb.delete(e)}}function bS(e){Zb.forEach(n=>n(e))}const Qb=new Set;function Ott(e){return Qb.add(e),()=>{Qb.delete(e)}}function _v(e){Qb.forEach(n=>n(e))}const Jb=new Set;function Itt(e){return Jb.add(e),()=>{Jb.delete(e)}}function Btt(e){Jb.forEach(n=>n(e))}let e2=!0;const t2=new Set;function $tt(e){return t2.add(e),()=>{t2.delete(e)}}function xS(){return e2}function yS(e){e!==e2&&(e2=e,t2.forEach(n=>n()))}const Htt=8e3,Ptt=3e3;function Ftt(e){const n=M.useRef(e);n.current=e,M.useEffect(()=>{let t=null,r=!1,s,a,l=!1;const o=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{r||(l=!0,s??(s=window.setTimeout(()=>yS(!1),Htt)),c.readyState===EventSource.CLOSED&&a===void 0&&(a=window.setTimeout(()=>{a=void 0,o()},Ptt)))},c.onopen=()=>{var _,h;r||(window.clearTimeout(s),s=void 0,yS(!0),l&&(_l({type:"reconnected"}),pl(),bS({harness:"*",authState:"unknown"}),(h=(_=n.current).onReconnect)==null||h.call(_)),l=!0)};const d=_=>{try{return JSON.parse(_.data)}catch{return null}};c.addEventListener("run.updated",_=>{const h=d(_);h!=null&&h.run&&(pl(),n.current.onRun(h.run))}),c.addEventListener("experiment.updated",_=>{const h=d(_);h!=null&&h.experiment&&(pl(),n.current.onExperiment(h.experiment))}),c.addEventListener("project.updated",_=>{const h=d(_);h!=null&&h.project&&(pl(),n.current.onProject(h.project))}),c.addEventListener("files.updated",_=>{var m,g;const h=d(_);h!=null&&h.projectId&&((g=(m=n.current).onArtifacts)==null||g.call(m,h.projectId))}),c.addEventListener("run.log",_=>{const h=d(_);h!=null&&h.runId&&Dtt(h)}),c.addEventListener("chat.session",_=>{const h=d(_);h!=null&&h.session&&(pl(),_l({type:"session",session:h.session}))}),c.addEventListener("chat.session.deleted",_=>{const h=d(_);h!=null&&h.sessionId&&(pl(),_l({type:"sessionDeleted",sessionId:h.sessionId}))}),c.addEventListener("chat.message",_=>{const h=d(_);h!=null&&h.message&&(pl(),_l({type:"message",sessionId:h.sessionId,message:h.message}))}),c.addEventListener("chat.busy",_=>{const h=d(_);h!=null&&h.sessionId&&(pl(),_l({type:"busy",sessionId:h.sessionId,busy:h.busy}))}),c.addEventListener("chat.usage",_=>{const h=d(_);h!=null&&h.sessionId&&h.usage&&_l({type:"usage",sessionId:h.sessionId,usage:h.usage})}),c.addEventListener("chat.queued",_=>{const h=d(_);h!=null&&h.sessionId&&_l({type:"queued",sessionId:h.sessionId,items:h.items??[]})}),c.addEventListener("chat.branch",_=>{const h=d(_);h!=null&&h.sessionId&&_l({type:"branch",sessionId:h.sessionId,activeLeafId:h.activeLeafId??null})}),c.addEventListener("harness.auth",_=>{const h=d(_);h!=null&&h.harness&&h.authState&&bS(h)}),c.addEventListener("datadir.move.progress",_=>{const h=d(_);h&&_v({type:"progress",...h})}),c.addEventListener("datadir.move.done",_=>{const h=d(_);h&&_v({type:"done",path:h.path,oldPathLeft:h.oldPathLeft})}),c.addEventListener("datadir.move.error",_=>{const h=d(_);h&&_v({type:"error",error:h.error})}),c.addEventListener("update.status",_=>{const h=d(_);h&&Btt(h)})};return o(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(a),t==null||t.close()}},[])}const Ea=e=>new Intl.NumberFormat(E()).format(e);function Utt(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?z9e():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?x9e({attempt:Ea(e.attempt),maximum:Ea(e.maximum),seconds:Ea(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?m9e({attempt:Ea(e.attempt),maximum:Ea(e.maximum)}):typeof e.attempt=="number"&&t!=null?k9e({attempt:Ea(e.attempt),seconds:Ea(t)}):typeof e.attempt=="number"?f9e({attempt:Ea(e.attempt)}):t!=null?M9e({seconds:Ea(t)}):sN()}function qtt(e,n){if(typeof e!="number")return O9e();const t=Math.max(0,Math.ceil((e-n)/1e3));return H9e({seconds:Ea(t)})}function bz(e){return e==="retry"||e==="continue"?e:null}function Gtt(e){const n={};return e.model!==void 0&&(n.model=e.model),e.serviceTier!==void 0&&(n.serviceTier=e.serviceTier),e.permissionMode!==void 0&&(n.permissionMode=e.permissionMode),e.planMode!==void 0&&(n.planMode=e.planMode),e.reasoningLevel!==void 0&&(n.reasoningLevel=e.reasoningLevel),n}function Vtt(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function wS(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"?e:void 0}function Wtt(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 ey(e){const n=[];let t="",r=!1,s=null;const a=()=>{r&&n.push(t),t="",r=!1};for(let l=0;l"||o==="&")break;/\s/.test(o)?a():(t+=o,r=!0)}return a(),n}function Ktt(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=ey(e);if(t.length===1)return t[0]}return e}function Ytt(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 sd(e){return Ytt(typeof e=="string"?ey(e):e)}function Xtt(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 Ztt(e,n){const t=sd(e);return t===null?!1:n.split("\\s+").every((s,a)=>t[a]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[a]))}function Qtt(e){var c;const n=sd(e);if(!n)return null;const t=n[0];if(t!=="paper"&&t!=="discover")return null;let r;const s=[],a=new Set(["--limit","--published-after","--published-before","--prioritize"]);for(let d=1;d + + + + +`,ent='',tnt=` + + +`,xz={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv"},nnt={alphaxiv:Jtt,openalex:tnt,biorxiv:ent};function yz({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":xz[e]},dangerouslySetInnerHTML:{__html:nnt[e]}})}function rnt(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 snt(e,n){const t=n.trim();if(e==="alphaxiv"){const a=(t.split(/[?#]/)[0].split("/").pop()||t).replace(/\.(pdf|md)$/i,"");return`https://www.alphaxiv.org/abs/${encodeURIComponent(a)}`}const r=rnt(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 int=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),wz=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),vp="-",SS=[],ont="arbitrary..",lnt=e=>{const n=unt(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return cnt(l);const o=l.split(vp),c=o[0]===""&&o.length>1?1:0;return Sz(o,c,n)},getConflictingClassGroupIds:(l,o)=>{if(o){const c=r[l],d=t[l];return c?d?int(d,c):c:d||SS}return t[l]||SS}}},Sz=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],a=t.nextPart.get(s);if(a){const d=Sz(e,n+1,a);if(d)return d}const l=t.validators;if(l===null)return;const o=n===0?e.join(vp):e.slice(n).join(vp),c=l.length;for(let d=0;de.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?ont+r:void 0})(),unt=e=>{const{theme:n,classGroups:t}=e;return dnt(t,n)},dnt=(e,n)=>{const t=wz();for(const r in e){const s=e[r];ty(s,t,r,n)}return t},ty=(e,n,t,r)=>{const s=e.length;for(let a=0;a{if(typeof e=="string"){hnt(e,n,t);return}if(typeof e=="function"){_nt(e,n,t,r);return}pnt(e,n,t,r)},hnt=(e,n,t)=>{const r=e===""?n:kz(n,e);r.classGroupId=t},_nt=(e,n,t,r)=>{if(mnt(e)){ty(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(ant(t,e))},pnt=(e,n,t,r)=>{const s=Object.entries(e),a=s.length;for(let l=0;l{let t=e;const r=n.split(vp),s=r.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,gnt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const s=(a,l)=>{t[a]=l,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(a){let l=t[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return s(a,l),l},set(a,l){a in t?t[a]=l:s(a,l)}}},n2="!",kS=":",vnt=[],CS=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),bnt=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const a=[];let l=0,o=0,c=0,d;const _=s.length;for(let k=0;k<_;k++){const b=s[k];if(l===0&&o===0){if(b===kS){a.push(s.slice(c,k)),c=k+1;continue}if(b==="/"){d=k;continue}}b==="["?l++:b==="]"?l--:b==="("?o++:b===")"&&o--}const h=a.length===0?s:s.slice(c);let m=h,g=!1;h.endsWith(n2)?(m=h.slice(0,-1),g=!0):h.startsWith(n2)&&(m=h.slice(1),g=!0);const S=d&&d>c?d-c:void 0;return CS(a,g,m,S)};if(n){const s=n+kS,a=r;r=l=>l.startsWith(s)?a(l.slice(s.length)):CS(vnt,!1,l,void 0,!0)}if(t){const s=r;r=a=>t({className:a,parseClassName:s})}return r},xnt=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{n.set(t,1e6+r)}),t=>{const r=[];let s=[];for(let a=0;a0&&(s.sort(),r.push(...s),s=[]),r.push(l)):s.push(l)}return s.length>0&&(s.sort(),r.push(...s)),r}},ynt=e=>({cache:gnt(e.cacheSize),parseClassName:bnt(e),sortModifiers:xnt(e),postfixLookupClassGroupIds:wnt(e),...lnt(e)}),wnt=e=>{const n=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let r=0;r{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:a,postfixLookupClassGroupIds:l}=n,o=[],c=e.trim().split(Snt);let d="";for(let _=c.length-1;_>=0;_-=1){const h=c[_],{isExternal:m,modifiers:g,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:b}=t(h);if(m){d=h+(d.length>0?" "+d:d);continue}let v=!!b,x;if(v){const T=k.substring(0,b);x=r(T);const z=x&&l[x]?r(k):void 0;z&&z!==x&&(x=z,v=!1)}else x=r(k);if(!x){if(!v){d=h+(d.length>0?" "+d:d);continue}if(x=r(k),!x){d=h+(d.length>0?" "+d:d);continue}v=!1}const y=g.length===0?"":g.length===1?g[0]:a(g).join(":"),C=S?y+n2:y,j=C+x;if(o.indexOf(j)>-1)continue;o.push(j);const N=s(x,v);for(let T=0;T0?" "+d:d)}return d},Cnt=(...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,a;const l=c=>{const d=n.reduce((_,h)=>h(_),e());return t=ynt(d),r=t.cache.get,s=t.cache.set,a=o,o(c)},o=c=>{const d=r(c);if(d)return d;const _=knt(c,t);return s(c,_),_};return a=l,(...c)=>a(Cnt(...c))},Nnt=[],Yr=e=>{const n=t=>t[e]||Nnt;return n.isThemeGetter=!0,n},Ez=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Nz=/^\((?:(\w[\w-]*):)?(.+)\)$/i,znt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,jnt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ant=/\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$/,Tnt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Mnt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rnt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ml=e=>znt.test(e),an=e=>!!e&&!Number.isNaN(Number(e)),Sa=e=>!!e&&Number.isInteger(Number(e)),pv=e=>e.endsWith("%")&&an(e.slice(0,-1)),ho=e=>jnt.test(e),zz=()=>!0,Dnt=e=>Ant.test(e)&&!Tnt.test(e),ny=()=>!1,Lnt=e=>Mnt.test(e),Ont=e=>Rnt.test(e),Int=e=>!ct(e)&&!ut(e),Bnt=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)),$nt=e=>Bl(e,Tz,ny),ct=e=>Ez.test(e),hc=e=>Bl(e,Mz,Dnt),ES=e=>Bl(e,Wnt,an),Hnt=e=>Bl(e,Dz,zz),Pnt=e=>Bl(e,Rz,ny),NS=e=>Bl(e,jz,ny),Fnt=e=>Bl(e,Az,Ont),d0=e=>Bl(e,Lz,Lnt),ut=e=>Nz.test(e),yf=e=>Uc(e,Mz),Unt=e=>Uc(e,Rz),zS=e=>Uc(e,jz),qnt=e=>Uc(e,Tz),Gnt=e=>Uc(e,Az),f0=e=>Uc(e,Lz,!0),Vnt=e=>Uc(e,Dz,!0),Bl=(e,n,t)=>{const r=Ez.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},Uc=(e,n,t=!1)=>{const r=Nz.exec(e);return r?r[1]?n(r[1]):t:!1},jz=e=>e==="position"||e==="percentage",Az=e=>e==="image"||e==="url",Tz=e=>e==="length"||e==="size"||e==="bg-size",Mz=e=>e==="length",Wnt=e=>e==="number",Rz=e=>e==="family-name",Dz=e=>e==="number"||e==="weight",Lz=e=>e==="shadow",Knt=()=>{const e=Yr("color"),n=Yr("font"),t=Yr("text"),r=Yr("font-weight"),s=Yr("tracking"),a=Yr("leading"),l=Yr("breakpoint"),o=Yr("container"),c=Yr("spacing"),d=Yr("radius"),_=Yr("shadow"),h=Yr("inset-shadow"),m=Yr("text-shadow"),g=Yr("drop-shadow"),S=Yr("blur"),k=Yr("perspective"),b=Yr("aspect"),v=Yr("ease"),x=Yr("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"],j=()=>[...C(),ut,ct],N=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],z=()=>[ut,ct,c],D=()=>[ml,"full","auto",...z()],O=()=>[Sa,"none","subgrid",ut,ct],H=()=>["auto",{span:["full",Sa,ut,ct]},Sa,ut,ct],P=()=>[Sa,"auto",ut,ct],F=()=>["auto","min","max","fr",ut,ct],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...z()],X=()=>[ml,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],J=()=>[ml,"screen","full","dvw","lvw","svw","min","max","fit",...z()],$=()=>[ml,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],L=()=>[e,ut,ct],B=()=>[...C(),zS,NS,{position:[ut,ct]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",qnt,$nt,{size:[ut,ct]}],ie=()=>[pv,yf,hc],le=()=>["","none","full",d,ut,ct],ae=()=>["",an,yf,hc],re=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[an,pv,zS,NS],ce=()=>["","none",S,ut,ct],_e=()=>["none",an,ut,ct],de=()=>["none",an,ut,ct],ve=()=>[an,ut,ct],Ce=()=>[ml,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ho],breakpoint:[ho],color:[zz],container:[ho],"drop-shadow":[ho],ease:["in","out","in-out"],font:[Int],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ho],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ho],shadow:[ho],spacing:["px",an],text:[ho],"text-shadow":[ho],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ml,ct,ut,b]}],container:["container"],"container-type":[{"@container":["","normal","size",ut,ct]}],"container-named":[Bnt],columns:[{columns:[an,ct,ut,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:j()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Sa,"auto",ut,ct]}],basis:[{basis:[ml,"full","auto",o,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[an,ml,"auto","initial","none",ct]}],grow:[{grow:["",an,ut,ct]}],shrink:[{shrink:["",an,ut,ct]}],order:[{order:[Sa,"first","last","none",ut,ct]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mbs:[{mbs:U()}],mbe:[{mbe:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...J()]}],"min-inline-size":[{"min-inline":["auto",...J()]}],"max-inline-size":[{"max-inline":["none",...J()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[o,"screen",...X()]}],"min-w":[{"min-w":[o,"screen","none",...X()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[l]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",t,yf,hc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Vnt,Hnt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pv,ct]}],"font-family":[{font:[Unt,Pnt,n]}],"font-features":[{"font-features":[ct]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ut,ct]}],"line-clamp":[{"line-clamp":[an,"none",ut,ES]}],leading:[{leading:[a,...z()]}],"list-image":[{"list-image":["none",ut,ct]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ut,ct]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[an,"from-font","auto",ut,hc]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[an,"auto",ut,ct]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"tab-size":[{tab:[Sa,ut,ct]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ut,ct]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ut,ct]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Sa,ut,ct],radial:["",ut,ct],conic:[Sa,ut,ct]},Gnt,Fnt]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"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:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[an,ut,ct]}],"outline-w":[{outline:["",an,yf,hc]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",_,f0,d0]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",h,f0,d0]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[an,hc]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",m,f0,d0]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[an,ut,ct]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[an]}],"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":[ut,ct]}],"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":[an]}],"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:B()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ut,ct]}],filter:[{filter:["","none",ut,ct]}],blur:[{blur:ce()}],brightness:[{brightness:[an,ut,ct]}],contrast:[{contrast:[an,ut,ct]}],"drop-shadow":[{"drop-shadow":["","none",g,f0,d0]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",an,ut,ct]}],"hue-rotate":[{"hue-rotate":[an,ut,ct]}],invert:[{invert:["",an,ut,ct]}],saturate:[{saturate:[an,ut,ct]}],sepia:[{sepia:["",an,ut,ct]}],"backdrop-filter":[{"backdrop-filter":["","none",ut,ct]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[an,ut,ct]}],"backdrop-contrast":[{"backdrop-contrast":[an,ut,ct]}],"backdrop-grayscale":[{"backdrop-grayscale":["",an,ut,ct]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[an,ut,ct]}],"backdrop-invert":[{"backdrop-invert":["",an,ut,ct]}],"backdrop-opacity":[{"backdrop-opacity":[an,ut,ct]}],"backdrop-saturate":[{"backdrop-saturate":[an,ut,ct]}],"backdrop-sepia":[{"backdrop-sepia":["",an,ut,ct]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ut,ct]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[an,"initial",ut,ct]}],ease:[{ease:["linear","initial",v,ut,ct]}],delay:[{delay:[an,ut,ct]}],animate:[{animate:["none",x,ut,ct]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,ut,ct]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[ut,ct,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":["translate-none"],zoom:[{zoom:[Sa,ut,ct]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ut,ct]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ut,ct]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[an,yf,hc,ES]}],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"]}},Ynt=Ent(Knt);function us(...e){return Ynt(...e)}const Xnt={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 Ot({variant:e="default",className:n,...t}){return f.jsx("span",{className:us("badge inline-flex items-center rounded-full border px-2 py-px font-sans text-sm font-medium",Xnt[e],n),...t})}const Znt=["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(" "),Qnt={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"},Jnt={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 Oz(e,n,t,r){return us(Znt,Qnt[e],Jnt[n],t&&"active",r)}function $e({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("button",{className:Oz(n,t,e,r),...s})}function r2({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("a",{className:Oz(n,t,e,r),...s})}const ert=["icon-btn relative inline-flex shrink-0 items-center justify-center","transition-[background,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45","[.chat-header.rail-hidden_>_&:first-child]:me-3"].join(" "),trt={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"},nrt={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function Iz(e,n,t,r){return us(ert,trt[e],nrt[n],t&&"active",r)}const Kt=M.forwardRef(function({active:n=!1,size:t="default",variant:r="default",className:s,...a},l){return f.jsx("button",{ref:l,className:Iz(r,t,n,s),...a})});function rm({active:e=!1,size:n="default",variant:t="default",className:r,...s}){return f.jsx("a",{className:Iz(t,n,e,r),...s})}const rrt={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 id({variant:e="default",className:n,...t}){return f.jsx("input",{className:us("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",rrt[e],n),...t})}function Nr({active:e=!1,danger:n=!1,className:t,...r}){return f.jsx("button",{className:us("model-item flex min-h-8 w-full items-center justify-between gap-2 rounded-sm px-2 py-1.5 text-start text-sm 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",e&&"bg-surface",n&&"text-accent-red hover:text-accent-red",t),...r})}function Dt({className:e,...n}){return f.jsx("span",{className:us("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 jr({className:e,...n}){return f.jsx("div",{className:us("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const srt={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 ry({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return f.jsxs("span",{className:us("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[f.jsx("span",{className:us("h-[7px] w-[7px] shrink-0 rounded-full bg-current",srt[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const irt=["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 Bz(e,n){return us(irt,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function sy({checked:e=!1,className:n,children:t,...r}){return f.jsx("button",{role:"switch","aria-checked":e,className:Bz(e,n),...r,children:t??f.jsx("span",{})})}function art({checked:e=!1,className:n,...t}){return f.jsx("span",{className:Bz(e,n),...t,children:f.jsx("span",{})})}function ort(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 lrt=e=>{switch(e){case"success":return drt;case"info":return hrt;case"warning":return frt;case"error":return _rt;default:return null}},crt=Array(12).fill(0),urt=({visible:e,className:n})=>Qe.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},Qe.createElement("div",{className:"sonner-spinner"},crt.map((t,r)=>Qe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),drt=Qe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Qe.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"})),frt=Qe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Qe.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"})),hrt=Qe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Qe.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"})),_rt=Qe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Qe.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"})),prt=Qe.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"},Qe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Qe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),mrt=()=>{const[e,n]=Qe.useState(document.hidden);return Qe.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let grt=1;const vrt=100,jS=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:grt++};class brt{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-vrt;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=jS(n),a=this.pendingDismissals.get(s);a!==void 0&&(cancelAnimationFrame(a),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const l=this.dismissedToasts.has(s),o=n.dismissible===void 0?!0:n.dismissible;return l&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(d=>d.id!==s)),(l?void 0:this.toasts.find(d=>d.id===s))?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...n,id:s,title:t}),{...d,...n,id:s,dismissible:o,title:t}):d):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 a=r!==void 0,l;const o=s.then(async d=>{if(l=["resolve",d],Qe.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(yrt(d)&&!d.ok){a=!1;const h=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description,S=typeof h=="object"&&!Qe.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:m,...S})}else if(d instanceof Error){a=!1;const h=typeof t.error=="function"?await t.error(d):t.error,m=typeof t.description=="function"?await t.description(d):t.description,S=typeof h=="object"&&!Qe.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:m,...S})}else if(t.success!==void 0){a=!1;const h=typeof t.success=="function"?await t.success(d):t.success,m=typeof t.description=="function"?await t.description(d):t.description,S=typeof h=="object"&&!Qe.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:m,...S})}}).catch(async d=>{if(l=["reject",d],t.error!==void 0){a=!1;const _=typeof t.error=="function"?await t.error(d):t.error,h=typeof t.description=="function"?await t.description(d):t.description,g=typeof _=="object"&&!Qe.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:h,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((d,_)=>o.then(()=>l[0]==="reject"?_(l[1]):d(l[1])).catch(_));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=jS(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 Xs=new brt,xrt=(e,n)=>Xs.message(e,n),yrt=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",wrt=xrt,Srt=()=>Xs.toasts,krt=()=>Xs.getActiveToasts(),Crt=Object.assign(wrt,{success:Xs.success,info:Xs.info,warning:Xs.warning,error:Xs.error,custom:Xs.custom,message:Xs.message,promise:Xs.promise,dismiss:Xs.dismiss,loading:Xs.loading},{getHistory:Srt,getToasts:krt});ort("[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 h0(e){return e.label!==void 0}const Ert=3,Nrt="24px",zrt="16px",AS=4e3,jrt=356,Art=14,Trt=45,Mrt=200;function ka(...e){return e.filter(Boolean).join(" ")}function Rrt(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const Drt=e=>{var n,t,r,s,a,l,o,c,d;const{invert:_,toast:h,unstyled:m,interacting:g,setHeights:S,visibleToasts:k,heights:b,index:v,toasts:x,expanded:y,removeToast:C,defaultRichColors:j,closeButton:N,style:T,cancelButtonStyle:z,actionButtonStyle:D,className:O="",descriptionClassName:H="",duration:P,position:F,gap:W,expandByDefault:Z,classNames:U,icons:X,closeButtonAriaLabel:J="Close toast"}=e,[$,L]=Qe.useState(null),[B,Y]=Qe.useState(null),[V,ie]=Qe.useState(!1),[le,ae]=Qe.useState(!1),[re,q]=Qe.useState(!1),[oe,ce]=Qe.useState(!1),[_e,de]=Qe.useState(!1),[ve,Ce]=Qe.useState(0),[Le,Ue]=Qe.useState(0),He=Qe.useRef(h.duration||P||AS),Bt=Qe.useRef(null),Et=Qe.useRef(null),Nt=v===0,cn=v+1<=k,vt=h.type,rt=vt??"default",Je=h.dismissible!==!1,qt=h.className||"",we=h.descriptionClassName||"",Oe=Qe.useMemo(()=>b.findIndex(dt=>dt.toastId===h.id)||0,[b,h.id]),Xe=Qe.useMemo(()=>{var dt;return(dt=h.closeButton)!=null?dt:N},[h.closeButton,N]),st=Qe.useMemo(()=>h.duration||P||AS,[h.duration,P]),tt=Qe.useRef(0),zt=Qe.useRef(0),bt=Qe.useRef(0),Rt=Qe.useRef(null),[et,Vt]=F.split("-"),jt=Qe.useMemo(()=>b.reduce((dt,un,Ye)=>Ye>=Oe?dt:dt+un.height,0),[b,Oe]),Gn=mrt(),nn=Qe.useMemo(()=>{var dt;return(dt=e.swipeDirections)!=null?dt:Rrt(F)},[e.swipeDirections,F]),ur=h.invert||_,yr=vt==="loading";zt.current=Qe.useMemo(()=>Oe*W+jt,[Oe,jt]),Qe.useEffect(()=>{He.current=st},[st]),Qe.useEffect(()=>{ie(!0)},[]),Qe.useEffect(()=>{const dt=Et.current;if(dt){const un=dt.getBoundingClientRect().height;return Ue(un),S(Ye=>[{toastId:h.id,height:un,position:h.position},...Ye]),()=>S(Ye=>Ye.filter(at=>at.toastId!==h.id))}},[S,h.id]),Qe.useLayoutEffect(()=>{if(!V)return;const dt=Et.current,un=dt.style.height;dt.style.height="auto";const Ye=dt.getBoundingClientRect().height;dt.style.height=un,Ue(Ye),S(at=>at.find($t=>$t.toastId===h.id)?at.map($t=>$t.toastId===h.id?{...$t,height:Ye}:$t):[{toastId:h.id,height:Ye,position:h.position},...at])},[V,h.title,h.description,S,h.id,h.jsx,h.action,h.cancel]);const An=Qe.useCallback(()=>{ae(!0),Ce(zt.current),S(dt=>dt.filter(un=>un.toastId!==h.id)),setTimeout(()=>{C(h)},Mrt)},[h,C,S,zt]);Qe.useEffect(()=>{if(h.promise&&vt==="loading"||h.duration===1/0||h.type==="loading")return;let dt;return y||g||Gn?(()=>{if(bt.current{He.current!==1/0&&(tt.current=new Date().getTime(),dt=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),An()},He.current))})(),()=>clearTimeout(dt)},[y,g,h,vt,Gn,An]),Qe.useEffect(()=>{h.delete&&(An(),h.onDismiss==null||h.onDismiss.call(h,h))},[An,h.delete]);function Vn(){var dt;if(X!=null&&X.loading){var un;return Qe.createElement("div",{className:ka(U==null?void 0:U.loader,h==null||(un=h.classNames)==null?void 0:un.loader,"sonner-loader"),"data-visible":vt==="loading"},X.loading)}return Qe.createElement(urt,{className:ka(U==null?void 0:U.loader,h==null||(dt=h.classNames)==null?void 0:dt.loader),visible:vt==="loading"})}const rn=h.icon||(X==null?void 0:X[vt])||lrt(vt);var wn,Sn;return Qe.createElement("li",{tabIndex:0,ref:Et,className:ka(O,qt,U==null?void 0:U.toast,h==null||(n=h.classNames)==null?void 0:n.toast,U==null?void 0:U[rt],h==null||(t=h.classNames)==null?void 0:t[rt]),"data-sonner-toast":"","data-rich-colors":(wn=h.richColors)!=null?wn:j,"data-styled":!(h.jsx||h.unstyled||m),"data-mounted":V,"data-promise":!!h.promise,"data-swiped":_e,"data-removed":le,"data-visible":cn,"data-y-position":et,"data-x-position":Vt,"data-index":v,"data-front":Nt,"data-swiping":re,"data-dismissible":Je,"data-type":vt,"data-invert":ur,"data-swipe-out":oe,"data-swipe-direction":B,"data-expanded":!!(y||Z&&V),"data-testid":h.testId,style:{"--index":v,"--toasts-before":v,"--z-index":x.length-v,"--offset":`${le?ve:zt.current}px`,"--initial-height":Z?"auto":`${Le}px`,...T,...h.style},onDragEnd:()=>{q(!1),L(null),Rt.current=null},onPointerDown:dt=>{dt.button!==2&&(yr||!Je||(Bt.current=new Date,Ce(zt.current),dt.target.setPointerCapture(dt.pointerId),dt.target.tagName!=="BUTTON"&&(q(!0),Rt.current={x:dt.clientX,y:dt.clientY})))},onPointerUp:()=>{var dt,un,Ye;if(oe||!Je)return;Rt.current=null;const at=Number(((dt=Et.current)==null?void 0:dt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),on=Number(((un=Et.current)==null?void 0:un.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),$t=new Date().getTime()-((Ye=Bt.current)==null?void 0:Ye.getTime()),Tt=$==="x"?at:on,Tn=Math.abs(Tt)/$t;if(($==="x"?nn.includes(at>0?"right":"left"):nn.includes(on>0?"bottom":"top"))&&(Math.abs(Tt)>=Trt||Tn>.11)){Ce(zt.current),h.onDismiss==null||h.onDismiss.call(h,h),Y($==="x"?at>0?"right":"left":on>0?"down":"up"),An(),ce(!0);return}else{var kn,Ur;(kn=Et.current)==null||kn.style.setProperty("--swipe-amount-x","0px"),(Ur=Et.current)==null||Ur.style.setProperty("--swipe-amount-y","0px")}de(!1),q(!1),L(null)},onPointerMove:dt=>{var un,Ye,at;if(!Rt.current||!Je||((un=window.getSelection())==null?void 0:un.toString().length)>0)return;const $t=dt.clientY-Rt.current.y,Tt=dt.clientX-Rt.current.x;!$&&(Math.abs(Tt)>1||Math.abs($t)>1)&&L(Math.abs(Tt)>Math.abs($t)?"x":"y");let Tn={x:0,y:0};const Wn=kn=>1/(1.5+Math.abs(kn)/20);if($==="y"){if(nn.includes("top")||nn.includes("bottom"))if(nn.includes("top")&&$t<0||nn.includes("bottom")&&$t>0)Tn.y=$t;else{const kn=$t*Wn($t);Tn.y=Math.abs(kn)0)Tn.x=Tt;else{const kn=Tt*Wn(Tt);Tn.x=Math.abs(kn)0||Math.abs(Tn.y)>0)&&de(!0),(Ye=Et.current)==null||Ye.style.setProperty("--swipe-amount-x",`${Tn.x}px`),(at=Et.current)==null||at.style.setProperty("--swipe-amount-y",`${Tn.y}px`)}},Xe&&!h.jsx&&vt!=="loading"?Qe.createElement("button",{"aria-label":J,"data-disabled":yr,"data-close-button":!0,onClick:yr||!Je?()=>{}:()=>{An(),h.onDismiss==null||h.onDismiss.call(h,h)},className:ka(U==null?void 0:U.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(Sn=X==null?void 0:X.close)!=null?Sn:prt):null,(vt||h.icon||h.promise)&&h.icon!==null&&((X==null?void 0:X[vt])!==null||h.icon)?Qe.createElement("div",{"data-icon":"",className:ka(U==null?void 0:U.icon,h==null||(s=h.classNames)==null?void 0:s.icon)},vt==="loading"?h.icon||Vn():h.promise?Vn():null,vt!=="loading"?rn:null):null,Qe.createElement("div",{"data-content":"",className:ka(U==null?void 0:U.content,h==null||(a=h.classNames)==null?void 0:a.content)},Qe.createElement("div",{"data-title":"",className:ka(U==null?void 0:U.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?Qe.createElement("div",{"data-description":"",className:ka(H,we,U==null?void 0:U.description,h==null||(o=h.classNames)==null?void 0:o.description)},typeof h.description=="function"?h.description():h.description):null),Qe.isValidElement(h.cancel)?h.cancel:h.cancel&&h0(h.cancel)?Qe.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||z,onClick:dt=>{h0(h.cancel)&&Je&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,dt),An())},className:ka(U==null?void 0:U.cancelButton,h==null||(c=h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,Qe.isValidElement(h.action)?h.action:h.action&&h0(h.action)?Qe.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||D,onClick:dt=>{h0(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,dt),!dt.defaultPrevented&&An())},className:ka(U==null?void 0:U.actionButton,h==null||(d=h.classNames)==null?void 0:d.actionButton)},h.action.label):null)};function TS(){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 Lrt(e,n){const t={};return[e,n].forEach((r,s)=>{const a=s===1,l=a?"--mobile-offset":"--offset",o=a?zrt:Nrt;function c(d){["top","right","bottom","left"].forEach(_=>{t[`${l}-${_}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?t[`${l}-${d}`]=o:t[`${l}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(o)}),t}const Ort=Qe.forwardRef(function(n,t){const{id:r,invert:s,position:a="bottom-right",hotkey:l=["altKey","KeyT"],expand:o,closeButton:c,className:d,offset:_,mobileOffset:h,theme:m="light",richColors:g,duration:S,style:k,visibleToasts:b=Ert,toastOptions:v,dir:x=TS(),gap:y=Art,icons:C,customAriaLabel:j,containerAriaLabel:N="Notifications"}=n,[T,z]=Qe.useState([]),D=Qe.useMemo(()=>r?T.filter(ie=>ie.toasterId===r):T.filter(ie=>!ie.toasterId),[T,r]),O=Qe.useMemo(()=>Array.from(new Set([a].concat(D.filter(ie=>ie.position).map(ie=>ie.position)))),[D,a]),[H,P]=Qe.useState([]),[F,W]=Qe.useState(!1),[Z,U]=Qe.useState(!1),[X,J]=Qe.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=Qe.useRef(null),L=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=Qe.useRef(null),Y=Qe.useRef(!1),V=Qe.useCallback(ie=>{z(le=>{var ae;return(ae=le.find(re=>re.id===ie.id))!=null&&ae.delete||Xs.dismiss(ie.id),le.filter(({id:re})=>re!==ie.id)})},[]);return Qe.useEffect(()=>Xs.subscribe(ie=>{if(ie.dismiss){requestAnimationFrame(()=>{z(le=>le.map(ae=>ae.id===ie.id?{...ae,delete:!0}:ae))});return}setTimeout(()=>{ztt.flushSync(()=>{z(le=>{const ae=le.findIndex(re=>re.id===ie.id);return ae!==-1?[...le.slice(0,ae),{...le[ae],...ie},...le.slice(ae+1)]:[ie,...le]})})})}),[]),Qe.useEffect(()=>{if(m!=="system"){J(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;const ie=window.matchMedia("(prefers-color-scheme: dark)");try{ie.addEventListener("change",({matches:le})=>{J(le?"dark":"light")})}catch{ie.addListener(({matches:ae})=>{try{J(ae?"dark":"light")}catch(re){console.error(re)}})}},[m]),Qe.useEffect(()=>{T.length<=1&&W(!1)},[T]),Qe.useEffect(()=>{const ie=le=>{var ae;if(l.length>0&&l.every(oe=>le[oe]||le.code===oe)){var q;W(!0),(q=$.current)==null||q.focus()}le.code==="Escape"&&(document.activeElement===$.current||(ae=$.current)!=null&&ae.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",ie),()=>document.removeEventListener("keydown",ie)},[l]),Qe.useEffect(()=>{if($.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,Y.current=!1)}},[$.current]),Qe.createElement("section",{ref:t,"aria-label":j??`${N} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},O.map((ie,le)=>{var ae;const[re,q]=ie.split("-");return D.length?Qe.createElement("ol",{key:ie,dir:x==="auto"?TS():x,tabIndex:-1,ref:$,className:d,"data-sonner-toaster":!0,"data-sonner-theme":X,"data-y-position":re,"data-x-position":q,style:{"--front-toast-height":`${((ae=H[0])==null?void 0:ae.height)||0}px`,"--width":`${jrt}px`,"--gap":`${y}px`,...k,...Lrt(_,h)},onBlur:oe=>{Y.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(Y.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,B.current=oe.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{Z||W(!1)},onDragEnd:()=>W(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},D.filter(oe=>!oe.position&&le===0||oe.position===ie).map((oe,ce)=>{var _e,de;return Qe.createElement(Drt,{key:oe.id,icons:C,index:ce,toast:oe,defaultRichColors:g,duration:(_e=v==null?void 0:v.duration)!=null?_e:S,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:s,visibleToasts:b,closeButton:(de=v==null?void 0:v.closeButton)!=null?de:c,interacting:Z,position:ie,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:V,toasts:D.filter(ve=>ve.position==oe.position),heights:H.filter(ve=>ve.position==oe.position),setHeights:P,expandByDefault:o,gap:y,expanded:F,swipeDirections:n.swipeDirections})})):null}))});function Irt(e){const[n]=pz();return f.jsx(Ort,{theme:n,...e})}function Br(e,n,t){Crt[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function $z({content:e,children:n,className:t}){return f.jsxs("span",{className:us("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,children:[n,f.jsx("span",{role:"tooltip",className:"pointer-events-none absolute bottom-full start-1/2 z-20 mb-1.5 w-max max-w-64 -translate-x-1/2 rounded-sm bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background opacity-0 shadow-control-subtle transition-opacity group-hover:opacity-100 group-focus:opacity-100",children:e})]})}const Brt=["alphaxiv","openalex","biorxiv"];let MS=null;function $rt(){const[e,n]=M.useState(MS),[t,r]=M.useState(!1),s=l=>{MS=l,n(l)};M.useEffect(()=>{Vet().then(s).catch(()=>{})},[]);const a=l=>{!e||t||(r(!0),Wet({...e,[l]:!e[l]}).then(s).catch(()=>{}).finally(()=>r(!1)))};return e?f.jsx("div",{className:"flex flex-col",children:Brt.map(l=>{const o=e[l];return f.jsxs(Nr,{type:"button",role:"switch","aria-checked":o,disabled:t,onClick:()=>a(l),children:[f.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[f.jsx(yz,{source:l,size:16,decorative:!0}),xz[l]]}),f.jsx(art,{checked:o,"aria-hidden":"true"})]},l)})}):f.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:vme()})}function mv(e,n){if(!e)throw new Error("Assertion Error")}function _c(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}function Hrt(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 Prt(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` +`}]}function Frt(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 a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function Urt(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function qrt(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const Rs=$l(/[A-Za-z]/),ws=$l(/[\dA-Za-z]/),Grt=$l(/[#-'*+\--9=?A-Z^-~]/);function bp(e){return e!==null&&(e<32||e===127)}const s2=$l(/\d/),Vrt=$l(/[\dA-Fa-f]/),Wrt=$l(/[!-/:-@[-`{-~]/);function gt(e){return e!==null&&e<-2}function Zn(e){return e!==null&&(e<0||e===32)}function hn(e){return e===-2||e===-1||e===32}const sm=$l(new RegExp("\\p{P}|\\p{S}","u")),Lc=$l(/\s/);function $l(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function wd(e){const n=[];let t=-1,r=0,s=0;for(;++t55295&&a<57344){const o=e.charCodeAt(t+1);a<56320&&o>56319&&o<57344?(l=String.fromCharCode(a,o),s=1):l="�"}else l=String.fromCharCode(a);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+s+1,l=""),s&&(t+=s,s=0)}return n.join("")+e.slice(r)}function Krt(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=wd(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+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(l)}]};e.patch(n,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,d),e.applyData(n,d)}function Yrt(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 Xrt(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Hz(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),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const l=s[s.length-1];return l&&l.type==="text"?l.value+=r:s.push({type:"text",value:r}),s}function Zrt(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Hz(e,n);const s={src:wd(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,a),e.applyData(n,a)}function Qrt(e,n){const t={src:wd(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 Jrt(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 est(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Hz(e,n);const s={href:wd(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function tst(e,n){const t={href:wd(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 nst(e,n,t){const r=e.all(n),s=t?rst(t):Pz(n),a={},l=[];if(typeof n.checked=="boolean"){const _=r[0];let h;_&&_.type==="element"&&_.tagName==="p"?h=_:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o1}function sst(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 lst(e){const n=iy(e),t=Fz(e);if(n&&t)return{start:n,end:t}}function cst(e,n){const t=e.all(n),r=t.shift(),s=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),s.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},o=iy(n.children[1]),c=Fz(n.children[n.children.length-1]);o&&c&&(l.position={start:o,end:c}),s.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,a),e.applyData(n,a)}function ust(e,n,t){const r=t?t.children:void 0,a=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,o=l?l.length:n.children.length;let c=-1;const d=[];for(;++c0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return a.push(LS(n.slice(s),s>0,!1)),a.join("")}function LS(e,n,t){let r=0,s=e.length;if(n){let a=e.codePointAt(r);for(;a===RS||a===DS;)r++,a=e.codePointAt(r)}if(t){let a=e.codePointAt(s-1);for(;a===RS||a===DS;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function hst(e,n){const t={type:"text",value:fst(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function _st(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const pst={blockquote:Hrt,break:Prt,code:Frt,delete:Urt,emphasis:qrt,footnoteReference:Krt,heading:Yrt,html:Xrt,imageReference:Zrt,image:Qrt,inlineCode:Jrt,linkReference:est,link:tst,listItem:nst,list:sst,paragraph:ist,root:ast,strong:ost,table:cst,tableCell:dst,tableRow:ust,text:hst,thematicBreak:_st,toml:_0,yaml:_0,definition:_0,footnoteDefinition:_0};function _0(){}const qz=-1,im=0,Hf=1,xp=2,ay=3,oy=4,ly=5,cy=6,Gz=7,Vz=8,mst=typeof self=="object"?self:globalThis,OS=(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 mst[e](n)},gst=(e,n)=>{const t=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,l]=n[s];switch(a){case im:case qz:return t(l,s);case Hf:{const o=t([],s);for(const c of l)o.push(r(c));return o}case xp:{const o=t({},s);for(const[c,d]of l)o[r(c)]=r(d);return o}case ay:return t(new Date(l),s);case oy:{const{source:o,flags:c}=l;return t(new RegExp(o,c),s)}case ly:{const o=t(new Map,s);for(const[c,d]of l)o.set(r(c),r(d));return o}case cy:{const o=t(new Set,s);for(const c of l)o.add(r(c));return o}case Gz:{const{name:o,message:c}=l;return t(OS(o,c),s)}case Vz:return t(BigInt(l),s);case"BigInt":return t(Object(BigInt(l)),s);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:o}=new Uint8Array(l);return t(new DataView(o),l)}}return t(OS(a,l),s)};return r},IS=e=>gst(new Map,e)(0),vc="",{toString:vst}={},{keys:bst}=Object,wf=e=>{const n=typeof e;if(n!=="object"||!e)return[im,n];const t=vst.call(e).slice(8,-1);switch(t){case"Array":return[Hf,vc];case"Object":return[xp,vc];case"Date":return[ay,vc];case"RegExp":return[oy,vc];case"Map":return[ly,vc];case"Set":return[cy,vc];case"DataView":return[Hf,t]}return t.includes("Array")?[Hf,t]:t.includes("Error")?[Gz,t]:[xp,t]},p0=([e,n])=>e===im&&(n==="function"||n==="symbol"),xst=(e,n,t,r)=>{const s=(l,o)=>{const c=r.push(l)-1;return t.set(o,c),c},a=l=>{if(t.has(l))return t.get(l);let[o,c]=wf(l);switch(o){case im:{let _=l;switch(c){case"bigint":o=Vz,_=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);_=null;break;case"undefined":return s([qz],l)}return s([o,_],l)}case Hf:{if(c){let m=l;return c==="DataView"?m=new Uint8Array(l.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(l)),s([c,[...m]],l)}const _=[],h=s([o,_],l);for(const m of l)_.push(a(m));return h}case xp:{if(c)switch(c){case"BigInt":return s([c,l.toString()],l);case"Boolean":case"Number":case"String":return s([c,l.valueOf()],l)}if(n&&"toJSON"in l)return a(l.toJSON());const _=[],h=s([o,_],l);for(const m of bst(l))(e||!p0(wf(l[m])))&&_.push([a(m),a(l[m])]);return h}case ay:return s([o,isNaN(l.getTime())?vc:l.toISOString()],l);case oy:{const{source:_,flags:h}=l;return s([o,{source:_,flags:h}],l)}case ly:{const _=[],h=s([o,_],l);for(const[m,g]of l)(e||!(p0(wf(m))||p0(wf(g))))&&_.push([a(m),a(g)]);return h}case cy:{const _=[],h=s([o,_],l);for(const m of l)(e||!p0(wf(m)))&&_.push(a(m));return h}}const{message:d}=l;return s([o,{name:c,message:d}],l)};return a},BS=(e,{json:n,lossy:t}={})=>{const r=[];return xst(!(n||t),!!n,new Map,r)(e),r},yp=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?IS(BS(e,n)):structuredClone(e):(e,n)=>IS(BS(e,n));function yst(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 wst(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Sst(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||yst,r=e.options.footnoteBackLabel||wst,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c0&&S.push({type:"text",value:" "});let x=typeof t=="string"?t:t(c,g);typeof x=="string"&&(x={type:"text",value:x}),S.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const b=_[_.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const x=b.children[b.children.length-1];x&&x.type==="text"?x.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...S)}else _.push(...S);const v={type:"element",tagName:"li",properties:{id:n+"fn-"+m},children:e.wrap(_,!0)};e.patch(d,v),o.push(v)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...yp(l),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 Ih=(function(e){if(e==null)return Nst;if(typeof e=="function")return am(e);if(typeof e=="object")return Array.isArray(e)?kst(e):Cst(e);if(typeof e=="string")return Est(e);throw new Error("Expected function, string, or object as test")});function kst(e){const n=[];let t=-1;for(;++t":""))+")"})}return m;function m(){let g=Wz,S,k,b;if((!n||a(c,d,_[_.length-1]||void 0))&&(g=Ast(t(c,_)),g[0]===i2))return g;if("children"in c&&c.children){const v=c;if(v.children&&g[0]!==Kz)for(k=(r?v.children.length:-1)+l,b=_.concat(v);k>-1&&k0&&t.push({type:"text",value:` +`}),t}function $S(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function HS(e,n){const t=Mst(e,n),r=t.one(e,void 0),s=Sst(t),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:` +`},s),a}function wp(e,n){return e&&"run"in e?async function(t,r){const s=HS(t,{file:r,...n});await e.run(s,r)}:function(t,r){return HS(t,{file:r,...e||n})}}function PS(e){if(e)throw e}var gv,FS;function Ist(){if(FS)return gv;FS=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(d){return typeof Array.isArray=="function"?Array.isArray(d):n.call(d)==="[object Array]"},a=function(d){if(!d||n.call(d)!=="[object Object]")return!1;var _=e.call(d,"constructor"),h=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!_&&!h)return!1;var m;for(m in d);return typeof m>"u"||e.call(d,m)},l=function(d,_){t&&_.name==="__proto__"?t(d,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):d[_.name]=_.newValue},o=function(d,_){if(_==="__proto__")if(e.call(d,_)){if(r)return r(d,_).value}else return;return d[_]};return gv=function c(){var d,_,h,m,g,S,k=arguments[0],b=1,v=arguments.length,x=!1;for(typeof k=="boolean"&&(x=k,k=arguments[1]||{},b=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});bl.length;let c;o&&l.push(s);try{c=e.apply(this,l)}catch(d){const _=d;if(o&&t)throw _;return s(_)}o||(c&&c.then&&typeof c.then=="function"?c.then(a,s):c instanceof Error?s(c):a(c))}function s(l,...o){t||(t=!0,n(l,...o))}function a(l){s(null,l)}}function Pf(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?US(e.position):"start"in e||"end"in e?US(e):"line"in e||"column"in e?l2(e):""}function l2(e){return qS(e&&e.line)+":"+qS(e&&e.column)}function US(e){return l2(e&&e.start)+"-"+l2(e&&e.end)}function qS(e){return e&&typeof e=="number"?e:1}class ks extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let s="",a={},l=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?s=n:!a.cause&&n&&(l=!0,s=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.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=Pf(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ks.prototype.file="";ks.prototype.name="";ks.prototype.reason="";ks.prototype.message="";ks.prototype.stack="";ks.prototype.column=void 0;ks.prototype.line=void 0;ks.prototype.ancestors=void 0;ks.prototype.cause=void 0;ks.prototype.fatal=void 0;ks.prototype.place=void 0;ks.prototype.ruleId=void 0;ks.prototype.source=void 0;const Na={basename:Pst,dirname:Fst,extname:Ust,join:qst,sep:"/"};function Pst(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Bh(e);let t=0,r=-1,s=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){t=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,o=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){t=s+1;break}}else l<0&&(a=!0,l=s+1),o>-1&&(e.codePointAt(s)===n.codePointAt(o--)?o<0&&(r=s):(o=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function Fst(e){if(Bh(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 Ust(e){Bh(e);let n=e.length,t=-1,r=0,s=-1,a=0,l;for(;n--;){const o=e.codePointAt(n);if(o===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),o===46?s<0?s=n:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||t<0||a===0||a===1&&s===t-1&&s===r+1?"":e.slice(s,t)}function qst(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Vst(e,n){let t="",r=0,s=-1,a=0,l=-1,o,c;for(;++l<=e.length;){if(l2){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=l,a=0;continue}}else if(t.length>0){t="",r=0,s=l,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(s+1,l):t=e.slice(s+1,l),r=l-s-1;s=l,a=0}else o===46&&a>-1?a++:a=-1}return t}function Bh(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Wst={cwd:Kst};function Kst(){return"/"}function c2(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Yst(e){if(typeof e=="string")e=new URL(e);else if(!c2(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 Xst(e)}function Xst(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[g,...S]=_;const k=r[m][1];o2(k)&&o2(g)&&(g=vv(!0,k,g)),r[m]=[d,g,...S]}}}}const hy=new fy().freeze();function wv(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Sv(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function kv(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 VS(e){if(!o2(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function WS(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function m0(e){return eit(e)?e:new Yz(e)}function eit(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function tit(e){return typeof e=="string"||nit(e)}function nit(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var KS=Object.prototype.hasOwnProperty;function YS(e,n,t){for(t of e.keys())if(Ff(t,n))return t}function Ff(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--&&Ff(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=YS(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=YS(n,s),!s)||!Ff(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(KS.call(e,t)&&++r&&!KS.call(n,t)||!(t in n)||!Ff(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}function XS(e){const n=[],t=String(e||"");let r=t.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=t.length,a=!0);const l=t.slice(s,r).trim();(l||!a)&&n.push(l),s=r+1,r=t.indexOf(",",s)}return n}function rit(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const sit=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iit=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ait={};function ZS(e,n){return(ait.jsx?iit:sit).test(e)}const oit=/[ \t\n\f\r]/g;function lit(e){return typeof e=="object"?e.type==="text"?QS(e.value):!1:QS(e)}function QS(e){return e.replace(oit,"")===""}class $h{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}$h.prototype.normal={};$h.prototype.property={};$h.prototype.space=void 0;function Xz(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new $h(t,r,n)}function eh(e){return e.toLowerCase()}class Js{constructor(n,t){this.attribute=t,this.property=n}}Js.prototype.attribute="";Js.prototype.booleanish=!1;Js.prototype.boolean=!1;Js.prototype.commaOrSpaceSeparated=!1;Js.prototype.commaSeparated=!1;Js.prototype.defined=!1;Js.prototype.mustUseProperty=!1;Js.prototype.number=!1;Js.prototype.overloadedBoolean=!1;Js.prototype.property="";Js.prototype.spaceSeparated=!1;Js.prototype.space=void 0;let cit=0;const Ft=qc(),Ir=qc(),u2=qc(),Ve=qc(),Xn=qc(),zc=qc(),hi=qc();function qc(){return 2**++cit}const d2=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ft,booleanish:Ir,commaOrSpaceSeparated:hi,commaSeparated:zc,number:Ve,overloadedBoolean:u2,spaceSeparated:Xn},Symbol.toStringTag,{value:"Module"})),Cv=Object.keys(d2);class _y extends Js{constructor(n,t,r,s){let a=-1;if(super(n,t),JS(this,"space",s),typeof r=="number")for(;++a4&&t.slice(0,4)==="data"&&_it.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(ek,mit);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!ek.test(a)){let l=a.replace(hit,pit);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}s=_y}return new s(r,n)}function pit(e){return"-"+e.toLowerCase()}function mit(e){return e.charAt(1).toUpperCase()}const sj=Xz([Zz,uit,ej,tj,nj],"html"),om=Xz([Zz,dit,ej,tj,nj],"svg");function tk(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function git(e){return e.join(" ").trim()}var Nu={},Ev,nk;function vit(){if(nk)return Ev;nk=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,o=/^\s+|\s+$/g,c=` +`,d="/",_="*",h="",m="comment",g="declaration";function S(b,v){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];v=v||{};var x=1,y=1;function C(W){var Z=W.match(n);Z&&(x+=Z.length);var U=W.lastIndexOf(c);y=~U?W.length-U:y+W.length}function j(){var W={line:x,column:y};return function(Z){return Z.position=new N(W),D(),Z}}function N(W){this.start=W,this.end={line:x,column:y},this.source=v.source}N.prototype.content=b;function T(W){var Z=new Error(v.source+":"+x+":"+y+": "+W);if(Z.reason=W,Z.filename=v.source,Z.line=x,Z.column=y,Z.source=b,!v.silent)throw Z}function z(W){var Z=W.exec(b);if(Z){var U=Z[0];return C(U),b=b.slice(U.length),Z}}function D(){z(t)}function O(W){var Z;for(W=W||[];Z=H();)Z!==!1&&W.push(Z);return W}function H(){var W=j();if(!(d!=b.charAt(0)||_!=b.charAt(1))){for(var Z=2;h!=b.charAt(Z)&&(_!=b.charAt(Z)||d!=b.charAt(Z+1));)++Z;if(Z+=2,h===b.charAt(Z-1))return T("End of comment missing");var U=b.slice(2,Z-2);return y+=2,C(U),b=b.slice(Z),y+=2,W({type:m,comment:U})}}function P(){var W=j(),Z=z(r);if(Z){if(H(),!z(s))return T("property missing ':'");var U=z(a),X=W({type:g,property:k(Z[0].replace(e,h)),value:U?k(U[0].replace(e,h)):h});return z(l),X}}function F(){var W=[];O(W);for(var Z;Z=P();)Z!==!1&&(W.push(Z),O(W));return W}return D(),F()}function k(b){return b?b.replace(o,h):h}return Ev=S,Ev}var rk;function bit(){if(rk)return Nu;rk=1;var e=Nu&&Nu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.default=t;const n=e(vit());function t(r,s){let a=null;if(!r||typeof r!="string")return a;const l=(0,n.default)(r),o=typeof s=="function";return l.forEach(c=>{if(c.type!=="declaration")return;const{property:d,value:_}=c;o?s(d,_,c):_&&(a=a||{},a[d]=_)}),a}return Nu}var Sf={},sk;function xit(){if(sk)return Sf;sk=1,Object.defineProperty(Sf,"__esModule",{value:!0}),Sf.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(d){return!d||t.test(d)||e.test(d)},l=function(d,_){return _.toUpperCase()},o=function(d,_){return"".concat(_,"-")},c=function(d,_){return _===void 0&&(_={}),a(d)?d:(d=d.toLowerCase(),_.reactCompat?d=d.replace(s,o):d=d.replace(r,o),d.replace(n,l))};return Sf.camelCase=c,Sf}var kf,ik;function yit(){if(ik)return kf;ik=1;var e=kf&&kf.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(bit()),t=xit();function r(s,a){var l={};return!s||typeof s!="string"||(0,n.default)(s,function(o,c){o&&c&&(l[(0,t.camelCase)(o,a)]=c)}),l}return r.default=r,kf=r,kf}var wit=yit();const Sit=Th(wit),py={}.hasOwnProperty,kit=new Map,Cit=/[A-Z]/g,Eit=new Set(["table","tbody","thead","tfoot","tr"]),Nit=new Set(["td","th"]),ij="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function aj(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=Lit(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=Dit(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"?om:sj,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=oj(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function oj(e,n,t){if(n.type==="element")return zit(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return jit(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Tit(e,n,t);if(n.type==="mdxjsEsm")return Ait(e,n);if(n.type==="root")return Mit(e,n,t);if(n.type==="text")return Rit(e,n)}function zit(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=om,e.schema=s),e.ancestors.push(n);const a=cj(e,n.tagName,!1),l=Oit(e,n);let o=gy(e,n);return Eit.has(n.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!lit(c):!0})),lj(e,l,a,n),my(l,o),e.ancestors.pop(),e.schema=r,e.create(n,a,l,t)}function jit(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)}th(e,n.position)}function Ait(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);th(e,n.position)}function Tit(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=om,e.schema=s),e.ancestors.push(n);const a=n.name===null?e.Fragment:cj(e,n.name,!0),l=Iit(e,n),o=gy(e,n);return lj(e,l,a,n),my(l,o),e.ancestors.pop(),e.schema=r,e.create(n,a,l,t)}function Mit(e,n,t){const r={};return my(r,gy(e,n)),e.create(n,e.Fragment,r,t)}function Rit(e,n){return n.value}function lj(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function my(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Dit(e,n,t){return r;function r(s,a,l,o){const d=Array.isArray(l.children)?t:n;return o?d(a,l,o):d(a,l)}}function Lit(e,n){return t;function t(r,s,a,l){const o=Array.isArray(a.children),c=iy(r);return n(s,a,l,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Oit(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&py.call(n.properties,s)){const a=Bit(e,s,n.properties[s]);if(a){const[l,o]=a;e.tableCellAlignToStyle&&l==="align"&&typeof o=="string"&&Nit.has(n.tagName)?r=o:t[l]=o}}if(r){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Iit(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const o=l.properties[0];o.type,Object.assign(t,e.evaluater.evaluateExpression(o.argument))}else th(e,n.position);else{const s=r.name;let a;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,a=e.evaluater.evaluateExpression(o.expression)}else th(e,n.position);else a=r.value===null?!0:r.value;t[s]=a}return t}function gy(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:kit;for(;++ry.key).filter(y=>y!==void 0));let d=0;for(;d=e.children.length-_&&(N=s.length-(e.children.length-y)),N>=0&&(j=((v=s[N])==null?void 0:v.key)??j);j&&c.has(j)&&((x=s[N])==null?void 0:x.key)!==j;)j=`${j}+`;j&&c.add(j);const T=uj(C,s[N]??null,t,j);a.push(T),T.react!==void 0&&l.push(T.react)}const h=n!==null&&Vit(e,n.node);if(n&&n.key===r&&h&&s.length===a.length&&a.every((y,C)=>y===s[C]))return n;const m=e.type==="element"&&Uit.has(e.tagName)?l.filter(y=>typeof y!="string"||!qit.test(y)):l,g=m.length>0?m.length===1?m[0]:m:null;let S=h?n==null?void 0:n.shell:null;if(!S){const y=aj({...e,children:[]},t);S={props:y.props,type:y.type}}return{children:a,key:r,node:e,react:f.jsx(S.type,{...S.props,children:g},r),shell:S}}function Vit(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:a,position:l,...o}=n;return Ff(s,o)}function Gu(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 l=0;ls?0:s+n:n=n>s?s:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);a0?(gi(e,e.length,0,n),e):n}const lk={}.hasOwnProperty;function fj(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 ra(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 a=0;return l;function l(c){return hn(c)?(e.enter(t),o(c)):n(c)}function o(c){return hn(c)&&a++l))return;const T=n.events.length;let z=T,D,O;for(;z--;)if(n.events[z][0]==="exit"&&n.events[z][1].type==="chunkFlow"){if(D){O=n.events[z][1].end;break}D=!0}for(v(r),N=T;Ny;){const j=t[C];n.containerState=j[1],j[0].exit.call(n,e)}t.length=y}function x(){s.write([null]),a=void 0,s=void 0,n.containerState._closeFlow=void 0}}function tat(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 ad(e){if(e===null||Zn(e)||Lc(e))return 1;if(sm(e))return 2}function lm(e,n,t){const r=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h={...e[r][1].end},m={...e[t][1].start};uk(h,-c),uk(m,c),l={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:m},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:c>1?"strong":"emphasis",start:{...l.start},end:{...o.end}},e[r][1].end={...l.start},e[t][1].start={...o.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Bi(d,[["enter",e[r][1],n],["exit",e[r][1],n]])),d=Bi(d,[["enter",s,n],["enter",l,n],["exit",l,n],["enter",a,n]]),d=Bi(d,lm(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),d=Bi(d,[["exit",a,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(_=2,d=Bi(d,[["enter",e[t][1],n],["exit",e[t][1],n]])):_=0,gi(e,r-1,t-r+3,d),t=r+d.length-_-2;break}}for(t=-1;++t0&&hn(N)?ln(e,x,"linePrefix",a+1)(N):x(N)}function x(N){return N===null||gt(N)?e.check(dk,k,C)(N):(e.enter("codeFlowValue"),y(N))}function y(N){return N===null||gt(N)?(e.exit("codeFlowValue"),x(N)):(e.consume(N),y)}function C(N){return e.exit("codeFenced"),n(N)}function j(N,T,z){let D=0;return O;function O(Z){return N.enter("lineEnding"),N.consume(Z),N.exit("lineEnding"),H}function H(Z){return N.enter("codeFencedFence"),hn(Z)?ln(N,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):P(Z)}function P(Z){return Z===o?(N.enter("codeFencedFenceSequence"),F(Z)):z(Z)}function F(Z){return Z===o?(D++,N.consume(Z),F):D>=l?(N.exit("codeFencedFenceSequence"),hn(Z)?ln(N,W,"whitespace")(Z):W(Z)):z(Z)}function W(Z){return Z===null||gt(Z)?(N.exit("codeFencedFence"),T(Z)):z(Z)}}}function hat(e,n,t){const r=this;return s;function s(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const Nv={name:"codeIndented",tokenize:pat},_at={partial:!0,tokenize:mat};function pat(e,n,t){const r=this;return s;function s(d){return e.enter("codeIndented"),ln(e,a,"linePrefix",5)(d)}function a(d){const _=r.events[r.events.length-1];return _&&_[1].type==="linePrefix"&&_[2].sliceSerialize(_[1],!0).length>=4?l(d):t(d)}function l(d){return d===null?c(d):gt(d)?e.attempt(_at,l,c)(d):(e.enter("codeFlowValue"),o(d))}function o(d){return d===null||gt(d)?(e.exit("codeFlowValue"),l(d)):(e.consume(d),o)}function c(d){return e.exit("codeIndented"),n(d)}}function mat(e,n,t){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?t(l):gt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):ln(e,a,"linePrefix",5)(l)}function a(l){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?n(l):gt(l)?s(l):t(l)}}const gat={name:"codeText",previous:bat,resolve:vat,tokenize:xat};function vat(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 a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Cf(this.left,r),a.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),Cf(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Cf(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(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function vj(e,n,t,r,s,a,l,o,c){const d=c||Number.POSITIVE_INFINITY;let _=0;return h;function h(v){return v===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(v),e.exit(a),m):v===null||v===32||v===41||bp(v)?t(v):(e.enter(r),e.enter(l),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(v))}function m(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===62?(e.exit("chunkString"),e.exit(o),m(v)):v===null||v===60||gt(v)?t(v):(e.consume(v),v===92?S:g)}function S(v){return v===60||v===62||v===92?(e.consume(v),g):g(v)}function k(v){return!_&&(v===null||v===41||Zn(v))?(e.exit("chunkString"),e.exit(o),e.exit(l),e.exit(r),n(v)):_999||g===null||g===91||g===93&&!c||g===94&&!o&&"_hiddenFootnoteSupport"in l.parser.constructs?t(g):g===93?(e.exit(a),e.enter(s),e.consume(g),e.exit(s),e.exit(r),n):gt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),_):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||gt(g)||o++>999?(e.exit("chunkString"),_(g)):(e.consume(g),c||(c=!hn(g)),g===92?m:h)}function m(g){return g===91||g===92||g===93?(e.consume(g),o++,h):h(g)}}function xj(e,n,t,r,s,a){let l;return o;function o(m){return m===34||m===39||m===40?(e.enter(r),e.enter(s),e.consume(m),e.exit(s),l=m===40?41:m,c):t(m)}function c(m){return m===l?(e.enter(s),e.consume(m),e.exit(s),e.exit(r),n):(e.enter(a),d(m))}function d(m){return m===l?(e.exit(a),c(l)):m===null?t(m):gt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),ln(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===l||m===null||gt(m)?(e.exit("chunkString"),d(m)):(e.consume(m),m===92?h:_)}function h(m){return m===l||m===92?(e.consume(m),_):_(m)}}function Uf(e,n){let t;return r;function r(s){return gt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):hn(s)?ln(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const zat={name:"definition",tokenize:Aat},jat={partial:!0,tokenize:Tat};function Aat(e,n,t){const r=this;let s;return a;function a(g){return e.enter("definition"),l(g)}function l(g){return bj.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function o(g){return s=ra(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):t(g)}function c(g){return Zn(g)?Uf(e,d)(g):d(g)}function d(g){return vj(e,_,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function _(g){return e.attempt(jat,h,h)(g)}function h(g){return hn(g)?ln(e,m,"whitespace")(g):m(g)}function m(g){return g===null||gt(g)?(e.exit("definition"),r.parser.defined.push(s),n(g)):t(g)}}function Tat(e,n,t){return r;function r(o){return Zn(o)?Uf(e,s)(o):t(o)}function s(o){return xj(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return hn(o)?ln(e,l,"whitespace")(o):l(o)}function l(o){return o===null||gt(o)?n(o):t(o)}}const Mat={name:"hardBreakEscape",tokenize:Rat};function Rat(e,n,t){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return gt(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const Dat={name:"headingAtx",resolve:Lat,tokenize:Oat};function Lat(e,n){let t=e.length-2,r=3,s,a;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},a={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},gi(e,r,t-r+1,[["enter",s,n],["enter",a,n],["exit",a,n],["exit",s,n]])),e}function Oat(e,n,t){let r=0;return s;function s(_){return e.enter("atxHeading"),a(_)}function a(_){return e.enter("atxHeadingSequence"),l(_)}function l(_){return _===35&&r++<6?(e.consume(_),l):_===null||Zn(_)?(e.exit("atxHeadingSequence"),o(_)):t(_)}function o(_){return _===35?(e.enter("atxHeadingSequence"),c(_)):_===null||gt(_)?(e.exit("atxHeading"),n(_)):hn(_)?ln(e,o,"whitespace")(_):(e.enter("atxHeadingText"),d(_))}function c(_){return _===35?(e.consume(_),c):(e.exit("atxHeadingSequence"),o(_))}function d(_){return _===null||_===35||Zn(_)?(e.exit("atxHeadingText"),o(_)):(e.consume(_),d)}}const Iat=["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"],hk=["pre","script","style","textarea"],Bat={concrete:!0,name:"htmlFlow",resolveTo:Pat,tokenize:Fat},$at={partial:!0,tokenize:qat},Hat={partial:!0,tokenize:Uat};function Pat(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 Fat(e,n,t){const r=this;let s,a,l,o,c;return d;function d(V){return _(V)}function _(V){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(V),h}function h(V){return V===33?(e.consume(V),m):V===47?(e.consume(V),a=!0,k):V===63?(e.consume(V),s=3,r.interrupt?n:L):Rs(V)?(e.consume(V),l=String.fromCharCode(V),b):t(V)}function m(V){return V===45?(e.consume(V),s=2,g):V===91?(e.consume(V),s=5,o=0,S):Rs(V)?(e.consume(V),s=4,r.interrupt?n:L):t(V)}function g(V){return V===45?(e.consume(V),r.interrupt?n:L):t(V)}function S(V){const ie="CDATA[";return V===ie.charCodeAt(o++)?(e.consume(V),o===ie.length?r.interrupt?n:P:S):t(V)}function k(V){return Rs(V)?(e.consume(V),l=String.fromCharCode(V),b):t(V)}function b(V){if(V===null||V===47||V===62||Zn(V)){const ie=V===47,le=l.toLowerCase();return!ie&&!a&&hk.includes(le)?(s=1,r.interrupt?n(V):P(V)):Iat.includes(l.toLowerCase())?(s=6,ie?(e.consume(V),v):r.interrupt?n(V):P(V)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(V):a?x(V):y(V))}return V===45||ws(V)?(e.consume(V),l+=String.fromCharCode(V),b):t(V)}function v(V){return V===62?(e.consume(V),r.interrupt?n:P):t(V)}function x(V){return hn(V)?(e.consume(V),x):O(V)}function y(V){return V===47?(e.consume(V),O):V===58||V===95||Rs(V)?(e.consume(V),C):hn(V)?(e.consume(V),y):O(V)}function C(V){return V===45||V===46||V===58||V===95||ws(V)?(e.consume(V),C):j(V)}function j(V){return V===61?(e.consume(V),N):hn(V)?(e.consume(V),j):y(V)}function N(V){return V===null||V===60||V===61||V===62||V===96?t(V):V===34||V===39?(e.consume(V),c=V,T):hn(V)?(e.consume(V),N):z(V)}function T(V){return V===c?(e.consume(V),c=null,D):V===null||gt(V)?t(V):(e.consume(V),T)}function z(V){return V===null||V===34||V===39||V===47||V===60||V===61||V===62||V===96||Zn(V)?j(V):(e.consume(V),z)}function D(V){return V===47||V===62||hn(V)?y(V):t(V)}function O(V){return V===62?(e.consume(V),H):t(V)}function H(V){return V===null||gt(V)?P(V):hn(V)?(e.consume(V),H):t(V)}function P(V){return V===45&&s===2?(e.consume(V),U):V===60&&s===1?(e.consume(V),X):V===62&&s===4?(e.consume(V),B):V===63&&s===3?(e.consume(V),L):V===93&&s===5?(e.consume(V),$):gt(V)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check($at,Y,F)(V)):V===null||gt(V)?(e.exit("htmlFlowData"),F(V)):(e.consume(V),P)}function F(V){return e.check(Hat,W,Y)(V)}function W(V){return e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),Z}function Z(V){return V===null||gt(V)?F(V):(e.enter("htmlFlowData"),P(V))}function U(V){return V===45?(e.consume(V),L):P(V)}function X(V){return V===47?(e.consume(V),l="",J):P(V)}function J(V){if(V===62){const ie=l.toLowerCase();return hk.includes(ie)?(e.consume(V),B):P(V)}return Rs(V)&&l.length<8?(e.consume(V),l+=String.fromCharCode(V),J):P(V)}function $(V){return V===93?(e.consume(V),L):P(V)}function L(V){return V===62?(e.consume(V),B):V===45&&s===2?(e.consume(V),L):P(V)}function B(V){return V===null||gt(V)?(e.exit("htmlFlowData"),Y(V)):(e.consume(V),B)}function Y(V){return e.exit("htmlFlow"),n(V)}}function Uat(e,n,t){const r=this;return s;function s(l){return gt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):t(l)}function a(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function qat(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Hh,n,t)}}const Gat={name:"htmlText",tokenize:Vat};function Vat(e,n,t){const r=this;let s,a,l;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),d):L===47?(e.consume(L),j):L===63?(e.consume(L),y):Rs(L)?(e.consume(L),z):t(L)}function d(L){return L===45?(e.consume(L),_):L===91?(e.consume(L),a=0,S):Rs(L)?(e.consume(L),x):t(L)}function _(L){return L===45?(e.consume(L),g):t(L)}function h(L){return L===null?t(L):L===45?(e.consume(L),m):gt(L)?(l=h,X(L)):(e.consume(L),h)}function m(L){return L===45?(e.consume(L),g):h(L)}function g(L){return L===62?U(L):L===45?m(L):h(L)}function S(L){const B="CDATA[";return L===B.charCodeAt(a++)?(e.consume(L),a===B.length?k:S):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),b):gt(L)?(l=k,X(L)):(e.consume(L),k)}function b(L){return L===93?(e.consume(L),v):k(L)}function v(L){return L===62?U(L):L===93?(e.consume(L),v):k(L)}function x(L){return L===null||L===62?U(L):gt(L)?(l=x,X(L)):(e.consume(L),x)}function y(L){return L===null?t(L):L===63?(e.consume(L),C):gt(L)?(l=y,X(L)):(e.consume(L),y)}function C(L){return L===62?U(L):y(L)}function j(L){return Rs(L)?(e.consume(L),N):t(L)}function N(L){return L===45||ws(L)?(e.consume(L),N):T(L)}function T(L){return gt(L)?(l=T,X(L)):hn(L)?(e.consume(L),T):U(L)}function z(L){return L===45||ws(L)?(e.consume(L),z):L===47||L===62||Zn(L)?D(L):t(L)}function D(L){return L===47?(e.consume(L),U):L===58||L===95||Rs(L)?(e.consume(L),O):gt(L)?(l=D,X(L)):hn(L)?(e.consume(L),D):U(L)}function O(L){return L===45||L===46||L===58||L===95||ws(L)?(e.consume(L),O):H(L)}function H(L){return L===61?(e.consume(L),P):gt(L)?(l=H,X(L)):hn(L)?(e.consume(L),H):D(L)}function P(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,F):gt(L)?(l=P,X(L)):hn(L)?(e.consume(L),P):(e.consume(L),W)}function F(L){return L===s?(e.consume(L),s=void 0,Z):L===null?t(L):gt(L)?(l=F,X(L)):(e.consume(L),F)}function W(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||Zn(L)?D(L):(e.consume(L),W)}function Z(L){return L===47||L===62||Zn(L)?D(L):t(L)}function U(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),n):t(L)}function X(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),J}function J(L){return hn(L)?ln(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):$(L)}function $(L){return e.enter("htmlTextData"),l(L)}}const by={name:"labelEnd",resolveAll:Xat,resolveTo:Zat,tokenize:Qat},Wat={tokenize:Jat},Kat={tokenize:eot},Yat={tokenize:tot};function Xat(e){let n=-1;const t=[];for(;++n=3&&(d===null||gt(d))?(e.exit("thematicBreak"),n(d)):t(d)}function c(d){return d===s?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),hn(d)?ln(e,o,"whitespace")(d):o(d))}}const Ks={continuation:{tokenize:dot},exit:hot,name:"list",tokenize:uot},lot={partial:!0,tokenize:_ot},cot={partial:!0,tokenize:fot};function uot(e,n,t){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,l=0;return o;function o(g){const S=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:s2(g)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(K0,t,d)(g):d(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return t(g)}function c(g){return s2(g)&&++l<10?(e.consume(g),c):(!r.interrupt||l<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),d(g)):t(g)}function d(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Hh,r.interrupt?t:_,e.attempt(lot,m,h))}function _(g){return r.containerState.initialBlankLine=!0,a++,m(g)}function h(g){return hn(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):t(g)}function m(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(g)}}function dot(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Hh,s,a);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ln(e,n,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!hn(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(cot,n,l)(o))}function l(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,ln(e,e.attempt(Ks,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function fot(e,n,t){const r=this;return ln(e,s,"listItemIndent",r.containerState.size+1);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(a):t(a)}}function hot(e){e.exit(this.containerState.type)}function _ot(e,n,t){const r=this;return ln(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const l=r.events[r.events.length-1];return!hn(a)&&l&&l[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const _k={name:"setextUnderline",resolveTo:pot,tokenize:mot};function pot(e,n){let t=e.length,r,s,a;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),!a&&e[t][1].type==="definition"&&(a=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",l,n]),e.splice(a+1,0,["exit",e[r][1],n]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function mot(e,n,t){const r=this;let s;return a;function a(d){let _=r.events.length,h;for(;_--;)if(r.events[_][1].type!=="lineEnding"&&r.events[_][1].type!=="linePrefix"&&r.events[_][1].type!=="content"){h=r.events[_][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),s=d,l(d)):t(d)}function l(d){return e.enter("setextHeadingLineSequence"),o(d)}function o(d){return d===s?(e.consume(d),o):(e.exit("setextHeadingLineSequence"),hn(d)?ln(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||gt(d)?(e.exit("setextHeadingLine"),n(d)):t(d)}}const got={tokenize:vot};function vot(e){const n=this,t=e.attempt(Hh,r,e.attempt(this.parser.constructs.flowInitial,s,ln(e,e.attempt(this.parser.constructs.flow,s,e.attempt(Sat,s)),"linePrefix")));return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const bot={resolveAll:wj()},xot=yj("string"),yot=yj("text");function yj(e){return{resolveAll:wj(e==="text"?wot:void 0),tokenize:n};function n(t){const r=this,s=this.parser.constructs[e],a=t.attempt(s,l,o);return l;function l(_){return d(_)?a(_):o(_)}function o(_){if(_===null){t.consume(_);return}return t.enter("data"),t.consume(_),c}function c(_){return d(_)?(t.exit("data"),a(_)):(t.consume(_),c)}function d(_){if(_===null)return!0;const h=s[_];let m=-1;if(h)for(;++m-1){const o=l[0];typeof o=="string"?l[0]=o.slice(r):l.shift()}a>0&&l.push(e[s].slice(0,a))}return l}function Lot(e,n){let t=-1;const r=[];let s;for(;++t0){const zt=Xe.tokenStack[Xe.tokenStack.length-1];(zt[1]||mk).call(Xe,void 0,zt[0])}for(Oe.position={start:gl(we.length>0?we[0][1].start:{line:1,column:1,offset:0}),end:gl(we.length>0?we[we.length-2][1].end:{line:1,column:1,offset:0})},tt=-1;++tt0&&(cs(this,kl,ir(this,kl)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=gk(t)),ir(this,kl)+rlt(t,r)}}kl=new WeakMap;const Vot=new Set(["*","**","_","__"]);function gk(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(nlt(n)){vk(n,t,r);continue}const a=Zot(n,e,t);if(a>t){t=a-1;continue}const l=Qot(n,e,t);if(l>t){t=l-1;continue}sa(e,t)||vk(n,t,r)}return n}function Wot(e,n,t){const r=n[t];return r==="`"?Kot(e,n,t):r==="$"?Yot(e,n,t):r==="~"?Xot(e,n,t):t}function Kot(e,n,t){const r=yy(n,t),s="`".repeat(r),a=e.exclusive;return(a==null?void 0:a.kind)==="fence"?(a.token[0]==="`"&&Sp(n,t)&&!sa(n,t)&&r>=a.token.length&&(e.exclusive=null),t+r):(a==null?void 0:a.kind)==="code"?(!sa(n,t)&&r>=a.token.length&&(e.exclusive=null),t+r):a||sa(n,t)?t+r:r>=3&&Sp(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function Yot(e,n,t){const r=yy(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!sa(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||sa(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function Xot(e,n,t){const r=yy(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(Sp(n,t)&&!sa(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!Sp(n,t)||sa(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function Zot(e,n,t){if(n[t]!=="<"||sa(n,t))return t;const r=n[t+1];if(r!==void 0&&!Nj(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` +`)return e.pendingHtml=null,s+1;return n.length}function Qot(e,n,t){const r=Jot(n,t);if(!r)return t;if(sa(n,t))return t+r.length;const s=e.delims.findLastIndex(a=>a.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):(elt(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function Jot(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 elt(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!yk(s)||!yk(r)}function vk(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 tlt(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 nlt(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function rlt(e,n){n.pendingHtml!==null&&(e=e.slice(0,alt(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return Ca(slt(e,t));const r=ilt(n);if(r)return Ca(Pu(e,r));const s=clt(n);return s?s.kind==="delim"?Ca(h2(e,s.start,s.token.length)?Cj(e,s.token):e.slice(0,s.start)):h2(e,s.start,s.token.length)?s.kind==="fence"?Ca(e):s.kind==="code"?Ca(Pu(e,s.token)):s.token==="$$"?Ca(Pu(e,(e.endsWith(` +`)?"":` +`)+"$$")):/\s/.test(e[e.length-1]??"")?Ca(e):Ca(Pu(e,"$")):Ca(s.kind==="fence"?e:e.slice(0,s.start)):Ca(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function slt(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return h2(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 ilt(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(!Vot.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function alt(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!olt(e,s,r))break;t=s,r=s}return t}function olt(e,n,t){if(e[t-1]!==">"||sa(e,n))return!1;const r=e[n+1];if(r!==void 0&&!Nj(r))return!1;for(let s=n+1;s"||a===` +`)return!1}return!0}function Ca(e){var b;const n=e.lastIndexOf(` + +`),t=n===-1?0:n+2,r=e.slice(0,t),s=e.slice(t),a=s.indexOf(` +`),l=a===-1?s:s.slice(0,a),o=(b=l.match(/^( *)\|/))==null?void 0:b[1];if(o===void 0)return e;if(bk(l)<2&&!ult(l,o))return r;const c=l.trimEnd().endsWith("|")?l:Cj(l," |"),d=bk(c),_=d<2?0:c.trimEnd().endsWith("|")?d-1:d;if(_===0)return e;const h=a===-1?"":s.slice(a+1),m=xk(o,Array.from({length:_},()=>"-"));if(h.length===0)return r+c+` +`+m;const g=h.indexOf(` +`),S=g===-1?h:h.slice(0,g),k=g===-1?"":h.slice(g);if(dlt(S,o,_))return e;if(S.startsWith(o+"|")&&/^[ |:\-\t]*$/.test(S.slice(o.length))){const v=Ej(S,o).map(x=>{const y=x.trim();if(y.length===0)return"-";let C=0;for(let j=0;j1&&y.endsWith(":")?":":"")});for(;v.length<_;)v.push("-");return r+c+` +`+xk(o,v)+k}return r+c+` +`+m+` +`+h}function Pu(e,n){return e+n.slice(llt(e,n))}function Cj(e,n){var s;const t=(s=e.match(/[^\S\n]+$/))==null?void 0:s[0];if(!t)return Pu(e,n);const r=e.slice(0,-t.length);return Pu(r,n)+t}function llt(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 clt(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 bk(e){let n=0;for(let t=0;t0}function xk(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function Ej(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function dlt(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=Ej(r,"").map(a=>a.trim());return s.length===t&&s.every(a=>/^:?-+:?$/.test(a))}function yy(e,n){let t=n+1;for(;tn+t}function Sp(e,n){return n===0||e[n-1]===` +`}function sa(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function yk(e){return!!e&&/[A-Za-z0-9]/.test(e)}function Nj(e){return!!e&&/[A-Za-z]/.test(e)}const zj=hy().use(xy);var Eh,Qu,Ju,Cc,ed,Nh,zh,jh,Ec,Ah,Nc;class flt{constructor(){fi(this,Eh,zj);fi(this,Qu,null);fi(this,Ju,{});fi(this,Cc,null);fi(this,ed,"");fi(this,Nh,[]);fi(this,zh,[]);fi(this,jh,[]);fi(this,Ec,0);fi(this,Ah,[]);fi(this,Nc,[])}reconfigure(n,t,r){ir(this,Qu)!==null&&ir(this,Eh)===n&&jj(ir(this,Ju),r)&&!!ir(this,Cc)===t||(cs(this,Eh,n),n.attachers.some(s=>s[0]===wp)||(n=n(),n.use(wp),n.freeze()),cs(this,Qu,n),cs(this,Ju,r),cs(this,ed,""),cs(this,Nh,[]),cs(this,zh,[]),cs(this,jh,[]),cs(this,Ec,0),cs(this,Ah,[]),cs(this,Cc,t?new Got:null))}update(n){ir(this,Cc)&&(n=ir(this,Cc).update(n));let t=ir(this,ed);if(n===t)return ir(this,Nc);const r=ir(this,Nh),s=hlt(n,t);let a=r.length-1;for(;a>=0&&!(s>=r[a]);a-=1);let l=r[a]??0;a===-1&&(a=0);const o=_c(ir(this,Qu)),c=ir(this,zh),d=c.slice(a).some(N=>N.some(_2));let _=o.parse(n.slice(l)),h=_.children.map(N=>_c(_c(N.position).start.offset)+l);cs(this,ed,n),mv(r.length===c.length),r.splice(a,r.length-a,...h);{const N=jv(_,h,l);mv(N.length===h.length),c.splice(a,c.length-a,...N)}if(d||_2(_)){a=0,l=0,_=o.parse(n),h=_.children.map(T=>_c(_c(T.position).start.offset)+l),r.splice(0,r.length,...h);const N=jv(_,h,l);mv(N.length===h.length),c.splice(0,c.length,...N)}const m=jv(o.runSync(_),h,l),g=ir(this,jh),S=ir(this,Ah),k=ir(this,Nc),b=S.length;let v=null,x=0;for(;xb&&(g.length=S.length=r.length);for(let N=r.length=C?D=b-(r.length-T):T=b){g[T]=String(ir(this,Ec)),cs(this,Ec,ir(this,Ec)+1),S[T]=null,v&&(v[T]=void 0);continue}g[T]=g[D]??String(x6(this,Ec)._++),S[T]=S[D]??null,v&&(v[T]=k[D])}r.length[]);let s=0;for(const l of e.children){const o=(a=l.position)==null?void 0:a.start.offset;if(o!==void 0){for(;s+1s||t!==-1&&n>t||r!==-1&&n>r||xlt.test(e.slice(0,n))?e:""}const Ck=/[#.]/g;function Elt(e,n){const t=e||"",r={};let s=0,a,l;for(;sd&&(d=_):_&&(d!==void 0&&d>-1&&c.push(` +`.repeat(d)||" "),d=-1,c.push(_))}return c.join("")}function Oj(e,n,t){return e.type==="element"?Klt(e,n,t):e.type==="text"?t.whitespace==="normal"?Ij(e,t):Ylt(e):[]}function Klt(e,n,t){const r=Bj(e,t),s=e.children||[];let a=-1,l=[];if(Vlt(e))return l;let o,c;for(m2(e)||Mk(e)&&zk(n,e,Mk)?c=` +`:Glt(e)?(o=2,c=2):Lj(e)&&(o=1,c=1);++a15?d="…"+o.slice(s-15,s):d=o.slice(0,s);var _;a+15e.replace(ect,"-$1").toLowerCase(),nct={"&":"&",">":">","<":"<",'"':""","'":"'"},rct=/[&><"']/g,Ss=e=>String(e).replace(rct,n=>nct[n]),Y0=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?Y0(e.body[0]):e:e.type==="font"?Y0(e.body):e,sct=new Set(["mathord","textord","atom"]),jo=e=>sct.has(Y0(e).type),ict=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"},g2={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 act(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 oct(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return act(n)}function lct(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:oct(r)}class Sy{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(g2)){var r=g2[t];r&&lct(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 We("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=ict(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class vl{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 ja[cct[this.id]]}sub(){return ja[uct[this.id]]}fracNum(){return ja[dct[this.id]]}fracDen(){return ja[fct[this.id]]}cramp(){return ja[hct[this.id]]}text(){return ja[_ct[this.id]]}isTight(){return this.size>=2}}var ky=0,kp=1,Vu=2,So=3,rh=4,$i=5,od=6,Ds=7,ja=[new vl(ky,0,!1),new vl(kp,0,!0),new vl(Vu,1,!1),new vl(So,1,!0),new vl(rh,2,!1),new vl($i,2,!0),new vl(od,3,!1),new vl(Ds,3,!0)],cct=[rh,$i,rh,$i,od,Ds,od,Ds],uct=[$i,$i,$i,$i,Ds,Ds,Ds,Ds],dct=[Vu,So,rh,$i,od,Ds,od,Ds],fct=[So,So,$i,$i,Ds,Ds,Ds,Ds],hct=[kp,kp,So,So,$i,$i,Ds,Ds],_ct=[ky,kp,Vu,So,Vu,So,Vu,So],Ut={DISPLAY:ja[ky],TEXT:ja[Vu],SCRIPT:ja[rh],SCRIPTSCRIPT:ja[od]},v2=[{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 pct(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var X0=[];v2.forEach(e=>e.blocks.forEach(n=>X0.push(...n)));function $j(e){for(var n=0;n=X0[n]&&e<=X0[n+1])return!0;return!1}var Xr=e=>e+" "+e,zu=80,mct=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"},gct=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"},vct=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"},bct=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"},xct=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"},yct=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},wct=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"},Sct=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=mct(t,zu);break;case"sqrtSize1":s=gct(t,zu);break;case"sqrtSize2":s=vct(t,zu);break;case"sqrtSize3":s=bct(t,zu);break;case"sqrtSize4":s=xct(t,zu);break;case"sqrtTall":s=wct(t,zu,r)}return s},kct=function(n,t){switch(n){case"⎜":return Xr("M291 0 H417 V"+t+" H291z");case"∣":return Xr("M145 0 H188 V"+t+" H145z");case"∥":return Xr("M145 0 H188 V"+t+" H145z")+Xr("M367 0 H410 V"+t+" H367z");case"⎟":return Xr("M457 0 H583 V"+t+" H457z");case"⎢":return Xr("M319 0 H403 V"+t+" H319z");case"⎥":return Xr("M263 0 H347 V"+t+" H263z");case"⎪":return Xr("M384 0 H504 V"+t+" H384z");case"⏐":return Xr("M312 0 H355 V"+t+" H312z");case"‖":return Xr("M257 0 H300 V"+t+" H257z")+Xr("M478 0 H521 V"+t+" H478z");default:return""}},Rk={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:Xr("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Xr("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Xr("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Xr("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:Xr("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:Xr("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Xr("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Xr("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`},Cct=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 Ect(e){return"toText"in e}class kd{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(Ect(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var b2={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},Nct={ex:!0,em:!0,mu:!0},Hj=function(n){return typeof n!="string"&&(n=n.unit),n in b2||n in Nct||n==="ex"},_r=function(n,t){var r;if(n.unit in b2)r=b2[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 We("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},Ze=function(n){return+n.toFixed(4)+"em"},Nl=function(n){return n.filter(t=>t).join(" ")},Cy=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=tct(r)+":"+s+";")}return t},Pj=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)}},Fj=function(n){var t=document.createElement(n);t.className=Nl(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]/,Uj=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+Ss(Nl(this.classes))+'"');var r=Cy(this.style);r&&(t+=' style="'+Ss(r)+'"');for(var s of Object.keys(this.attributes)){if(zct.test(s))throw new We("Invalid attribute name '"+s+"'");t+=" "+s+'="'+Ss(this.attributes[s])+'"'}t+=">";for(var a=0;a",t};class Cd{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,Pj.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return Fj.call(this,"span")}toMarkup(){return Uj.call(this,"span")}}class cm{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,Pj.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 Fj.call(this,"a")}toMarkup(){return Uj.call(this,"a")}}class jct{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=''+Ss(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=Ze(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=Nl(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(n),t):n}toMarkup(){var n=!1,t="0&&(r+="margin-right:"+Ze(this.italic)+";"),r+=Cy(this.style),r&&(n=!0,t+=' style="'+Ss(r)+'"');var s=Ss(this.text);return n?(t+=">",t+=s,t+="",t):s}}class Eo{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 x2{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 Rct=e=>e instanceof Cd||e instanceof cm||e instanceof kd,Ma={"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]}},g0={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]},Dk={Å:"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 Dct(e,n){Ma[e]=n}function Ey(e,n,t){if(!Ma[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=Ma[n][r];if(!s&&e[0]in Dk&&(r=Dk[e[0]].charCodeAt(0),s=Ma[n][r]),!s&&t==="text"&&$j(r)&&(s=Ma[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var Mv={};function Lct(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!Mv[n]){var t=Mv[n]={cssEmPerMu:g0.quad[n]/18};for(var r in g0)g0.hasOwnProperty(r)&&(t[r]=g0[r][n])}return Mv[n]}var ar={math:{},text:{}};function I(e,n,t,r,s,a){ar[e][s]={font:n,group:t,replace:r},a&&r&&(ar[e][r]=ar[e][s])}var G="math",Be="text",Q="main",ue="ams",lr="accent-token",ot="bin",Ls="close",Ed="inner",At="mathord",Pr="op-token",Si="open",Ph="punct",fe="rel",Ao="spacing",ge="textord";I(G,Q,fe,"≡","\\equiv",!0);I(G,Q,fe,"≺","\\prec",!0);I(G,Q,fe,"≻","\\succ",!0);I(G,Q,fe,"∼","\\sim",!0);I(G,Q,fe,"⊥","\\perp");I(G,Q,fe,"⪯","\\preceq",!0);I(G,Q,fe,"⪰","\\succeq",!0);I(G,Q,fe,"≃","\\simeq",!0);I(G,Q,fe,"∣","\\mid",!0);I(G,Q,fe,"≪","\\ll",!0);I(G,Q,fe,"≫","\\gg",!0);I(G,Q,fe,"≍","\\asymp",!0);I(G,Q,fe,"∥","\\parallel");I(G,Q,fe,"⋈","\\bowtie",!0);I(G,Q,fe,"⌣","\\smile",!0);I(G,Q,fe,"⊑","\\sqsubseteq",!0);I(G,Q,fe,"⊒","\\sqsupseteq",!0);I(G,Q,fe,"≐","\\doteq",!0);I(G,Q,fe,"⌢","\\frown",!0);I(G,Q,fe,"∋","\\ni",!0);I(G,Q,fe,"∝","\\propto",!0);I(G,Q,fe,"⊢","\\vdash",!0);I(G,Q,fe,"⊣","\\dashv",!0);I(G,Q,fe,"∋","\\owns");I(G,Q,Ph,".","\\ldotp");I(G,Q,Ph,"⋅","\\cdotp");I(G,Q,Ph,"⋅","·");I(Be,Q,ge,"⋅","·");I(G,Q,ge,"#","\\#");I(Be,Q,ge,"#","\\#");I(G,Q,ge,"&","\\&");I(Be,Q,ge,"&","\\&");I(G,Q,ge,"ℵ","\\aleph",!0);I(G,Q,ge,"∀","\\forall",!0);I(G,Q,ge,"ℏ","\\hbar",!0);I(G,Q,ge,"∃","\\exists",!0);I(G,Q,ge,"∇","\\nabla",!0);I(G,Q,ge,"♭","\\flat",!0);I(G,Q,ge,"ℓ","\\ell",!0);I(G,Q,ge,"♮","\\natural",!0);I(G,Q,ge,"♣","\\clubsuit",!0);I(G,Q,ge,"℘","\\wp",!0);I(G,Q,ge,"♯","\\sharp",!0);I(G,Q,ge,"♢","\\diamondsuit",!0);I(G,Q,ge,"ℜ","\\Re",!0);I(G,Q,ge,"♡","\\heartsuit",!0);I(G,Q,ge,"ℑ","\\Im",!0);I(G,Q,ge,"♠","\\spadesuit",!0);I(G,Q,ge,"§","\\S",!0);I(Be,Q,ge,"§","\\S");I(G,Q,ge,"¶","\\P",!0);I(Be,Q,ge,"¶","\\P");I(G,Q,ge,"†","\\dag");I(Be,Q,ge,"†","\\dag");I(Be,Q,ge,"†","\\textdagger");I(G,Q,ge,"‡","\\ddag");I(Be,Q,ge,"‡","\\ddag");I(Be,Q,ge,"‡","\\textdaggerdbl");I(G,Q,Ls,"⎱","\\rmoustache",!0);I(G,Q,Si,"⎰","\\lmoustache",!0);I(G,Q,Ls,"⟯","\\rgroup",!0);I(G,Q,Si,"⟮","\\lgroup",!0);I(G,Q,ot,"∓","\\mp",!0);I(G,Q,ot,"⊖","\\ominus",!0);I(G,Q,ot,"⊎","\\uplus",!0);I(G,Q,ot,"⊓","\\sqcap",!0);I(G,Q,ot,"∗","\\ast");I(G,Q,ot,"⊔","\\sqcup",!0);I(G,Q,ot,"◯","\\bigcirc",!0);I(G,Q,ot,"∙","\\bullet",!0);I(G,Q,ot,"‡","\\ddagger");I(G,Q,ot,"≀","\\wr",!0);I(G,Q,ot,"⨿","\\amalg");I(G,Q,ot,"&","\\And");I(G,Q,fe,"⟵","\\longleftarrow",!0);I(G,Q,fe,"⇐","\\Leftarrow",!0);I(G,Q,fe,"⟸","\\Longleftarrow",!0);I(G,Q,fe,"⟶","\\longrightarrow",!0);I(G,Q,fe,"⇒","\\Rightarrow",!0);I(G,Q,fe,"⟹","\\Longrightarrow",!0);I(G,Q,fe,"↔","\\leftrightarrow",!0);I(G,Q,fe,"⟷","\\longleftrightarrow",!0);I(G,Q,fe,"⇔","\\Leftrightarrow",!0);I(G,Q,fe,"⟺","\\Longleftrightarrow",!0);I(G,Q,fe,"↦","\\mapsto",!0);I(G,Q,fe,"⟼","\\longmapsto",!0);I(G,Q,fe,"↗","\\nearrow",!0);I(G,Q,fe,"↩","\\hookleftarrow",!0);I(G,Q,fe,"↪","\\hookrightarrow",!0);I(G,Q,fe,"↘","\\searrow",!0);I(G,Q,fe,"↼","\\leftharpoonup",!0);I(G,Q,fe,"⇀","\\rightharpoonup",!0);I(G,Q,fe,"↙","\\swarrow",!0);I(G,Q,fe,"↽","\\leftharpoondown",!0);I(G,Q,fe,"⇁","\\rightharpoondown",!0);I(G,Q,fe,"↖","\\nwarrow",!0);I(G,Q,fe,"⇌","\\rightleftharpoons",!0);I(G,ue,fe,"≮","\\nless",!0);I(G,ue,fe,"","\\@nleqslant");I(G,ue,fe,"","\\@nleqq");I(G,ue,fe,"⪇","\\lneq",!0);I(G,ue,fe,"≨","\\lneqq",!0);I(G,ue,fe,"","\\@lvertneqq");I(G,ue,fe,"⋦","\\lnsim",!0);I(G,ue,fe,"⪉","\\lnapprox",!0);I(G,ue,fe,"⊀","\\nprec",!0);I(G,ue,fe,"⋠","\\npreceq",!0);I(G,ue,fe,"⋨","\\precnsim",!0);I(G,ue,fe,"⪹","\\precnapprox",!0);I(G,ue,fe,"≁","\\nsim",!0);I(G,ue,fe,"","\\@nshortmid");I(G,ue,fe,"∤","\\nmid",!0);I(G,ue,fe,"⊬","\\nvdash",!0);I(G,ue,fe,"⊭","\\nvDash",!0);I(G,ue,fe,"⋪","\\ntriangleleft");I(G,ue,fe,"⋬","\\ntrianglelefteq",!0);I(G,ue,fe,"⊊","\\subsetneq",!0);I(G,ue,fe,"","\\@varsubsetneq");I(G,ue,fe,"⫋","\\subsetneqq",!0);I(G,ue,fe,"","\\@varsubsetneqq");I(G,ue,fe,"≯","\\ngtr",!0);I(G,ue,fe,"","\\@ngeqslant");I(G,ue,fe,"","\\@ngeqq");I(G,ue,fe,"⪈","\\gneq",!0);I(G,ue,fe,"≩","\\gneqq",!0);I(G,ue,fe,"","\\@gvertneqq");I(G,ue,fe,"⋧","\\gnsim",!0);I(G,ue,fe,"⪊","\\gnapprox",!0);I(G,ue,fe,"⊁","\\nsucc",!0);I(G,ue,fe,"⋡","\\nsucceq",!0);I(G,ue,fe,"⋩","\\succnsim",!0);I(G,ue,fe,"⪺","\\succnapprox",!0);I(G,ue,fe,"≆","\\ncong",!0);I(G,ue,fe,"","\\@nshortparallel");I(G,ue,fe,"∦","\\nparallel",!0);I(G,ue,fe,"⊯","\\nVDash",!0);I(G,ue,fe,"⋫","\\ntriangleright");I(G,ue,fe,"⋭","\\ntrianglerighteq",!0);I(G,ue,fe,"","\\@nsupseteqq");I(G,ue,fe,"⊋","\\supsetneq",!0);I(G,ue,fe,"","\\@varsupsetneq");I(G,ue,fe,"⫌","\\supsetneqq",!0);I(G,ue,fe,"","\\@varsupsetneqq");I(G,ue,fe,"⊮","\\nVdash",!0);I(G,ue,fe,"⪵","\\precneqq",!0);I(G,ue,fe,"⪶","\\succneqq",!0);I(G,ue,fe,"","\\@nsubseteqq");I(G,ue,ot,"⊴","\\unlhd");I(G,ue,ot,"⊵","\\unrhd");I(G,ue,fe,"↚","\\nleftarrow",!0);I(G,ue,fe,"↛","\\nrightarrow",!0);I(G,ue,fe,"⇍","\\nLeftarrow",!0);I(G,ue,fe,"⇏","\\nRightarrow",!0);I(G,ue,fe,"↮","\\nleftrightarrow",!0);I(G,ue,fe,"⇎","\\nLeftrightarrow",!0);I(G,ue,fe,"△","\\vartriangle");I(G,ue,ge,"ℏ","\\hslash");I(G,ue,ge,"▽","\\triangledown");I(G,ue,ge,"◊","\\lozenge");I(G,ue,ge,"Ⓢ","\\circledS");I(G,ue,ge,"®","\\circledR");I(Be,ue,ge,"®","\\circledR");I(G,ue,ge,"∡","\\measuredangle",!0);I(G,ue,ge,"∄","\\nexists");I(G,ue,ge,"℧","\\mho");I(G,ue,ge,"Ⅎ","\\Finv",!0);I(G,ue,ge,"⅁","\\Game",!0);I(G,ue,ge,"‵","\\backprime");I(G,ue,ge,"▲","\\blacktriangle");I(G,ue,ge,"▼","\\blacktriangledown");I(G,ue,ge,"■","\\blacksquare");I(G,ue,ge,"⧫","\\blacklozenge");I(G,ue,ge,"★","\\bigstar");I(G,ue,ge,"∢","\\sphericalangle",!0);I(G,ue,ge,"∁","\\complement",!0);I(G,ue,ge,"ð","\\eth",!0);I(Be,Q,ge,"ð","ð");I(G,ue,ge,"╱","\\diagup");I(G,ue,ge,"╲","\\diagdown");I(G,ue,ge,"□","\\square");I(G,ue,ge,"□","\\Box");I(G,ue,ge,"◊","\\Diamond");I(G,ue,ge,"¥","\\yen",!0);I(Be,ue,ge,"¥","\\yen",!0);I(G,ue,ge,"✓","\\checkmark",!0);I(Be,ue,ge,"✓","\\checkmark");I(G,ue,ge,"ℶ","\\beth",!0);I(G,ue,ge,"ℸ","\\daleth",!0);I(G,ue,ge,"ℷ","\\gimel",!0);I(G,ue,ge,"ϝ","\\digamma",!0);I(G,ue,ge,"ϰ","\\varkappa");I(G,ue,Si,"┌","\\@ulcorner",!0);I(G,ue,Ls,"┐","\\@urcorner",!0);I(G,ue,Si,"└","\\@llcorner",!0);I(G,ue,Ls,"┘","\\@lrcorner",!0);I(G,ue,fe,"≦","\\leqq",!0);I(G,ue,fe,"⩽","\\leqslant",!0);I(G,ue,fe,"⪕","\\eqslantless",!0);I(G,ue,fe,"≲","\\lesssim",!0);I(G,ue,fe,"⪅","\\lessapprox",!0);I(G,ue,fe,"≊","\\approxeq",!0);I(G,ue,ot,"⋖","\\lessdot");I(G,ue,fe,"⋘","\\lll",!0);I(G,ue,fe,"≶","\\lessgtr",!0);I(G,ue,fe,"⋚","\\lesseqgtr",!0);I(G,ue,fe,"⪋","\\lesseqqgtr",!0);I(G,ue,fe,"≑","\\doteqdot");I(G,ue,fe,"≓","\\risingdotseq",!0);I(G,ue,fe,"≒","\\fallingdotseq",!0);I(G,ue,fe,"∽","\\backsim",!0);I(G,ue,fe,"⋍","\\backsimeq",!0);I(G,ue,fe,"⫅","\\subseteqq",!0);I(G,ue,fe,"⋐","\\Subset",!0);I(G,ue,fe,"⊏","\\sqsubset",!0);I(G,ue,fe,"≼","\\preccurlyeq",!0);I(G,ue,fe,"⋞","\\curlyeqprec",!0);I(G,ue,fe,"≾","\\precsim",!0);I(G,ue,fe,"⪷","\\precapprox",!0);I(G,ue,fe,"⊲","\\vartriangleleft");I(G,ue,fe,"⊴","\\trianglelefteq");I(G,ue,fe,"⊨","\\vDash",!0);I(G,ue,fe,"⊪","\\Vvdash",!0);I(G,ue,fe,"⌣","\\smallsmile");I(G,ue,fe,"⌢","\\smallfrown");I(G,ue,fe,"≏","\\bumpeq",!0);I(G,ue,fe,"≎","\\Bumpeq",!0);I(G,ue,fe,"≧","\\geqq",!0);I(G,ue,fe,"⩾","\\geqslant",!0);I(G,ue,fe,"⪖","\\eqslantgtr",!0);I(G,ue,fe,"≳","\\gtrsim",!0);I(G,ue,fe,"⪆","\\gtrapprox",!0);I(G,ue,ot,"⋗","\\gtrdot");I(G,ue,fe,"⋙","\\ggg",!0);I(G,ue,fe,"≷","\\gtrless",!0);I(G,ue,fe,"⋛","\\gtreqless",!0);I(G,ue,fe,"⪌","\\gtreqqless",!0);I(G,ue,fe,"≖","\\eqcirc",!0);I(G,ue,fe,"≗","\\circeq",!0);I(G,ue,fe,"≜","\\triangleq",!0);I(G,ue,fe,"∼","\\thicksim");I(G,ue,fe,"≈","\\thickapprox");I(G,ue,fe,"⫆","\\supseteqq",!0);I(G,ue,fe,"⋑","\\Supset",!0);I(G,ue,fe,"⊐","\\sqsupset",!0);I(G,ue,fe,"≽","\\succcurlyeq",!0);I(G,ue,fe,"⋟","\\curlyeqsucc",!0);I(G,ue,fe,"≿","\\succsim",!0);I(G,ue,fe,"⪸","\\succapprox",!0);I(G,ue,fe,"⊳","\\vartriangleright");I(G,ue,fe,"⊵","\\trianglerighteq");I(G,ue,fe,"⊩","\\Vdash",!0);I(G,ue,fe,"∣","\\shortmid");I(G,ue,fe,"∥","\\shortparallel");I(G,ue,fe,"≬","\\between",!0);I(G,ue,fe,"⋔","\\pitchfork",!0);I(G,ue,fe,"∝","\\varpropto");I(G,ue,fe,"◀","\\blacktriangleleft");I(G,ue,fe,"∴","\\therefore",!0);I(G,ue,fe,"∍","\\backepsilon");I(G,ue,fe,"▶","\\blacktriangleright");I(G,ue,fe,"∵","\\because",!0);I(G,ue,fe,"⋘","\\llless");I(G,ue,fe,"⋙","\\gggtr");I(G,ue,ot,"⊲","\\lhd");I(G,ue,ot,"⊳","\\rhd");I(G,ue,fe,"≂","\\eqsim",!0);I(G,Q,fe,"⋈","\\Join");I(G,ue,fe,"≑","\\Doteq",!0);I(G,ue,ot,"∔","\\dotplus",!0);I(G,ue,ot,"∖","\\smallsetminus");I(G,ue,ot,"⋒","\\Cap",!0);I(G,ue,ot,"⋓","\\Cup",!0);I(G,ue,ot,"⩞","\\doublebarwedge",!0);I(G,ue,ot,"⊟","\\boxminus",!0);I(G,ue,ot,"⊞","\\boxplus",!0);I(G,ue,ot,"⋇","\\divideontimes",!0);I(G,ue,ot,"⋉","\\ltimes",!0);I(G,ue,ot,"⋊","\\rtimes",!0);I(G,ue,ot,"⋋","\\leftthreetimes",!0);I(G,ue,ot,"⋌","\\rightthreetimes",!0);I(G,ue,ot,"⋏","\\curlywedge",!0);I(G,ue,ot,"⋎","\\curlyvee",!0);I(G,ue,ot,"⊝","\\circleddash",!0);I(G,ue,ot,"⊛","\\circledast",!0);I(G,ue,ot,"⋅","\\centerdot");I(G,ue,ot,"⊺","\\intercal",!0);I(G,ue,ot,"⋒","\\doublecap");I(G,ue,ot,"⋓","\\doublecup");I(G,ue,ot,"⊠","\\boxtimes",!0);I(G,ue,fe,"⇢","\\dashrightarrow",!0);I(G,ue,fe,"⇠","\\dashleftarrow",!0);I(G,ue,fe,"⇇","\\leftleftarrows",!0);I(G,ue,fe,"⇆","\\leftrightarrows",!0);I(G,ue,fe,"⇚","\\Lleftarrow",!0);I(G,ue,fe,"↞","\\twoheadleftarrow",!0);I(G,ue,fe,"↢","\\leftarrowtail",!0);I(G,ue,fe,"↫","\\looparrowleft",!0);I(G,ue,fe,"⇋","\\leftrightharpoons",!0);I(G,ue,fe,"↶","\\curvearrowleft",!0);I(G,ue,fe,"↺","\\circlearrowleft",!0);I(G,ue,fe,"↰","\\Lsh",!0);I(G,ue,fe,"⇈","\\upuparrows",!0);I(G,ue,fe,"↿","\\upharpoonleft",!0);I(G,ue,fe,"⇃","\\downharpoonleft",!0);I(G,Q,fe,"⊶","\\origof",!0);I(G,Q,fe,"⊷","\\imageof",!0);I(G,ue,fe,"⊸","\\multimap",!0);I(G,ue,fe,"↭","\\leftrightsquigarrow",!0);I(G,ue,fe,"⇉","\\rightrightarrows",!0);I(G,ue,fe,"⇄","\\rightleftarrows",!0);I(G,ue,fe,"↠","\\twoheadrightarrow",!0);I(G,ue,fe,"↣","\\rightarrowtail",!0);I(G,ue,fe,"↬","\\looparrowright",!0);I(G,ue,fe,"↷","\\curvearrowright",!0);I(G,ue,fe,"↻","\\circlearrowright",!0);I(G,ue,fe,"↱","\\Rsh",!0);I(G,ue,fe,"⇊","\\downdownarrows",!0);I(G,ue,fe,"↾","\\upharpoonright",!0);I(G,ue,fe,"⇂","\\downharpoonright",!0);I(G,ue,fe,"⇝","\\rightsquigarrow",!0);I(G,ue,fe,"⇝","\\leadsto");I(G,ue,fe,"⇛","\\Rrightarrow",!0);I(G,ue,fe,"↾","\\restriction");I(G,Q,ge,"‘","`");I(G,Q,ge,"$","\\$");I(Be,Q,ge,"$","\\$");I(Be,Q,ge,"$","\\textdollar");I(G,Q,ge,"%","\\%");I(Be,Q,ge,"%","\\%");I(G,Q,ge,"_","\\_");I(Be,Q,ge,"_","\\_");I(Be,Q,ge,"_","\\textunderscore");I(G,Q,ge,"∠","\\angle",!0);I(G,Q,ge,"∞","\\infty",!0);I(G,Q,ge,"′","\\prime");I(G,Q,ge,"△","\\triangle");I(G,Q,ge,"Γ","\\Gamma",!0);I(G,Q,ge,"Δ","\\Delta",!0);I(G,Q,ge,"Θ","\\Theta",!0);I(G,Q,ge,"Λ","\\Lambda",!0);I(G,Q,ge,"Ξ","\\Xi",!0);I(G,Q,ge,"Π","\\Pi",!0);I(G,Q,ge,"Σ","\\Sigma",!0);I(G,Q,ge,"Υ","\\Upsilon",!0);I(G,Q,ge,"Φ","\\Phi",!0);I(G,Q,ge,"Ψ","\\Psi",!0);I(G,Q,ge,"Ω","\\Omega",!0);I(G,Q,ge,"A","Α");I(G,Q,ge,"B","Β");I(G,Q,ge,"E","Ε");I(G,Q,ge,"Z","Ζ");I(G,Q,ge,"H","Η");I(G,Q,ge,"I","Ι");I(G,Q,ge,"K","Κ");I(G,Q,ge,"M","Μ");I(G,Q,ge,"N","Ν");I(G,Q,ge,"O","Ο");I(G,Q,ge,"P","Ρ");I(G,Q,ge,"T","Τ");I(G,Q,ge,"X","Χ");I(G,Q,ge,"¬","\\neg",!0);I(G,Q,ge,"¬","\\lnot");I(G,Q,ge,"⊤","\\top");I(G,Q,ge,"⊥","\\bot");I(G,Q,ge,"∅","\\emptyset");I(G,ue,ge,"∅","\\varnothing");I(G,Q,At,"α","\\alpha",!0);I(G,Q,At,"β","\\beta",!0);I(G,Q,At,"γ","\\gamma",!0);I(G,Q,At,"δ","\\delta",!0);I(G,Q,At,"ϵ","\\epsilon",!0);I(G,Q,At,"ζ","\\zeta",!0);I(G,Q,At,"η","\\eta",!0);I(G,Q,At,"θ","\\theta",!0);I(G,Q,At,"ι","\\iota",!0);I(G,Q,At,"κ","\\kappa",!0);I(G,Q,At,"λ","\\lambda",!0);I(G,Q,At,"μ","\\mu",!0);I(G,Q,At,"ν","\\nu",!0);I(G,Q,At,"ξ","\\xi",!0);I(G,Q,At,"ο","\\omicron",!0);I(G,Q,At,"π","\\pi",!0);I(G,Q,At,"ρ","\\rho",!0);I(G,Q,At,"σ","\\sigma",!0);I(G,Q,At,"τ","\\tau",!0);I(G,Q,At,"υ","\\upsilon",!0);I(G,Q,At,"ϕ","\\phi",!0);I(G,Q,At,"χ","\\chi",!0);I(G,Q,At,"ψ","\\psi",!0);I(G,Q,At,"ω","\\omega",!0);I(G,Q,At,"ε","\\varepsilon",!0);I(G,Q,At,"ϑ","\\vartheta",!0);I(G,Q,At,"ϖ","\\varpi",!0);I(G,Q,At,"ϱ","\\varrho",!0);I(G,Q,At,"ς","\\varsigma",!0);I(G,Q,At,"φ","\\varphi",!0);I(G,Q,ot,"∗","*",!0);I(G,Q,ot,"+","+");I(G,Q,ot,"−","-",!0);I(G,Q,ot,"⋅","\\cdot",!0);I(G,Q,ot,"∘","\\circ",!0);I(G,Q,ot,"÷","\\div",!0);I(G,Q,ot,"±","\\pm",!0);I(G,Q,ot,"×","\\times",!0);I(G,Q,ot,"∩","\\cap",!0);I(G,Q,ot,"∪","\\cup",!0);I(G,Q,ot,"∖","\\setminus",!0);I(G,Q,ot,"∧","\\land");I(G,Q,ot,"∨","\\lor");I(G,Q,ot,"∧","\\wedge",!0);I(G,Q,ot,"∨","\\vee",!0);I(G,Q,ge,"√","\\surd");I(G,Q,Si,"⟨","\\langle",!0);I(G,Q,Si,"∣","\\lvert");I(G,Q,Si,"∥","\\lVert");I(G,Q,Ls,"?","?");I(G,Q,Ls,"!","!");I(G,Q,Ls,"⟩","\\rangle",!0);I(G,Q,Ls,"∣","\\rvert");I(G,Q,Ls,"∥","\\rVert");I(G,Q,fe,"=","=");I(G,Q,fe,":",":");I(G,Q,fe,"≈","\\approx",!0);I(G,Q,fe,"≅","\\cong",!0);I(G,Q,fe,"≥","\\ge");I(G,Q,fe,"≥","\\geq",!0);I(G,Q,fe,"←","\\gets");I(G,Q,fe,">","\\gt",!0);I(G,Q,fe,"∈","\\in",!0);I(G,Q,fe,"","\\@not");I(G,Q,fe,"⊂","\\subset",!0);I(G,Q,fe,"⊃","\\supset",!0);I(G,Q,fe,"⊆","\\subseteq",!0);I(G,Q,fe,"⊇","\\supseteq",!0);I(G,ue,fe,"⊈","\\nsubseteq",!0);I(G,ue,fe,"⊉","\\nsupseteq",!0);I(G,Q,fe,"⊨","\\models");I(G,Q,fe,"←","\\leftarrow",!0);I(G,Q,fe,"≤","\\le");I(G,Q,fe,"≤","\\leq",!0);I(G,Q,fe,"<","\\lt",!0);I(G,Q,fe,"→","\\rightarrow",!0);I(G,Q,fe,"→","\\to");I(G,ue,fe,"≱","\\ngeq",!0);I(G,ue,fe,"≰","\\nleq",!0);I(G,Q,Ao," ","\\ ");I(G,Q,Ao," ","\\space");I(G,Q,Ao," ","\\nobreakspace");I(Be,Q,Ao," ","\\ ");I(Be,Q,Ao," "," ");I(Be,Q,Ao," ","\\space");I(Be,Q,Ao," ","\\nobreakspace");I(G,Q,Ao,"","\\nobreak");I(G,Q,Ao,"","\\allowbreak");I(G,Q,Ph,",",",");I(G,Q,Ph,";",";");I(G,ue,ot,"⊼","\\barwedge",!0);I(G,ue,ot,"⊻","\\veebar",!0);I(G,Q,ot,"⊙","\\odot",!0);I(G,Q,ot,"⊕","\\oplus",!0);I(G,Q,ot,"⊗","\\otimes",!0);I(G,Q,ge,"∂","\\partial",!0);I(G,Q,ot,"⊘","\\oslash",!0);I(G,ue,ot,"⊚","\\circledcirc",!0);I(G,ue,ot,"⊡","\\boxdot",!0);I(G,Q,ot,"△","\\bigtriangleup");I(G,Q,ot,"▽","\\bigtriangledown");I(G,Q,ot,"†","\\dagger");I(G,Q,ot,"⋄","\\diamond");I(G,Q,ot,"⋆","\\star");I(G,Q,ot,"◃","\\triangleleft");I(G,Q,ot,"▹","\\triangleright");I(G,Q,Si,"{","\\{");I(Be,Q,ge,"{","\\{");I(Be,Q,ge,"{","\\textbraceleft");I(G,Q,Ls,"}","\\}");I(Be,Q,ge,"}","\\}");I(Be,Q,ge,"}","\\textbraceright");I(G,Q,Si,"{","\\lbrace");I(G,Q,Ls,"}","\\rbrace");I(G,Q,Si,"[","\\lbrack",!0);I(Be,Q,ge,"[","\\lbrack",!0);I(G,Q,Ls,"]","\\rbrack",!0);I(Be,Q,ge,"]","\\rbrack",!0);I(G,Q,Si,"(","\\lparen",!0);I(G,Q,Ls,")","\\rparen",!0);I(Be,Q,ge,"<","\\textless",!0);I(Be,Q,ge,">","\\textgreater",!0);I(G,Q,Si,"⌊","\\lfloor",!0);I(G,Q,Ls,"⌋","\\rfloor",!0);I(G,Q,Si,"⌈","\\lceil",!0);I(G,Q,Ls,"⌉","\\rceil",!0);I(G,Q,ge,"\\","\\backslash");I(G,Q,ge,"∣","|");I(G,Q,ge,"∣","\\vert");I(Be,Q,ge,"|","\\textbar",!0);I(G,Q,ge,"∥","\\|");I(G,Q,ge,"∥","\\Vert");I(Be,Q,ge,"∥","\\textbardbl");I(Be,Q,ge,"~","\\textasciitilde");I(Be,Q,ge,"\\","\\textbackslash");I(Be,Q,ge,"^","\\textasciicircum");I(G,Q,fe,"↑","\\uparrow",!0);I(G,Q,fe,"⇑","\\Uparrow",!0);I(G,Q,fe,"↓","\\downarrow",!0);I(G,Q,fe,"⇓","\\Downarrow",!0);I(G,Q,fe,"↕","\\updownarrow",!0);I(G,Q,fe,"⇕","\\Updownarrow",!0);I(G,Q,Pr,"∐","\\coprod");I(G,Q,Pr,"⋁","\\bigvee");I(G,Q,Pr,"⋀","\\bigwedge");I(G,Q,Pr,"⨄","\\biguplus");I(G,Q,Pr,"⋂","\\bigcap");I(G,Q,Pr,"⋃","\\bigcup");I(G,Q,Pr,"∫","\\int");I(G,Q,Pr,"∫","\\intop");I(G,Q,Pr,"∬","\\iint");I(G,Q,Pr,"∭","\\iiint");I(G,Q,Pr,"∏","\\prod");I(G,Q,Pr,"∑","\\sum");I(G,Q,Pr,"⨂","\\bigotimes");I(G,Q,Pr,"⨁","\\bigoplus");I(G,Q,Pr,"⨀","\\bigodot");I(G,Q,Pr,"∮","\\oint");I(G,Q,Pr,"∯","\\oiint");I(G,Q,Pr,"∰","\\oiiint");I(G,Q,Pr,"⨆","\\bigsqcup");I(G,Q,Pr,"∫","\\smallint");I(Be,Q,Ed,"…","\\textellipsis");I(G,Q,Ed,"…","\\mathellipsis");I(Be,Q,Ed,"…","\\ldots",!0);I(G,Q,Ed,"…","\\ldots",!0);I(G,Q,Ed,"⋯","\\@cdots",!0);I(G,Q,Ed,"⋱","\\ddots",!0);I(G,Q,ge,"⋮","\\varvdots");I(Be,Q,ge,"⋮","\\varvdots");I(G,Q,lr,"ˊ","\\acute");I(G,Q,lr,"ˋ","\\grave");I(G,Q,lr,"¨","\\ddot");I(G,Q,lr,"~","\\tilde");I(G,Q,lr,"ˉ","\\bar");I(G,Q,lr,"˘","\\breve");I(G,Q,lr,"ˇ","\\check");I(G,Q,lr,"^","\\hat");I(G,Q,lr,"⃗","\\vec");I(G,Q,lr,"˙","\\dot");I(G,Q,lr,"˚","\\mathring");I(G,Q,At,"","\\@imath");I(G,Q,At,"","\\@jmath");I(G,Q,ge,"ı","ı");I(G,Q,ge,"ȷ","ȷ");I(Be,Q,ge,"ı","\\i",!0);I(Be,Q,ge,"ȷ","\\j",!0);I(Be,Q,ge,"ß","\\ss",!0);I(Be,Q,ge,"æ","\\ae",!0);I(Be,Q,ge,"œ","\\oe",!0);I(Be,Q,ge,"ø","\\o",!0);I(Be,Q,ge,"Æ","\\AE",!0);I(Be,Q,ge,"Œ","\\OE",!0);I(Be,Q,ge,"Ø","\\O",!0);I(Be,Q,lr,"ˊ","\\'");I(Be,Q,lr,"ˋ","\\`");I(Be,Q,lr,"ˆ","\\^");I(Be,Q,lr,"˜","\\~");I(Be,Q,lr,"ˉ","\\=");I(Be,Q,lr,"˘","\\u");I(Be,Q,lr,"˙","\\.");I(Be,Q,lr,"¸","\\c");I(Be,Q,lr,"˚","\\r");I(Be,Q,lr,"ˇ","\\v");I(Be,Q,lr,"¨",'\\"');I(Be,Q,lr,"˝","\\H");I(Be,Q,lr,"◯","\\textcircled");var qj={"--":!0,"---":!0,"``":!0,"''":!0};I(Be,Q,ge,"–","--",!0);I(Be,Q,ge,"–","\\textendash");I(Be,Q,ge,"—","---",!0);I(Be,Q,ge,"—","\\textemdash");I(Be,Q,ge,"‘","`",!0);I(Be,Q,ge,"‘","\\textquoteleft");I(Be,Q,ge,"’","'",!0);I(Be,Q,ge,"’","\\textquoteright");I(Be,Q,ge,"“","``",!0);I(Be,Q,ge,"“","\\textquotedblleft");I(Be,Q,ge,"”","''",!0);I(Be,Q,ge,"”","\\textquotedblright");I(G,Q,ge,"°","\\degree",!0);I(Be,Q,ge,"°","\\degree");I(Be,Q,ge,"°","\\textdegree",!0);I(G,Q,ge,"£","\\pounds");I(G,Q,ge,"£","\\mathsterling",!0);I(Be,Q,ge,"£","\\pounds");I(Be,Q,ge,"£","\\textsterling",!0);I(G,ue,ge,"✠","\\maltese");I(Be,ue,ge,"✠","\\maltese");var Lk='0123456789/@."';for(var Rv=0;Rv{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 Gk[s]}else if(120782<=r&&r<=120831){var a=Math.floor((r-120782)/10);return Ict[a]}else{if(r===120485||r===120486)return Gk[0];if(120486{if(Nl(e.classes)!==Nl(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},Gj=e=>{for(var n=0;nt&&(t=l.height),l.depth>r&&(r=l.depth),l.maxFontSize>s&&(s=l.maxFontSize)}n.height=t,n.depth=r,n.maxFontSize=s},Fe=function(n,t,r,s){var a=new Cd(n,t,r,s);return zy(a),a},jl=(e,n,t,r)=>new Cd(e,n,t,r),ld=function(n,t,r){var s=Fe([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=Ze(s.height),s.maxFontSize=1,s},Pct=function(n,t,r,s){var a=new cm(n,t,r,s);return zy(a),a},To=function(n){var t=new kd(n);return zy(t),t},cd=function(n,t){return n instanceof kd?Fe([],[n],t):n},Fct=function(n){if(n.positionType==="individualShift"){for(var t=n.children,r=[t[0]],s=-t[0].shift-t[0].elem.depth,a=s,l=1;l{var t=Fe(["mspace"],[],n),r=_r(e,n);return t.style.marginRight=Ze(r),t},x0=(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},E2={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"}},Wj={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Kj=function(n,t){var[r,s,a]=Wj[n],l=new zl(r),o=new Eo([l],{width:Ze(s),height:Ze(a),style:"width:"+Ze(s),viewBox:"0 0 "+1e3*s+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),c=jl(["overlay"],[o],t);return c.height=a,c.style.height=Ze(a),c.style.width=Ze(s),c},hr={number:3,unit:"mu"},mc={number:4,unit:"mu"},_o={number:5,unit:"mu"},Uct={mord:{mop:hr,mbin:mc,mrel:_o,minner:hr},mop:{mord:hr,mop:hr,mrel:_o,minner:hr},mbin:{mord:mc,mop:mc,mopen:mc,minner:mc},mrel:{mord:_o,mop:_o,mopen:_o,minner:_o},mopen:{},mclose:{mop:hr,mbin:mc,mrel:_o,minner:hr},mpunct:{mord:hr,mop:hr,mrel:_o,mopen:hr,mclose:hr,mpunct:hr,minner:hr},minner:{mord:hr,mop:hr,mbin:mc,mrel:_o,mopen:hr,mpunct:hr,minner:hr}},qct={mord:{mop:hr},mop:{mord:hr,mop:hr},mbin:{},mrel:{},mopen:{},mclose:{mop:hr},mpunct:{},minner:{mop:hr}},Yj={},Ep={},Np={};function it(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:a,mathmlBuilder:l}=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 b=k.classes[0],v=S.classes[0];b==="mbin"&&Vct.has(v)?k.classes[0]="mord":v==="mbin"&&Gct.has(b)&&(S.classes[0]="mord")},{node:h},m,g),N2(a,(S,k)=>{var b,v,x=j2(k),y=j2(S),C=x&&y?S.hasClass("mtight")?(b=qct[x])==null?void 0:b[y]:(v=Uct[x])==null?void 0:v[y]:null;if(C)return Vj(C,d)},{node:h},m,g),a},N2=function(n,t,r,s,a){s&&n.push(s);for(var l=0;lm=>{n.splice(h+1,0,m),l++})(l)}s&&n.pop()},Xj=function(n){return n instanceof kd||n instanceof cm||n instanceof Cd&&n.hasClass("enclosing")?n:null},z2=function(n,t){var r=Xj(n);if(r){var s=r.children;if(s.length){if(t==="right")return z2(s[s.length-1],"right");if(t==="left")return z2(s[0],"left")}}return n},j2=function(n,t){if(!n)return null;t&&(n=z2(n,t));var r=n.classes[0];return Kct[r]||null},sh=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Fe(t.concat(r))},jn=function(n,t,r){if(!n)return Fe();if(Ep[n.type]){var s=Ep[n.type](n,t);if(r&&t.size!==r.size){s=Fe(t.sizingClasses(r),[s],t);var a=t.sizeMultiplier/r.sizeMultiplier;s.height*=a,s.depth*=a}return s}else throw new We("Got group of unknown type: '"+n.type+"'")};function y0(e,n){var t=Fe(["base"],e,n),r=Fe(["strut"]);return r.style.height=Ze(t.height+t.depth),t.depth&&(r.style.verticalAlign=Ze(-t.depth)),t.children.unshift(r),t}function A2(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=Qr(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var a=[],l=[],o=0;o0&&(a.push(y0(l,n)),l=[]),a.push(r[o]));l.length>0&&a.push(y0(l,n));var d;t?(d=y0(Qr(t,n,!0),n),d.classes=["tag"],a.push(d)):s&&a.push(s);var _=Fe(["katex-html"],a);if(_.setAttribute("aria-hidden","true"),d){var h=d.children[0];h.style.height=Ze(_.height+_.depth),_.depth&&(h.style.verticalAlign=Ze(-_.depth))}return _}function Zj(e){return new kd(e)}class Ke{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=Nl(this.classes));for(var r=0;r0&&(n+=' class ="'+Ss(Nl(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class Hr{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return Ss(this.toText())}toText(){return this.text}}class Qj{constructor(n){this.width=void 0,this.character=void 0,this.width=n,n>=.05555&&n<=.05556?this.character=" ":n>=.1666&&n<=.1667?this.character=" ":n>=.2222&&n<=.2223?this.character=" ":n>=.2777&&n<=.2778?this.character="  ":n>=-.05556&&n<=-.05555?this.character=" ⁣":n>=-.1667&&n<=-.1666?this.character=" ⁣":n>=-.2223&&n<=-.2222?this.character=" ⁣":n>=-.2778&&n<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var n=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return n.setAttribute("width",Ze(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var Yct=new Set(["\\imath","\\jmath"]),Xct=new Set(["mrow","mtable"]),Pi=function(n,t,r){return ar[t][n]&&ar[t][n].replace&&n.charCodeAt(0)!==55349&&!(qj.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=ar[t][n].replace),new Hr(n)},jy=function(n){return n.length===1?n[0]:new Ke("mrow",n)},Zct={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"},Ay=(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=Zct[t];if(s)return typeof s=="function"?s(e):s;var a=e.text;if(Yct.has(a))return null;if(ar[r][a]){var l=ar[r][a].replace;l&&(a=l)}var o=E2[t].fontName;return Ey(a,o,r)?E2[t].variant:null};function Iv(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof Hr&&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 Hr&&t.text===","}else return!1}var ki=function(n,t,r){if(n.length===1){var s=Qn(n[0],t);return r&&s instanceof Ke&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var a=[],l,o=0;o=1&&(l.type==="mn"||Iv(l))){var d=c.children[0];d instanceof Ke&&d.type==="mn"&&(d.children=[...l.children,...d.children],a.pop())}else if(l.type==="mi"&&l.children.length===1){var _=l.children[0];if(_ instanceof Hr&&_.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var h=c.children[0];h instanceof Hr&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),a.pop())}}}a.push(c),l=c}return a},Al=function(n,t,r){return jy(ki(n,t,r))},Qn=function(n,t){if(!n)return new Ke("mrow");if(Np[n.type])return Np[n.type](n,t);throw new We("Got group of unknown type: '"+n.type+"'")};function Vk(e,n,t,r,s){var a=ki(e,t),l;a.length===1&&a[0]instanceof Ke&&Xct.has(a[0].type)?l=a[0]:l=new Ke("mrow",a);var o=new Ke("annotation",[new Hr(n)]);o.setAttribute("encoding","application/x-tex");var c=new Ke("semantics",[l,o]),d=new Ke("math",[c]);d.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&d.setAttribute("display","block");var _=s?"katex":"katex-mathml";return Fe([_],[d])}var Qct=[[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]],Wk=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Kk=function(n,t){return t.size<2?n:Qct[n-1][t.size-1]};class xo{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||xo.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=Wk[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 xo(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:Kk(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:Wk[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=Kk(xo.BASESIZE,n);return this.size===t&&this.textSize===xo.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!==xo.BASESIZE?["sizing","reset-size"+this.size,"size"+xo.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Lct(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}xo.BASESIZE=6;var Jj=function(n){return new xo({style:n.displayMode?Ut.DISPLAY:Ut.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},eA=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Fe(r,[n])}return n},Jct=function(n,t,r){var s=Jj(r),a;if(r.output==="mathml")return Vk(n,t,s,r.displayMode,!0);if(r.output==="html"){var l=A2(n,s);a=Fe(["katex"],[l])}else{var o=Vk(n,t,s,r.displayMode,!1),c=A2(n,s);a=Fe(["katex"],[o,c])}return eA(a,r)},eut=function(n,t,r){var s=Jj(r),a=A2(n,s),l=Fe(["katex"],[a]);return eA(l,r)},tut={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":"="},fm=function(n){var t=new Ke("mo",[new Hr(tut[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},nut={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]},rut=new Set(["widehat","widecheck","widetilde","utilde"]),hm=function(n,t){function r(){var o=4e5,c=n.label.slice(1);if(rut.has(c)&&"base"in n){var d=n.base.type==="ordgroup"?n.base.body.length:1,_,h,m;if(d>5)c==="widehat"||c==="widecheck"?(_=420,o=2364,m=.42,h=c+"4"):(_=312,o=2340,m=.34,h="tilde4");else{var g=[1,1,2,2,3,3][d];c==="widehat"||c==="widecheck"?(o=[0,1062,2364,2364,2364][g],_=[0,239,300,360,420][g],m=[0,.24,.3,.3,.36,.42][g],h=c+g):(o=[0,600,1033,2339,2340][g],_=[0,260,286,306,312][g],m=[0,.26,.286,.3,.306,.34][g],h="tilde"+g)}var S=new zl(h),k=new Eo([S],{width:"100%",height:Ze(m),viewBox:"0 0 "+o+" "+_,preserveAspectRatio:"none"});return{span:jl([],[k],t),minWidth:0,height:m}}else{var b=[],v=nut[c];if(!v)throw new Error('No SVG data for "'+c+'".');var[x,y,C]=v,j=C/1e3,N=x.length,T,z;if(N===1){if(v.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');T=["hide-tail"],z=[v[3]]}else if(N===2)T=["halfarrow-left","halfarrow-right"],z=["xMinYMin","xMaxYMin"];else if(N===3)T=["brace-left","brace-center","brace-right"],z=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+N+" children.");for(var D=0;D0&&(s.style.minWidth=Ze(a)),s},sut=function(n,t,r,s,a){var l,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(l=Fe(["stretchy",t],[],a),t==="fbox"){var c=a.color&&a.getColor();c&&(l.style.borderColor=c)}}else{var d=[];/^[bx]cancel$/.test(t)&&d.push(new x2({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&d.push(new x2({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var _=new Eo(d,{width:"100%",height:Ze(o)});l=jl([],[_],a)}return l.height=o,l.style.height=Ze(o),l},iut={bin:1,close:1,inner:1,open:1,punct:1,rel:1},aut={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function out(e){return e in iut}function en(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 _m(e){var n=pm(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 pm(e){return e&&(e.type==="atom"||aut.hasOwnProperty(e.type))?e:null}var tA=e=>{if(e instanceof xi)return e;if(Rct(e)&&e.children.length===1)return tA(e.children[0])},Ty=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=en(e.base,"accent"),t=r.base,e.base=t,s=Mct(jn(e,n)),e.base=r):(r=en(e,"accent"),t=r.base);var a=jn(t,n.havingCrampedStyle()),l=r.isShifty&&jo(t),o=0;if(l){var c,d;o=(c=(d=tA(a))==null?void 0:d.skew)!=null?c:0}var _=r.label==="\\c",h=_?a.height+a.depth:Math.min(a.height,n.fontMetrics().xHeight),m;if(r.isStretchy)m=hm(r,n),m=Nn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+Ze(2*o)+")",marginLeft:Ze(2*o)}:void 0}]});else{var g,S;r.label==="\\vec"?(g=Kj("vec",n),S=Wj.vec[1]):(g=dm({mode:r.mode,text:r.label},n,"textord"),g=Tct(g),g.italic=0,S=g.width,_&&(h+=g.depth)),m=Fe(["accent-body"],[g]);var k=r.label==="\\textcircled";k&&(m.classes.push("accent-full"),h=a.height);var b=o;k||(b-=S/2),m.style.left=Ze(b),r.label==="\\textcircled"&&(m.style.top=".2em"),m=Nn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-h},{type:"elem",elem:m}]})}var v=Fe(["mord","accent"],[m],n);return s?(s.children[0]=v,s.height=Math.max(v.height,s.height),s.classes[0]="mord",s):v},nA=(e,n)=>{var t=e.isStretchy?fm(e.label):new Ke("mo",[Pi(e.label,e.mode)]),r=new Ke("mover",[Qn(e.base,n),t]);return r.setAttribute("accent","true"),r},lut=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));it({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,n)=>{var t=zp(n[0]),r=!lut.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:Ty,mathmlBuilder:nA});it({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,n)=>{var t=n[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:Ty,mathmlBuilder:nA});it({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"accentUnder",mode:t.mode,label:r,base:s}},htmlBuilder:(e,n)=>{var t=jn(e.base,n),r=hm(e,n),s=e.label==="\\utilde"?.12:0,a=Nn({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Fe(["mord","accentunder"],[a],n)},mathmlBuilder:(e,n)=>{var t=fm(e.label),r=new Ke("munder",[Qn(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var w0=e=>{var n=new Ke("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};it({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:n[0],below:t[0]}},htmlBuilder(e,n){var t=n.style,r=n.havingStyle(t.sup()),s=cd(jn(e.body,r,n),n),a=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(a+"-arrow-pad");var l;e.below&&(r=n.havingStyle(t.sub()),l=cd(jn(e.below,r,n),n),l.classes.push(a+"-arrow-pad"));var o=hm(e,n),c=-n.fontMetrics().axisHeight+.5*o.height,d=-n.fontMetrics().axisHeight-.5*o.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(d-=s.depth);var _;if(l){var h=-n.fontMetrics().axisHeight+l.height+.5*o.height+.111;_=Nn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:l,shift:h}]})}else _=Nn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]}]});return Fe(["mrel","x-arrow"],[_],n)},mathmlBuilder(e,n){var t=fm(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=w0(Qn(e.body,n));if(e.below){var a=w0(Qn(e.below,n));r=new Ke("munderover",[t,a,s])}else r=new Ke("mover",[t,s])}else if(e.below){var l=w0(Qn(e.below,n));r=new Ke("munder",[t,l])}else r=w0(),r=new Ke("mover",[t,r]);return r}});function rA(e,n){var t=Qr(e.body,n,!0);return Fe([e.mclass],t,n)}function sA(e,n){var t,r=ki(e.body,n);return e.mclass==="minner"?t=new Ke("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Ke("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Ke("mo",r),e.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):e.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):e.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}it({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"mclass",mode:t.mode,mclass:"m"+r.slice(5),body:$r(s),isCharacterBox:jo(s)}},htmlBuilder:rA,mathmlBuilder:sA});var mm=e=>{var n=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return n.type==="atom"&&(n.family==="bin"||n.family==="rel")?"m"+n.family:"mord"};it({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:mm(n[0]),body:$r(n[1]),isCharacterBox:jo(n[1])}}});it({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,n){var{parser:t,funcName:r}=e,s=n[1],a=n[0],l;r!=="\\stackrel"?l=mm(s):l="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:$r(s)},c={type:"supsub",mode:a.mode,base:o,sup:r==="\\underset"?null:a,sub:r==="\\underset"?a:null};return{type:"mclass",mode:t.mode,mclass:l,body:[c],isCharacterBox:jo(c)}},htmlBuilder:rA,mathmlBuilder:sA});it({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:mm(n[0]),body:$r(n[0])}},htmlBuilder(e,n){var t=Qr(e.body,n,!0),r=Fe([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=ki(e.body,n),r=new Ke("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var cut={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Yk=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),Xk=e=>e.type==="textord"&&e.text==="@",uut=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function dut(e,n,t){var r=cut[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]],[]),a={type:"atom",text:r,mode:"math",family:"rel"},l=t.callFunction("\\Big",[a],[]),o=t.callFunction("\\\\cdright",[n[1]],[]),c={type:"ordgroup",mode:"math",body:[s,l,o]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var d={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[d],[])}default:return{type:"textord",text:" ",mode:"math"}}}function fut(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 We("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],a=0;aAV".includes(d))for(var h=0;h<2;h++){for(var m=!0,g=c+1;gAV=|." after @',l[c]);var S=dut(d,_,e),k={type:"styling",body:[S],mode:"math",style:"display",resetFont:!0};r.push(k),o=Yk()}a%2===0?r.push(o):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var b=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:b,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}it({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:n[0]}},htmlBuilder(e,n){var t=n.havingStyle(n.style.sup()),r=cd(jn(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=Ze(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Ke("mrow",[Qn(e.label,n)]);return t=new Ke("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ke("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});it({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,n){var{parser:t}=e;return{type:"cdlabelparent",mode:t.mode,fragment:n[0]}},htmlBuilder(e,n){var t=cd(jn(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Ke("mrow",[Qn(e.fragment,n)])}});it({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=en(n[0],"ordgroup"),s=r.body,a="",l=0;l=1114111)throw new We("\\@char with invalid code point "+a);return c<=65535?d=String.fromCharCode(c):(c-=65536,d=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:d}}});var iA=(e,n)=>{var t=Qr(e.body,n.withColor(e.color),!1);return To(t)},aA=(e,n)=>{var t=ki(e.body,n.withColor(e.color)),r=new Ke("mstyle",t);return r.setAttribute("mathcolor",e.color),r};it({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=en(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:$r(s)}},htmlBuilder:iA,mathmlBuilder:aA});it({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=en(n[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var a=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:s,body:a}},htmlBuilder:iA,mathmlBuilder:aA});it({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,n,t){var{parser:r}=e,s=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:s&&en(s,"size").value}},htmlBuilder(e,n){var t=Fe(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=Ze(_r(e.size,n)))),t},mathmlBuilder(e,n){var t=new Ke("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",Ze(_r(e.size,n)))),t}});var T2={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},oA=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new We("Expected a control sequence",e);return n},hut=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},lA=(e,n,t,r)=>{var s=e.gullet.macros.get(t.text);s==null&&(t.noexpand=!0,s={tokens:[t],numArgs:0,unexpandable:!e.gullet.isExpandable(t.text)}),e.gullet.macros.set(n,s,r)};it({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:n,funcName:t}=e;n.consumeSpaces();var r=n.fetch();if(T2[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=T2[r.text]),en(n.parseFunction(),"internal");throw new We("Invalid token after macro prefix",r)}});it({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=n.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new We("Expected a control sequence",r);for(var a=0,l,o=[[]];n.gullet.future().text!=="{";)if(r=n.gullet.popToken(),r.text==="#"){if(n.gullet.future().text==="{"){l=n.gullet.future(),o[a].push("{");break}if(r=n.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new We('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new We('Argument number "'+r.text+'" out of order');a++,o.push([])}else{if(r.text==="EOF")throw new We("Expected a macro definition");o[a].push(r.text)}var{tokens:c}=n.gullet.consumeArg();return l&&c.unshift(l),(t==="\\edef"||t==="\\xdef")&&(c=n.gullet.expandTokens(c),c.reverse()),n.gullet.macros.set(s,{tokens:c,numArgs:a,delimiters:o},t===T2[t]),{type:"internal",mode:n.mode}}});it({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=oA(n.gullet.popToken());n.gullet.consumeSpaces();var s=hut(n);return lA(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});it({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=oA(n.gullet.popToken()),s=n.gullet.popToken(),a=n.gullet.popToken();return lA(n,r,a,t==="\\\\globalfuture"),n.gullet.pushToken(a),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var Df=function(n,t,r){var s=ar.math[n]&&ar.math[n].replace,a=Ey(s||n,t,r);if(!a)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return a},My=function(n,t,r,s){var a=r.havingBaseStyle(t),l=Fe(s.concat(a.sizingClasses(r)),[n],r),o=a.sizeMultiplier/r.sizeMultiplier;return l.height*=o,l.depth*=o,l.maxFontSize=a.sizeMultiplier,l},cA=function(n,t,r){var s=t.havingBaseStyle(r),a=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;n.classes.push("delimcenter"),n.style.top=Ze(a),n.height-=a,n.depth+=a},_ut=function(n,t,r,s,a,l){var o=Ms(n,"Main-Regular",a,s),c=My(o,t,s,l);return cA(c,s,t),c},put=function(n,t,r,s){return Ms(n,"Size"+t+"-Regular",r,s)},uA=function(n,t,r,s,a,l){var o=put(n,t,a,s),c=My(Fe(["delimsizing","size"+t],[o],s),Ut.TEXT,s,l);return r&&cA(c,s,Ut.TEXT),c},Bv=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var a=Fe(["delimsizinginner",s],[Fe([],[Ms(n,t,r)])]);return{type:"elem",elem:a}},$v=function(n,t,r){var s=Ma["Size4-Regular"][n.charCodeAt(0)]?Ma["Size4-Regular"][n.charCodeAt(0)][4]:Ma["Size1-Regular"][n.charCodeAt(0)][4],a=new zl("inner",kct(n,Math.round(1e3*t))),l=new Eo([a],{width:Ze(s),height:Ze(t),style:"width:"+Ze(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=jl([],[l],r);return o.height=t,o.style.height=Ze(t),o.style.width=Ze(s),{type:"elem",elem:o}},M2=.008,S0={type:"kern",size:-1*M2},mut=new Set(["|","\\lvert","\\rvert","\\vert"]),gut=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),dA=function(n,t,r,s,a,l){var o,c,d,_,h="",m=0;o=d=_=n,c=null;var g="Size1-Regular";n==="\\uparrow"?d=_="⏐":n==="\\Uparrow"?d=_="‖":n==="\\downarrow"?o=d="⏐":n==="\\Downarrow"?o=d="‖":n==="\\updownarrow"?(o="\\uparrow",d="⏐",_="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",d="‖",_="\\Downarrow"):mut.has(n)?(d="∣",h="vert",m=333):gut.has(n)?(d="∥",h="doublevert",m=556):n==="["||n==="\\lbrack"?(o="⎡",d="⎢",_="⎣",g="Size4-Regular",h="lbrack",m=667):n==="]"||n==="\\rbrack"?(o="⎤",d="⎥",_="⎦",g="Size4-Regular",h="rbrack",m=667):n==="\\lfloor"||n==="⌊"?(d=o="⎢",_="⎣",g="Size4-Regular",h="lfloor",m=667):n==="\\lceil"||n==="⌈"?(o="⎡",d=_="⎢",g="Size4-Regular",h="lceil",m=667):n==="\\rfloor"||n==="⌋"?(d=o="⎥",_="⎦",g="Size4-Regular",h="rfloor",m=667):n==="\\rceil"||n==="⌉"?(o="⎤",d=_="⎥",g="Size4-Regular",h="rceil",m=667):n==="("||n==="\\lparen"?(o="⎛",d="⎜",_="⎝",g="Size4-Regular",h="lparen",m=875):n===")"||n==="\\rparen"?(o="⎞",d="⎟",_="⎠",g="Size4-Regular",h="rparen",m=875):n==="\\{"||n==="\\lbrace"?(o="⎧",c="⎨",_="⎩",d="⎪",g="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",c="⎬",_="⎭",d="⎪",g="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",_="⎩",d="⎪",g="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",_="⎭",d="⎪",g="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",_="⎭",d="⎪",g="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",_="⎩",d="⎪",g="Size4-Regular");var S=Df(o,g,a),k=S.height+S.depth,b=Df(d,g,a),v=b.height+b.depth,x=Df(_,g,a),y=x.height+x.depth,C=0,j=1;if(c!==null){var N=Df(c,g,a);C=N.height+N.depth,j=2}var T=k+y+C,z=Math.max(0,Math.ceil((t-T)/(j*v))),D=T+z*j*v,O=s.fontMetrics().axisHeight;r&&(O*=s.sizeMultiplier);var H=D/2-O,P=[];if(h.length>0){var F=D-k-y,W=Math.round(D*1e3),Z=Cct(h,Math.round(F*1e3)),U=new zl(h,Z),X=Ze(m/1e3),J=Ze(W/1e3),$=new Eo([U],{width:X,height:J,viewBox:"0 0 "+m+" "+W}),L=jl([],[$],s);L.height=W/1e3,L.style.width=X,L.style.height=J,P.push({type:"elem",elem:L})}else{if(P.push(Bv(_,g,a)),P.push(S0),c===null){var B=D-k-y+2*M2;P.push($v(d,B,s))}else{var Y=(D-k-y-C)/2+2*M2;P.push($v(d,Y,s)),P.push(S0),P.push(Bv(c,g,a)),P.push(S0),P.push($v(d,Y,s))}P.push(S0),P.push(Bv(o,g,a))}var V=s.havingBaseStyle(Ut.TEXT),ie=Nn({positionType:"bottom",positionData:H,children:P});return My(Fe(["delimsizing","mult"],[ie],V),Ut.TEXT,s,l)},Hv=80,Pv=.08,Fv=function(n,t,r,s,a){var l=Sct(n,s,r),o=new zl(n,l),c=new Eo([o],{width:"400em",height:Ze(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return jl(["hide-tail"],[c],a)},vut=function(n,t){var r=t.havingBaseSizing(),s=mA("\\surd",n*r.sizeMultiplier,pA,r),a=r.sizeMultiplier,l=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,c,d,_,h;return s.type==="small"?(_=1e3+1e3*l+Hv,n<1?a=1:n<1.4&&(a=.7),c=(1+l+Pv)/a,d=(1+l)/a,o=Fv("sqrtMain",c,_,l,t),o.style.minWidth="0.853em",h=.833/a):s.type==="large"?(_=(1e3+Hv)*qf[s.size],d=(qf[s.size]+l)/a,c=(qf[s.size]+l+Pv)/a,o=Fv("sqrtSize"+s.size,c,_,l,t),o.style.minWidth="1.02em",h=1/a):(c=n+l+Pv,d=n+l,_=Math.floor(1e3*n+l)+Hv,o=Fv("sqrtTall",c,_,l,t),o.style.minWidth="0.742em",h=1.056),o.height=d,o.style.height=Ze(c),{span:o,advanceWidth:h,ruleWidth:(t.fontMetrics().sqrtRuleThickness+l)*a}},fA=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),but=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),hA=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),qf=[0,1.2,1.8,2.4,3],_A=function(n,t,r,s,a){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),fA.has(n)||hA.has(n))return uA(n,t,!1,r,s,a);if(but.has(n))return dA(n,qf[t],!1,r,s,a);throw new We("Illegal delimiter: '"+n+"'")},xut=[{type:"small",style:Ut.SCRIPTSCRIPT},{type:"small",style:Ut.SCRIPT},{type:"small",style:Ut.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],yut=[{type:"small",style:Ut.SCRIPTSCRIPT},{type:"small",style:Ut.SCRIPT},{type:"small",style:Ut.TEXT},{type:"stack"}],pA=[{type:"small",style:Ut.SCRIPTSCRIPT},{type:"small",style:Ut.SCRIPT},{type:"small",style:Ut.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],wut=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.")},mA=function(n,t,r,s){for(var a=Math.min(2,3-s.style.size),l=a;lt)return o}return r[r.length-1]},R2=function(n,t,r,s,a,l){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;hA.has(n)?o=xut:fA.has(n)?o=pA:o=yut;var c=mA(n,t,o,s);return c.type==="small"?_ut(n,c.style,r,s,a,l):c.type==="large"?uA(n,c.size,r,s,a,l):dA(n,t,r,s,a,l)},Uv=function(n,t,r,s,a,l){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,d=5/s.fontMetrics().ptPerEm,_=Math.max(t-o,r+o),h=Math.max(_/500*c,2*_-d);return R2(n,h,!0,s,a,l)},Zk={"\\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}},Sut=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 Qk(e){return"isMiddle"in e}function gm(e,n){var t=pm(e);if(t&&Sut.has(t.text))return t;throw t?new We("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new We("Invalid delimiter type '"+e.type+"'",e)}it({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,n)=>{var t=gm(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Zk[e.funcName].size,mclass:Zk[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Fe([e.mclass]):_A(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Pi(e.delim,e.mode));var t=new Ke("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=Ze(qf[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function Jk(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}it({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=e.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new We("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:gm(n[0],e).text,color:t}}});it({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=gm(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=en(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,n)=>{Jk(e);for(var t=Qr(e.body,n,!0,["mopen","mclose"]),r=0,s=0,a=!1,l=0;l{Jk(e);var t=ki(e.body,n);if(e.left!=="."){var r=new Ke("mo",[Pi(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Ke("mo",[Pi(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return jy(t)}});it({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=gm(n[0],e);if(!e.parser.leftrightDepth)throw new We("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=sh(n,[]):(t=_A(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Pi("|","text"):Pi(e.delim,e.mode),r=new Ke("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var vm=(e,n)=>{var t=cd(jn(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,a,l,o=jo(e.body);if(r==="sout")a=Fe(["stretchy","sout"]),a.height=n.fontMetrics().defaultRuleThickness/s,l=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=_r({number:.6,unit:"pt"},n),d=_r({number:.35,unit:"ex"},n),_=n.havingBaseSizing();s=s/_.sizeMultiplier;var h=t.height+t.depth+c+d;t.style.paddingLeft=Ze(h/2+c);var m=Math.floor(1e3*h*s),g=yct(m),S=new Eo([new zl("phase",g)],{width:"400em",height:Ze(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});a=jl(["hide-tail"],[S],n),a.style.height=Ze(h),l=t.depth+c+d}else{/cancel/.test(r)?o||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var k,b,v=0;/box/.test(r)?(v=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:v),b=k):r==="angl"?(v=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*v,b=Math.max(0,.25-t.depth)):(k=o?.2:0,b=k),a=sut(t,r,k,b,n),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle="solid",a.style.borderWidth=Ze(v)):r==="angl"&&v!==.049&&(a.style.borderTopWidth=Ze(v),a.style.borderRightWidth=Ze(v)),l=t.depth+b,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var x;if(e.backgroundColor)x=Nn({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(r)?["svg-align"]:[];x=Nn({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:a,shift:l,wrapperClasses:y}]})}return/cancel/.test(r)&&(x.height=t.height,x.depth=t.depth),/cancel/.test(r)&&!o?Fe(["mord","cancel-lap"],[x],n):Fe(["mord"],[x],n)},bm=(e,n)=>{var t,r=new Ke(e.label.includes("colorbox")?"mpadded":"menclose",[Qn(e.body,n)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=n.fontMetrics().fboxsep*n.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*t+"pt"),r.setAttribute("height","+"+2*t+"pt"),r.setAttribute("lspace",t+"pt"),r.setAttribute("voffset",t+"pt"),e.label==="\\fcolorbox"){var s=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness);r.setAttribute("style","border: "+Ze(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};it({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,a=en(n[0],"color-token").color,l=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,body:l}},htmlBuilder:vm,mathmlBuilder:bm});it({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,a=en(n[0],"color-token").color,l=en(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:l,borderColor:a,body:o}},htmlBuilder:vm,mathmlBuilder:bm});it({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\fbox",body:n[0]}}});it({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:vm,mathmlBuilder:bm});it({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:vm,mathmlBuilder:bm});it({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\angl",body:n[0]}}});var gA={};function Pa(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:a,mathmlBuilder:l}=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 We("{"+e.envName+"} can be used only in display mode.")},kut=new Set(["gather","gather*"]);function Ry(e){if(!e.includes("ed"))return!e.includes("*")}function Hl(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:a,arraystretch:l,colSeparationType:o,autoTag:c,singleRow:d,emptySingleRow:_,maxNumCols:h,leqno:m}=n;if(e.gullet.beginGroup(),d||e.gullet.macros.set("\\cr","\\\\\\relax"),!l){var g=e.gullet.expandMacroAsText("\\arraystretch");if(g==null)l=1;else if(l=parseFloat(g),!l||l<0)throw new We("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var S=[],k=[S],b=[],v=[],x=c!=null?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new ia("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),v.push(e8(e));;){var j=e.parseExpression(!1,d?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var N={type:"ordgroup",mode:e.mode,body:j};t&&(N={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[N]}),S.push(N);var T=e.fetch().text;if(T==="&"){if(h&&S.length===h){if(d||o)throw new We("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(),S.length===1&&N.type==="styling"&&N.body.length===1&&N.body[0].type==="ordgroup"&&N.body[0].body.length===0&&(k.length>1||!_)&&k.pop(),v.length0&&(y+=.25),d.push({pos:y,isDashed:Xe[st]})}for(C(l[0]),r=0;r0&&(H+=x,TXe))for(r=0;r=o)){var oe=void 0;if(s>0||n.hskipBeforeAndAfter){var ce,_e;oe=(ce=(_e=V)==null?void 0:_e.pregap)!=null?ce:m,oe!==0&&(Z=Fe(["arraycolsep"],[]),Z.style.width=Ze(oe),W.push(Z))}var de=[];for(r=0;r0){for(var cn=ld("hline",t,_),vt=ld("hdashline",t,_),rt=[{type:"elem",elem:Nt,shift:0}];d.length>0;){var Je=d.pop(),qt=Je.pos-P;Je.isDashed?rt.push({type:"elem",elem:vt,shift:qt}):rt.push({type:"elem",elem:cn,shift:qt})}Nt=Nn({positionType:"individualShift",children:rt})}if(X.length===0)return Fe(["mord"],[Nt],t);var we=Nn({positionType:"individualShift",children:X}),Oe=Fe(["tag"],[we],t);return To([Nt,Oe])},Cut={c:"center ",l:"left ",r:"right "},Ua=function(n,t){for(var r=[],s=new Ke("mtd",[],["mtr-glue"]),a=new Ke("mtd",[],["mml-eqn-num"]),l=0;l0){var S=n.cols,k="",b=!1,v=0,x=S.length;S[0].type==="separator"&&(m+="top ",v=1),S[S.length-1].type==="separator"&&(m+="bottom ",x-=1);for(var y=v;y0?"left ":"",m+=D[D.length-1].length>0?"right ":"";for(var O=1;O0&&g&&(b=1),r[S]={type:"align",align:k,pregap:b,postgap:0}}return l.colSeparationType=g?"align":"alignat",l};Pa({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=pm(n[0]),r=t?[n[0]]:en(n[0],"ordgroup").body,s=r.map(function(l){var o=_m(l),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 We("Unknown column alignment: "+c,l)}),a={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Hl(e.parser,a,Dy(e.envName))},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({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 We("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var a=Hl(e.parser,r,Dy(e.envName)),l=Math.max(0,...a.body.map(o=>o.length));return a.cols=new Array(l).fill({type:"align",align:t}),n?{type:"leftright",mode:e.mode,body:[a],left:n[0],right:n[1],rightColor:void 0}:a},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=Hl(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=pm(n[0]),r=t?[n[0]]:en(n[0],"ordgroup").body,s=r.map(function(o){var c=_m(o),d=c.text;if("lc".includes(d))return{type:"align",align:d};throw new We("Unknown column alignment: "+d,o)});if(s.length>1)throw new We("{subarray} can contain only one column");var a={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},l=Hl(e.parser,a,"script");if(l.body.length>0&&l.body[0].length>1)throw new We("{subarray} can contain only one column");return l},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({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=Hl(e.parser,n,Dy(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:xA,htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){kut.has(e.envName)&&xm(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Ry(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Hl(e.parser,n,"display")},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:xA,htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){xm(e);var n={autoTag:Ry(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Hl(e.parser,n,"display")},htmlBuilder:Fa,mathmlBuilder:Ua});Pa({type:"array",names:["CD"],props:{numArgs:0},handler(e){return xm(e),fut(e.parser)},htmlBuilder:Fa,mathmlBuilder:Ua});ne("\\nonumber","\\gdef\\@eqnsw{0}");ne("\\notag","\\nonumber");it({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new We(e.funcName+" valid only within array environment")}});var t8=gA;it({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];if(s.type!=="ordgroup")throw new We("Invalid environment name",s);for(var a="",l=0;l{var t=e.font,r=n.withFont(t);return jn(e.body,r)},wA=(e,n)=>{var t=e.font,r=n.withFont(t);return Qn(e.body,r)},n8={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};it({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=zp(n[0]),a=r;return a in n8&&(a=n8[a]),{type:"font",mode:t.mode,font:a.slice(1),body:s}},htmlBuilder:yA,mathmlBuilder:wA});it({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"mclass",mode:t.mode,mclass:mm(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:jo(r)}}});it({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r,breakOnTokenText:s}=e,{mode:a}=t,l=t.parseExpression(!0,s);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:l}}},htmlBuilder:yA,mathmlBuilder:wA});var Eut=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),a;a=n.havingStyle(r);var l=jn(e.numer,a,n);if(e.continued){var o=8.5/n.fontMetrics().ptPerEm,c=3.5/n.fontMetrics().ptPerEm;l.height=l.height0?S=3*m:S=7*m,k=n.fontMetrics().denom1):(h>0?(g=n.fontMetrics().num2,S=m):(g=n.fontMetrics().num3,S=3*m),k=n.fontMetrics().denom2);var b;if(_){var x=n.fontMetrics().axisHeight;g-l.depth-(x+.5*h){var t=new Ke("mfrac",[Qn(e.numer,n),Qn(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=_r(e.barSize,n);t.setAttribute("linethickness",Ze(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var a=new Ke("mo",[new Hr(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(t),e.rightDelim!=null){var l=new Ke("mo",[new Hr(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return jy(s)}return t},SA=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};it({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],a=n[1],l,o=null,c=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":l=!0;break;case"\\\\atopfrac":l=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":l=!1,o="(",c=")";break;case"\\\\bracefrac":l=!1,o="\\{",c="\\}";break;case"\\\\brackfrac":l=!1,o="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var d=r==="\\cfrac",_=null;return d||r.startsWith("\\d")?_="display":r.startsWith("\\t")&&(_="text"),SA({type:"genfrac",mode:t.mode,numer:s,denom:a,continued:d,hasBarLine:l,leftDelim:o,rightDelim:c,barSize:null},_)},htmlBuilder:Eut,mathmlBuilder:Nut});it({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:n,funcName:t,token:r}=e,s;switch(t){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:s,token:r}}});var r8=["display","text","script","scriptscript"],s8=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};it({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,n){var{parser:t}=e,r=n[4],s=n[5],a=zp(n[0]),l=a.type==="atom"&&a.family==="open"?s8(a.text):null,o=zp(n[1]),c=o.type==="atom"&&o.family==="close"?s8(o.text):null,d=en(n[2],"size"),_,h=null;d.isBlank?_=!0:(h=d.value,_=h.number>0);var m=null,g=n[3];if(g.type==="ordgroup"){if(g.body.length>0){var S=en(g.body[0],"textord");m=r8[Number(S.text)]}}else g=en(g,"textord"),m=r8[Number(g.text)];return SA({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:_,barSize:h,leftDelim:l,rightDelim:c},m)}});it({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,n){var{parser:t,funcName:r,token:s}=e;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:en(n[0],"size").value,token:s}}});it({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],a=en(n[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var l=n[2],o=a.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:l,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null}}});var kA=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?jn(e.sup,n.havingStyle(t.sup()),n):jn(e.sub,n.havingStyle(t.sub()),n),s=en(e.base,"horizBrace")):s=en(e,"horizBrace");var a=jn(s.base,n.havingBaseStyle(Ut.DISPLAY)),l=hm(s,n),o;if(s.isOver?o=Nn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:l,wrapperClasses:["svg-align"]}]}):o=Nn({positionType:"bottom",positionData:a.depth+.1+l.height,children:[{type:"elem",elem:l,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:a}]}),r){var c=Fe(["minner",s.isOver?"mover":"munder"],[o],n);s.isOver?o=Nn({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=Nn({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Fe(["minner",s.isOver?"mover":"munder"],[o],n)},zut=(e,n)=>{var t=fm(e.label);return new Ke(e.isOver?"mover":"munder",[Qn(e.base,n),t])};it({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"horizBrace",mode:t.mode,label:r,isOver:r.includes("\\over"),base:n[0]}},htmlBuilder:kA,mathmlBuilder:zut});it({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=en(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:$r(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=Qr(e.body,n,!1);return Pct(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=Al(e.body,n);return t instanceof Ke||(t=new Ke("mrow",[t])),t.setAttribute("href",e.href),t}});it({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=en(n[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var s=[],a=0;a{var{parser:t,funcName:r,token:s}=e,a=en(n[0],"raw").string,l=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=a,o={command:"\\htmlClass",class:a};break;case"\\htmlId":c.id=a,o={command:"\\htmlId",id:a};break;case"\\htmlStyle":c.style=a,o={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var d=a.split(","),_=0;_{var t=Qr(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Fe(r,t,n);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&s.setAttribute(a,e.attributes[a]);return s},mathmlBuilder:(e,n)=>Al(e.body,n)});it({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"htmlmathml",mode:t.mode,html:$r(n[0]),mathml:$r(n[1])}},htmlBuilder:(e,n)=>{var t=Qr(e.html,n,!1);return To(t)},mathmlBuilder:(e,n)=>Al(e.mathml,n)});var qv=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 We("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!Hj(r))throw new We("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};it({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,n,t)=>{var{parser:r}=e,s={number:0,unit:"em"},a={number:.9,unit:"em"},l={number:0,unit:"em"},o="";if(t[0])for(var c=en(t[0],"raw").string,d=c.split(","),_=0;_{var t=_r(e.height,n),r=0;e.totalheight.number>0&&(r=_r(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=_r(e.width,n));var a={height:Ze(t+r)};s>0&&(a.width=Ze(s)),r>0&&(a.verticalAlign=Ze(-r));var l=new jct(e.src,e.alt,a);return l.height=t,l.depth=r,l},mathmlBuilder:(e,n)=>{var t=new Ke("mglyph",[]);t.setAttribute("alt",e.alt);var r=_r(e.height,n),s=0;if(e.totalheight.number>0&&(s=_r(e.totalheight,n)-r,t.setAttribute("valign",Ze(-s))),t.setAttribute("height",Ze(r+s)),e.width.number>0){var a=_r(e.width,n);t.setAttribute("width",Ze(a))}return t.setAttribute("src",e.src),t}});it({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=en(n[0],"size");if(t.settings.strict){var a=r[1]==="m",l=s.value.unit==="mu";a?(l||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")):l&&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 Vj(e.dimension,n)},mathmlBuilder(e,n){var t=_r(e.dimension,n);return new Qj(t)}});it({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,n)=>{var t;e.alignment==="clap"?(t=Fe([],[jn(e.body,n)]),t=Fe(["inner"],[t],n)):t=Fe(["inner"],[jn(e.body,n)]);var r=Fe(["fix"],[]),s=Fe([e.alignment],[t,r],n),a=Fe(["strut"]);return a.style.height=Ze(s.height+s.depth),s.depth&&(a.style.verticalAlign=Ze(-s.depth)),s.children.unshift(a),s=Fe(["thinbox"],[s],n),Fe(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Ke("mpadded",[Qn(e.body,n)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",r+"width")}return t.setAttribute("width","0px"),t}});it({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){var{funcName:t,parser:r}=e,s=r.mode;r.switchMode("math");var a=t==="\\("?"\\)":"$",l=r.parseExpression(!1,a);return r.expect(a),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:l}}});it({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new We("Mismatched "+e.funcName)}});var i8=(e,n)=>{switch(n.style.size){case Ut.DISPLAY.size:return e.display;case Ut.TEXT.size:return e.text;case Ut.SCRIPT.size:return e.script;case Ut.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};it({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:$r(n[0]),text:$r(n[1]),script:$r(n[2]),scriptscript:$r(n[3])}},htmlBuilder:(e,n)=>{var t=i8(e,n),r=Qr(t,n,!1);return To(r)},mathmlBuilder:(e,n)=>{var t=i8(e,n);return Al(t,n)}});var CA=(e,n,t,r,s,a,l)=>{e=Fe([],[e]);var o=t&&jo(t),c,d;if(n){var _=jn(n,r.havingStyle(s.sup()),r);d={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-_.depth)}}if(t){var h=jn(t,r.havingStyle(s.sub()),r);c={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}var m;if(d&&c){var g=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+l;m=Nn({positionType:"bottom",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Ze(-a)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:Ze(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var S=e.height-l;m=Nn({positionType:"top",positionData:S,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Ze(-a)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(d){var k=e.depth+l;m=Nn({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:Ze(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var b=[m];if(c&&a!==0&&!o){var v=Fe(["mspace"],[],r);v.style.marginRight=Ze(a),b.unshift(v)}return Fe(["mop","op-limits"],b,r)},EA=new Set(["\\smallint"]),Nd=(e,n)=>{var t,r,s=!1,a;e.type==="supsub"?(t=e.sup,r=e.sub,a=en(e.base,"op"),s=!0):a=en(e,"op");var l=n.style,o=!1;l.size===Ut.DISPLAY.size&&a.symbol&&!EA.has(a.name)&&(o=!0);var c,d;if(a.symbol){var _=o?"Size2-Regular":"Size1-Regular",h="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(h=a.name.slice(1),a.name=h==="oiint"?"\\iint":"\\iiint"),c=Ms(a.name,_,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),d=c.italic,h.length>0){var m=Kj(h+"Size"+(o?"2":"1"),n);c=Nn({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:m,shift:o?.08:0}]}),a.name="\\"+h,c.classes.unshift("mop"),c.italic=d}}else if(a.body){var g=Qr(a.body,n,!0);g.length===1&&g[0]instanceof xi?(c=g[0],c.classes[0]="mop"):c=Fe(["mop"],g,n)}else{for(var S=[],k=1;k{var t;if(e.symbol)t=new Ke("mo",[Pi(e.name,e.mode)]),EA.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Ke("mo",ki(e.body,n));else{t=new Ke("mi",[new Hr(e.name.slice(1))]);var r=new Ke("mo",[Pi("⁡","text")]);e.parentIsSupSub?t=new Ke("mrow",[t,r]):t=Zj([t,r])}return t},jut={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};it({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=r;return s.length===1&&(s=jut[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:Nd,mathmlBuilder:Fh});it({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:$r(r)}},htmlBuilder:Nd,mathmlBuilder:Fh});var Aut={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};it({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Nd,mathmlBuilder:Fh});it({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Nd,mathmlBuilder:Fh});it({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:n,funcName:t}=e,r=t;return r.length===1&&(r=Aut[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Nd,mathmlBuilder:Fh});var NA=(e,n)=>{var t,r,s=!1,a;e.type==="supsub"?(t=e.sup,r=e.sub,a=en(e.base,"operatorname"),s=!0):a=en(e,"operatorname");var l;if(a.body.length>0){for(var o=a.body.map(h=>{var m="text"in h?h.text:void 0;return typeof m=="string"?{type:"textord",mode:h.mode,text:m}:h}),c=Qr(o,n.withFont("mathrm"),!0),d=0;d{for(var t=ki(e.body,n.withFont("mathrm")),r=!0,s=0;s_.toText()).join("");t=[new Hr(o)]}var c=new Ke("mi",t);c.setAttribute("mathvariant","normal");var d=new Ke("mo",[Pi("⁡","text")]);return e.parentIsSupSub?new Ke("mrow",[c,d]):Zj([c,d])};it({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"operatorname",mode:t.mode,body:$r(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:NA,mathmlBuilder:Tut});ne("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Vc({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?To(Qr(e.body,n,!1)):Fe(["mord"],Qr(e.body,n,!0),n)},mathmlBuilder(e,n){return Al(e.body,n,!0)}});it({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,n){var{parser:t}=e,r=n[0];return{type:"overline",mode:t.mode,body:r}},htmlBuilder(e,n){var t=jn(e.body,n.havingCrampedStyle()),r=ld("overline-line",n),s=n.fontMetrics().defaultRuleThickness,a=Nn({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Fe(["mord","overline"],[a],n)},mathmlBuilder(e,n){var t=new Ke("mo",[new Hr("‾")]);t.setAttribute("stretchy","true");var r=new Ke("mover",[Qn(e.body,n),t]);return r.setAttribute("accent","true"),r}});it({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"phantom",mode:t.mode,body:$r(r)}},htmlBuilder:(e,n)=>{var t=Qr(e.body,n.withPhantom(),!1);return To(t)},mathmlBuilder:(e,n)=>{var t=ki(e.body,n);return new Ke("mphantom",t)}});ne("\\hphantom","\\smash{\\phantom{#1}}");it({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"vphantom",mode:t.mode,body:r}},htmlBuilder:(e,n)=>{var t=Fe(["inner"],[jn(e.body,n.withPhantom())]),r=Fe(["fix"],[]);return Fe(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=ki($r(e.body),n),r=new Ke("mphantom",t),s=new Ke("mpadded",[r]);return s.setAttribute("width","0px"),s}});it({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=en(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=jn(e.body,n),r=_r(e.dy,n);return Nn({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ke("mpadded",[Qn(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});it({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});it({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,n,t){var{parser:r}=e,s=t[0],a=en(n[0],"size"),l=en(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&en(s,"size").value,width:a.value,height:l.value}},htmlBuilder(e,n){var t=Fe(["mord","rule"],[],n),r=_r(e.width,n),s=_r(e.height,n),a=e.shift?_r(e.shift,n):0;return t.style.borderRightWidth=Ze(r),t.style.borderTopWidth=Ze(s),t.style.bottom=Ze(a),t.width=r,t.height=s+a,t.depth=-a,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=_r(e.width,n),r=_r(e.height,n),s=e.shift?_r(e.shift,n):0,a=n.color&&n.getColor()||"black",l=new Ke("mspace");l.setAttribute("mathbackground",a),l.setAttribute("width",Ze(t)),l.setAttribute("height",Ze(r));var o=new Ke("mpadded",[l]);return s>=0?o.setAttribute("height",Ze(s)):(o.setAttribute("height",Ze(s)),o.setAttribute("depth",Ze(-s))),o.setAttribute("voffset",Ze(s)),o}});function zA(e,n,t){for(var r=Qr(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,a=0;a{var t=n.havingSize(e.size);return zA(e.body,t,n)};it({type:"sizing",names:a8,props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{breakOnTokenText:t,funcName:r,parser:s}=e,a=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:a8.indexOf(r)+1,body:a}},htmlBuilder:Mut,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=ki(e.body,t),s=new Ke("mstyle",r);return s.setAttribute("mathsize",Ze(t.sizeMultiplier)),s}});it({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,n,t)=>{var{parser:r}=e,s=!1,a=!1,l=t[0]&&en(t[0],"ordgroup");if(l)for(var o,c=0;c{var t=Fe([],[jn(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 Fe(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Ke("mpadded",[Qn(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});it({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r}=e,s=t[0],a=n[0];return{type:"sqrt",mode:r.mode,body:a,index:s}},htmlBuilder(e,n){var t=jn(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=cd(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,a=s;n.style.idt.height+t.depth+l&&(l=(l+h-t.height-t.depth)/2);var m=c.height-t.height-l-d;t.style.paddingLeft=Ze(_);var g=Nn({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+m)},{type:"elem",elem:c},{type:"kern",size:d}]});if(e.index){var S=n.havingStyle(Ut.SCRIPTSCRIPT),k=jn(e.index,S,n),b=.6*(g.height-g.depth),v=Nn({positionType:"shift",positionData:-b,children:[{type:"elem",elem:k}]}),x=Fe(["root"],[v]);return Fe(["mord","sqrt"],[x,g],n)}else return Fe(["mord","sqrt"],[g],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Ke("mroot",[Qn(t,n),Qn(r,n)]):new Ke("msqrt",[Qn(t,n)])}});var D2={display:Ut.DISPLAY,text:Ut.TEXT,script:Ut.SCRIPT,scriptscript:Ut.SCRIPTSCRIPT};function Rut(e){return e in D2}it({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,n){var{breakOnTokenText:t,funcName:r,parser:s}=e,a=s.parseExpression(!0,t),l=r.slice(1,r.length-5);if(!Rut(l))throw new Error("Unknown style: "+l);return{type:"styling",mode:s.mode,style:l,body:a}},htmlBuilder(e,n){var t=D2[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),zA(e.body,r,n)},mathmlBuilder(e,n){var t=D2[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=ki(e.body,r),a=new Ke("mstyle",s),l={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=l[e.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});var Dut=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===Ut.DISPLAY.size||r.alwaysHandleSupSub);return s?Nd:null}else if(r.type==="operatorname"){var a=r.alwaysHandleSupSub&&(t.style.size===Ut.DISPLAY.size||r.limits);return a?NA:null}else{if(r.type==="accent")return jo(r.base)?Ty:null;if(r.type==="horizBrace"){var l=!n.sub;return l===r.isOver?kA:null}else return null}else return null};Vc({type:"supsub",htmlBuilder(e,n){var t=Dut(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:a}=e,l=jn(r,n),o,c,d=n.fontMetrics(),_=0,h=0,m=r&&jo(r);if(s){var g=n.havingStyle(n.style.sup());o=jn(s,g,n),m||(_=l.height-g.fontMetrics().supDrop*g.sizeMultiplier/n.sizeMultiplier)}if(a){var S=n.havingStyle(n.style.sub());c=jn(a,S,n),m||(h=l.depth+S.fontMetrics().subDrop*S.sizeMultiplier/n.sizeMultiplier)}var k;n.style===Ut.DISPLAY?k=d.sup1:n.style.cramped?k=d.sup3:k=d.sup2;var b=n.sizeMultiplier,v=Ze(.5/d.ptPerEm/b),x=null;if(c){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(l instanceof xi||y){var C;x=Ze(-((C=l.italic)!=null?C:0))}}var j;if(o&&c){_=Math.max(_,k,o.depth+.25*d.xHeight),h=Math.max(h,d.sub2);var N=d.defaultRuleThickness,T=4*N;if(_-o.depth-(c.height-h)0&&(_+=z,h-=z)}var D=[{type:"elem",elem:c,shift:h,marginRight:v,marginLeft:x},{type:"elem",elem:o,shift:-_,marginRight:v}];j=Nn({positionType:"individualShift",children:D})}else if(c){h=Math.max(h,d.sub1,c.height-.8*d.xHeight);var O=[{type:"elem",elem:c,marginLeft:x,marginRight:v}];j=Nn({positionType:"shift",positionData:h,children:O})}else if(o)_=Math.max(_,k,o.depth+.25*d.xHeight),j=Nn({positionType:"shift",positionData:-_,children:[{type:"elem",elem:o,marginRight:v}]});else throw new Error("supsub must have either sup or sub.");var H=j2(l,"right")||"mord";return Fe([H],[l,Fe(["msupsub"],[j])],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 a=[Qn(e.base,n)];e.sub&&a.push(Qn(e.sub,n)),e.sup&&a.push(Qn(e.sup,n));var l;if(t)l=r?"mover":"munder";else if(e.sub)if(e.sup){var d=e.base;d&&d.type==="op"&&d.limits&&n.style===Ut.DISPLAY||d&&d.type==="operatorname"&&d.alwaysHandleSupSub&&(n.style===Ut.DISPLAY||d.limits)?l="munderover":l="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===Ut.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===Ut.DISPLAY)?l="munder":l="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===Ut.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===Ut.DISPLAY)?l="mover":l="msup"}return new Ke(l,a)}});Vc({type:"atom",htmlBuilder(e,n){return Ny(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Ke("mo",[Pi(e.text,e.mode)]);if(e.family==="bin"){var r=Ay(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 jA={mi:"italic",mn:"normal",mtext:"normal"};Vc({type:"mathord",htmlBuilder(e,n){return dm(e,n,"mathord")},mathmlBuilder(e,n){var t=new Ke("mi",[Pi(e.text,e.mode,n)]),r=Ay(e,n)||"italic";return r!==jA[t.type]&&t.setAttribute("mathvariant",r),t}});Vc({type:"textord",htmlBuilder(e,n){return dm(e,n,"textord")},mathmlBuilder(e,n){var t=Pi(e.text,e.mode,n),r=Ay(e,n)||"normal",s;return e.mode==="text"?s=new Ke("mtext",[t]):/[0-9]/.test(e.text)?s=new Ke("mn",[t]):e.text==="\\prime"?s=new Ke("mo",[t]):s=new Ke("mi",[t]),r!==jA[s.type]&&s.setAttribute("mathvariant",r),s}});var Gv={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Vv={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Vc({type:"spacing",htmlBuilder(e,n){if(Vv.hasOwnProperty(e.text)){var t=Vv[e.text].className||"";if(e.mode==="text"){var r=dm(e,n,"textord");return r.classes.push(t),r}else return Fe(["mspace",t],[Ny(e.text,e.mode,n)],n)}else{if(Gv.hasOwnProperty(e.text))return Fe(["mspace",Gv[e.text]],[],n);throw new We('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(Vv.hasOwnProperty(e.text))t=new Ke("mtext",[new Hr(" ")]);else{if(Gv.hasOwnProperty(e.text))return new Ke("mspace");throw new We('Unknown type of space "'+e.text+'"')}return t}});var o8=()=>{var e=new Ke("mtd",[]);return e.setAttribute("width","50%"),e};Vc({type:"tag",mathmlBuilder(e,n){var t=new Ke("mtable",[new Ke("mtr",[o8(),new Ke("mtd",[Al(e.body,n)]),o8(),new Ke("mtd",[Al(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var l8={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},c8={"\\textbf":"textbf","\\textmd":"textmd"},Lut={"\\textit":"textit","\\textup":"textup"},u8=(e,n)=>{var t=e.font;if(t){if(l8[t])return n.withTextFontFamily(l8[t]);if(c8[t])return n.withTextFontWeight(c8[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(Lut[t])};it({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"text",mode:t.mode,body:$r(s),font:r}},htmlBuilder(e,n){var t=u8(e,n),r=Qr(e.body,t,!0);return Fe(["mord","text"],r,t)},mathmlBuilder(e,n){var t=u8(e,n);return Al(e.body,t)}});it({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"underline",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=jn(e.body,n),r=ld("underline-line",n),s=n.fontMetrics().defaultRuleThickness,a=Nn({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Fe(["mord","underline"],[a],n)},mathmlBuilder(e,n){var t=new Ke("mo",[new Hr("‾")]);t.setAttribute("stretchy","true");var r=new Ke("munder",[Qn(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});it({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"vcenter",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=jn(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return Nn({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ke("mpadded",[Qn(e.body,n)],["vcenter"]);return new Ke("mrow",[t])}});it({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new We("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=d8(e),r=[],s=n.havingStyle(n.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),Cl=Yj,AA=`[ \r + ]`,Out="\\\\[a-zA-Z@]+",Iut="\\\\[^\uD800-\uDFFF]",But="("+Out+")"+AA+"*",$ut=`\\\\( +|[ \r ]+ +?)[ \r ]*`,L2="[̀-ͯ]",Hut=new RegExp(L2+"+$"),Put="("+AA+"+)|"+($ut+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(L2+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(L2+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+But)+("|"+Iut+")");class f8{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(Put,"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 ia("EOF",new Zs(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new We("Unexpected character: '"+n[t]+"'",new ia(n[t],new Zs(this,t,t+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[s]===14){var a=n.indexOf(` +`,this.tokenRegex.lastIndex);return a===-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=a+1,this.lex()}return new ia(s,new Zs(this,t,this.tokenRegex.lastIndex))}}class Fut{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 We("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 a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(n)&&(a[n]=this.current[n])}t==null?delete this.current[n]:this.current[n]=t}}var Uut=vA;ne("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});ne("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});ne("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});ne("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});ne("\\@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}});ne("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ne("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var h8={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};ne("\\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 We("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=h8[n.text],r==null||r>=t)throw new We("Invalid base-"+t+" digit "+n.text);for(var s;(s=h8[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new We("\\newcommand's first argument must be a macro name");var a=s[0].text,l=e.isDefined(a);if(l&&!n)throw new We("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!l&&!t)throw new We("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var o=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var c="",d=e.expandNextToken();d.text!=="]"&&d.text!=="EOF";)c+=d.text,d=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new We("Invalid number of arguments: "+c);o=parseInt(c),s=e.consumeArg().tokens}return l&&r||e.macros.set(a,{tokens:s,numArgs:o}),""};ne("\\newcommand",e=>Ly(e,!1,!0,!1));ne("\\renewcommand",e=>Ly(e,!0,!1,!1));ne("\\providecommand",e=>Ly(e,!0,!0,!0));ne("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});ne("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});ne("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),Cl[t],ar.math[t],ar.text[t]),""});ne("\\bgroup","{");ne("\\egroup","}");ne("~","\\nobreakspace");ne("\\lq","`");ne("\\rq","'");ne("\\aa","\\r a");ne("\\AA","\\r A");ne("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ne("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ne("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");ne("ℬ","\\mathscr{B}");ne("ℰ","\\mathscr{E}");ne("ℱ","\\mathscr{F}");ne("ℋ","\\mathscr{H}");ne("ℐ","\\mathscr{I}");ne("ℒ","\\mathscr{L}");ne("ℳ","\\mathscr{M}");ne("ℛ","\\mathscr{R}");ne("ℭ","\\mathfrak{C}");ne("ℌ","\\mathfrak{H}");ne("ℨ","\\mathfrak{Z}");ne("\\Bbbk","\\Bbb{k}");ne("\\llap","\\mathllap{\\textrm{#1}}");ne("\\rlap","\\mathrlap{\\textrm{#1}}");ne("\\clap","\\mathclap{\\textrm{#1}}");ne("\\mathstrut","\\vphantom{(}");ne("\\underbar","\\underline{\\text{#1}}");ne("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ne("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");ne("\\ne","\\neq");ne("≠","\\neq");ne("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");ne("∉","\\notin");ne("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");ne("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");ne("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");ne("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");ne("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");ne("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");ne("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");ne("⟂","\\perp");ne("‼","\\mathclose{!\\mkern-0.8mu!}");ne("∌","\\notni");ne("⌜","\\ulcorner");ne("⌝","\\urcorner");ne("⌞","\\llcorner");ne("⌟","\\lrcorner");ne("©","\\copyright");ne("®","\\textregistered");ne("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ne("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ne("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ne("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ne("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ne("⋮","\\vdots");ne("\\varGamma","\\mathit{\\Gamma}");ne("\\varDelta","\\mathit{\\Delta}");ne("\\varTheta","\\mathit{\\Theta}");ne("\\varLambda","\\mathit{\\Lambda}");ne("\\varXi","\\mathit{\\Xi}");ne("\\varPi","\\mathit{\\Pi}");ne("\\varSigma","\\mathit{\\Sigma}");ne("\\varUpsilon","\\mathit{\\Upsilon}");ne("\\varPhi","\\mathit{\\Phi}");ne("\\varPsi","\\mathit{\\Psi}");ne("\\varOmega","\\mathit{\\Omega}");ne("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ne("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ne("\\boxed","\\fbox{$\\displaystyle{#1}$}");ne("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ne("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ne("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ne("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ne("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var _8={",":"\\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"},qut=new Set(["bin","rel"]);ne("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in _8?n=_8[t]:(t.slice(0,4)==="\\not"||t in ar.math&&qut.has(ar.math[t].group))&&(n="\\dotsb"),n});var Oy={")":!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};ne("\\dotso",function(e){var n=e.future().text;return n in Oy?"\\ldots\\,":"\\ldots"});ne("\\dotsc",function(e){var n=e.future().text;return n in Oy&&n!==","?"\\ldots\\,":"\\ldots"});ne("\\cdots",function(e){var n=e.future().text;return n in Oy?"\\@cdots\\,":"\\@cdots"});ne("\\dotsb","\\cdots");ne("\\dotsm","\\cdots");ne("\\dotsi","\\!\\cdots");ne("\\dotsx","\\ldots\\,");ne("\\DOTSI","\\relax");ne("\\DOTSB","\\relax");ne("\\DOTSX","\\relax");ne("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ne("\\,","\\tmspace+{3mu}{.1667em}");ne("\\thinspace","\\,");ne("\\>","\\mskip{4mu}");ne("\\:","\\tmspace+{4mu}{.2222em}");ne("\\medspace","\\:");ne("\\;","\\tmspace+{5mu}{.2777em}");ne("\\thickspace","\\;");ne("\\!","\\tmspace-{3mu}{.1667em}");ne("\\negthinspace","\\!");ne("\\negmedspace","\\tmspace-{4mu}{.2222em}");ne("\\negthickspace","\\tmspace-{5mu}{.277em}");ne("\\enspace","\\kern.5em ");ne("\\enskip","\\hskip.5em\\relax");ne("\\quad","\\hskip1em\\relax");ne("\\qquad","\\hskip2em\\relax");ne("\\tag","\\@ifstar\\tag@literal\\tag@paren");ne("\\tag@paren","\\tag@literal{({#1})}");ne("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new We("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ne("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ne("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ne("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ne("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ne("\\newline","\\\\\\relax");ne("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var TA=Ze(Ma["Main-Regular"][84][1]-.7*Ma["Main-Regular"][65][1]);ne("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+TA+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ne("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+TA+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ne("\\hspace","\\@ifstar\\@hspacer\\@hspace");ne("\\@hspace","\\hskip #1\\relax");ne("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ne("\\ordinarycolon",":");ne("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ne("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ne("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ne("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ne("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ne("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ne("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ne("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ne("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ne("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ne("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ne("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ne("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ne("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ne("∷","\\dblcolon");ne("∹","\\eqcolon");ne("≔","\\coloneqq");ne("≕","\\eqqcolon");ne("⩴","\\Coloneqq");ne("\\ratio","\\vcentcolon");ne("\\coloncolon","\\dblcolon");ne("\\colonequals","\\coloneqq");ne("\\coloncolonequals","\\Coloneqq");ne("\\equalscolon","\\eqqcolon");ne("\\equalscoloncolon","\\Eqqcolon");ne("\\colonminus","\\coloneq");ne("\\coloncolonminus","\\Coloneq");ne("\\minuscolon","\\eqcolon");ne("\\minuscoloncolon","\\Eqcolon");ne("\\coloncolonapprox","\\Colonapprox");ne("\\coloncolonsim","\\Colonsim");ne("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ne("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ne("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ne("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ne("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");ne("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ne("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ne("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ne("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ne("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ne("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ne("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ne("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ne("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");ne("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");ne("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");ne("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");ne("\\nleqq","\\html@mathml{\\@nleqq}{≰}");ne("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");ne("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");ne("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");ne("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");ne("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");ne("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");ne("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");ne("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");ne("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");ne("\\imath","\\html@mathml{\\@imath}{ı}");ne("\\jmath","\\html@mathml{\\@jmath}{ȷ}");ne("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");ne("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");ne("⟦","\\llbracket");ne("⟧","\\rrbracket");ne("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");ne("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");ne("⦃","\\lBrace");ne("⦄","\\rBrace");ne("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");ne("⦵","\\minuso");ne("\\darr","\\downarrow");ne("\\dArr","\\Downarrow");ne("\\Darr","\\Downarrow");ne("\\lang","\\langle");ne("\\rang","\\rangle");ne("\\uarr","\\uparrow");ne("\\uArr","\\Uparrow");ne("\\Uarr","\\Uparrow");ne("\\N","\\mathbb{N}");ne("\\R","\\mathbb{R}");ne("\\Z","\\mathbb{Z}");ne("\\alef","\\aleph");ne("\\alefsym","\\aleph");ne("\\Alpha","\\mathrm{A}");ne("\\Beta","\\mathrm{B}");ne("\\bull","\\bullet");ne("\\Chi","\\mathrm{X}");ne("\\clubs","\\clubsuit");ne("\\cnums","\\mathbb{C}");ne("\\Complex","\\mathbb{C}");ne("\\Dagger","\\ddagger");ne("\\diamonds","\\diamondsuit");ne("\\empty","\\emptyset");ne("\\Epsilon","\\mathrm{E}");ne("\\Eta","\\mathrm{H}");ne("\\exist","\\exists");ne("\\harr","\\leftrightarrow");ne("\\hArr","\\Leftrightarrow");ne("\\Harr","\\Leftrightarrow");ne("\\hearts","\\heartsuit");ne("\\image","\\Im");ne("\\infin","\\infty");ne("\\Iota","\\mathrm{I}");ne("\\isin","\\in");ne("\\Kappa","\\mathrm{K}");ne("\\larr","\\leftarrow");ne("\\lArr","\\Leftarrow");ne("\\Larr","\\Leftarrow");ne("\\lrarr","\\leftrightarrow");ne("\\lrArr","\\Leftrightarrow");ne("\\Lrarr","\\Leftrightarrow");ne("\\Mu","\\mathrm{M}");ne("\\natnums","\\mathbb{N}");ne("\\Nu","\\mathrm{N}");ne("\\Omicron","\\mathrm{O}");ne("\\plusmn","\\pm");ne("\\rarr","\\rightarrow");ne("\\rArr","\\Rightarrow");ne("\\Rarr","\\Rightarrow");ne("\\real","\\Re");ne("\\reals","\\mathbb{R}");ne("\\Reals","\\mathbb{R}");ne("\\Rho","\\mathrm{P}");ne("\\sdot","\\cdot");ne("\\sect","\\S");ne("\\spades","\\spadesuit");ne("\\sub","\\subset");ne("\\sube","\\subseteq");ne("\\supe","\\supseteq");ne("\\Tau","\\mathrm{T}");ne("\\thetasym","\\vartheta");ne("\\weierp","\\wp");ne("\\Zeta","\\mathrm{Z}");ne("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ne("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ne("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ne("\\bra","\\mathinner{\\langle{#1}|}");ne("\\ket","\\mathinner{|{#1}\\rangle}");ne("\\braket","\\mathinner{\\langle{#1}\\rangle}");ne("\\Bra","\\left\\langle#1\\right|");ne("\\Ket","\\left|#1\\right\\rangle");var MA=e=>n=>{var t=n.consumeArg().tokens,r=n.consumeArg().tokens,s=n.consumeArg().tokens,a=n.consumeArg().tokens,l=n.macros.get("|"),o=n.macros.get("\\|");n.macros.beginGroup();var c=h=>m=>{e&&(m.macros.set("|",l),s.length&&m.macros.set("\\|",o));var g=h;if(!h&&s.length){var S=m.future();S.text==="|"&&(m.popToken(),g=!0)}return{tokens:g?s:r,numArgs:0}};n.macros.set("|",c(!1)),s.length&&n.macros.set("\\|",c(!0));var d=n.consumeArg().tokens,_=n.expandTokens([...a,...d,...t]);return n.macros.endGroup(),{tokens:_.reverse(),numArgs:0}};ne("\\bra@ket",MA(!1));ne("\\bra@set",MA(!0));ne("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ne("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ne("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ne("\\angln","{\\angl n}");ne("\\blue","\\textcolor{##6495ed}{#1}");ne("\\orange","\\textcolor{##ffa500}{#1}");ne("\\pink","\\textcolor{##ff00af}{#1}");ne("\\red","\\textcolor{##df0030}{#1}");ne("\\green","\\textcolor{##28ae7b}{#1}");ne("\\gray","\\textcolor{gray}{#1}");ne("\\purple","\\textcolor{##9d38bd}{#1}");ne("\\blueA","\\textcolor{##ccfaff}{#1}");ne("\\blueB","\\textcolor{##80f6ff}{#1}");ne("\\blueC","\\textcolor{##63d9ea}{#1}");ne("\\blueD","\\textcolor{##11accd}{#1}");ne("\\blueE","\\textcolor{##0c7f99}{#1}");ne("\\tealA","\\textcolor{##94fff5}{#1}");ne("\\tealB","\\textcolor{##26edd5}{#1}");ne("\\tealC","\\textcolor{##01d1c1}{#1}");ne("\\tealD","\\textcolor{##01a995}{#1}");ne("\\tealE","\\textcolor{##208170}{#1}");ne("\\greenA","\\textcolor{##b6ffb0}{#1}");ne("\\greenB","\\textcolor{##8af281}{#1}");ne("\\greenC","\\textcolor{##74cf70}{#1}");ne("\\greenD","\\textcolor{##1fab54}{#1}");ne("\\greenE","\\textcolor{##0d923f}{#1}");ne("\\goldA","\\textcolor{##ffd0a9}{#1}");ne("\\goldB","\\textcolor{##ffbb71}{#1}");ne("\\goldC","\\textcolor{##ff9c39}{#1}");ne("\\goldD","\\textcolor{##e07d10}{#1}");ne("\\goldE","\\textcolor{##a75a05}{#1}");ne("\\redA","\\textcolor{##fca9a9}{#1}");ne("\\redB","\\textcolor{##ff8482}{#1}");ne("\\redC","\\textcolor{##f9685d}{#1}");ne("\\redD","\\textcolor{##e84d39}{#1}");ne("\\redE","\\textcolor{##bc2612}{#1}");ne("\\maroonA","\\textcolor{##ffbde0}{#1}");ne("\\maroonB","\\textcolor{##ff92c6}{#1}");ne("\\maroonC","\\textcolor{##ed5fa6}{#1}");ne("\\maroonD","\\textcolor{##ca337c}{#1}");ne("\\maroonE","\\textcolor{##9e034e}{#1}");ne("\\purpleA","\\textcolor{##ddd7ff}{#1}");ne("\\purpleB","\\textcolor{##c6b9fc}{#1}");ne("\\purpleC","\\textcolor{##aa87ff}{#1}");ne("\\purpleD","\\textcolor{##7854ab}{#1}");ne("\\purpleE","\\textcolor{##543b78}{#1}");ne("\\mintA","\\textcolor{##f5f9e8}{#1}");ne("\\mintB","\\textcolor{##edf2df}{#1}");ne("\\mintC","\\textcolor{##e0e5cc}{#1}");ne("\\grayA","\\textcolor{##f6f7f7}{#1}");ne("\\grayB","\\textcolor{##f0f1f2}{#1}");ne("\\grayC","\\textcolor{##e3e5e6}{#1}");ne("\\grayD","\\textcolor{##d6d8da}{#1}");ne("\\grayE","\\textcolor{##babec2}{#1}");ne("\\grayF","\\textcolor{##888d93}{#1}");ne("\\grayG","\\textcolor{##626569}{#1}");ne("\\grayH","\\textcolor{##3b3e40}{#1}");ne("\\grayI","\\textcolor{##21242c}{#1}");ne("\\kaBlue","\\textcolor{##314453}{#1}");ne("\\kaGreen","\\textcolor{##71B307}{#1}");var RA={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Gut{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 Fut(Uut,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new f8(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 ia("EOF",r.loc)),this.pushTokens(s),new ia("",Zs.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(),a,l=0,o=0;do{if(a=this.popToken(),t.push(a),a.text==="{")++l;else if(a.text==="}"){if(--l,l===-1)throw new We("Extra }",a)}else if(a.text==="EOF")throw new We("Unexpected end of input in a macro argument, expected '"+(n&&r?n[o]:"}")+"'",a);if(n&&r)if((l===0||l===1&&n[o]==="{")&&a.text===n[o]){if(++o,o===n.length){t.splice(-o,o);break}}else o=0}while(l!==0||r);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:a}}consumeArgs(n,t){if(t){if(t.length!==n+1)throw new We("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new We("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 We("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var a=s.tokens,l=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){a=a.slice();for(var o=a.length-1;o>=0;--o){var c=a[o];if(c.text==="#"){if(o===0)throw new We("Incomplete placeholder at end of macro body",c);if(c=a[--o],c.text==="#")a.splice(o+1,1);else if(/^[1-9]$/.test(c.text))a.splice(o,2,...l[+c.text-1]);else throw new We("Not a valid argument number",c)}}}return this.pushTokens(a),a.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 ia(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 a=0;if(s.includes("#"))for(var l=s.replace(/##/g,"");l.includes("#"+(a+1));)++a;for(var o=new f8(s,this.settings),c=[],d=o.lex();d.text!=="EOF";)c.push(d),d=o.lex();c.reverse();var _={tokens:c,numArgs:a};return _}return s}isDefined(n){return this.macros.has(n)||Cl.hasOwnProperty(n)||ar.math.hasOwnProperty(n)||ar.text.hasOwnProperty(n)||RA.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:Cl.hasOwnProperty(n)&&!Cl[n].primitive}}var p8=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,k0=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Wv={"́":{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"}},m8={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class ym{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 Gut(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 We("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 ia("}")),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(ym.endOfExpression.has(s.text)||t&&s.text===t||n&&Cl[s.text]&&Cl[s.text].infix)break;var a=this.parseAtom(t);if(a){if(a.type==="internal")continue}else break;r.push(a)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(n){for(var t=-1,r,s=0;s=128)this.settings.strict&&($j(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)),l={type:"textord",mode:"text",loc:Zs.range(n),text:t};else return null;if(this.consume(),a)for(var _=0;_0?{type:"text",value:N}:void 0),N===!1?m.lastIndex=C+1:(S!==C&&x.push({type:"text",value:d.value.slice(S,C)}),Array.isArray(N)?x.push(...N):N&&x.push(N),S=C+y[0].length,v=!0),!m.global)break;y=m.exec(d.value)}return v?(S?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=v8(e,"(");let a=v8(e,")");for(;r!==-1&&s>a;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),a++;return[e,t]}function IA(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Lc(t)||sm(t))&&(!n||t!==47)}BA.peek=kdt;function mdt(){this.buffer()}function gdt(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function vdt(){this.buffer()}function bdt(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function xdt(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ra(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ydt(e){this.exit(e)}function wdt(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ra(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Sdt(e){this.exit(e)}function kdt(){return"["}function BA(e,n,t,r){const s=t.createTracker(r);let a=s.move("[^");const l=t.enter("footnoteReference"),o=t.enter("reference");return a+=s.move(t.safe(t.associationId(e),{after:"]",before:a})),o(),l(),a+=s.move("]"),a}function Cdt(){return{enter:{gfmFootnoteCallString:mdt,gfmFootnoteCall:gdt,gfmFootnoteDefinitionLabelString:vdt,gfmFootnoteDefinition:bdt},exit:{gfmFootnoteCallString:xdt,gfmFootnoteCall:ydt,gfmFootnoteDefinitionLabelString:wdt,gfmFootnoteDefinition:Sdt}}}function Edt(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:BA},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,a,l){const o=a.createTracker(l);let c=o.move("[^");const d=a.enter("footnoteDefinition"),_=a.enter("label");return c+=o.move(a.safe(a.associationId(r),{before:c,after:"]"})),_(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((n?` +`:" ")+a.indentLines(a.containerFlow(r,o.current()),n?$A:Ndt))),d(),c}}function Ndt(e,n,t){return n===0?e:$A(e,n,t)}function $A(e,n,t){return(t?"":" ")+e}const zdt=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];HA.peek=Rdt;function jdt(){return{canContainEols:["delete"],enter:{strikethrough:Tdt},exit:{strikethrough:Mdt}}}function Adt(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:zdt}],handlers:{delete:HA}}}function Tdt(e){this.enter({type:"delete",children:[]},e)}function Mdt(e){this.exit(e)}function HA(e,n,t,r){const s=t.createTracker(r),a=t.enter("strikethrough");let l=s.move("~~");return l+=t.containerPhrasing(e,{...s.current(),before:l,after:"~"}),l+=s.move("~~"),a(),l}function Rdt(){return"~"}function Ddt(e){return e.length}function Ldt(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||Ddt,a=[],l=[],o=[],c=[];let d=0,_=-1;for(;++_d&&(d=e[_].length);++vc[v])&&(c[v]=y)}k.push(x)}l[_]=k,o[_]=b}let h=-1;if(typeof r=="object"&&"length"in r)for(;++hc[h]&&(c[h]=x),g[h]=x),m[h]=y}l.splice(1,0,m),o.splice(1,0,g),_=-1;const S=[];for(;++_ "),a.shift(2);const l=t.indentLines(t.containerFlow(e,a.current()),Bdt);return s(),l}function Bdt(e,n,t){return">"+(t?"":" ")+e}function $dt(e,n){return x8(e,n.inConstruct,!0)&&!x8(e,n.notInConstruct,!1)}function x8(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++rl&&(l=a):a=1,s=r+n.length,r=t.indexOf(n,s);return l}function Hdt(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 Pdt(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 Fdt(e,n,t,r){const s=Pdt(t),a=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(Hdt(e,t)){const h=t.enter("codeIndented"),m=t.indentLines(a,Udt);return h(),m}const o=t.createTracker(r),c=s.repeat(Math.max(PA(a,s)+1,3)),d=t.enter("codeFenced");let _=o.move(c);if(e.lang){const h=t.enter(`codeFencedLang${l}`);_+=o.move(t.safe(e.lang,{before:_,after:" ",encode:["`"],...o.current()})),h()}if(e.lang&&e.meta){const h=t.enter(`codeFencedMeta${l}`);_+=o.move(" "),_+=o.move(t.safe(e.meta,{before:_,after:` +`,encode:["`"],...o.current()})),h()}return _+=o.move(` +`),a&&(_+=o.move(a+` +`)),_+=o.move(c),d(),_}function Udt(e,n,t){return(t?"":" ")+e}function $y(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 qdt(e,n,t,r){const s=$y(t),a=s==='"'?"Quote":"Apostrophe",l=t.enter("definition");let o=t.enter("label");const c=t.createTracker(r);let d=c.move("[");return d+=c.move(t.safe(t.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(t.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(o=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":` +`,...c.current()}))),o(),e.title&&(o=t.enter(`title${a}`),d+=c.move(" "+s),d+=c.move(t.safe(e.title,{before:d,after:s,...c.current()})),d+=c.move(s),o()),l(),d}function Gdt(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 ih(e){return"&#x"+e.toString(16).toUpperCase()+";"}function jp(e,n,t){const r=ad(e),s=ad(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}}FA.peek=Vdt;function FA(e,n,t,r){const s=Gdt(t),a=t.enter("emphasis"),l=t.createTracker(r),o=l.move(s);let c=l.move(t.containerPhrasing(e,{after:s,before:o,...l.current()}));const d=c.charCodeAt(0),_=jp(r.before.charCodeAt(r.before.length-1),d,s);_.inside&&(c=ih(d)+c.slice(1));const h=c.charCodeAt(c.length-1),m=jp(r.after.charCodeAt(0),h,s);m.inside&&(c=c.slice(0,-1)+ih(h));const g=l.move(s);return a(),t.attentionEncodeSurroundingInfo={after:m.outside,before:_.outside},o+c+g}function Vdt(e,n,t){return t.options.emphasis||"*"}function Wdt(e,n){let t=!1;return dy(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,i2}),!!((!e.depth||e.depth<3)&&vy(e)&&(n.options.setext||t))}function Kdt(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(r);if(Wdt(e,t)){const _=t.enter("headingSetext"),h=t.enter("phrasing"),m=t.containerPhrasing(e,{...a.current(),before:` +`,after:` +`});return h(),_(),m+` +`+(s===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(` +`))+1))}const l="#".repeat(s),o=t.enter("headingAtx"),c=t.enter("phrasing");a.move(l+" ");let d=t.containerPhrasing(e,{before:"# ",after:` +`,...a.current()});return/^[\t ]/.test(d)&&(d=ih(d.charCodeAt(0))+d.slice(1)),d=d?l+" "+d:l,t.options.closeAtx&&(d+=" "+l),c(),o(),d}UA.peek=Ydt;function UA(e){return e.value||""}function Ydt(){return"<"}qA.peek=Xdt;function qA(e,n,t,r){const s=$y(t),a=s==='"'?"Quote":"Apostrophe",l=t.enter("image");let o=t.enter("label");const c=t.createTracker(r);let d=c.move("![");return d+=c.move(t.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(t.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(o=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=t.enter(`title${a}`),d+=c.move(" "+s),d+=c.move(t.safe(e.title,{before:d,after:s,...c.current()})),d+=c.move(s),o()),d+=c.move(")"),l(),d}function Xdt(){return"!"}GA.peek=Zdt;function GA(e,n,t,r){const s=e.referenceType,a=t.enter("imageReference");let l=t.enter("label");const o=t.createTracker(r);let c=o.move("![");const d=t.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(d+"]["),l();const _=t.stack;t.stack=[],l=t.enter("reference");const h=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return l(),t.stack=_,a(),s==="full"||!d||d!==h?c+=o.move(h+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function Zdt(){return"!"}VA.peek=Qdt;function VA(e,n,t){let r=e.value||"",s="`",a=-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+" ");++a\u007F]/.test(e.url))}KA.peek=Jdt;function KA(e,n,t,r){const s=$y(t),a=s==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let o,c;if(WA(e,t)){const _=t.stack;t.stack=[],o=t.enter("autolink");let h=l.move("<");return h+=l.move(t.containerPhrasing(e,{before:h,after:">",...l.current()})),h+=l.move(">"),o(),t.stack=_,h}o=t.enter("link"),c=t.enter("label");let d=l.move("[");return d+=l.move(t.containerPhrasing(e,{before:d,after:"](",...l.current()})),d+=l.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(t.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(c=t.enter("destinationRaw"),d+=l.move(t.safe(e.url,{before:d,after:e.title?" ":")",...l.current()}))),c(),e.title&&(c=t.enter(`title${a}`),d+=l.move(" "+s),d+=l.move(t.safe(e.title,{before:d,after:s,...l.current()})),d+=l.move(s),c()),d+=l.move(")"),o(),d}function Jdt(e,n,t){return WA(e,t)?"<":"["}YA.peek=eft;function YA(e,n,t,r){const s=e.referenceType,a=t.enter("linkReference");let l=t.enter("label");const o=t.createTracker(r);let c=o.move("[");const d=t.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(d+"]["),l();const _=t.stack;t.stack=[],l=t.enter("reference");const h=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return l(),t.stack=_,a(),s==="full"||!d||d!==h?c+=o.move(h+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function eft(){return"["}function Hy(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 tft(e){const n=Hy(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 nft(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 XA(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 rft(e,n,t,r){const s=t.enter("list"),a=t.bulletCurrent;let l=e.ordered?nft(t):Hy(t);const o=e.ordered?l==="."?")":".":tft(t);let c=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const _=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&_&&(!_.children||!_.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(c=!0),XA(t)===l&&_){let h=-1;for(;++h-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let l=a.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const o=t.createTracker(r);o.move(a+" ".repeat(l-a.length)),o.shift(l);const c=t.enter("listItem"),d=t.indentLines(t.containerFlow(e,o.current()),_);return c(),d;function _(h,m,g){return m?(g?"":" ".repeat(l))+h:(g?a:a+" ".repeat(l-a.length))+h}}function aft(e,n,t,r){const s=t.enter("paragraph"),a=t.enter("phrasing"),l=t.containerPhrasing(e,r);return a(),s(),l}const oft=Ih(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function lft(e,n,t,r){return(e.children.some(function(l){return oft(l)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function cft(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}ZA.peek=uft;function ZA(e,n,t,r){const s=cft(t),a=t.enter("strong"),l=t.createTracker(r),o=l.move(s+s);let c=l.move(t.containerPhrasing(e,{after:s,before:o,...l.current()}));const d=c.charCodeAt(0),_=jp(r.before.charCodeAt(r.before.length-1),d,s);_.inside&&(c=ih(d)+c.slice(1));const h=c.charCodeAt(c.length-1),m=jp(r.after.charCodeAt(0),h,s);m.inside&&(c=c.slice(0,-1)+ih(h));const g=l.move(s+s);return a(),t.attentionEncodeSurroundingInfo={after:m.outside,before:_.outside},o+c+g}function uft(e,n,t){return t.options.strong||"*"}function dft(e,n,t,r){return t.safe(e.value,r)}function fft(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 hft(e,n,t){const r=(XA(t)+(t.options.ruleSpaces?" ":"")).repeat(fft(t));return t.options.ruleSpaces?r.slice(0,-1):r}const QA={blockquote:Idt,break:y8,code:Fdt,definition:qdt,emphasis:FA,hardBreak:y8,heading:Kdt,html:UA,image:qA,imageReference:GA,inlineCode:VA,link:KA,linkReference:YA,list:rft,listItem:ift,paragraph:aft,root:lft,strong:ZA,text:dft,thematicBreak:hft};function _ft(){return{enter:{table:pft,tableData:w8,tableHeader:w8,tableRow:gft},exit:{codeText:vft,table:mft,tableData:Zv,tableHeader:Zv,tableRow:Zv}}}function pft(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 mft(e){this.exit(e),this.data.inTable=void 0}function gft(e){this.enter({type:"tableRow",children:[]},e)}function Zv(e){this.exit(e)}function w8(e){this.enter({type:"tableCell",children:[]},e)}function vft(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,bft));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function bft(e,n){return n==="|"?n:e}function xft(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,a=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:m,table:l,tableCell:c,tableRow:o}};function l(g,S,k,b){return d(_(g,k,b),g.align)}function o(g,S,k,b){const v=h(g,k,b),x=d([v]);return x.slice(0,x.indexOf(` +`))}function c(g,S,k,b){const v=k.enter("tableCell"),x=k.enter("phrasing"),y=k.containerPhrasing(g,{...b,before:a,after:a});return x(),v(),y}function d(g,S){return Ldt(g,{align:S,alignDelimiters:r,padding:t,stringLength:s})}function _(g,S,k){const b=g.children;let v=-1;const x=[],y=S.enter("table");for(;++v0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Bft={tokenize:Vft,partial:!0};function $ft(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Uft,continuation:{tokenize:qft},exit:Gft}},text:{91:{name:"gfmFootnoteCall",tokenize:Fft},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Hft,resolveTo:Pft}}}}function Hft(e,n,t){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){l=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(!l||!l._balanced)return t(c);const d=ra(r.sliceSerialize({start:l.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function Pft(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 a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",s,n],["exit",s,n],["enter",a,n],["enter",l,n],["exit",l,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...o),e}function Fft(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return o;function o(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),c}function c(h){return h!==94?t(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(h){if(a>999||h===93&&!l||h===null||h===91||Zn(h))return t(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return s.includes(ra(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(h)}return Zn(h)||(l=!0),a++,e.consume(h),h===92?_:d}function _(h){return h===91||h===92||h===93?(e.consume(h),a++,d):d(h)}}function Uft(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,o;return c;function c(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",_):t(S)}function _(S){if(l>999||S===93&&!o||S===null||S===91||Zn(S))return t(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=ra(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Zn(S)||(o=!0),l++,e.consume(S),S===92?h:_}function h(S){return S===91||S===92||S===93?(e.consume(S),l++,_):_(S)}function m(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(a)||s.push(a),ln(e,g,"gfmFootnoteDefinitionWhitespace")):t(S)}function g(S){return n(S)}}function qft(e,n,t){return e.check(Hh,n,e.attempt(Bft,n,t))}function Gft(e){e.exit("gfmFootnoteDefinition")}function Vft(e,n,t){const r=this;return ln(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(a):t(a)}}function Wft(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(l,o){let c=-1;for(;++c1?c(S):(l.consume(S),h++,g);if(h<2&&!t)return c(S);const b=l.exit("strikethroughSequenceTemporary"),v=ad(S);return b._open=!v||v===2&&!!k,b._close=!k||k===2&&!!v,o(S)}}}class Kft{constructor(){this.map=[]}add(n,t,r){Yft(this,n,t,r)}consume(n){if(this.map.sort(function(a,l){return a[0]-l[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 a of s)n.push(a);s=r.pop()}this.map.length=0}}function Yft(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const W=r.events[H][1].type;if(W==="lineEnding"||W==="linePrefix")H--;else break}const P=H>-1?r.events[H][1].type:null,F=P==="tableHead"||P==="tableRow"?N:c;return F===N&&r.parser.lazy[r.now().line]?t(O):F(O)}function c(O){return e.enter("tableHead"),e.enter("tableRow"),d(O)}function d(O){return O===124||(l=!0,a+=1),_(O)}function _(O){return O===null?t(O):gt(O)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),g):t(O):hn(O)?ln(e,_,"whitespace")(O):(a+=1,l&&(l=!1,s+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),l=!0,_):(e.enter("data"),h(O)))}function h(O){return O===null||O===124||Zn(O)?(e.exit("data"),_(O)):(e.consume(O),O===92?m:h)}function m(O){return O===92||O===124?(e.consume(O),h):h(O)}function g(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(O):(e.enter("tableDelimiterRow"),l=!1,hn(O)?ln(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):S(O))}function S(O){return O===45||O===58?b(O):O===124?(l=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),k):j(O)}function k(O){return hn(O)?ln(e,b,"whitespace")(O):b(O)}function b(O){return O===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):O===45?(a+=1,v(O)):O===null||gt(O)?C(O):j(O)}function v(O){return O===45?(e.enter("tableDelimiterFiller"),x(O)):j(O)}function x(O){return O===45?(e.consume(O),x):O===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(O))}function y(O){return hn(O)?ln(e,C,"whitespace")(O):C(O)}function C(O){return O===124?S(O):O===null||gt(O)?!l||s!==a?j(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(O)):j(O)}function j(O){return t(O)}function N(O){return e.enter("tableRow"),T(O)}function T(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),T):O===null||gt(O)?(e.exit("tableRow"),n(O)):hn(O)?ln(e,T,"whitespace")(O):(e.enter("data"),z(O))}function z(O){return O===null||O===124||Zn(O)?(e.exit("data"),T(O)):(e.consume(O),O===92?D:z)}function D(O){return O===92||O===124?(e.consume(O),z):z(O)}}function Jft(e,n){let t=-1,r=!0,s=0,a=[0,0,0,0],l=[0,0,0,0],o=!1,c=0,d,_,h;const m=new Kft;for(;++tt[2]+1){const S=t[2]+1,k=t[3]-t[2]-1;e.add(S,k,[])}}e.add(t[3]+1,0,[["exit",h,n]])}return s!==void 0&&(a.end=Object.assign({},Du(n.events,s)),e.add(s,0,[["exit",a,n]]),a=void 0),a}function k8(e,n,t,r,s){const a=[],l=Du(n.events,t);s&&(s.end=Object.assign({},l),a.push(["exit",s,n])),r.end=Object.assign({},l),a.push(["exit",r,n]),e.add(t+1,0,a)}function Du(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const eht={name:"tasklistCheck",tokenize:nht};function tht(){return{text:{91:eht}}}function nht(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"),a)}function a(c){return Zn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),l):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),l):t(c)}function l(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):t(c)}function o(c){return gt(c)?n(c):hn(c)?e.check({tokenize:rht},n,t)(c):t(c)}}function rht(e,n,t){return ln(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function sht(e){return fj([jft(),$ft(),Wft(e),Zft(),tht()])}const iht={};function oT(e){const n=this,t=e||iht,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(sht(t)),a.push(Cft()),l.push(Eft(t))}function aht(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:a},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:o,mathText:l,mathTextData:o}};function e(c){const d={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[d]}},c)}function n(){this.buffer()}function t(){const c=this.resume(),d=this.stack[this.stack.length-1];d.type,d.meta=c}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const d=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),_=this.stack[this.stack.length-1];_.type,this.exit(c),_.value=d;const h=_.data.hChildren[0];h.type,h.tagName,h.children.push({type:"text",value:d}),this.data.mathFlowInside=void 0}function a(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function l(c){const d=this.resume(),_=this.stack[this.stack.length-1];_.type,this.exit(c),_.value=d,_.data.hChildren.push({type:"text",value:d})}function o(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function oht(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(a,l,o,c){const d=a.value||"",_=o.createTracker(c),h="$".repeat(Math.max(PA(d,"$")+1,2)),m=o.enter("mathFlow");let g=_.move(h);if(a.meta){const S=o.enter("mathFlowMeta");g+=_.move(o.safe(a.meta,{after:` +`,before:g,encode:["$"],..._.current()})),S()}return g+=_.move(` +`),d&&(g+=_.move(d+` +`)),g+=_.move(h),m(),g}function r(a,l,o){let c=a.value||"",d=1;for(n||d++;new RegExp("(^|[^$])"+"\\$".repeat(d)+"([^$]|$)").test(c);)d++;const _="$".repeat(d);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let h=-1;for(;++h]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}Uh.displayName="c";Uh.aliases=[];function Uh(e){e.register(Ga),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}wm.displayName="cpp";wm.aliases=[];function wm(e){e.register(Uh),(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)}Uy.displayName="arduino";Uy.aliases=["ino"];function Uy(e){e.register(wm),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}qy.displayName="bash";qy.aliases=["sh","shell"];function qy(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 a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],l=s.variable[1].inside,o=0;o>/g,function(Y,V){return"(?:"+B[+V]+")"})}function r(L,B,Y){return RegExp(t(L,B),"")}function s(L,B){for(var Y=0;Y>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var a={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 l(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var o=l(a.typeDeclaration),c=RegExp(l(a.type+" "+a.typeDeclaration+" "+a.contextual+" "+a.other)),d=l(a.typeDeclaration+" "+a.contextual+" "+a.other),_=l(a.type+" "+a.typeDeclaration+" "+a.other),h=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),m=s(/\((?:[^()]|<>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,S=t(/<<0>>(?:\s*<<1>>)?/.source,[g,h]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,S]),b=/\[\s*(?:,\s*)*\]/.source,v=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,b]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[h,m,b]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,k,b]),j={keyword:c,punctuation:/[<>()?,.:[\]]/},N=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,T=/"(?:\\.|[^\\"\r\n])*"/.source,z=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[z]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),lookbehind:!0,inside:j},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,C]),lookbehind:!0,inside:j},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[o,S]),lookbehind:!0,inside:j},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[k]),lookbehind:!0,inside:j},{pattern:r(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:j},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,_,g]),inside:j}],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,[g]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[m]),lookbehind:!0,alias:"class-name",inside:j},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,k]),inside:j,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:j,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,h]),inside:{function:r(/^<<0>>/.source,[g]),generic:{pattern:RegExp(h),alias:"class-name",inside:j}}},"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,S,g,C,c.source,m,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[S,m]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:c,"class-name":{pattern:RegExp(C),greedy:!0,inside:j},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 D=T+"|"+N,O=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[D]),H=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),P=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,F=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,H]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[P,F]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[P]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[H]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var W=/:[^}\r\n]+/.source,Z=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),U=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,W]),X=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[D]),2),J=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[X,W]);function $(L,B){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[B,W]),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,[U]),lookbehind:!0,greedy:!0,inside:$(U,Z)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[J]),lookbehind:!0,greedy:!0,inside:$(J,X)}],char:{pattern:RegExp(N),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}qh.displayName="markup";qh.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function qh(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 a={"included-cdata":{pattern://i,inside:s}};a["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var l={};l[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:a},e.languages.insertBefore("markup","cdata",l)}}),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}zd.displayName="css";zd.aliases=[];function zd(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)}Vy.displayName="diff";Vy.aliases=[];function Vy(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],a=[];/^\w+$/.test(r)||a.push(/\w+/.exec(r)[0]),r==="diff"&&a.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r +?| +|(?![\\s\\S])))+`,"m"),alias:a,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)}Wy.displayName="go";Wy.aliases=[];function Wy(e){e.register(Ga),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"]}Ky.displayName="ini";Ky.aliases=[];function Ky(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:/=/}}Yy.displayName="java";Yy.aliases=[];function Yy(e){e.register(Ga),(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)}Xy.displayName="regex";Xy.aliases=[];function Xy(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"},a={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},l="(?:[^\\\\-]|"+r.source+")",o=RegExp(l+"-"+l),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":a,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}Zy.displayName="json";Zy.aliases=["webmanifest"];function Zy(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}Qy.displayName="kotlin";Qy.aliases=["kt","kts"];function Qy(e){e.register(Ga),(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)}Jy.displayName="less";Jy.aliases=[];function Jy(e){e.register(zd),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"}})}e4.displayName="lua";e4.aliases=[];function e4(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:/[\[\](){},;]|\.+|:+/}}t4.displayName="makefile";t4.aliases=[];function t4(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:/[:;(){}]/}}n4.displayName="yaml";n4.aliases=["yml"];function n4(e){(function(n){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",a=/(?:[^\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}),l=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(c,d){d=(d||"").replace(/m/g,"")+"m";var _=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(_,d)}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"(?:"+a+"|"+l+")"})),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(l),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)}r4.displayName="markdown";r4.aliases=["md"];function r4(e){e.register(qh),(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,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),l=/\|?[ \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("^"+a+l+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+l+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+l+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),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(d){if(!(!d||typeof d=="string"))for(var _=0,h=d.length;_]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}i4.displayName="perl";i4.aliases=[];function i4(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)}km.displayName="markup-templating";km.aliases=[];function km(e){e.register(qh),(function(n){function t(r,s){return"___"+r.toUpperCase()+s+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,s,a,l){if(r.language===s){var o=r.tokenStack=[];r.code=r.code.replace(a,function(c){if(typeof l=="function"&&!l(c))return c;for(var d=o.length,_;r.code.indexOf(_=t(s,d))!==-1;)++d;return o[d]=c,_}),r.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(r,s){if(r.language!==s||!r.tokenStack)return;r.grammar=n.languages[s];var a=0,l=Object.keys(r.tokenStack);function o(c){for(var d=0;d=l.length);d++){var _=c[d];if(typeof _=="string"||_.content&&typeof _.content=="string"){var h=l[a],m=r.tokenStack[h],g=typeof _=="string"?_:_.content,S=t(s,h),k=g.indexOf(S);if(k>-1){++a;var b=g.substring(0,k),v=new n.Token(s,n.tokenize(m,r.grammar),"language-"+s,m),x=g.substring(k+S.length),y=[];b&&y.push.apply(y,o([b])),y.push(v),x&&y.push.apply(y,o([x])),typeof _=="string"?c.splice.apply(c,[d,1].concat(y)):_.content=y}}else _.content&&o(_.content)}return c}o(r.tokens)}}})})(e)}a4.displayName="php";a4.aliases=[];function a4(e){e.register(km),(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,a=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,l=/[{}\[\](),:;]/;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:a,punctuation:l};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:a,punctuation:l}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(d){if(/<\?/.test(d.code)){var _=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(d,"php",_)}}),n.hooks.add("after-tokenize",function(d){n.languages["markup-templating"].tokenizePlaceholders(d,"php")})})(e)}o4.displayName="python";o4.aliases=["py"];function o4(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}l4.displayName="r";l4.aliases=[];function l4(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:/[(){}\[\],;]/}}c4.displayName="ruby";c4.aliases=["rb"];function c4(e){e.register(Ga),(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)}u4.displayName="rust";u4.aliases=[];function u4(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)}d4.displayName="sass";d4.aliases=[];function d4(e){e.register(zd),(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)}f4.displayName="scss";f4.aliases=[];function f4(e){e.register(zd),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}h4.displayName="sql";h4.aliases=[];function h4(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:/[;[\]()`,.]/}}_4.displayName="swift";_4.aliases=[];function _4(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})}p4.displayName="typescript";p4.aliases=["ts"];function p4(e){e.register(Sm),(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)}Cm.displayName="basic";Cm.aliases=[];function Cm(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:/[,;:()]/}}m4.displayName="vbnet";m4.aliases=[];function m4(e){e.register(Cm),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}const vht=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],E8={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function cT(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=48&&n<=57}function bht(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function xht(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function N8(e){return xht(e)||cT(e)}const yht=["","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 wht(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let a=0,l=-1,o="",c,d;t.position&&("start"in t.position||"indent"in t.position?(d=t.position.indent,c=t.position.start):c=t.position);let _=(c?c.line:0)||1,h=(c?c.column:0)||1,m=S(),g;for(a--;++a<=e.length;)if(g===10&&(h=(d?d[l]:0)||1),g=e.charCodeAt(a),g===38){const v=e.charCodeAt(a+1);if(v===9||v===10||v===12||v===32||v===38||v===60||Number.isNaN(v)||r&&v===r){o+=String.fromCharCode(g),h++;continue}const x=a+1;let y=x,C=x,j;if(v===35){C=++y;const F=e.charCodeAt(C);F===88||F===120?(j="hexadecimal",C=++y):j="decimal"}else j="named";let N="",T="",z="";const D=j==="named"?N8:j==="decimal"?cT:bht;for(C--;++C<=e.length;){const F=e.charCodeAt(C);if(!D(F))break;z+=String.fromCharCode(F),j==="named"&&vht.includes(z)&&(N=z,T=nh(z))}let O=e.charCodeAt(C)===59;if(O){C++;const F=j==="named"?nh(z):!1;F&&(N=z,T=F)}let H=1+C-x,P="";if(!(!O&&t.nonTerminated===!1))if(!z)j!=="named"&&k(4,H);else if(j==="named"){if(O&&!T)k(5,1);else if(N!==z&&(C=y+N.length,H=1+C-y,O=!1),!O){const F=N?1:3;if(t.attribute){const W=e.charCodeAt(C);W===61?(k(F,H),T=""):N8(W)?T="":k(F,H)}else k(F,H)}P=T}else{O||k(2,H);let F=Number.parseInt(z,j==="hexadecimal"?16:10);if(Sht(F))k(7,H),P="�";else if(F in E8)k(6,H),P=E8[F];else{let W="";kht(F)&&k(6,H),F>65535&&(F-=65536,W+=String.fromCharCode(F>>>10|55296),F=56320|F&1023),P=W+String.fromCharCode(F)}}if(P){b(),m=S(),a=C-1,h+=C-x+1,s.push(P);const F=S();F.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,P,{start:m,end:F},e.slice(x-1,C)),m=F}else z=e.slice(x-1,C),o+=z,h+=z.length,a=C-1}else g===10&&(_++,l++,h=0),Number.isNaN(g)?b():(o+=String.fromCharCode(g),h++);return s.join("");function S(){return{line:_,column:h,offset:a+((c?c.offset:0)||0)}}function k(v,x){let y;t.warning&&(y=S(),y.column+=x,y.offset+=x,t.warning.call(t.warningContext||void 0,yht[v],y,v))}function b(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:m,end:S()}),o="")}}function Sht(e){return e>=55296&&e<=57343||e>1114111}function kht(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 Cht=0,E0={},ts={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++Cht}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(ts.util.type(n)){case"Object":if(s=ts.util.objId(n),t[s])return t[s];r={},t[s]=r;for(var a in n)n.hasOwnProperty(a)&&(r[a]=e(n[a],t));return r;case"Array":return s=ts.util.objId(n),t[s]?t[s]:(r=[],t[s]=r,n.forEach(function(l,o){r[o]=e(l,t)}),r);default:return n}}},languages:{plain:E0,plaintext:E0,text:E0,txt:E0,extend:function(e,n){var t=ts.util.clone(ts.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||ts.languages;var s=r[e],a={};for(var l in s)if(s.hasOwnProperty(l)){if(l==n)for(var o in t)t.hasOwnProperty(o)&&(a[o]=t[o]);t.hasOwnProperty(l)||(a[l]=s[l])}var c=r[e];return r[e]=a,ts.languages.DFS(ts.languages,function(d,_){_===c&&d!=e&&(this[d]=a)}),a},DFS:function e(n,t,r,s){s=s||{};var a=ts.util.objId;for(var l in n)if(n.hasOwnProperty(l)){t.call(n,l,n[l],r||l);var o=n[l],c=ts.util.type(o);c==="Object"&&!s[a(o)]?(s[a(o)]=!0,e(o,t,null,s)):c==="Array"&&!s[a(o)]&&(s[a(o)]=!0,e(o,t,l,s))}}},plugins:{},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(ts.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=ts.tokenize(r.code,r.grammar),ts.hooks.run("after-tokenize",r),Gf.stringify(ts.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 Eht;return Z0(s,s.head,e),uT(e,s,n,s.head,0),zht(s)},hooks:{all:{},add:function(e,n){var t=ts.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=ts.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:Gf};function Gf(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function z8(e,n,t,r){e.lastIndex=n;var s=e.exec(t);if(s&&r&&s[1]){var a=s[1].length;s.index+=a,s[0]=s[0].slice(a)}return s}function uT(e,n,t,r,s,a){for(var l in t)if(!(!t.hasOwnProperty(l)||!t[l])){var o=t[l];o=Array.isArray(o)?o:[o];for(var c=0;c=a.reach);v+=b.value.length,b=b.next){var x=b.value;if(n.length>e.length)return;if(!(x instanceof Gf)){var y=1,C;if(m){if(C=z8(k,v,e,h),!C||C.index>=e.length)break;var z=C.index,j=C.index+C[0].length,N=v;for(N+=b.value.length;z>=N;)b=b.next,N+=b.value.length;if(N-=b.value.length,v=N,b.value instanceof Gf)continue;for(var T=b;T!==n.tail&&(Na.reach&&(a.reach=P);var F=b.prev;O&&(F=Z0(n,F,O),v+=O.length),Nht(n,F,y);var W=new Gf(l,_?ts.tokenize(D,_):D,g,D);if(b=Z0(n,F,W),H&&Z0(n,b,H),y>1){var Z={cause:l+","+c,reach:P};uT(e,n,t,b.prev,v,Z),a&&Z.reach>a.reach&&(a.reach=Z.reach)}}}}}}function Eht(){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 Z0(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 Nht(e,n,t){for(var r=n.next,s=0;st)return null;try{return yt.highlight(e,n).children}catch{return null}}function _T(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(_T)},n)}function Oht(e,n,t=3e5){var r;return((r=hT(e,n,t))==null?void 0:r.map(_T))??e}function pT(e,n,t=3e5){const r=hT(e,n,t);if(!r)return e.split(` +`);const s=[];let a=[];const l=[];let o=0;const c=_=>{let h=_;for(let m=l.length-1;m>=0;m--)h=f.jsx("span",{className:l[m],children:h},o++);a.push(h)},d=_=>{var h;if(_.type==="text"){(_.value??"").split(` +`).forEach((m,g)=>{g>0&&(s.push(a),a=[]),m&&c(m)});return}_.type==="element"&&(l.push((((h=_.properties)==null?void 0:h.className)??[]).join(" ")),(_.children??[]).forEach(d),l.pop())};return r.forEach(d),s.push(a),s}function mT(e){return Array.isArray(e)?e.length===0:e===""}const j8=/^\d+(?:,\d{3})*(?:\.\d+)?(?:\s*[–—-]\s*\$?\d+(?:,\d{3})*(?:\.\d+)?)?(?:\/[A-Za-z][A-Za-z0-9-]*)?/;function ud(e,n,t){let r=n;for(;e[r]===t;)r+=1;return r-n}function ah(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function $2(e){var l;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 a=((l=/^[ \t]*/.exec(e.slice(r)))==null?void 0:l[0].length)??0;return{hasListMarker:n,indentation:a,listIndent:t,offset:r+a,quoteDepth:s}}function Iht(e,n){const t=e[n];if(t!=="`"&&t!=="~"||ah(e,n)||ud(e,n,t)<3)return!1;const r=e.lastIndexOf(` +`,n-1)+1,s=e.indexOf(` +`,n),a=e.slice(r,s===-1?e.length:s),l=$2(a);return l.indentation<=3&&r+l.offset===n}function Bht(e,n){const t=e[n],r=ud(e,n,t),s=e.lastIndexOf(` +`,n-1)+1,a=e.indexOf(` +`,n),l=$2(e.slice(s,a===-1?e.length:a));let o=e.indexOf(` +`,n+r);if(o===-1)return e.length;for(o+=1;o=l.listIndent&&h.indentation<=l.listIndent+3&&g>=r&&/^[ \t\r]*$/.test(e.slice(m+g,d)))return c===-1?e.length:c+1;if(c===-1)return e.length;o=c+1}return e.length}function $ht(e,n,t){const r=ud(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function Pht(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 Uht(e,{predictMath:n=!1}={}){const t=Pht(e),r=new Set,s=new Set;for(let d=0;d`$$${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}`)),Uht(t,n)}function gT(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 Vht(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function zr(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=Vht(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const Wht=1e5;function Kht({code:e,lang:n}){const[t,r]=M.useState(!1),s=()=>{var a;(a=navigator.clipboard)==null||a.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(Kt,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:qE(),"aria-label":Cme(),onClick:s,children:t?f.jsx(mi,{size:13}):f.jsx(Qp,{size:13})}),f.jsx("pre",{children:f.jsx("code",{children:Oht(e,n,Wht)})})]})}function Yht(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 T8(e,n,t){let r=n.line,s=n.column;for(let a=0;a]*?)\/?>/gi,r=[];let s=0,a=!1;for(const l of n.matchAll(t)){const o=(l[1]??"").toLowerCase(),c=Yht(l[2]??"");if(!c[o==="run"?"id":"path"])continue;a=!0,l.index>s&&r.push({type:"text",value:n.slice(s,l.index),position:Qv(e,s,l.index)});const _=l.index+l[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:c},position:Qv(e,l.index,_),type:o==="run"?"runMention":"fileMention"}),s=_}return a?(svT(e)}function Zht(){return e=>{const n=t=>{var r;for(const s of["href","src"])t.properties&&Object.hasOwn(t.properties,s)&&(t.properties[s]=Aj(String(t.properties[s]||"")));(r=t.children)==null||r.forEach(n)};n(e)}}function R8({path:e,lines:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,a=n&&Number.parseInt(n,10)||void 0,l=a!=null?`${s}:${a}`:s;return f.jsxs("button",{className:"file-chip",title:r?dB({path:ke(e)}):e,...zr(o=>r==null?void 0:r(e,a,t,void 0,o)),disabled:!r,children:[f.jsx(IN,{size:12}),f.jsx("span",{className:"file-chip-label",children:l}),f.jsx(FN,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function Qht({id:e,label:n,onOpenRun:t}){return f.jsxs("button",{className:"file-chip run-chip",title:t?EB({id:ke(e)}):e$({id:ke(e)}),...zr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[f.jsx(Vx,{size:12}),f.jsx("span",{className:"file-chip-label",children:n||NN()}),f.jsx(FN,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const bT={singleDollarTextMath:!0},Jht=hy().use(xy).use(oT).use(lT,bT).use(Xht).use(wp).use(Zht).use(OA);function e_t(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const xT={code:({node:e,className:n,children:t,...r})=>{const s=n??"",a=/language-(\w+)/.exec(s),l=String(t??"").replace(/\n$/,"");if(!(a!=null||l.includes(` +`)))return f.jsx("code",{className:s,...r,children:t});const c=a?I2(a[1]):null;return f.jsx(Kht,{code:l,lang:c})},pre:({children:e})=>f.jsx(f.Fragment,{children:e})},Oa=M.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:a,predict:l=!1}){Pc();const o=M.useMemo(()=>({"file-mention":c=>f.jsx(R8,{path:c.path,lines:c.lines,exp:c.exp,onOpenFile:t}),"run-mention":c=>f.jsx(Qht,{id:c.id,label:c.label,onOpenRun:r}),a:({node:c,href:d,children:_,...h})=>{if(d&&e_t(d)&&t){let m;try{m=decodeURI(d)}catch{return f.jsx("span",{children:_})}const g=s?s(m):m;return g?f.jsx(R8,{path:g,onOpenFile:t}):f.jsx("span",{children:_})}return f.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",...h,children:_})},th:({node:c,...d})=>f.jsx("th",{dir:"auto",...d}),td:({node:c,...d})=>f.jsx("td",{dir:"auto",...d}),img:({node:c,src:d,alt:_,className:h,...m})=>{if(!d||typeof d!="string")return null;const g=a?a(d):d;return g?f.jsx("img",{...m,src:g,alt:_??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border ${h??""}`}):null},...xT}),[t,r,s,a]);return f.jsx("div",{dir:"auto","data-streaming":l||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(plt,{content:gT(n,{predictMath:l}),processor:Jht,components:o,predict:l})})}),D8="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function t_t({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:a,onRevise:l}){const[o,c]=M.useState(!1),d=M.useRef(null),[_,h]=M.useState(!1),[m,g]=M.useState(""),S=M.useRef(null);M.useEffect(()=>{if(!o)return;const b=v=>{d.current&&!d.current.contains(v.target)&&c(!1)};return window.addEventListener("pointerdown",b),()=>window.removeEventListener("pointerdown",b)},[o]),M.useEffect(()=>{var b;_&&((b=S.current)==null||b.focus())},[_]);const k=()=>{l(m.trim()||"no specific feedback — use your judgment"),g(""),h(!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(Vx,{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?R3e({agent:ke(n)}):j3e({agent:ke(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",...zr(t),children:G3e()})]}),_?f.jsxs(f.Fragment,{children:[f.jsx("textarea",{dir:"auto",ref:S,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:o6e(),rows:2,value:m,onChange:b=>g(b.target.value),onKeyDown:b=>{b.key==="Escape"?(b.preventDefault(),g(""),h(!1)):b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),k())}}),f.jsxs("div",{className:D8,children:[f.jsx($e,{size:"small",onClick:()=>{g(""),h(!1)},children:I3e()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),f.jsxs($e,{size:"small",variant:"primary",onClick:k,children:[J3e(),f.jsx(ON,{size:13})]})]})]}):f.jsxs("div",{className:D8,children:[f.jsx($e,{size:"small",onClick:a,children:Y3e()}),f.jsx($e,{size:"small",onClick:()=>h(!0),children:r6e()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),s?f.jsxs("div",{className:"plan-strip-approve relative flex",ref:d,children:[f.jsx($e,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:g3e()}),f.jsx($e,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":P3e(),onClick:()=>c(b=>!b),children:f.jsx($a,{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(Nr,{onClick:()=>{c(!1),r("bypassPermissions")},children:y3e()})})]}):f.jsx($e,{size:"small",variant:"primary",onClick:()=>r(),children:C3e()})]})]})}function yT(e=!0){const[n,t]=M.useState(null),[r,s]=M.useState(null);return M.useEffect(()=>{if(!e)return;let a=!1;const l=Itt(o=>{a=!0,t(o)});return oet().then(o=>!a&&t(o)).catch(o=>s(o instanceof Error?o.message:String(o))),l},[e]),{status:n,error:r,apply:t}}function n_t({status:e}){const[n,t]=M.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null;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(bd,{size:13,className:"shrink-0 text-subtext"}),f.jsx("span",{className:"min-w-0",children:aXe({version:ke(r)})}),f.jsx(Kt,{type:"button",size:"small",className:"ms-auto","aria-label":uXe(),onClick:()=>t(r),children:f.jsx(Zr,{size:13})})]})}function r_t({save:e,onSaved:n,placeholder:t,createHref:r}){const[s,a]=M.useState(""),[l,o]=M.useState(!1),[c,d]=M.useState(null);async function _(h){if(h.preventDefault(),!(l||!s.trim())){o(!0),d(null);try{n(await e(s.trim())),a("")}catch(m){d(m instanceof Error?m.message:String(m))}finally{o(!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:s,onChange:h=>a(h.target.value),placeholder:t,autoComplete:"off"}),f.jsx($e,{type:"submit",disabled:l||!s.trim(),children:l?oa():Ll()}),f.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:H0e()}),c&&f.jsx("div",{className:"error",children:c})]})}function s_t({cmd:e}){const[n,t]=M.useState(!1);return f.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[f.jsx("code",{className:"font-mono text-sm",children:e}),f.jsx("button",{type:"button",className:"cmd-inline-copy inline-flex items-center p-0.5 border-0 rounded-xs bg-none bg-transparent text-muted cursor-pointer [&:hover]:bg-surface [&:hover]:text-text",onClick:()=>{navigator.clipboard.writeText(e).then(()=>{t(!0),setTimeout(()=>t(!1),1500)}).catch(()=>{})},"aria-label":n?Xf():zI({value:ke(e)}),title:n?Xf():qE(),children:n?f.jsx(mi,{size:11,strokeWidth:3}):f.jsx(Qp,{size:11})})]})}function Gh(e){return e?e.split(/`([^`]+)`/).map((n,t)=>t%2===1?f.jsx(s_t,{cmd:n},t):n):null}const i_t="/assets/slurm-logo-aGSXVZcE.svg",a_t="/assets/thinking-machines-BOdslTfm.png";function o_t(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 PE();case"tinker_job":return"Tinker";default:return e||"—"}}function l_t({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 c_t({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 u_t({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 d_t({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 f_t({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 h_t({size:e=16}){return f.jsx("img",{className:"tinker-logo block flex-none object-contain",src:a_t,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 __t({size:e=16}){return f.jsx("img",{className:"block flex-none object-contain",src:i_t,width:e,height:e,alt:"","aria-hidden":"true"})}function Em({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 Nm({kind:e,size:n=16}){switch(e){case"modal_job":return f.jsx(c_t,{size:n});case"hf_job":return f.jsx(l_t,{size:n});case"k8s_job":return f.jsx(u_t,{size:n});case"ssh_job":return f.jsx(hS,{size:n,strokeWidth:1.5});case"slurm_job":return f.jsx(__t,{size:n});case"ray_job":return f.jsx(d_t,{size:n});case"openresearch_job":return f.jsx(f_t,{size:n});case"tinker_job":return f.jsx(h_t,{size:n});case"local_job":return f.jsx(LQe,{size:n,strokeWidth:1.5});default:return f.jsx(hS,{size:n})}}function v4({backend:e}){const n=Xx(e),t=Stt(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(Nm,{kind:n}),f.jsx("span",{className:"backend-name",children:o_t(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 wT({value:e,max:n,label:t,caption:r,fillColor:s}){const a=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":a,"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:`${a}%`,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??`${a}%`}),r]})]})}function H2({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"})}):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"})})}const ST=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),L8=["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(" "),Lf={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode"};function p_t(e){var r,s;const n=e.find(a=>a.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:_p(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:nm(n,t).defaultId}}function Va(e){const[n,t]=M.useState(!1),r=M.useRef(null);return M.useEffect(()=>{if(!n)return;const s=l=>{var o;(o=r.current)!=null&&o.contains(l.target)||t(!1)},a=l=>{var o;l.key==="Escape"&&(l.preventDefault(),l.stopPropagation(),t(!1),(o=e==null?void 0:e.current)==null||o.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",a,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",a,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function m_t({value:e,onSelect:n,permissionChoices:t=[],defaultPermissionId:r,onSelectPermission:s,reasoningChoices:a=[],defaultReasoningId:l,onSelectReasoning:o,onHarnesses:c,lockHarness:d=!1,className:_}){var ae,re,q,oe,ce,_e;const[h,m]=M.useState([]),g=M.useRef(null),S=M.useRef(null),{open:k,setOpen:b,ref:v}=Va(g),[x,y]=M.useState(""),[C,j]=M.useState("root"),N=()=>{b(!1),j("root"),y("")};M.useEffect(()=>{var de;k&&(C==="reasoning"||C==="speed"||C==="permissions")&&((de=S.current)==null||de.focus())},[k,C]),M.useEffect(()=>{let de=!0;const ve=(Le=!1)=>pp(Le).then(Ue=>{de&&(m(Ue),c==null||c(Ue))}).catch(()=>{});ve();const Ce=Jx(()=>void ve(!0));return()=>{de=!1,Ce()}},[]);const T=M.useMemo(()=>{const de=x.trim().toLowerCase();return(d&&e?h.filter(Ce=>Ce.id===e.harness):h).map(Ce=>{let Le=Ce.models;return de?Le=Le.filter(Ue=>Ue.id.toLowerCase().includes(de)):Ce.id==="opencode"&&(Le=Le.slice(0,6)),{harness:Ce,models:Le,hidden:de?0:Ce.models.length-Le.length}})},[h,x,d,e]),z=(de,ve)=>{var Le;const Ce=(e==null?void 0:e.harness)===de.id;n({harness:de.id,model:ve,serviceTier:_p(de,ve,Ce?e==null?void 0:e.serviceTier:null),permissionMode:Ce?e.permissionMode:((Le=de.options)==null?void 0:Le.defaultPermissionMode)??null,reasoningLevel:dz(de,ve,Ce?e.reasoningLevel:null)}),N()},D=(e==null?void 0:e.model)!=null?(ae=h.find(de=>de.id===e.harness))==null?void 0:ae.models.find(de=>de.id===e.model):void 0,O=e?e.model?D?fp(D):fz(e.model):M7():lv(),H=(e==null?void 0:e.reasoningLevel)??l??((re=a[0])==null?void 0:re.id),P=(q=a.find(de=>de.id===H))==null?void 0:q.label,F=(e==null?void 0:e.permissionMode)??r??((oe=t[0])==null?void 0:oe.id),W=(ce=t.find(de=>de.id===F))==null?void 0:ce.label,Z=(e==null?void 0:e.harness)==="opencode"?Lge():Yme(),U=h.find(de=>de.id===(e==null?void 0:e.harness)),X=uz(U,e==null?void 0:e.model),J=_p(U,e==null?void 0:e.model,e==null?void 0:e.serviceTier),$=(_e=X.find(de=>de.id===J))==null?void 0:_e.label,L=de=>{o==null||o(de),N()},B=de=>{s==null||s(de),N()},Y=de=>{e&&n({...e,serviceTier:de}),N()},V=(de,ve,Ce)=>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(Ce),children:[f.jsx("span",{className:"flex-1",children:de}),ve&&f.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:ve}),f.jsx(Ha,{size:14,className:"shrink-0 text-muted"})]}),ie=de=>f.jsxs("button",{ref:S,type:"button",className:"model-submenu-header flex w-full items-center gap-2 border-0 border-b border-solid border-b-border-variant bg-transparent px-2 py-2 text-start text-sm font-medium text-text hover:bg-surface",onClick:()=>{j("root"),y("")},children:[f.jsx(MN,{size:15}),de]}),le=(de,ve,Ce,Le)=>f.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:de.map(Ue=>f.jsxs(Nr,{onClick:()=>Le(Ue.id),children:[f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[Ue.label,Ue.id===Ce&&f.jsxs("span",{className:"font-normal text-muted",children:[" ",WE()]})]}),Ue.description&&f.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Ue.description})]}),Ue.id===ve&&f.jsx(mi,{size:13})]},Ue.id))});return f.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:v,children:[f.jsxs("button",{ref:g,type:"button",className:us("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:fI({label:`${O}${P?` · ${P}`:""}${$?` · ${$}`:""}`}),"aria-haspopup":"menu","aria-expanded":k,onClick:()=>{k?N():(j("root"),b(!0))},children:[J==="priority"?f.jsx(CJe,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?f.jsx(H2,{harness:e.harness,size:14}):null,J==="priority"&&f.jsxs("span",{className:"sr-only",children:[Jme()," "]}),f.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[O,P&&f.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:P})]}),f.jsx($a,{size:14,className:"shrink-0 text-muted"})]}),k&&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:[C==="root"&&f.jsxs("div",{className:"model-root-menu p-1",children:[V(lv(),O,"models"),a.length>0&&V(Z,P,"reasoning"),X.length>0&&V(D7(),$,"speed"),t.length>0&&V(R7(),W,"permissions")]}),C==="models"&&f.jsxs(f.Fragment,{children:[ie(lv()),f.jsx("input",{autoFocus:!0,type:"text",placeholder:gge(),value:x,onChange:de=>y(de.target.value)}),f.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[T.map(({harness:de,models:ve,hidden:Ce})=>f.jsxs("div",{className:"[&_.model-item]:ps-6",children:[f.jsxs("div",{className:ST,children:[f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx(H2,{harness:de.id,size:14}),de.name]}),!de.agentReady&&f.jsxs("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:[f.jsx(fS,{size:10})," ",KE()]})]}),de.agentReady?f.jsxs(f.Fragment,{children:[de.models.length===0&&f.jsxs(Nr,{onClick:()=>z(de,null),children:[f.jsxs("span",{children:[M7(),f.jsx("span",{className:"model-id",children:VE()})]}),(e==null?void 0:e.harness)===de.id&&(e==null?void 0:e.model)===null&&f.jsx(mi,{size:13})]}),ve.map(Le=>f.jsxs(Nr,{title:Le.id,onClick:()=>z(de,Le.id),children:[f.jsx("span",{children:fp(Le)}),(e==null?void 0:e.harness)===de.id&&(e==null?void 0:e.model)===Le.id&&f.jsx(mi,{size:13})]},Le.id)),Ce>0&&f.jsx("div",{className:L8,children:cge({count:Yt(Ce)})}),x.trim().length>0&&!de.models.some(Le=>Le.id===x.trim())&&f.jsx(Nr,{onClick:()=>z(de,x.trim()),children:f.jsx("span",{children:Tge({id:ke(x.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:de.agentNote?Gh(de.agentNote):hge()})]},de.id)),h.length===0&&f.jsx("div",{className:L8,children:Gme()})]}),d&&e&&h.length>1&&f.jsxs("div",{className:"model-locked-note flex items-center gap-1.5 py-[7px] px-3 text-sm text-muted border-t border-t-border-variant [&_svg]:shrink-0",children:[f.jsx(fS,{size:11}),yge()]})]}),C==="reasoning"&&f.jsxs(f.Fragment,{children:[ie(Z),le(a,H,l,L)]}),C==="permissions"&&f.jsxs(f.Fragment,{children:[ie(R7()),le(t,F,r,B)]}),C==="speed"&&f.jsxs(f.Fragment,{children:[ie(D7()),le(X,J??void 0,"default",Y)]})]})]})}function oh({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:a=!1,disabled:l=!1,variant:o="pill",title:c,numbered:d=!1,renderIcon:_,onSelect:h,className:m}){var T,z;const{open:g,setOpen:S,ref:k}=Va();if(e.length===0)return null;const b=n??t??((T=e[0])==null?void 0:T.id)??null,v=e.find(D=>D.id===b),x=e.find(D=>D.id===t),y=o==="bare"&&(x==null?void 0:x.id)===hp?x:void 0,C=y?e.filter(D=>D.id!==y.id):e,j=(v==null?void 0:v.label)??((z=e[0])==null?void 0:z.label)??"",N=D=>{h(D),S(!1)};return f.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:k,children:[f.jsxs("button",{type:"button",className:us(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"}`,m),title:c,"aria-haspopup":"menu","aria-expanded":g,disabled:l,onClick:()=>S(D=>!D),children:[f.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[v&&(_==null?void 0:_(v)),f.jsx("span",{className:"truncate",children:j})]}),f.jsx($a,{size:12})]}),g&&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 ${e.some(D=>D.description)?"min-w-80":""} ${o==="field"?"min-w-full":""} ${s==="right"?"align-right":""} ${a?"drop-down":""}`,children:[r&&f.jsx("div",{className:ST,children:r}),y&&f.jsxs(f.Fragment,{children:[f.jsxs(Nr,{type:"button",onClick:()=>N(y.id),children:[f.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(y),f.jsxs("span",{children:[y.label,f.jsx("span",{className:"option-default text-muted font-normal",children:VE()})]})]}),b===y.id&&f.jsx(mi,{size:13})]}),f.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),C.map((D,O)=>f.jsxs(Nr,{type:"button",onClick:()=>N(D.id),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(D),f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[D.label,!y&&D.id===t&&f.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",WE()]})]}),D.description&&f.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:D.description})]})]}),b===D.id?f.jsx(mi,{size:13}):d&&f.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:O+1})]},D.id))]})]})}const O8={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 g_t(e){return O8[e]??O8.idle}const v_t={done:zVe,failed:OVe,running:qVe,starting:KVe,cancelling:kVe,cancelled:xVe,editing:MVe,idle:HVe};function kT(e){const n=v_t[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function ko({status:e,label:n,className:t}){const r=g_t(e);return f.jsx(ry,{tone:r.tone,live:r.live,className:t,children:n??kT(e)})}var Jv={exports:{}},I8;function b_t(){return I8||(I8=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 a=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(a._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,a=s._renderService.dimensions;if(a.css.cell.width===0||a.css.cell.height===0)return;const l=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(o.getPropertyValue("height")),d=Math.max(0,parseInt(o.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),h=c-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),m=d-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-l;return{cols:Math.max(2,Math.floor(m/a.css.cell.width)),rows:Math.max(1,Math.floor(h/a.css.cell.height))}}}})(),t})()))})(Jv)),Jv.exports}var x_t=b_t(),eb={exports:{}},B8;function y_t(){return B8||(B8=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(l,o)=>{function c(_){try{const h=new URL(_),m=h.password&&h.username?`${h.protocol}//${h.username}:${h.password}@${h.host}`:h.username?`${h.protocol}//${h.username}@${h.host}`:`${h.protocol}//${h.host}`;return _.toLocaleLowerCase().startsWith(m.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(_,h,m,g={}){this._terminal=_,this._regex=h,this._handler=m,this._options=g}provideLinks(_,h){const m=d.computeLink(_,this._regex,this._terminal,this._handler);h(this._addCallbacks(m))}_addCallbacks(_){return _.map((h=>(h.leave=this._options.leave,h.hover=(m,g)=>{if(this._options.hover){const{range:S}=h;this._options.hover(m,g,S)}},h)))}};class d{static computeLink(h,m,g,S){const k=new RegExp(m.source,(m.flags||"")+"g"),[b,v]=d._getWindowedLineStrings(h-1,g),x=b.join("");let y;const C=[];for(;y=k.exec(x);){const j=y[0];if(!c(j))continue;const[N,T]=d._mapStrIdx(g,v,0,y.index),[z,D]=d._mapStrIdx(g,N,T,j.length);if(N===-1||T===-1||z===-1||D===-1)continue;const O={start:{x:T+1,y:N+1},end:{x:D,y:z+1}};C.push({range:O,text:j,activate:S})}return C}static _getWindowedLineStrings(h,m){let g,S=h,k=h,b=0,v="";const x=[];if(g=m.buffer.active.getLine(h)){const y=g.translateToString(!0);if(g.isWrapped&&y[0]!==" "){for(b=0;(g=m.buffer.active.getLine(--S))&&b<2048&&(v=g.translateToString(!0),b+=v.length,x.push(v),g.isWrapped&&v.indexOf(" ")===-1););x.reverse()}for(x.push(y),b=0;(g=m.buffer.active.getLine(++k))&&g.isWrapped&&b<2048&&(v=g.translateToString(!0),b+=v.length,x.push(v),v.indexOf(" ")===-1););}return[x,S]}static _mapStrIdx(h,m,g,S){const k=h.buffer.active,b=k.getNullCell();let v=g;for(;S;){const x=k.getLine(m);if(!x)return[-1,-1];for(let y=v;y{var l=a;Object.defineProperty(l,"__esModule",{value:!0}),l.WebLinksAddon=void 0;const o=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(_,h){const m=window.open();if(m){try{m.opener=null}catch{}m.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}l.WebLinksAddon=class{constructor(_=d,h={}){this._handler=_,this._options=h}activate(_){this._terminal=_;const h=this._options,m=h.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,m,this._handler,h))}dispose(){var _;(_=this._linkProvider)==null||_.dispose()}}})(),a})()))})(eb)),eb.exports}var w_t=y_t(),tb={exports:{}},$8;function S_t(){return $8||($8=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(l,o,c){var d=this&&this.__decorate||function(x,y,C,j){var N,T=arguments.length,z=T<3?y:j===null?j=Object.getOwnPropertyDescriptor(y,C):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,y,C,j);else for(var D=x.length-1;D>=0;D--)(N=x[D])&&(z=(T<3?N(z):T>3?N(y,C,z):N(y,C))||z);return T>3&&z&&Object.defineProperty(y,C,z),z},_=this&&this.__param||function(x,y){return function(C,j){y(C,j,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const h=c(9042),m=c(9924),g=c(844),S=c(4725),k=c(2585),b=c(3656);let v=o.AccessibilityManager=class extends g.Disposable{constructor(x,y,C,j){super(),this._terminal=x,this._coreBrowserService=C,this._renderService=j,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 N=0;Nthis._handleBoundaryFocus(N,0),this._bottomBoundaryFocusListener=N=>this._handleBoundaryFocus(N,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 m.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((N=>this._handleResize(N.rows)))),this.register(this._terminal.onRender((N=>this._refreshRows(N.start,N.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((N=>this._handleChar(N)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` +`)))),this.register(this._terminal.onA11yTab((N=>this._handleTab(N)))),this.register(this._terminal.onKey((N=>this._handleKey(N.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,b.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,g.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(x){for(let y=0;y0?this._charsToConsume.shift()!==x&&(this._charsToAnnounce+=x):this._charsToAnnounce+=x,x===` +`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(x){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(x)||this._charsToConsume.push(x)}_refreshRows(x,y){this._liveRegionDebouncer.refresh(x,y,this._terminal.rows)}_renderRows(x,y){const C=this._terminal.buffer,j=C.lines.length.toString();for(let N=x;N<=y;N++){const T=C.lines.get(C.ydisp+N),z=[],D=(T==null?void 0:T.translateToString(!0,void 0,void 0,z))||"",O=(C.ydisp+N+1).toString(),H=this._rowElements[N];H&&(D.length===0?(H.innerText=" ",this._rowColumns.set(H,[0,1])):(H.textContent=D,this._rowColumns.set(H,z)),H.setAttribute("aria-posinset",O),H.setAttribute("aria-setsize",j))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(x,y){const C=x.target,j=this._rowElements[y===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||x.relatedTarget!==j)return;let N,T;if(y===0?(N=C,T=this._rowElements.pop(),this._rowContainer.removeChild(T)):(N=this._rowElements.shift(),T=C,this._rowContainer.removeChild(N)),N.removeEventListener("focus",this._topBoundaryFocusListener),T.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const z=this._createAccessibilityTreeNode();this._rowElements.unshift(z),this._rowContainer.insertAdjacentElement("afterbegin",z)}else{const z=this._createAccessibilityTreeNode();this._rowElements.push(z),this._rowContainer.appendChild(z)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),x.preventDefault(),x.stopImmediatePropagation()}_handleSelectionChange(){var D;if(this._rowElements.length===0)return;const x=document.getSelection();if(!x)return;if(x.isCollapsed)return void(this._rowContainer.contains(x.anchorNode)&&this._terminal.clearSelection());if(!x.anchorNode||!x.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:x.anchorNode,offset:x.anchorOffset},C={node:x.focusNode,offset:x.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 j=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(j)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:j,offset:((D=j.textContent)==null?void 0:D.length)??0}),!this._rowContainer.contains(C.node))return;const N=({node:O,offset:H})=>{const P=O instanceof Text?O.parentNode:O;let F=parseInt(P==null?void 0:P.getAttribute("aria-posinset"),10)-1;if(isNaN(F))return console.warn("row is invalid. Race condition?"),null;const W=this._rowColumns.get(P);if(!W)return console.warn("columns is null. Race condition?"),null;let Z=H=this._terminal.cols&&(++F,Z=0),{row:F,column:Z}},T=N(y),z=N(C);if(T&&z){if(T.row>z.row||T.row===z.row&&T.column>=z.column)throw new Error("invalid range");this._terminal.select(T.column,T.row,(z.row-T.row)*this._terminal.cols-T.column+z.column)}}_handleResize(x){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yx;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const x=this._coreBrowserService.mainDocument.createElement("div");return x.setAttribute("role","listitem"),x.tabIndex=-1,this._refreshRowDimensions(x),x}_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 x=0;x{function c(m){return m.replace(/\r?\n/g,"\r")}function d(m,g){return g?"\x1B[200~"+m+"\x1B[201~":m}function _(m,g,S,k){m=d(m=c(m),S.decPrivateModes.bracketedPasteMode&&k.rawOptions.ignoreBracketedPasteMode!==!0),S.triggerDataEvent(m,!0),g.value=""}function h(m,g,S){const k=S.getBoundingClientRect(),b=m.clientX-k.left-10,v=m.clientY-k.top-10;g.style.width="20px",g.style.height="20px",g.style.left=`${b}px`,g.style.top=`${v}px`,g.style.zIndex="1000",g.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=d,o.copyHandler=function(m,g){m.clipboardData&&m.clipboardData.setData("text/plain",g.selectionText),m.preventDefault()},o.handlePasteEvent=function(m,g,S,k){m.stopPropagation(),m.clipboardData&&_(m.clipboardData.getData("text/plain"),g,S,k)},o.paste=_,o.moveTextAreaUnderMouseCursor=h,o.rightClickHandler=function(m,g,S,k,b){h(m,g,S),b&&k.rightClickSelect(m),g.value=k.selectionText,g.select()}},7239:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const d=c(1505);o.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(_,h,m){this._css.set(_,h,m)}getCss(_,h){return this._css.get(_,h)}setColor(_,h,m){this._color.set(_,h,m)}getColor(_,h){return this._color.get(_,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(c,d,_,h){c.addEventListener(d,_,h);let m=!1;return{dispose:()=>{m||(m=!0,c.removeEventListener(d,_,h))}}}},3551:function(l,o,c){var d=this&&this.__decorate||function(v,x,y,C){var j,N=arguments.length,T=N<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(v,x,y,C);else for(var z=v.length-1;z>=0;z--)(j=v[z])&&(T=(N<3?j(T):N>3?j(x,y,T):j(x,y))||T);return N>3&&T&&Object.defineProperty(x,y,T),T},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const h=c(3656),m=c(8460),g=c(844),S=c(2585),k=c(4725);let b=o.Linkifier=class extends g.Disposable{get currentLink(){return this._currentLink}constructor(v,x,y,C,j){super(),this._element=v,this._mouseService=x,this._renderService=y,this._bufferService=C,this._linkProviderService=j,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,g.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,g.toDisposable)((()=>{var N;this._lastMouseEvent=void 0,(N=this._activeProviderReplies)==null||N.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(v){this._lastMouseEvent=v;const x=this._positionFromMouseEvent(v,this._element,this._mouseService);if(!x)return;this._isMouseOut=!1;const y=v.composedPath();for(let C=0;C{N==null||N.forEach((T=>{T.link.dispose&&T.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=v.y);let y=!1;for(const[N,T]of this._linkProviderService.linkProviders.entries())x?(j=this._activeProviderReplies)!=null&&j.get(N)&&(y=this._checkLinkProviderResult(N,v,y)):T.provideLinks(v.y,(z=>{var O,H;if(this._isMouseOut)return;const D=z==null?void 0:z.map((P=>({link:P})));(O=this._activeProviderReplies)==null||O.set(N,D),y=this._checkLinkProviderResult(N,v,y),((H=this._activeProviderReplies)==null?void 0:H.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(v.y,this._activeProviderReplies)}))}_removeIntersectingLinks(v,x){const y=new Set;for(let C=0;Cv?this._bufferService.cols:T.link.range.end.x;for(let O=z;O<=D;O++){if(y.has(O)){j.splice(N--,1);break}y.add(O)}}}}_checkLinkProviderResult(v,x,y){var N;if(!this._activeProviderReplies)return y;const C=this._activeProviderReplies.get(v);let j=!1;for(let T=0;Tthis._linkAtPosition(z.link,x)));T&&(y=!0,this._handleNewLink(T))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let T=0;Tthis._linkAtPosition(D.link,x)));if(z){y=!0,this._handleNewLink(z);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(v){if(!this._currentLink)return;const x=this._positionFromMouseEvent(v,this._element,this._mouseService);x&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,x)&&this._currentLink.link.activate(v,this._currentLink.link.text)}_clearCurrentLink(v,x){this._currentLink&&this._lastMouseEvent&&(!v||!x||this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=x)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,g.disposeArray)(this._linkCacheDisposables))}_handleNewLink(v){if(!this._lastMouseEvent)return;const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._linkAtPosition(v.link,x)&&(this._currentLink=v,this._currentLink.state={decorations:{underline:v.link.decorations===void 0||v.link.decorations.underline,pointerCursor:v.link.decorations===void 0||v.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,v.link,this._lastMouseEvent),v.link.decorations={},Object.defineProperties(v.link.decorations,{pointerCursor:{get:()=>{var 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,j,N;(C=this._currentLink)!=null&&C.state&&((N=(j=this._currentLink)==null?void 0:j.state)==null?void 0:N.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(v.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,j=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=j&&(this._clearCurrentLink(C,j),this._lastMouseEvent)){const N=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);N&&this._askForLink(N,!1)}}))))}_linkHover(v,x,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!0),this._currentLink.state.decorations.pointerCursor&&v.classList.add("xterm-cursor-pointer")),x.hover&&x.hover(y,x.text)}_fireUnderlineEvent(v,x){const y=v.range,C=this._bufferService.buffer.ydisp,j=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-C-1,y.end.x,y.end.y-C-1,void 0);(x?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(j)}_linkLeave(v,x,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!1),this._currentLink.state.decorations.pointerCursor&&v.classList.remove("xterm-cursor-pointer")),x.leave&&x.leave(y,x.text)}_linkAtPosition(v,x){const y=v.range.start.y*this._bufferService.cols+v.range.start.x,C=v.range.end.y*this._bufferService.cols+v.range.end.x,j=x.y*this._bufferService.cols+x.x;return y<=j&&j<=C}_positionFromMouseEvent(v,x,y){const C=y.getCoords(v,x,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(v,x,y,C,j){return{x1:v,y1:x,x2:y,y2:C,cols:this._bufferService.cols,fg:j}}};o.Linkifier=b=d([_(1,k.IMouseService),_(2,k.IRenderService),_(3,S.IBufferService),_(4,k.ILinkProviderService)],b)},9042:(l,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(l,o,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,j=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(k,b,v,x);else for(var N=k.length-1;N>=0;N--)(y=k[N])&&(j=(C<3?y(j):C>3?y(b,v,j):y(b,v))||j);return C>3&&j&&Object.defineProperty(b,v,j),j},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const h=c(511),m=c(2585);let g=o.OscLinkProvider=class{constructor(k,b,v){this._bufferService=k,this._optionsService=b,this._oscLinkService=v}provideLinks(k,b){var D;const v=this._bufferService.buffer.lines.get(k-1);if(!v)return void b(void 0);const x=[],y=this._optionsService.rawOptions.linkHandler,C=new h.CellData,j=v.getTrimmedLength();let N=-1,T=-1,z=!1;for(let O=0;Oy?y.activate(W,Z,P):S(0,Z),hover:(W,Z)=>{var U;return(U=y==null?void 0:y.hover)==null?void 0:U.call(y,W,Z,P)},leave:(W,Z)=>{var U;return(U=y==null?void 0:y.leave)==null?void 0:U.call(y,W,Z,P)}})}z=!1,C.hasExtendedAttrs()&&C.extended.urlId?(T=O,N=C.extended.urlId):(T=-1,N=-1)}}b(x)}};function S(k,b){if(confirm(`Do you want to navigate to ${b}? + +WARNING: This link could potentially be dangerous`)){const v=window.open();if(v){try{v.opener=null}catch{}v.location.href=b}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=g=d([_(0,m.IBufferService),_(1,m.IOptionsService),_(2,m.IOscLinkService)],g)},6193:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(c,d){this._renderCallback=c,this._coreBrowserService=d,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,d,_){this._rowCount=_,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d,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),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const d=c(3614),_=c(3656),h=c(3551),m=c(9042),g=c(3730),S=c(1680),k=c(3107),b=c(5744),v=c(2950),x=c(1296),y=c(428),C=c(4269),j=c(5114),N=c(8934),T=c(3230),z=c(9312),D=c(4725),O=c(6731),H=c(8055),P=c(8969),F=c(8460),W=c(844),Z=c(6114),U=c(8437),X=c(2584),J=c(7399),$=c(5941),L=c(9074),B=c(2585),Y=c(5435),V=c(4567),ie=c(779);class le extends P.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(re={}){super(re),this.browser=Z,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new W.MutableDisposable),this._onCursorMove=this.register(new F.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new F.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new F.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new F.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new F.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new F.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new F.EventEmitter),this._onBlur=this.register(new F.EventEmitter),this._onA11yCharEmitter=this.register(new F.EventEmitter),this._onA11yTabEmitter=this.register(new F.EventEmitter),this._onWillOpen=this.register(new F.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(B.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ie.LinkProviderService),this._instantiationService.setService(D.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(g.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((q,oe)=>this.refresh(q,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((q=>this._reportWindowsOptions(q)))),this.register(this._inputHandler.onColor((q=>this._handleColorEvent(q)))),this.register((0,F.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,F.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((q=>this._afterResize(q.cols,q.rows)))),this.register((0,W.toDisposable)((()=>{var q,oe;this._customKeyEventHandler=void 0,(oe=(q=this.element)==null?void 0:q.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(re){if(this._themeService)for(const q of re){let oe,ce="";switch(q.index){case 256:oe="foreground",ce="10";break;case 257:oe="background",ce="11";break;case 258:oe="cursor",ce="12";break;default:oe="ansi",ce="4;"+q.index}switch(q.type){case 0:const _e=H.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${X.C0.ESC}]${ce};${(0,$.toRgbString)(_e)}${X.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((de=>de.ansi[q.index]=H.channels.toColor(...q.color)));else{const de=oe;this._themeService.modifyColors((ve=>ve[de]=H.channels.toColor(...q.color)))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(re){re?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(re){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var re;return(re=this.textarea)==null?void 0:re.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const re=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(re);if(!q)return;const oe=Math.min(this.buffer.x,this.cols-1),ce=this._renderService.dimensions.css.cell.height,_e=q.getWidth(oe),de=this._renderService.dimensions.css.cell.width*_e,ve=this.buffer.y*this._renderService.dimensions.css.cell.height,Ce=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ce+"px",this.textarea.style.top=ve+"px",this.textarea.style.width=de+"px",this.textarea.style.height=ce+"px",this.textarea.style.lineHeight=ce+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,_.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,d.copyHandler)(q,this._selectionService)})));const re=q=>(0,d.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,_.addDisposableDomListener)(this.textarea,"paste",re)),this.register((0,_.addDisposableDomListener)(this.element,"paste",re)),Z.isFirefox?this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,d.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,_.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,d.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Z.isLinux&&this.register((0,_.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,d.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,_.addDisposableDomListener)(this.textarea,"keyup",(re=>this._keyUp(re)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keydown",(re=>this._keyDown(re)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keypress",(re=>this._keyPress(re)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionupdate",(re=>this._compositionHelper.compositionupdate(re)))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,_.addDisposableDomListener)(this.textarea,"input",(re=>this._inputEvent(re)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(re){var oe;if(!re)throw new Error("Terminal requires a parent element.");if(re.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=re.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"),re.appendChild(this.element);const q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,_.addDisposableDomListener)(this.screenElement,"mousemove",(ce=>this.updateCursorStyle(ce)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),Z.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(j.CoreBrowserService,this.textarea,re.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(D.ICoreBrowserService,this._coreBrowserService),this.register((0,_.addDisposableDomListener)(this.textarea,"focus",(ce=>this._handleTextAreaFocus(ce)))),this.register((0,_.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(D.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(O.ThemeService),this._instantiationService.setService(D.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(D.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(T.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(D.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ce=>this._onRender.fire(ce)))),this.onResize((ce=>this._renderService.resize(ce.cols,ce.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(N.MouseService),this._instantiationService.setService(D.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(S.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ce=>this.scrollLines(ce.amount,ce.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(z.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(D.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ce=>this.scrollLines(ce.amount,ce.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ce=>this._renderService.handleSelectionChanged(ce.start,ce.end,ce.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ce=>{this.textarea.value=ce,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ce=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(ce=>this._selectionService.handleMouseDown(ce)))),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(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ce=>this._handleScreenReaderModeOptionChange(ce)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ce=>{!this._overviewRulerRenderer&&ce&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(x.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const re=this,q=this.element;function oe(de){const ve=re._mouseService.getMouseReportCoords(de,re.screenElement);if(!ve)return!1;let Ce,Le;switch(de.overrideType||de.type){case"mousemove":Le=32,de.buttons===void 0?(Ce=3,de.button!==void 0&&(Ce=de.button<3?de.button:3)):Ce=1&de.buttons?0:4&de.buttons?1:2&de.buttons?2:3;break;case"mouseup":Le=0,Ce=de.button<3?de.button:3;break;case"mousedown":Le=1,Ce=de.button<3?de.button:3;break;case"wheel":if(re._customWheelEventHandler&&re._customWheelEventHandler(de)===!1||re.viewport.getLinesScrolled(de)===0)return!1;Le=de.deltaY<0?0:1,Ce=4;break;default:return!1}return!(Le===void 0||Ce===void 0||Ce>4)&&re.coreMouseService.triggerMouseEvent({col:ve.col,row:ve.row,x:ve.x,y:ve.y,button:Ce,action:Le,ctrl:de.ctrlKey,alt:de.altKey,shift:de.shiftKey})}const ce={mouseup:null,wheel:null,mousedrag:null,mousemove:null},_e={mouseup:de=>(oe(de),de.buttons||(this._document.removeEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.removeEventListener("mousemove",ce.mousedrag)),this.cancel(de)),wheel:de=>(oe(de),this.cancel(de,!0)),mousedrag:de=>{de.buttons&&oe(de)},mousemove:de=>{de.buttons||oe(de)}};this.register(this.coreMouseService.onProtocolChange((de=>{de?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(de)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&de?ce.mousemove||(q.addEventListener("mousemove",_e.mousemove),ce.mousemove=_e.mousemove):(q.removeEventListener("mousemove",ce.mousemove),ce.mousemove=null),16&de?ce.wheel||(q.addEventListener("wheel",_e.wheel,{passive:!1}),ce.wheel=_e.wheel):(q.removeEventListener("wheel",ce.wheel),ce.wheel=null),2&de?ce.mouseup||(ce.mouseup=_e.mouseup):(this._document.removeEventListener("mouseup",ce.mouseup),ce.mouseup=null),4&de?ce.mousedrag||(ce.mousedrag=_e.mousedrag):(this._document.removeEventListener("mousemove",ce.mousedrag),ce.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,_.addDisposableDomListener)(q,"mousedown",(de=>{if(de.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(de))return oe(de),ce.mouseup&&this._document.addEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.addEventListener("mousemove",ce.mousedrag),this.cancel(de)}))),this.register((0,_.addDisposableDomListener)(q,"wheel",(de=>{if(!ce.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(de)===!1)return!1;if(!this.buffer.hasScrollback){const ve=this.viewport.getLinesScrolled(de);if(ve===0)return;const Ce=X.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(de.deltaY<0?"A":"B");let Le="";for(let Ue=0;Ue{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(de),this.cancel(de)}),{passive:!0})),this.register((0,_.addDisposableDomListener)(q,"touchmove",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(de)?void 0:this.cancel(de)}),{passive:!1}))}refresh(re,q){var oe;(oe=this._renderService)==null||oe.refreshRows(re,q)}updateCursorStyle(re){var q;(q=this._selectionService)!=null&&q.shouldColumnSelect(re)?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(re,q,oe=0){var ce;oe===1?(super.scrollLines(re,q,oe),this.refresh(0,this.rows-1)):(ce=this.viewport)==null||ce.scrollLines(re)}paste(re){(0,d.paste)(re,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(re){this._customKeyEventHandler=re}attachCustomWheelEventHandler(re){this._customWheelEventHandler=re}registerLinkProvider(re){return this._linkProviderService.registerLinkProvider(re)}registerCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const q=this._characterJoinerService.register(re);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(re)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(re){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+re)}registerDecoration(re){return this._decorationService.registerDecoration(re)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(re,q,oe){this._selectionService.setSelection(re,q,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 re;(re=this._selectionService)==null||re.clearSelection()}selectAll(){var re;(re=this._selectionService)==null||re.selectAll()}selectLines(re,q){var oe;(oe=this._selectionService)==null||oe.selectLines(re,q)}_keyDown(re){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&re.altKey;if(!q&&!this._compositionHelper.keydown(re))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||re.key!=="Dead"&&re.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,J.evaluateKeyboardEvent)(re,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(re),oe.type===3||oe.type===2){const ce=this.rows-1;return this.scrollLines(oe.type===2?-ce:ce),this.cancel(re,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,re)||(oe.cancel&&this.cancel(re,!0),!oe.key||!!(re.key&&!re.ctrlKey&&!re.altKey&&!re.metaKey&&re.key.length===1&&re.key.charCodeAt(0)>=65&&re.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==X.C0.ETX&&oe.key!==X.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||re.altKey||re.ctrlKey?this.cancel(re,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(re,q){const oe=re.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||re.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||re.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?oe:oe&&(!q.keyCode||q.keyCode>47)}_keyUp(re){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(re)||this.focus(),this.updateCursorStyle(re),this._keyPressHandled=!1)}_keyPress(re){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;if(this.cancel(re),re.charCode)q=re.charCode;else if(re.which===null||re.which===void 0)q=re.keyCode;else{if(re.which===0||re.charCode===0)return!1;q=re.which}return!(!q||(re.altKey||re.ctrlKey||re.metaKey)&&!this._isThirdLevelShift(this.browser,re)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(re){if(re.data&&re.inputType==="insertText"&&(!re.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const q=re.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(re),!0}return!1}resize(re,q){re!==this.cols||q!==this.rows?super.resize(re,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(re,q){var oe,ce;(oe=this._charSizeService)==null||oe.measure(),(ce=this.viewport)==null||ce.syncScrollArea(!0)}clear(){var re;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let q=1;q{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(c,d=1e3){this._renderCallback=c,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,d,_){this._rowCount=_,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=h-this._lastRefreshMs,g=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),g)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d)}}},1680:function(l,o,c){var d=this&&this.__decorate||function(v,x,y,C){var j,N=arguments.length,T=N<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(v,x,y,C);else for(var z=v.length-1;z>=0;z--)(j=v[z])&&(T=(N<3?j(T):N>3?j(x,y,T):j(x,y))||T);return N>3&&T&&Object.defineProperty(x,y,T),T},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const h=c(3656),m=c(4725),g=c(8460),S=c(844),k=c(2585);let b=o.Viewport=class extends S.Disposable{constructor(v,x,y,C,j,N,T,z){super(),this._viewportElement=v,this._scrollArea=x,this._bufferService=y,this._optionsService=C,this._charSizeService=j,this._renderService=N,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 g.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((D=>this._activeBuffer=D.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((D=>this._renderDimensions=D))),this._handleThemeChange(z.colors),this.register(z.onChangeColors((D=>this._handleThemeChange(D)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(v){this._viewportElement.style.backgroundColor=v.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(v){if(v)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const x=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==x&&(this._lastRecordedBufferHeight=x,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const v=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==v&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=v),this._refreshAnimationFrame=null}syncScrollArea(v=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(v);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(v)}_handleScroll(v){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const x=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:x,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const v=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(v*(this._smoothScrollState.target-this._smoothScrollState.origin)),v<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(v,x){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(x<0&&this._viewportElement.scrollTop!==0||x>0&&y0&&(y=P),C=""}}return{bufferElements:j,cursorElement:y}}getLinesScrolled(v){if(v.deltaY===0||v.shiftKey)return 0;let x=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(x/=this._currentRowHeight+0,this._wheelPartialScroll+=x,x=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(x*=this._bufferService.rows),x}_applyScrollModifier(v,x){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&x.altKey||y==="ctrl"&&x.ctrlKey||y==="shift"&&x.shiftKey?v*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:v*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(v){this._lastTouchY=v.touches[0].pageY}handleTouchMove(v){const x=this._lastTouchY-v.touches[0].pageY;return this._lastTouchY=v.touches[0].pageY,x!==0&&(this._viewportElement.scrollTop+=x,this._bubbleScroll(v,x))}};o.Viewport=b=d([_(2,k.IBufferService),_(3,k.IOptionsService),_(4,m.ICharSizeService),_(5,m.IRenderService),_(6,m.ICoreBrowserService),_(7,m.IThemeService)],b)},3107:function(l,o,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,j=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(k,b,v,x);else for(var N=k.length-1;N>=0;N--)(y=k[N])&&(j=(C<3?y(j):C>3?y(b,v,j):y(b,v))||j);return C>3&&j&&Object.defineProperty(b,v,j),j},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const h=c(4725),m=c(844),g=c(2585);let S=o.BufferDecorationRenderer=class extends m.Disposable{constructor(k,b,v,x,y){super(),this._screenElement=k,this._bufferService=b,this._coreBrowserService=v,this._decorationService=x,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,m.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 x;const b=this._coreBrowserService.mainDocument.createElement("div");b.classList.add("xterm-decoration"),b.classList.toggle("xterm-decoration-top-layer",((x=k==null?void 0:k.options)==null?void 0:x.layer)==="top"),b.style.width=`${Math.round((k.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,b.style.height=(k.options.height||1)*this._renderService.dimensions.css.cell.height+"px",b.style.top=(k.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",b.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const v=k.options.x??0;return v&&v>this._bufferService.cols&&(b.style.display="none"),this._refreshXPosition(k,b),b}_refreshStyle(k){const b=k.marker.line-this._bufferService.buffers.active.ydisp;if(b<0||b>=this._bufferService.rows)k.element&&(k.element.style.display="none",k.onRenderEmitter.fire(k.element));else{let v=this._decorationElements.get(k);v||(v=this._createElement(k),k.element=v,this._decorationElements.set(k,v),this._container.appendChild(v),k.onDispose((()=>{this._decorationElements.delete(k),v.remove()}))),v.style.top=b*this._renderService.dimensions.css.cell.height+"px",v.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(v)}}_refreshXPosition(k,b=k.element){if(!b)return;const v=k.options.x??0;(k.options.anchor||"left")==="right"?b.style.right=v?v*this._renderService.dimensions.css.cell.width+"px":"":b.style.left=v?v*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(k){var b;(b=this._decorationElements.get(k))==null||b.remove(),this._decorationElements.delete(k),k.dispose()}};o.BufferDecorationRenderer=S=d([_(1,g.IBufferService),_(2,h.ICoreBrowserService),_(3,g.IDecorationService),_(4,h.IRenderService)],S)},5871:(l,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 d of this._zones)if(d.color===c.options.overviewRulerOptions.color&&d.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,c.marker.line))return;if(this._lineAdjacentToZone(d,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(d,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&d<=c.endBufferLine}_lineAdjacentToZone(c,d,_){return d>=c.startBufferLine-this._linePadding[_||"full"]&&d<=c.endBufferLine+this._linePadding[_||"full"]}_addLineToZone(c,d){c.startBufferLine=Math.min(c.startBufferLine,d),c.endBufferLine=Math.max(c.endBufferLine,d)}}},5744:function(l,o,c){var d=this&&this.__decorate||function(y,C,j,N){var T,z=arguments.length,D=z<3?C:N===null?N=Object.getOwnPropertyDescriptor(C,j):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,C,j,N);else for(var O=y.length-1;O>=0;O--)(T=y[O])&&(D=(z<3?T(D):z>3?T(C,j,D):T(C,j))||D);return z>3&&D&&Object.defineProperty(C,j,D),D},_=this&&this.__param||function(y,C){return function(j,N){C(j,N,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const h=c(5871),m=c(4725),g=c(844),S=c(2585),k={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0};let x=o.OverviewRulerRenderer=class extends g.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,C,j,N,T,z,D){var H;super(),this._viewportElement=y,this._screenElement=C,this._bufferService=j,this._decorationService=N,this._renderService=T,this._optionsService=z,this._coreBrowserService=D,this._colorZoneStore=new h.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(),(H=this._viewportElement.parentElement)==null||H.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,g.toDisposable)((()=>{var P;(P=this._canvas)==null||P.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);b.full=this._canvas.width,b.left=y,b.center=C,b.right=y,this._refreshDrawHeightConstants(),v.full=0,v.left=0,v.center=b.left,v.right=b.left+b.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(v[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-k[y.position||"full"]/2),b[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=x=d([_(2,S.IBufferService),_(3,S.IDecorationService),_(4,m.IRenderService),_(5,S.IOptionsService),_(6,m.ICoreBrowserService)],x)},2950:function(l,o,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,j=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(k,b,v,x);else for(var N=k.length-1;N>=0;N--)(y=k[N])&&(j=(C<3?y(j):C>3?y(b,v,j):y(b,v))||j);return C>3&&j&&Object.defineProperty(b,v,j),j},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const h=c(4725),m=c(2585),g=c(2584);let S=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(k,b,v,x,y,C){this._textarea=k,this._compositionView=b,this._bufferService=v,this._optionsService=x,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 b={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let v;this._isSendingComposition=!1,b.start+=this._dataAlreadySent.length,v=this._isComposing?this._textarea.value.substring(b.start,b.end):this._textarea.value.substring(b.start),v.length>0&&this._coreService.triggerDataEvent(v,!0)}}),0)}else{this._isSendingComposition=!1;const b=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(b,!0)}}_handleAnyTextareaChanges(){const k=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const b=this._textarea.value,v=b.replace(k,"");this._dataAlreadySent=v,b.length>k.length?this._coreService.triggerDataEvent(v,!0):b.lengththis.updateCompositionElements(!0)),0)}}};o.CompositionHelper=S=d([_(2,m.IBufferService),_(3,m.IOptionsService),_(4,m.ICoreService),_(5,h.IRenderService)],S)},9806:(l,o)=>{function c(d,_,h){const m=h.getBoundingClientRect(),g=d.getComputedStyle(h),S=parseInt(g.getPropertyValue("padding-left")),k=parseInt(g.getPropertyValue("padding-top"));return[_.clientX-m.left-S,_.clientY-m.top-k]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(d,_,h,m,g,S,k,b,v){if(!S)return;const x=c(d,_,h);return x?(x[0]=Math.ceil((x[0]+(v?k/2:0))/k),x[1]=Math.ceil(x[1]/b),x[0]=Math.min(Math.max(x[0],1),m+(v?1:0)),x[1]=Math.min(Math.max(x[1],1),g),x):void 0}},9504:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const d=c(2584);function _(b,v,x,y){const C=b-h(b,x),j=v-h(v,x),N=Math.abs(C-j)-(function(T,z,D){let O=0;const H=T-h(T,D),P=z-h(z,D);for(let F=0;F=0&&bv?"A":"B"}function g(b,v,x,y,C,j){let N=b,T=v,z="";for(;N!==x||T!==y;)N+=C?1:-1,C&&N>j.cols-1?(z+=j.buffer.translateBufferLineToString(T,!1,b,N),N=0,b=0,T++):!C&&N<0&&(z+=j.buffer.translateBufferLineToString(T,!1,0,b+1),N=j.cols-1,b=N,T--);return z+j.buffer.translateBufferLineToString(T,!1,b,N)}function S(b,v){const x=v?"O":"[";return d.C0.ESC+x+b}function k(b,v){b=Math.floor(b);let x="";for(let y=0;y0?H-h(H,P):D;const Z=H,U=(function(X,J,$,L,B,Y){let V;return V=_($,L,B,Y).length>0?L-h(L,B):J,X<$&&V<=L||X>=$&&Vb?"D":"C",k(Math.abs(C-b),S(N,y));N=j>v?"D":"C";const T=Math.abs(j-v);return k((function(z,D){return D.cols-z})(j>v?b:C,x)+(T-1)*x.cols+1+((j>v?C:b)-1),S(N,y))}},1296:function(l,o,c){var d=this&&this.__decorate||function(F,W,Z,U){var X,J=arguments.length,$=J<3?W:U===null?U=Object.getOwnPropertyDescriptor(W,Z):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(F,W,Z,U);else for(var L=F.length-1;L>=0;L--)(X=F[L])&&($=(J<3?X($):J>3?X(W,Z,$):X(W,Z))||$);return J>3&&$&&Object.defineProperty(W,Z,$),$},_=this&&this.__param||function(F,W){return function(Z,U){W(Z,U,F)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const h=c(3787),m=c(2550),g=c(2223),S=c(6171),k=c(6052),b=c(4725),v=c(8055),x=c(8460),y=c(844),C=c(2585),j="xterm-dom-renderer-owner-",N="xterm-rows",T="xterm-fg-",z="xterm-bg-",D="xterm-focus",O="xterm-selection";let H=1,P=o.DomRenderer=class extends y.Disposable{constructor(F,W,Z,U,X,J,$,L,B,Y,V,ie,le){super(),this._terminal=F,this._document=W,this._element=Z,this._screenElement=U,this._viewportElement=X,this._helperContainer=J,this._linkifier2=$,this._charSizeService=B,this._optionsService=Y,this._bufferService=V,this._coreBrowserService=ie,this._themeService=le,this._terminalClass=H++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new x.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(N),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(O),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,S.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ae=>this._injectCss(ae)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(j+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ae=>this._handleLinkHover(ae)))),this.register(this._linkifier2.onHideLinkUnderline((ae=>this._handleLinkLeave(ae)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(j+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new m.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 F=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*F,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*F),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/F),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/F),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 Z of this._rowElements)Z.style.width=`${this.dimensions.css.canvas.width}px`,Z.style.height=`${this.dimensions.css.cell.height}px`,Z.style.lineHeight=`${this.dimensions.css.cell.height}px`,Z.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const W=`${this._terminalSelector} .${N} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=W,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(F){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let W=`${this._terminalSelector} .${N} { color: ${F.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;W+=`${this._terminalSelector} .${N} .xterm-dim { color: ${v.color.multiplyOpacity(F.foreground,.5).css};}`,W+=`${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 Z=`blink_underline_${this._terminalClass}`,U=`blink_bar_${this._terminalClass}`,X=`blink_block_${this._terminalClass}`;W+=`@keyframes ${Z} { 50% { border-bottom-style: hidden; }}`,W+=`@keyframes ${U} { 50% { box-shadow: none; }}`,W+=`@keyframes ${X} { 0% { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css}; } 50% { background-color: inherit; color: ${F.cursor.css}; }}`,W+=`${this._terminalSelector} .${N}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${N}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${N}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-block { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css};}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${F.cursor.css} !important; color: ${F.cursorAccent.css} !important;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${F.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${F.cursor.css} inset;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${F.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,W+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${F.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${F.selectionInactiveBackgroundOpaque.css};}`;for(const[J,$]of F.ansi.entries())W+=`${this._terminalSelector} .${T}${J} { color: ${$.css}; }${this._terminalSelector} .${T}${J}.xterm-dim { color: ${v.color.multiplyOpacity($,.5).css}; }${this._terminalSelector} .${z}${J} { background-color: ${$.css}; }`;W+=`${this._terminalSelector} .${T}${g.INVERTED_DEFAULT_COLOR} { color: ${v.color.opaque(F.background).css}; }${this._terminalSelector} .${T}${g.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${v.color.multiplyOpacity(v.color.opaque(F.background),.5).css}; }${this._terminalSelector} .${z}${g.INVERTED_DEFAULT_COLOR} { background-color: ${F.foreground.css}; }`,this._themeStyleElement.textContent=W}_setDefaultSpacing(){const F=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${F}px`,this._rowFactory.defaultSpacing=F}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(F,W){for(let Z=this._rowElements.length;Z<=W;Z++){const U=this._document.createElement("div");this._rowContainer.appendChild(U),this._rowElements.push(U)}for(;this._rowElements.length>W;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(F,W){this._refreshRowElements(F,W),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(D),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(D),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(F,W,Z){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(F,W,Z),this.renderRows(0,this._bufferService.rows-1),!F||!W)return;this._selectionRenderModel.update(this._terminal,F,W,Z);const U=this._selectionRenderModel.viewportStartRow,X=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,$=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||$<0)return;const L=this._document.createDocumentFragment();if(Z){const B=F[0]>W[0];L.appendChild(this._createSelectionElement(J,B?W[0]:F[0],B?F[0]:W[0],$-J+1))}else{const B=U===J?F[0]:0,Y=J===X?W[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(J,B,Y));const V=$-J-1;if(L.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,V)),J!==$){const ie=X===$?W[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement($,0,ie))}}this._selectionContainer.appendChild(L)}_createSelectionElement(F,W,Z,U=1){const X=this._document.createElement("div"),J=W*this.dimensions.css.cell.width;let $=this.dimensions.css.cell.width*(Z-W);return J+$>this.dimensions.css.canvas.width&&($=this.dimensions.css.canvas.width-J),X.style.height=U*this.dimensions.css.cell.height+"px",X.style.top=F*this.dimensions.css.cell.height+"px",X.style.left=`${J}px`,X.style.width=`${$}px`,X}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const F of this._rowElements)F.replaceChildren()}renderRows(F,W){const Z=this._bufferService.buffer,U=Z.ybase+Z.y,X=Math.min(Z.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=F;B<=W;B++){const Y=B+Z.ydisp,V=this._rowElements[B],ie=Z.lines.get(Y);if(!V||!ie)break;V.replaceChildren(...this._rowFactory.createRow(ie,Y,Y===U,$,L,X,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${j}${this._terminalClass}`}_handleLinkHover(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!0)}_handleLinkLeave(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!1)}_setCellUnderline(F,W,Z,U,X,J){Z<0&&(F=0),U<0&&(W=0);const $=this._bufferService.rows-1;Z=Math.max(Math.min(Z,$),0),U=Math.max(Math.min(U,$),0),X=Math.min(X,this._bufferService.cols);const L=this._bufferService.buffer,B=L.ybase+L.y,Y=Math.min(L.x,X-1),V=this._optionsService.rawOptions.cursorBlink,ie=this._optionsService.rawOptions.cursorStyle,le=this._optionsService.rawOptions.cursorInactiveStyle;for(let ae=Z;ae<=U;++ae){const re=ae+L.ydisp,q=this._rowElements[ae],oe=L.lines.get(re);if(!q||!oe)break;q.replaceChildren(...this._rowFactory.createRow(oe,re,re===B,ie,le,Y,V,this.dimensions.css.cell.width,this._widthCache,J?ae===Z?F:0:-1,J?(ae===U?W:X)-1:-1))}}};o.DomRenderer=P=d([_(7,C.IInstantiationService),_(8,b.ICharSizeService),_(9,C.IOptionsService),_(10,C.IBufferService),_(11,b.ICoreBrowserService),_(12,b.IThemeService)],P)},3787:function(l,o,c){var d=this&&this.__decorate||function(N,T,z,D){var O,H=arguments.length,P=H<3?T:D===null?D=Object.getOwnPropertyDescriptor(T,z):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(N,T,z,D);else for(var F=N.length-1;F>=0;F--)(O=N[F])&&(P=(H<3?O(P):H>3?O(T,z,P):O(T,z))||P);return H>3&&P&&Object.defineProperty(T,z,P),P},_=this&&this.__param||function(N,T){return function(z,D){T(z,D,N)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const h=c(2223),m=c(643),g=c(511),S=c(2585),k=c(8055),b=c(4725),v=c(4269),x=c(6171),y=c(3734);let C=o.DomRendererRowFactory=class{constructor(N,T,z,D,O,H,P){this._document=N,this._characterJoinerService=T,this._optionsService=z,this._coreBrowserService=D,this._coreService=O,this._decorationService=H,this._themeService=P,this._workCell=new g.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(N,T,z){this._selectionStart=N,this._selectionEnd=T,this._columnSelectMode=z}createRow(N,T,z,D,O,H,P,F,W,Z,U){const X=[],J=this._characterJoinerService.getJoinedCharacters(T),$=this._themeService.colors;let L,B=N.getNoBgTrimmedLength();z&&B0&&ve===J[0][0]){Le=!0;const bt=J.shift();He=new v.JoinedCellData(this._workCell,N.translateToString(!0,bt[0],bt[1]),bt[1]-bt[0]),Ue=bt[1]-1,Ce=He.getWidth()}const Bt=this._isCellInSelection(ve,T),Et=z&&ve===H,Nt=de&&ve>=Z&&ve<=U;let cn=!1;this._decorationService.forEachDecorationAtCell(ve,T,void 0,(bt=>{cn=!0}));let vt=He.getChars()||m.WHITESPACE_CELL_CHAR;if(vt===" "&&(He.isUnderline()||He.isOverline())&&(vt=" "),ce=Ce*F-W.get(vt,He.isBold(),He.isItalic()),L){if(Y&&(Bt&&oe||!Bt&&!oe&&He.bg===ie)&&(Bt&&oe&&$.selectionForeground||He.fg===le)&&He.extended.ext===ae&&Nt===re&&ce===q&&!Et&&!Le&&!cn){He.isInvisible()?V+=m.WHITESPACE_CELL_CHAR:V+=vt,Y++;continue}Y&&(L.textContent=V),L=this._document.createElement("span"),Y=0,V=""}else L=this._document.createElement("span");if(ie=He.bg,le=He.fg,ae=He.extended.ext,re=Nt,q=ce,oe=Bt,Le&&H>=ve&&H<=Ue&&(H=ve),!this._coreService.isCursorHidden&&Et&&this._coreService.isCursorInitialized){if(_e.push("xterm-cursor"),this._coreBrowserService.isFocused)P&&_e.push("xterm-cursor-blink"),_e.push(D==="bar"?"xterm-cursor-bar":D==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":_e.push("xterm-cursor-outline");break;case"block":_e.push("xterm-cursor-block");break;case"bar":_e.push("xterm-cursor-bar");break;case"underline":_e.push("xterm-cursor-underline")}}if(He.isBold()&&_e.push("xterm-bold"),He.isItalic()&&_e.push("xterm-italic"),He.isDim()&&_e.push("xterm-dim"),V=He.isInvisible()?m.WHITESPACE_CELL_CHAR:He.getChars()||m.WHITESPACE_CELL_CHAR,He.isUnderline()&&(_e.push(`xterm-underline-${He.extended.underlineStyle}`),V===" "&&(V=" "),!He.isUnderlineColorDefault()))if(He.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(He.getUnderlineColor()).join(",")})`;else{let bt=He.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&He.isBold()&&bt<8&&(bt+=8),L.style.textDecorationColor=$.ansi[bt].css}He.isOverline()&&(_e.push("xterm-overline"),V===" "&&(V=" ")),He.isStrikethrough()&&_e.push("xterm-strikethrough"),Nt&&(L.style.textDecoration="underline");let rt=He.getFgColor(),Je=He.getFgColorMode(),qt=He.getBgColor(),we=He.getBgColorMode();const Oe=!!He.isInverse();if(Oe){const bt=rt;rt=qt,qt=bt;const Rt=Je;Je=we,we=Rt}let Xe,st,tt,zt=!1;switch(this._decorationService.forEachDecorationAtCell(ve,T,void 0,(bt=>{bt.options.layer!=="top"&&zt||(bt.backgroundColorRGB&&(we=50331648,qt=bt.backgroundColorRGB.rgba>>8&16777215,Xe=bt.backgroundColorRGB),bt.foregroundColorRGB&&(Je=50331648,rt=bt.foregroundColorRGB.rgba>>8&16777215,st=bt.foregroundColorRGB),zt=bt.options.layer==="top")})),!zt&&Bt&&(Xe=this._coreBrowserService.isFocused?$.selectionBackgroundOpaque:$.selectionInactiveBackgroundOpaque,qt=Xe.rgba>>8&16777215,we=50331648,zt=!0,$.selectionForeground&&(Je=50331648,rt=$.selectionForeground.rgba>>8&16777215,st=$.selectionForeground)),zt&&_e.push("xterm-decoration-top"),we){case 16777216:case 33554432:tt=$.ansi[qt],_e.push(`xterm-bg-${qt}`);break;case 50331648:tt=k.channels.toColor(qt>>16,qt>>8&255,255&qt),this._addStyle(L,`background-color:#${j((qt>>>0).toString(16),"0",6)}`);break;default:Oe?(tt=$.foreground,_e.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):tt=$.background}switch(Xe||He.isDim()&&(Xe=k.color.multiplyOpacity(tt,.5)),Je){case 16777216:case 33554432:He.isBold()&&rt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(rt+=8),this._applyMinimumContrast(L,tt,$.ansi[rt],He,Xe,void 0)||_e.push(`xterm-fg-${rt}`);break;case 50331648:const bt=k.channels.toColor(rt>>16&255,rt>>8&255,255&rt);this._applyMinimumContrast(L,tt,bt,He,Xe,st)||this._addStyle(L,`color:#${j(rt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,tt,$.foreground,He,Xe,st)||Oe&&_e.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}_e.length&&(L.className=_e.join(" "),_e.length=0),Et||Le||cn?L.textContent=V:Y++,ce!==this.defaultSpacing&&(L.style.letterSpacing=`${ce}px`),X.push(L),ve=Ue}return L&&Y&&(L.textContent=V),X}_applyMinimumContrast(N,T,z,D,O,H){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,x.treatGlyphAsBackgroundColor)(D.getCode()))return!1;const P=this._getContrastCache(D);let F;if(O||H||(F=P.getColor(T.rgba,z.rgba)),F===void 0){const W=this._optionsService.rawOptions.minimumContrastRatio/(D.isDim()?2:1);F=k.color.ensureContrastRatio(O||T,H||z,W),P.setColor((O||T).rgba,(H||z).rgba,F??null)}return!!F&&(this._addStyle(N,`color:${F.css}`),!0)}_getContrastCache(N){return N.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(N,T){N.setAttribute("style",`${N.getAttribute("style")||""}${T};`)}_isCellInSelection(N,T){const z=this._selectionStart,D=this._selectionEnd;return!(!z||!D)&&(this._columnSelectMode?z[0]<=D[0]?N>=z[0]&&T>=z[1]&&N=z[1]&&N>=D[0]&&T<=D[1]:T>z[1]&&T=z[0]&&N=z[0])}};function j(N,T,z){for(;N.length{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(c,d){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 _=c.createElement("span");_.classList.add("xterm-char-measure-element");const h=c.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const g=c.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontWeight="bold",g.style.fontStyle="italic",this._measureElements=[_,h,m,g],this._container.appendChild(_),this._container.appendChild(h),this._container.appendChild(m),this._container.appendChild(g),d.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,d,_,h){c===this._font&&d===this._fontSize&&_===this._weight&&h===this._weightBold||(this._font=c,this._fontSize=d,this._weight=_,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${_}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${_}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(c,d,_){let h=0;if(!d&&!_&&c.length===1&&(h=c.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const S=this._measure(c,0);return S>0&&(this._flat[h]=S),S}let m=c;d&&(m+="B"),_&&(m+="I");let g=this._holey.get(m);if(g===void 0){let S=0;d&&(S|=1),_&&(S|=2),g=this._measure(c,S),g>0&&this._holey.set(m,g)}return g}_measure(c,d){const _=this._measureElements[d];return _.textContent=c.repeat(32),_.offsetWidth/32}}},2223:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const d=c(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(l,o)=>{function c(_){return 57508<=_&&_<=57558}function d(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},o.isEmoji=d,o.allowRescaling=function(_,h,m,g){return h===1&&m>Math.ceil(1.5*g)&&_!==void 0&&_>255&&!d(_)&&!c(_)&&!(function(S){return 57344<=S&&S<=63743})(_)},o.treatGlyphAsBackgroundColor=function(_){return c(_)||(function(h){return 9472<=h&&h<=9631})(_)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},o.computeNextVariantOffset=function(_,h,m=0){return(_-(2*Math.round(h)-m))%(2*Math.round(h))}},6052:(l,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,m,g=!1){if(this.selectionStart=h,this.selectionEnd=m,!h||!m||h[0]===m[0]&&h[1]===m[1])return void this.clear();const S=_.buffers.active.ydisp,k=h[1]-S,b=m[1]-S,v=Math.max(k,0),x=Math.min(b,_.rows-1);v>=_.rows||x<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=g,this.viewportStartRow=k,this.viewportEndRow=b,this.viewportCappedStartRow=v,this.viewportCappedEndRow=x,this.startCol=h[0],this.endCol=m[0])}isCellSelected(_,h,m){return!!this.hasSelection&&(m-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&m>=this.viewportCappedStartRow&&h=this.viewportCappedStartRow&&h>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m=this.startCol&&h=this.startCol)}}o.createSelectionRenderModel=function(){return new c}},456:(l,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,d=this.selectionEnd;return!(!c||!d)&&(c[1]>d[1]||c[1]===d[1]&&c[0]>d[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(l,o,c){var d=this&&this.__decorate||function(x,y,C,j){var N,T=arguments.length,z=T<3?y:j===null?j=Object.getOwnPropertyDescriptor(y,C):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,y,C,j);else for(var D=x.length-1;D>=0;D--)(N=x[D])&&(z=(T<3?N(z):T>3?N(y,C,z):N(y,C))||z);return T>3&&z&&Object.defineProperty(y,C,z),z},_=this&&this.__param||function(x,y){return function(C,j){y(C,j,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const h=c(2585),m=c(8460),g=c(844);let S=o.CharSizeService=class extends g.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(x,y,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new v(this._optionsService))}catch{this._measureStrategy=this.register(new b(x,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const x=this._measureStrategy.measure();x.width===this.width&&x.height===this.height||(this.width=x.width,this.height=x.height,this._onCharSizeChange.fire())}};o.CharSizeService=S=d([_(2,h.IOptionsService)],S);class k extends g.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 b extends k{constructor(y,C,j){super(),this._document=y,this._parentElement=C,this._optionsService=j,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class v extends 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(l,o,c){var d=this&&this.__decorate||function(v,x,y,C){var j,N=arguments.length,T=N<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(v,x,y,C);else for(var z=v.length-1;z>=0;z--)(j=v[z])&&(T=(N<3?j(T):N>3?j(x,y,T):j(x,y))||T);return N>3&&T&&Object.defineProperty(x,y,T),T},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const h=c(3734),m=c(643),g=c(511),S=c(2585);class k extends h.AttributeData{constructor(x,y,C){super(),this.content=0,this.combinedData="",this.fg=x.fg,this.bg=x.bg,this.combinedData=y,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(x){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=k;let b=o.CharacterJoinerService=class CT{constructor(x){this._bufferService=x,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new g.CellData}register(x){const y={id:this._nextCharacterJoinerId++,handler:x};return this._characterJoiners.push(y),y.id}deregister(x){for(let y=0;y1){const P=this._getJoinedRanges(j,z,T,y,N);for(let F=0;F1){const H=this._getJoinedRanges(j,z,T,y,N);for(let P=0;P{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const d=c(844),_=c(8460),h=c(3656);class m extends d.Disposable{constructor(k,b,v){super(),this._textarea=k,this._window=b,this.mainDocument=v,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new g(this._window),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new _.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((x=>this._screenDprMonitor.setWindow(x)))),this.register((0,_.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(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=m;class g extends d.Disposable{constructor(k){super(),this._parentWindow=k,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(k){this._parentWindow=k,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.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:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const d=c(844);class _ extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const g=this.linkProviders.indexOf(m);g!==-1&&this.linkProviders.splice(g,1)}}}}o.LinkProviderService=_},8934:function(l,o,c){var d=this&&this.__decorate||function(S,k,b,v){var x,y=arguments.length,C=y<3?k:v===null?v=Object.getOwnPropertyDescriptor(k,b):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(S,k,b,v);else for(var j=S.length-1;j>=0;j--)(x=S[j])&&(C=(y<3?x(C):y>3?x(k,b,C):x(k,b))||C);return y>3&&C&&Object.defineProperty(k,b,C),C},_=this&&this.__param||function(S,k){return function(b,v){k(b,v,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const h=c(4725),m=c(9806);let g=o.MouseService=class{constructor(S,k){this._renderService=S,this._charSizeService=k}getCoords(S,k,b,v,x){return(0,m.getCoords)(window,S,k,b,v,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,x)}getMouseReportCoords(S,k){const b=(0,m.getCoordsRelativeToElement)(window,S,k);if(this._charSizeService.hasValidSize)return b[0]=Math.min(Math.max(b[0],0),this._renderService.dimensions.css.canvas.width-1),b[1]=Math.min(Math.max(b[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(b[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(b[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(b[0]),y:Math.floor(b[1])}}};o.MouseService=g=d([_(0,h.IRenderService),_(1,h.ICharSizeService)],g)},3230:function(l,o,c){var d=this&&this.__decorate||function(x,y,C,j){var N,T=arguments.length,z=T<3?y:j===null?j=Object.getOwnPropertyDescriptor(y,C):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,y,C,j);else for(var D=x.length-1;D>=0;D--)(N=x[D])&&(z=(T<3?N(z):T>3?N(y,C,z):N(y,C))||z);return T>3&&z&&Object.defineProperty(y,C,z),z},_=this&&this.__param||function(x,y){return function(C,j){y(C,j,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const h=c(6193),m=c(4725),g=c(8460),S=c(844),k=c(7226),b=c(2585);let v=o.RenderService=class extends S.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(x,y,C,j,N,T,z,D){super(),this._rowCount=x,this._charSizeService=j,this._renderer=this.register(new S.MutableDisposable),this._pausedResizeTask=new k.DebouncedIdleTask,this._observerDisposable=this.register(new S.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 g.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new g.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new g.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new g.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer(((O,H)=>this._renderRows(O,H)),z),this.register(this._renderDebouncer),this.register(z.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(T.onResize((()=>this._fullRefresh()))),this.register(T.buffers.onBufferActivate((()=>{var O;return(O=this._renderer.value)==null?void 0:O.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(N.onDecorationRegistered((()=>this._fullRefresh()))),this.register(N.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(D.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(z.window,y),this.register(z.onWindowChange((O=>this._registerIntersectionObserver(O,y))))}_registerIntersectionObserver(x,y){if("IntersectionObserver"in x){const C=new x.IntersectionObserver((j=>this._handleIntersectionChange(j[j.length-1])),{threshold:0});C.observe(y),this._observerDisposable.value=(0,S.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(x){this._isPaused=x.isIntersecting===void 0?x.intersectionRatio===0:!x.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(x,y,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(x,y,this._rowCount))}_renderRows(x,y){this._renderer.value&&(x=Math.min(x,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(x,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:x,end:y}),this._onRender.fire({start:x,end:y}),this._isNextRenderRedrawOnly=!0)}resize(x,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(x){this._renderer.value=x,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(x){return this._renderDebouncer.addRefreshCallback(x)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var x,y;this._renderer.value&&((y=(x=this._renderer.value).clearTextureAtlas)==null||y.call(x),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(x,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(x,y)})):this._renderer.value.handleResize(x,y),this._fullRefresh())}handleCharSizeChanged(){var x;(x=this._renderer.value)==null||x.handleCharSizeChanged()}handleBlur(){var x;(x=this._renderer.value)==null||x.handleBlur()}handleFocus(){var x;(x=this._renderer.value)==null||x.handleFocus()}handleSelectionChanged(x,y,C){var j;this._selectionState.start=x,this._selectionState.end=y,this._selectionState.columnSelectMode=C,(j=this._renderer.value)==null||j.handleSelectionChanged(x,y,C)}handleCursorMove(){var x;(x=this._renderer.value)==null||x.handleCursorMove()}clear(){var x;(x=this._renderer.value)==null||x.clear()}};o.RenderService=v=d([_(2,b.IOptionsService),_(3,m.ICharSizeService),_(4,b.IDecorationService),_(5,b.IBufferService),_(6,m.ICoreBrowserService),_(7,m.IThemeService)],v)},9312:function(l,o,c){var d=this&&this.__decorate||function(z,D,O,H){var P,F=arguments.length,W=F<3?D:H===null?H=Object.getOwnPropertyDescriptor(D,O):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(z,D,O,H);else for(var Z=z.length-1;Z>=0;Z--)(P=z[Z])&&(W=(F<3?P(W):F>3?P(D,O,W):P(D,O))||W);return F>3&&W&&Object.defineProperty(D,O,W),W},_=this&&this.__param||function(z,D){return function(O,H){D(O,H,z)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const h=c(9806),m=c(9504),g=c(456),S=c(4725),k=c(8460),b=c(844),v=c(6114),x=c(4841),y=c(511),C=c(2585),j=" ",N=new RegExp(j,"g");let T=o.SelectionService=class extends b.Disposable{constructor(z,D,O,H,P,F,W,Z,U){super(),this._element=z,this._screenElement=D,this._linkifier=O,this._bufferService=H,this._coreService=P,this._mouseService=F,this._optionsService=W,this._renderService=Z,this._coreBrowserService=U,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=X=>this._handleMouseMove(X),this._mouseUpListener=X=>this._handleMouseUp(X),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((X=>this._handleTrim(X))),this.register(this._bufferService.buffers.onBufferActivate((X=>this._handleBufferActivate(X)))),this.enable(),this._model=new g.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,b.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const z=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!z||!D||z[0]===D[0]&&z[1]===D[1])}get selectionText(){const z=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;if(!z||!D)return"";const O=this._bufferService.buffer,H=[];if(this._activeSelectionMode===3){if(z[0]===D[0])return"";const P=z[0]P.replace(N," "))).join(v.isWindows?`\r +`:` +`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(z){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),v.isLinux&&z&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(z){const D=this._getMouseBufferCoords(z),O=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!!(O&&H&&D)&&this._areCoordsInSelection(D,O,H)}isCellInSelection(z,D){const O=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!(!O||!H)&&this._areCoordsInSelection([z,D],O,H)}_areCoordsInSelection(z,D,O){return z[1]>D[1]&&z[1]=D[0]&&z[0]=D[0]}_selectWordAtCursor(z,D){var P,F;const O=(F=(P=this._linkifier.currentLink)==null?void 0:P.link)==null?void 0:F.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,x.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const H=this._getMouseBufferCoords(z);return!!H&&(this._selectWordAt(H,D),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(z,D){this._model.clearSelection(),z=Math.max(z,0),D=Math.min(D,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,z],this._model.selectionEnd=[this._bufferService.cols,D],this.refresh(),this._onSelectionChange.fire()}_handleTrim(z){this._model.handleTrim(z)&&this.refresh()}_getMouseBufferCoords(z){const D=this._mouseService.getCoords(z,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(D)return D[0]--,D[1]--,D[1]+=this._bufferService.buffer.ydisp,D}_getMouseEventScrollAmount(z){let D=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,z,this._screenElement)[1];const O=this._renderService.dimensions.css.canvas.height;return D>=0&&D<=O?0:(D>O&&(D-=O),D=Math.min(Math.max(D,-50),50),D/=50,D/Math.abs(D)+Math.round(14*D))}shouldForceSelection(z){return v.isMac?z.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:z.shiftKey}handleMouseDown(z){if(this._mouseDownTimeStamp=z.timeStamp,(z.button!==2||!this.hasSelection)&&z.button===0){if(!this._enabled){if(!this.shouldForceSelection(z))return;z.stopPropagation()}z.preventDefault(),this._dragScrollAmount=0,this._enabled&&z.shiftKey?this._handleIncrementalClick(z):z.detail===1?this._handleSingleClick(z):z.detail===2?this._handleDoubleClick(z):z.detail===3&&this._handleTripleClick(z),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(z){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(z))}_handleSingleClick(z){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(z)?3:0,this._model.selectionStart=this._getMouseBufferCoords(z),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const D=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);D&&D.length!==this._model.selectionStart[0]&&D.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(z){this._selectWordAtCursor(z,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(z){const D=this._getMouseBufferCoords(z);D&&(this._activeSelectionMode=2,this._selectLineAt(D[1]))}shouldColumnSelect(z){return z.altKey&&!(v.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(z){if(z.stopImmediatePropagation(),!this._model.selectionStart)return;const D=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(z),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const O=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(z.ydisp+this._bufferService.rows,z.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=z.ydisp),this.refresh()}}_handleMouseUp(z){const D=z.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&D<500&&z.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(z,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const H=(0,m.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(H,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const z=this._model.finalSelectionStart,D=this._model.finalSelectionEnd,O=!(!z||!D||z[0]===D[0]&&z[1]===D[1]);O?z&&D&&(this._oldSelectionStart&&this._oldSelectionEnd&&z[0]===this._oldSelectionStart[0]&&z[1]===this._oldSelectionStart[1]&&D[0]===this._oldSelectionEnd[0]&&D[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(z,D,O)):this._oldHasSelection&&this._fireOnSelectionChange(z,D,O)}_fireOnSelectionChange(z,D,O){this._oldSelectionStart=z,this._oldSelectionEnd=D,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(z){this.clearSelection(),this._trimListener.dispose(),this._trimListener=z.activeBuffer.lines.onTrim((D=>this._handleTrim(D)))}_convertViewportColToCharacterIndex(z,D){let O=D;for(let H=0;D>=H;H++){const P=z.loadCell(H,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:P>1&&D!==H&&(O+=P-1)}return O}setSelection(z,D,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[z,D],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(z){this._isClickInSelection(z)||(this._selectWordAtCursor(z,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(z,D,O=!0,H=!0){if(z[0]>=this._bufferService.cols)return;const P=this._bufferService.buffer,F=P.lines.get(z[1]);if(!F)return;const W=P.translateBufferLineToString(z[1],!1);let Z=this._convertViewportColToCharacterIndex(F,z[0]),U=Z;const X=z[0]-Z;let J=0,$=0,L=0,B=0;if(W.charAt(Z)===" "){for(;Z>0&&W.charAt(Z-1)===" ";)Z--;for(;U1&&(B+=ae-1,U+=ae-1);ie>0&&Z>0&&!this._isCharWordSeparator(F.loadCell(ie-1,this._workCell));){F.loadCell(ie-1,this._workCell);const re=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,ie--):re>1&&(L+=re-1,Z-=re-1),Z--,ie--}for(;le1&&(B+=re-1,U+=re-1),U++,le++}}U++;let Y=Z+X-J+L,V=Math.min(this._bufferService.cols,U-Z+J+$-L-B);if(D||W.slice(Z,U).trim()!==""){if(O&&Y===0&&F.getCodePoint(0)!==32){const ie=P.lines.get(z[1]-1);if(ie&&F.isWrapped&&ie.getCodePoint(this._bufferService.cols-1)!==32){const le=this._getWordAt([this._bufferService.cols-1,z[1]-1],!1,!0,!1);if(le){const ae=this._bufferService.cols-le.start;Y-=ae,V+=ae}}}if(H&&Y+V===this._bufferService.cols&&F.getCodePoint(this._bufferService.cols-1)!==32){const ie=P.lines.get(z[1]+1);if(ie!=null&&ie.isWrapped&&ie.getCodePoint(0)!==32){const le=this._getWordAt([0,z[1]+1],!1,!1,!0);le&&(V+=le.length)}}return{start:Y,length:V}}}_selectWordAt(z,D){const O=this._getWordAt(z,D);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,z[1]--;this._model.selectionStart=[O.start,z[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(z){const D=this._getWordAt(z,!0);if(D){let O=z[1];for(;D.start<0;)D.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;D.start+D.length>this._bufferService.cols;)D.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?D.start:D.start+D.length,O]}}_isCharWordSeparator(z){return z.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(z.getChars())>=0}_selectLineAt(z){const D=this._bufferService.buffer.getWrappedRangeForLine(z),O={start:{x:0,y:D.first},end:{x:this._bufferService.cols-1,y:D.last}};this._model.selectionStart=[0,D.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,x.getRangeLength)(O,this._bufferService.cols)}};o.SelectionService=T=d([_(3,C.IBufferService),_(4,C.ICoreService),_(5,S.IMouseService),_(6,C.IOptionsService),_(7,S.IRenderService),_(8,S.ICoreBrowserService)],T)},4725:(l,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 d=c(8343);o.ICharSizeService=(0,d.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),o.IMouseService=(0,d.createDecorator)("MouseService"),o.IRenderService=(0,d.createDecorator)("RenderService"),o.ISelectionService=(0,d.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,d.createDecorator)("ThemeService"),o.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(l,o,c){var d=this&&this.__decorate||function(T,z,D,O){var H,P=arguments.length,F=P<3?z:O===null?O=Object.getOwnPropertyDescriptor(z,D):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(T,z,D,O);else for(var W=T.length-1;W>=0;W--)(H=T[W])&&(F=(P<3?H(F):P>3?H(z,D,F):H(z,D))||F);return P>3&&F&&Object.defineProperty(z,D,F),F},_=this&&this.__param||function(T,z){return function(D,O){z(D,O,T)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const h=c(7239),m=c(8055),g=c(8460),S=c(844),k=c(2585),b=m.css.toColor("#ffffff"),v=m.css.toColor("#000000"),x=m.css.toColor("#ffffff"),y=m.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],z=[0,95,135,175,215,255];for(let D=0;D<216;D++){const O=z[D/36%6|0],H=z[D/6%6|0],P=z[D%6];T.push({css:m.channels.toCss(O,H,P),rgba:m.channels.toRgba(O,H,P)})}for(let D=0;D<24;D++){const O=8+10*D;T.push({css:m.channels.toCss(O,O,O),rgba:m.channels.toRgba(O,O,O)})}return T})());let j=o.ThemeService=class extends S.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new g.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:b,background:v,cursor:x,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:m.color.blend(v,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:m.color.blend(v,C),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(T={}){const z=this._colors;if(z.foreground=N(T.foreground,b),z.background=N(T.background,v),z.cursor=N(T.cursor,x),z.cursorAccent=N(T.cursorAccent,y),z.selectionBackgroundTransparent=N(T.selectionBackground,C),z.selectionBackgroundOpaque=m.color.blend(z.background,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundTransparent=N(T.selectionInactiveBackground,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundOpaque=m.color.blend(z.background,z.selectionInactiveBackgroundTransparent),z.selectionForeground=T.selectionForeground?N(T.selectionForeground,m.NULL_COLOR):void 0,z.selectionForeground===m.NULL_COLOR&&(z.selectionForeground=void 0),m.color.isOpaque(z.selectionBackgroundTransparent)&&(z.selectionBackgroundTransparent=m.color.opacity(z.selectionBackgroundTransparent,.3)),m.color.isOpaque(z.selectionInactiveBackgroundTransparent)&&(z.selectionInactiveBackgroundTransparent=m.color.opacity(z.selectionInactiveBackgroundTransparent,.3)),z.ansi=o.DEFAULT_ANSI_COLORS.slice(),z.ansi[0]=N(T.black,o.DEFAULT_ANSI_COLORS[0]),z.ansi[1]=N(T.red,o.DEFAULT_ANSI_COLORS[1]),z.ansi[2]=N(T.green,o.DEFAULT_ANSI_COLORS[2]),z.ansi[3]=N(T.yellow,o.DEFAULT_ANSI_COLORS[3]),z.ansi[4]=N(T.blue,o.DEFAULT_ANSI_COLORS[4]),z.ansi[5]=N(T.magenta,o.DEFAULT_ANSI_COLORS[5]),z.ansi[6]=N(T.cyan,o.DEFAULT_ANSI_COLORS[6]),z.ansi[7]=N(T.white,o.DEFAULT_ANSI_COLORS[7]),z.ansi[8]=N(T.brightBlack,o.DEFAULT_ANSI_COLORS[8]),z.ansi[9]=N(T.brightRed,o.DEFAULT_ANSI_COLORS[9]),z.ansi[10]=N(T.brightGreen,o.DEFAULT_ANSI_COLORS[10]),z.ansi[11]=N(T.brightYellow,o.DEFAULT_ANSI_COLORS[11]),z.ansi[12]=N(T.brightBlue,o.DEFAULT_ANSI_COLORS[12]),z.ansi[13]=N(T.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),z.ansi[14]=N(T.brightCyan,o.DEFAULT_ANSI_COLORS[14]),z.ansi[15]=N(T.brightWhite,o.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const D=Math.min(z.ansi.length-16,T.extendedAnsi.length);for(let O=0;O{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const d=c(8460),_=c(844);class h extends _.Disposable{constructor(g){super(),this._maxLength=g,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.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(g){if(this._maxLength===g)return;const S=new Array(g);for(let k=0;kthis._length)for(let S=this._length;S=g;b--)this._array[this._getCyclicIndex(b+k.length)]=this._array[this._getCyclicIndex(b)];for(let b=0;bthis._maxLength){const b=this._length+k.length-this._maxLength;this._startIndex+=b,this._length=this._maxLength,this.onTrimEmitter.fire(b)}else this._length+=k.length}trimStart(g){g>this._length&&(g=this._length),this._startIndex+=g,this._length-=g,this.onTrimEmitter.fire(g)}shiftElements(g,S,k){if(!(S<=0)){if(g<0||g>=this._length)throw new Error("start argument out of range");if(g+k<0)throw new Error("Cannot shift elements in list beyond index 0");if(k>0){for(let v=S-1;v>=0;v--)this.set(g+v+k,this.get(g+v));const b=g+S+k-this._length;if(b>0)for(this._length+=b;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let b=0;b{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function c(d,_=5){if(typeof d!="object")return d;const h=Array.isArray(d)?[]:{};for(const m in d)h[m]=_<=1?d[m]:d[m]&&c(d[m],_-1);return h}},8055:(l,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,d=0,_=0,h=0;var m,g,S,k,b;function v(y){const C=y.toString(16);return C.length<2?"0"+C:C}function x(y,C){return y>>0},y.toColor=function(C,j,N,T){return{css:y.toCss(C,j,N,T),rgba:y.toRgba(C,j,N,T)}}})(m||(o.channels=m={})),(function(y){function C(j,N){return h=Math.round(255*N),[c,d,_]=b.toChannels(j.rgba),{css:m.toCss(c,d,_,h),rgba:m.toRgba(c,d,_,h)}}y.blend=function(j,N){if(h=(255&N.rgba)/255,h===1)return{css:N.css,rgba:N.rgba};const T=N.rgba>>24&255,z=N.rgba>>16&255,D=N.rgba>>8&255,O=j.rgba>>24&255,H=j.rgba>>16&255,P=j.rgba>>8&255;return c=O+Math.round((T-O)*h),d=H+Math.round((z-H)*h),_=P+Math.round((D-P)*h),{css:m.toCss(c,d,_),rgba:m.toRgba(c,d,_)}},y.isOpaque=function(j){return(255&j.rgba)==255},y.ensureContrastRatio=function(j,N,T){const z=b.ensureContrastRatio(j.rgba,N.rgba,T);if(z)return m.toColor(z>>24&255,z>>16&255,z>>8&255)},y.opaque=function(j){const N=(255|j.rgba)>>>0;return[c,d,_]=b.toChannels(N),{css:m.toCss(c,d,_),rgba:N}},y.opacity=C,y.multiplyOpacity=function(j,N){return h=255&j.rgba,C(j,h*N/255)},y.toColorRGB=function(j){return[j.rgba>>24&255,j.rgba>>16&255,j.rgba>>8&255]}})(g||(o.color=g={})),(function(y){let C,j;try{const N=document.createElement("canvas");N.width=1,N.height=1;const T=N.getContext("2d",{willReadFrequently:!0});T&&(C=T,C.globalCompositeOperation="copy",j=C.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(N){if(N.match(/#[\da-f]{3,8}/i))switch(N.length){case 4:return c=parseInt(N.slice(1,2).repeat(2),16),d=parseInt(N.slice(2,3).repeat(2),16),_=parseInt(N.slice(3,4).repeat(2),16),m.toColor(c,d,_);case 5:return c=parseInt(N.slice(1,2).repeat(2),16),d=parseInt(N.slice(2,3).repeat(2),16),_=parseInt(N.slice(3,4).repeat(2),16),h=parseInt(N.slice(4,5).repeat(2),16),m.toColor(c,d,_,h);case 7:return{css:N,rgba:(parseInt(N.slice(1),16)<<8|255)>>>0};case 9:return{css:N,rgba:parseInt(N.slice(1),16)>>>0}}const T=N.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]),d=parseInt(T[2]),_=parseInt(T[3]),h=Math.round(255*(T[5]===void 0?1:parseFloat(T[5]))),m.toColor(c,d,_,h);if(!C||!j)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=j,C.fillStyle=N,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,d,_,h]=C.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(c,d,_,h),css:N}}})(S||(o.css=S={})),(function(y){function C(j,N,T){const z=j/255,D=N/255,O=T/255;return .2126*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}y.relativeLuminance=function(j){return C(j>>16&255,j>>8&255,255&j)},y.relativeLuminance2=C})(k||(o.rgb=k={})),(function(y){function C(N,T,z){const D=N>>24&255,O=N>>16&255,H=N>>8&255;let P=T>>24&255,F=T>>16&255,W=T>>8&255,Z=x(k.relativeLuminance2(P,F,W),k.relativeLuminance2(D,O,H));for(;Z0||F>0||W>0);)P-=Math.max(0,Math.ceil(.1*P)),F-=Math.max(0,Math.ceil(.1*F)),W-=Math.max(0,Math.ceil(.1*W)),Z=x(k.relativeLuminance2(P,F,W),k.relativeLuminance2(D,O,H));return(P<<24|F<<16|W<<8|255)>>>0}function j(N,T,z){const D=N>>24&255,O=N>>16&255,H=N>>8&255;let P=T>>24&255,F=T>>16&255,W=T>>8&255,Z=x(k.relativeLuminance2(P,F,W),k.relativeLuminance2(D,O,H));for(;Z>>0}y.blend=function(N,T){if(h=(255&T)/255,h===1)return T;const z=T>>24&255,D=T>>16&255,O=T>>8&255,H=N>>24&255,P=N>>16&255,F=N>>8&255;return c=H+Math.round((z-H)*h),d=P+Math.round((D-P)*h),_=F+Math.round((O-F)*h),m.toRgba(c,d,_)},y.ensureContrastRatio=function(N,T,z){const D=k.relativeLuminance(N>>8),O=k.relativeLuminance(T>>8);if(x(D,O)>8));if(Wx(D,k.relativeLuminance(Z>>8))?F:Z}return F}const H=j(N,T,z),P=x(D,k.relativeLuminance(H>>8));if(Px(D,k.relativeLuminance(F>>8))?H:F}return H}},y.reduceLuminance=C,y.increaseLuminance=j,y.toChannels=function(N){return[N>>24&255,N>>16&255,N>>8&255,255&N]}})(b||(o.rgba=b={})),o.toPaddedHex=v,o.contrastRatio=x},8969:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const d=c(844),_=c(2585),h=c(4348),m=c(7866),g=c(744),S=c(7302),k=c(6975),b=c(8460),v=c(1753),x=c(1480),y=c(7994),C=c(9282),j=c(5435),N=c(5981),T=c(2660);let z=!1;class D extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new b.EventEmitter),this._onScroll.event((H=>{var P;(P=this._onScrollApi)==null||P.fire(H.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(H){for(const P in H)this.optionsService.options[P]=H[P]}constructor(H){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new b.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new b.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new b.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new S.OptionsService(H)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(g.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(v.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(x.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new j.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,b.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,b.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,b.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,b.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((P=>{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((P=>{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 N.WriteBuffer(((P,F)=>this._inputHandler.parse(P,F)))),this.register((0,b.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(H,P){this._writeBuffer.write(H,P)}writeSync(H,P){this._logService.logLevel<=_.LogLevelEnum.WARN&&!z&&(this._logService.warn("writeSync is unreliable and will be removed soon."),z=!0),this._writeBuffer.writeSync(H,P)}input(H,P=!0){this.coreService.triggerDataEvent(H,P)}resize(H,P){isNaN(H)||isNaN(P)||(H=Math.max(H,g.MINIMUM_COLS),P=Math.max(P,g.MINIMUM_ROWS),this._bufferService.resize(H,P))}scroll(H,P=!1){this._bufferService.scroll(H,P)}scrollLines(H,P,F){this._bufferService.scrollLines(H,P,F)}scrollPages(H){this.scrollLines(H*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(H){const P=H-this._bufferService.buffer.ydisp;P!==0&&this.scrollLines(P)}registerEscHandler(H,P){return this._inputHandler.registerEscHandler(H,P)}registerDcsHandler(H,P){return this._inputHandler.registerDcsHandler(H,P)}registerCsiHandler(H,P){return this._inputHandler.registerCsiHandler(H,P)}registerOscHandler(H,P){return this._inputHandler.registerOscHandler(H,P)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let H=!1;const P=this.optionsService.rawOptions.windowsPty;P&&P.buildNumber!==void 0&&P.buildNumber!==void 0?H=P.backend==="conpty"&&P.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(H=!0),H?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const H=[];H.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),H.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const P of H)P.dispose()}))}}}o.CoreTerminal=D},8460:(l,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 d=0;dd.fire(_)))},o.runAndSubscribe=function(c,d){return d(void 0),c((_=>d(_)))}},5435:function(l,o,c){var d=this&&this.__decorate||function(J,$,L,B){var Y,V=arguments.length,ie=V<3?$:B===null?B=Object.getOwnPropertyDescriptor($,L):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ie=Reflect.decorate(J,$,L,B);else for(var le=J.length-1;le>=0;le--)(Y=J[le])&&(ie=(V<3?Y(ie):V>3?Y($,L,ie):Y($,L))||ie);return V>3&&ie&&Object.defineProperty($,L,ie),ie},_=this&&this.__param||function(J,$){return function(L,B){$(L,B,J)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const h=c(2584),m=c(7116),g=c(2015),S=c(844),k=c(482),b=c(8437),v=c(8460),x=c(643),y=c(511),C=c(3734),j=c(2585),N=c(1480),T=c(6242),z=c(6351),D=c(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},H=131072;function P(J,$){if(J>24)return $.setWinLines||!1;switch(J){case 1:return!!$.restoreWin;case 2:return!!$.minimizeWin;case 3:return!!$.setWinPosition;case 4:return!!$.setWinSizePixels;case 5:return!!$.raiseWin;case 6:return!!$.lowerWin;case 7:return!!$.refreshWin;case 8:return!!$.setWinSizeChars;case 9:return!!$.maximizeWin;case 10:return!!$.fullscreenWin;case 11:return!!$.getWinState;case 13:return!!$.getWinPosition;case 14:return!!$.getWinSizePixels;case 15:return!!$.getScreenSizePixels;case 16:return!!$.getCellSizePixels;case 18:return!!$.getWinSizeChars;case 19:return!!$.getScreenSizeChars;case 20:return!!$.getIconTitle;case 21:return!!$.getWinTitle;case 22:return!!$.pushTitle;case 23:return!!$.popTitle;case 24:return!!$.setWinLines}return!1}var F;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(F||(o.WindowsOptionsReportType=F={}));let W=0;class Z extends S.Disposable{getAttrData(){return this._curAttrData}constructor($,L,B,Y,V,ie,le,ae,re=new g.EscapeSequenceParser){super(),this._bufferService=$,this._charsetService=L,this._coreService=B,this._logService=Y,this._optionsService=V,this._oscLinkService=ie,this._coreMouseService=le,this._unicodeService=ae,this._parser=re,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=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new v.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new v.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new v.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new v.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new v.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new v.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new v.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new v.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new v.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new v.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new v.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new v.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new U(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:oe.toArray()})})),this._parser.setEscHandlerFallback((q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})})),this._parser.setExecuteHandlerFallback((q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})})),this._parser.setOscHandlerFallback(((q,oe,ce)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:oe,data:ce})})),this._parser.setDcsHandlerFallback(((q,oe,ce)=>{oe==="HOOK"&&(ce=ce.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:oe,payload:ce})})),this._parser.setPrintHandler(((q,oe,ce)=>this.print(q,oe,ce))),this._parser.registerCsiHandler({final:"@"},(q=>this.insertChars(q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(q=>this.scrollLeft(q))),this._parser.registerCsiHandler({final:"A"},(q=>this.cursorUp(q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(q=>this.scrollRight(q))),this._parser.registerCsiHandler({final:"B"},(q=>this.cursorDown(q))),this._parser.registerCsiHandler({final:"C"},(q=>this.cursorForward(q))),this._parser.registerCsiHandler({final:"D"},(q=>this.cursorBackward(q))),this._parser.registerCsiHandler({final:"E"},(q=>this.cursorNextLine(q))),this._parser.registerCsiHandler({final:"F"},(q=>this.cursorPrecedingLine(q))),this._parser.registerCsiHandler({final:"G"},(q=>this.cursorCharAbsolute(q))),this._parser.registerCsiHandler({final:"H"},(q=>this.cursorPosition(q))),this._parser.registerCsiHandler({final:"I"},(q=>this.cursorForwardTab(q))),this._parser.registerCsiHandler({final:"J"},(q=>this.eraseInDisplay(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(q=>this.eraseInDisplay(q,!0))),this._parser.registerCsiHandler({final:"K"},(q=>this.eraseInLine(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(q=>this.eraseInLine(q,!0))),this._parser.registerCsiHandler({final:"L"},(q=>this.insertLines(q))),this._parser.registerCsiHandler({final:"M"},(q=>this.deleteLines(q))),this._parser.registerCsiHandler({final:"P"},(q=>this.deleteChars(q))),this._parser.registerCsiHandler({final:"S"},(q=>this.scrollUp(q))),this._parser.registerCsiHandler({final:"T"},(q=>this.scrollDown(q))),this._parser.registerCsiHandler({final:"X"},(q=>this.eraseChars(q))),this._parser.registerCsiHandler({final:"Z"},(q=>this.cursorBackwardTab(q))),this._parser.registerCsiHandler({final:"`"},(q=>this.charPosAbsolute(q))),this._parser.registerCsiHandler({final:"a"},(q=>this.hPositionRelative(q))),this._parser.registerCsiHandler({final:"b"},(q=>this.repeatPrecedingCharacter(q))),this._parser.registerCsiHandler({final:"c"},(q=>this.sendDeviceAttributesPrimary(q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(q=>this.sendDeviceAttributesSecondary(q))),this._parser.registerCsiHandler({final:"d"},(q=>this.linePosAbsolute(q))),this._parser.registerCsiHandler({final:"e"},(q=>this.vPositionRelative(q))),this._parser.registerCsiHandler({final:"f"},(q=>this.hVPosition(q))),this._parser.registerCsiHandler({final:"g"},(q=>this.tabClear(q))),this._parser.registerCsiHandler({final:"h"},(q=>this.setMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(q=>this.setModePrivate(q))),this._parser.registerCsiHandler({final:"l"},(q=>this.resetMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(q=>this.resetModePrivate(q))),this._parser.registerCsiHandler({final:"m"},(q=>this.charAttributes(q))),this._parser.registerCsiHandler({final:"n"},(q=>this.deviceStatus(q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(q=>this.deviceStatusPrivate(q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(q=>this.softReset(q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(q=>this.setCursorStyle(q))),this._parser.registerCsiHandler({final:"r"},(q=>this.setScrollRegion(q))),this._parser.registerCsiHandler({final:"s"},(q=>this.saveCursor(q))),this._parser.registerCsiHandler({final:"t"},(q=>this.windowOptions(q))),this._parser.registerCsiHandler({final:"u"},(q=>this.restoreCursor(q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(q=>this.insertColumns(q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(q=>this.deleteColumns(q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(q=>this.selectProtected(q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(q=>this.requestMode(q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(q=>this.requestMode(q,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new T.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new T.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new T.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new T.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new T.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new T.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new T.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new T.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new T.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new T.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new T.OscHandler((q=>this.restoreCursorColor(q)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const q in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},(()=>this.selectCharset("("+q))),this._parser.registerEscHandler({intermediates:")",final:q},(()=>this.selectCharset(")"+q))),this._parser.registerEscHandler({intermediates:"*",final:q},(()=>this.selectCharset("*"+q))),this._parser.registerEscHandler({intermediates:"+",final:q},(()=>this.selectCharset("+"+q))),this._parser.registerEscHandler({intermediates:"-",final:q},(()=>this.selectCharset("-"+q))),this._parser.registerEscHandler({intermediates:".",final:q},(()=>this.selectCharset("."+q))),this._parser.registerEscHandler({intermediates:"/",final:q},(()=>this.selectCharset("/"+q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((q=>(this._logService.error("Parsing error: ",q),q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new z.DcsHandler(((q,oe)=>this.requestStatusString(q,oe))))}_preserveStack($,L,B,Y){this._parseStack.paused=!0,this._parseStack.cursorStartX=$,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=B,this._parseStack.position=Y}_logSlowResolvingAsync($){this._logService.logLevel<=j.LogLevelEnum.WARN&&Promise.race([$,new Promise(((L,B)=>setTimeout((()=>B("#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($,L){let B,Y=this._activeBuffer.x,V=this._activeBuffer.y,ie=0;const le=this._parseStack.paused;if(le){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(B),B;Y=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,$.length>H&&(ie=this._parseStack.position+H)}if(this._logService.logLevel<=j.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof $=="string"?` "${$}"`:` "${Array.prototype.map.call($,(q=>String.fromCharCode(q))).join("")}"`),typeof $=="string"?$.split("").map((q=>q.charCodeAt(0))):$),this._parseBuffer.length<$.length&&this._parseBuffer.lengthH)for(let q=ie;q<$.length;q+=H){const oe=q+H<$.length?q+H:$.length,ce=typeof $=="string"?this._stringDecoder.decode($.substring(q,oe),this._parseBuffer):this._utf8Decoder.decode($.subarray(q,oe),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,ce))return this._preserveStack(Y,V,ce,q),this._logSlowResolvingAsync(B),B}else if(!le){const q=typeof $=="string"?this._stringDecoder.decode($,this._parseBuffer):this._utf8Decoder.decode($,this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,q))return this._preserveStack(Y,V,q,0),this._logSlowResolvingAsync(B),B}this._activeBuffer.x===Y&&this._activeBuffer.y===V||this._onCursorMove.fire();const ae=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),re=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);re0&&ce.getWidth(this._activeBuffer.x-1)===2&&ce.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let _e=this._parser.precedingJoinState;for(let de=L;deae){if(re){const Ue=ce;let He=this._activeBuffer.x-Le;for(this._activeBuffer.x=Le,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),ce=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Le>0&&ce instanceof b.BufferLine&&ce.copyCellsFrom(Ue,He,0,Le,!1);He=0;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(q&&(ce.insertCells(this._activeBuffer.x,V-Le,this._activeBuffer.getNullCell(oe)),ce.getWidth(ae-1)===2&&ce.setCellFromCodepoint(ae-1,x.NULL_CELL_CODE,x.NULL_CELL_WIDTH,oe)),ce.setCellFromCodepoint(this._activeBuffer.x++,Y,V,oe),V>0)for(;--V;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=_e,this._activeBuffer.x0&&ce.getWidth(this._activeBuffer.x)===0&&!ce.hasContent(this._activeBuffer.x)&&ce.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler($,L){return $.final!=="t"||$.prefix||$.intermediates?this._parser.registerCsiHandler($,L):this._parser.registerCsiHandler($,(B=>!P(B.params[0],this._optionsService.rawOptions.windowOptions)||L(B)))}registerDcsHandler($,L){return this._parser.registerDcsHandler($,new z.DcsHandler(L))}registerEscHandler($,L){return this._parser.registerEscHandler($,L)}registerOscHandler($,L){return this._parser.registerOscHandler($,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 $;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&&(($=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&$.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 $=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-$),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor($=this._bufferService.cols-1){this._activeBuffer.x=Math.min($,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($,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=$,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=$,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor($,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+$,this._activeBuffer.y+L)}cursorUp($){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,$.params[0]||1)):this._moveCursor(0,-($.params[0]||1)),!0}cursorDown($){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,$.params[0]||1)):this._moveCursor(0,$.params[0]||1),!0}cursorForward($){return this._moveCursor($.params[0]||1,0),!0}cursorBackward($){return this._moveCursor(-($.params[0]||1),0),!0}cursorNextLine($){return this.cursorDown($),this._activeBuffer.x=0,!0}cursorPrecedingLine($){return this.cursorUp($),this._activeBuffer.x=0,!0}cursorCharAbsolute($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition($){return this._setCursor($.length>=2?($.params[1]||1)-1:0,($.params[0]||1)-1),!0}charPosAbsolute($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative($){return this._moveCursor($.params[0]||1,0),!0}linePosAbsolute($){return this._setCursor(this._activeBuffer.x,($.params[0]||1)-1),!0}vPositionRelative($){return this._moveCursor(0,$.params[0]||1),!0}hVPosition($){return this.cursorPosition($),!0}tabClear($){const L=$.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected($){const L=$.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine($,L,B,Y=!1,V=!1){const ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);ie.replaceCells(L,B,this._activeBuffer.getNullCell(this._eraseAttrData()),V),Y&&(ie.isWrapped=!1)}_resetBufferLine($,L=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+$),B.isWrapped=!1)}eraseInDisplay($,L=!1){let B;switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);B=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 3:const Y=this._activeBuffer.lines.length-this._bufferService.rows;Y>0&&(this._activeBuffer.lines.trimStart(Y),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-Y,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-Y,0),this._onScroll.fire(0))}return!0}eraseInLine($,L=!1){switch(this._restrictCursor(this._bufferService.cols),$.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($){this._restrictCursor();let L=$.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 re=ae;for(let q=1;q0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary($){return $.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent($.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is($){return(this._optionsService.rawOptions.termName+"").indexOf($)===0}setMode($){for(let L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode($){for(let L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),$.params[L]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode($,L){const B=this._coreService.decPrivateModes,{activeProtocol:Y,activeEncoding:V}=this._coreMouseService,ie=this._coreService,{buffers:le,cols:ae}=this._bufferService,{active:re,alt:q}=le,oe=this._optionsService.rawOptions,ce=Ce=>Ce?1:2,_e=$.params[0];return de=_e,ve=L?_e===2?4:_e===4?ce(ie.modes.insertMode):_e===12?3:_e===20?ce(oe.convertEol):0:_e===1?ce(B.applicationCursorKeys):_e===3?oe.windowOptions.setWinLines?ae===80?2:ae===132?1:0:0:_e===6?ce(B.origin):_e===7?ce(B.wraparound):_e===8?3:_e===9?ce(Y==="X10"):_e===12?ce(oe.cursorBlink):_e===25?ce(!ie.isCursorHidden):_e===45?ce(B.reverseWraparound):_e===66?ce(B.applicationKeypad):_e===67?4:_e===1e3?ce(Y==="VT200"):_e===1002?ce(Y==="DRAG"):_e===1003?ce(Y==="ANY"):_e===1004?ce(B.sendFocus):_e===1005?4:_e===1006?ce(V==="SGR"):_e===1015?4:_e===1016?ce(V==="SGR_PIXELS"):_e===1048?1:_e===47||_e===1047||_e===1049?ce(re===q):_e===2004?ce(B.bracketedPasteMode):0,ie.triggerDataEvent(`${h.C0.ESC}[${L?"":"?"}${de};${ve}$y`),!0;var de,ve}_updateAttrColor($,L,B,Y,V){return L===2?($|=50331648,$&=-16777216,$|=C.AttributeData.fromColorRGB([B,Y,V])):L===5&&($&=-50331904,$|=33554432|255&B),$}_extractColor($,L,B){const Y=[0,0,-1,0,0,0];let V=0,ie=0;do{if(Y[ie+V]=$.params[L+ie],$.hasSubParams(L+ie)){const le=$.getSubParams(L+ie);let ae=0;do Y[1]===5&&(V=1),Y[ie+ae+1+V]=le[ae];while(++ae=2||Y[1]===2&&ie+V>=5)break;Y[1]&&(V=1)}while(++ie+L<$.length&&ie+V5)&&($=1),L.extended.underlineStyle=$,L.fg|=268435456,$===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0($){$.fg=b.DEFAULT_ATTR_DATA.fg,$.bg=b.DEFAULT_ATTR_DATA.bg,$.extended=$.extended.clone(),$.extended.underlineStyle=0,$.extended.underlineColor&=-67108864,$.updateExtended()}charAttributes($){if($.length===1&&$.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=$.length;let B;const Y=this._curAttrData;for(let V=0;V=30&&B<=37?(Y.fg&=-50331904,Y.fg|=16777216|B-30):B>=40&&B<=47?(Y.bg&=-50331904,Y.bg|=16777216|B-40):B>=90&&B<=97?(Y.fg&=-50331904,Y.fg|=16777224|B-90):B>=100&&B<=107?(Y.bg&=-50331904,Y.bg|=16777224|B-100):B===0?this._processSGR0(Y):B===1?Y.fg|=134217728:B===3?Y.bg|=67108864:B===4?(Y.fg|=268435456,this._processUnderline($.hasSubParams(V)?$.getSubParams(V)[0]:1,Y)):B===5?Y.fg|=536870912:B===7?Y.fg|=67108864:B===8?Y.fg|=1073741824:B===9?Y.fg|=2147483648:B===2?Y.bg|=134217728:B===21?this._processUnderline(2,Y):B===22?(Y.fg&=-134217729,Y.bg&=-134217729):B===23?Y.bg&=-67108865:B===24?(Y.fg&=-268435457,this._processUnderline(0,Y)):B===25?Y.fg&=-536870913:B===27?Y.fg&=-67108865:B===28?Y.fg&=-1073741825:B===29?Y.fg&=2147483647:B===39?(Y.fg&=-67108864,Y.fg|=16777215&b.DEFAULT_ATTR_DATA.fg):B===49?(Y.bg&=-67108864,Y.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?V+=this._extractColor($,V,Y):B===53?Y.bg|=1073741824:B===55?Y.bg&=-1073741825:B===59?(Y.extended=Y.extended.clone(),Y.extended.underlineColor=-1,Y.updateExtended()):B===100?(Y.fg&=-67108864,Y.fg|=16777215&b.DEFAULT_ATTR_DATA.fg,Y.bg&=-67108864,Y.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus($){switch($.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${L};${B}R`)}return!0}deviceStatusPrivate($){if($.params[0]===6){const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${L};${B}R`)}return!0}softReset($){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle($){const L=$.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 B=L%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion($){const L=$.params[0]||1;let B;return($.length<2||(B=$.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions($){if(!P($.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=$.length>1?$.params[1]:0;switch($.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(F.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(F.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.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($){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($){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($){return this._windowTitle=$,this._onTitleChange.fire($),!0}setIconName($){return this._iconName=$,!0}setOrReportIndexedColor($){const L=[],B=$.split(";");for(;B.length>1;){const Y=B.shift(),V=B.shift();if(/^\d+$/.exec(Y)){const ie=parseInt(Y);if(X(ie))if(V==="?")L.push({type:0,index:ie});else{const le=(0,D.parseColor)(V);le&&L.push({type:1,index:ie,color:le})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink($){const L=$.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink($,L){this._getCurrentLinkId()&&this._finishHyperlink();const B=$.split(":");let Y;const V=B.findIndex((ie=>ie.startsWith("id=")));return V!==-1&&(Y=B[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:Y,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($,L){const B=$.split(";");for(let Y=0;Y=this._specialColors.length);++Y,++L)if(B[Y]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const V=(0,D.parseColor)(B[Y]);V&&this._onColor.fire([{type:1,index:this._specialColors[L],color:V}])}return!0}setOrReportFgColor($){return this._setOrReportSpecialColor($,0)}setOrReportBgColor($){return this._setOrReportSpecialColor($,1)}setOrReportCursorColor($){return this._setOrReportSpecialColor($,2)}restoreIndexedColor($){if(!$)return this._onColor.fire([{type:2}]),!0;const L=[],B=$.split(";");for(let Y=0;Y=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const $=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,$,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel($){return this._charsetService.setgLevel($),!0}screenAlignmentPattern(){const $=new y.CellData;$.content=4194373,$.fg=this._curAttrData.fg,$.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${h.C0.ESC}${V}${h.C0.ESC}\\`),!0))($==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:$==='"p'?'P1$r61;1"p':$==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:$==="m"?"P1$r0m":$===" q"?`P1$r${{block:2,underline:4,bar:6}[Y.cursorStyle]-(Y.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty($,L){this._dirtyRowTracker.markRangeDirty($,L)}}o.InputHandler=Z;let U=class{constructor(J){this._bufferService=J,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(J){Jthis.end&&(this.end=J)}markRangeDirty(J,$){J>$&&(W=J,J=$,$=W),Jthis.end&&(this.end=$)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function X(J){return 0<=J&&J<256}U=d([_(0,j.IBufferService)],U)},844:(l,o)=>{function c(d){for(const _ of d)_.dispose();d.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 d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const _=this._disposables.indexOf(d);_!==-1&&this._disposables.splice(_,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var _;this._isDisposed||d===this._value||((_=this._value)==null||_.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},o.toDisposable=function(d){return{dispose:d}},o.disposeArray=c,o.getDisposeArrayDisposable=function(d){return{dispose:()=>c(d)}}},1505:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(_,h,m){this._data[_]||(this._data[_]={}),this._data[_][h]=m}get(_,h){return this._data[_]?this._data[_][h]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(d,_,h,m,g){this._data.get(d,_)||this._data.set(d,_,new c),this._data.get(d,_).set(h,m,g)}get(d,_,h,m){var g;return(g=this._data.get(d,_))==null?void 0:g.get(h,m)}clear(){this._data.clear()}}},6114:(l,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,d=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 _=c.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),o.isIpad=d==="iPad",o.isIphone=d==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),o.isLinux=d.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(c)},6106:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let c=0;o.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(c=this._search(this._getKey(d)),this._array.splice(c,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const _=this._getKey(d);if(_===void 0||(c=this._search(_),c===-1)||this._getKey(this._array[c])!==_)return!1;do if(this._array[c]===d)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===d))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===d))do _(this._array[c]);while(++c=_;){let m=_+h>>1;const g=this._getKey(this._array[m]);if(g>d)h=m-1;else{if(!(g0&&this._getKey(this._array[m-1])===d;)m--;return m}_=m+1}}return _}}},7226:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const d=c(6114);class _{constructor(){this._tasks=[],this._i=0}enqueue(g){this._tasks.push(g),this._start()}flush(){for(;this._iv)return b-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(b-S))}ms`),void this._start();b=v}this.clear()}}class h extends _{_requestCallback(g){return setTimeout((()=>g(this._createDeadline(16))))}_cancelCallback(g){clearTimeout(g)}_createDeadline(g){const S=Date.now()+g;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}o.PriorityTaskQueue=h,o.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:h,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const d=c(643);o.updateWindowsModeWrappedState=function(_){const h=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),m=h==null?void 0:h.get(_.cols-1),g=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);g&&m&&(g.isWrapped=m[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&m[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(l,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 d}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new c;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}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 d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,m=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=m}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=d},9092:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const d=c(6349),_=c(7226),h=c(3734),m=c(8437),g=c(4634),S=c(511),k=c(643),b=c(4863),v=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(x,y,C){this._hasScrollback=x,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=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=v.DEFAULT_CHARSET,this.markers=[],this._nullCell=S.CellData.fromCharData([0,k.NULL_CELL_CHAR,k.NULL_CELL_WIDTH,k.NULL_CELL_CODE]),this._whitespaceCell=S.CellData.fromCharData([0,k.WHITESPACE_CELL_CHAR,k.WHITESPACE_CELL_WIDTH,k.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(x){return x?(this._nullCell.fg=x.fg,this._nullCell.bg=x.bg,this._nullCell.extended=x.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(x){return x?(this._whitespaceCell.fg=x.fg,this._whitespaceCell.bg=x.bg,this._whitespaceCell.extended=x.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(x,y){return new m.BufferLine(this._bufferService.cols,this.getNullCell(x),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const x=this.ybase+this.y-this.ydisp;return x>=0&&xo.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:y}fillViewportRows(x){if(this.lines.length===0){x===void 0&&(x=m.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(x))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(x,y){const C=this.getNullCell(m.DEFAULT_ATTR_DATA);let j=0;const N=this._getCorrectBufferLength(y);if(N>this.lines.maxLength&&(this.lines.maxLength=N),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 m.BufferLine(x,C)));else for(let z=this._rows;z>y;z--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(N0&&(this.lines.trimStart(z),this.ybase=Math.max(this.ybase-z,0),this.ydisp=Math.max(this.ydisp-z,0),this.savedY=Math.max(this.savedY-z,0)),this.lines.maxLength=N}this.x=Math.min(this.x,x-1),this.y=Math.min(this.y,y-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,x-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(x,y),this._cols>x))for(let T=0;T.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let x=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,x=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return x}get _isReflowEnabled(){const x=this._optionsService.rawOptions.windowsPty;return x&&x.buildNumber?this._hasScrollback&&x.backend==="conpty"&&x.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(x,y){this._cols!==x&&(x>this._cols?this._reflowLarger(x,y):this._reflowSmaller(x,y))}_reflowLarger(x,y){const C=(0,g.reflowLargerGetLinesToRemove)(this.lines,this._cols,x,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(C.length>0){const j=(0,g.reflowLargerCreateNewLayout)(this.lines,C);(0,g.reflowLargerApplyNewLayout)(this.lines,j.layout),this._reflowLargerAdjustViewport(x,y,j.countRemoved)}}_reflowLargerAdjustViewport(x,y,C){const j=this.getNullCell(m.DEFAULT_ATTR_DATA);let N=C;for(;N-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;T--){let z=this.lines.get(T);if(!z||!z.isWrapped&&z.getTrimmedLength()<=x)continue;const D=[z];for(;z.isWrapped&&T>0;)z=this.lines.get(--T),D.unshift(z);const O=this.ybase+this.y;if(O>=T&&O0&&(j.push({start:T+D.length+N,newLines:Z}),N+=Z.length),D.push(...Z);let U=P.length-1,X=P[U];X===0&&(U--,X=P[U]);let J=D.length-F-1,$=H;for(;J>=0;){const B=Math.min($,X);if(D[U]===void 0)break;if(D[U].copyCellsFrom(D[J],$-B,X-B,B,!0),X-=B,X===0&&(U--,X=P[U]),$-=B,$===0){J--;const Y=Math.max(J,0);$=(0,g.getWrappedLineTrimmedLength)(D,Y,this._cols)}}for(let B=0;B0;)this.ybase===0?this.y0){const T=[],z=[];for(let U=0;U=0;U--)if(P&&P.start>O+F){for(let X=P.newLines.length-1;X>=0;X--)this.lines.set(U--,P.newLines[X]);U++,T.push({index:O+1,amount:P.newLines.length}),F+=P.newLines.length,P=j[++H]}else this.lines.set(U,z[O--]);let W=0;for(let U=T.length-1;U>=0;U--)T[U].index+=W,this.lines.onInsertEmitter.fire(T[U]),W+=T[U].amount;const Z=Math.max(0,D+N-this.lines.maxLength);Z>0&&this.lines.onTrimEmitter.fire(Z)}}translateBufferLineToString(x,y,C=0,j){const N=this.lines.get(x);return N?N.translateToString(y,C,j):""}getWrappedRangeForLine(x){let y=x,C=x;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;C+10;);return x>=this._cols?this._cols-1:x<0?0:x}nextStop(x){for(x==null&&(x=this.x);!this.tabs[++x]&&x=this._cols?this._cols-1:x<0?0:x}clearMarkers(x){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(x){this._isClearing||this.markers.splice(this.markers.indexOf(x),1)}}},8437:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const d=c(3734),_=c(511),h=c(643),m=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let g=0;class S{constructor(b,v,x=!1){this.isWrapped=x,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*b);const y=v||_.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let C=0;C>22,2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):x]}set(b,v){this._data[3*b+1]=v[h.CHAR_DATA_ATTR_INDEX],v[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[b]=v[1],this._data[3*b+0]=2097152|b|v[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*b+0]=v[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(b){return this._data[3*b+0]>>22}hasWidth(b){return 12582912&this._data[3*b+0]}getFg(b){return this._data[3*b+1]}getBg(b){return this._data[3*b+2]}hasContent(b){return 4194303&this._data[3*b+0]}getCodePoint(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):2097151&v}isCombined(b){return 2097152&this._data[3*b+0]}getString(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b]:2097151&v?(0,m.stringFromCodePoint)(2097151&v):""}isProtected(b){return 536870912&this._data[3*b+2]}loadCell(b,v){return g=3*b,v.content=this._data[g+0],v.fg=this._data[g+1],v.bg=this._data[g+2],2097152&v.content&&(v.combinedData=this._combined[b]),268435456&v.bg&&(v.extended=this._extendedAttrs[b]),v}setCell(b,v){2097152&v.content&&(this._combined[b]=v.combinedData),268435456&v.bg&&(this._extendedAttrs[b]=v.extended),this._data[3*b+0]=v.content,this._data[3*b+1]=v.fg,this._data[3*b+2]=v.bg}setCellFromCodepoint(b,v,x,y){268435456&y.bg&&(this._extendedAttrs[b]=y.extended),this._data[3*b+0]=v|x<<22,this._data[3*b+1]=y.fg,this._data[3*b+2]=y.bg}addCodepointToCell(b,v,x){let y=this._data[3*b+0];2097152&y?this._combined[b]+=(0,m.stringFromCodePoint)(v):2097151&y?(this._combined[b]=(0,m.stringFromCodePoint)(2097151&y)+(0,m.stringFromCodePoint)(v),y&=-2097152,y|=2097152):y=v|4194304,x&&(y&=-12582913,y|=x<<22),this._data[3*b+0]=y}insertCells(b,v,x){if((b%=this.length)&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b-1,0,1,x),v=0;--C)this.setCell(b+v+C,this.loadCell(b+C,y));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*x)this._data=new Uint32Array(this._data.buffer,0,x);else{const y=new Uint32Array(x);y.set(this._data),this._data=y}for(let y=this.length;y=b&&delete this._combined[N]}const C=Object.keys(this._extendedAttrs);for(let j=0;j=b&&delete this._extendedAttrs[N]}}return this.length=b,4*x*2=0;--b)if(4194303&this._data[3*b+0])return b+(this._data[3*b+0]>>22);return 0}getNoBgTrimmedLength(){for(let b=this.length-1;b>=0;--b)if(4194303&this._data[3*b+0]||50331648&this._data[3*b+2])return b+(this._data[3*b+0]>>22);return 0}copyCellsFrom(b,v,x,y,C){const j=b._data;if(C)for(let T=y-1;T>=0;T--){for(let z=0;z<3;z++)this._data[3*(x+T)+z]=j[3*(v+T)+z];268435456&j[3*(v+T)+2]&&(this._extendedAttrs[x+T]=b._extendedAttrs[v+T])}else for(let T=0;T=v&&(this._combined[z-v+x]=b._combined[z])}}translateToString(b,v,x,y){v=v??0,x=x??this.length,b&&(x=Math.min(x,this.getTrimmedLength())),y&&(y.length=0);let C="";for(;v>22||1}return y&&y.push(v),C}}o.BufferLine=S},4841:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(c,d){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 d*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(l,o)=>{function c(d,_,h){if(_===d.length-1)return d[_].getTrimmedLength();const m=!d[_].hasContent(h-1)&&d[_].getWidth(h-1)===1,g=d[_+1].getWidth(0)===2;return m&&g?h-1:h}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(d,_,h,m,g){const S=[];for(let k=0;k=k&&m0&&(z>y||x[z].getTrimmedLength()===0);z--)T++;T>0&&(S.push(k+x.length-T),S.push(T)),k+=x.length-1}return S},o.reflowLargerCreateNewLayout=function(d,_){const h=[];let m=0,g=_[m],S=0;for(let k=0;kc(d,x,_))).reduce(((v,x)=>v+x));let S=0,k=0,b=0;for(;bv&&(S-=v,k++);const x=d[k].getWidth(S-1)===2;x&&S--;const y=x?h-1:h;m.push(y),b+=y}return m},o.getWrappedLineTrimmedLength=c},5295:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const d=c(8460),_=c(844),h=c(9092);class m extends _.Disposable{constructor(S,k){super(),this._optionsService=S,this._bufferService=k,this._onBufferActivate=this.register(new d.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 h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.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(S){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(S),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(S,k){this._normal.resize(S,k),this._alt.resize(S,k),this.setupTabStops(S)}setupTabStops(S){this._normal.setupTabStops(S),this._alt.setupTabStops(S)}}o.BufferSet=m},511:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const d=c(482),_=c(643),h=c(3734);class m extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(S){const k=new m;return k.setFromCharData(S),k}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(S[_.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(S[_.CHAR_DATA_CHAR_INDEX].length===2){const b=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=b&&b<=56319){const v=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(b-55296)+v-56320+65536|S[_.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[_.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=S[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=m},643:(l,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:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const d=c(8460),_=c(844);class h{get id(){return this._id}constructor(g){this.line=g,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,_.disposeArray)(this._disposables),this._disposables.length=0)}register(g){return this._disposables.push(g),g}}o.Marker=h,h._nextId=1},7116:(l,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:(l,o)=>{var c,d,_;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=` +`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(c||(o.C0=c={})),(function(h){h.PAD="€",h.HOP="",h.BPH="‚",h.NBH="ƒ",h.IND="„",h.NEL="…",h.SSA="†",h.ESA="‡",h.HTS="ˆ",h.HTJ="‰",h.VTS="Š",h.PLD="‹",h.PLU="Œ",h.RI="",h.SS2="Ž",h.SS3="",h.DCS="",h.PU1="‘",h.PU2="’",h.STS="“",h.CCH="”",h.MW="•",h.SPA="–",h.EPA="—",h.SOS="˜",h.SGCI="™",h.SCI="š",h.CSI="›",h.ST="œ",h.OSC="",h.PM="ž",h.APC="Ÿ"})(d||(o.C1=d={})),(function(h){h.ST=`${c.ESC}\\`})(_||(o.C1_ESCAPED=_={}))},7399:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const d=c(2584),_={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(h,m,g,S){const k={type:0,cancel:!1,key:void 0},b=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?k.key=m?d.C0.ESC+"OA":d.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?k.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?k.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(k.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:k.key=h.ctrlKey?"\b":d.C0.DEL,h.altKey&&(k.key=d.C0.ESC+k.key);break;case 9:if(h.shiftKey){k.key=d.C0.ESC+"[Z";break}k.key=d.C0.HT,k.cancel=!0;break;case 13:k.key=h.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,k.cancel=!0;break;case 27:k.key=d.C0.ESC,h.altKey&&(k.key=d.C0.ESC+d.C0.ESC),k.cancel=!0;break;case 37:if(h.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"D",k.key===d.C0.ESC+"[1;3D"&&(k.key=d.C0.ESC+(g?"b":"[1;5D"))):k.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(h.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"C",k.key===d.C0.ESC+"[1;3C"&&(k.key=d.C0.ESC+(g?"f":"[1;5C"))):k.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(h.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"A",g||k.key!==d.C0.ESC+"[1;3A"||(k.key=d.C0.ESC+"[1;5A")):k.key=m?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(h.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"B",g||k.key!==d.C0.ESC+"[1;3B"||(k.key=d.C0.ESC+"[1;5B")):k.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(k.key=d.C0.ESC+"[2~");break;case 46:k.key=b?d.C0.ESC+"[3;"+(b+1)+"~":d.C0.ESC+"[3~";break;case 36:k.key=b?d.C0.ESC+"[1;"+(b+1)+"H":m?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:k.key=b?d.C0.ESC+"[1;"+(b+1)+"F":m?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:h.shiftKey?k.type=2:h.ctrlKey?k.key=d.C0.ESC+"[5;"+(b+1)+"~":k.key=d.C0.ESC+"[5~";break;case 34:h.shiftKey?k.type=3:h.ctrlKey?k.key=d.C0.ESC+"[6;"+(b+1)+"~":k.key=d.C0.ESC+"[6~";break;case 112:k.key=b?d.C0.ESC+"[1;"+(b+1)+"P":d.C0.ESC+"OP";break;case 113:k.key=b?d.C0.ESC+"[1;"+(b+1)+"Q":d.C0.ESC+"OQ";break;case 114:k.key=b?d.C0.ESC+"[1;"+(b+1)+"R":d.C0.ESC+"OR";break;case 115:k.key=b?d.C0.ESC+"[1;"+(b+1)+"S":d.C0.ESC+"OS";break;case 116:k.key=b?d.C0.ESC+"[15;"+(b+1)+"~":d.C0.ESC+"[15~";break;case 117:k.key=b?d.C0.ESC+"[17;"+(b+1)+"~":d.C0.ESC+"[17~";break;case 118:k.key=b?d.C0.ESC+"[18;"+(b+1)+"~":d.C0.ESC+"[18~";break;case 119:k.key=b?d.C0.ESC+"[19;"+(b+1)+"~":d.C0.ESC+"[19~";break;case 120:k.key=b?d.C0.ESC+"[20;"+(b+1)+"~":d.C0.ESC+"[20~";break;case 121:k.key=b?d.C0.ESC+"[21;"+(b+1)+"~":d.C0.ESC+"[21~";break;case 122:k.key=b?d.C0.ESC+"[23;"+(b+1)+"~":d.C0.ESC+"[23~";break;case 123:k.key=b?d.C0.ESC+"[24;"+(b+1)+"~":d.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(g&&!S||!h.altKey||h.metaKey)!g||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?k.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(k.key=d.C0.US),h.key==="@"&&(k.key=d.C0.NUL)):h.keyCode===65&&(k.type=1);else{const v=_[h.keyCode],x=v==null?void 0:v[h.shiftKey?1:0];if(x)k.key=d.C0.ESC+x;else if(h.keyCode>=65&&h.keyCode<=90){const y=h.ctrlKey?h.keyCode-64:h.keyCode+32;let C=String.fromCharCode(y);h.shiftKey&&(C=C.toUpperCase()),k.key=d.C0.ESC+C}else if(h.keyCode===32)k.key=d.C0.ESC+(h.ctrlKey?d.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let y=h.code.slice(3,4);h.shiftKey||(y=y.toLowerCase()),k.key=d.C0.ESC+y,k.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?k.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?k.key=d.C0.NUL:h.keyCode>=51&&h.keyCode<=55?k.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?k.key=d.C0.DEL:h.keyCode===219?k.key=d.C0.ESC:h.keyCode===220?k.key=d.C0.FS:h.keyCode===221&&(k.key=d.C0.GS)}return k}},482:(l,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,d=0,_=c.length){let h="";for(let m=d;m<_;++m){let g=c[m];g>65535?(g-=65536,h+=String.fromCharCode(55296+(g>>10))+String.fromCharCode(g%1024+56320)):h+=String.fromCharCode(g)}return h},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,d){const _=c.length;if(!_)return 0;let h=0,m=0;if(this._interim){const g=c.charCodeAt(m++);56320<=g&&g<=57343?d[h++]=1024*(this._interim-55296)+g-56320+65536:(d[h++]=this._interim,d[h++]=g),this._interim=0}for(let g=m;g<_;++g){const S=c.charCodeAt(g);if(55296<=S&&S<=56319){if(++g>=_)return this._interim=S,h;const k=c.charCodeAt(g);56320<=k&&k<=57343?d[h++]=1024*(S-55296)+k-56320+65536:(d[h++]=S,d[h++]=k)}else S!==65279&&(d[h++]=S)}return h}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,d){const _=c.length;if(!_)return 0;let h,m,g,S,k=0,b=0,v=0;if(this.interim[0]){let C=!1,j=this.interim[0];j&=(224&j)==192?31:(240&j)==224?15:7;let N,T=0;for(;(N=63&this.interim[++T])&&T<4;)j<<=6,j|=N;const z=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=z-T;for(;v=_)return 0;if(N=c[v++],(192&N)!=128){v--,C=!0;break}this.interim[T++]=N,j<<=6,j|=63&N}C||(z===2?j<128?v--:d[k++]=j:z===3?j<2048||j>=55296&&j<=57343||j===65279||(d[k++]=j):j<65536||j>1114111||(d[k++]=j)),this.interim.fill(0)}const x=_-4;let y=v;for(;y<_;){for(;!(!(y=_)return this.interim[0]=h,k;if(m=c[y++],(192&m)!=128){y--;continue}if(b=(31&h)<<6|63&m,b<128){y--;continue}d[k++]=b}else if((240&h)==224){if(y>=_)return this.interim[0]=h,k;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=_)return this.interim[0]=h,this.interim[1]=m,k;if(g=c[y++],(192&g)!=128){y--;continue}if(b=(15&h)<<12|(63&m)<<6|63&g,b<2048||b>=55296&&b<=57343||b===65279)continue;d[k++]=b}else if((248&h)==240){if(y>=_)return this.interim[0]=h,k;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=_)return this.interim[0]=h,this.interim[1]=m,k;if(g=c[y++],(192&g)!=128){y--;continue}if(y>=_)return this.interim[0]=h,this.interim[1]=m,this.interim[2]=g,k;if(S=c[y++],(192&S)!=128){y--;continue}if(b=(7&h)<<18|(63&m)<<12|(63&g)<<6|63&S,b<65536||b>1114111)continue;d[k++]=b}}return k}}},225:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const d=c(1480),_=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[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 m;o.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let g=0;g<_.length;++g)m.fill(0,_[g][0],_[g][1]+1)}}wcwidth(g){return g<32?0:g<127?1:g<65536?m[g]:(function(S,k){let b,v=0,x=k.length-1;if(Sk[x][1])return!1;for(;x>=v;)if(b=v+x>>1,S>k[b][1])v=b+1;else{if(!(S=131072&&g<=196605||g>=196608&&g<=262141?2:1}charProperties(g,S){let k=this.wcwidth(g),b=k===0&&S!==0;if(b){const v=d.UnicodeService.extractWidth(S);v===0?b=!1:v>k&&(k=v)}return d.UnicodeService.createPropertyValue(0,k,b)}}},5981:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const d=c(8460),_=c(844);class h extends _.Disposable{constructor(g){super(),this._action=g,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(g,S){if(S!==void 0&&this._syncCalls>S)return void(this._syncCalls=0);if(this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let k;for(this._isSyncWriting=!0;k=this._writeBuffer.shift();){this._action(k);const b=this._callbacks.shift();b&&b()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(g,S){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+=g.length,this._writeBuffer.push(g),this._callbacks.push(S),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(S)}_innerWrite(g=0,S=!0){const k=g||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const b=this._writeBuffer[this._bufferOffset],v=this._action(b,S);if(v){const y=C=>Date.now()-k>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(k,C);return void v.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(y)}const x=this._callbacks[this._bufferOffset];if(x&&x(),this._bufferOffset++,this._pendingData-=b.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=h},5941:(l,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})$/,d=/^[\da-f]+$/;function _(h,m){const g=h.toString(16),S=g.length<2?"0"+g:g;switch(m){case 4:return g[0];case 8:return S;case 12:return(S+S).slice(0,3);default:return S+S}}o.parseColor=function(h){if(!h)return;let m=h.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const g=c.exec(m);if(g){const S=g[1]?15:g[4]?255:g[7]?4095:65535;return[Math.round(parseInt(g[1]||g[4]||g[7]||g[10],16)/S*255),Math.round(parseInt(g[2]||g[5]||g[8]||g[11],16)/S*255),Math.round(parseInt(g[3]||g[6]||g[9]||g[12],16)/S*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),d.exec(m)&&[3,6,9,12].includes(m.length))){const g=m.length/3,S=[0,0,0];for(let k=0;k<3;++k){const b=parseInt(m.slice(g*k,g*k+g),16);S[k]=g===1?b<<4:g===2?b:g===3?b>>4:b>>8}return S}},o.toRgbString=function(h,m=16){const[g,S,k]=h;return`rgb:${_(g,m)}/${_(S,m)}/${_(k,m)}`}},5770:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const d=c(482),_=c(8742),h=c(5770),m=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(S,k){this._handlers[S]===void 0&&(this._handlers[S]=[]);const b=this._handlers[S];return b.push(k),{dispose:()=>{const v=b.indexOf(k);v!==-1&&b.splice(v,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}reset(){if(this._active.length)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(S,k){if(this.reset(),this._ident=S,this._active=this._handlers[S]||m,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].hook(k);else this._handlerFb(this._ident,"HOOK",k)}put(S,k,b){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(S,k,b);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(S,k,b))}unhook(S,k=!0){if(this._active.length){let b=!1,v=this._active.length-1,x=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,b=k,x=this._stack.fallThrough,this._stack.paused=!1),!x&&b===!1){for(;v>=0&&(b=this._active[v].unhook(S),b!==!0);v--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,b;v--}for(;v>=0;v--)if(b=this._active[v].unhook(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,b}else this._handlerFb(this._ident,"UNHOOK",S);this._active=m,this._ident=0}};const g=new _.Params;g.addParam(0),o.DcsHandler=class{constructor(S){this._handler=S,this._data="",this._params=g,this._hitLimit=!1}hook(S){this._params=S.length>1||S.params[0]?S.clone():g,this._data="",this._hitLimit=!1}put(S,k,b){this._hitLimit||(this._data+=(0,d.utf32ToString)(S,k,b),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(S){let k=!1;if(this._hitLimit)k=!1;else if(S&&(k=this._handler(this._data,this._params),k instanceof Promise))return k.then((b=>(this._params=g,this._data="",this._hitLimit=!1,b)));return this._params=g,this._data="",this._hitLimit=!1,k}}},2015:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const d=c(844),_=c(8742),h=c(6242),m=c(6351);class g{constructor(v){this.table=new Uint8Array(v)}setDefault(v,x){this.table.fill(v<<4|x)}add(v,x,y,C){this.table[x<<8|v]=y<<4|C}addMany(v,x,y,C){for(let j=0;jz)),x=(T,z)=>v.slice(T,z),y=x(32,127),C=x(0,24);C.push(25),C.push.apply(C,x(28,32));const j=x(0,14);let N;for(N in b.setDefault(1,0),b.addMany(y,0,2,0),j)b.addMany([24,26,153,154],N,3,0),b.addMany(x(128,144),N,3,0),b.addMany(x(144,152),N,3,0),b.add(156,N,0,0),b.add(27,N,11,1),b.add(157,N,4,8),b.addMany([152,158,159],N,0,7),b.add(155,N,11,3),b.add(144,N,11,9);return b.addMany(C,0,3,0),b.addMany(C,1,3,1),b.add(127,1,0,1),b.addMany(C,8,0,8),b.addMany(C,3,3,3),b.add(127,3,0,3),b.addMany(C,4,3,4),b.add(127,4,0,4),b.addMany(C,6,3,6),b.addMany(C,5,3,5),b.add(127,5,0,5),b.addMany(C,2,3,2),b.add(127,2,0,2),b.add(93,1,4,8),b.addMany(y,8,5,8),b.add(127,8,5,8),b.addMany([156,27,24,26,7],8,6,0),b.addMany(x(28,32),8,0,8),b.addMany([88,94,95],1,0,7),b.addMany(y,7,0,7),b.addMany(C,7,0,7),b.add(156,7,0,0),b.add(127,7,0,7),b.add(91,1,11,3),b.addMany(x(64,127),3,7,0),b.addMany(x(48,60),3,8,4),b.addMany([60,61,62,63],3,9,4),b.addMany(x(48,60),4,8,4),b.addMany(x(64,127),4,7,0),b.addMany([60,61,62,63],4,0,6),b.addMany(x(32,64),6,0,6),b.add(127,6,0,6),b.addMany(x(64,127),6,0,0),b.addMany(x(32,48),3,9,5),b.addMany(x(32,48),5,9,5),b.addMany(x(48,64),5,0,6),b.addMany(x(64,127),5,7,0),b.addMany(x(32,48),4,9,5),b.addMany(x(32,48),1,9,2),b.addMany(x(32,48),2,9,2),b.addMany(x(48,127),2,10,0),b.addMany(x(48,80),1,10,0),b.addMany(x(81,88),1,10,0),b.addMany([89,90,92],1,10,0),b.addMany(x(96,127),1,10,0),b.add(80,1,11,9),b.addMany(C,9,0,9),b.add(127,9,0,9),b.addMany(x(28,32),9,0,9),b.addMany(x(32,48),9,9,12),b.addMany(x(48,60),9,8,10),b.addMany([60,61,62,63],9,9,10),b.addMany(C,11,0,11),b.addMany(x(32,128),11,0,11),b.addMany(x(28,32),11,0,11),b.addMany(C,10,0,10),b.add(127,10,0,10),b.addMany(x(28,32),10,0,10),b.addMany(x(48,60),10,8,10),b.addMany([60,61,62,63],10,0,11),b.addMany(x(32,48),10,9,12),b.addMany(C,12,0,12),b.add(127,12,0,12),b.addMany(x(28,32),12,0,12),b.addMany(x(32,48),12,9,12),b.addMany(x(48,64),12,0,11),b.addMany(x(64,127),12,12,13),b.addMany(x(64,127),10,12,13),b.addMany(x(64,127),9,12,13),b.addMany(C,13,13,13),b.addMany(y,13,13,13),b.add(127,13,0,13),b.addMany([27,156,24,26],13,14,0),b.add(S,0,2,0),b.add(S,8,5,8),b.add(S,6,0,6),b.add(S,11,0,11),b.add(S,13,13,13),b})();class k extends d.Disposable{constructor(v=o.VT500_TRANSITION_TABLE){super(),this._transitions=v,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(x,y,C)=>{},this._executeHandlerFb=x=>{},this._csiHandlerFb=(x,y)=>{},this._escHandlerFb=x=>{},this._errorHandlerFb=x=>x,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(v,x=[64,126]){let y=0;if(v.prefix){if(v.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=v.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(v.intermediates){if(v.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let j=0;jN||N>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=N}}if(v.final.length!==1)throw new Error("final must be a single byte");const C=v.final.charCodeAt(0);if(x[0]>C||C>x[1])throw new Error(`final must be in range ${x[0]} .. ${x[1]}`);return y<<=8,y|=C,y}identToString(v){const x=[];for(;v;)x.push(String.fromCharCode(255&v)),v>>=8;return x.reverse().join("")}setPrintHandler(v){this._printHandler=v}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(v,x){const y=this._identifier(v,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const C=this._escHandlers[y];return C.push(x),{dispose:()=>{const j=C.indexOf(x);j!==-1&&C.splice(j,1)}}}clearEscHandler(v){this._escHandlers[this._identifier(v,[48,126])]&&delete this._escHandlers[this._identifier(v,[48,126])]}setEscHandlerFallback(v){this._escHandlerFb=v}setExecuteHandler(v,x){this._executeHandlers[v.charCodeAt(0)]=x}clearExecuteHandler(v){this._executeHandlers[v.charCodeAt(0)]&&delete this._executeHandlers[v.charCodeAt(0)]}setExecuteHandlerFallback(v){this._executeHandlerFb=v}registerCsiHandler(v,x){const y=this._identifier(v);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const C=this._csiHandlers[y];return C.push(x),{dispose:()=>{const j=C.indexOf(x);j!==-1&&C.splice(j,1)}}}clearCsiHandler(v){this._csiHandlers[this._identifier(v)]&&delete this._csiHandlers[this._identifier(v)]}setCsiHandlerFallback(v){this._csiHandlerFb=v}registerDcsHandler(v,x){return this._dcsParser.registerHandler(this._identifier(v),x)}clearDcsHandler(v){this._dcsParser.clearHandler(this._identifier(v))}setDcsHandlerFallback(v){this._dcsParser.setHandlerFallback(v)}registerOscHandler(v,x){return this._oscParser.registerHandler(v,x)}clearOscHandler(v){this._oscParser.clearHandler(v)}setOscHandlerFallback(v){this._oscParser.setHandlerFallback(v)}setErrorHandler(v){this._errorHandler=v}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(v,x,y,C,j){this._parseStack.state=v,this._parseStack.handlers=x,this._parseStack.handlerPos=y,this._parseStack.transition=C,this._parseStack.chunkPos=j}parse(v,x,y){let C,j=0,N=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 z=this._parseStack.handlers;let D=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&D>-1){for(;D>=0&&(C=z[D](this._params),C!==!0);D--)if(C instanceof Promise)return this._parseStack.handlerPos=D,C}this._parseStack.handlers=[];break;case 4:if(y===!1&&D>-1){for(;D>=0&&(C=z[D](),C!==!0);D--)if(C instanceof Promise)return this._parseStack.handlerPos=D,C}this._parseStack.handlers=[];break;case 6:if(j=v[this._parseStack.chunkPos],C=this._dcsParser.unhook(j!==24&&j!==26,y),C)return C;j===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(j=v[this._parseStack.chunkPos],C=this._oscParser.end(j!==24&&j!==26,y),C)return C;j===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 z=T;z>4){case 2:for(let F=z+1;;++F){if(F>=x||(j=v[F])<32||j>126&&j=x||(j=v[F])<32||j>126&&j=x||(j=v[F])<32||j>126&&j=x||(j=v[F])<32||j>126&&j=0&&(C=D[O](this._params),C!==!0);O--)if(C instanceof Promise)return this._preserveStack(3,D,O,N,z),C;O<0&&this._csiHandlerFb(this._collect<<8|j,this._params),this.precedingJoinState=0;break;case 8:do switch(j){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(j-48)}while(++z47&&j<60);z--;break;case 9:this._collect<<=8,this._collect|=j;break;case 10:const H=this._escHandlers[this._collect<<8|j];let P=H?H.length-1:-1;for(;P>=0&&(C=H[P](),C!==!0);P--)if(C instanceof Promise)return this._preserveStack(4,H,P,N,z),C;P<0&&this._escHandlerFb(this._collect<<8|j),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|j,this._params);break;case 13:for(let F=z+1;;++F)if(F>=x||(j=v[F])===24||j===26||j===27||j>127&&j=x||(j=v[F])<32||j>127&&j{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const d=c(5770),_=c(482),h=[];o.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(m,g){this._handlers[m]===void 0&&(this._handlers[m]=[]);const S=this._handlers[m];return S.push(g),{dispose:()=>{const k=S.indexOf(g);k!==-1&&S.splice(k,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,g,S){if(this._active.length)for(let k=this._active.length-1;k>=0;k--)this._active[k].put(m,g,S);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(m,g,S))}start(){this.reset(),this._state=1}put(m,g,S){if(this._state!==3){if(this._state===1)for(;g0&&this._put(m,g,S)}}end(m,g=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let S=!1,k=this._active.length-1,b=!1;if(this._stack.paused&&(k=this._stack.loopPosition-1,S=g,b=this._stack.fallThrough,this._stack.paused=!1),!b&&S===!1){for(;k>=0&&(S=this._active[k].end(m),S!==!0);k--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!1,S;k--}for(;k>=0;k--)if(S=this._active[k].end(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",m);this._active=h,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,g,S){this._hitLimit||(this._data+=(0,_.utf32ToString)(m,g,S),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let g=!1;if(this._hitLimit)g=!1;else if(m&&(g=this._handler(this._data),g instanceof Promise))return g.then((S=>(this._data="",this._hitLimit=!1,S)));return this._data="",this._hitLimit=!1,g}}},8742:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const c=2147483647;class d{static fromArray(h){const m=new d;if(!h.length)return m;for(let g=Array.isArray(h[0])?1:0;g256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new d(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let m=0;m>8,S=255&this._subParamsIdx[m];S-g>0&&h.push(Array.prototype.slice.call(this._subParams,g,S))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>c?c:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>c?c:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const m=this._subParamsIdx[h]>>8,g=255&this._subParamsIdx[h];return g-m>0?this._subParams.subarray(m,g):null}getSubParamsAll(){const h={};for(let m=0;m>8,S=255&this._subParamsIdx[m];S-g>0&&(h[m]=this._subParams.slice(g,S))}return h}addDigit(h){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const g=this._digitIsSub?this._subParams:this.params,S=g[m-1];g[m-1]=~S?Math.min(10*S+h,c):h}}o.Params=d},5741:(l,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,d){const _={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(_),d.dispose=()=>this._wrappedAddonDispose(_),d.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let d=-1;for(let _=0;_{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const d=c(3785),_=c(511);o.BufferApiView=class{constructor(h,m){this._buffer=h,this.type=m}init(h){return this._buffer=h,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(h){const m=this._buffer.lines.get(h);if(m)return new d.BufferLineApiView(m)}getNullCell(){return new _.CellData}}},3785:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const d=c(511);o.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,h){if(!(_<0||_>=this._line.length))return h?(this._line.loadCell(_,h),h):this._line.loadCell(_,new d.CellData)}translateToString(_,h,m){return this._line.translateToString(_,h,m)}}},8285:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const d=c(8771),_=c(8460),h=c(844);class m extends h.Disposable{constructor(S){super(),this._core=S,this._onBufferChange=this.register(new _.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.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=m},7975:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,d){return this._core.registerCsiHandler(c,(_=>d(_.toArray())))}addCsiHandler(c,d){return this.registerCsiHandler(c,d)}registerDcsHandler(c,d){return this._core.registerDcsHandler(c,((_,h)=>d(_,h.toArray())))}addDcsHandler(c,d){return this.registerDcsHandler(c,d)}registerEscHandler(c,d){return this._core.registerEscHandler(c,d)}addEscHandler(c,d){return this.registerEscHandler(c,d)}registerOscHandler(c,d){return this._core.registerOscHandler(c,d)}addOscHandler(c,d){return this.registerOscHandler(c,d)}}},7090:(l,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(l,o,c){var d=this&&this.__decorate||function(b,v,x,y){var C,j=arguments.length,N=j<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(b,v,x,y);else for(var T=b.length-1;T>=0;T--)(C=b[T])&&(N=(j<3?C(N):j>3?C(v,x,N):C(v,x))||N);return j>3&&N&&Object.defineProperty(v,x,N),N},_=this&&this.__param||function(b,v){return function(x,y){v(x,y,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const h=c(8460),m=c(844),g=c(5295),S=c(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let k=o.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(b){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(b.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(b.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new g.BufferSet(b,this))}resize(b,v){this.cols=b,this.rows=v,this.buffers.resize(b,v),this._onResize.fire({cols:b,rows:v})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(b,v=!1){const x=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===b.fg&&y.getBg(0)===b.bg||(y=x.getBlankLine(b,v),this._cachedBlankLine=y),y.isWrapped=v;const C=x.ybase+x.scrollTop,j=x.ybase+x.scrollBottom;if(x.scrollTop===0){const N=x.lines.isFull;j===x.lines.length-1?N?x.lines.recycle().copyFrom(y):x.lines.push(y.clone()):x.lines.splice(j+1,0,y.clone()),N?this.isUserScrolling&&(x.ydisp=Math.max(x.ydisp-1,0)):(x.ybase++,this.isUserScrolling||x.ydisp++)}else{const N=j-C+1;x.lines.shiftElements(C+1,N-1,-1),x.lines.set(j,y.clone())}this.isUserScrolling||(x.ydisp=x.ybase),this._onScroll.fire(x.ydisp)}scrollLines(b,v,x){const y=this.buffer;if(b<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else b+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const C=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+b,y.ybase),0),C!==y.ydisp&&(v||this._onScroll.fire(y.ydisp))}};o.BufferService=k=d([_(0,S.IOptionsService)],k)},7994:(l,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,d){this._charsets[c]=d,this.glevel===c&&(this.charset=d)}}},1753:function(l,o,c){var d=this&&this.__decorate||function(y,C,j,N){var T,z=arguments.length,D=z<3?C:N===null?N=Object.getOwnPropertyDescriptor(C,j):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,C,j,N);else for(var O=y.length-1;O>=0;O--)(T=y[O])&&(D=(z<3?T(D):z>3?T(C,j,D):T(C,j))||D);return z>3&&D&&Object.defineProperty(C,j,D),D},_=this&&this.__param||function(y,C){return function(j,N){C(j,N,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const h=c(2585),m=c(8460),g=c(844),S={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 j=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(j|=64,j|=y.action):(j|=3&y.button,4&y.button&&(j|=64),8&y.button&&(j|=128),y.action===32?j|=32:y.action!==0||C||(j|=3)),j}const b=String.fromCharCode,v={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${b(C[0])}${b(C[1])}${b(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 x=o.CoreMouseService=class extends g.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 m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const j of Object.keys(S))this.addProtocol(j,S[j]);for(const j of Object.keys(v))this.addEncoding(j,v[j]);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,j){if(j){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=x=d([_(0,h.IBufferService),_(1,h.ICoreService)],x)},6975:function(l,o,c){var d=this&&this.__decorate||function(x,y,C,j){var N,T=arguments.length,z=T<3?y:j===null?j=Object.getOwnPropertyDescriptor(y,C):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(x,y,C,j);else for(var D=x.length-1;D>=0;D--)(N=x[D])&&(z=(T<3?N(z):T>3?N(y,C,z):N(y,C))||z);return T>3&&z&&Object.defineProperty(y,C,z),z},_=this&&this.__param||function(x,y){return function(C,j){y(C,j,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const h=c(1439),m=c(8460),g=c(844),S=c(2585),k=Object.freeze({insertMode:!1}),b=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let v=o.CoreService=class extends g.Disposable{constructor(x,y,C){super(),this._bufferService=x,this._logService=y,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(k),this.decPrivateModes=(0,h.clone)(b)}reset(){this.modes=(0,h.clone)(k),this.decPrivateModes=(0,h.clone)(b)}triggerDataEvent(x,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 "${x}"`,(()=>x.split("").map((j=>j.charCodeAt(0))))),this._onData.fire(x)}triggerBinaryEvent(x){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${x}"`,(()=>x.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(x))}};o.CoreService=v=d([_(0,S.IBufferService),_(1,S.ILogService),_(2,S.IOptionsService)],v)},9074:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const d=c(8055),_=c(8460),h=c(844),m=c(6106);let g=0,S=0;class k extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList((x=>x==null?void 0:x.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(x){if(x.marker.isDisposed)return;const y=new b(x);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 x of this._decorations.values())x.dispose();this._decorations.clear()}*getDecorationsAtCell(x,y,C){let j=0,N=0;for(const T of this._decorations.getKeyIterator(y))j=T.options.x??0,N=j+(T.options.width??1),x>=j&&x{g=N.options.x??0,S=g+(N.options.width??1),x>=g&&x{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const d=c(2585),_=c(8343);class h{constructor(...g){this._entries=new Map;for(const[S,k]of g)this.set(S,k)}set(g,S){const k=this._entries.get(g);return this._entries.set(g,S),k}forEach(g){for(const[S,k]of this._entries.entries())g(S,k)}has(g){return this._entries.has(g)}get(g){return this._entries.get(g)}}o.ServiceCollection=h,o.InstantiationService=class{constructor(){this._services=new h,this._services.set(d.IInstantiationService,this)}setService(m,g){this._services.set(m,g)}getService(m){return this._services.get(m)}createInstance(m,...g){const S=(0,_.getServiceDependencies)(m).sort(((v,x)=>v.index-x.index)),k=[];for(const v of S){const x=this._services.get(v.id);if(!x)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${v.id}.`);k.push(x)}const b=S.length>0?S[0].index:g.length;if(g.length!==b)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${b+1} conflicts with ${g.length} static arguments`);return new m(...g,...k)}}},7866:function(l,o,c){var d=this&&this.__decorate||function(b,v,x,y){var C,j=arguments.length,N=j<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(b,v,x,y);else for(var T=b.length-1;T>=0;T--)(C=b[T])&&(N=(j<3?C(N):j>3?C(v,x,N):C(v,x))||N);return j>3&&N&&Object.defineProperty(v,x,N),N},_=this&&this.__param||function(b,v){return function(x,y){v(x,y,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const h=c(844),m=c(2585),g={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let S,k=o.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(b){super(),this._optionsService=b,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),S=this}_updateLogLevel(){this._logLevel=g[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(b){for(let v=0;vJSON.stringify(N))).join(", ")})`);const j=y.apply(this,C);return S.trace(`GlyphRenderer#${y.name} return`,j),j}}},7302:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const d=c(8460),_=c(844),h=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:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const m=["normal","bold","100","200","300","400","500","600","700","800","900"];class g extends _.Disposable{constructor(k){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const b={...o.DEFAULT_OPTIONS};for(const v in k)if(v in b)try{const x=k[v];b[v]=this._sanitizeAndValidateOption(v,x)}catch(x){console.error(x)}this.rawOptions=b,this.options={...b},this._setupOptions(),this.register((0,_.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(k,b){return this.onOptionChange((v=>{v===k&&b(this.rawOptions[k])}))}onMultipleOptionChange(k,b){return this.onOptionChange((v=>{k.indexOf(v)!==-1&&b()}))}_setupOptions(){const k=v=>{if(!(v in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);return this.rawOptions[v]},b=(v,x)=>{if(!(v in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);x=this._sanitizeAndValidateOption(v,x),this.rawOptions[v]!==x&&(this.rawOptions[v]=x,this._onOptionChange.fire(v))};for(const v in this.rawOptions){const x={get:k.bind(this,v),set:b.bind(this,v)};Object.defineProperty(this.options,v,x)}}_sanitizeAndValidateOption(k,b){switch(k){case"cursorStyle":if(b||(b=o.DEFAULT_OPTIONS[k]),!(function(v){return v==="block"||v==="underline"||v==="bar"})(b))throw new Error(`"${b}" is not a valid value for ${k}`);break;case"wordSeparator":b||(b=o.DEFAULT_OPTIONS[k]);break;case"fontWeight":case"fontWeightBold":if(typeof b=="number"&&1<=b&&b<=1e3)break;b=m.includes(b)?b:o.DEFAULT_OPTIONS[k];break;case"cursorWidth":b=Math.floor(b);case"lineHeight":case"tabStopWidth":if(b<1)throw new Error(`${k} cannot be less than 1, value: ${b}`);break;case"minimumContrastRatio":b=Math.max(1,Math.min(21,Math.round(10*b)/10));break;case"scrollback":if((b=Math.min(b,4294967295))<0)throw new Error(`${k} cannot be less than 0, value: ${b}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(b<=0)throw new Error(`${k} cannot be less than or equal to 0, value: ${b}`);break;case"rows":case"cols":if(!b&&b!==0)throw new Error(`${k} must be numeric, value: ${b}`);break;case"windowsPty":b=b??{}}return b}}o.OptionsService=g},2660:function(l,o,c){var d=this&&this.__decorate||function(g,S,k,b){var v,x=arguments.length,y=x<3?S:b===null?b=Object.getOwnPropertyDescriptor(S,k):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(g,S,k,b);else for(var C=g.length-1;C>=0;C--)(v=g[C])&&(y=(x<3?v(y):x>3?v(S,k,y):v(S,k))||y);return x>3&&y&&Object.defineProperty(S,k,y),y},_=this&&this.__param||function(g,S){return function(k,b){S(k,b,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const h=c(2585);let m=o.OscLinkService=class{constructor(g){this._bufferService=g,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(g){const S=this._bufferService.buffer;if(g.id===void 0){const C=S.addMarker(S.ybase+S.y),j={data:g,id:this._nextId++,lines:[C]};return C.onDispose((()=>this._removeMarkerFromLink(j,C))),this._dataByLinkId.set(j.id,j),j.id}const k=g,b=this._getEntryIdKey(k),v=this._entriesWithId.get(b);if(v)return this.addLineToLink(v.id,S.ybase+S.y),v.id;const x=S.addMarker(S.ybase+S.y),y={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[x]};return x.onDispose((()=>this._removeMarkerFromLink(y,x))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(g,S){const k=this._dataByLinkId.get(g);if(k&&k.lines.every((b=>b.line!==S))){const b=this._bufferService.buffer.addMarker(S);k.lines.push(b),b.onDispose((()=>this._removeMarkerFromLink(k,b)))}}getLinkData(g){var S;return(S=this._dataByLinkId.get(g))==null?void 0:S.data}_getEntryIdKey(g){return`${g.id};;${g.uri}`}_removeMarkerFromLink(g,S){const k=g.lines.indexOf(S);k!==-1&&(g.lines.splice(k,1),g.lines.length===0&&(g.data.id!==void 0&&this._entriesWithId.delete(g.key),this._dataByLinkId.delete(g.id)))}};o.OscLinkService=m=d([_(0,h.IBufferService)],m)},8343:(l,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const c="di$target",d="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(_){return _[d]||[]},o.createDecorator=function(_){if(o.serviceRegistry.has(_))return o.serviceRegistry.get(_);const h=function(m,g,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(k,b,v){b[c]===b?b[d].push({id:k,index:v}):(b[d]=[{id:k,index:v}],b[c]=b)})(h,m,S)};return h.toString=()=>_,o.serviceRegistry.set(_,h),h}},2585:(l,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 d=c(8343);var _;o.IBufferService=(0,d.createDecorator)("BufferService"),o.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),o.ICoreService=(0,d.createDecorator)("CoreService"),o.ICharsetService=(0,d.createDecorator)("CharsetService"),o.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(_||(o.LogLevelEnum=_={})),o.ILogService=(0,d.createDecorator)("LogService"),o.IOptionsService=(0,d.createDecorator)("OptionsService"),o.IOscLinkService=(0,d.createDecorator)("OscLinkService"),o.IUnicodeService=(0,d.createDecorator)("UnicodeService"),o.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(l,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const d=c(8460),_=c(225);class h{static extractShouldJoin(g){return(1&g)!=0}static extractWidth(g){return g>>1&3}static extractCharKind(g){return g>>3}static createPropertyValue(g,S,k=!1){return(16777215&g)<<3|(3&S)<<1|(k?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const g=new _.UnicodeV6;this.register(g),this._active=g.version,this._activeProvider=g}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(g){if(!this._providers[g])throw new Error(`unknown Unicode version "${g}"`);this._active=g,this._activeProvider=this._providers[g],this._onChange.fire(g)}register(g){this._providers[g.version]=g}wcwidth(g){return this._activeProvider.wcwidth(g)}getStringCellWidth(g){let S=0,k=0;const b=g.length;for(let v=0;v=b)return S+this.wcwidth(x);const j=g.charCodeAt(v);56320<=j&&j<=57343?x=1024*(x-55296)+j-56320+65536:S+=this.wcwidth(j)}const y=this.charProperties(x,k);let C=h.extractWidth(y);h.extractShouldJoin(y)&&(C-=h.extractWidth(k)),S+=C,k=y}return S}charProperties(g,S){return this._activeProvider.charProperties(g,S)}}o.UnicodeService=h}},r={};function s(l){var o=r[l];if(o!==void 0)return o.exports;var c=r[l]={exports:{}};return t[l].call(c.exports,c,c.exports,s),c.exports}var a={};return(()=>{var l=a;Object.defineProperty(l,"__esModule",{value:!0}),l.Terminal=void 0;const o=s(9042),c=s(3236),d=s(844),_=s(5741),h=s(8285),m=s(7975),g=s(7090),S=["cols","rows"];class k extends d.Disposable{constructor(v){super(),this._core=this.register(new c.Terminal(v)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const x=C=>this._core.options[C],y=(C,j)=>{this._checkReadonlyOptions(C),this._core.options[C]=j};for(const C in this._core.options){const j={get:x.bind(this,C),set:y.bind(this,C)};Object.defineProperty(this._publicOptions,C,j)}}_checkReadonlyOptions(v){if(S.includes(v))throw new Error(`Option "${v}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new g.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 h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const v=this._core.coreService.decPrivateModes;let x="none";switch(this._core.coreMouseService.activeProtocol){case"X10":x="x10";break;case"VT200":x="vt200";break;case"DRAG":x="drag";break;case"ANY":x="any"}return{applicationCursorKeysMode:v.applicationCursorKeys,applicationKeypadMode:v.applicationKeypad,bracketedPasteMode:v.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:x,originMode:v.origin,reverseWraparoundMode:v.reverseWraparound,sendFocusMode:v.sendFocus,wraparoundMode:v.wraparound}}get options(){return this._publicOptions}set options(v){for(const x in v)this._publicOptions[x]=v[x]}blur(){this._core.blur()}focus(){this._core.focus()}input(v,x=!0){this._core.input(v,x)}resize(v,x){this._verifyIntegers(v,x),this._core.resize(v,x)}open(v){this._core.open(v)}attachCustomKeyEventHandler(v){this._core.attachCustomKeyEventHandler(v)}attachCustomWheelEventHandler(v){this._core.attachCustomWheelEventHandler(v)}registerLinkProvider(v){return this._core.registerLinkProvider(v)}registerCharacterJoiner(v){return this._checkProposedApi(),this._core.registerCharacterJoiner(v)}deregisterCharacterJoiner(v){this._checkProposedApi(),this._core.deregisterCharacterJoiner(v)}registerMarker(v=0){return this._verifyIntegers(v),this._core.registerMarker(v)}registerDecoration(v){return this._checkProposedApi(),this._verifyPositiveIntegers(v.x??0,v.width??0,v.height??0),this._core.registerDecoration(v)}hasSelection(){return this._core.hasSelection()}select(v,x,y){this._verifyIntegers(v,x,y),this._core.select(v,x,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(v,x){this._verifyIntegers(v,x),this._core.selectLines(v,x)}dispose(){super.dispose()}scrollLines(v){this._verifyIntegers(v),this._core.scrollLines(v)}scrollPages(v){this._verifyIntegers(v),this._core.scrollPages(v)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(v){this._verifyIntegers(v),this._core.scrollToLine(v)}clear(){this._core.clear()}write(v,x){this._core.write(v,x)}writeln(v,x){this._core.write(v),this._core.write(`\r +`,x)}paste(v){this._core.paste(v)}refresh(v,x){this._verifyIntegers(v,x),this._core.refresh(v,x)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return o}_verifyIntegers(...v){for(const x of v)if(x===1/0||isNaN(x)||x%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const x of v)if(x&&(x===1/0||isNaN(x)||x%1!=0||x<0))throw new Error("This API only accepts positive integers")}}l.Terminal=k})(),a})()))})(tb)),tb.exports}var k_t=S_t();function b4(e,n,t=!1){const r=getComputedStyle(document.documentElement),s=new k_t.Terminal({convertEol:!0,disableStdin:n,fontSize:12,fontFamily:r.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:{background:r.getPropertyValue("--term-bg").trim(),foreground:r.getPropertyValue("--term-foreground").trim(),cursor:n?r.getPropertyValue("--term-bg").trim():r.getPropertyValue("--term-foreground").trim(),selectionBackground:r.getPropertyValue("--term-selection").trim()}}),a=new x_t.FitAddon;s.loadAddon(a),t&&s.loadAddon(new w_t.WebLinksAddon((c,d)=>{let _;try{_=new URL(d)}catch{return}(_.protocol==="http:"||_.protocol==="https:")&&window.open(_,"_blank","noopener,noreferrer")})),s.open(e);const l=()=>{try{a.fit()}catch{}};l();const o=new ResizeObserver(l);return o.observe(e),{terminal:s,dispose(){o.disconnect(),s.dispose()}}}const ET="h-40 overflow-hidden rounded-md bg-terminal p-2";function zm(e){return typeof e=="object"&&e!==null}function NT(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function C_t(e){return zm(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||NT(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function E_t(e){return zm(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&NT(e.partitions)&&(e.error===null||typeof e.error=="string")}function N_t(e){return!zm(e)||e.type!=="complete"?null:e.backend==="ssh"&&C_t(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&E_t(e.result)?{backend:"slurm",result:e.result}:null}function z_t(e){return zm(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function x4({host:e,backend:n,path:t="/api/settings/ssh/connect",active:r=!0,onComplete:s,onError:a}){const l=M.useRef(null),o=M.useRef(null),c=M.useRef(s),d=M.useRef(a),[_,h]=M.useState(null);return c.current=s,d.current=a,M.useEffect(()=>{const m=l.current;if(!m)return;const{terminal:g,dispose:S}=b4(m,!1,!0);o.current=g,g.focus();const k=location.protocol==="https:"?"wss:":"ws:",b=new URL(t,`${k}//${location.host}`);b.searchParams.set("host",e),b.searchParams.set("backend",n);const v=new WebSocket(b);v.binaryType="arraybuffer";let x=!1,y=!1,C=!1;const j=z=>{var D;y||(y=!0,C||g.writeln(z),g.options.disableStdin=!0,g.blur(),h(z),(D=d.current)==null||D.call(d,z))},N=g.onData(z=>{v.readyState===WebSocket.OPEN&&v.send(new TextEncoder().encode(z))}),T=g.onResize(({cols:z,rows:D})=>{v.readyState===WebSocket.OPEN&&v.send(JSON.stringify({type:"resize",cols:z,rows:D}))});return v.onopen=()=>{v.send(JSON.stringify({type:"resize",cols:g.cols,rows:g.rows}))},v.onmessage=z=>{if(z.data instanceof ArrayBuffer){C=!0,g.write(new Uint8Array(z.data));return}if(typeof z.data!="string")return;let D;try{D=JSON.parse(z.data)}catch{return}const O=N_t(D);if(O){x=!0,c.current(O),v.close();return}const H=z_t(D);H&&j(H)},v.onerror=()=>j(cS()),v.onclose=()=>{!x&&!y&&j(cS())},()=>{v.onopen=null,v.onmessage=null,v.onerror=null,v.onclose=null,N.dispose(),T.dispose(),v.close(),o.current=null,S()}},[n,e,t]),M.useEffect(()=>{const m=o.current;m&&(m.options.disableStdin=!r||_!==null,r&&_===null?m.focus():m.blur())},[r,_]),f.jsxs("div",{className:"mt-3",children:[f.jsx("div",{className:ET,role:"group","aria-label":SN({host:ke(e)}),children:f.jsx("div",{ref:l,className:"h-full overflow-hidden"})}),_?f.jsx("p",{role:"alert",className:"sr-only",children:_}):null]})}function j_t({host:e,transcript:n}){const t=M.useRef(null);return M.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:a}=b4(r,!0,!0);return s.write(n),a},[n]),f.jsx("div",{className:`mt-3 ${ET}`,role:"group","aria-label":SN({host:ke(e)}),children:f.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}const Ap="font-mono text-sm leading-[1.55] [tab-size:4]",zT="whitespace-pre-wrap break-words",jT="file-view-gutter text-right text-muted select-none";function AT(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}function TT({value:e,onChange:n,onSave:t,onBlur:r,readOnly:s=!1,path:a,highlightLine:l,scrollRequest:o,onScrollRequestHandled:c}){const d=M.useMemo(()=>pT(e,Fy(a)),[e,a]),{ruleCh:_,codeCh:h}=AT(d.length),m=M.useRef(null),g=M.useRef(null),S=()=>{const v=m.current;v&&g.current&&(g.current.scrollTop=v.scrollTop)};M.useLayoutEffect(S,[e]),M.useLayoutEffect(()=>{var N;const v=m.current;if(!v||!l)return;const x=e.split(` +`),y=Math.min(Math.max(Math.trunc(l),1),x.length);let C=0;for(let T=0;T{if(!s){if((v.metaKey||v.ctrlKey)&&v.key.toLowerCase()==="s"){v.preventDefault(),t();return}if(v.key==="Tab"){v.preventDefault();const x=v.currentTarget,{selectionStart:y,selectionEnd:C}=x,j=e.slice(0,y)+" "+e.slice(C);n(j),requestAnimationFrame(()=>{x.selectionStart=x.selectionEnd=y+1})}}},b=`absolute inset-0 m-0 py-3.5 pe-4 ${Ap} ${zT} [scrollbar-gutter:stable]`;return f.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Ap}`,children:[f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${_}ch`},"aria-hidden":"true"}),f.jsx("div",{ref:g,className:`file-view-code ${b} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:d.map((v,x)=>f.jsxs("div",{"data-line":x+1,className:"relative",style:{paddingInlineStart:`${h}ch`},children:[f.jsx("span",{className:`${jT} absolute start-0 pe-[1ch]`,style:{width:`${_}ch`},children:x+1}),mT(v)?f.jsx("br",{}):v]},x))}),f.jsx("textarea",{ref:m,className:`file-view-editarea ${b} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${h}ch`},value:e,onChange:v=>{s||n(v.target.value)},onScroll:S,onKeyDown:k,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}const A_t='button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function y4(e,n,t="[data-initial-focus]"){const r=M.useRef(n);r.current=n,M.useEffect(()=>{const s=e.current;if(!s)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,l=()=>[...s.querySelectorAll(A_t)];(s.querySelector(t)??l()[0]??s).focus();const o=c=>{if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),r.current();return}if(c.key!=="Tab")return;const d=l(),_=d[0],h=d.at(-1);!_||!h?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===_?(c.preventDefault(),h.focus()):!c.shiftKey&&document.activeElement===h&&(c.preventDefault(),_.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),a==null||a.focus()}},[e,t])}function MT({onClose:e,onSaved:n}){const[t,r]=M.useState(null),[s,a]=M.useState(""),[l,o]=M.useState(null),[c,d]=M.useState(!1),_=M.useRef(null),h=M.useRef(e),m=t!==null&&s!==t.content,g=M.useRef(m),S=M.useRef(c);g.current=m,S.current=c,h.current=e,M.useEffect(()=>{yet().then(v=>{r(v),a(v.content)}).catch(v=>o(v instanceof Error?v.message:String(v)))},[]);const k=()=>{S.current||g.current&&!window.confirm(tVe())||h.current()};y4(_,k,"textarea");async function b(){if(!(!t||!m||c)){d(!0);try{await wet(s,t.content),r({...t,content:s}),n==null||n(),Br(cVe(),"success")}catch(v){Br(v instanceof Error?v.message:String(v),"error")}finally{d(!1)}}}return Il.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:v=>{v.target===v.currentTarget&&k()},children:f.jsxs("div",{ref:_,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:hVe()}),f.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),f.jsx(Kt,{className:"absolute end-3.5 top-3.5","aria-label":ZGe(),onClick:k,disabled:c,children:f.jsx(Zr,{size:16})}),f.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:l?f.jsx("p",{className:"m-5 text-sm text-accent-red",children:l}):t===null?f.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[f.jsx(Dt,{})," ",iVe()]}):f.jsx(TT,{value:s,onChange:a,onSave:()=>void b(),path:t.path})}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[f.jsx($e,{onClick:k,disabled:c,children:Rh()}),f.jsx($e,{variant:"primary",onClick:()=>void b(),disabled:!m||c,children:c?oa():Ll()})]})]})}),document.body)}const Ia=["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(" "),dd=["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(" "),Wc=["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(" "),w4="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",ys=["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(" "),Vh=["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(" "),yo=["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(" "),P2=["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(" "),Q0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),ju=["settings-stack-section [&_+_.settings-stack-section]:mt-6 [&_>_:last-child]:mb-0","[&_>_h2]:mt-0 [&_>_h2]:mx-0 [&_>_h2]:mb-1.5 [&_>_h2]:text-xl"].join(" ");function nb(e){return e.agentReady?{cls:"ok",variant:"success",label:gN()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:cDe()}:e.authState==="unknown"?{cls:"warn",variant:"warning",label:WHe()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:ePe()}:{cls:"warn",variant:"warning",label:bIe()}:{cls:"warn",variant:"warning",label:JOe()}}function T_t({h:e}){return e.authMethod?f.jsx(f.Fragment,{children:e.authMethod==="oauth"?EAe():YE()}):f.jsx(f.Fragment,{children:"—"})}function M_t(){const[e,n]=M.useState(null),[t,r]=M.useState("claude-code"),[s,a]=M.useState(!1),l=(c,d=!1)=>{a(!0),pp(c,d).then(n).catch(()=>{}).finally(()=>a(!1))};M.useEffect(()=>l(!1),[]),M.useEffect(()=>Jx(()=>l(!0)),[]);const o=e==null?void 0:e.find(c=>c.id===t);return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:ORe()}),f.jsx("div",{className:"harness-tabs mt-3 flex gap-1 mb-3.5 border-b border-b-border-variant [&_button]:inline-flex [&_button]:items-center [&_button]:gap-[7px] [&_button]:py-[7px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:border-b-2 [&_button]:border-b-transparent [&_button]:-mb-px [&_button:hover]:text-text [&_button.active]:border-b-primary",children:(e??[]).map(c=>f.jsxs("button",{className:c.id===t?"active":"",onClick:()=>r(c.id),children:[c.name,f.jsx("span",{className:`w-[7px] h-[7px] rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${nb(c).cls}`})]},c.id))}),e?o?f.jsxs("div",{className:Ia,children:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx(Ot,{variant:nb(o).variant,children:nb(o).label}),f.jsx("div",{className:"spacer flex-1"}),f.jsxs($e,{size:"small",onClick:()=>l(!0,!0),disabled:s,children:[f.jsx(bd,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",Xp()]})]}),f.jsxs("div",{className:dd,children:[f.jsx("span",{className:"k",children:gTe()}),f.jsx("span",{className:"v",children:o.binPath??uAe()}),f.jsx("span",{className:"k",children:yN()}),f.jsx("span",{className:"v",children:o.version??"—"}),f.jsx("span",{className:"k",children:QAe()}),f.jsx("span",{className:"v",children:f.jsx(T_t,{h:o})}),o.account&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:o.id==="opencode"?IPe():Lx()}),f.jsx("span",{className:"v",children:o.account})]}),o.org&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:PIe()}),f.jsx("span",{className:"v",children:o.org})]}),o.plan&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:SBe()}),f.jsx("span",{className:"v",children:o.plan})]}),f.jsx("span",{className:"k",children:GAe()}),f.jsx("span",{className:"v",children:o.models.length>0?Eje({count:Yt(o.models.length),models:new Intl.ListFormat(E()).format(o.models.slice(0,4).map(c=>ke(fp(c))))}):Dx()})]}),o.agentNote&&f.jsx("p",{className:ys,children:Gh(o.agentNote)})]}):null:f.jsxs(jr,{children:[f.jsx(Dt,{})," ",rRe()]})]})}function R_t({s:e}){if(!e.configured)return f.jsx(Ot,{children:Yp()});const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?f.jsx(Ot,{variant:"success",children:Ox()}):f.jsx(Ot,{variant:"error",children:bOe()}):f.jsx(Ot,{variant:"error",children:sMe()}):f.jsx(Ot,{variant:"error",children:qDe()})}function D_t(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[l,o]=M.useState(""),[c,d]=M.useState(!1),[_,h]=M.useState(null),m=k=>{n(k),a(k.context??""),o(k.namespace)};M.useEffect(()=>{fet().then(m).catch(k=>r(k instanceof Error?k.message:String(k)))},[]);const g=e!==null&&s===(e.context??"")&&l.trim()===e.namespace;async function S(k){if(k.preventDefault(),!c){d(!0),h(null);try{m(await het({context:s,namespace:l.trim()}))}catch(b){h(b instanceof Error?b.message:String(b))}finally{d(!1)}}}return f.jsx(f.Fragment,{children:t?f.jsx("div",{className:"error",children:t}):e?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Wc,children:[f.jsx("span",{className:"k",children:WTe()}),f.jsx("span",{className:"v",children:f.jsx(R_t,{s:e})})]}),e.preflight.error&&f.jsx("p",{className:w4,children:e.preflight.error}),f.jsxs("form",{className:Vh,onSubmit:S,children:[f.jsxs("div",{className:"row2",children:[f.jsxs("label",{children:[vMe(),f.jsx(oh,{choices:[{id:"",label:e.currentContext?Hze({context:ke(e.currentContext)}):Oze()},...s&&!e.contexts.includes(s)?[{id:s,label:_Ae({context:ke(s)})}]:[],...e.contexts.map(k=>({id:k,label:k}))],value:s,variant:"field",dropDown:!0,disabled:c,onSelect:a})]}),f.jsxs("label",{children:[GLe(),f.jsx("input",{type:"text",value:l,onChange:k=>o(k.target.value),placeholder:FMe(),autoComplete:"off",spellCheck:!1})]})]}),_&&f.jsx("div",{className:"error",children:_}),f.jsx("div",{className:"actions",children:f.jsx($e,{variant:"primary",type:"submit",disabled:c||g,children:c?oa():Ll()})})]}),f.jsxs("section",{className:"mt-7",children:[f.jsx("h3",{className:"mt-0 mx-0 mb-1.5 text-base font-semibold text-text",children:_$e()}),f.jsx("p",{className:"m-0 font-sans text-sm leading-relaxed text-text",children:nje({placeholder:ke("{{ORX_RUN}}"),command:ke("--manifest ")})})]})]}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",OTe()]})})}const L_t={env:uje,syncedEnv:wje,modalToml:_je};function O_t({s:e}){return e.ready?f.jsx(Ot,{variant:"success",children:Ox()}):!e.tokenConfigured&&!e.modalImportable?f.jsx(Ot,{children:pIe()}):e.modalImportable?e.tokenConfigured?f.jsx(Ot,{children:bN()}):f.jsx(Ot,{variant:"error",children:$Oe()}):f.jsx(Ot,{variant:"error",children:e.envProvisioned?ENe():ANe()})}function I_t(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(!1),[l,o]=M.useState(null);M.useEffect(()=>{_et().then(n).catch(d=>r(d instanceof Error?d.message:String(d)))},[]);async function c(){if(!s){a(!0),o(null);try{n(await pet())}catch(d){o(d instanceof Error?d.message:String(d))}finally{a(!1)}}}return f.jsx(f.Fragment,{children:t?f.jsx("div",{className:"error",children:t}):e?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Wc,children:[f.jsx("span",{className:"k",children:Zp()}),f.jsx("span",{className:"v",children:f.jsx(O_t,{s:e})}),f.jsx("span",{className:"k",children:Ix()}),f.jsx("span",{className:"v",children:e.modalImportable?$x():e.envProvisioned?aje():rAe()}),f.jsx("span",{className:"k",children:vN()}),f.jsx("span",{className:"v",children:e.tokenSource?L_t[e.tokenSource]():Yp()})]}),!e.tokenConfigured&&f.jsx("p",{className:ys,children:vje({command:ke("modal token new"),id:ke("MODAL_TOKEN_ID"),secret:ke("MODAL_TOKEN_SECRET")})}),e.error&&e.envProvisioned&&!e.modalImportable&&f.jsx("p",{className:ys,children:e.error}),l&&f.jsx("div",{className:"error",children:l}),!e.modalImportable&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsx($e,{variant:"primary",onClick:()=>void c(),disabled:s,children:s?FFe():BFe()})})]}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",HTe()]})})}const RT="rounded-sm border-border-strong bg-surface text-subtext",DT="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",B_t=5e3;function LT(e){const[n,t]=M.useState({}),r=e.join("\0");return M.useEffect(()=>{const a=r?r.split("\0"):[];if(a.length===0){t({});return}let l=!1;const o=async()=>{const d=await Promise.all(a.map(async _=>{try{return[_,(await ket(_)).running]}catch{return null}}));l||t(_=>{const h={};for(const m of d)m&&(h[m[0]]=m[1]);for(const m of a)h[m]===void 0&&_[m]!==void 0&&(h[m]=_[m]);return h})};o();const c=window.setInterval(o,B_t);return()=>{l=!0,window.clearInterval(c)}},[r]),[n,a=>t(l=>({...l,[a]:!0}))]}function $_t({test:e,connecting:n,masterRunning:t}){if(n)return f.jsx("span",{role:"status",children:f.jsx(Ot,{className:DT,children:aN()})});if(e===void 0)return f.jsx(Ot,{className:RT,children:_N()});const r=e.missingTools??[],s=e.reachable&&e.toolsFound&&t===!1,a=e.reachable?e.toolsFound?s?f.jsx(Ot,{className:"rounded-sm",variant:"warning",children:lN()}):f.jsx(Ot,{className:"rounded-sm",variant:"success",children:$x()}):f.jsx(Ot,{className:"rounded-sm",variant:"error",children:r.length===1?Aje({tool:ke(r[0])}):Dje()}):f.jsx(Ot,{className:"rounded-sm",variant:"error",children:Bx()});return f.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[a,!s&&f.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:La(e.testedAt)})]})}function H_t({remote:e=!1}){const[n,t]=M.useState(null),[r,s]=M.useState(!1),[a,l]=M.useState(0),[o,c]=M.useState({}),[d,_]=M.useState({}),[h,m]=M.useState(null),[g,S]=M.useState(!1),[k,b]=M.useState(0),v=e?[]:(n==null?void 0:n.filter(T=>{const z=o[T.host]??T.lastTest;return(z==null?void 0:z.reachable)&&z.toolsFound}).map(T=>T.host))??[],[x,y]=LT(v);M.useEffect(()=>{rz().then(t).catch(()=>t([]))},[a]);function C(T){S(!1),b(z=>z+1),m(T),_(z=>({...z,[T]:!0}))}function j(){S(!1),m(null)}function N(T,z){_(D=>({...D,[T]:!z}))}return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"mb-3 flex justify-end",children:f.jsxs($e,{variant:"ghost",onClick:()=>s(!0),children:[f.jsx(GN,{size:14})," ",EN()]})}),n===null?f.jsxs(jr,{children:[f.jsx(Dt,{})," ",pN()]}):n.length===0?f.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:pOe()}):f.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:n.map(T=>{const z=o[T.host]??T.lastTest,D=h===T.host,O=d[T.host]??!1,H=!e&&(D||(z==null?void 0:z.reachable)===!1),P=`${T.user?`${T.user}@`:""}${T.hostname??T.host}${T.port?`:${T.port}`:""}`;return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-3 py-3 px-2",children:[f.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:[H?f.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":O,"aria-label":O?mI({name:ke(T.host)}):BI({name:ke(T.host)}),onClick:F=>{F.stopPropagation(),N(T.host,O)},children:f.jsx($a,{size:15,className:`text-muted transition-transform duration-120 ease-standard${O?" rotate-180":""}`})}):f.jsx("span",{className:"w-5 flex-none","aria-hidden":"true"}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"truncate text-base font-medium text-text",title:T.host,children:T.host}),f.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:P,children:P})]})]}),!e&&f.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[f.jsx("div",{className:"text-start",children:f.jsx($_t,{test:z,connecting:D&&!g,masterRunning:x[T.host]})}),f.jsx($e,{size:"small",type:"button",className:"justify-self-end",onClick:F=>{F.stopPropagation(),D&&!g?j():C(T.host)},disabled:!D&&h!==null&&!g,children:D?g?Rc():Rh():(z==null?void 0:z.reachable)===!1?Rc():z?wN():Rx()})]})]}),H&&(O||D)&&f.jsxs("div",{className:`border-t border-t-border-variant py-3 pe-2 ps-10${O?"":" hidden"}`,children:[!D&&(z==null?void 0:z.error)&&f.jsx(j_t,{host:T.host,transcript:z.error}),D&&f.jsx(x4,{host:T.host,backend:"ssh",active:O,onComplete:F=>{F.backend==="ssh"&&(c(W=>({...W,[T.host]:F.result})),y(T.host),S(!1),m(null))},onError:F=>{S(!0),c(W=>({...W,[T.host]:{reachable:!1,toolsFound:!1,missingTools:[],error:F,testedAt:Date.now()}}))}},k)]})]},T.host)})}),r&&f.jsx(MT,{onClose:()=>s(!1),onSaved:()=>l(T=>T+1)})]})}function P_t({test:e,connecting:n,masterRunning:t}){return n?f.jsx(Ot,{className:DT,children:aN()}):e===null?f.jsx(Ot,{className:RT,children:_N()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?f.jsx(Ot,{className:"rounded-sm",variant:"warning",children:lN()}):f.jsx(Ot,{className:"rounded-sm",variant:"success",children:$x()}):f.jsx(Ot,{className:"rounded-sm",variant:"error",children:jLe()}):f.jsx(Ot,{className:"rounded-sm",variant:"error",children:LOe()}):f.jsx(Ot,{className:"rounded-sm",variant:"error",children:Bx()})}function F_t({remote:e=!1}){const[n,t]=M.useState(null),[r,s]=M.useState(null),[a,l]=M.useState(""),[o,c]=M.useState(""),[d,_]=M.useState(""),[h,m]=M.useState(""),[g,S]=M.useState(!1),[k,b]=M.useState(null),[v,x]=M.useState(null),[y,C]=M.useState(!1),[j,N]=M.useState(!1),[T,z]=M.useState(0),D=!e&&a&&(v!=null&&v.reachable)&&v.slurmFound&&v.toolsFound?[a]:[],[O,H]=LT(D);function P(){N(!1),z(U=>U+1),C(!0)}const F=U=>{t(U),l(U.host??""),c(U.partition??""),_(U.account??""),m(U.timeLimit??"")};M.useEffect(()=>{Tet().then(F).catch(U=>s(U instanceof Error?U.message:String(U)))},[]);const W=n!==null&&a===(n.host??"")&&o.trim()===(n.partition??"")&&d.trim()===(n.account??"")&&h.trim()===(n.timeLimit??"");async function Z(U){if(U.preventDefault(),!g){S(!0),b(null);try{F(await Met({host:a,partition:o.trim(),account:d.trim(),timeLimit:h.trim()}))}catch(X){b(X instanceof Error?X.message:String(X))}finally{S(!1)}}}return f.jsx(f.Fragment,{children:r?f.jsx("div",{className:"error",children:r}):n?f.jsxs(f.Fragment,{children:[!y&&(v==null?void 0:v.error)&&f.jsx("p",{className:w4,children:v.error}),v&&v.partitions.length>0&&f.jsxs("div",{className:Wc,children:[f.jsx("span",{className:"k",children:pBe()}),f.jsx("span",{className:"v",children:v.partitions.join(", ")})]}),f.jsxs("form",{className:Vh,onSubmit:Z,children:[f.jsxs("div",{className:"row2",children:[f.jsxs("label",{children:[yLe(),f.jsx(oh,{choices:[{id:"",label:dIe()},...a&&!n.hosts.some(U=>U.host===a)?[{id:a,label:`${a} (not in ~/.ssh/config)`}]:[],...n.hosts.map(U=>({id:U.host,label:U.host}))],value:a,variant:"field",dropDown:!0,disabled:g||y,onSelect:U=>{l(U),x(null),C(!1),N(!1)}})]}),f.jsxs("label",{children:[dBe(),f.jsx("input",{type:"text",list:"slurm-partitions",value:o,onChange:U=>c(U.target.value),placeholder:rS(),autoComplete:"off",spellCheck:!1}),f.jsx("datalist",{id:"slurm-partitions",children:v==null?void 0:v.partitions.map(U=>f.jsx("option",{value:U},U))})]})]}),f.jsxs("div",{className:"row2",children:[f.jsxs("label",{children:[Lx(),f.jsx("input",{type:"text",value:d,onChange:U=>_(U.target.value),placeholder:rS(),autoComplete:"off",spellCheck:!1})]}),f.jsxs("label",{children:[HHe(),f.jsx("input",{type:"text",value:h,onChange:U=>m(U.target.value),placeholder:eMe(),autoComplete:"off",spellCheck:!1})]})]}),k&&f.jsx("div",{className:"error",children:k}),f.jsxs("div",{className:"actions",children:[f.jsx($e,{variant:"primary",type:"submit",disabled:g||W||y,children:g?oa():Ll()}),!e&&f.jsx($e,{type:"button",onClick:()=>{y&&!j?(N(!1),C(!1)):P()},disabled:!a,title:a?void 0:RPe(),children:y?j?Rc():Rh():v?wN():Rx()}),f.jsx("span",{role:"status",children:f.jsx(P_t,{test:v,connecting:y&&!j,masterRunning:O[a]})})]})]}),!e&&y&&f.jsx(x4,{host:a,backend:"slurm",onComplete:U=>{U.backend==="slurm"&&(x(U.result),H(a),N(!1),C(!1))},onError:U=>{N(!0),x({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:U})}},T)]}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",iLe()]})})}function U_t(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[l,o]=M.useState(!1),[c,d]=M.useState(null),[_,h]=M.useState(null),m=_!==null&&_!=="testing"?_:null,g=v=>{n(v),a(v.address??"")};M.useEffect(()=>{Ret().then(g).catch(v=>r(v instanceof Error?v.message:String(v)))},[]);const S=e!==null&&s===(e.address??"");async function k(v){if(v.preventDefault(),!l){o(!0),d(null);try{g(await Det({address:s}))}catch(x){d(x instanceof Error?x.message:String(x))}finally{o(!1)}}}async function b(){h("testing");try{h(await Let(s.trim()||void 0))}catch(v){h({reachable:!1,address:s.trim()||"(unknown)",rayVersion:null,error:v instanceof Error?v.message:String(v)})}}return f.jsx(f.Fragment,{children:t?f.jsx("div",{className:"error",children:t}):e?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Wc,children:[f.jsx("span",{className:"k",children:dRe()}),f.jsx("span",{className:"v",children:e.resolvedAddress}),f.jsx("span",{className:"k",children:Hx()}),f.jsx("span",{className:"v",children:e.source}),(m==null?void 0:m.reachable)&&m.rayVersion&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:TBe()}),f.jsx("span",{className:"v",children:m.rayVersion})]})]}),(m==null?void 0:m.error)&&f.jsx("p",{className:w4,children:m.error}),f.jsxs("form",{className:Vh,onSubmit:k,children:[f.jsxs("label",{children:[MDe(),f.jsx("input",{type:"text",value:s,onChange:v=>{a(v.target.value),h(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),c&&f.jsx("div",{className:"error",children:c}),f.jsxs("div",{className:"actions",children:[f.jsx($e,{variant:"primary",type:"submit",disabled:l||S,children:l?oa():Ll()}),f.jsx($e,{type:"button",onClick:()=>void b(),disabled:_==="testing",children:mHe()}),f.jsx(q_t,{test:_})]})]})]}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",tLe()]})})}function q_t({test:e}){return e===null?null:e==="testing"?f.jsx(Ot,{children:xHe()}):e.reachable?f.jsx(Ot,{variant:"success",children:LBe()}):f.jsx(Ot,{variant:"error",children:Bx()})}function G_t(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{Bet().then(n).catch(s=>r(s instanceof Error?s.message:String(s)))},[]),f.jsx(f.Fragment,{children:t?f.jsx("div",{className:"error",children:t}):e?f.jsxs("div",{className:Wc,children:[f.jsx("span",{className:"k",children:KRe()}),f.jsx("span",{className:"v",children:e.hostname}),f.jsx("span",{className:"k",children:fHe()}),f.jsxs("span",{className:"v",children:[e.os,"/",e.arch,e.chip?` — ${e.chip}`:""]}),f.jsx("span",{className:"k",children:"CPU"}),f.jsx("span",{className:"v",children:e.cpuCount>0?`${e.cpuCount} cores`:"—"}),f.jsx("span",{className:"k",children:"RAM"}),f.jsx("span",{className:"v",children:e.memBytes!==null?Ta(e.memBytes):"—"}),f.jsx("span",{className:"k",children:"GPUs"}),f.jsx("span",{className:"v",children:e.gpus.length===0?"none detected (nvidia-smi)":e.gpus.map(s=>`${s.name}${s.memMib!==null?` — ${Ta(s.memMib*1024*1024)}`:""}`).join(", ")})]}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",JMe()]})})}function V_t(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{$et().then(n).catch(s=>r(s instanceof Error?s.message:String(s)))},[]),f.jsx(f.Fragment,{children:t?f.jsx("div",{className:"error",children:t}):e?e.loggedIn?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Wc,children:[f.jsx("span",{className:"k",children:Zp()}),f.jsx("span",{className:"v",children:f.jsx(Ot,{variant:"success",children:gN()})}),f.jsx("span",{className:"k",children:GIe()}),f.jsx("span",{className:"v",children:e.orgs.length>0?e.orgs.join(", "):"—"}),f.jsx("span",{className:"k",children:$$e()}),f.jsx("span",{className:"v",children:e.sshKeyStatus==="matched"?f.jsx(Ot,{variant:"success",children:SIe()}):e.sshKeyStatus==="no_local_match"?f.jsx(Ot,{variant:"warning",children:oIe()}):e.sshKeyStatus==="none_registered"?f.jsx(Ot,{variant:"error",children:UOe()}):f.jsx(Ot,{children:bN()})})]}),e.sshKeyStatus==="none_registered"&&(e.sshKeyPath?f.jsxs("p",{dir:"auto",className:ys,children:[IAe()," ",f.jsxs("code",{children:["orx ssh-key add ",e.sshKeyPath]}),"."]}):f.jsxs("p",{dir:"auto",className:ys,children:[TOe()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),kHe()," ",f.jsx("code",{children:"orx ssh-key add"}),"."]})),e.sshKeyStatus==="no_local_match"&&(e.sshKeyPath?f.jsx("p",{dir:"auto",className:ys,children:qPe({register:ke(`orx ssh-key add ${e.sshKeyPath}`),load:ke("ssh-add")})}):f.jsxs("p",{dir:"auto",className:ys,children:[NOe()," ",f.jsx("code",{children:"ssh-add"}),IIe()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),e.error&&f.jsx("p",{dir:"auto",className:ys,children:e.error})]}):f.jsx("p",{className:ys,children:Kze({command:ke("orx login")})}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",MTe()]})})}const Tp={local:PE,tinker:yoe,hf:qae,modal:toe,k8s:Kae,ssh:goe,slurm:hoe,ray:coe,openresearch:ioe},W_t={local:mae,ssh:Oae,tinker:Hae,hf:lae,modal:xae,k8s:fae,slurm:Mae,ray:zae,openresearch:kae},S4={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"},K_t={local:Roe,ssh:Joe,tinker:rle,hf:Coe,modal:Ioe,k8s:joe,slurm:Yoe,ray:Goe,openresearch:Poe};function Y_t(e){switch(e.id){case"local":return Die();case"ssh":return eae({summary:ke(e.summary)});case"tinker":return sae({summary:ke(e.summary)});case"hf":return Eie({summary:ke(e.summary)});case"modal":return Bie({summary:ke(e.summary)});case"k8s":return Aie({summary:ke(e.summary)});case"slurm":return Xie({summary:ke(e.summary)});case"ray":return Vie({summary:ke(e.summary)});case"openresearch":return Fie({summary:ke(e.summary)})}}function X_t({target:e}){return f.jsxs("dl",{className:"m-0 mt-8 grid grid-cols-[9rem_minmax(0,1fr)] gap-x-5 gap-y-4 font-sans",children:[f.jsx("dt",{className:"text-sm font-medium text-subtext",children:QRe()}),f.jsx("dd",{className:"m-0 text-base leading-relaxed text-text",children:Y_t(e)}),f.jsx("dt",{className:"text-sm font-medium text-subtext",children:yPe()}),f.jsx("dd",{className:"m-0 text-base leading-relaxed text-text",children:K_t[e.id]()})]})}const H8=["hf","modal","slurm","ray","openresearch"],rb=["hf","modal","openresearch"],OT={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"]},P8="__custom__";function Ef(e,n){return!!(n&&!(OT[e]??[]).includes(n))}function Z_t({settings:e,projectId:n,onSaved:t}){const r=e.configuredDefaultBackend??e.defaultBackend??"local",s=e.defaultFlavor??"",[a,l]=M.useState(r),[o,c]=M.useState(s),[d,_]=M.useState(Ef(r,s)),[h,m]=M.useState(!1),[g,S]=M.useState(null),k=e.targets.find(O=>O.id===a),b=e.targets.filter(O=>O.configured||O.id===r),v=H8.includes(a),x=rb.includes(a),y=OT[a]??[],C=a===r&&(!v||o.trim()===s),j=Tp[a](),N=h?RUe():x&&!o.trim()?IEe({destination:j}):a==="ssh"?Fje():Bje({destination:j});M.useEffect(()=>{l(r),c(s),_(Ef(r,s))},[r,s]);async function T(O,H){const P=H8.includes(O);if(!(h||rb.includes(O)&&!H.trim())){m(!0),S(null);try{t(await Iet({backend:O,flavor:P&&H.trim()||null,projectId:n}))}catch(F){S(F instanceof Error?F.message:String(F)),l(r),c(s),_(Ef(r,s))}finally{m(!1)}}}function z(O){const H=e.targets.find(F=>F.id===O);if(!H)return;l(H.id);const P=H.id===r?s:"";c(P),_(Ef(H.id,P)),rb.includes(H.id)||T(H.id,P)}function D(O){if(O===P8){_(!0);return}_(!1),c(O),(!x||O)&&T(a,O)}return f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:YMe()}),f.jsxs("div",{children:[f.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:O=>{O.preventDefault(),C||T(a,o)},children:[f.jsx(oh,{choices:b.map(O=>({id:O.id,label:Tp[O.id]()})),value:a,variant:"field",dropDown:!0,disabled:h,renderIcon:O=>{const H=e.targets.find(P=>P.id===O.id);return H?f.jsx(Nm,{kind:S4[H.id],size:16}):null},onSelect:z}),v&&f.jsx("div",{children:d?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:o,onChange:O=>c(O.target.value),onBlur:()=>{if(x&&!o.trim()){a===r&&(c(s),_(Ef(r,s)));return}C||T(a,o)},placeholder:AMe(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:h}),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":nS(),title:nS(),onMouseDown:O=>O.preventDefault(),onClick:()=>_(!1),children:f.jsx($a,{size:12})})]}):f.jsx(oh,{choices:[{id:"",label:x?REe():Xje()},...o&&!y.includes(o)?[{id:o,label:mNe({value:ke(o)})}]:[],...y.map(O=>({id:O,label:O})),{id:P8,label:DMe()}],value:o,variant:"field",dropDown:!0,disabled:h,onSelect:D})})]}),g&&f.jsx("div",{className:"error mt-2.5",children:g}),k&&!k.configured&&f.jsx("p",{className:ys,children:MHe()})]}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:N})]})}function Q_t({target:e,isDefault:n,onOpen:t}){const r=e.unverified?CEe():e.id==="openresearch"?VFe():e.id==="ray"?Rx():DFe();return f.jsxs("button",{type:"button",className:"group flex min-h-41 w-full flex-col items-start rounded-lg border border-border bg-background p-5 text-start font-sans transition-colors duration-120 ease-standard hover:border-text hover:bg-surface disabled:cursor-default disabled:opacity-52",onClick:t,disabled:!e.enabled,children:[f.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:f.jsx(Nm,{kind:S4[e.id],size:48})}),f.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:Tp[e.id]()}),f.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:W_t[e.id]()}),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?fN():e.configured?GUe():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(G0,{size:16})})]})]})}function J_t({target:e,isDefault:n,onBack:t,remote:r}){return f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"settings-back mb-10 inline-flex items-center gap-2 text-sm font-medium text-subtext hover:text-text",onClick:t,children:[f.jsx(Zf,{size:16})," ",uN()]}),f.jsxs("div",{className:"flex items-center justify-between gap-6",children:[f.jsxs("div",{className:`flex min-w-0 items-center ${e.id==="tinker"?"gap-8":"gap-5"}`,children:[f.jsx("span",{className:"flex h-20 w-24 flex-none items-center justify-start",children:f.jsx(Nm,{kind:S4[e.id],size:72})}),f.jsx("h1",{className:"m-0 min-w-0",children:Tp[e.id]()})]}),n&&f.jsx(Ot,{className:"flex-none border-primary bg-primary-subtle text-primary",children:fN()})]}),f.jsx(X_t,{target:e}),e.id!=="tinker"&&f.jsxs("div",{className:"mt-8 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==="local"&&f.jsx(G_t,{}),e.id==="hf"&&f.jsx(s0t,{}),e.id==="modal"&&f.jsx(I_t,{}),e.id==="k8s"&&f.jsx(D_t,{}),e.id==="ssh"&&f.jsx(H_t,{remote:r}),e.id==="slurm"&&f.jsx(F_t,{remote:r}),e.id==="ray"&&f.jsx(U_t,{}),e.id==="openresearch"&&f.jsx(V_t,{})]})]})}function e0t({project:e,onViewHistory:n,remote:t}){const[r,s]=M.useState(null),[a,l]=M.useState(null),[o,c]=M.useState(null),[d,_]=M.useState(null),h=M.useRef(0);M.useEffect(()=>{h.current++,s(null),c(null),l(null),_(null)},[e==null?void 0:e.id]),M.useEffect(()=>{const C=++h.current;Oet(e==null?void 0:e.id).then(j=>{C===h.current&&(s(j),l(null))}).catch(j=>{if(C!==h.current)return;const N=j instanceof Error?j.message:String(j);s(T=>(T===null?l(N):_(N),T))})},[o,e==null?void 0:e.id]);const m=C=>{h.current++,s(C),_(null)},g=r?r.targets:null,S=(r==null?void 0:r.configuredDefaultBackend)??(r==null?void 0:r.defaultBackend),k=g?[...g].sort((C,j)=>+(j.id===S)-+(C.id===S)):null,b=(k==null?void 0:k.filter(C=>C.configured))??[],v=(k==null?void 0:k.filter(C=>!C.configured))??[],x=C=>f.jsx(Q_t,{target:C,isDefault:S===C.id,onOpen:()=>c(C.id)},`${(e==null?void 0:e.id)??"none"}:${C.id}`),y=o?r==null?void 0:r.targets.find(C=>C.id===o):null;return y?f.jsx(J_t,{target:y,isDefault:S===y.id,onBack:()=>c(null),remote:t}):f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:dN()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:dMe()}),f.jsx(y0t,{projectId:e==null?void 0:e.id,onViewHistory:n}),a?f.jsx("div",{className:"error",children:a}):r?f.jsxs(f.Fragment,{children:[d&&f.jsx("div",{className:"error",children:d}),f.jsx(Z_t,{settings:r,projectId:e==null?void 0:e.id,onSaved:m}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:YBe()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:b.map(x)})]}),v.length>0&&f.jsxs("section",{className:"mb-3.5",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:RLe()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:v.map(x)})]})]}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",zTe()]})]})}const t0t={env:sze,openresearchEnv:lze,hfCache:eze};function n0t({settings:e}){return e.configured?e.valid?f.jsx(Ot,{variant:"success",children:Ox()}):f.jsx(Ot,{variant:"error",children:kDe()}):f.jsx(Ot,{children:Yp()})}function r0t({settings:e}){return!e.configured||!e.valid?null:e.jobsWrite===!0?f.jsx(Ot,{variant:"success",children:HDe()}):e.jobsWrite===!1?f.jsx(Ot,{variant:"error",children:SOe()}):f.jsx(Ot,{children:ODe()})}function s0t(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[l,o]=M.useState(!1),[c,d]=M.useState(null),_=M.useRef(!1);M.useEffect(()=>{iet().then(m=>{_.current||n(m)}).catch(m=>{_.current||r(m instanceof Error?m.message:String(m))})},[]);async function h(m){if(m.preventDefault(),!(!s.trim()||l)){o(!0),d(null);try{const g=await aet(s.trim());_.current=!0,n(g),r(null),a("")}catch(g){d(g instanceof Error?g.message:String(g))}finally{o(!1)}}}return f.jsxs(f.Fragment,{children:[t?f.jsx("div",{className:"error",children:t}):e?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Wc,children:[f.jsx("span",{className:"k",children:Zp()}),f.jsx("span",{className:"v",children:f.jsx(n0t,{settings:e})}),f.jsx("span",{className:"k",children:Lx()}),f.jsx("span",{className:"v",children:e.username??"—"}),f.jsx("span",{className:"k",children:vN()}),f.jsx("span",{className:"v",children:e.maskedToken??"—"}),f.jsx("span",{className:"k",children:Hx()}),f.jsx("span",{className:"v",children:e.source?t0t[e.source]():Yp()}),f.jsx("span",{className:"k",children:zDe()}),f.jsxs("span",{className:"v",children:[f.jsx(r0t,{settings:e}),(!e.configured||!e.valid)&&"—"]})]}),e.source==="env"&&f.jsx("p",{className:ys,children:qRe()}),e.valid&&e.jobsWrite===null&&f.jsx("p",{className:ys,children:fze({login:ke("hf auth login"),url:ke("huggingface.co/settings/tokens")})})]}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",cLe()]}),f.jsxs("form",{className:Vh,onSubmit:h,children:[f.jsxs("label",{children:[e!=null&&e.configured?_Fe():Vje(),f.jsx("input",{type:"password",value:s,onChange:m=>a(m.target.value),placeholder:HRe(),autoComplete:"off"})]}),c&&f.jsx("div",{className:"error",children:c}),f.jsx("div",{className:"actions",children:f.jsx($e,{variant:"primary",type:"submit",disabled:!s.trim()||l,children:l?PUe():Ll()})})]})]})}const IT=/^hf_[A-Za-z0-9]{10,}$/;function BT(){return f.jsx("tr",{children:f.jsx("td",{colSpan:3,children:f.jsxs("p",{dir:"auto",className:ys,children:[OHe()," ",f.jsx("code",{children:"HF_TOKEN"}),E$e()]})})})}const F8=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function F2(e,n){const t=n instanceof Error?n.message:String(n);Br(t.includes(e)?t:`${e}: ${t}`,"error")}function i0t({name:e,entry:n,onVars:t}){const[r,s]=M.useState(""),[a,l]=M.useState(!1);async function o(){if(!(!r.trim()||a)){l(!0);try{t(await nz(e,r.trim())),s("")}catch(d){F2(e,d)}finally{l(!1)}}}async function c(){if(!a){l(!0);try{t(await get(e))}catch(d){F2(e,d)}finally{l(!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(Ot,{children:oBe()})]}):f.jsx(id,{variant:"inline",className:"text-base",type:"password",value:r,onChange:d=>s(d.target.value),onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),o()),d.key==="Escape"&&!a&&s("")},placeholder:xN(),"aria-label":m$({name:ke(e)}),autoComplete:"new-password",disabled:a})}),f.jsx("td",{children:n?f.jsx(Kt,{className:"[&:hover:not(:disabled)]:text-accent-red",title:Ib({name:ke(e)}),"aria-label":Ib({name:ke(e)}),onClick:()=>void c(),disabled:a,children:f.jsx(xd,{size:13})}):r.trim()&&f.jsx($e,{size:"small",onClick:()=>void o(),disabled:a,children:a?oa():Ll()})})]}),!n&&e!=="HF_TOKEN"&&IT.test(r.trim())&&f.jsx(BT,{})]})}function a0t({onVars:e,onDone:n}){const[t,r]=M.useState(""),[s,a]=M.useState(""),[l,o]=M.useState(!1);async function c(){if(!(!t.trim()||!s.trim()||l)){o(!0);try{e(await nz(t.trim(),s.trim())),n()}catch(_){F2(t.trim(),_)}finally{o(!1)}}}const d=_=>{_.key==="Enter"&&(_.preventDefault(),c()),_.key==="Escape"&&!l&&n()};return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{children:f.jsx(id,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:t,onChange:_=>r(_.target.value),onKeyDown:d,placeholder:"MY_API_KEY","aria-label":rOe(),autoComplete:"off",spellCheck:!1,disabled:l})}),f.jsx("td",{children:f.jsx(id,{variant:"inline",className:"text-base",type:"password",value:s,onChange:_=>a(_.target.value),onKeyDown:d,placeholder:xN(),"aria-label":oOe(),autoComplete:"new-password",disabled:l})}),f.jsxs("td",{children:[f.jsx($e,{size:"small",onClick:()=>void c(),disabled:l||!t.trim()||!s.trim(),children:l?oa():Ll()}),f.jsx(Kt,{title:Rh(),"aria-label":kTe(),onClick:n,disabled:l,children:f.jsx(Zr,{size:13})})]})]}),t.trim()!=="HF_TOKEN"&&IT.test(s.trim())&&f.jsx(BT,{})]})}function o0t(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(!1);M.useEffect(()=>{met().then(n).catch(c=>r(c instanceof Error?c.message:String(c)))},[]);const l=e===null?[]:e.map(c=>c.key).filter(c=>!F8.includes(c)),o=[...F8,...l];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:_Pe()}),f.jsxs($e,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:s||e===null,children:[f.jsx(Gx,{size:12})," ",PAe()]})]}),f.jsx("div",{className:Ia,children:t?f.jsx("div",{className:"error",children:t}):e===null?f.jsxs(jr,{children:[f.jsx(Dt,{})," ",Ol()]}):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:[o.map(c=>f.jsx(i0t,{name:c,entry:e.find(d=>d.key===c),onVars:n},c)),s&&f.jsx(a0t,{onVars:n,onDone:()=>a(!1)})]})})})]})}const Nf=[{value:"system",label:gUe,icon:GQe},{value:"light",label:hUe,icon:_Je},{value:"dark",label:aUe,icon:WQe}],l0t=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"}];function c0t(){const e=Pc(),[n,t]=pz(),r=s=>{var _;const a=s.key==="ArrowRight"||s.key==="ArrowDown"?1:s.key==="ArrowLeft"||s.key==="ArrowUp"?-1:0;if(!a)return;s.preventDefault();const l=[...s.currentTarget.querySelectorAll('[role="radio"]')],o=l.findIndex(h=>h===document.activeElement),d=((o===-1?Nf.findIndex(h=>h.value===n):o)+a+Nf.length)%Nf.length;t(Nf[d].value),(_=l[d])==null||_.focus()};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:iEe()}),f.jsxs("div",{className:`${Ia} mt-3`,children:[f.jsxs("div",{className:`${yo} pb-3.5`,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:uS()}),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":uS(),onKeyDown:r,children:Nf.map(({value:s,label:a,icon:l})=>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(l,{size:14}),a()]},s))})]}),f.jsxs("div",{className:yo,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:qze()}),f.jsx("div",{className:"w-52 flex-none",children:f.jsx(oh,{choices:l0t,value:e,variant:"field",dropDown:!0,onSelect:s=>{SE(s)&&zN(s)}})})]})]})]})}const u0t={installer:EXe,"app-bundle":_Xe,cargo:vXe,homebrew:wXe,nix:AXe,unknown:DXe},sb={cargo:BXe,homebrew:FXe,nix:VXe};function d0t(){var c;const{status:e,error:n,apply:t}=yT(),[r,s]=M.useState(null),[a,l]=M.useState(null);if(!e)return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:lS()}),n?f.jsx("div",{className:Ia,children:f.jsx("div",{className:"error",children:n})}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",Ol()]})]});const o=async(d,_)=>{s(d),l(null);try{await _()}catch(h){l(h instanceof Error?h.message:String(h))}finally{s(null)}};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:lS()}),f.jsxs("div",{className:`${Ia} mt-3`,children:[f.jsxs("div",{className:`${dd} pb-3.5`,children:[f.jsx("div",{className:"k",children:yN()}),f.jsx("div",{className:"v",children:e.current}),f.jsx("div",{className:"k",children:KDe()}),f.jsx("div",{className:"v",children:e.latest??"—"}),f.jsx("div",{className:"k",children:hN()}),f.jsx("div",{className:"v",children:u0t[e.channel]()})]}),e.restartRequired&&f.jsx("div",{className:yo,children:f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:u$e()}),f.jsx("p",{children:wFe({installed:ke(e.installedVersion??"—"),current:ke(e.current??e.installedVersion??"—")})})]})}),e.selfUpdates?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:yo,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:iS()}),f.jsxs("p",{children:[JLe(),e.envDisabled&&jUe()]})]}),f.jsx(sy,{type:"button",checked:e.autoUpdate,"aria-label":iS(),disabled:r!==null,onClick:()=>void o("auto",()=>uet(!e.autoUpdate).then(t))})]}),f.jsxs("div",{className:yo,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:e.updateAvailable?CUe({version:ke(e.latest??"—")}):gEe()}),f.jsx("p",{children:e.updateAvailable?Mze():jEe()})]}),f.jsx($e,{size:"small",type:"button",disabled:r!==null,onClick:()=>void o("apply",()=>cet().then(t)),children:r==="apply"?Mx():e.updateAvailable?yUe():yEe()})]})]}):f.jsx("div",{className:yo,children:f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:YIe()}),f.jsx("p",{children:((c=sb[e.channel])==null?void 0:c.call(sb))??KPe()})]})}),e.channel==="app-bundle"&&f.jsx(h0t,{busy:r,run:o}),a&&f.jsx("div",{className:"error",children:a})]})]})}function f0t(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null);M.useEffect(()=>{Qet().then(n).catch(o=>a(o instanceof Error?o.message:String(o)))},[]);const l=()=>{!e||t||(r(!0),a(null),Jet(!e.preferenceEnabled).then(n).catch(o=>a(o instanceof Error?o.message:String(o))).finally(()=>r(!1)))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:oPe()}),e?f.jsxs("div",{className:`${Ia} mt-3`,children:[f.jsxs("div",{className:yo,children:[f.jsxs("div",{children:[f.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[tS(),e.locked&&e.reason&&f.jsx($z,{content:`${EMe()} ${e.reason}.`,className:"text-subtext",children:f.jsx($N,{size:15})})]}),f.jsx("p",{children:dOe()})]}),f.jsx(sy,{type:"button",checked:e.enabled,"aria-label":tS(),disabled:t||e.locked,onClick:l})]}),s&&f.jsx("div",{className:"error",children:s})]}):s?f.jsx("div",{className:"error",children:s}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",Ol()]})]})}function h0t({busy:e,run:n}){const[t,r]=M.useState(null),[s,a]=M.useState(!1),l=o=>void n("cli",()=>det(o).then(c=>{r(c),a(!1)}).catch(c=>{throw a(!o&&String((c==null?void 0:c.message)??c).includes("--force")),c}));return f.jsxs("div",{className:yo,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:kze({command:ke("orx")})}),t?f.jsxs("p",{children:[t.alreadyCurrent?GEe({link:ke(t.link)}):YEe({link:ke(t.link)}),!t.onPath&&tEe({directory:ke(t.dir)})]}):f.jsx("p",{children:xze({command:ke("orx")})})]}),f.jsx($e,{size:"small",type:"button",disabled:e!==null,onClick:()=>l(s),children:e==="cli"?Mx():s?uFe():t?QPe():mze()})]})}function _0t(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null),l=()=>(a(null),Yx().then(n).catch(c=>a(c instanceof Error?c.message:String(c))));M.useEffect(()=>void l(),[]);const o=()=>{if(!e||t)return;const c=!e.githubForNewProjects;r(!0),a(null),cz(c,!0).then(n).catch(d=>a(d instanceof Error?d.message:String(d))).finally(()=>r(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:kRe()}),e?f.jsxs("div",{className:`${Ia} 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:zRe()}),f.jsx(Ot,{variant:e.githubAuthenticated?"success":e.ghInstalled?"warning":"error",children:e.githubAuthenticated?iN():cN()})]}),f.jsxs("div",{className:yo,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:sS()}),f.jsx("p",{children:CPe()})]}),f.jsx(sy,{type:"button",checked:e.githubForNewProjects,"aria-label":sS(),disabled:t||!e.githubAuthenticated&&!e.githubForNewProjects,onClick:o})]}),!e.githubAuthenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx($T,{ghInstalled:e.ghInstalled,onCheck:l})}),s&&f.jsx("div",{className:"error",children:s})]}):s?f.jsx("div",{className:"error",children:s}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",Ol()]})]})}function $T({ghInstalled:e,onCheck:n}){const[t,r]=M.useState(!1),s=()=>{r(!0),n().finally(()=>r(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper m-0 text-sm leading-relaxed text-text",children:Gh(e?EFe():zze())}),f.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&f.jsxs(r2,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[hDe()," ",f.jsx(Dc,{size:12})]}),f.jsx($e,{type:"button",variant:e?"warning":"default",disabled:t,onClick:s,children:t?Kp():hEe()})]})]})}function p0t(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null);return M.useEffect(()=>{ZJe().then(l=>n(l.hasToken)).catch(l=>a(l instanceof Error?l.message:String(l)))},[]),f.jsxs("div",{className:P2,children:[f.jsx("h3",{children:JIe()}),f.jsxs("div",{className:dd,children:[f.jsx("span",{className:"k",children:MRe()}),f.jsx("span",{className:"v",children:f.jsx(Ot,{variant:e?"success":"default",children:e===null?s?KE():Kp():e?AFe():wAe()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:jPe()}),e?f.jsx("div",{className:Q0,children:f.jsx($e,{disabled:t,onClick:()=>{r(!0),a(null),QJe().then(l=>n(l.hasToken)).catch(l=>a(l instanceof Error?l.message:String(l))).finally(()=>r(!1))},children:t?aFe():nFe()})}):f.jsx(r_t,{save:ez,onSaved:l=>n(l.hasToken),placeholder:rBe(),createHref:"https://www.overleaf.com/user/settings"}),s&&f.jsx("div",{className:"error",children:s})]})}function m0t({project:e,publicationError:n,onProjectUpdate:t}){const[r,s]=M.useState(null),[a,l]=M.useState(!1),[o,c]=M.useState(null),[d,_]=M.useState(!1),[h,m]=M.useState(!1),[g,S]=M.useState(null),k=M.useRef(0),b=!!(r!=null&&r.github.owner&&r.github.repo),v=(j=!0)=>{const N=++k.current;return j&&s(null),c(null),e?Ket(e.id).then(T=>{N===k.current&&s(T)}).catch(T=>{N===k.current&&c(T instanceof Error?T.message:String(T))}):Promise.resolve()};M.useEffect(()=>void v(),[e==null?void 0:e.id]);const x=j=>{const N=j instanceof Error?j.message:String(j);return N.toLowerCase().includes("archived")?BNe():N.includes("(fetch first)")||N.includes("non-fast-forward")?FNe():N.includes("403")||N.toLowerCase().includes("permission denied")?VNe():N},y=()=>{e&&(l(!0),c(null),Xet(e.id).then(j=>{s(j.git),t(j.project),Yx().then(N=>{!N.githubForNewProjects&&!N.githubDefaultPromptSeen&&_(!0)}).catch(()=>{})}).catch(j=>c(x(j))).finally(()=>l(!1)))},C=j=>{m(!0),S(null),cz(j,!0).then(()=>_(!1)).catch(N=>S(N instanceof Error?N.message:String(N))).finally(()=>m(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:a$e()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:vFe({project:(e==null?void 0:e.name)??fNe()})}),e?o&&!r?f.jsx("div",{className:"error",children:o}):r?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:P2,children:[f.jsx("h3",{children:gLe()}),f.jsxs("div",{className:dd,children:[f.jsx("span",{className:"k",children:bBe()}),f.jsx("span",{className:"v",children:r.path}),f.jsx("span",{className:"k",children:"Git"}),f.jsx("span",{className:"v",children:r.gitVersion??XE()}),f.jsx("span",{className:"k",children:W$e()}),f.jsx("span",{className:"v",children:r.initialized?DNe({branch:ke(r.currentBranch??oN()),state:r.clean?PEe():XNe()}):vAe()}),f.jsx("span",{className:"k",children:hTe()}),f.jsx("span",{className:"v",children:r.baselineBranch}),f.jsx("span",{className:"k",children:n$e()}),f.jsx("span",{className:"v",children:r.remotes.length?r.remotes.map(j=>`${j.name}: ${j.url}`).join(" · "):Dx()})]}),!r.initialized&&f.jsx("div",{className:Q0,children:f.jsx($e,{variant:"primary",onClick:()=>void Yet(e.id).then(s).catch(j=>c(String(j))),children:nDe()})})]}),f.jsxs("div",{className:P2,children:[f.jsx("h3",{children:"GitHub"}),f.jsxs("div",{className:dd,children:[f.jsx("span",{className:"k",children:nTe()}),f.jsx("span",{className:"v",children:f.jsx(Ot,{variant:r.github.authenticated?"success":r.github.ghInstalled?"warning":"error",children:r.github.authenticated?iN():cN()})}),f.jsx("span",{className:"k",children:NBe()}),f.jsx("span",{className:"v",children:b?f.jsxs(f.Fragment,{children:[f.jsxs("span",{children:[r.github.owner,"/",r.github.repo]}),!r.github.enabled&&f.jsx(Ot,{children:lHe()})]}):f.jsx(Ot,{children:hLe()})}),r.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:sHe()}),f.jsx("span",{className:"v",children:r.github.syncStatus})]})]}),!r.github.authenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx($T,{ghInstalled:r.github.ghInstalled,onCheck:()=>v(!1)})}),r.github.authenticated&&!r.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:b?IUe():lNe()}),f.jsxs("div",{className:Q0,children:[b&&r.github.url&&f.jsxs(r2,{href:r.github.url,target:"_blank",rel:"noreferrer",children:[oS()," ",f.jsx(Dc,{size:12})]}),f.jsx($e,{variant:"primary",disabled:a,onClick:y,children:a?s9e():e9e()})]})]}),r.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:oRe()}),f.jsxs("div",{className:Q0,children:[r.github.url&&f.jsxs(r2,{href:r.github.url,target:"_blank",rel:"noreferrer",children:[oS()," ",f.jsx(Dc,{size:12})]}),f.jsx($e,{disabled:a,onClick:()=>{l(!0),Zet(e.id).then(j=>{s(j.git),t(j.project)}).catch(j=>c(j instanceof Error?j.message:String(j))).finally(()=>l(!1))},children:a?l9e():XCe()})]})]})]}),f.jsx(p0t,{}),n&&f.jsx("div",{className:"error",children:x(n)}),o&&f.jsx("div",{className:"error",children:x(o)})]}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",Ol()]}):f.jsx("div",{className:Ia,children:f.jsx("p",{className:ys,children:NIe()})}),d&&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:()=>C(!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:j=>j.stopPropagation(),children:[f.jsx("h2",{id:"github-default-title",children:CLe()}),f.jsx("p",{children:zHe()}),g&&f.jsx("div",{className:"error",children:g}),f.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[f.jsx($e,{disabled:h,onClick:()=>C(!1),children:rIe()}),f.jsx($e,{variant:"primary",disabled:h,onClick:()=>C(!0),children:h?oa():Qze()})]})]})})]})}const g0t={env:DWe,config:BWe,xdg:FWe,default:AWe},ib={preparing:wWe,copying:QVe,verifying:VWe,finalizing:nWe},v0t=e=>{var n;return((n=ib[e])==null?void 0:n.call(ib))??e};function b0t(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[l,o]=M.useState(!1),[c,d]=M.useState(null),[_,h]=M.useState({kind:"idle"}),[m,g]=M.useState(null),S=()=>vet().then(C=>{n(C),a(j=>j||C.current)}).catch(C=>r(C instanceof Error?C.message:String(C)));M.useEffect(()=>{S()},[]),M.useEffect(()=>Ott(C=>{C.type==="progress"?h(j=>{const N=j.kind==="moving"?j.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||N}}):C.type==="done"?(h({kind:"done",oldPathLeft:C.oldPathLeft}),d(null),a(""),S()):C.type==="error"&&h({kind:"error",message:C.error})}),[]);const k=(e==null?void 0:e.source)==="env",b=s.trim(),v=e!==null&&b===e.current;async function x(){if(!(l||!b)){o(!0),g(null),d(null);try{d(await bet(b))}catch(C){g(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function y(C){if(C.preventDefault(),!(_.kind==="moving"||!b||v)&&(g(null),!!window.confirm(uWe({path:ke(b)})))){h({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await xet(b)}catch(j){h({kind:"idle"}),g(j instanceof Error?j.message:String(j))}}}return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:eHe()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:nUe()}),t?f.jsx("div",{className:Ia,children:f.jsx("div",{className:"error",children:t})}):e?f.jsxs("div",{className:Ia,children:[f.jsx("div",{className:"settings-card-head mb-3",children:f.jsx("h3",{children:BMe()})}),f.jsxs("div",{className:dd,children:[f.jsx("span",{className:"k",children:wMe()}),f.jsx("span",{className:"v",children:e.current}),f.jsx("span",{className:"k",children:Hx()}),f.jsx("span",{className:"v",children:g0t[e.source]()})]}),!k&&f.jsxs("form",{className:Vh,onSubmit:y,children:[f.jsxs("label",{children:[YLe(),f.jsx("input",{className:"text-sm",type:"text",value:s,onChange:C=>{a(C.target.value),d(null)},placeholder:"/absolute/path/to/openresearch",autoComplete:"off",spellCheck:!1,disabled:_.kind==="moving"})]}),c&&!c.error&&c.ok&&f.jsxs("p",{className:ys,children:[GBe()," ",Ta(c.treeBytes??0),c.freeBytes!=null&&` — ${aWe({size:ke(Ta(c.freeBytes))})}`,c.sameFilesystem?EWe():"","."]}),c&&c.ok===!1&&c.error&&f.jsx("div",{className:"error",children:c.error}),m&&f.jsx("div",{className:"error",children:m}),_.kind==="moving"&&f.jsx(wT,{value:_.copied,max:_.total,label:v0t(_.phase),caption:_.total>0?f.jsxs("span",{className:"text-sm",children:[Ta(_.copied)," / ",Ta(_.total)]}):void 0}),_.kind==="done"&&f.jsxs("p",{className:ys,children:[PLe(),_.oldPathLeft&&f.jsxs(f.Fragment,{children:[" ",AAe({path:ke(_.oldPathLeft)})]})]}),_.kind==="error"&&f.jsxs("div",{className:"error",children:[ILe()," ",_.message]}),f.jsxs("div",{className:"actions",children:[f.jsx($e,{type:"button",onClick:x,disabled:l||!b||v||_.kind==="moving",children:l?Kp():cEe()}),f.jsx($e,{variant:"primary",type:"submit",disabled:!b||v||_.kind==="moving",children:_.kind==="moving"?vWe():_We()})]})]})]}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",Ol()]})]})}const U2=e=>e==="running"||e==="starting";function x0t(e){return U2(e.status)?mp(Date.now()-e.createdAt):e.endedAt?mp(e.endedAt-e.createdAt):"—"}function HT({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:cTe()}),f.jsx("th",{children:Zp()}),f.jsx("th",{children:U$e()}),f.jsx("th",{children:w$e()})]})}),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(v4,{backend:t.backend}),r&&f.jsx(rm,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:aS(),"aria-label":aS(),onClick:a=>a.stopPropagation(),children:f.jsx(Dc,{size:12})})]})}),f.jsx("td",{children:f.jsx(ko,{status:Hi(t)})}),f.jsx("td",{children:La(t.createdAt)}),f.jsx("td",{children:x0t(t)})]},t.id)})})]})})}function y0t({projectId:e,onViewHistory:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[l,o]=M.useState(!1),[,c]=M.useState(0);M.useEffect(()=>{const g=setInterval(()=>c(S=>S+1),3e4);return()=>clearInterval(g)},[]);const d=()=>{if(!e){r([]);return}o(!0),Kx(e).then(g=>{r(g),a(null)}).catch(g=>{a(g instanceof Error?g.message:String(g)),r(S=>S??[])}).finally(()=>o(!1))};M.useEffect(()=>d(),[e]);const _=(g,S)=>S.createdAt-g.createdAt,h=t==null?void 0:t.filter(g=>U2(g.status)).sort(_),m=t==null?void 0:t.filter(g=>!U2(g.status)).sort(_);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:[v$e(),h&&h.length>0&&f.jsx("span",{className:"count-badge",children:h.length})]})}),f.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[f.jsxs($e,{size:"small",onClick:d,disabled:l,children:[f.jsx(bd,{size:12,className:l?"animate-[spin_0.9s_linear_infinite]":""})," ",Xp()]}),f.jsx($e,{size:"small",onClick:n,children:m!=null&&m.length?ume({count:Yt(m.length)}):ame()})]})]}),s&&f.jsx("div",{className:"error",children:s}),!h||!m?f.jsxs(jr,{children:[f.jsx(Dt,{})," ",Ol()]}):f.jsx(HT,{instances:h,emptyLabel:e?Kpe():nme()})]})}function w0t({projectId:e,onBack:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[l,o]=M.useState(!1),[,c]=M.useState(0);M.useEffect(()=>{const _=setInterval(()=>c(h=>h+1),3e4);return()=>clearInterval(_)},[]);const d=()=>{if(!e){r([]);return}o(!0),Kx(e).then(_=>{r(_.sort((h,m)=>m.createdAt-h.createdAt)),a(null)}).catch(_=>{a(_ instanceof Error?_.message:String(_)),r(h=>h??[])}).finally(()=>o(!1))};return M.useEffect(d,[e]),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(Zf,{size:14})," ",uN()]}),f.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[f.jsx("h1",{children:xDe()}),f.jsxs($e,{size:"small",onClick:d,disabled:l,children:[f.jsx(bd,{size:12,className:l?"animate-[spin_0.9s_linear_infinite]":""})," ",Xp()]})]}),s&&f.jsx("div",{className:"error",children:s}),t?f.jsx(HT,{instances:t,emptyLabel:e?qpe():Qpe()}):f.jsxs(jr,{children:[f.jsx(Dt,{})," ",Ol()]})]})}const PT=["projects","harnesses","storage"],S0t=[{id:"compute",label:dN,icon:f.jsx(cQe,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:Ix,icon:f.jsx(Dh,{size:15}),activeTabs:["environment"]},{id:"settings",label:mN,icon:f.jsx(GN,{size:15}),activeTabs:["settings",...PT]}];function k0t(e){return PT.includes(e)}function C0t({tab:e,project:n,githubPublicationError:t,onProjectUpdate:r,onSelectTab:s,remote:a=!1}){const l=e==="settings"||k0t(e);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 [&_>_.error]:text-accent-red [&_>_.error]:text-base [&_>_.error]:whitespace-pre-wrap [&_>_.error]:mt-0 [&_>_.error]:mx-0 [&_>_.error]:mb-3",children:[l&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:mN()}),f.jsxs("div",{className:"settings-stack mt-4.5",children:[f.jsx("section",{className:ju,children:f.jsx(c0t,{})}),f.jsx("section",{className:ju,children:f.jsx(_0t,{})}),f.jsx("section",{className:ju,children:f.jsx(M_t,{})}),!a&&f.jsx("section",{className:ju,children:f.jsx(b0t,{})}),f.jsx("section",{className:ju,children:f.jsx(f0t,{})}),!a&&f.jsx("section",{className:ju,children:f.jsx(d0t,{})})]})]}),e==="compute"&&f.jsx(e0t,{project:n,onViewHistory:()=>s("instances"),remote:a}),e==="instances"&&f.jsx(w0t,{projectId:n==null?void 0:n.id,onBack:()=>s("compute")}),e==="environment"&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:Ix()}),f.jsx(o0t,{})]}),e==="git"&&f.jsx(m0t,{project:n,publicationError:t,onProjectUpdate:r})]})}function E0t({skills:e,activeIndex:n,onPick:t,onHover:r}){return f.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 min-w-85 max-w-full p-1.5 bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden",children:e.map((s,a)=>f.jsxs("button",{type:"button",className:`skill-item flex flex-col gap-0.5 w-full text-start py-[7px] px-2 rounded-sm [&.active]:bg-surface [&_.skill-name]:text-sm [&_.skill-desc]:text-sm [&_.skill-desc]:text-subtext ${a===n?"active":""}`,onMouseDown:l=>{l.preventDefault(),t(s)},onMouseEnter:()=>r(a),children:[f.jsxs("span",{className:"skill-name flex items-center gap-1.5",children:["/",s.name,s.source!=="command"&&f.jsx(Ot,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:kN()})]}),f.jsx("span",{className:"skill-desc",children:s.description})]},s.name))})}const U8={name:"plan",get description(){return h3e()},source:"command"};function ab(e,n){if(n<0||n>e.length)return null;let t=n;for(;t>0&&!/\s/.test(e[t-1]);)t-=1;if(e[t]!=="/")return null;let r=n;for(;r1&&/[ \t]$/.test(a)&&(a=a.replace(/[ \t]+$/,_=>_.includes(" ")||_.length>=r?_:s));let l=e.slice(n.end);if(!l)l=s;else if(!l.startsWith(` +`)){const _=(c=/^[ \t]+/.exec(l))==null?void 0:c[0];l=_?`${_.length>=r?_:s}${l.slice(_.length)}`:s+l}const o=((d=/^[ \t]+/.exec(l))==null?void 0:d[0].length)??0;return{text:`${a}/${t}${l}`,cursor:a.length+t.length+1+o}}function G8(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 z0t(e,n){const t=e.filter(r=>r.name.toLowerCase()!==U8.name);return n?[U8,...t]:t}function j0t(e,n){if(!n)return null;const t=/(^|\s)\/plan(?=\s|$)/gi;return t.test(e)?{prompt:e.replace(t,"").trim()}:null}function V8(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const A0t=["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"],ob=new Map;function T0t(e,n){const t=`${n}\0${e}`,r=ob.get(t);if(r)return r;const s=ttt(e,n).catch(a=>{throw ob.delete(t),a});return ob.set(t,s),s}function FT(e,n,t,r,s,a=!1){let l=0;return N0t(e,n).map((o,c)=>{const d=l+o.text.length;l=d;const _=o.text.slice(1).toLowerCase();return o.command&&s?s(o.text,_,d,c):o.command?f.jsxs("span",{className:t,onMouseDown:void 0,children:[f.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.text.slice(1)]},c):a?f.jsx("span",{"aria-hidden":"true",children:o.text},c):f.jsx(M.Fragment,{children:o.text},c)})}function M0t({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:a}){const l=M.useRef(null),o=M.useRef(null),c=M.useRef(null),d=M.useId(),[_,h]=M.useState(!1),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState({}),x=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},y=()=>{const N=l.current;if(!N)return;const T=N.getBoundingClientRect(),z=Math.min(420,window.innerWidth-32),D=Math.max(16,Math.min(T.left-4,window.innerWidth-z-16));v(T.top>300?{bottom:window.innerHeight-T.top+12,left:D,width:z}:{left:D,top:T.bottom+12,width:z})},C=()=>{x(),y(),h(!0),!(m!==null||S)&&(k(!0),T0t(n,s).then(g).catch(()=>g(null)).finally(()=>k(!1)))},j=()=>{x(),c.current=window.setTimeout(()=>h(!1),120)};return M.useEffect(()=>()=>x(),[]),M.useEffect(()=>{if(!_)return;const N=()=>y();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[_]),f.jsxs(M.Fragment,{children:[f.jsxs("span",{ref:l,role:"button",tabIndex:0,"aria-controls":d,"aria-expanded":_,"aria-label":DB({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:C,onMouseLeave:j,onFocus:C,onBlur:j,onKeyDown:N=>{var T,z;if(N.key==="Escape"){h(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),C();return}_&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(T=o.current)==null||T.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),_&&(N.key==="ArrowUp"||N.key==="PageUp")&&(N.preventDefault(),(z=o.current)==null||z.scrollBy({top:N.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:N=>{var T,z;N.preventDefault(),(T=a.current)==null||T.focus(),(z=a.current)==null||z.setSelectionRange(t,t),x()},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.jsxs("span",{className:"relative z-1",children:[f.jsx("span",{className:"text-skill-blue-slash",children:"/"}),e.slice(1)]})]}),_&&Il.createPortal(f.jsxs("div",{id:d,ref:o,role:"dialog","aria-label":f$({name:n}),style:{...b,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:x,onMouseLeave:j,onFocus:x,onBlur:j,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(Ot,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:kN()})]}),f.jsx("div",{className:"p-4 text-sm text-text",children:S&&m===null?f.jsx("span",{className:"text-muted",children:QUe()}):f.jsx(Oa,{text:m??r.description})})]}),document.body)]})}function R0t({text:e,isCommand:n}){return f.jsx(f.Fragment,{children:FT(e,n,"skill-chip mx-1 inline-flex items-center rounded-md px-2 py-1 font-medium text-skill-blue transition-colors hover:bg-skill-blue-subtle")})}function D0t({text:e,isCommand:n,skills:t,projectId:r,textareaRef:s}){const a=M.useRef(null);return M.useLayoutEffect(()=>{const l=s.current,o=a.current;if(!l||!o)return;const c=()=>{const _=getComputedStyle(l);for(const h of A0t)o.style.setProperty(h,_.getPropertyValue(h));o.style.width=`${l.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};c();const d=new ResizeObserver(c);return d.observe(l),()=>d.disconnect()},[e,s]),M.useLayoutEffect(()=>{const l=s.current;if(!l)return;const o=()=>{a.current&&(a.current.scrollTop=l.scrollTop)};return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)},[s,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:[FT(e,n,"",void 0,(l,o,c,d)=>{const _=t.find(h=>h.name===o);return _&&_.source!=="command"?f.jsx(M0t,{label:l,name:o,end:c,skill:_,projectId:r,textareaRef:s},`${d}:${c}`):f.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[f.jsx("span",{className:"text-skill-blue-slash",children:"/"}),l.slice(1)]},`${d}:${c}`)},!0),"​"]})}function q2({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"})]})}function UT({host:e,preview:n,currentClientAttached:t,stopping:r,onClose:s,onConfirm:a}){const l=M.useRef(null),o=Math.max(0,n.attachmentCount-(t?1:0)),c=[];return n.activeTurnCount>0&&c.push(n.activeTurnCount===1?pCe():NCe({count:Yt(n.activeTurnCount)})),n.pendingPermissionCount>0&&c.push(n.pendingPermissionCount===1?J8e():A8e({count:Yt(n.pendingPermissionCount)})),o>0&&c.push(o===1?oCe():bCe({count:Yt(o)})),n.queuedMessageCount>0&&c.push(n.queuedMessageCount===1?dCe():SCe({count:Yt(n.queuedMessageCount)})),n.activeRunCount>0&&c.push(n.activeRunCount===1?rCe():F8e({count:Yt(n.activeRunCount)})),y4(l,s),Il.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:d=>{!r&&d.target===d.currentTarget&&s()},children:f.jsxs("div",{ref:l,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:B8e({host:ke(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:Y8e()}),f.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:c.map(d=>f.jsx("li",{children:d},d))})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx($e,{disabled:r,onClick:s,children:Rh()}),f.jsx($e,{variant:"danger",disabled:r,onClick:a,children:r?TCe():D8e()})]})]})}),document.body)}function Of({runtime:e,corner:n=!1}){const[t,r]=M.useState(!1),[s,a]=M.useState(!1),[l,o]=M.useState(!1),[c,d]=M.useState(null),_=Va();async function h(){if(c){o(!0);try{await az(c),d(null)}catch(m){d(null),Br(m instanceof Error?m.message:String(m),"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:_.ref,children:[_.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:xSe({host:ke(e.session.host),user:ke(e.session.user??"")})}),f.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",ke(e.session.version??"…")]})]}),f.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[f.jsx(Nr,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await sz(),_.setOpen(!1)}catch(m){Br(m instanceof Error?m.message:String(m),"error")}finally{r(!1)}},children:t?mSe():Hb()}),f.jsx($z,{content:Zke(),className:"me-2 shrink-0 text-subtext",children:f.jsx($N,{size:15})})]}),f.jsx(Nr,{danger:!0,disabled:s,onClick:async()=>{a(!0);try{d(await iz()),_.setOpen(!1)}catch(m){Br(m instanceof Error?m.message:String(m),"error")}finally{a(!1)}},children:rN()})]}),n?f.jsxs($e,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":_.open,onClick:()=>_.setOpen(m=>!m),children:[f.jsx(q2,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:uv({host:ke(e.session.host)})})]}):f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Kt,{size:"small","aria-label":uv({host:ke(e.session.host)}),"aria-haspopup":"menu","aria-expanded":_.open,onClick:()=>_.setOpen(m=>!m),children:f.jsx(q2,{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:uv({host:ke(e.session.host)})}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",ke(e.session.version??"…")]})]})]})]}),c&&f.jsx(UT,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:l,onClose:()=>{l||d(null)},onConfirm:()=>void h()})]})}function L0t(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const G2=6.5,W8=2*Math.PI*G2;function O0t({usage:e}){return!e||e.usedTokens<=0?null:f.jsx(I0t,{usage:e})}function I0t({usage:e}){const{open:n,setOpen:t,ref:r}=Va(),{usedTokens:s,contextWindow:a}=e,l=a&&a>0?Math.min(100,Math.round(s/a*100)):null,o=l===null?"var(--accent)":L0t(l),c=l===null?"":new Intl.NumberFormat(E(),{style:"percent"}).format(l/100);return f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[f.jsx("button",{type:"button",className:`${l===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:dle(),onClick:()=>t(d=>!d),children:l===null?u0(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:G2,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),f.jsx("circle",{cx:"8",cy:"8",r:G2,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${W8*Math.max(l,2)/100} ${W8}`,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:ole()}),f.jsx("span",{className:"context-meter-value text-text tabular-nums",children:l===null?ple({value:ke(u0(s))}):ble({used:ke(u0(s)),total:ke(u0(a)),percent:ke(c)})})]}),l!==null&&f.jsx(wT,{value:s,max:a,fillColor:o})]})]})}const Mp="!";function K8(e){return e.startsWith(Mp)?e.slice(Mp.length).trim():null}function B0t(e){return e.startsWith(Mp)?e.slice(Mp.length):e}const k4="orx:demo-read-sessions";function qT(){try{const e=JSON.parse(sessionStorage.getItem(k4)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function $0t(e){try{const n=qT();n.add(e),sessionStorage.setItem(k4,JSON.stringify([...n]))}catch{}}function H0t(){try{sessionStorage.removeItem(k4)}catch{}}function P0t(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 F0t(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 U0t(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 V2(e,n){return n?` + +\\[ +${e} +\\] + +`:`\\(${e}\\)`}function q0t(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 G0t(e,n){if(e.length===0)return"";const t=Math.max(...e.map(l=>l.length)),r=l=>`| ${Array.from({length:t},(o,c)=>l[c]??"").join(" | ")} |`,s=n?e[0]:Array.from({length:t},()=>""),a=n?e.slice(1):e;return[r(s),r(Array.from({length:t},()=>"---")),...a.map(r)].join(` +`)}function V0t(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function W0t(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function K0t(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const Y0t={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 lh({variant:e="list",className:n,...t}){return f.jsx("span",{className:us("title",Y0t[e],n),...t})}const GT="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",C4="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",Tl=256,VT=1024,WT=2e4,lb=8,N0="chat-annotations";function Sc(e){return e instanceof Element?e:e.parentElement}function Y8(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function cb(e,n){return Y8(e).compareBoundaryPoints(Range.START_TO_START,Y8(n))<0}function X8(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const X0t=new Set(["A","B","CODE","EM","I","STRONG"]);function Z0t(e,n){var s,a;const t=Sc(e.endContainer);if(Array.from(n.childNodes).every(l=>l.nodeType===Node.TEXT_NODE)){let l=Sc(e.startContainer);for(;l&&l.matches(".md *")&&l.contains(t);){if(X0t.has(l.tagName)){const o=l.cloneNode(!1);o instanceof HTMLElement&&(o.replaceChildren(...Array.from(n.childNodes)),n.replaceChildren(o))}l=l.parentElement}}const r=(s=Sc(e.startContainer))==null?void 0:s.closest("pre");if(r!=null&&r.contains(t)){const l=(a=r.querySelector("code"))==null?void 0:a.cloneNode(!1),o=r.cloneNode(!1);o instanceof HTMLElement&&l instanceof HTMLElement&&(l.replaceChildren(...Array.from(n.childNodes)),o.replaceChildren(l),n.replaceChildren(o))}}function Q0t(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 J0t(e,n){const t=document.createElement("div"),r={container:e.endContainer,offset:e.endOffset};let s={container:e.startContainer,offset:e.startOffset};const a=Array.from(n.querySelectorAll(".katex")).filter(l=>e.intersectsNode(l));for(const l of a){const o=l.closest(".katex-display")??l,c=document.createRange();c.selectNode(o);const d={container:c.startContainer,offset:c.startOffset},_={container:c.endContainer,offset:c.endOffset};if(cb(s,d)&&t.append(X8(s,d)),t.append(o.cloneNode(!0)),s=_,!cb(s,r))break}return a.length===0?t.append(e.cloneContents()):cb(s,r)&&t.append(X8(s,r)),Z0t(e,t),Q0t(t),t}function ept(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>ch(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` + +${G0t(n,!!e.querySelector("tr:first-child th"))} + +`:""}function KT(e){const n=e.tagName==="OL",t=e.getAttribute("start"),r=t===null?1:Number(t);let s=Number.isFinite(r)?r:1;const a=[];for(const l of Array.from(e.children).filter(o=>o instanceof HTMLElement&&o.tagName==="LI")){const o=l.getAttribute("value"),c=o===null?s:Number(o),d=Number.isFinite(c)?c:s;s=d+1;const _=Array.from(l.childNodes).map(h=>h instanceof HTMLElement&&h.matches("UL, OL")?` +${KT(h).trim()} +`:ch(h)).join("").trim();a.push(q0t(n?`${d}.`:"-",_))}return` + +${a.join(` +`)} + +`}function ch(e){var r,s,a,l,o;if(e.nodeType===Node.TEXT_NODE)return P0t(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(ch).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?V2(c,!0):""}if(e.matches(".katex")){const c=(l=(a=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:l.trim();return c?V2(c,!1):""}if(e.tagName==="BR")return` +`;if(e.tagName==="TABLE")return ept(e);if(e.matches("UL, OL"))return KT(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return F0t(e.textContent??"");if(e.tagName==="PRE")return U0t(e.textContent??"");const n=Array.from(e.childNodes).map(ch).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=V0t(e.tagName,n);return t?` + +${t} + +`:e.matches("P, DIV, UL, OL, TABLE")?` + +${n.trim()} + +`:n}function tpt(e,n){return ch(e).replace(/\r\n?/g,` +`).replace(/[ \t]+\n/g,` +`).replace(/\n{3,}/g,` + +`).trim()||n}function Z8(e){return e.normalize("NFKC").replace(/[\s\u200B-\u200D\u2060\uFEFF]/g,"").toLowerCase()}function npt(e,n){var s,a,l,o;if(!W0t(e))return;const t=Z8(e);if(t.length<8)return;let r;for(const c of n.querySelectorAll(".msg-assistant > .md .katex")){const _=[(s=c.querySelector(".katex-mathml"))==null?void 0:s.textContent,(a=c.querySelector(".katex-html"))==null?void 0:a.textContent,c.textContent].filter(S=>!!S).map(Z8).find(S=>K0t(S,t));if(!_)continue;const h=(o=(l=c.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:l.textContent)==null?void 0:o.trim();if(!h)continue;const m=!!c.closest(".katex-display"),g={markdown:V2(h,m).trim(),delta:Math.abs(_.length-t.length)};(!r||g.deltaz.width>0&&z.height>0),S=g[0]??t.getBoundingClientRect(),k=g.filter(z=>z.topS.top),b=k.length>0?k:[S],v=Math.min(...b.map(z=>z.left)),x=Math.max(...b.map(z=>z.right)),y=Math.min(...b.map(z=>z.top)),C=Math.max(...b.map(z=>z.bottom)),j=34,N=74,T=y>=j+lb?y-j-lb:C+lb;return{text:tpt(m,h),range:t.cloneRange(),x:Math.min(window.innerWidth-N,Math.max(N,v+(x-v)/2)),top:T}}function spt(e,n){const[t,r]=M.useState(null),s=M.useRef(!1),a=M.useCallback(()=>{const c=e.current;r(c?rpt(c):null)},[e]);M.useEffect(()=>{let c=null;const d=()=>{s.current||a()},_=m=>{const g=e.current,S=m.target;!m.isPrimary||m.button!==0||!g||!(S instanceof Node)||!g.contains(S)||(s.current=!0,r(null))},h=m=>{!m.isPrimary||!s.current||(s.current=!1,c=window.requestAnimationFrame(a))};return document.addEventListener("selectionchange",d),document.addEventListener("pointerdown",_,!0),window.addEventListener("pointerup",h,!0),window.addEventListener("pointercancel",h,!0),()=>{document.removeEventListener("selectionchange",d),document.removeEventListener("pointerdown",_,!0),window.removeEventListener("pointerup",h,!0),window.removeEventListener("pointercancel",h,!0),c!==null&&window.cancelAnimationFrame(c),s.current=!1}},[a]),M.useEffect(()=>{if(!t)return;const c=d=>{const _=d.target;_ instanceof Element&&_.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",c,!0),window.addEventListener("resize",a),()=>{document.removeEventListener("mousedown",c,!0),window.removeEventListener("resize",a)}},[t,a]);const l=M.useCallback(()=>{var c;t&&(n({text:t.text,range:t.range}),r(null),(c=window.getSelection())==null||c.removeAllRanges())},[t,n]),o=M.useCallback(()=>r(null),[]);return{action:t,add:l,dismiss:o}}function ipt(e){M.useLayoutEffect(()=>{if(!("highlights"in CSS)||typeof Highlight>"u")return;const n=e.flatMap(r=>r.range?[r.range]:[]);if(n.length===0){CSS.highlights.delete(N0);return}const t=new Highlight(...n);return CSS.highlights.set(N0,t),()=>{CSS.highlights.get(N0)===t&&CSS.highlights.delete(N0)}},[e])}function apt({annotation:e}){const n=M.useRef(null),[t,r]=M.useState();return M.useLayoutEffect(()=>{var a;const s=(a=n.current)==null?void 0:a.closest(".chat-thread-inner");r(s?npt(e.text,s):void 0)},[e.id,e.text]),f.jsx("div",{ref:n,children:f.jsx(Oa,{text:t??e.text})})}function opt({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:Oee()}),f.jsx(apt,{annotation:t})]}),n&&f.jsx(Kt,{type:"button",size:"small","data-annotation-remove":!0,title:cee(),"aria-label":BB({number:Yt(r+1)}),onClick:()=>n(t.id),children:f.jsx(Zr,{size:13})})]},t.id))}function E4({annotations:e,variant:n,onClear:t,onRemove:r}){const s=M.useRef(null),a=M.useRef(null),l=M.useId(),o=Va(s),c=n==="sent",d=M.useRef(null),_=()=>{d.current!==null&&window.clearTimeout(d.current),d.current=null,o.setOpen(!0)},h=()=>{d.current=window.setTimeout(()=>{var S;(S=a.current)!=null&&S.contains(document.activeElement)||o.setOpen(!1)},160)},m=()=>{const S=c||!o.open;o.setOpen(S),S&&window.requestAnimationFrame(()=>{var k;return(k=a.current)==null?void 0:k.focus()})},g=S=>{r==null||r(S),window.requestAnimationFrame(()=>{var b,v;(v=((b=a.current)==null?void 0:b.querySelector("button[data-annotation-remove]"))??a.current??s.current)==null||v.focus()})};return M.useEffect(()=>()=>{d.current!==null&&window.clearTimeout(d.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?_:void 0,onMouseLeave:c?h: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":l,onClick:m,children:[f.jsx(HN,{size:c?13:14,className:"text-muted"}),e.length===1?FY():QW({count:Yt(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:t7(),"aria-label":t7(),onClick:t,children:f.jsx(Zr,{size:13})})]}),o.open&&f.jsx("div",{id:l,ref:a,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":Mee(),children:f.jsx(opt,{annotations:e,onRemove:r?g:void 0})})]})}function lpt(e){return f.jsx(E4,{...e,variant:"composer"})}const cpt=["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(" "),Q8=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),upt=["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(" "),dpt=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),W2="prompt-actions flex flex-wrap gap-2",jc="local-",YT="bash",J8=[];function eC(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(jc)),n]}function fpt(e,n){switch(n.type){case"reset":return{messagesBySession:{},busySessions:new Set,queuedBySession:{},activeLeafBySession:{}};case"seed":return n.onlyIfAbsent&&n.sessionId in e.messagesBySession?e:{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:n.messages},queuedBySession:{...e.queuedBySession,[n.sessionId]:n.queued??[]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.activeLeafId??null}};case"upsertMessage":{const t=e.messagesBySession[n.sessionId]??[],r=t.some(o=>o.id===n.message.id),s=e.activeLeafBySession[n.sessionId]??null,a=n.message.role==="user"&&s!==null&&s.startsWith(jc),l=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:eC(t,n.message)},activeLeafBySession:r&&!a&&!l?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.message.id}}}case"localError":{const t=e.messagesBySession[n.sessionId]??[],r={id:`${jc}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(a=>a.id===n.id),s={id:n.id,role:"user",parts:[{id:"p0",type:"tool",tool:YT,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?eC(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((a,l)=>r.push({id:`img${l}`,type:"image",text:a.url,name:a.name})),n.annotations.forEach((a,l)=>r.push({id:`annotation${l}`,type:"annotation",text:a.text}));const s={id:`${jc}${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"busy":{const t=new Set(e.busySessions);return n.busy?t.add(n.sessionId):t.delete(n.sessionId),{...e,busySessions:t}}case"seedBusy":{const t=new Set(n.sessions),r=new Set(n.known);for(const s of e.busySessions)r.has(s)||t.add(s);return{...e,busySessions:t}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[n.sessionId]:n.items}};case"forget":{const t={...e.messagesBySession};delete t[n.sessionId];const r=new Set(e.busySessions);r.delete(n.sessionId);const s={...e.queuedBySession};delete s[n.sessionId];const a={...e.activeLeafBySession};return delete a[n.sessionId],{messagesBySession:t,busySessions:r,queuedBySession:s,activeLeafBySession:a}}}}function hpt(e){if(!e)return"";const n=Math.max(0,Math.floor((Date.now()-e)/1e3));if(n<60)return tSe();const t=Math.floor(n/60);if(t<60)return Z7e({value:Yt(t)});const r=Math.floor(t/60);return r<24?W7e({value:Yt(r)}):U7e({value:Yt(Math.floor(r/24))})}function bc(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function ub(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 _pt(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 xs(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function db(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 a=s[t];if(typeof a=="string"&&a)return a}return null}function fb(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=Tl));s++);return r}function ppt(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 Wu(...e){const n=new Set,t=new RegExp(`^${Ac}$`,"i");let r=0;for(const s of e)for(const a of s){if(n.size>=Tl||r++>=VT)return[...n];t.test(a)&&n.add(a.toLowerCase())}return[...n]}function jm(e){return e.replace(/^Exit code \d+\s*/i,"").split(` +`).filter(n=>!/^\s*\[orx-(?:run|experiment):[^\]]+\]\s*$/.test(n)).join(` +`).trim()}function mpt(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 gpt(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=Ktt(r),XT(r)}function XT(e){return bpt(e).replace(/[\t\r ]+/g," ").trim()}function vpt(e){let n=null,t=!1;for(let r=0;r!a.startsWith("-")&&a.includes(":"));if(!n)return null;const t=n.indexOf(":"),r=n.slice(0,t),s=n.slice(t+1);return r&&QT(s)?{ref:r,path:s}:null}function wpt(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 tC(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 a of n.split("/"))if(!(!a||a===".")){if(a===".."){r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(a);continue}r.push(a)}return`${t?"/":""}${r.join("/")}`||(t?"/":null)}function Spt(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let a=0;a!d.startsWith("-"));if(!o)return null;const c=tC(s,o);if(!c)return null;s=c}return s?tC(s,e):e}const za="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",kpt=new RegExp(`\\bchat_(${za})\\b`,"gi"),Ac=`(?:${za}|[0-9a-f]{8})`;function Ku(e){const n=[];let t="",r="",s=null,a=!1;const l=()=>{(t.trim()||r.trim())&&n.push({raw:t.trim(),code:r.trim()}),t="",r=""},o=d=>{let _=1,h=null,m=!1;for(let g=d;g{let _=!1;for(let h=d;hZtt(t.raw,n))}function Ii(e,n){return Am(e,n).length>0}function Cpt(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,WT).matchAll(kpt))if(n.add(t[0].toLowerCase()),n.size>=Tl)break;return[...n]}function K2(e,n){if(!e)return[];const t=new Set,r=e.slice(0,WT),s=n==="runs"?[new RegExp(`/runs/(${za})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${za})`,"gi"),new RegExp(`^\\s*RUN\\s+(${za})\\b`,"gim"),new RegExp(`={3,}\\s*(${za})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${za})`,"gi"),new RegExp(`^\\s*id:\\s*(${za})`,"gim"),new RegExp(`={3,}\\s*(${za})\\s*={3,}`,"gi")];for(const l of s)for(const o of r.matchAll(l))if(t.add(o[1]),t.size>=Tl)return[...t];const a=new RegExp(`^\\s*(${za})(?:\\s|$)`,"gim");for(const l of r.matchAll(a))if(t.add(l[1]),t.size>=Tl)break;return[...t]}function eM(e,n){let t=0;return n.map(r=>{const s=e.indexOf(r.raw,t),a=s===-1?e.indexOf(r.raw):s;return t=Math.max(t,a+r.raw.length),{invocation:r,offset:Math.max(0,a)}})}function tM(e,n,t,r){const s=new RegExp(`(?:^|[\\s;])(?:export\\s+)?${n}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s;]+))`,"gi");let a="";for(const l of e.matchAll(s)){if((l.index??0)>=t)break;a=l[1]??l[2]??l[3]??""}return[...a.matchAll(new RegExp(r,"gi"))].map(l=>l[0])}function nM(e,n,t,r){const s=new RegExp(`\\bfor\\s+${n}\\s+in\\s+([\\s\\S]*?)(?:;|\\n)\\s*do\\b`,"gi");let a="";for(const l of e.matchAll(s)){const o=l.index??0;if(o>=t)break;const c=o+l[0].length;c<=t&&/\bdone\b/.test(e.slice(c,t))||(a=l[1])}return/\$\(|`/.test(a)?[]:[...a.matchAll(new RegExp(r,"gi"))].map(l=>l[0])}function Ept(e,n,t=[],r=[]){const s=Am(e,"logs"),a=new Set;if(s.length===0){if(!Ii(e,"logs"))return[];const o=t.length>0?[]:K2(n,"runs");for(const c of t.length>0?t:o.length>0?o:r)if(a.add(c),a.size>=Tl)break;return Wu([...a])}let l=!1;for(const{invocation:o,offset:c}of eM(e,s)){const d=sd(o.raw);if((d==null?void 0:d[0])!=="logs")continue;const _=d.slice(1);let h=null;for(let b=0;b<_.length;b++){const v=_[b];if(v!=="--head"){if(v==="--bytes"||v==="--range"){b++;continue}if(!(v.startsWith("--bytes=")||v.startsWith("--range="))){h=v;break}}}if(!h){l=!0;continue}if(new RegExp(`^${Ac}$`,"i").test(h)){a.add(h);continue}const m=/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(h);if(!m){l=!0;continue}const g=m[1],S=tM(e,g,c,Ac);for(const b of S)a.add(b);const k=nM(e,g,c,Ac);for(const b of k)a.add(b);S.length===0&&k.length===0&&(l=!0)}if(a.size===0||l){const o=t.length>0?[]:K2(n,"runs"),c=t.length>0?t:o.length>0?o:r;for(const d of c)if(a.add(d),a.size>=Tl)break}return Wu([...a])}function Au(e,n,t=[],r=[]){const s=Am(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const a=new Set;let l=!1;for(const{invocation:o,offset:c}of eM(e,s)){const d=sd(o.raw),_=(d==null?void 0:d[0])==="exp"&&(d[1]==="status"||d[1]==="desc")?d[2]:null;let h=!1;_&&new RegExp(`^${Ac}$`,"i").test(_)&&(a.add(_),h=!0);const m=_?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(_):null;if(m){const g=m[1],S=tM(e,g,c,Ac);if(S.length>0){for(const b of S)a.add(b);h=!0}const k=nM(e,g,c,Ac);for(const b of k)a.add(b);k.length>0&&(h=!0)}h||(l=!0)}if(a.size===0||l){const o=t.length>0?[]:K2(n,"experiments"),c=t.length>0?t:o.length>0?o:r;for(const d of c)if(a.add(d),a.size>=Tl)break}return Wu([...a])}function Ml(e){var v,x,y,C;const n=e.tool??"tool",t=((v=e.state)==null?void 0:v.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},a={...t,...s},l=xs(a,"command","cmd"),o=ppt(a,"commandArgv"),c=((x=e.state)==null?void 0:x.output)||((y=e.state)==null?void 0:y.error),d=Wu(fb(a,"targetIds")),_=Wu(fb(a,"runTargetIds")),h=Wu(fb(a,"experimentTargetIds")),m=xs(a,"filePath","file_path","notebookPath","notebook_path","path"),g=xs(a,"description"),S=n.toLowerCase().split(/(?::|\.|__)+/),k=S.at(-1)??n.toLowerCase();if(k==="run"&&S.includes("web")){const j=db(a,"search_query","q"),N=db(a,"image_query","q"),T=db(a,"find","pattern");return j?{kind:"web",label:I6({query:j})}:N?{kind:"web",label:jF({query:N})}:T?{kind:"web",label:WF({pattern:T})}:Array.isArray(a.open)?{kind:"web",label:lJ()}:Array.isArray(a.weather)?{kind:"web",label:NZ()}:Array.isArray(a.finance)?{kind:"web",label:bZ()}:Array.isArray(a.sports)?{kind:"web",label:SZ()}:Array.isArray(a.time)?{kind:"web",label:pZ()}:{kind:"web",label:J6()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["subagentactivity","subagent"]]).get(k)??k){case"bash":{if(!l&&!(o!=null&&o.length))return{kind:"command",label:LJ()};const j=gpt(l??(o==null?void 0:o.join(" "))??""),N=Ku(j);let T=N.map(ae=>ae.raw);if(o!=null&&o.length){const ae=Xtt(o);T=ae===null?[o]:Ku(XT(ae)).map(re=>re.raw)}let z=null;for(const ae of T)if(z=Qtt(ae),z)break;const D=T.some(ae=>{const re=sd(ae);return re!==null&&re[0]!=="discover"&&re[0]!=="paper"});if(z&&!D){const ae=z.kind==="discover"?{keyword:dF(),embedding:pF(),openalex:HF(),biorxiv:bF()}[z.strategy]:null,re=z.kind==="discover"?z.query?wH({activity:ae??O6(),query:z.query}):ae??O6():z.id?xf({target:ke(z.id)}):fP();return{kind:z.kind==="paper"?"read":"search",label:re,litCall:z}}if(Ii(j,"agent\\s+spawn"))return{kind:"agent",label:GZ(),spawnedSessionIds:Cpt(c),litCall:z??void 0};const O=N.map(ae=>JT(ae.raw)),H=Ii(j,"exp\\s+status"),P=Ii(j,"exp\\s+desc"),F=Am(j,"exp\\s+desc").some(ae=>(sd(ae.raw)??[]).some(q=>q==="--set"||q.startsWith("--set=")||q==="--stdin")),W=F?yU():lP(),Z=F?M$():VP();if(Ii(j,"logs")){const ae=Ept(j,c,_,d);return{kind:"project",label:ae.length===1?BP():FP(),runIds:ae,litCall:z??void 0}}if(Ii(j,"exp\\s+run"))return{kind:"project",label:Jee(),litCall:z??void 0};if(Ii(j,"exp\\s+wait"))return{kind:"project",label:Rte(),litCall:z??void 0};if(Ii(j,"exp\\s+cancel"))return{kind:"project",label:XX(),litCall:z??void 0};const U=Ii(j,"project\\s+view");if(U&&H&&P)return{kind:"project",label:Z,experimentIds:Au(j,c,h,d),litCall:z??void 0};if(U&&P)return{kind:"project",label:W,experimentIds:Au(j,c,h,d),litCall:z??void 0};if(U&&H)return{kind:"project",label:e7(),experimentIds:Au(j,c,h,d),litCall:z??void 0};if(U)return{kind:"project",label:ZJ(),litCall:z??void 0};if(H&&P)return{kind:"project",label:Z,experimentIds:Au(j,c,h,d),litCall:z??void 0};if(H)return{kind:"project",label:e7(),experimentIds:Au(j,c,h,d),litCall:z??void 0};if(P)return{kind:"project",label:W,experimentIds:Au(j,c,h,d),litCall:z??void 0};if(Ii(j,"runs?"))return{kind:"project",label:UQ(),litCall:z??void 0};if(Ii(j,"projects"))return{kind:"project",label:WQ(),litCall:z??void 0};if(Ii(j,"compute"))return{kind:"project",label:sZ(),litCall:z??void 0};const X=O.map(ypt).find(ae=>ae!=null);if(X){const ae=ub(X.path);return{kind:ae?"skill":"read",label:ae?nv({name:ke(ae)}):xf({target:ke(bc(X.path))}),filePath:X.path,fileRef:X.ref,labelTarget:ae?`${ae} skill`:bc(X.path)}}const J=O.findIndex(ae=>ae!=null&&["sed","cat","head","tail"].includes(ae.name)),$=J>=0?O[J]:null,L=$?xpt($):null,B=L?Spt(L,N,J,xs(a,"cwd","workdir")):null;if(L&&B){const ae=ub(B);return{kind:ae?"skill":"read",label:ae?nv({name:ke(ae)}):xf({target:ke(bc(L))}),filePath:B,labelTarget:ae?`${ae} skill`:bc(L)}}if(O.some(ae=>(ae==null?void 0:ae.name)==="find"||(ae==null?void 0:ae.name)==="ls"||(ae==null?void 0:ae.name)==="rg"&&ae.args.includes("--files")))return{kind:"search",label:o7()};const Y=O.findIndex(ae=>(ae==null?void 0:ae.name)==="rg"||(ae==null?void 0:ae.name)==="grep");if(Y>=0){const ae=wpt(N[Y].raw);return{kind:"search",label:ae?sv({pattern:ke(ae)}):rv(),searchPattern:ae??void 0}}const V=O.find(ae=>(ae==null?void 0:ae.name)==="git"),ie=V==null?void 0:V.args[0];if(ie==="grep"){const ae=V==null?void 0:V.args.slice(1).find(re=>!re.startsWith("-"));return{kind:"search",label:ae?sv({pattern:ke(ae)}):rv(),searchPattern:ae}}if(ie==="status")return{kind:"command",label:dZ()};if(ie==="diff")return{kind:"command",label:Cee()};if(ie==="log")return{kind:"command",label:WJ()};const le=ae=>O.some(re=>!re||!["cargo","pnpm","npm","yarn"].includes(re.name)?!1:re.args[0]===ae||re.args[0]==="run"&&re.args[1]===ae);return le("test")?{kind:"command",label:$J()}:O.some(ae=>(ae==null?void 0:ae.name)==="tsc")||le("typecheck")?{kind:"command",label:TZ()}:le("lint")?{kind:"command",label:eZ()}:le("build")?{kind:"command",label:UX()}:{kind:"command",label:XH({command:ke(j)})}}case"skill":{const j=xs(a,"skill","name"),N=j?_pt(n,j):null;return{kind:"skill",label:j?BH({name:ke(j)}):DH(),filePath:N??void 0,labelTarget:N&&j?`${j} skill`:void 0}}case"read":{const j=m?bc(m):null,N=m?ub(m):null;return N?{kind:"skill",label:nv({name:ke(N)}),filePath:m??void 0,labelTarget:`${N} skill`}:j?{kind:"read",label:xf({target:ke(j)}),filePath:m??void 0,labelTarget:j}:{kind:"read",label:UJ()}}case"edit":case"write":case"notebookedit":{const j=mpt(a),N=m??(j==null?void 0:j.path)??null,T=N?bc(N):null,z=T?(j==null?void 0:j.type)==="add"?K$({target:ke(T)}):(j==null?void 0:j.type)==="delete"?aH({target:ke(T)}):_H({target:ke(T)}):null;return T?{kind:"edit",label:z??r7(),filePath:N??void 0,labelTarget:T}:{kind:"edit",label:r7()}}case"grep":{const j=xs(a,"pattern");return{kind:"search",label:j?sv({pattern:ke(j)}):rv(),searchPattern:j??void 0}}case"glob":{const j=xs(a,"pattern");return{kind:"search",label:j?EH({pattern:ke(j)}):o7()}}case"websearch":{const j=xs(a,"query"),N=xs(a,"url"),T=xs(a,"pattern");return j?{kind:"web",label:I6({query:j})}:T&&N?{kind:"web",label:OF({pattern:T})}:N?{kind:"web",label:VH({target:ke(N)})}:{kind:"web",label:g??J6()}}case"webfetch":{const j=xs(a,"url");return{kind:"web",label:j?xf({target:ke(j)}):g??wP()}}case"task":return{kind:"agent",label:g??eP()};case"subagent":return{kind:"agent",label:Npt(a)};case"error":return{kind:"command",label:wte()};case"contextcompaction":return{kind:"command",label:H$(),progressLabel:q$()};default:{const j=g??m??l??((C=e.state)==null?void 0:C.title)??"";return{kind:"command",label:j?`${n}: ${j}`:n}}}}function Npt(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 iU();case"sendInput":return tU();case"resumeAgent":return AP();case"wait":return CU();case"closeAgent":return O$()}switch(typeof e.kind=="string"?e.kind:""){case"started":return gU();case"interacted":return x$();case"interrupted":return hU()}return cU()}function Rp({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=f.jsx(Dh,{...t});if(e.litCall)r=f.jsx(yz,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=f.jsx(AN,{...t});break;case"read":case"project":r=f.jsx(TN,{...t});break;case"search":r=f.jsx(qN,{...t});break;case"edit":r=f.jsx(qx,{...t});break;case"web":r=f.jsx(AQe,{...t});break;case"agent":r=f.jsx(Wx,{...t});break}return f.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function hb({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,a]=M.useState(!1),l=M.useRef(null),o=M.useRef(!1);return M.useEffect(()=>{var c,d;!s||!o.current||(o.current=!1,(d=(c=l.current)==null?void 0:c.querySelector("button"))==null||d.focus())},[s]),f.jsxs("span",{className:"tool-target-overflow inline",children:[s&&f.jsx("span",{className:"tool-target-reveal",ref:l,children:e.map((c,d)=>f.jsxs("span",{children:[d>0&&", ",n||t?f.jsx("button",{className:"tool-target",...n?zr(_=>n(c.id,_),{stopPropagation:!0}):{onClick:_=>{_.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?FI({target:r}):l$({count:Yt(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),o.current=!s&&c.detail===0,a(d=>!d)},children:s?$E():Xse({count:Yt(e.length)})})]})}function Y2({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:a,experimentName:l}){var o,c,d,_;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:snt(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,f.jsx(IZe,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const h=e.filePath;return f.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...zr(m=>n(h,void 0,void 0,e.fileRef,m),{stopPropagation:!0}),children:e.label})}if((c=e.spawnedSessionIds)!=null&&c.length&&r){const h=e.spawnedSessionIds,m=h.slice(0,3),g=h.slice(m.length).map((S,k)=>({id:S,label:W6({number:Yt(m.length+k+1)})}));return f.jsxs(f.Fragment,{children:[e.label," — ",m.map((S,k)=>f.jsxs("span",{children:[k>0&&", ",f.jsx("button",{className:"tool-target",title:sJ(),onClick:b=>{b.preventDefault(),b.stopPropagation(),r(S)},children:W6({number:Yt(k+1)})})]},S)),g.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(hb,{items:g,onSelect:r,targetType:qW()})]})]})}if((d=e.runIds)!=null&&d.length){const h=s?e.runIds.filter(S=>!!s(S)):e.runIds;if(h.length===0)return e.label;const m=h.slice(0,3),g=h.slice(m.length).map(S=>({id:S,label:(s==null?void 0:s(S))||bo()}));return f.jsxs(f.Fragment,{children:[e.label," — ",m.map((S,k)=>f.jsxs("span",{children:[k>0&&", ",t?f.jsx("button",{className:"tool-target",title:bB({run:ke(S)}),...zr(b=>t(S,b),{stopPropagation:!0}),children:(s==null?void 0:s(S))||bo()}):f.jsx("span",{children:(s==null?void 0:s(S))||bo()})]},S)),g.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(hb,{items:g,onOpen:t,targetType:qne()})]})]})}if((_=e.experimentIds)!=null&&_.length){const h=l?e.experimentIds.filter(S=>!!l(S)):e.experimentIds;if(h.length===0)return e.label;const m=h.slice(0,3),g=h.slice(m.length).map(S=>({id:S,label:(l==null?void 0:l(S))||bo()}));return f.jsxs(f.Fragment,{children:[e.label," — ",m.map((S,k)=>f.jsxs("span",{children:[k>0&&", ",a?f.jsx("button",{className:"tool-target",title:oB({name:(l==null?void 0:l(S))||ke(S)}),...zr(b=>a(S,b),{stopPropagation:!0}),children:(l==null?void 0:l(S))||bo()}):f.jsx("span",{children:(l==null?void 0:l(S))||bo()})]},S)),g.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(hb,{items:g,onOpen:a,targetType:oY()})]})]})}return e.label}function N4(e){const n=e.progressLabel??{skill:FH(),read:EP(),search:ZF(),edit:vH(),project:XP(),web:z$(),agent:nH(),command:zE()}[e.kind];return{...e,label:n}}function rM(e,n){const t=Ml({tool:e,state:{status:"running",input:n}});return{skill:AH(),read:sP(),search:oF(),edit:uH(),project:DP(),web:k$(),agent:Q$(),command:eF()}[t.kind]}function zpt(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const jpt=250;function Apt(e,n){const[t,r]=M.useState(e),s=M.useRef(Date.now()),a=M.useRef(e);return M.useEffect(()=>{if(a.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 l=jpt-(Date.now()-s.current);if(l<=0){s.current=Date.now(),r(e);return}const o=window.setTimeout(()=>{s.current=Date.now(),r(a.current)},l);return()=>window.clearTimeout(o)},[e,t,n]),e!=null&&e.label===(t==null?void 0:t.label)?e:t}const Tpt=160;function sM(e){const[n,t]=M.useState(!1);return M.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),Tpt);return()=>window.clearTimeout(r)},[e]),e&&n}function Mpt(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:DE()}}function Rpt(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 Dpt(e){const n=[];let t=null;for(const r of e){const s=Ml(r),a=Rpt(r,s),l=n[n.length-1];a&&l&&t===a?l.count++:n.push({part:r,activity:s,count:1}),t=a}return n}function Lpt({part:e,busy:n,recovering:t,onRecover:r}){var m,g;const s=(m=e.state)==null?void 0:m.input,a=(s==null?void 0:s.nextRetryAt)??null,[l,o]=M.useState(Date.now());if(M.useEffect(()=>{if(typeof a!="number"||(o(Date.now()),a<=Date.now()))return;const S=window.setInterval(()=>{const k=Date.now();o(k),k>=a&&window.clearInterval(S)},1e3);return()=>window.clearInterval(S)},[a]),e.id==="turn-retry"){const S=Utt(s??{},l);return f.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[f.jsx(Dt,{}),f.jsx("span",{children:S})]})}const c=bz(s==null?void 0:s.recoveryAction),d=s==null?void 0:s.turnId;if(c!=="retry"&&c!=="continue"||!d)return null;const _=c==="retry"?Rc():PK(),h=jm(((g=e.state)==null?void 0:g.error)||Lre());return f.jsxs("div",{className:"turn-recovery-row flex items-center justify-between gap-2 py-1.5 px-2.5 border border-border rounded-md bg-background",children:[f.jsx("span",{className:"min-w-0 truncate text-sm text-accent-red",title:h,children:h}),f.jsx($e,{type:"button",size:"small",disabled:n||t,onClick:()=>r==null?void 0:r(d,c),children:t?lre():_})]})}function nC({part:e,repeatCount:n=1,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,experimentName:o}){const c=e.state,d=Ml(e),_=(c==null?void 0:c.status)==="error",h=jm((c==null?void 0:c.error)||(c==null?void 0:c.output)||""),m=_&&!!h,[g,S]=M.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`,b=f.jsxs(f.Fragment,{children:[_&&f.jsxs("span",{className:"sr-only",children:[Tx()," "]}),_?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(LN,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):f.jsx(Rp,{activity:d,className:"text-muted"}),f.jsxs("span",{className:`${GT} ${_?"text-accent-red":"text-subtext"}`,children:[f.jsx(Y2,{activity:d,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,experimentName:o}),n>1&&f.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:XI({count:Yt(n)}),children:["×",n]})]})]});return m?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:[b,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":g,"aria-controls":k,"aria-label":g?VI({activity:d.label}):s$({activity:d.label}),onClick:()=>S(v=>!v),children:f.jsx(Ha,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${g?"rotate-90":""}`})})]}),g&&f.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:k,children:f.jsx("div",{className:C4,children:h.slice(0,2e4)})})]}):f.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:b})}function Opt({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,experimentName:o}){var j,N,T,z;const[c,d]=M.useState(!1),_=Dpt(e),h=_.map(({activity:D})=>D),m=n?_.at(-1):void 0,g=m==null?void 0:m.part,S=m==null?void 0:m.activity,k=((j=g==null?void 0:g.state)==null?void 0:j.status)!=="error"?(S&&N4(S))??null:null,b=!!g&&((N=g.state)==null?void 0:N.status)==="running"&&!(k!=null&&k.progressLabel)&&(zpt((T=g.state)==null?void 0:T.input)||(k==null?void 0:k.kind)==="command"&&!xs(((z=g.state)==null?void 0:z.input)??{},"command","cmd")),v=Apt(k,b),x=sM(v!=null),y=v??Mpt(h),C=v?v.label:DE();return e.length===1?v?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(Rp,{activity:v,className:x?"tool-running-shimmer-icon":"text-muted"}),f.jsx("span",{className:`${x?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:C,children:f.jsx(Y2,{activity:v,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,experimentName:o})})]})}):f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsx(nC,{part:e[0],onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,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(Rp,{activity:y,className:x?"tool-running-shimmer-icon":"text-muted"}),v?f.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${x?"tool-running-shimmer":""}`,title:C,children:f.jsx(Y2,{activity:v,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,experimentName:o})}):f.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:()=>d(D=>!D),"aria-expanded":c,children:C}),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:()=>d(D=>!D),"aria-expanded":c,"aria-label":c?IK():rY(),children:f.jsx(Ha,{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:_.map(({part:D,count:O})=>f.jsx(nC,{part:D,repeatCount:O,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:l,experimentName:o},D.id))})})})]})}function Ipt({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var _;const s=e.prompt,[a,l]=M.useState([]),o=!n,c=h=>n==null?void 0:n({promptId:e.id,...h});if(s.resolved){if(s.kind==="permission")return null;if(s.kind==="plan"){const g=s.approved===!0?{label:mJ(),icon:mi,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:zJ(),icon:qx,iconClass:"text-accent-amber"}:s.approved===!1?{label:xJ(),icon:Zr,iconClass:"text-accent-red"}:{label:kJ(),icon:td,iconClass:"text-muted"},S=g.icon;return f.jsxs("details",{className:upt,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?LE():g7()}),f.jsx(S,{size:17,strokeWidth:1.8,className:`shrink-0 ${g.iconClass}`}),f.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:g.label}),f.jsx(Ha,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),f.jsxs("div",{className:`${Q8} ms-6`,children:[f.jsx(Oa,{text:s.plan??"",onOpenFile:t}),s.note&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const h=(s.answers??[]).join(", ")||s.note||"",m=(s.annotations??[]).map((g,S)=>({id:`${e.id}-annotation-${S}`,text:g.text}));return f.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[m.length>0&&f.jsx(E4,{annotations:m,variant:"sent"}),f.jsxs("details",{className:cpt,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||cne()}),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 ${h?"chosen":""}`,children:h||One()})]}),f.jsxs("div",{className:Q8,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(g=>{var S;return f.jsx("li",{className:(S=s.answers)!=null&&S.includes(g.label)?"sel":"",children:g.label},g.label)})}),s.note&&s.note!==h&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const h=!!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?nne():g7()}),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 ${h?"clamped":""}`,children:f.jsx(Oa,{text:s.plan??"",onOpenFile:t})}),h&&f.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...zr(m=>r(s.plan??"",e.id,m)),children:jte()}),!o&&!h&&f.jsxs("div",{className:W2,children:[f.jsx($e,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:JY()}),f.jsx($e,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:rX()}),f.jsx($e,{size:"small",onClick:()=>c({approve:!1}),children:tee()})]})]})}if(s.kind==="permission"){const h=s.toolInput??{},m=xs(h,"command","cmd","filePath","file_path","path")||"",g=typeof((_=s.toolInput)==null?void 0:_.reason)=="string"&&s.toolInput.reason||"",S=xs(h,"description")||"",k=g||S||rM(s.tool,h),b=`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":b,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(WN,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),f.jsx("span",{id:b,className:"text-base font-semibold text-text",children:bX()})]}),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}),m&&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:m}),!o&&f.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[f.jsx($e,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:QZ()}),f.jsx($e,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:pX()})]})]})]})}const d=h=>l(m=>s.multiSelect?m.includes(h)?m.filter(g=>g!==h):[...m,h]:[h]);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:dpt,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(h=>{const m=a.includes(h.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 ${m?"sel":""}`,disabled:o,onClick:()=>o?void 0:s.multiSelect?d(h.label):c({answers:[h.label]}),children:[f.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:h.label}),h.description&&f.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:h.description})]},h.label)})}),s.multiSelect&&!o&&f.jsx("div",{className:W2,children:f.jsx($e,{size:"small",variant:"primary",disabled:a.length===0,onClick:()=>c({answers:a}),children:_te()})})]})}function Bpt(e,n){return e.role==="user"?!0:e.parts.some(t=>gp(t,n))}function $pt(e){const n=e.text??"",t=n.startsWith("data:")?n:mtt(n),r=n.startsWith("data:")?"":n.includes("__")?n.slice(n.indexOf("__")+2):n,s=e.name||r||"attachment",a=n.startsWith("data:application/pdf")||/\.pdf$/i.test(s)||/\.pdf$/i.test(n);return{src:t,isPdf:a,name:s}}function Hpt({count:e,index:n,prevId:t,nextId:r,onSelect:s,pagerDisabled:a,onEdit:l,editDisabled:o}){const c=e>1;return f.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${c?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[c&&f.jsxs(f.Fragment,{children:[f.jsx(Kt,{size:"small",title:c7(),"aria-label":c7(),disabled:a||!t,onClick:()=>t&&s(t),children:f.jsx(MN,{size:14})}),f.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[n+1,"/",e]}),f.jsx(Kt,{size:"small",title:l7(),"aria-label":l7(),disabled:a||!r,onClick:()=>r&&s(r),children:f.jsx(Ha,{size:14})})]}),f.jsx(Kt,{size:"small",title:n7(),"aria-label":n7(),disabled:o,onClick:l,children:f.jsx(qx,{size:13})})]})}const Ppt=M.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:l,runExperimentName:o,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:h,onOpenSubagent:m,busy:g=!1,recoveringTurnId:S,onRecover:k,skills:b,predictTextTail:v=!1,forkCount:x,forkIndex:y=0,forkPrevId:C,forkNextId:j,forkDisabled:N,branchDisabled:T,onFork:z,onSelectFork:D}){var Z,U;Pc();const[O,H]=M.useState(null),P=Fpt(n);if(P)return f.jsx(Upt,{part:P});if(n.role==="user"){const X=n.parts.filter(V=>V.type==="text").map(V=>V.text??"").join(` +`),J=V=>!!(b!=null&&b.some(ie=>ie.name===V)),$=n.parts.filter(V=>V.type==="image"&&V.text).map($pt),L=$.filter(V=>!V.isPdf),B=$.filter(V=>V.isPdf),Y=n.parts.filter(V=>V.type==="annotation"&&V.text).map(V=>({id:V.id,text:V.text??""}));if(O!==null){const V=()=>{const ie=O.trim();!ie||N||(H(null),z(n.id,ie))};return f.jsx("div",{className:"msg-user-group 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":iQ(),value:O,autoFocus:!0,onChange:ie=>H(ie.target.value),onKeyDown:ie=>{ie.key==="Escape"?(ie.preventDefault(),H(null)):ie.key==="Enter"&&!ie.shiftKey&&!ie.nativeEvent.isComposing&&(ie.preventDefault(),V())}}),f.jsxs("div",{className:`${W2} justify-end`,children:[f.jsx($e,{size:"small",onClick:()=>H(null),children:TE()}),f.jsx($e,{size:"small",variant:"primary",onClick:V,disabled:N||!O.trim(),children:Bb()})]})]})})}return f.jsxs("div",{className:"msg-user-group group/turn self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[Y.length>0&&f.jsx(E4,{annotations:Y,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]:me-0.5 [&_.skill-chip]:align-baseline",children:[f.jsx(R0t,{text:X,isCommand:J}),L.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:L.map((V,ie)=>f.jsx("a",{href:V.src,target:"_blank",rel:"noreferrer",children:f.jsx("img",{src:V.src,alt:_K()})},ie))}),B.length>0&&f.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:B.map((V,ie)=>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:V.src,target:"_blank",rel:"noreferrer",children:[f.jsx(td,{size:15}),f.jsx("span",{children:V.name})]},ie))})]}),x!==void 0&&f.jsx(Hpt,{count:x,index:y,prevId:C,nextId:j,onSelect:D,pagerDisabled:T,onEdit:()=>H(X),editDisabled:N})]})}const F=n.parts.find(Oh),W=F?n.parts.filter(X=>X!==F):n.parts;return f.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[iM(W,{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:l,runExperimentName:o,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:h,onOpenSubagent:m,predictTextTail:v}),F&&f.jsx(Lpt,{part:F,busy:g,recovering:S===((U=(Z=F.state)==null?void 0:Z.input)==null?void 0:U.turnId),onRecover:k})]})});function Fpt(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===YT?n:null}function Upt({part:e}){var c;const n=e.state,t=xs((n==null?void 0:n.input)??{},"command")??"",r=(n==null?void 0:n.status)==="running",s=(n==null?void 0:n.status)==="error",a=typeof((c=n==null?void 0:n.input)==null?void 0:c.exitCode)=="number"?n.input.exitCode:null,l=[n==null?void 0:n.output,n==null?void 0:n.error].filter(Boolean).join(` +`),o=r?zE():s&&a!==null?AK({code:Yt(a)}):null;return f.jsx("div",{className:"msg-shell 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:[AE()," "]}),f.jsx(Dh,{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})]}),l&&f.jsx("div",{className:`${C4} mt-2`,children:l.slice(0,2e4)}),o&&f.jsx("div",{className:`mt-1.5 text-xs ${s?"text-accent-red":"text-muted"}`,children:o})]})})}function iM(e,n){var x,y;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:l,runExperimentName:o,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:h,onOpenSubagent:m,predictTextTail:g=!1}=n,S=e.filter(C=>C.type!=="steer"&&gp(C,t)).at(-1),k=[];let b=[];const v=()=>{b.length!==0&&(k.push(f.jsx(Opt,{parts:b,pendingTail:b.some(C=>C.id===r),onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:l,runExperimentName:o,onOpenExperiment:c,experimentName:d},`tg-${b[0].id}`)),b=[])};for(const C of e)if(gp(C,t)){if(C.type==="tool"&&(Gpt(C.tool)||(((x=C.children)==null?void 0:x.length)??0)>0)){v(),k.push(f.jsx(Wpt,{part:C,pendingTail:g&&((y=C.state)==null?void 0:y.status)==="running"||C.id===r,onOpenSubagent:m},C.id));continue}if(C.type==="tool"){b.push(C);continue}v(),C.type==="text"?k.push(f.jsx(Oa,{text:C.text,onOpenFile:s,onOpenRun:a,predict:g&&C.id===(S==null?void 0:S.id)},C.id)):C.type==="steer"?k.push(f.jsx("div",{dir:"auto",role:"note","aria-label":Gte(),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(Ipt,{part:C,onRespond:_,onOpenFile:s,onOpenPlan:h},C.id))}return v(),k}function qpt(e){return Ml(e).label}function Gpt(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function aM(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 z4(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&z4(t.children,n);if(r)return r}return null}function Vpt({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:a,onOpenSubagent:l}){var S,k,b,v;const o=e.children??[],c=((S=e.state)==null?void 0:S.status)==="running",d=((k=e.state)==null?void 0:k.status)==="error",_=d?jm(((b=e.state)==null?void 0:b.error)||((v=e.state)==null?void 0:v.output)||""):"",h=iM(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:a,onOpenSubagent:l,predictTextTail:c,pendingTailToolId:c?mz(o):null}),g=o.some(x=>x.type==="text"&&!!x.text)?"":aM(e);return f.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[d&&f.jsxs("span",{className:"sr-only",children:[Tx()," "]}),_&&f.jsx("div",{className:C4,children:_.slice(0,2e4)}),h.length===0&&!g&&!_?f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?Mx():AY()}):f.jsxs(f.Fragment,{children:[h,g&&f.jsx(Oa,{text:g,onOpenFile:n,onOpenRun:t})]})]})}function Wpt({part:e,pendingTail:n,onOpenSubagent:t}){var d,_,h,m;const r=((d=e.state)==null?void 0:d.status)==="error",s=jm(((_=e.state)==null?void 0:_.error)||((h=e.state)==null?void 0:h.output)||""),a=n&&!r?N4(Ml(e)):Ml(e),l=sM(!!(n&&!r)),o=(((m=e.children)==null?void 0:m.length)??0)===0&&!r&&!aM(e),c=f.jsxs(f.Fragment,{children:[r&&f.jsxs("span",{className:"sr-only",children:[Tx()," "]}),r?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(LN,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):f.jsx(Rp,{activity:a,className:`subagent-icon ${l?"tool-running-shimmer-icon":"text-muted"}`}),f.jsx("span",{className:`${GT} ${l?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:a.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:VY(),...zr(g=>t==null?void 0:t(e.id,a.label,g)),disabled:!t,children:[c,f.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:f.jsx(Ha,{size:12})})]})}function Kpt(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,a)=>{var l,o;for(const c of s){const d=`${a}/${c.id}`;c.type==="tool"&&((l=c.state)!=null&&l.status)&&n.set(d,{status:c.state.status,part:c}),(o=c.children)!=null&&o.length&&r(c.children,d)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function j4(e){const n=(t,r)=>{var s;for(const a of t){const l=a.prompt;if(a.type==="prompt"&&(l==null?void 0:l.kind)==="permission"&&!l.resolved){const o=l.toolInput??{},d=xs(o,"reason","description")||rM(l.tool,o);return{id:a.id,path:`${r}/${a.id}`,label:d}}if((s=a.children)!=null&&s.length){const o=n(a.children,`${r}/${a.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 Ypt(e){const[n,t]=M.useState({text:"",sequence:0}),r=M.useRef(null);return M.useEffect(()=>{var S,k,b,v,x;const s=((S=e[0])==null?void 0:S.id)??"",{messageId:a,states:l}=Kpt(e),o=j4(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:a,states:l,permissionPath:(o==null?void 0:o.path)??null},t(y=>({text:o?B6({label:Ra(o.label)}):"",sequence:y.sequence+1}));return}const c=r.current.messageId===a?r.current.states:new Map,d=r.current.permissionPath,_=[...l].filter(([y,C])=>{var j;return((j=c.get(y))==null?void 0:j.status)!==C.status});if(r.current={transcript:s,messageId:a,states:l,permissionPath:(o==null?void 0:o.path)??null},o&&o.path!==d){t(y=>({text:B6({label:Ra(o.label)}),sequence:y.sequence+1}));return}const h=(k=_.find(([,y])=>Oh(y.part)))==null?void 0:k[1].part;if((h==null?void 0:h.id)==="turn-recovery"){const y=bz((v=(b=h.state)==null?void 0:b.input)==null?void 0:v.recoveryAction);t(C=>({text:`${aq()}${y?` ${y==="retry"?HU():OU()}`:""}`,sequence:C.sequence+1}));return}if((h==null?void 0:h.id)==="turn-retry"){t(y=>({text:MU(),sequence:y.sequence+1}));return}const m=_.filter(([,y])=>y.status==="error");if(m.length>0){const y=m.slice(0,2).map(([,C])=>Ml(C.part).label).join(", ");t(C=>({text:m.length===1?QU({labels:y}):nq({count:Yt(m.length),labels:y}),sequence:C.sequence+1}));return}const g=_.filter(([,y])=>y.status==="running");if(g.length>0){const y=(x=g.at(-1))==null?void 0:x[1].part;t(C=>({text:y?N4(Ml(y)).label:qU(),sequence:C.sequence+1}));return}_.some(([,y])=>y.status==="completed")&&t(y=>({text:KU(),sequence:y.sequence+1}))},[e]),n}const Xpt=M.memo(function({messages:n,allMessages:t,canFork:r,onFork:s,onSelectFork:a,busy:l,onOpenFile:o,onOpenRun:c,onOpenSpawnedSession:d,runExperimentName:_,onOpenExperiment:h,experimentName:m,onRespond:g,onOpenPlan:S,onOpenSubagent:k,recoveringTurnId:b,onRecover:v,skills:x}){var D;Pc();const y=((D=j4(n))==null?void 0:D.id)??null,C=M.useMemo(()=>n.filter(O=>Bpt(O,y)),[n,y]),j=M.useMemo(()=>{const O=C.filter(H=>H.role==="user"&&!H.id.startsWith(jc));return Ttt(t,n,O,H=>H.startsWith(jc))},[n,C,t]),N=C.at(-1),T=Ypt(n),z=l?gz(n):null;return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:f.jsx("span",{children:T.text},T.sequence)}),C.map(O=>{var W,Z,U,X,J,$;const H=O.parts.find(Oh),P=(Z=(W=H==null?void 0:H.state)==null?void 0:W.input)==null?void 0:Z.turnId,F=H?l||b!==null:!1;return f.jsx(Ppt,{message:O,forkCount:(U=j.get(O.id))==null?void 0:U.count,forkIndex:(X=j.get(O.id))==null?void 0:X.index,forkPrevId:(J=j.get(O.id))==null?void 0:J.prevId,forkNextId:($=j.get(O.id))==null?void 0:$.nextId,forkDisabled:!r,branchDisabled:l,onFork:s,onSelectFork:a,activePermissionId:y,pendingTailToolId:(z==null?void 0:z.messageId)===O.id?z.toolId:null,onOpenFile:o,onOpenRun:c,onOpenSpawnedSession:d,runExperimentName:_,onOpenExperiment:h,experimentName:m,onRespond:g,onOpenPlan:S,onOpenSubagent:k,busy:F,recoveringTurnId:P===b?b:null,onRecover:v,skills:x,predictTextTail:l&&O===N&&O.role==="assistant"},O.id)})]})}),rC=(e,n)=>e==="all"?!0:e==="archived"?n:!n,oM=[{id:"active",label:oX,railLabel:OE},{id:"archived",label:Z6,railLabel:Z6},{id:"all",label:dX,railLabel:KW}];function Zpt({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=Va();return f.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[f.jsx(Kt,{size:"small",className:"rail-filter-btn",active:e!=="active",title:a7(),"aria-label":a7(),onClick:()=>r(a=>!a),children:f.jsx(VN,{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:oM.map(a=>f.jsxs(Nr,{onClick:()=>{n(a.id),r(!1)},children:[f.jsx("span",{children:a.label()}),e===a.id&&f.jsx(mi,{size:13})]},a.id))})]})}const Qpt=14,Jpt=500,emt=1200;function lM({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*Qpt,Jpt)}ms`},children:t},r))}):f.jsx(f.Fragment,{children:e})}function tmt({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:a,onOpen:l,onRename:o,onSetArchived:c,onDelete:d}){var j;const{open:_,setOpen:h,ref:m}=Va(),g=((j=e.title)==null?void 0:j.trim())||"Untitled",[S,k]=M.useState(!1),[b,v]=M.useState(""),x=M.useRef(null);function y(){var N;v(((N=e.title)==null?void 0:N.trim())||""),k(!0)}function C(){var T;const N=b.trim();k(!1),N&&N!==(((T=e.title)==null?void 0:T.trim())||"")&&o(N)}return M.useEffect(()=>{var N,T;S&&((N=x.current)==null||N.focus(),(T=x.current)==null||T.select())},[S]),f.jsxs("div",{ref:m,role:"button",tabIndex:0,className:`session-row relative flex items-center gap-2 w-full text-start py-[7px] px-2.5 rounded-md text-sm text-text cursor-pointer select-none [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium [&_.session-dot]:w-3.5 [&_.session-dot]:inline-flex [&_.session-dot]:items-center [&_.session-dot]:justify-center [&_.session-dot]:shrink-0 [&_.session-title]:flex-1 [&_.session-title]:min-w-0 [&_.session-title]:overflow-hidden [&_.session-title]:text-ellipsis [&_.session-title]:whitespace-nowrap [&.unread_.session-title]:font-semibold [&_.session-time]:text-xs [&_.session-time]:text-muted [&_.session-time]:shrink-0 [&_.session-menu-btn]:hidden [&_.session-menu-btn]:items-center [&_.session-menu-btn]:justify-center [&_.session-menu-btn]:w-4 [&_.session-menu-btn]:h-4 [&_.session-menu-btn]:-my-0.5 [&_.session-menu-btn]:mx-0 [&_.session-menu-btn]:rounded-sm [&_.session-menu-btn]:text-muted [&_.session-menu-btn]:shrink-0 [&_.session-menu-btn:hover]:text-text [&_.session-menu-btn:hover]:bg-panel [&:hover_.session-menu-btn]:inline-flex [&:focus-within_.session-menu-btn]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-time]:hidden [&:focus-within_.session-time]:hidden [&.menu-open_.session-time]:hidden [&_.busy-dot]:w-[7px] [&_.busy-dot]:h-[7px] [&_.busy-dot]:rounded-full [&_.busy-dot]:bg-primary [&_.busy-dot]:animate-[or-pulse_1.2s_infinite] [&_.busy-dot]:shrink-0 [&_.unread-dot]:w-[7px] [&_.unread-dot]:h-[7px] [&_.unread-dot]:rounded-full [&_.unread-dot]:bg-primary [&_.unread-dot]:shrink-0 [&_.busy-dot.waiting]:animate-none [&_.session-title-input]:flex-1 [&_.session-title-input]:min-w-0 [&_.session-title-input]:py-px [&_.session-title-input]:px-[5px] [&_.session-title-input]:-my-0.5 [&_.session-title-input]:mx-0 [&_.session-title-input]:[font:inherit] [&_.session-title-input]:text-text [&_.session-title-input]:bg-background [&_.session-title-input]:border [&_.session-title-input]:border-primary [&_.session-title-input]:rounded-sm [&_.session-title-input]:outline-none [&.editing]:bg-surface [&.editing]:cursor-default [&.editing_.session-menu-btn]:hidden [&.editing_.session-time]:hidden ${n?"active":""} ${t?"unread":""} ${_?"menu-open":""} ${S?"editing":""}`,title:`${Lf[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?sre():""}`,onClick:()=>{S||(_?h(!1):l())},onKeyDown:N=>{N.target===N.currentTarget&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),_?h(!1):l())},children:[f.jsx("span",{className:"session-dot",children:r?f.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&f.jsx("span",{className:"unread-dot"})}),e.parentSessionId&&!S&&f.jsx(Wx,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),S?f.jsx("input",{ref:x,className:"session-title-input","aria-label":Vee(),value:b,onChange:N=>v(N.target.value),onClick:N=>N.stopPropagation(),onBlur:C,onKeyDown:N=>{N.stopPropagation(),N.key==="Enter"?(N.preventDefault(),C()):N.key==="Escape"&&(N.preventDefault(),k(!1))}}):f.jsx("span",{className:"session-title",children:f.jsx(lM,{title:g,animate:a!==void 0},a??"static")}),f.jsx("span",{className:"session-time",children:hpt(e.updatedAt)}),f.jsx("button",{className:"session-menu-btn",title:_7(),"aria-label":_7(),onClick:N=>{N.stopPropagation(),h(T=>!T)},children:f.jsx(Px,{size:14})}),_&&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(Nr,{onClick:N=>{N.stopPropagation(),h(!1),y()},children:f.jsx("span",{children:RE()})}),f.jsx(Nr,{onClick:N=>{N.stopPropagation(),h(!1),c(!e.archived)},children:f.jsx("span",{children:e.archived?Ure():nK()})}),f.jsx(Nr,{danger:!0,onClick:N=>{N.stopPropagation(),h(!1),d()},children:f.jsx("span",{children:ME()})})]})]})}const sC=[TN,qN,Dh,Fx],_b=[{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"}],iC="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function nmt({onClose:e,onConfigureSsh:n}){const[t,r]=M.useState(null),[s,a]=M.useState([]),[l,o]=M.useState(""),[c,d]=M.useState(null),[_,h]=M.useState(null),m=M.useRef(null);M.useEffect(()=>{Promise.all([rz(),Eet()]).then(([b,v])=>{r(b),a(v)}).catch(b=>d(b instanceof Error?b.message:String(b)))},[]),y4(m,e);async function g(b){const v=window.open("/remote-launch","_blank");if(!v){Br(t8e(),"error");return}h(b);try{const x=await Net(b,{theme:Ett(),locale:E()});v.location.replace(x.gatewayUrl),e()}catch(x){v.close(),Br(x instanceof Error?x.message:String(x),"error")}finally{h(null)}}const S=t==null?void 0:t.filter(b=>b.host.toLocaleLowerCase().includes(l.trim().toLocaleLowerCase())),k=new Map(s.map(b=>[b.host,b]));return Il.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:b=>{b.target===b.currentTarget&&e()},children:f.jsxs("div",{ref:m,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(Kt,{className:"absolute end-3.5 top-3.5","aria-label":MSe(),onClick:e,children:f.jsx(Zr,{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:tN()}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:OSe()}),f.jsx(id,{"data-initial-focus":!0,className:"mt-4",value:l,onChange:b=>o(b.target.value),placeholder:J7(),"aria-label":J7()})]}),f.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:c?f.jsx("p",{className:"m-3 text-sm text-accent-red",children:c}):t===null?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[f.jsx(Dt,{})," ",pN()]}):(S==null?void 0:S.length)===0?f.jsx("p",{className:"m-3 text-sm text-subtext",children:$ke()}):S==null?void 0:S.map(b=>{const v=k.get(b.host);return f.jsxs($e,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:_===b.host,onClick:()=>void g(b.host),children:[f.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:b.host}),_===b.host?f.jsx(Dt,{}):v?f.jsx("span",{className:"text-sm text-subtext",children:Wke()}):null]},b.host)})}),f.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:f.jsxs($e,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[f.jsx(VN,{size:15}),EN()]})})]})}),document.body)}function rmt({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:a,onSelectMainView:l,experimentsActive:o,filesActive:c,artifactsActive:d,onOpenExperiments:_,onOpenArtifacts:h,onOpenFile:m,onOpenRun:g,runExperimentName:S,onOpenExperiment:k,experimentName:b,onOpenPlan:v,onOpenSubagent:x,onOpenWorktree:y,runtime:C,onOpenDemoWelcome:j,composerPrefill:N=null,onActiveSessionChange:T,preferredAgent:z,onPreferredAgentChange:D,children:O}){var t_,Rd,Dd;const[H,P]=M.useState([]),[F,W]=M.useState(!1),[Z,U]=M.useState(!1),[X,J]=M.useState(null),[$,L]=M.useState(new Set),[B,Y]=M.useState("active"),[V,ie]=M.useState(""),[le,ae]=M.useState([]),re=M.useRef(0),q=M.useRef({projectId:e,activeId:X});q.current={projectId:e,activeId:X};const[oe,ce]=M.useState([]),[_e,de]=M.useState(null),[ve,Ce]=M.useState(null),Le=M.useRef(Promise.resolve()),Ue=M.useRef(0),He=M.useRef(0),[Bt,Et]=M.useState(null),Nt=M.useRef(null),cn=M.useRef(!1),vt=M.useRef(null),[rt,Je]=M.useReducer(fpt,{messagesBySession:{},busySessions:new Set,queuedBySession:{},activeLeafBySession:{}}),[qt,we]=M.useState([]),[Oe,Xe]=M.useState(z);M.useEffect(()=>Xe(z),[z]);const[st,tt]=M.useState({}),[zt,bt]=M.useState({}),[Rt,et]=M.useState(null),Vt=M.useRef(!1),jt=M.useRef(null),[Gn,nn]=M.useState(null),ur=M.useRef(null),[yr,An]=M.useState(new Map),Vn=M.useRef(new Map),rn=M.useRef(new Set),wn=M.useRef(new Set),Sn=M.useRef(0),dt=M.useRef([]),un=M.useRef(null),Ye=M.useRef(null),at=M.useRef(!0),[on,$t]=M.useState(!0),Tt=M.useRef(null),Tn=Va(),Wn=M.useCallback(te=>{var me;re.current+=1,ae(ze=>[...ze,{id:`annotation-${re.current}`,...te}]),(me=Tt.current)==null||me.focus()},[]),kn=spt(Ye,Wn);ipt(le),M.useEffect(()=>{ae([]),kn.dismiss()},[X,e,kn.dismiss]);const[Ur,Ui]=M.useState([]),[qr,Cn]=M.useState(0),[Pn,Pe]=M.useState(!1),[ht,Jn]=M.useState(0),pr=M.useRef(!1);M.useEffect(()=>{ett().then(Ui).catch(()=>{})},[a]);function On(te){if(!ns)return;if(te.source==="command"&&te.name==="plan"){ni(V,ns);return}const me=q8(V,ns,te.name,2);ie(me.text),window.requestAnimationFrame(()=>{var ze,je;(ze=Tt.current)==null||ze.focus(),(je=Tt.current)==null||je.setSelectionRange(me.cursor,me.cursor),Jn(me.cursor)})}function _t(te){const me=te.selectionStart;if(pr.current||me!==te.selectionEnd)return!1;const ze=ab(V,me);if(!ze||ze.end!==me||!_a(ze.query))return!1;const je=G8(V,ze);return ie(je.text),Jn(je.cursor),window.requestAnimationFrame(()=>te.setSelectionRange(je.cursor,je.cursor)),!0}function tn(te){de(null);let je=oe.reduce((Ge,kt)=>Ge+kt.size,0);for(const Ge of te){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Ge.type))continue;if(Ge.size>31457280){de(vK({name:ke(Ge.name)}));continue}if(je+Ge.size>41943040){de(wK());continue}je+=Ge.size;const kt=new FileReader;kt.onload=()=>{const Dn=kt.result;ce(Tr=>[...Tr,{dataUrl:Dn,mediaType:Ge.type,name:Ge.name,size:Ge.size}])},kt.readAsDataURL(Ge)}}function Qt(te){const me=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);me.length>0&&(te.preventDefault(),tn(me))}const St=H.find(te=>te.id===X),In=Oe??p_t(qt),_n=St?{harness:St.harness,model:st.model??St.model,serviceTier:st.serviceTier!==void 0?st.serviceTier:St.serviceTier,permissionMode:st.permissionMode??St.permissionMode,reasoningLevel:st.reasoningLevel??St.reasoningLevel}:In?{...In,...st}:null,qe=_n?qt.find(te=>te.id===_n.harness):void 0,Ht=qe==null?void 0:qe.options,Os=M.useMemo(()=>z0t(Ur,Ht==null?void 0:Ht.planActivation),[Ur,Ht==null?void 0:Ht.planActivation]),Cs=K8(V),Es=Cs!==null,ns=ab(V,ht),Is=(ns==null?void 0:ns.query)??null,ca=Is===null?[]:Os.filter(te=>te.name.startsWith(Is)),mr=!Es&&Is!==null&&(ns==null?void 0:ns.end)===ht&&ca.some(te=>te.name!==Is)&&!Pn?ca:[],Bs=mr.length>0,Gr=Math.min(qr,Math.max(0,mr.length-1));M.useEffect(()=>Cn(0),[Is]);const wr=_n&&qe&&qe.models.length>0&&!qe.models.some(te=>te.id===_n.model)?qe.models[0].id:(_n==null?void 0:_n.model)??null,Wt=_n&&{..._n,model:wr,serviceTier:_p(qe,wr,_n.serviceTier),reasoningLevel:dz(qe,wr,_n.reasoningLevel)},Lo=nm(qe,Wt==null?void 0:Wt.model),ei=te=>{if(!Wt)return;const me={...Wt,...te},ze={};te.model!==void 0&&te.model!==Wt.model&&(ze.model=te.model),te.serviceTier!==void 0&&te.serviceTier!==Wt.serviceTier&&(ze.serviceTier=te.serviceTier),te.permissionMode!==void 0&&te.permissionMode!==Wt.permissionMode&&(ze.permissionMode=te.permissionMode),te.reasoningLevel!==void 0&&te.reasoningLevel!==Wt.reasoningLevel&&(ze.reasoningLevel=te.reasoningLevel),bt(je=>({...je,...ze})),Xe(me),D(me).catch(()=>{}),St?tt(je=>({...je,...te})):te.harness&&te.harness!==Wt.harness&&tt({})},dr=M.useCallback(te=>{const me=Le.current.catch(()=>{}).then(te);return Le.current=me.then(()=>{},()=>{}),me},[]),$s=te=>{if(te==="plan"&&(qe==null?void 0:qe.id)==="claude-code"?(bt(je=>({...je,permissionMode:te})),tt(je=>({...je,permissionMode:te}))):(tt(je=>{const Ge={...je};return delete Ge.permissionMode,Ge}),ei({permissionMode:te})),!St)return;const me=St.id,ze=++Ue.current;Ce(null),dr(()=>htt(me,te)).then(je=>{P(Ge=>Ge.map(kt=>kt.id===je.id?je:kt)),Ue.current===ze&&tt(Ge=>{const kt={...Ge};return delete kt.permissionMode,kt})}).catch(()=>{Ue.current===ze&&(tt(je=>{const Ge={...je};return delete Ge.permissionMode,Ge}),Ce(Xre()))})},Oo=te=>ei({reasoningLevel:te}),Kn=(Wt==null?void 0:Wt.harness)==="claude-code"?Wt.permissionMode==="plan":(Ht==null?void 0:Ht.planActivation)==="command"?Bt??(St==null?void 0:St.planMode)??!1:!1;M.useEffect(()=>{Bt===null||(St==null?void 0:St.planMode)!==Bt||(Nt.current=null,Et(null))},[St==null?void 0:St.planMode,Bt]);async function Ci(te){if(bt(je=>({...je,planMode:te})),Nt.current=te,Et(te),!St)return;const me=St.id,ze=++He.current;Ce(null);try{const je=await dr(()=>ftt(me,te));P(Ge=>Ge.map(kt=>kt.id===je.id?je:kt)),He.current===ze&&(Nt.current=null,Et(null),Ce(null))}catch(je){throw He.current===ze&&(Nt.current=null,Et(null)),je}}async function ua(){if((Wt==null?void 0:Wt.harness)==="claude-code"){$s("auto");return}if(St)try{await Ci(!1)}catch{Ce(JK())}}async function ti(){const te=!Kn;try{if((Wt==null?void 0:Wt.harness)==="claude-code")$s(te?"plan":"auto");else if((Ht==null?void 0:Ht.planActivation)==="command")await Ci(te);else throw new Error(av())}catch{Ce(b7())}}function ni(te,me){const ze=G8(te,me);ie(ze.text),Pe(!0),ti(),window.requestAnimationFrame(()=>{var je,Ge;(je=Tt.current)==null||je.focus(),(Ge=Tt.current)==null||Ge.setSelectionRange(ze.cursor,ze.cursor),Jn(ze.cursor)})}dt.current=H;const ds=M.useCallback(async()=>{const te=dt.current.map(me=>me.id);try{const me=(await V0(e)).filter(je=>!wn.current.has(je.id)),ze=new Set(me.map(je=>je.id));for(const je of te)ze.has(je)||Rn(je);return P(je=>{const Ge=new Map(je.map(kt=>[kt.id,kt.contextUsage]));return me.map(kt=>({...kt,contextUsage:kt.contextUsage??Ge.get(kt.id)}))}),Vn.current=new Map(me.map(je=>[je.id,je.title])),Je({type:"seedBusy",sessions:me.filter(je=>je.busy).map(je=>je.id),known:me.map(je=>je.id)}),me}catch{return null}},[e]),Ei=M.useCallback(async te=>{const me=q.current.activeId===te?jt.current:void 0,[{messages:ze,queued:je,activeLeafId:Ge}]=await Promise.all([Hu(te),ds()]),kt=me!==void 0&&q.current.activeId===te&&jt.current!==me;Je({type:"seed",sessionId:te,messages:ze,queued:je,activeLeafId:kt?jt.current:Ge})},[ds,Je]);M.useEffect(()=>{P([]),dt.current=[],J(null);const te=qT();L(e===fv?new Set([KN,YN].filter(me=>!te.has(me))):new Set),ie(""),ce([]),Je({type:"reset"}),rn.current=new Set,An(new Map),Vn.current=new Map,ds().then(me=>{me&&J(ze=>{var je,Ge;return ze??(e===fv?(je=me.find(kt=>kt.id===$f))==null?void 0:je.id:void 0)??((Ge=me.find(kt=>!kt.archived))==null?void 0:Ge.id)??null})})},[e,ds]),M.useEffect(()=>{bt({}),ur.current=null},[X]),M.useEffect(()=>{!X||rn.current.has(X)||(rn.current.add(X),Hu(X).then(({messages:te,queued:me,activeLeafId:ze})=>Je({type:"seed",sessionId:X,messages:te,queued:me,activeLeafId:ze})).catch(()=>{Je({type:"seed",sessionId:X,messages:[],onlyIfAbsent:!0}),rn.current.delete(X)}))},[X]),M.useEffect(()=>Jf(te=>{switch(te.type){case"session":{if(te.session.projectId!==e||wn.current.has(te.session.id))return;const me=Vn.current.has(te.session.id),ze=Vn.current.get(te.session.id)!==te.session.title;Vn.current.set(te.session.id,te.session.title),me&&ze&&te.session.titleSource==="generated"&&(An(je=>{const Ge=new Map(je);return Ge.set(te.session.id,(je.get(te.session.id)??0)+1),Ge}),window.setTimeout(()=>{An(je=>{if(!je.has(te.session.id))return je;const Ge=new Map(je);return Ge.delete(te.session.id),Ge})},emt)),P(je=>{const Ge=je.findIndex(Dn=>Dn.id===te.session.id);if(Ge<0)return[te.session,...je];const kt=je.slice();return kt[Ge]={...te.session,contextUsage:te.session.contextUsage??je[Ge].contextUsage},kt});break}case"sessionDeleted":Rn(te.sessionId);break;case"message":Sn.current++,Je({type:"upsertMessage",sessionId:te.sessionId,message:te.message});break;case"busy":Je({type:"busy",sessionId:te.sessionId,busy:te.busy});break;case"queued":Je({type:"setQueued",sessionId:te.sessionId,items:te.items});break;case"branch":Je({type:"activeLeaf",sessionId:te.sessionId,leafId:te.activeLeafId});break;case"usage":P(me=>me.map(ze=>ze.id===te.sessionId?{...ze,contextUsage:te.usage}:ze));break}}),[e]),M.useEffect(()=>Jf(te=>{if(te.type!=="reconnected"||(ds(),!X||!rn.current.has(X)))return;const me=ze=>{const je=Sn.current;Hu(X).then(({messages:Ge,queued:kt,activeLeafId:Dn})=>{Je({type:"seed",sessionId:X,messages:Ge,queued:kt,activeLeafId:Dn}),ze&&Sn.current!==je&&me(!1)}).catch(()=>{})};me(!0)}),[X,ds]);const ri=X?rt.messagesBySession[X]??J8:J8,Io=X?rt.activeLeafBySession[X]??null:null;jt.current=Io;const Jr=M.useMemo(()=>jtt(ri,Io),[ri,Io]),Bn=X?rt.busySessions.has(X):!1,da=!Bn&&!!(qe!=null&&qe.agentReady),Bo=Bn&&gz(Jr)!=null,Ad=Bn&&Mtt(Jr),fs=X?rt.queuedBySession[X]??[]:[],gr=fs.some(te=>te.dispatchState==="retrying"),Fl=fs.findIndex(te=>te.dispatchState==="blocked"),fa=fs.reduce((te,me)=>me.dispatchState!=="retrying"||typeof me.nextRetryAt!="number"?te:te===null?me.nextRetryAt:Math.min(te,me.nextRetryAt),null),[ha,qi]=M.useState(()=>Date.now());M.useEffect(()=>{if(!gr||fa===null||(qi(Date.now()),fa<=Date.now()))return;const te=window.setInterval(()=>{const me=Date.now();qi(me),me>=fa&&window.clearInterval(te)},1e3);return()=>window.clearInterval(te)},[gr,fa]),M.useEffect(()=>{const te=fs.reduce((me,ze)=>ze.planMode??me,void 0);te!==void 0?(cn.current=!0,Nt.current=te,Et(te)):cn.current&&(cn.current=!1,Nt.current=null,Et(null))},[fs]);const $o=!!X&&!(X in rt.messagesBySession),Ho=M.useMemo(()=>{const te=new Set;for(const me of rt.busySessions)(rt.messagesBySession[me]??[]).some(ze=>ze.parts.some(je=>je.type==="prompt"&&je.prompt&&!je.prompt.resolved&&je.prompt.nativeId))&&te.add(me);return te},[rt.busySessions,rt.messagesBySession]),Ka=X?Ho.has(X):!1,er=St,hs=er?yr.get(er.id):void 0,Ar=M.useMemo(()=>{var te;for(let me=Jr.length-1;me>=0;me--)for(const ze of Jr[me].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},[Jr]),rs=M.useMemo(()=>{const te=er==null?void 0:er.harness;if(!X||te!=="claude-code"&&te!=="codex")return null;for(let me=Jr.length-1;me>=0;me--)for(const ze of Jr[me].parts)if(!(ze.type!=="prompt"||!ze.prompt||ze.prompt.resolved)&&ze.prompt.kind==="question")return ze.prompt.nativeId&&!rt.busySessions.has(X)?null:ze.id;return null},[Jr,er==null?void 0:er.harness,X,rt.busySessions]),Vr=Es&&!rs,_a=te=>!rs&&!Es&&Os.some(me=>me.name===te),[Ns,Ya]=M.useState(null),pa=Ns&&Ns.sessionId===X?Ns:null;M.useEffect(()=>{if(!Ns)return;const te=rt.busySessions.has(Ns.sessionId),me=Ns.sessionId===X&&Ar&&Ar.promptId!==Ns.promptId;(!te||me)&&Ya(null)},[Ns,Ar,rt.busySessions,X]);const ss=M.useMemo(()=>j4(Jr),[Jr]),Mn=Bn&&!!(qe!=null&&qe.supportsSteering)&&!!(qe!=null&&qe.agentReady)&&!Ar&&!rs&&!ss&&oe.length===0&&le.length===0,fr=M.useMemo(()=>v&&X?(te,me,ze)=>v(te,X,me,ze):void 0,[v,X]),Gi=M.useMemo(()=>x&&X?(te,me,ze)=>x(X,te,me,ze):void 0,[x,X]),Vi=M.useMemo(()=>m&&((te,me,ze,je,Ge)=>m(te,X??void 0,me,ze,je,Ge)),[m,X]);M.useEffect(()=>{Ue.current+=1,He.current+=1;const te=(X?rt.queuedBySession[X]??[]:[]).reduce((me,ze)=>ze.planMode??me,void 0);cn.current=te!==void 0,Nt.current=te??null,Et(te??null),tt({}),Ce(null)},[X]),M.useEffect(()=>{T==null||T(X)},[X,T]);const si=a==="chat"&&(Jr.length>0||Bn),_s=(Wt==null?void 0:Wt.harness)??null,Wr=(Wt==null?void 0:Wt.model)??null,[Hs,Sr]=M.useState(null),Ni=(Hs==null?void 0:Hs.projectId)===e&&(Hs.prompts!==null||Hs.harness===_s),Ul=a==="chat"&&!si&&!$o;M.useEffect(()=>{if(!Ul||!_s||Ni)return;let te=!0;return IJe(e,_s,Wr,E()).then(me=>{te&&Sr({projectId:e,harness:_s,prompts:me.prompts})}).catch(()=>{te&&Sr({projectId:e,harness:_s,prompts:null})}),()=>{te=!1}},[e,_s,Wr,Ni,Ul]);const ql=Ni&&Hs?Hs.prompts:null,Xa=_s!==null&&!Ni,Xc=te=>{ie(te),Pe(!1),window.requestAnimationFrame(()=>{const me=Tt.current;me&&(me.focus(),me.setSelectionRange(te.length,te.length),Jn(te.length))})};M.useEffect(()=>{N&&(ie(N),Pe(!1),Jn(N.length))},[N]);const Ps=M.useCallback(te=>{const me=te.scrollHeight-te.scrollTop-te.clientHeight<60;at.current=me,$t(me)},[]),ps=M.useCallback(()=>{at.current=!0,$t(!0);const te=un.current;te&&(te.scrollTop=te.scrollHeight)},[]);M.useLayoutEffect(()=>{ps()},[X,si,ps]),M.useLayoutEffect(()=>{at.current&&ps()},[Jr,Bn,ps]),M.useEffect(()=>{const te=un.current,me=Ye.current;if(!te||!me)return;const ze=new ResizeObserver(()=>{if(at.current){te.scrollTop=te.scrollHeight;return}Ps(te)});return ze.observe(me),ze.observe(te),()=>ze.disconnect()},[si,Ps]);const Td=M.useCallback(te=>{te.currentTarget.blur(),ps()},[ps]);async function Zc({queue:te=!1}={}){var n_,r_,s_,vs,qo;const me=V.trim(),ze=rs?null:j0t(me,Ht==null?void 0:Ht.planActivation),je=!!ze,Ge=!Kn,kt=V8(Ht==null?void 0:Ht.planActivation,je?Ge:void 0,Nt.current),Dn=je&&(qe==null?void 0:qe.id)==="claude-code"?Ge?"plan":"auto":void 0,Tr=ze?ze.prompt:me,zi=oe,ii=le,ma=ii.map(Ln=>({text:Ln.text})),sg=e;let Kl=X;const Ld=()=>{const Ln=q.current;return Ln.projectId===sg&&Ln.activeId===Kl},Yl=()=>{Ld()&&(ie(Ln=>Ln||me),ce(Ln=>Ln.length?Ln:zi),ae(Ln=>Ln.length?Ln:ii))};if(je&&!Tr&&zi.length===0&&ii.length===0){ie(""),Pe(!1);try{if((qe==null?void 0:qe.id)==="claude-code")$s(Ge?"plan":"auto");else if((Ht==null?void 0:Ht.planActivation)==="command")await Ci(Ge);else throw new Error(av())}catch{Ce(b7()),Yl()}return}const kr=Wt?{...Wt,...Dn?{permissionMode:Dn}:{}}:null;Dn&&$s(Dn);let Xl=null;const Od=Nt.current;je&&(Ht==null?void 0:Ht.planActivation)==="command"&&(Xl=++He.current,Nt.current=Ge,Et(Ge));const Uo=()=>{Xl===null||He.current!==Xl||(Nt.current=Od,Et(Od))};if(!Tr&&zi.length===0&&ii.length===0)return;if((Tr||ii.length>0)&&rs&&zi.length===0){ie(""),ae([]),gs({promptId:rs,answers:[],note:Tr||void 0,annotations:ma}).then(Ln=>{Ln||Yl()});return}const Id=JSON.stringify({text:Tr,images:zi.map(Ln=>({mediaType:Ln.mediaType,name:Ln.name,dataUrl:Ln.dataUrl})),annotations:ma,settings:kr?{model:kr.model,serviceTier:kr.serviceTier,permissionMode:kr.permissionMode,planMode:kt,reasoningLevel:kr.reasoningLevel}:null}),Zl=((n_=ur.current)==null?void 0:n_.signature)===Id?ur.current.id:`ct_${crypto.randomUUID()}`;if(ur.current={signature:Id,id:Zl},Bn){if(!X||!(qe!=null&&qe.agentReady)){Uo();return}const Ln=X;ie(""),ce([]),ae([]),de(null);const ga=kr?{model:kr.model,serviceTier:kr.serviceTier,permissionMode:kr.permissionMode,planMode:(Ht==null?void 0:Ht.planActivation)==="command"?kt??(St==null?void 0:St.planMode):kt,reasoningLevel:kr.reasoningLevel}:{};tt({});const va=zi.map(Mr=>({mediaType:Mr.mediaType,dataBase64:Mr.dataUrl.slice(Mr.dataUrl.indexOf(",")+1),name:Mr.name}));try{(r_=(await dr(()=>vS(Ln,Tr,ga,va.length?va:void 0,ma,Zl,Mn&&!te&&!je?"steer":void 0))).turn)!=null&&r_.existing&&await Ei(Ln),bt({}),((s_=ur.current)==null?void 0:s_.id)===Zl&&(ur.current=null)}catch{Uo(),Yl()}return}if(!(qe!=null&&qe.agentReady)){Uo();return}if(!kr){Uo();return}ie(""),ce([]),ae([]),de(null);let Ki=X;try{if(!Ki){const js=await Gl(kr,kt);Ki=js.id,Kl=js.id}Je({type:"optimisticUser",sessionId:Ki,text:Tr||uK(),attachments:zi.map(js=>({url:js.dataUrl,mediaType:js.mediaType,name:js.name})),annotations:ii}),Je({type:"busy",sessionId:Ki,busy:!0}),ps(),B==="archived"&&Y("active");const Ln=kr?{model:kr.model,serviceTier:kr.serviceTier,permissionMode:kr.permissionMode,planMode:kt,reasoningLevel:kr.reasoningLevel}:{};tt({});const ga=zi.map(js=>({mediaType:js.mediaType,dataBase64:js.dataUrl.slice(js.dataUrl.indexOf(",")+1),name:js.name})),va=Ki;if(!va)throw new Error(ere());(vs=(await dr(()=>vS(va,Tr,Ln,ga.length?ga:void 0,ma,Zl))).turn)!=null&&vs.existing&&await Ei(va),bt({}),((qo=ur.current)==null?void 0:qo.id)===Zl&&(ur.current=null)}catch(Ln){if(Yl(),Uo(),!Ki)return;const ga=Ln instanceof Error?Ln.message:String(Ln);if(!/session is busy/i.test(ga)&&await V0(e).then(Mr=>{var Go;return!!((Go=Mr.find(js=>js.id===Ki))!=null&&Go.busy)}).catch(()=>!1)){Ld()&&(ie(Mr=>Mr===Tr?"":Mr),ce(Mr=>Mr===zi?[]:Mr),ae(Mr=>Mr===ii?[]:Mr));return}Je({type:"busy",sessionId:Ki,busy:!1}),Je({type:"localError",sessionId:Ki,text:bY({error:ke(ga)})})}}async function Gl(te,me){const ze=await ltt(e,te.harness,{model:te.model,serviceTier:te.serviceTier,permissionMode:te.permissionMode,planMode:me,reasoningLevel:te.reasoningLevel});return rn.current.add(ze.id),P(je=>[ze,...je]),J(ze.id),q.current={projectId:e,activeId:ze.id},ze}function se(){const te=B0t(V);ie(te),window.requestAnimationFrame(()=>{var me,ze;(me=Tt.current)==null||me.focus(),(ze=Tt.current)==null||ze.setSelectionRange(te.length,te.length),Jn(te.length)})}async function xe(){const te=Cs;if(!te)return;if(Ce(null),Bn){Ce(EK());return}const me=V,ze=q.current,je=()=>{const Dn=q.current;Dn.projectId!==ze.projectId||Dn.activeId!==ze.activeId||ie(Tr=>Tr||me)};ie(""),Pe(!1);let Ge=X;if(!Ge){if(!(qe!=null&&qe.agentReady)||!Wt){je(),Ce(av());return}try{const Dn=V8(Ht==null?void 0:Ht.planActivation,void 0,Nt.current);Ge=(await Gl(Wt,Dn)).id,tt({})}catch(Dn){je();const Tr=Dn instanceof Error?Dn.message:String(Dn);Ce(K6({error:ke(Tr)}));return}}B==="archived"&&Y("active");const kt=`${jc}shell-${Date.now()}`;Je({type:"localShell",sessionId:Ge,id:kt,command:te}),ps();try{const{message:Dn}=await gtt(Ge,te);Je({type:"upsertMessage",sessionId:Ge,message:Dn})}catch(Dn){const Tr=Dn instanceof Error?Dn.message:String(Dn);Je({type:"localShell",sessionId:Ge,id:kt,command:te,error:K6({error:ke(Tr)})})}}function Ee(){X&&ytt(X).catch(()=>{Ce(mre())})}const Me=M.useCallback(async(te,me)=>{if(!(!X||Vt.current)){Vt.current=!0,Ce(null),et(te);try{const ze=Gtt({model:zt.model,serviceTier:zt.serviceTier,permissionMode:zt.permissionMode,planMode:zt.planMode,reasoningLevel:zt.reasoningLevel}),je=X;(await vtt(je,te,me,ze)).turn.existing&&await Ei(je),bt({})}catch{Ce(kne())}finally{Vt.current=!1,et(null)}}},[X,zt,Ei]),Ie=M.useCallback((te,me)=>{if(!X||Bn||!(qe!=null&&qe.agentReady))return;const ze=X;Je({type:"busy",sessionId:ze,busy:!0}),ps(),dr(()=>btt(ze,te,me)).catch(je=>{Je({type:"busy",sessionId:ze,busy:!1});const Ge=je instanceof Error?je.message:String(je);Je({type:"localError",sessionId:ze,text:Mne({error:ke(Ge)})})})},[X,Bn,qe==null?void 0:qe.agentReady,ps,dr]),mt=M.useCallback(te=>{if(!X||Bn)return;const me=X,ze=jt.current;Je({type:"activeLeaf",sessionId:me,leafId:te}),dr(()=>xtt(me,te)).catch(je=>{Je({type:"activeLeaf",sessionId:me,leafId:ze});const Ge=je instanceof Error?je.message:String(je);Je({type:"localError",sessionId:me,text:xre({error:ke(Ge)})})})},[X,Bn,dr]);function lt(te){if(!X)return;const me=X;_tt(me,te).then(({removed:ze})=>{if(ze)return Ei(me)}).catch(()=>Ce(zne()))}async function Pt(te){if(!X||Gn)return;const me=X;Ce(null),nn(te);try{await ptt(me,te),await Ei(me)}catch{Ce(Hne())}finally{nn(null)}}M.useEffect(()=>{if(!Bn||a!=="chat")return;function te(me){var ze;me.key!=="Escape"||me.defaultPrevented||(me.preventDefault(),Ee(),(ze=Tt.current)==null||ze.focus())}return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[Bn,X,a]);function Rn(te){wn.current.add(te),P(me=>me.filter(ze=>ze.id!==te)),J(me=>me===te?null:me),L(me=>{if(!me.has(te))return me;const ze=new Set(me);return ze.delete(te),ze}),rn.current.delete(te),Vn.current.delete(te),Je({type:"forget",sessionId:te})}function zs(te,me){const ze=te.archived;P(je=>je.map(Ge=>Ge.id===te.id?{...Ge,archived:me}:Ge)),rC(B,me)||J(je=>je===te.id?null:je),utt(te.id,me).catch(()=>{P(je=>je.map(Ge=>Ge.id===te.id?{...Ge,archived:ze}:Ge))})}function ms(te,me){const ze=te.title;P(je=>je.map(Ge=>Ge.id===te.id?{...Ge,title:me}:Ge)),dtt(te.id,me).catch(()=>{P(je=>je.map(Ge=>Ge.id===te.id?{...Ge,title:ze}:Ge))})}async function Fs(te){var ze;const me=((ze=te.title)==null?void 0:ze.trim())||ov();if(window.confirm(GK({title:Ra(me)}))){try{await ctt(te.id)}catch(je){Br(YK({title:Ra(me),error:ke(je instanceof Error?je.message:String(je))}),"error");return}Rn(te.id)}}const gs=M.useCallback(te=>{if(!X)return Promise.resolve(!1);const me=X;return Je({type:"busy",sessionId:me,busy:!0}),dr(()=>wtt(me,te)).then(()=>!0).catch(()=>!1).finally(()=>{Hu(me).then(({messages:ze,queued:je,activeLeafId:Ge})=>Je({type:"seed",sessionId:me,messages:ze,queued:je,activeLeafId:Ge})).catch(()=>{}),V0(e).then(ze=>{var je;return Je({type:"busy",sessionId:me,busy:!!((je=ze.find(Ge=>Ge.id===me))!=null&&je.busy)})}).catch(()=>{})})},[X,e,dr]),Po=H.filter(te=>rC(B,te.archived)),Wi=/Mac|iPhone|iPad/.test(navigator.platform),Vl=Wi?"⌘ ⇧ Enter":"Ctrl + Shift + Enter",Wl=Wi?"⌘ Enter":"Ctrl + Enter",Md=M.useCallback(()=>{Y("active"),J(null),l("chat")},[l]),rg=M.useCallback(te=>{Y("all"),J(te),l("chat")},[l]);M.useEffect(()=>{const te=me=>{me.repeat||me.key!=="Enter"||!me.metaKey&&!me.ctrlKey||me.altKey||!me.shiftKey||(me.preventDefault(),Md())};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[Md]);const e_=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]:py-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:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${c?"active":""}`,onClick:y,children:[f.jsx(Qf,{size:15}),CQ()]}),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 ${d?"active":""}`,"data-onboarding":"nav-artifacts",onClick:h,children:[f.jsx(Ux,{size:15}),EX()]}),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 ${o?"active":""}`,onClick:_,children:[f.jsx(Fx,{size:15}),vQ()]}),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 ${a==="skills"?"active":""}`,onClick:()=>l("skills"),children:[f.jsx(AN,{size:15}),BZ()]}),S0t.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 ${a!=="chat"&&a!=="skills"&&te.activeTabs.includes(a)?"active":""}`,"data-onboarding":te.id==="compute"?"nav-compute":void 0,onClick:()=>l(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-1.5 ps-4.5",children:[f.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:((t_=oM.find(te=>te.id===B))==null?void 0:t_.railLabel())??OE()}),f.jsxs("div",{className:"rail-section-actions flex items-center gap-0.5",children:[f.jsxs("button",{className:"rail-section-new inline-flex items-center gap-1 py-[3px] px-1.5 rounded-sm text-subtext text-sm font-medium [&:hover]:text-text [&:hover]:bg-surface tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":Vl,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:Md,children:[f.jsx(Gx,{size:13}),vte()]}),f.jsx(Zpt,{value:B,onChange:Y})]})]}),f.jsxs("div",{className:"rail-body",children:[Po.map(te=>f.jsx(tmt,{session:te,active:te.id===X&&a==="chat",unread:$.has(te.id),busy:rt.busySessions.has(te.id),waiting:Ho.has(te.id),revealTitle:yr.get(te.id),onOpen:()=>{J(te.id),e===fv&&$0t(te.id),L(me=>{if(!me.has(te.id))return me;const ze=new Set(me);return ze.delete(te.id),ze}),l("chat")},onRename:me=>ms(te,me),onSetArchived:me=>zs(te,me),onDelete:()=>void Fs(te)},te.id)),Po.length===0&&f.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:B==="archived"?DY():H.length>0?EY():BY()})]}),C.kind==="ssh"?f.jsx(Of,{runtime:C}):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(Kt,{size:"small","aria-label":tN(),"aria-haspopup":"dialog",onClick:()=>W(!0),children:f.jsx(q2,{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:eN()}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",ke(C.version)]})]})]})}),F&&f.jsx(nmt,{onClose:()=>W(!1),onConfigureSsh:()=>{W(!1),U(!0)}}),Z&&f.jsx(MT,{onClose:()=>{U(!1),W(!0)}})]}),Qc=`chat-header flex items-center gap-2 py-0 px-4 bg-background shrink-0 h-12 relative z-4 w-full max-w-readable my-0 mx-auto [&.rail-hidden]:max-w-none [&.rail-hidden]:py-0 [&.rail-hidden]:px-0.5 [&::after]:content-[''] [&::after]:absolute [&::after]:top-full [&::after]:start-0 [&::after]:end-0 [&::after]:h-6 [&::after]:bg-[linear-gradient(to_bottom,_var(--base),_transparent)] [&::after]:pointer-events-none${r?"":" rail-hidden"}`,Fo=!r&&f.jsx(Kt,{title:p7(),"aria-label":p7(),onClick:s,children:f.jsx(PN,{size:15})});return a!=="chat"?f.jsxs(f.Fragment,{children:[r&&e_,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:Qc,children:Fo}),f.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:O})]})]}):f.jsxs(f.Fragment,{children:[r&&e_,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[f.jsxs("div",{className:Qc,children:[Fo,f.jsx(lh,{variant:"header",title:er?((Rd=er.title)==null?void 0:Rd.trim())||ov():Y6(),children:er?f.jsx(lM,{title:((Dd=er.title)==null?void 0:Dd.trim())||ov(),animate:hs!==void 0},hs??"static"):Y6()}),j&&f.jsx(Kt,{"data-tip":X6(),"aria-label":X6(),onClick:j,children:f.jsx(XZe,{size:15})})]}),$o?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(Dt,{}),f.jsx("span",{children:ZQ()})]}):si?f.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:un,onScroll:te=>{Ps(te.currentTarget),kn.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:Ye,children:[f.jsx(Xpt,{messages:Jr,allMessages:ri,canFork:da,onFork:Ie,onSelectFork:mt,busy:Bn,onOpenFile:Vi,onOpenRun:g,onOpenSpawnedSession:rg,runExperimentName:S,onOpenExperiment:k,experimentName:b,onRespond:gs,onOpenPlan:fr,onOpenSubagent:Gi,recoveringTurnId:Rt,onRecover:Me,skills:Os}),Bn&&Ka&&f.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:Ite()}),Bn&&!Ka&&!Bo&&!Ad&&f.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:f.jsx("span",{className:"tool-running-shimmer",children:zre()})})]})}):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(Qx,{})}),f.jsx("h2",{children:Pte()}),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(Qf,{size:19}),f.jsx("span",{children:n})]}),Xa&&f.jsx("div",{className:iC,role:"status","aria-live":"polite","aria-label":rte(),"aria-busy":"true",children:sC.map((te,me)=>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 ${_b[me].box}`,children:[f.jsxs("span",{className:`flex w-full items-center gap-2.5 ${_b[me].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"})]},me))}),ql&&ql.length>0&&f.jsx("div",{className:iC,role:"group","aria-label":ote(),children:ql.map((te,me)=>{const ze=sC[me],je=_b[me];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 ${je.box}`,onClick:()=>Xc(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:je.icon}),te.title]}),f.jsx("span",{className:"w-full truncate text-sm text-subtext",children:te.prompt})]},me)})})]}),kn.action&&f.jsxs($e,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:kn.action.x,top:kn.action.top,transform:"translateX(-50%)"},onMouseDown:te=>te.preventDefault(),onClick:kn.add,children:[f.jsx(HN,{size:14}),AX()]}),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:[si&&f.jsx(Kt,{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:v7(),"aria-label":v7(),inert:on,onClick:Td,children:Bn&&!Ka?f.jsx(Px,{size:18,className:"tool-running-shimmer-icon"}):f.jsx(RZe,{size:16})}),Ar&&!(pa&&Ar.promptId===pa.promptId)&&f.jsx(t_t,{synthesized:Ar.synthesized,agentLabel:er?Lf[er.harness]:kre(),showResumeModes:(er==null?void 0:er.harness)==="claude-code",onView:te=>fr==null?void 0:fr(Ar.plan,Ar.promptId,te),onApprove:te=>gs({promptId:Ar.promptId,approve:!0,...te?{resumeMode:te}:{}}),onReject:()=>gs({promptId:Ar.promptId,approve:!1}),onRevise:te=>{X&&Ya({sessionId:X,promptId:Ar.promptId}),gs({promptId:Ar.promptId,approve:!1,note:te})}}),fs.length>0&&f.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:fs.map((te,me)=>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(WN,{size:13,className:"shrink-0 text-accent-amber"}):f.jsx(nQe,{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"?qtt(te.nextRetryAt,ha):hne()}),te.dispatchState==="blocked"?f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>void Pt(te.id),"aria-label":XB({text:te.text}),disabled:Gn!==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:Gn===te.id?sN():Rc()}),f.jsx("button",{onClick:()=>lt(te.id),"aria-label":VB({text:te.text}),disabled:Gn!==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:iee()}),me===Fl&&melt(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(Zr,{size:11})})]},te.id))}),f.jsxs("div",{className:`composer-box relative flex flex-col border ${Vr?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[qe&&!qe.agentReady&&f.jsxs("div",{className:"composer-harness-warning py-2 px-3 text-subtext text-sm leading-normal border-b border-b-border-variant [&_strong]:text-accent-amber [&_strong]:font-medium [&_code]:font-mono [&_code]:text-text",children:[f.jsxs("strong",{children:[qe.name," ",MQ()]})," ",qe.agentNote?Gh(qe.agentNote):xne()]}),Bs&&f.jsx(E0t,{skills:mr,activeIndex:Gr,onPick:On,onHover:Cn}),le.length>0&&f.jsx(lpt,{annotations:le,onClear:()=>{ae([]),window.requestAnimationFrame(()=>{var te;return(te=Tt.current)==null?void 0:te.focus()})},onRemove:te=>{const me=le.filter(ze=>ze.id!==te);ae(me),me.length===0&&window.requestAnimationFrame(()=>{var ze;return(ze=Tt.current)==null?void 0:ze.focus()})}}),oe.length>0&&f.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:oe.map((te,me)=>{const ze=()=>ce(je=>je.filter((Ge,kt)=>kt!==me));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(td,{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:u7(),"aria-label":u7(),onClick:ze,children:f.jsx(Zr,{size:11})})]},me):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:Yte()}),f.jsx("button",{title:d7(),"aria-label":d7(),onClick:ze,children:f.jsx(Zr,{size:11})})]},me)})}),_e&&f.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:_e}),ve&&f.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:ve}),f.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${Vr?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[f.jsx("textarea",{dir:"auto",ref:Tt,className:"relative z-1 bg-transparent",value:V,placeholder:rs?$re():Mn&&qe?fre({harness:ke(Lf[qe.id]),shortcut:ke(Wl)}):Wt?qe!=null&&qe.agentReady?pY({harness:ke(Lf[Wt.harness])}):dY({harness:ke(Lf[Wt.harness])}):aK(),rows:2,onPaste:Qt,onDragOver:te=>{te.dataTransfer.types.includes("Files")&&te.preventDefault()},onDrop:te=>{te.dataTransfer.files.length!==0&&(te.preventDefault(),tn(Array.from(te.dataTransfer.files)))},onChange:te=>{const me=te.target.value,ze=te.target.selectionStart;Jn(ze);const je=ze>0&&/\s/.test(me[ze-1])&&!rs&&!pr.current&&K8(me)===null?ab(me,ze-1):null;if((je==null?void 0:je.query)==="plan"&&(Ht!=null&&Ht.planActivation)){ni(me,je);return}const Ge=je?Os.find(kt=>kt.source!=="command"&&kt.name===je.query):void 0;if(Ge&&je){const kt=q8(me,je,Ge.name,2);ie(kt.text),window.requestAnimationFrame(()=>{var Dn;(Dn=Tt.current)==null||Dn.setSelectionRange(kt.cursor,kt.cursor),Jn(kt.cursor)});return}ie(me),Pe(!1)},onSelect:te=>Jn(te.currentTarget.selectionStart),onCompositionStart:()=>{pr.current=!0},onCompositionEnd:()=>{pr.current=!1},onKeyDown:te=>{if(Bs){if(te.key==="ArrowDown"||te.key==="ArrowUp"){te.preventDefault();const me=te.key==="ArrowDown"?1:-1;Cn((Gr+me+mr.length)%mr.length);return}if(te.key==="Tab"||te.key==="Enter"){te.preventDefault(),On(mr[Gr]);return}if(te.key==="Escape"){te.preventDefault(),Pe(!0);return}}if(te.key==="Backspace"&&_t(te.currentTarget)){te.preventDefault();return}if(te.key==="Enter"&&!te.shiftKey&&!te.nativeEvent.isComposing){if(te.preventDefault(),Vr){xe();return}Zc({queue:te.metaKey||te.ctrlKey})}}}),f.jsx(D0t,{text:V,isCommand:_a,skills:Os,projectId:e,textareaRef:Tt})]}),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:Tn.ref,children:[f.jsx(Kt,{type:"button",className:"composer-bare",title:iv(),"aria-label":iv(),"aria-haspopup":"dialog","aria-expanded":Tn.open,onClick:()=>Tn.setOpen(te=>!te),children:f.jsx(gJe,{size:16})}),Tn.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:iv()}),f.jsx($rt,{})]})]}),f.jsx("input",{ref:vt,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:te=>{tn(Array.from(te.target.files??[])),te.target.value=""}}),f.jsx(Kt,{type:"button",className:"composer-attach",title:Q6(),"aria-label":Q6(),onClick:()=>{var te;return(te=vt.current)==null?void 0:te.click()},children:f.jsx(eJe,{size:16})}),Kn&&f.jsxs($e,{type:"button",variant:"ghost",active:!0,className:"group",title:i7(),"aria-label":i7(),onClick:()=>void ua(),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(IQe,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(Zr,{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:fJ()})]}),Vr&&f.jsxs($e,{type:"button",variant:"ghost",active:!0,className:"group",title:s7(),"aria-label":s7(),onClick:se,children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(Dh,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(Zr,{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:AE()})]}),f.jsx("div",{className:"min-w-0 flex-1"}),f.jsxs("div",{className:"flex min-w-0 items-center",children:[f.jsx(m_t,{value:Wt,onSelect:ei,permissionChoices:qe!=null&&qe.agentReady?(Ht==null?void 0:Ht.permissionModes)??[]:[],defaultPermissionId:(Ht==null?void 0:Ht.defaultPermissionMode)??null,onSelectPermission:$s,reasoningChoices:qe!=null&&qe.agentReady?Lo.choices:[],defaultReasoningId:Lo.defaultId,onSelectReasoning:Oo,onHarnesses:we,lockHarness:!!St}),f.jsx(O0t,{usage:St==null?void 0:St.contextUsage})]}),Bn&&!rs?f.jsx(Kt,{className:"send-btn",variant:"stop",title:m7(),"aria-label":m7(),onClick:Ee,children:f.jsx(Zr,{size:16})}):f.jsx(Kt,{className:"send-btn",variant:"primary",title:Vr?h7():Bb(),"aria-label":Vr?h7():Bb(),onClick:()=>void(Vr?xe():Zc()),disabled:Vr?!Cs||!X&&!(qe!=null&&qe.agentReady):!(qe!=null&&qe.agentReady)||!V.trim()&&oe.length===0&&le.length===0,children:f.jsx(ON,{size:16})})]})]})]})]})]})}function vo({className:e,...n}){return f.jsx("div",{className:us("relative flex min-h-0 flex-1 flex-col",e),...n})}function Yu({className:e,...n}){return f.jsx("div",{className:us("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Ji({className:e,...n}){return f.jsx("div",{className:us("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const aC=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function smt({sessionId:e,spawnPartId:n,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:a,experimentName:l,onOpenSubagent:o}){const[c,d]=M.useState(null),_=M.useRef(null),h=M.useRef(null),m=M.useRef(!0);if(M.useLayoutEffect(()=>{m.current=!0;const S=_.current;S&&(S.scrollTop=S.scrollHeight)},[e,n]),M.useLayoutEffect(()=>{const S=_.current;S&&m.current&&(S.scrollTop=S.scrollHeight)},[c]),M.useEffect(()=>{const S=_.current,k=h.current;if(!S||!k)return;const b=new ResizeObserver(()=>{m.current&&(S.scrollTop=S.scrollHeight)});return b.observe(k),b.observe(S),()=>b.disconnect()},[c===null]),M.useEffect(()=>{let S=!0;const k=new Set;let b=0;const v=()=>{const y=++b;Hu(e).then(({messages:C})=>{!S||y!==b||d(j=>{if(!j)return C;const N=C.map(z=>k.has(z.id)?j.find(D=>D.id===z.id)??z:z),T=new Set(C.map(z=>z.id));return[...N,...j.filter(z=>!T.has(z.id))]})}).catch(()=>S&&d(C=>C??[]))};v();const x=Jf(y=>{if(y.type==="reconnected"){k.clear(),v();return}y.type!=="message"||y.sessionId!==e||(k.add(y.message.id),d(C=>{const j=C?C.slice():[],N=j.findIndex(T=>T.id===y.message.id);return N===-1?j.push(y.message):j[N]=y.message,j}))});return()=>{S=!1,x()}},[e]),c===null)return f.jsx(vo,{children:f.jsx("div",{className:aC,children:f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:XWe()})})});let g=null;for(const S of c)if(g=z4(S.parts,n),g)break;return f.jsx(vo,{children:f.jsx("div",{className:aC,ref:_,onScroll:S=>{const k=S.currentTarget;m.current=k.scrollHeight-k.scrollTop-k.clientHeight<60},children:f.jsx("div",{ref:h,children:g?f.jsx(Vpt,{spawn:g,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:a,experimentName:l,onOpenSubagent:o}):f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:eKe()})})})})}function oC(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 zn(e){for(var n=1;n=0||(_[c]=l[c]);return _})(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function vn(e,n){return uM(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var a,l,o,c,d=[],_=!0,h=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;_=!1}else for(;!(_=(a=o.call(s)).done)&&(d.push(a.value),d.length!==r);_=!0);}catch(m){h=!0,l=m}finally{try{if(!_&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(h)throw l}}return d}})(e,n)||Tm(e,n)||fM()}function cM(e){return uM(e)||dM(e)||Tm(e)||fM()}function vi(e){return(function(n){if(Array.isArray(n))return Z2(n)})(e)||dM(e)||Tm(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 uM(e){if(Array.isArray(e))return e}function dM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Tm(e,n){if(e){if(typeof e=="string")return Z2(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)?Z2(e,n):void 0}}function Z2(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 a,l=!0,o=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return l=c.done,c},e:function(c){o=!0,a=c},f:function(){try{l||t.return==null||t.return()}finally{if(o)throw a}}}}var z0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wh(e,n){return e(n={exports:{}},n.exports),n.exports}var pi=Wh((function(e){/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(){var n={}.hasOwnProperty;function t(){for(var r=[],s=0;s-1?v.slice(0,y):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var j=v.slice(y+1);j.indexOf("file mode")===0&&(l[C==="new"?"newMode":"oldMode"]=j.slice(10));break;case"similarity":l.similarity=parseInt(v.split(" ")[2],10);break;case"index":var N=v.slice(y+1).split(" "),T=N[0].split("..");l.oldRevision=T[0],l.newRevision=T[1],N[1]&&(l.oldMode=l.newMode=N[1]);break;case"copy":case"rename":var z=v.slice(y+1);z.indexOf("from")===0?l.oldPath=z.slice(5):l.newPath=z.slice(3),x=C;break;case"---":var D=v.slice(y+1),O=g[++k].slice(4);D==="/dev/null"?(O=O.slice(2),x="add"):O==="/dev/null"?(D=D.slice(2),x="delete"):(x="modify",D=D.slice(2),O=O.slice(2)),D&&(l.oldPath=D),O&&(l.newPath=O),m=5;break e}}l.type=x||"modify"}else if(b.indexOf("Binary")===0)l.isBinary=!0,l.type=b.indexOf("/dev/null and")>=0?"add":b.indexOf("and /dev/null")>=0?"delete":"modify",m=2,l=null;else if(m===5)if(b.indexOf("@@")===0){var H=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(b);o={content:b,oldStart:H[1]-0,newStart:H[4]-0,oldLines:H[3]-0||1,newLines:H[6]-0||1,changes:[]},l.hunks.push(o),c=o.oldStart,d=o.newStart}else{var P=b.slice(0,1),F={content:b.slice(1)};switch(P){case"+":F.type="insert",F.isInsert=!0,F.lineNumber=d,d++;break;case"-":F.type="delete",F.isDelete=!0,F.lineNumber=c,c++;break;case" ":F.type="normal",F.isNormal=!0,F.oldLineNumber=c,F.newLineNumber=d,c++,d++;break;case"\\":var W=o.changes[o.changes.length-1];W.isDelete||(l.newEndingNewLine=!1),W.isInsert||(l.oldEndingNewLine=!1)}F.type&&o.changes.push(F)}k++}return h}};e.exports=s})()}));function Pl(e){return e.type==="insert"}function bi(e){return e.type==="delete"}function No(e){return e.type==="normal"}function lmt(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(a,l,o){var c=vn(a,3),d=c[0],_=c[1],h=c[2];return _?Pl(l)&&h>=0?(d.splice(h+1,0,l),[d,l,h+2]):(d.push(l),[d,l,bi(l)&&bi(_)?h:o]):(d.push(l),[d,l,bi(l)?o:-1])}),[[],null,-1]);return vn(s,1)[0]})(e.changes):e.changes;return zn(zn({},e),{},{isPlain:!1,changes:t})}function Q2(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(` +`),a=r.indexOf(` +`,s+1),l=r.slice(0,s),o=r.slice(s+1,a),c=l.split(" ").slice(1,-3).join(" "),d=o.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(c," b/").concat(d),"index 1111111..2222222 100644","--- a/".concat(c),"+++ b/".concat(d),r.slice(a+1)].join(` +`)})(e.trimStart());return omt.parse(t).map((function(r){return(function(s,a){var l=s.hunks.map((function(o){return lmt(o,a)}));return zn(zn({},s),{},{hunks:l})})(r,n)}))}function cmt(e){return e[0]}function umt(e){return e[e.length-1]}function J2(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function uh(e){return e==="old"?function(n){return Pl(n)?-1:No(n)?n.oldLineNumber:n.lineNumber}:function(n){return bi(n)?-1:No(n)?n.newLineNumber:n.lineNumber}}function _M(e,n){return function(t,r){var s=t[e],a=s+t[n];return r>=s&&r=a&&s-1},vmt=function(e,n){var t=this.__data__,r=Mm(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function Lu(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var d=a.get(e),_=a.get(n);if(d&&_)return d==n&&_==e;var h=-1,m=!0,g=2&t?new tgt:void 0;for(a.set(e,n),a.set(n,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},rr={};rr["[object Float32Array]"]=rr["[object Float64Array]"]=rr["[object Int8Array]"]=rr["[object Int16Array]"]=rr["[object Int32Array]"]=rr["[object Uint8Array]"]=rr["[object Uint8ClampedArray]"]=rr["[object Uint16Array]"]=rr["[object Uint32Array]"]=!0,rr["[object Arguments]"]=rr["[object Array]"]=rr["[object ArrayBuffer]"]=rr["[object Boolean]"]=rr["[object DataView]"]=rr["[object Date]"]=rr["[object Error]"]=rr["[object Function]"]=rr["[object Map]"]=rr["[object Number]"]=rr["[object Object]"]=rr["[object RegExp]"]=rr["[object Set]"]=rr["[object String]"]=rr["[object WeakMap]"]=!1;var ggt=function(e){return fd(e)&&M4(e.length)&&!!rr[jd(e)]},vgt=function(e){return function(n){return e(n)}},pC=Wh((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&gM.process,a=(function(){try{var l=r&&r.require&&r.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}})();e.exports=a})),mC=pC&&pC.isTypedArray,R4=mC?vgt(mC):ggt,bgt=Object.prototype.hasOwnProperty,xgt=function(e,n){var t=yi(e),r=!t&&Om(e),s=!t&&!r&&Dp(e),a=!t&&!r&&!s&&R4(e),l=t||r||s||a,o=l?fgt(e.length,String):[],c=o.length;for(var d in e)!bgt.call(e,d)||l&&(d=="length"||s&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||SM(d,c))||o.push(d);return o},ygt=Object.prototype,kM=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||ygt)},wgt=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),Sgt=Object.prototype.hasOwnProperty,CM=function(e){if(!kM(e))return wgt(e);var n=[];for(var t in Object(e))Sgt.call(e,t)&&t!="constructor"&&n.push(t);return n},Im=function(e){return e!=null&&M4(e.length)&&!bM(e)},D4=function(e){return Im(e)?xgt(e):CM(e)},gC=function(e){return ogt(e,D4,dgt)},kgt=Object.prototype.hasOwnProperty,Cgt=function(e,n,t,r,s,a){var l=1&t,o=gC(e),c=o.length;if(c!=gC(n).length&&!l)return!1;for(var d=c;d--;){var _=o[d];if(!(l?_ in n:kgt.call(n,_)))return!1}var h=a.get(e),m=a.get(n);if(h&&m)return h==n&&m==e;var g=!0;a.set(e,n),a.set(n,e);for(var S=l;++d1)return!1;if(e.length===1){var n=vn(e,1)[0];return n.type==="text"&&!n.value}return!0}function h1t(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,a=Rl(e,d1t),l=s?function(o,c){return s(o,wC,c)}:wC;return f.jsx("td",zn(zn({},a),{},{"data-change-key":n,children:r?f1t(r)?" ":r.map(l):t||" "}))}var RM=M.memo(h1t);function DM(e,n){return function(){var t=n==="old"?Fm(e):Um(e);return t===-1?void 0:t}}function LM(e,n){return function(t){return e&&t?f.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function Lp(e,n){return n?function(t){e(),n(t)}:e}function SC(e,n,t,r){return M.useMemo((function(){var s=MM(e,(function(a){return function(l){return a&&a(n,l)}}));return s.onMouseEnter=Lp(t,s.onMouseEnter),s.onMouseLeave=Lp(r,s.onMouseLeave),s}),[e,t,r,n])}function kC(e,n,t,r,s,a,l,o,c){var d={change:n,side:r,inHoverState:o,renderDefault:DM(n,r),wrapInAnchor:LM(s,a)};return f.jsx("td",zn(zn({className:e},l),{},{"data-change-key":t,children:c(d)}))}function _1t(e){var n,t,r,s=e.change,a=e.selected,l=e.tokens,o=e.className,c=e.generateLineClassName,d=e.gutterClassName,_=e.codeClassName,h=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,S=e.gutterAnchor,k=e.generateAnchorID,b=e.renderToken,v=e.renderGutter,x=s.type,y=s.content,C=El(s),j=(n=vn(M.useState(!1),2),t=n[0],r=n[1],[t,M.useCallback((function(){return r(!0)}),[]),M.useCallback((function(){return r(!1)}),[])]),N=vn(j,3),T=N[0],z=N[1],D=N[2],O=M.useMemo((function(){return{change:s}}),[s]),H=SC(h,O,z,D),P=SC(m,O,z,D),F=k(s),W=c({changes:[s],defaultGenerate:function(){return o}}),Z=pi("diff-gutter","diff-gutter-".concat(x),d,{"diff-gutter-selected":a}),U=pi("diff-code","diff-code-".concat(x),_,{"diff-code-selected":a});return f.jsxs("tr",{id:F,className:pi("diff-line",W),children:[!g&&kC(Z,s,C,"old",S,F,H,T,v),!g&&kC(Z,s,C,"new",S,F,H,T,v),f.jsx(RM,zn({className:U,changeKey:C,text:y,tokens:l,renderToken:b},P))]})}var p1t=M.memo(_1t);function m1t(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 g1t=["hideGutter","selectedChanges","tokens","lineClassName"],v1t=["hunk","widgets","className"];function b1t(e){var n=e.hunk,t=e.widgets,r=e.className,s=Rl(e,v1t),a=(function(l,o){return l.reduce((function(c,d){var _=El(d);c.push(["change",_,d]);var h=o[_];return h&&c.push(["widget",_,h]),c}),[])})(n.changes,t);return f.jsx("tbody",{className:pi("diff-hunk",r),children:a.map((function(l){return(function(o,c){var d=vn(o,3),_=d[0],h=d[1],m=d[2],g=c.hideGutter,S=c.selectedChanges,k=c.tokens,b=c.lineClassName,v=Rl(c,g1t);if(_==="change"){var x=bi(m)?"old":"new",y=bi(m)?Fm(m):Um(m),C=k?k[x][y-1]:null;return f.jsx(p1t,zn({className:b,change:m,hideGutter:g,selected:S.includes(h),tokens:C},v),"change".concat(h))}return _==="widget"?f.jsx(m1t,{hideGutter:g,element:m},"widget".concat(h)):null})(l,s)}))})}var OM=0;function A0(e,n,t,r){var s=M.useCallback((function(){return n(e)}),[e,n]),a=M.useCallback((function(){return n("")}),[n]);return M.useMemo((function(){var l=MM(r,(function(o){return function(c){return o&&o({side:e,change:t},c)}}));return l.onMouseEnter=Lp(s,l.onMouseEnter),l.onMouseLeave=Lp(a,l.onMouseLeave),l}),[t,r,s,e,a])}function gb(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,a=e.gutterClassName,l=e.codeClassName,o=e.gutterEvents,c=e.codeEvents,d=e.anchorID,_=e.gutterAnchor,h=e.gutterAnchorTarget,m=e.hideGutter,g=e.hover,S=e.renderToken,k=e.renderGutter;if(!n){var b=pi("diff-gutter","diff-gutter-omit",a),v=pi("diff-code","diff-code-omit",l);return[!m&&f.jsx("td",{className:b},"gutter"),f.jsx("td",{className:v},"code")]}var x=n.type,y=n.content,C=El(n),j=t===OM?"old":"new",N=zn({id:d||void 0,className:pi("diff-gutter","diff-gutter-".concat(x),X2({"diff-gutter-selected":r},"diff-line-hover-"+j,g),a),children:k({change:n,side:j,inHoverState:g,renderDefault:DM(n,j),wrapInAnchor:LM(_,h)})},o),T=pi("diff-code","diff-code-".concat(x),X2({"diff-code-selected":r},"diff-line-hover-"+j,g),l);return[!m&&f.jsx("td",zn(zn({},N),{},{"data-change-key":C}),"gutter"),f.jsx(RM,zn({className:T,changeKey:C,text:y,tokens:s,renderToken:S},c),"code")]}function x1t(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,a=e.newSelected,l=e.oldTokens,o=e.newTokens,c=e.monotonous,d=e.gutterClassName,_=e.codeClassName,h=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,S=e.generateAnchorID,k=e.generateLineClassName,b=e.gutterAnchor,v=e.renderToken,x=e.renderGutter,y=vn(M.useState(""),2),C=y[0],j=y[1],N=A0("old",j,t,h),T=A0("new",j,r,h),z=A0("old",j,t,m),D=A0("new",j,r,m),O=t&&S(t),H=r&&S(r),P=k({changes:[t,r],defaultGenerate:function(){return n}}),F={monotonous:c,hideGutter:g,gutterClassName:d,codeClassName:_,gutterEvents:h,codeEvents:m,renderToken:v,renderGutter:x},W=zn(zn({},F),{},{change:t,side:OM,selected:s,tokens:l,gutterEvents:N,codeEvents:z,anchorID:O,gutterAnchor:b,gutterAnchorTarget:O,hover:C==="old"}),Z=zn(zn({},F),{},{change:r,side:1,selected:a,tokens:o,gutterEvents:T,codeEvents:D,anchorID:t===r?null:H,gutterAnchor:b,gutterAnchorTarget:t===r?O:H,hover:C==="new"});if(c)return f.jsx("tr",{className:pi("diff-line",P),children:gb(t?W:Z)});var U=(function(X,J){return X&&!J?"diff-line-old-only":!X&&J?"diff-line-new-only":X===J?"diff-line-normal":"diff-line-compare"})(t,r);return f.jsxs("tr",{className:pi("diff-line",U,P),children:[gb(W),gb(Z)]})}var y1t=M.memo(x1t);function w1t(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 S1t=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],k1t=["hunk","widgets","className"];function T0(e,n){return(e?El(e):"00")+(n?El(n):"00")}function C1t(e){var n=e.hunk,t=e.widgets,r=e.className,s=Rl(e,k1t),a=(function(l,o){for(var c=function(v){if(!v)return null;var x=El(v);return o[x]||null},d=[],_=0;_=(a==null?void 0:a.value.length))return[e];var o=function(h,m){var g=a.value.slice(h,m);return[].concat(vi(s),[zn(zn({},a),{},{value:g})])};if(n>0){var c=o(0,n);l.push(Fu(c))}var d=o(Math.max(n,0),t);if(l.push(r?(function(h,m){return[m].concat(vi(Fu(h)))})(d,r):Fu(d)),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=Rl(e,G1t);t.push(s);var a,l=A4(r);try{for(l.s();!(a=l.n()).done;)HM(a.value,n,t)}catch(o){l.e(o)}finally{l.f()}t.pop()}else n.push(Fu([].concat(vi(t.slice(1)),[e])));return n}function V1t(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var d=$4(c);return d.value.includes(` +`)?d.value.split(` +`).map((function(_){return F1t(c,zn(zn({},d),{},{value:_}))})):[c]})(t),a=cM(s),l=a[0],o=a.slice(1);return[].concat(vi(n.slice(0,-1)),[[].concat(vi(r),[l])],vi(o.map((function(c){return[c]}))))}),[[]])}function zC(e){return V1t(HM(e))}var W1t=function(e,n,t){var r=(t=typeof t=="function"?t:void 0)?t(e,n):void 0;return r===void 0?Bm(e,n,void 0,t):!!r},K1t=function(e,n){return Bm(e,n)},Y1t=function(e){var n=e==null?0:e.length;return n?e[n-1]:void 0};function X1t(e,n){if(!e.children)throw new Error("parent node missing children property");var t,r,s=Y1t(e.children);return s&&(r=n,(t=s).type===r.type&&(t.type==="text"||t.children&&r.children&&W1t(t,r,(function(a,l,o){return o==="chlidren"||K1t(a,l)}))))?e.children[e.children.length-1]=(function(a,l){return"value"in a&&"value"in l?zn(zn({},a),{},{value:"".concat(a.value).concat(l.value)}):a})(s,n):e.children.push(n),e.children[e.children.length-1]}function jC(e){var n,t={type:"root",children:[]},r=A4(e);try{var s=function(){var a=n.value;a.reduce((function(l,o,c){return X1t(l,c===a.length-1?zn({},o):zn(zn({},o),{},{children:[]}))}),t)};for(r.s();!(n=r.n()).done;)s()}catch(a){r.e(a)}finally{r.f()}return t}var Z1t=Object.prototype.hasOwnProperty,Q1t=BM((function(e,n,t){Z1t.call(e,t)?e[t].push(n):I4(e,t,[n])})),J1t=Object.prototype.hasOwnProperty,evt=function(e){if(e==null)return!0;if(Im(e)&&(yi(e)||typeof e=="string"||typeof e.splice=="function"||Dp(e)||R4(e)||Om(e)))return!e.length;var n=sx(e);if(n=="[object Map]"||n=="[object Set]")return!e.size;if(kM(e))return!CM(e).length;for(var t in e)if(J1t.call(e,t))return!1;return!0},tvt=function(e,n){var t=n.start,r=n.length,s=t+r,a=e.reduce((function(l,o){var c=vn(l,2),d=c[0],_=c[1],h=_+$4(o).value.length;if(_>s||hr.length?t:r,c=t.length>r.length?r:t,d=o.indexOf(c);if(d!=-1)return l=[new n.Diff(1,o.substring(0,d)),new n.Diff(0,c),new n.Diff(1,o.substring(d+c.length))],t.length>r.length&&(l[0][0]=l[2][0]=-1),l;if(c.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var _=this.diff_halfMatch_(t,r);if(_){var h=_[0],m=_[1],g=_[2],S=_[3],k=_[4],b=this.diff_main(h,g,s,a),v=this.diff_main(m,S,s,a);return b.concat([new n.Diff(0,k)],v)}return s&&t.length>100&&r.length>100?this.diff_lineMode_(t,r,a):this.diff_bisect_(t,r,a)},n.prototype.diff_lineMode_=function(t,r,s){var a=this.diff_linesToChars_(t,r);t=a.chars1,r=a.chars2;var l=a.lineArray,o=this.diff_main(t,r,!1,s);this.diff_charsToLines_(o,l),this.diff_cleanupSemantic(o),o.push(new n.Diff(0,""));for(var c=0,d=0,_=0,h="",m="";c=1&&_>=1){o.splice(c-d-_,d+_),c=c-d-_;for(var g=this.diff_main(h,m,!1,s),S=g.length-1;S>=0;S--)o.splice(c,0,g[S]);c+=g.length}_=0,d=0,h="",m=""}c++}return o.pop(),o},n.prototype.diff_bisect_=function(t,r,s){for(var a=t.length,l=r.length,o=Math.ceil((a+l)/2),c=o,d=2*o,_=new Array(d),h=new Array(d),m=0;ms);y++){for(var C=-y+k;C<=y-b;C+=2){for(var j=c+C,N=(H=C==-y||C!=y&&_[j-1]<_[j+1]?_[j+1]:_[j-1]+1)-C;Ha)b+=2;else if(N>l)k+=2;else if(S&&(D=c+g-C)>=0&&D=(z=a-h[D]))return this.diff_bisectSplit_(t,r,H,N,s)}for(var T=-y+v;T<=y-x;T+=2){for(var z,D=c+T,O=(z=T==-y||T!=y&&h[D-1]a)x+=2;else if(O>l)v+=2;else if(!S&&(j=c+g-T)>=0&&j=(z=a-z))return this.diff_bisectSplit_(t,r,H,N,s)}}}return[new n.Diff(-1,t),new n.Diff(1,r)]},n.prototype.diff_bisectSplit_=function(t,r,s,a,l){var o=t.substring(0,s),c=r.substring(0,a),d=t.substring(s),_=r.substring(a),h=this.diff_main(o,c,!1,l),m=this.diff_main(d,_,!1,l);return h.concat(m)},n.prototype.diff_linesToChars_=function(t,r){var s=[],a={};function l(d){for(var _="",h=0,m=-1,g=s.length;ma?t=t.substring(s-a):sr.length?t:r,a=t.length>r.length?r:t;if(s.length<4||2*a.length=k.length?[x,y,C,j,z]:null}var c,d,_,h,m,g=o(s,a,Math.ceil(s.length/4)),S=o(s,a,Math.ceil(s.length/2));return g||S?(c=S?g&&g[4].length>S[4].length?g:S:g,t.length>r.length?(d=c[0],_=c[1],h=c[2],m=c[3]):(h=c[0],m=c[1],d=c[2],_=c[3]),[d,_,h,m,c[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var r=!1,s=[],a=0,l=null,o=0,c=0,d=0,_=0,h=0;o0?s[a-1]:-1,c=0,d=0,_=0,h=0,l=null,r=!0)),o++;for(r&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),o=1;o=k?(S>=m.length/2||S>=g.length/2)&&(t.splice(o,0,new n.Diff(0,g.substring(0,S))),t[o-1][1]=m.substring(0,m.length-S),t[o+1][1]=g.substring(S),o++):(k>=m.length/2||k>=g.length/2)&&(t.splice(o,0,new n.Diff(0,m.substring(0,k))),t[o-1][0]=1,t[o-1][1]=g.substring(0,g.length-k),t[o+1][0]=-1,t[o+1][1]=m.substring(k),o++),o++}o++}},n.prototype.diff_cleanupSemanticLossless=function(t){function r(k,b){if(!k||!b)return 6;var v=k.charAt(k.length-1),x=b.charAt(0),y=v.match(n.nonAlphaNumericRegex_),C=x.match(n.nonAlphaNumericRegex_),j=y&&v.match(n.whitespaceRegex_),N=C&&x.match(n.whitespaceRegex_),T=j&&v.match(n.linebreakRegex_),z=N&&x.match(n.linebreakRegex_),D=T&&k.match(n.blanklineEndRegex_),O=z&&b.match(n.blanklineStartRegex_);return D||O?5:T||z?4:y&&!j&&N?3:j||N?2:y||C?1:0}for(var s=1;s=g&&(g=S,_=a,h=l,m=o)}t[s-1][1]!=_&&(_?t[s-1][1]=_:(t.splice(s-1,1),s--),t[s][1]=h,m?t[s+1][1]=m:(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=[],a=0,l=null,o=0,c=!1,d=!1,_=!1,h=!1;o0?s[a-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,a=0,l=0,o="",c="";s1?(a!==0&&l!==0&&((r=this.diff_commonPrefix(c,o))!==0&&(s-a-l>0&&t[s-a-l-1][0]==0?t[s-a-l-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-=a+l,t.splice(s,a+l),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++,l=0,a=0,o="",c=""}t[t.length-1][1]===""&&t.pop();var d=!1;for(s=1;sr));s++)o=a,c=l;return t.length!=s&&t[s][0]===-1?c:c+(r-o)},n.prototype.diff_prettyHtml=function(t){for(var r=[],s=/&/g,a=//g,o=/\n/g,c=0;c");switch(d){case 1:r[c]=''+_+"";break;case-1:r[c]=''+_+"";break;case 0:r[c]=""+_+""}}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 a=this.match_alphabet_(r),l=this;function o(N,T){var z=N/r.length,D=Math.abs(s-T);return l.Match_Distance?z+D/l.Match_Distance:D?1:z}var c=this.Match_Threshold,d=t.indexOf(r,s);d!=-1&&(c=Math.min(o(0,d),c),(d=t.lastIndexOf(r,s+r.length))!=-1&&(c=Math.min(o(0,d),c)));var _,h,m=1<=b;y--){var C=a[t.charAt(y-1)];if(x[y]=k===0?(x[y+1]<<1|1)&C:(x[y+1]<<1|1)&C|(g[y+1]|g[y])<<1|1|g[y+1],x[y]&m){var j=o(k,y-1);if(j<=c){if(c=j,!((d=y-1)>s))break;b=Math.max(1,2*s-d)}}}if(o(k+1,s)>c)break;g=x}return d},n.prototype.match_alphabet_=function(t){for(var r={},s=0;s2&&(this.diff_cleanupSemantic(l),this.diff_cleanupEfficiency(l));else if(t&&typeof t=="object"&&r===void 0&&s===void 0)l=t,a=this.diff_text1(l);else if(typeof t=="string"&&r&&typeof r=="object"&&s===void 0)a=t,l=r;else{if(typeof t!="string"||typeof r!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");a=t,l=s}if(l.length===0)return[];for(var o=[],c=new n.patch_obj,d=0,_=0,h=0,m=a,g=a,S=0;S=2*this.Patch_Margin&&d&&(this.patch_addContext_(c,m),o.push(c),c=new n.patch_obj,d=0,m=g,_=h)}k!==1&&(_+=b.length),k!==-1&&(h+=b.length)}return d&&(this.patch_addContext_(c,m),o.push(c)),o},n.prototype.patch_deepCopy=function(t){for(var r=[],s=0;sthis.Match_MaxBits?(c=this.match_main(r,h.substring(0,this.Match_MaxBits),_))!=-1&&((m=this.match_main(r,h.substring(h.length-this.Match_MaxBits),_+h.length-this.Match_MaxBits))==-1||c>=m)&&(c=-1):c=this.match_main(r,h,_),c==-1)l[o]=!1,a-=t[o].length2-t[o].length1;else if(l[o]=!0,a=c-_,h==(d=m==-1?r.substring(c,c+h.length):r.substring(c,m+this.Match_MaxBits)))r=r.substring(0,c)+this.diff_text2(t[o].diffs)+r.substring(c+h.length);else{var g=this.diff_main(h,d,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(g)/h.length>this.Patch_DeleteThreshold)l[o]=!1;else{this.diff_cleanupSemanticLossless(g);for(var S,k=0,b=0;bo[0][1].length){var c=r-o[0][1].length;o[0][1]=s.substring(o[0][1].length)+o[0][1],l.start1-=c,l.start2-=c,l.length1+=c,l.length2+=c}return(o=(l=t[t.length-1]).diffs).length==0||o[o.length-1][0]!=0?(o.push(new n.Diff(0,s)),l.length1+=r,l.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),l.length1+=c,l.length2+=c),s},n.prototype.patch_splitMax=function(t){for(var r=this.Match_MaxBits,s=0;s2*r?(d.length1+=m.length,l+=m.length,_=!1,d.diffs.push(new n.Diff(h,m)),a.diffs.shift()):(m=m.substring(0,r-d.length1-this.Patch_Margin),d.length1+=m.length,l+=m.length,h===0?(d.length2+=m.length,o+=m.length):_=!1,d.diffs.push(new n.Diff(h,m)),m==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(m.length))}c=(c=this.diff_text2(d.diffs)).substring(c.length-this.Patch_Margin);var g=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);g!==""&&(d.length1+=g.length,d.length2+=g.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===0?d.diffs[d.diffs.length-1][1]+=g:d.diffs.push(new n.Diff(0,g))),_||t.splice(++s,0,d)}}},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"?ovt:lvt,r=B4(e.map((function(o){return o.changes})),PM).map(t).reduce((function(o,c){var d=vn(o,2),_=d[0],h=d[1],m=vn(c,2),g=m[0],S=m[1];return[_.concat(g),h.concat(S)]}),[[],[]]),s=vn(r,2),a=s[0],l=s[1];return nvt(TC(a),TC(l))}var uvt=["enhancers"],LC=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,a=vn(P1t(e,Rl(t,uvt)),2),l=a[0],o=a[1],c=[zC(l),zC(o)],d=(n=[c[0],c[1]],s.reduce((function(k,b){return b(k)}),n)),_=vn(d,2),h=_[0],m=_[1],g=[h.map(jC),m.map(jC)],S=g[1];return{old:g[0].map((function(k){var b;return(b=k.children)!==null&&b!==void 0?b:[]})),new:S.map((function(k){var b;return(b=k.children)!==null&&b!==void 0?b:[]}))}};const ax=["openresearch-diff flex flex-col gap-4","[&_.openresearch-diff-file]:[--diff-background-color:var(--base)]","[&_.openresearch-diff-file]:[--diff-text-color:var(--text)]","[&_.openresearch-diff-file]:[--diff-font-family:var(--mono)]","[&_.openresearch-diff-file]:[--diff-selection-text-color:var(--primary)]","[&_.openresearch-diff-file]:[--diff-selection-background-color:var(--color-diff-selection)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)]","[&_.openresearch-diff-file]:[--diff-code-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-code-selected-background-color:var(--diff-selection-background-color)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-text-color:var(--accent-green)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-text-color:var(--accent-red)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)]","[&_.openresearch-diff-file]:[--diff-code-insert-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-background-color:var(--color-diff-insert-code)]","[&_.openresearch-diff-file]:[--diff-code-delete-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-background-color:var(--color-diff-delete-code)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)]","[&_.openresearch-diff-file]:[--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)]","[&_.openresearch-diff-file]:w-full [&_.openresearch-diff-file]:text-sm","[&_.openresearch-diff-file]:leading-[1.55] [&_.openresearch-diff-file.diff-unified]:table-auto","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:collapse","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:w-0","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:nth-child(2)]:w-[1%]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:hidden","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:sticky","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:start-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:z-1","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[1%]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pt-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pe-2.5 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pb-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:ps-3.5","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:whitespace-nowrap","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-end","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-diff-gutter-text","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e-border","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:select-none","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:cursor-default","[&_.openresearch-diff-file_.diff-line]:leading-[1.55]","[&_.openresearch-diff-file_.diff-line:has(.diff-code-insert)]:bg-diff-insert-code","[&_.openresearch-diff-file_.diff-line:has(.diff-code-delete)]:bg-diff-delete-code","[&_.openresearch-diff-file_.diff-code]:py-0 [&_.openresearch-diff-file_.diff-code]:px-4","[&_.openresearch-diff-file_.diff-code]:whitespace-pre","[&_.openresearch-diff-file_.diff-code]:break-normal","[&_.openresearch-diff-file_.diff-code]:wrap-normal","[&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t [&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t-border"].join(" "),dvt=2e3,fvt={highlight(e,n){return yt.highlight(e,n).children}};function hvt(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function H4(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 _vt(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function ox(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 pvt(e){const n=[cvt(e.hunks,{type:"line"})],t=Fy(_vt(e));return t&&yt.registered(t)?LC(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:fvt}):LC(e.hunks,{enhancers:n,highlight:!1})}function mvt(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:Q2(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:Q2(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const gvt=({change:e,side:n})=>n==="old"?null:hvt(e);function UM({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:e0e()}),f.jsx("p",{children:M0e({limit:ke(Ta(n)),read:ke(Ta(e))})})]})}function qM({file:e,defaultExpanded:n}){const[t,r]=M.useState(n),{additions:s,deletions:a}=M.useMemo(()=>H4(e),[e]),l=t&&s+a<=dvt,o=M.useMemo(()=>{if(l)try{return pvt(e)}catch{return}},[e,l]);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-semibold [&_.path_code]:text-text [&_.stats]:flex [&_.stats]:items-center [&_.stats]:gap-2 [&_.stats]:shrink-0 [&_.stats]:font-mono [&_.stats]:text-xs [&_.stats]:font-medium [&_.stats]:tabular-nums","aria-expanded":t,onClick:()=>r(c=>!c),children:[f.jsx("span",{className:"chev",children:t?f.jsx($a,{size:14}):f.jsx(Ha,{size:14})}),f.jsx("span",{className:"path",children:f.jsx("code",{children:ox(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:["−",a]})]})]}),t&&(e.hunks.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:m0e()}):f.jsx("div",{className:"diff-file-body overflow-x-auto bg-background",children:f.jsx(T1t,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:gvt,tokens:o,viewType:"unified"})}))]})}function vvt({files:e,className:n}){return f.jsx("div",{className:n?`${ax} ${n}`:ax,children:e.map((t,r)=>f.jsx(qM,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function bvt(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 GM({diff:e,partial:n=!1}){var m;const t=M.useMemo(()=>mvt(e,n),[e,n]),r=t.files,s=M.useMemo(()=>r.map((g,S)=>({file:g,key:`${g.oldPath}→${g.newPath}#${S}`,changes:H4(g)})),[r]),[a,l]=M.useState(null),[o,c]=M.useState(!1),d=o&&!n,_=s.some(g=>g.key===a)?a:((m=s[0])==null?void 0:m.key)??null,h=s.find(g=>g.key===_)??null;return t.failed?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?f0e():z0e()}):s.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:l0e()}):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",{children:n?s.length===1?k0e():s0e({count:Yt(s.length)}):s.length===1?x0e():V_e({count:Yt(s.length)})}),!n&&f.jsx("button",{type:"button",onClick:()=>c(g=>!g),children:d?F_e():O0e()})]}),d?f.jsx(vvt,{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":X_e(),children:s.map(g=>f.jsxs("button",{type:"button",className:g.key===_?"active":"","aria-pressed":g.key===_,onClick:()=>l(g.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-${g.file.type}`,children:bvt(g.file)}),f.jsx("code",{title:ox(g.file),children:ox(g.file)}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",g.changes.additions]}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",g.changes.deletions]})]},g.key))}),f.jsx("div",{className:`${ax} diff-explorer-preview min-w-0`,children:h&&f.jsx(qM,{file:h.file,defaultExpanded:!0},h.key)})]})]})}function xvt({experiment:e,refreshKey:n,onLoadingChange:t}){const[r,s]=M.useState(null),[a,l]=M.useState(null);return M.useEffect(()=>{let o=!1;return t(!0),l(null),s(null),UJe(e.id).then(c=>{o||s(c)}).catch(c=>{o||l(c.message)}).finally(()=>{o||t(!1)}),()=>{o=!0}},[e.id,n,t]),f.jsx(Yu,{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:a?f.jsxs(Ji,{children:[jW()," ",ke(a)]}):r?r.diff.trim()?f.jsxs(f.Fragment,{children:[r.truncated&&f.jsx(UM,{bytesRead:r.bytesRead,byteLimit:r.byteLimit}),f.jsx(GM,{diff:r.diff,partial:r.truncated})]}):f.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?IW():CW()}):f.jsx(Ji,{children:RW()})})}function VM({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:a,githubTitle:l,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":dse(),children:[f.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:pse()}),f.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:ose()})]}),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(em,{size:12}),f.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),a&&f.jsx(rm,{href:a,target:"_blank",rel:"noopener noreferrer",title:l,"aria-label":l,children:f.jsx(Em,{size:13})}),f.jsx("span",{className:"flex-1"}),f.jsx(Kt,{title:x7(),"aria-label":x7(),onClick:c,children:o?f.jsx(Dt,{}):f.jsx(UN,{size:13})})]})}const yvt=/\.(md|mdx|markdown)$/i,wvt=/\.tex$/i,Svt=/\.html?$/i,kvt=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,Cvt=/\.(csv|tsv|xlsx?|ods)$/i,Evt=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,Nvt=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,zvt=/\.pdf$/i,jvt=/\.(docx?|log|rtf|txt)$/i;function Avt(e){return kvt.test(e)}function P4(e){return yvt.test(e)}function WM(e){return wvt.test(e)}function Tvt(e){return Svt.test(e)}function Op({name:e}){const n=P4(e)?"markdown":Avt(e)?"image":Cvt.test(e)?"spreadsheet":Evt.test(e)?"code":Nvt.test(e)?"archive":zvt.test(e)?"pdf":jvt.test(e)||WM(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 KM(e,n){const t=navigator.clipboard;if(!t){Br(sde(),"error");return}t.writeText(`${e.replace(/[\\/]+$/,"")}/${n}`).then(()=>Br(Xf(),"success")).catch(r=>Br(r instanceof Error?r.message:String(r),"error"))}function YM({name:e,onCommit:n,onCancel:t}){const[r,s]=M.useState(e),a=M.useRef(!1),l=()=>{if(a.current)return;a.current=!0;const o=r.trim();!o||o===e?t():n(o)};return f.jsx(id,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":kde({path:ke(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:l,onKeyDown:o=>{o.stopPropagation(),o.key==="Enter"?(o.preventDefault(),o.currentTarget.blur()):o.key==="Escape"&&(o.preventDefault(),a.current=!0,t())}})}function XM(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 ZM({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:a,onClose:l}){const o=M.useRef(null),c=M.useRef(l);c.current=l;const[d,_]=M.useState({x:e.x,y:e.y});M.useLayoutEffect(()=>{var k;const g=o.current;if(!g)return;const S=document.activeElement instanceof HTMLElement?document.activeElement:null;return _({x:Math.max(8,Math.min(e.x,window.innerWidth-g.offsetWidth-8)),y:Math.max(8,Math.min(e.y,window.innerHeight-g.offsetHeight-8))}),(k=g.querySelector("button"))==null||k.focus(),()=>{g.contains(document.activeElement)&&(S==null||S.focus())}},[e]),M.useEffect(()=>{const g=()=>c.current(),S=b=>{var v;(v=o.current)!=null&&v.contains(b.target instanceof Node?b.target:null)||c.current()},k=b=>{if(b.key==="Tab"){c.current();return}b.key==="Escape"&&(b.preventDefault(),b.stopPropagation(),c.current())};return document.addEventListener("pointerdown",S),window.addEventListener("blur",g),window.addEventListener("resize",g),window.addEventListener("scroll",g,!0),document.addEventListener("keydown",k,!0),()=>{document.removeEventListener("pointerdown",S),window.removeEventListener("blur",g),window.removeEventListener("resize",g),window.removeEventListener("scroll",g,!0),document.removeEventListener("keydown",k,!0)}},[]);const h=g=>{c.current(),g()},m=(g,S,k=!1)=>f.jsx(Nr,{role:"menuitem",danger:k,onClick:()=>h(S),children:f.jsx("span",{children:g})});return Il.createPortal(f.jsxs("div",{ref:o,role:"menu","aria-label":mde({path:ke(e.path)}),className:"option-menu fixed z-100 min-w-44 overflow-hidden rounded-lg border border-border bg-background p-1.5 shadow-menu",style:{left:d.x,top:d.y},onContextMenu:g=>g.preventDefault(),onKeyDown:g=>{var v,x;if(g.key!=="ArrowDown"&&g.key!=="ArrowUp")return;g.preventDefault();const S=[...((v=o.current)==null?void 0:v.querySelectorAll("button"))??[]],k=S.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:S[0]),b=g.key==="ArrowDown"?1:-1;(x=S[(k+b+S.length)%S.length])==null||x.focus()},children:[m(xde(),n),t&&m(RE(),t),r&&m(fde(),r),m(jE(),s),a&&m(ME(),a,!0)]}),document.body)}const lx=["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(" "),OC=["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 IC(){return{dirs:new Map,files:[]}}function QM(e){const n=IC();for(const t of e){const r=t.split("/");let s=n;for(let a=0;aa(t),title:t,children:[m?f.jsx($a,{size:13,className:OC}):f.jsx(Ha,{size:13,className:OC}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),m&&f.jsx(F4,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:a,onOpenFile:l,renamingPath:o,onContextMenu:c,onRename:d,onCancelRename:_})]})}function F4({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:a,renamingPath:l,onContextMenu:o,onRename:c,onCancelRename:d}){const _=[...e.dirs.keys()].sort((m,g)=>m.localeCompare(g)),h=[...e.files].sort((m,g)=>m.localeCompare(g));return f.jsxs(f.Fragment,{children:[_.map(m=>{const g=n?`${n}/${m}`:m;return f.jsx(Mvt,{name:m,node:e.dirs.get(m),path:g,depth:t,toggled:r,onToggle:s,onOpenFile:a,renamingPath:l,onContextMenu:o,onRename:c,onCancelRename:d},`d:${g}`)}),h.map(m=>{const g=n?`${n}/${m}`:m;if(l===g&&c&&d)return f.jsxs("div",{className:lx,style:{paddingInlineStart:8+t*14},children:[f.jsx(Op,{name:m}),f.jsx(YM,{name:m,onCommit:k=>c(g,k),onCancel:d})]},`f:${g}`);const S=zr(k=>a(g,k));return f.jsxs("button",{type:"button",className:lx,style:{paddingInlineStart:8+t*14},...S,onContextMenu:k=>{o&&(k.preventDefault(),o(k,g))},onKeyDown:k=>{if(o&&(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10")){k.preventDefault(),o(k,g);return}S.onKeyDown(k)},title:eB({name:ke(g)}),children:[f.jsx(Op,{name:m}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:m})]},`f:${g}`)})]})}function Rvt({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:a,onToggledChange:l,onOpenFile:o}){const c=t.branchName,d=`${e}:${c}`,[_,h]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState(!1),[x,y]=M.useState(0),[C,j]=M.useState(void 0),N=M.useRef(0),T=M.useRef(null),z=M.useCallback(()=>{T.current=d;const P=++N.current;k(!0),Vb(e,{ref:c}).then(F=>{P===N.current&&(h(F),g(null))}).catch(F=>{P===N.current&&g(F.message)}).finally(()=>{P===N.current&&k(!1)})},[e,c,d]);M.useEffect(()=>(N.current++,T.current=null,h(null),g(null),k(!1),()=>{N.current++}),[d]),M.useEffect(()=>{r==="files"&&T.current!==d&&z()},[r,d,z]),M.useEffect(()=>{j(void 0);const P=t.chatSessionId;if(!P)return;let F=!1;return tz(P).then(W=>{!F&&W.exists&&W.branch===c&&j(P)}).catch(()=>{}),()=>{F=!0}},[t.chatSessionId,c]);const D=M.useMemo(()=>_?QM(_.entries):null,[_]),O=r==="files"?S:b,H=M.useCallback(P=>{const F=new Set(s);F.has(P)?F.delete(P):F.add(P),l(F)},[s,l]);return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[f.jsx(VM,{view:r,onViewChange:a,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?tm(n.githubOwner,n.githubRepo,c):void 0,githubTitle:NE({branch:ke(c)}),refreshing:O,onRefresh:()=>r==="files"?z():y(P=>P+1)}),r==="changes"?f.jsx(xvt,{experiment:t,refreshKey:x,onLoadingChange:v},t.id):f.jsxs(f.Fragment,{children:[(_==null?void 0:_.truncated)&&f.jsx(Ji,{children:wse()}),m&&D&&f.jsxs(Ji,{children:[Ase()," ",ke(m)]}),f.jsx(Yu,{children:D?D.dirs.size===0&&D.files.length===0?f.jsx(Ji,{children:Ese()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(F4,{node:D,parentPath:"",depth:0,toggled:s,onToggle:H,onOpenFile:(P,F)=>C?o(P,C,void 0,F):o(P,void 0,c,F)})}):f.jsx(Ji,{children:m?IE({error:ke(m)}):BE()})})]})]})}function Dvt({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:a,onOpenFile:l,canRenameFile:o}){var J;const c=n.id,[d,_]=M.useState(null),[h,m]=M.useState(null),[g,S]=M.useState(null),[k,b]=M.useState(!0),[v,x]=M.useState(null),[y,C]=M.useState(null),j=M.useRef(0),N=M.useCallback(()=>{const $=++j.current;b(!0),(async()=>{if(!e)return[null,await Vb(c,{ref:n.baselineBranch})];const B=await tz(e),Y=B.exists?{sessionId:e}:{ref:n.baselineBranch};return[B,await Vb(c,Y)]})().then(([B,Y])=>{$===j.current&&(_(B),m(Y),S(null))}).catch(B=>{$===j.current&&S(B.message)}).finally(()=>{$===j.current&&b(!1)})},[e,c,n.baselineBranch]);M.useEffect(()=>(_(null),m(null),S(null),N(),()=>{j.current++}),[N]),vz(c,e,!0,N);const T=M.useMemo(()=>h?QM(h.entries):null,[h]),z=M.useCallback($=>{const L=new Set(r);L.has($)?L.delete($):L.add($),a(L)},[r,a]),D=e&&(d!=null&&d.exists)?d:null,O=(D==null?void 0:D.branch)??(D!=null&&D.baselineBranch?sZe({branch:ke(D.baselineBranch)}):oN()),H=((J=D==null?void 0:D.files)==null?void 0:J.length)??0,P=D?XXe({branch:ke(`${O}${H>0?"*":""}`)}):eZe({branch:ke(n.baselineBranch)}),F=D?D.branch:n.baselineBranch,W=($,L)=>D?l($,e,void 0,L):l($,void 0,n.baselineBranch,L),Z=(h==null?void 0:h.root)==="worktree"||(h==null?void 0:h.root)==="clone"&&!e,U=async($,L)=>{try{await WJe(c,$,L,{sessionId:e}),N()}catch(B){Br(B instanceof Error?B.message:String(B),"error")}},X=$=>{const L=(h==null?void 0:h.path)??n.repoPath;KM(L,$)};return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[f.jsx(VM,{view:D?t:"files",onViewChange:s,showViewToggle:!!D,branchLabel:P,branchTitle:P,githubHref:n.githubEnabled&&F?tm(n.githubOwner,n.githubRepo,F):void 0,githubTitle:F?NE({branch:ke(F)}):void 0,refreshing:k,onRefresh:N}),g&&(d||h)&&f.jsxs(Ji,{children:[kZe()," ",ke(g)]}),!h||e&&!d?f.jsx(Yu,{children:f.jsx(Ji,{children:g?IE({error:ke(g)}):BE()})}):D&&t==="changes"?f.jsx(Yu,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:H===0||!D.diff?f.jsx("div",{className:"changes-note text-sm text-muted",children:mZe()}):f.jsxs(f.Fragment,{children:[D.diff.truncated&&f.jsx(UM,{bytesRead:D.diff.bytesRead,byteLimit:D.diff.byteLimit}),f.jsx(GM,{diff:D.diff.diff,partial:D.diff.truncated})]})}):f.jsxs(Yu,{children:[h.truncated&&f.jsx(Ji,{children:lZe()}),T?T.dirs.size===0&&T.files.length===0?f.jsx(Ji,{children:xZe()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(F4,{node:T,parentPath:"",depth:0,toggled:r,onToggle:z,onOpenFile:W,renamingPath:y,onContextMenu:($,L)=>{x(XM($,L))},onRename:($,L)=>{C(null),U($,{action:"rename",newName:L})},onCancelRename:()=>C(null)})}):f.jsx(Ji,{children:fZe()})]}),v&&f.jsx(ZM,{target:v,onOpen:()=>W(v.path,"keepOpen"),onRename:Z&&o(v.path)?()=>C(v.path):void 0,onDuplicate:Z?()=>void U(v.path,{action:"duplicate"}):void 0,onCopyPath:()=>X(v.path),onDelete:Z?()=>{window.confirm(lde({path:ke(v.path)}))&&U(v.path,{action:"delete"})}:void 0,onClose:()=>x(null)})]})}function JM({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const a=M.useMemo(()=>{if(!e)return[];const _=e.replace(/\r\n?/g,` +`),h=pT(_,Fy(n));return _.endsWith(` +`)?h.slice(0,-1):h},[e,n]),l=t&&a.length>0?Math.min(Math.max(Math.trunc(t),1),a.length):void 0,o=M.useRef(null);M.useEffect(()=>{var _;r!==void 0&&(l?((_=o.current)==null||_.scrollIntoView({block:"center"}),s==null||s()):a.length===0&&(s==null||s()))},[a.length,s,r,l]);const{ruleCh:c}=AT(a.length),d=M.useMemo(()=>a.map((_,h)=>f.jsxs("div",{ref:h+1===l?o:void 0,className:`file-view-line flex items-stretch ${h+1===l?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[f.jsx("span",{"data-line":h+1,className:`${jT} 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 ${Ap} ${zT}`,children:mT(_)?f.jsx("br",{}):_})]},h)),[a,c,l]);return f.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${Ap}`,children:[a.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"}),d]})}function eR(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function BC({url:e,name:n}){return f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Mme()," ",f.jsxs("a",{href:e,download:n,children:[GE()," ",ke(n)]})]})}function cx({kind:e,url:n,name:t,downloadBar:r=!0}){const[s,a]=M.useState(!1);if(M.useEffect(()=>a(!1),[e,n]),s)return f.jsx(BC,{url:n,name:t});let l;return e==="image"?l=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:()=>a(!0)})}):e==="audio"?l=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:()=>a(!0)})}):e==="video"?l=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:()=>a(!0)})}):l=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:()=>a(!0),children:f.jsx(BC,{url:n,name:t})}),f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[l,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:[GE()," ",t]})})]})}const $C="tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]";function Lvt(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function Ovt(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),a=r===-1?"":t.slice(r),l=s.indexOf("?"),o=l===-1?s:s.slice(0,l),c=l===-1?"":s.slice(l+1),d=o.startsWith("/")?[]:n.split("/").filter(g=>g.length>0);for(const g of o.split("/"))if(!(!g||g==="."))if(g===".."){if(d.length===0)return null;d.pop()}else d.push(g);const _=d.join("/");if(!_)return null;const h=new URLSearchParams(c);h.delete("path");const m=h.toString();return{path:_,url:`${Lh(e,_)}${m?`&${m}`:""}${a}`}}function Ivt(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` +---`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const tR="orx:files-tree-width",nR="orx:artifacts-collapsed:",rR=180,sR=320,Bvt=8,$vt=280;function Hvt(){try{const e=Number(localStorage.getItem(tR));if(Number.isFinite(e)&&e>=rR&&e<=sR)return e}catch{}return $vt}function Pvt(e){try{const n=localStorage.getItem(`${nR}${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 _h(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=_h(t.children??[],n);if(r)return r}}return null}function iR({projectId:e,folder:n,markdown:t,entries:r}){const s=a=>{if(Lvt(a))return a;const l=Ovt(e,n,a);if(!l)return null;const o=_h(r,l.path);if(!o)return l.url;const c=l.url.indexOf("#"),d=c===-1?l.url:l.url.slice(0,c),_=c===-1?"":l.url.slice(c);return`${d}&v=${o.modifiedAt}:${o.size}${_}`};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(wlt,{remarkPlugins:[oT,[lT,bT]],rehypePlugins:[OA],components:{a:({href:a,children:l,...o})=>{const c=!a||a.startsWith("#"),d=c?a:s(a);return d?f.jsx("a",{...o,href:d,...c?{}:{target:"_blank",rel:"noopener noreferrer"},children:l}):f.jsx("span",{children:l})},img:({src:a,alt:l})=>{if(!a||typeof a!="string")return null;const o=s(a);return o?f.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[f.jsx("img",{src:o,alt:l??"",loading:"lazy"}),l&&f.jsx("span",{className:"artifact-img-caption",children:l})]}):null},...xT},children:gT(Ivt(t))})})}function Fvt(e){return e.presentation==="text"&&P4(e.name)?"markdown":eR(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function Uvt(e,n,t){const[r,s]=M.useState(null),[a,l]=M.useState(!1),[o,c]=M.useState(!1),[d,_]=M.useState(null),h=M.useRef(0),m=M.useRef(!1),g=t==="markdown"||t==="text"&&n.size<=oz;return M.useEffect(()=>{if(l(!1),c(!1),_(null),!g)return;let S=!1;const k=++h.current;return lz(e,n.path).then(v=>{if(!v)throw new Error(_V());return v}).then(v=>{S||k!==h.current||(v.binary?l(!0):(m.current=!0,s(v.content)),c(v.truncated))}).catch(v=>{!S&&k===h.current&&!m.current&&_(v instanceof Error?v.message:String(v))}),()=>{S=!0}},[e,n.path,n.modifiedAt,t,g]),{text:r,binary:a,truncated:o,error:d,wantsText:g}}function qvt({projectId:e,entry:n,onDelete:t,artifactEntries:r}){const s=Fvt(n),{text:a,binary:l,truncated:o,error:c,wantsText:d}=Uvt(e,n,s),[_,h]=M.useState(!1),m=s==="markdown",g=n.path.split("/").slice(0,-1).join("/"),S=`${Lh(e,n.path)}&v=${n.modifiedAt}`;let k;return s==="image"||s==="audio"||s==="video"||s==="pdf"?k=f.jsx(cx,{kind:s,url:S,name:n.name}):s==="download"||!d||l?k=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[s==="download"||l?oV():yW()," ",f.jsx("a",{href:S,...s==="download"||l?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:s==="download"||l?FE():vV()})]}):c?k=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[IV()," ",ke(c)]}):a===null?k=f.jsxs(jr,{children:[f.jsx(Dt,{})," ",YV()]}):m&&!_?k=f.jsx(iR,{projectId:e,folder:g,markdown:a,entries:r}):k=f.jsx(JM,{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 h-10 flex items-center gap-2 py-0 px-3.5 border-b border-b-border-variant text-subtext shrink-0",children:[f.jsx(td,{size:13,className:"shrink-0"}),f.jsx("code",{className:"fpreview-path font-mono text-sm text-text flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:ke(n.path),children:n.path}),f.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0",children:[rW()," ",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:Ta(n.size)}),m&&f.jsx(Kt,{active:_,"data-tip":_?dp():$u(),"data-tip-align":"end","aria-label":_?dp():$u(),onClick:()=>h(b=>!b),children:f.jsx(Fb,{size:13})}),f.jsx(rm,{href:S,target:"_blank",rel:"noopener noreferrer","data-tip":G6(),"data-tip-align":"end","aria-label":G6(),children:f.jsx(Dc,{size:13})}),f.jsx(Kt,{"data-tip":q6(),"data-tip-align":"end","aria-label":q6(),onClick:()=>{window.confirm(Ax({path:ke(n.path)}))&&t(n.path)},children:f.jsx(xd,{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:[k,o&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:PV()})]})]})}function aR({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:a,onOpenFile:l,onDelete:o,renamingPath:c,onContextMenu:d,onRename:_,onCancelRename:h}){return f.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(m=>{var S;const g={paddingInlineStart:8+Math.min(n,Bvt)*14};if(m.isDir){const k=!t.has(m.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:g,onClick:()=>s(m.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?VG({name:ke(m.name)}):rV({name:ke(m.name)}),onClick:b=>{b.stopPropagation(),s(m.path)},children:f.jsx(Ha,{size:13,className:k?"open":""})}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:m.name}),f.jsx(Kt,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":RV(),"data-tip-align":"end","aria-label":JG({name:ke(m.name)}),onClick:b=>{b.stopPropagation(),window.confirm(Ax({path:ke(m.path)}))&&o(m.path)},children:f.jsx(xd,{size:12})})]}),k&&(((S=m.children)==null?void 0:S.length)??0)>0&&f.jsx(aR,{entries:m.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:a,onOpenFile:l,onDelete:o,renamingPath:c,onContextMenu:d,onRename:_,onCancelRename:h})]},m.path)}return c===m.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:g,children:[f.jsx(Op,{name:m.name}),f.jsx(YM,{name:m.name,onCommit:k=>_(m.path,k),onCancel:h})]},m.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===m.path?"selected":""}`,style:g,title:tI({path:ke(m.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===m.path,onClick:()=>a(m.path),onDoubleClick:()=>l(m.path),onContextMenu:k=>{k.preventDefault(),a(m.path),d(k,m.path)},onAuxClick:k=>{k.button===1&&(k.preventDefault(),a(m.path),l(m.path))},onKeyDown:k=>{if(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10"){k.preventDefault(),a(m.path),d(k,m.path);return}if(k.key===" "){k.preventDefault(),k.stopPropagation(),a(m.path);return}k.key==="Enter"&&(k.preventDefault(),k.stopPropagation(),a(m.path),l(m.path))},children:[f.jsx(Op,{name:m.name}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:m.name})]},m.path)})})}function Gvt({dir:e,onOpenStorage:n}){const[t,r]=M.useState(!1);return f.jsxs("div",{className:"ftree-footer shrink-0 flex items-center gap-0.5 py-[5px] px-2 border-t border-t-border-variant [&_code]:flex-1 [&_code]:min-w-0 [&_code]:[direction:rtl] [&_code]:text-left [&_code]:font-mono [&_code]:text-xs [&_code]:text-muted [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap",title:ke(e),children:[f.jsx("code",{className:"path-front-ellipsis",children:e}),f.jsx(Kt,{size:"small",className:$C,"data-tip":t?Xf():jE(),"aria-label":EV(),onClick:()=>{var s;(s=navigator.clipboard)==null||s.writeText(e),r(!0),setTimeout(()=>r(!1),1200)},children:t?f.jsx(mi,{size:12}):f.jsx(Qp,{size:12})}),n&&f.jsx(Kt,{size:"small",className:$C,"data-tip":V6(),"data-tip-align":"end","aria-label":V6(),onClick:n,children:f.jsx(cJe,{size:12})})]})}function Vvt({project:e,artifacts:n,onChanged:t,onOpenFile:r,canRenameFile:s,onOpenStorage:a}){const[l,o]=M.useState(null),[c,d]=M.useState(()=>Pvt(e.id)),[_,h]=M.useState(Hvt),[m,g]=M.useState(null),[S,k]=M.useState(null),b=M.useRef(null);M.useEffect(()=>{try{localStorage.setItem(`${nR}${e.id}`,JSON.stringify([...c]))}catch{}},[e.id,c]);const v=z=>{var F;z.preventDefault(),z.currentTarget.setPointerCapture(z.pointerId);const D=(F=b.current)==null?void 0:F.getBoundingClientRect(),O=document.body.style.userSelect;document.body.style.userSelect="none";const H=W=>{const Z=Math.round(W.clientX-((D==null?void 0:D.left)??0)),U=Math.min(Math.max(Z,rR),sR);h(U);try{localStorage.setItem(tR,String(U))}catch{}},P=()=>{window.removeEventListener("pointermove",H),window.removeEventListener("pointerup",P),window.removeEventListener("pointercancel",P),document.body.style.userSelect=O};window.addEventListener("pointermove",H),window.addEventListener("pointerup",P),window.addEventListener("pointercancel",P)};M.useEffect(()=>{if(!l||!n)return;const z=_h(n.entries,l);(!z||z.isDir)&&o(null)},[l,n]);const x=z=>d(D=>{const O=new Set(D);return O.has(z)?O.delete(z):O.add(z),O}),y=z=>{(l===z||l!=null&&l.startsWith(z+"/"))&&o(null),Het(e.id,z).catch(()=>{}).finally(t)},C=async(z,D)=>{try{await Pet(e.id,z,D),D.action==="rename"&&l===z&&o(null),t()}catch(O){Br(O instanceof Error?O.message:String(O),"error")}},j=z=>{n&&KM(n.dir,z)};if(!n)return f.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:f.jsxs(jr,{className:"p-5",children:[f.jsx(Dt,{})," ",JV()]})});const N=z=>f.jsx(aR,{entries:z,depth:0,collapsed:c,selected:l,onToggle:x,onSelect:o,onOpenFile:r,onDelete:y,renamingPath:S,onContextMenu:(D,O)=>{g(XM(D,O))},onRename:(D,O)=>{k(null),C(D,{action:"rename",newName:O})},onCancelRename:()=>k(null)}),T=l?_h(n.entries,l):null;return n.entries.length===0?f.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:f.jsxs("div",{className:"files-empty-state flex-1 flex flex-col items-center justify-center gap-1.5 p-6 text-center text-muted [&_h3]:mt-1.5 [&_h3]:mx-0 [&_h3]:mb-0 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text [&_p]:m-0 [&_p]:max-w-105 [&_p]:text-sm [&_p]:leading-[1.55] [&_p]:text-subtext [&_.ftree-footer]:mt-2.5 [&_.ftree-footer]:max-w-full [&_.ftree-footer]:border [&_.ftree-footer]:border-border [&_.ftree-footer]:rounded-md [&_.ftree-footer]:py-1.5 [&_.ftree-footer]:px-2.5 [&_.ftree-footer]:bg-background [&_.ftree-footer_code]:max-w-95",children:[f.jsx(Ux,{size:28,strokeWidth:1.5}),f.jsx("h3",{children:oW()}),f.jsx("p",{children:gW()}),f.jsx(Gvt,{dir:n.dir,onOpenStorage:a})]})}):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:b,style:{width:_},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:v}),f.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[N(n.entries),n.truncated&&f.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:GV()})]})]}),T?f.jsx(qvt,{projectId:e.id,entry:T,onDelete:y,artifactEntries:n.entries},T.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(YQe,{size:22,strokeWidth:1.5}),f.jsx("span",{children:wV()})]}),m&&f.jsx(ZM,{target:m,onOpen:()=>r(m.path),onRename:s(m.path)?()=>k(m.path):void 0,onDuplicate:()=>void C(m.path,{action:"duplicate"}),onCopyPath:()=>j(m.path),onDelete:()=>{window.confirm(Ax({path:ke(m.path)}))&&y(m.path)},onClose:()=>g(null)})]})}const oR=20*1024*1024,lR="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",cR="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",uR="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",Wvt="font-mono text-base font-medium text-text",Kvt="mt-1 mb-0 text-sm leading-relaxed text-text";function dR(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 a=s.indexOf(",");n(a>=0?s.slice(a+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function Yvt(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function fR({accept:e,busy:n,prompt:t,onFile:r}){const[s,a]=M.useState(!1),l=M.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(),a(!0)},onDragLeave:()=>a(!1),onDrop:o=>{var d;if(o.preventDefault(),a(!1),n)return;const c=(d=o.dataTransfer.files)==null?void 0:d[0];c&&r(c)},onClick:()=>{var o;n||(o=l.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=l.current)==null||c.click())},children:[f.jsx("input",{ref:l,type:"file",accept:e,hidden:!0,onChange:o=>{var d;const c=(d=o.target.files)==null?void 0:d[0];c&&r(c),o.target.value=""}}),n?f.jsxs(f.Fragment,{children:[f.jsx(Dt,{}),f.jsx("span",{children:LGe()})]}):f.jsxs(f.Fragment,{children:[f.jsx(yJe,{size:20,strokeWidth:1.5}),f.jsx("span",{children:t})]})]})}function hR({bytes:e,updatedAt:n}){return f.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[Ta(e),n>0&&f.jsxs("span",{className:"text-muted",children:[" · ",La(n)]})]})}function Xvt({skill:e,onDeleted:n,onError:t}){const[r,s]=M.useState(!1);return f.jsxs("div",{className:uR,children:[f.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[f.jsxs("code",{className:Wvt,children:["/",e.name]}),e.origin&&f.jsx(Ot,{children:e.origin})]}),f.jsx(hR,{bytes:e.bytes,updatedAt:e.updatedAt}),!e.origin&&f.jsx(Kt,{"data-tip":rGe(),"data-tip-align":"end","aria-label":aqe({name:ke(e.name)}),disabled:r,onClick:()=>{window.confirm(nqe({name:ke(e.name)}))&&(s(!0),ott(e.name).then(n).catch(a=>{s(!1),t(a instanceof Error?a.message:String(a))}))},children:f.jsx(xd,{size:13})})]})}function Zvt({template:e,onChanged:n,onError:t}){const[r,s]=M.useState(!1),a=e.supportFiles.length;return f.jsxs("div",{className:uR,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:Kvt,children:[e.entry,a>0&&(a===1?Rqe():Pqe({count:Yt(a)}))]})]}),f.jsx(hR,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(Kt,{"data-tip":oGe(),"data-tip-align":"end","aria-label":_qe({name:ke(e.name)}),disabled:r,onClick:()=>{window.confirm(uqe({name:ke(e.name)}))&&(s(!0),stt(e.name).then(n).catch(l=>{s(!1),t(l instanceof Error?l.message:String(l))}))},children:f.jsx(xd,{size:13})})]})}function Qvt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(!1),[l,o]=M.useState(null),[c,d]=M.useState(null),_=M.useCallback(()=>{a(!0),itt().then(g=>{n(g),d(null)}).catch(g=>{n([]),d(g instanceof Error?g.message:String(g))}).finally(()=>a(!1))},[]);M.useEffect(()=>{_()},[_]);const h=M.useRef(!1),m=M.useCallback(async g=>{if(!h.current){if(o(null),!Yvt(g.name)){o(UGe());return}if(g.size>oR){o(CN());return}h.current=!0,r(!0);try{await att({filename:g.name,contentBase64:await dR(g)}),_()}catch(S){o(S instanceof Error?S.message:String(S))}finally{h.current=!1,r(!1)}}},[_]);return f.jsxs("section",{className:lR,children:[f.jsxs("div",{className:"flex items-baseline gap-2.5",children:[f.jsx("h3",{children:TGe()}),f.jsxs($e,{className:"ms-auto",size:"small",onClick:_,disabled:s,children:[f.jsx(bd,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",Xp()]})]}),f.jsx("p",{className:cR,children:vqe()}),f.jsx(fR,{accept:".md,.markdown,.zip",busy:t,prompt:wqe(),onFile:g=>void m(g)}),l&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:l}),e===null?f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Dt,{})," ",pGe()]}):c?f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Gqe()," ",c]}):e.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:SGe()}):f.jsx("div",{className:"flex flex-col mt-1",children:e.map(g=>f.jsx(Xvt,{skill:g,onDeleted:_,onError:o},g.name))})]})}function Jvt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null),[l,o]=M.useState(null),c=M.useCallback(()=>{ntt().then(h=>{n(h),o(null)}).catch(h=>{n([]),o(h instanceof Error?h.message:String(h))})},[]);M.useEffect(()=>{c()},[c]);const d=M.useRef(!1),_=M.useCallback(async h=>{if(d.current)return;a(null);const m=h.name.toLowerCase();if(!m.endsWith(".tex")&&!m.endsWith(".zip")){a(WGe());return}if(h.size>oR){a(CN());return}d.current=!0,r(!0);try{await rtt({filename:h.name,contentBase64:await dR(h)}),c()}catch(g){a(g instanceof Error?g.message:String(g))}finally{d.current=!1,r(!1)}},[c]);return f.jsxs("section",{className:lR,children:[f.jsx("h3",{children:dGe()}),f.jsx("p",{className:cR,children:$Ge()}),f.jsx(fR,{accept:".tex,.zip",busy:t,prompt:Eqe(),onFile:h=>void _(h)}),s&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:s}),e===null?f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Dt,{})," ",bGe()]}):l?f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Yqe()," ",l]}):e.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:NGe()}):f.jsx("div",{className:"flex flex-col mt-1",children:e.map(h=>f.jsx(Zvt,{template:h,onChanged:c,onError:a},h.name))})]})}function ebt(){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:Jqe()}),f.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:Iqe()}),f.jsx(Qvt,{}),f.jsx(Jvt,{})]})}const tbt="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function xl({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:a,onPromote:l,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-24 [&:hover]:bg-surface [&:hover]:text-text [&:not(.active)_+_.tab:not(.active)::before]:content-[''] [&:not(.active)_+_.tab:not(.active)::before]:absolute [&:not(.active)_+_.tab:not(.active)::before]:top-2.5 [&:not(.active)_+_.tab:not(.active)::before]:bottom-2.5 [&:not(.active)_+_.tab:not(.active)::before]:-start-px [&:not(.active)_+_.tab:not(.active)::before]:w-px [&:not(.active)_+_.tab:not(.active)::before]:bg-border [&.active]:border-border [&.active]:bg-background [&.active]:text-text [&.active]:font-medium [&.active::after]:content-[''] [&.active::after]:absolute [&.active::after]:end-0 [&.active::after]:-bottom-px [&.active::after]:start-0 [&.active::after]:h-px [&.active::after]:bg-background closable ${e?"active":""} ${s?tbt:""}`,onClick:a,onDoubleClick:l,title:s?lKe({label:n}):n,"aria-label":s?sKe({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:rse(),onPointerDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),o()},children:f.jsx(Zr,{size:12})})]})}const HC=["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 nbt({owner:e,repo:n,branch:t}){return!e||!n?f.jsx("span",{className:HC,children:f.jsx("code",{children:t})}):f.jsxs("a",{className:HC,href:tm(e,n,t),target:"_blank",rel:"noopener noreferrer",title:up({name:ke(t)}),children:[f.jsx("code",{children:t}),f.jsx(Em,{size:12})]})}const vb=["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(" "),PC=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function FC(e){return new Date(e).toLocaleString(E(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function UC(e,n){return mp((e.endedAt??n)-e.createdAt)}function rbt({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:a}){const l=r[0]??null,o=r.some(_=>_.status==="running"||_.status==="starting"),[c,d]=M.useState(()=>Date.now());return M.useEffect(()=>{if(!o)return;d(Date.now());const _=window.setInterval(()=>d(Date.now()),1e3);return()=>window.clearInterval(_)},[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(ko,{status:l?Hi(l):"idle"})]}),f.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[l&&f.jsxs($e,{...zr(_=>s(l.id,_)),children:[f.jsx(nd,{size:15}),qce()]}),f.jsxs($e,{...zr(a),children:[f.jsx(Jp,{size:15}),mce()]})]}),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:zce()}),f.jsx(Oa,{text:e.description})]}),f.jsxs("section",{className:vb,children:[f.jsx("h2",{children:l?fce():aue()}),l&&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(ko,{status:Hi(l)}),f.jsx(v4,{backend:l.backend}),f.jsxs("span",{title:nue(),children:[f.jsx(PZe,{size:13}),FC(l.createdAt)]}),f.jsxs("span",{title:Mce(),children:[f.jsx(eQe,{size:13}),UC(l,c)]}),l.commitSha&&f.jsxs("span",{title:xce(),children:[f.jsx(zQe,{size:14}),f.jsx("code",{children:l.commitSha.slice(0,7)})]}),l.exitCode!==null&&l.exitCode!==void 0&&l.exitCode!==0&&f.jsxs("span",{children:[Oce()," ",l.exitCode]})]}),l.command&&f.jsxs("code",{className:PC,children:["$ ",l.command]}),l.resultMarkdown&&f.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${l.status==="failed"?"failed":""}`,children:f.jsx(Oa,{text:l.resultMarkdown})})]})]}),f.jsxs("section",{className:vb,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(nbt,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&f.jsxs("span",{children:[Hce()," ",f.jsx("code",{children:n.slug})]}),f.jsxs("span",{title:FC(e.createdAt),children:[kce()," ",La(e.createdAt)]})]}),e.runCommand!==(l==null?void 0:l.command)&&f.jsxs("code",{className:PC,children:["$ ",e.runCommand]})]}),r.length>0&&f.jsxs("section",{className:vb,children:[f.jsx("h2",{children:Qce()}),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",{...zr(m=>s(_.id,m)),children:[f.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[Kce()," ",r.length-h]}),f.jsx(ko,{status:Hi(_)}),f.jsx("span",{children:La(_.createdAt)}),f.jsx("span",{children:UC(_,c)}),f.jsx(nd,{size:13})]},_.id))})]})]})})}function qC(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}=b4(t,!0);let a=!1,l=0,o=!1,c=!1;async function d(){if(o){c=!0;return}o=!0;try{for(;;){const h=await PJe(e,l);if(a)return;if(h.dataBase64&&r.write(qC(h.dataBase64)),l=h.nextOffset,h.eof)break}}catch{}finally{o=!1,c&&!a&&(c=!1,d())}}const _=Rtt(e,h=>{if(a)return;const m=qC(h.dataBase64);!o&&h.offset===l?(r.write(m),l+=m.length):h.offset+m.length>l&&d()});return d(),()=>{a=!0,_(),s()}},[e]),f.jsx("div",{ref:n,className:"h-full w-full"})}function ibt({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:a,parentExperiment:l,onOpenView:o,onOpenCode:c}){const d=r.filter(_=>_.experimentId===e.id).sort((_,h)=>h.createdAt-_.createdAt);return t==="overview"?f.jsx(rbt,{experiment:e,parentExperiment:l,project:n,runs:d,onOpenLogs:(_,h)=>o("terminal",_,h),onOpenCode:_=>c("files",_)}):f.jsx(abt,{experiment:e,expRuns:d,selectedRunId:s,onSelectRun:a})}function abt({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,a]=M.useState(null),[l,o]=M.useState(null),[c,d]=M.useState(!1),_=M.useRef(null),h=t&&n.find(v=>v.id===t)||n[0]||null,m=(h==null?void 0:h.status)==="running"||(h==null?void 0:h.status)==="starting",g=!!(h&&m&&(h.cancelRequested||l===h.id)),S=v=>{const x=n.findIndex(y=>y.id===v);return x===-1?n.length:n.length-x},k=M.useRef(null);M.useEffect(()=>{if(k.current===null){k.current=new Set(n.map(x=>x.id));return}const v=n.find(x=>!k.current.has(x.id));for(const x of n)k.current.add(x.id);v&&r(v.id)},[n,r]),M.useEffect(()=>{if(!c)return;const v=x=>{var y;(y=_.current)!=null&&y.contains(x.target)||d(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c]);async function b(){if(h){a(null),o(h.id);try{await JN(h.id)}catch(v){o(null),a(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}),m&&f.jsxs($e,{size:"small",variant:"ghost",disabled:g,onClick:()=>void b(),children:[f.jsx(DN,{size:13}),g?Dse():HE()]}),n.length>0&&h&&f.jsxs("div",{className:"run-history relative shrink-0",ref:_,children:[f.jsxs($e,{title:Ale(),"aria-expanded":c,onClick:()=>d(v=>!v),children:[f.jsxs("span",{children:[y7()," ",S(h.id)]}),f.jsx(ko,{status:g?"cancelling":Hi(h)}),f.jsx($a,{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(Nr,{className:"justify-start",active:v.id===(h==null?void 0:h.id),onClick:()=>{r(v.id),d(!1)},children:[f.jsxs("span",{className:"font-medium",children:[y7()," ",S(v.id)]}),f.jsx(ko,{status:Hi(v)}),f.jsx("span",{className:"ms-auto text-xs text-muted",children:La(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:h?f.jsx(sbt,{runId:h.id},h.id):f.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:Sle()})})]})}const ux=e=>e.replace(/\r\n/g,` +`),GC=(e,n,t)=>{const r=ux(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r +`),conflict:null}},go=e=>e.draft!==e.baseline,obt=e=>e.crlf?e.draft.replace(/\n/g,`\r +`):e.draft;function lbt(e,n,t){return!go(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}function cbt({projectId:e,filePath:n,sessionId:t,enabled:r,ready:s,source:a}){const[l,o]=M.useState(void 0),[c,d]=M.useState(null),[_,h]=M.useState(null),[m,g]=M.useState(!1),[S,k]=M.useState(null),[b,v]=M.useState(null),[x,y]=M.useState(!1),[C,j]=M.useState(null),[N,T]=M.useState(null),[z,D]=M.useState(!1),[O,H]=M.useState(0),P=M.useCallback(X=>{D(X),X&&H(J=>J+1)},[]),F=M.useRef(a);F.current=a,M.useEffect(()=>{if(!r)return;let X=!1;return YJe().then(J=>{X||(o(J.engine),d(J.hint),h(J.installCommand))}).catch(()=>{X||o(null)}),()=>{X=!0}},[r]);const W=M.useRef(!1),Z=M.useCallback(()=>{if(W.current)return;W.current=!0,g(!0);const X=F.current;T(null),v(null),j(null),XJe(e,n,{sessionId:t}).then(J=>{var L,B;const $=J.pdfPath;if(J.ok&&$){k(Y=>({path:$,version:((Y==null?void 0:Y.version)??0)+1,source:X})),y(J.hadErrors),j(J.note),J.hadErrors&&v(((L=J.log)==null?void 0:L.trim())||null),P(!0);return}k(null),y(!1),j(J.note),D(!1),v(((B=J.log)==null?void 0:B.trim())||_me())}).catch(J=>{k(null),y(!1),j(null),D(!1),T(J instanceof Error?J.message:String(J))}).finally(()=>{W.current=!1,g(!1)})},[e,n,t,P]),U=M.useRef(null);return M.useEffect(()=>{!r||!s||!l||U.current!==n&&(U.current=n,Z())},[r,s,l,n,Z]),{engine:l,installHint:c,installCommand:_,compiling:m,compiled:S,stale:S!==null&&S.source!==a,log:b,builtWithErrors:x,note:C,error:N,showPdf:z,setShowPdf:P,viewNonce:O,compile:Z,dismiss:()=>{T(null),v(null)}}}const ubt=3e4;function dbt({projectId:e,filePath:n,sessionId:t,enabled:r,savedSource:s,dirty:a,onPulled:l}){const[o,c]=M.useState(!1),[d,_]=M.useState(null),[h,m]=M.useState(!1),[g,S]=M.useState(!1),[k,b]=M.useState(null),[v,x]=M.useState(null),[y,C]=M.useState(!1),j=M.useCallback(P=>{c(P.hasToken),_(P.link)},[]);M.useEffect(()=>{let P=!1;if(m(!1),_(null),b(null),x(null),C(!1),D.current=!1,!!r)return JJe(e,n,{sessionId:t}).then(F=>{P||j(F)}).catch(F=>{P||x(F instanceof Error?F.message:String(F))}).finally(()=>{P||m(!0)}),()=>{P=!0}},[r,e,n,t,j]),M.useEffect(()=>{C(!1)},[s]);const N=M.useRef(!1),T=M.useRef(l);T.current=l;const z=M.useRef(a);z.current=a;const D=M.useRef(!1),O=M.useCallback(P=>N.current||z.current?!1:(N.current=!0,S(!0),x(null),net(e,n,{sessionId:t,resolve:P}).then(F=>{D.current=!1,b(F),F.pulled.includes(n)&&(z.current?C(!0):T.current(F.pulled))}).catch(F=>{D.current=!0,b(null),x(F instanceof Error?F.message:String(F))}).finally(()=>{N.current=!1,S(!1)}),!0),[e,n,t]),H=M.useRef(null);return M.useEffect(()=>{if(!r||!h||!d||a)return;const P=`${n}:${d.projectId}:${s}`;H.current!==P&&O()&&(H.current=P)},[r,h,d,n,s,a,g,O]),M.useEffect(()=>{if(!r||!h||!d||a)return;const P=setInterval(()=>{N.current||D.current||ret(e,n,{sessionId:t}).then(F=>{F.remoteChanged&&O()}).catch(F=>{D.current=!0,x(F instanceof Error?F.message:String(F))})},ubt);return()=>clearInterval(P)},[r,h,d,a,e,n,t,O]),{hasToken:o,link:d,loaded:h,syncing:g,last:k,error:v,blocked:a,staleOnDisk:y,reloaded:()=>C(!1),uploadUrl:set(e,n,{sessionId:t}),saveToken:async P=>{const F=await ez(P);c(F.hasToken)},linkProject:async P=>{j(await eet(e,n,{project:P,sessionId:t}))},unlink:async()=>{j(await tet(e,n,{sessionId:t})),H.current=null,D.current=!1,b(null),x(null)},sync:P=>{D.current=!1,O(P)},dismiss:()=>{D.current=!1,x(null)}}}function _R(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function VC(e,n,t=!1){const r=n.indexOf("#"),s=r===-1?n:n.slice(0,r),a=r===-1?"":n.slice(r),l=s.indexOf("?"),o=l===-1?s:s.slice(0,l),c=l===-1?"":s.slice(l+1);let d;try{d=decodeURI(o)}catch{return null}if(!d||d.includes("\0"))return null;const _=d.startsWith("/"),h=_?[]:e.split("/").filter(Boolean);for(const m of d.split("/"))if(!(!m||m===".")){if(m===".."){if(h.length===0)return null;h.pop();continue}h.push(m)}return h.length===0?null:{path:`${t&&(_||e.startsWith("/"))?"/":""}${h.join("/")}`,query:c,hash:a}}function fbt(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}const WC=[{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"]}],hbt=4e6,_bt=200,KC=16e6,pbt=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)}),YC=e=>e.startsWith("//")?`https:${e}`:e;async function mbt(e,n){var s;let t=hbt;const r=new Map;for(const{element:a,attribute:l,url:o,typePrefixes:c}of e){if(r.has(o)){const S=r.get(o);S&&a.setAttribute(l,S);continue}if(n.aborted)return;if(r.size>=_bt)continue;r.set(o,null);const d=await fetch(o,{signal:n}).catch(()=>null);if(!(d!=null&&d.ok))continue;const _=d.headers.get("content-type")??"",h=Number(d.headers.get("content-length"));if(!c.some(S=>_.startsWith(S))||!(Number.isFinite(h)&&h>0&&h<=t)){await((s=d.body)==null?void 0:s.cancel().catch(()=>{}));continue}const m=await d.blob().catch(()=>null),g=m&&await pbt(m);!m||!g||(t-=m.size,r.set(o,g),a.setAttribute(l,g))}}async function gbt(e,n,t){var l;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(WC.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:d,typePrefixes:_}of WC){if(!o.matches(c))continue;const h=o.getAttribute(d);if(!h)continue;const m=n(h);m&&(m===h?o.setAttribute(d,YC(h)):s.push({element:o,attribute:d,url:m,typePrefixes:_}))}await mbt(s,t);for(const o of r.querySelectorAll("a[href]")){const c=o.getAttribute("href");!c||!_R(c)||(o.setAttribute("href",YC(c)),o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"))}const a=((l=r.querySelector("base[href]"))==null?void 0:l.getAttribute("href"))??"";if(!/^https?:\/\//i.test(a)){const o=r.createElement("base");o.setAttribute("href","about:srcdoc"),r.head.prepend(o)}return`${r.doctype?``:""}${r.documentElement.outerHTML}`}async function vbt(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${KC-1}`}}).catch(()=>null),a=s!=null&&s.ok?await s.text().catch(()=>null):null;if(a===null)return{text:e,partial:!0};const l=Number((o=s==null?void 0:s.headers.get("content-range"))==null?void 0:o.split("/").pop());return{text:a,partial:Number.isFinite(l)&&l>KC}}function bbt({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[a,l]=M.useState(null);return M.useEffect(()=>{let o=!1;const c=new AbortController;return l(null),vbt(e,n,t,c.signal).then(async({text:d,partial:_})=>({source:await gbt(d,s,c.signal),partial:_})).then(d=>{o||l(d)}),()=>{o=!0,c.abort()}},[e,n,t,s]),a===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(Dt,{})," ",UE()]}):f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[a.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:Pfe()}),f.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:Gfe({name:ke(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:a.source})]})}const R0=e=>Ra(new Intl.ListFormat(E()).format(e.map(ke)));function xbt(e){if(e.error)return Swe();if(e.syncing)return t3e();if(e.blocked)return QE();const n=e.last;return n?n.pulled.length&&n.pushed.length?z5e({pulled:R0(n.pulled),pushed:R0(n.pushed)}):n.pulled.length?k5e({paths:R0(n.pulled)}):n.pushed.length?M5e({paths:R0(n.pushed)}):n.conflicts.length?Lwe():ZE():x5e()}function XC({href:e}){return f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:f5e()})}function ybt({overleaf:e}){var m,g;const[n,t]=M.useState(""),[r,s]=M.useState(!1),[a,l]=M.useState(null),[o,c]=M.useState(!1),d=()=>{t(""),l(null),c(!0)},_=!e.hasToken||o;async function h(S){S.preventDefault();const k=n.trim();if(!(r||!k)){s(!0),l(null);try{_?(await e.saveToken(k),c(!1)):await e.linkProject(k),t("")}catch(b){l(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!o){const S=((m=e.last)==null?void 0:m.conflicts)??[];return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsxs("div",{className:"flex items-center flex-wrap gap-2 text-sm text-subtext",children:[f.jsx("span",{className:"flex-1 min-w-0",children:xbt(e)}),e.syncing&&f.jsx(Dt,{}),f.jsxs("a",{className:"inline-flex items-center gap-1 text-sm text-subtext whitespace-nowrap",href:e.link.url,target:"_blank",rel:"noreferrer",children:[Zwe()," ",f.jsx(Dc,{size:11})]}),f.jsx($e,{disabled:e.syncing||e.blocked,"data-tip":e.blocked?O5e():void 0,onClick:()=>e.sync(),children:s5e()}),f.jsx($e,{variant:"ghost",disabled:e.syncing,onClick:()=>void e.unlink().catch(k=>{l(k instanceof Error?k.message:String(k))}),children:l5e()})]}),S.map(k=>f.jsxs("div",{className:"flex items-center flex-wrap gap-2 text-sm text-accent-red",children:[f.jsxs("span",{className:"flex-1 min-w-0",children:[f.jsx("code",{className:"font-mono",children:k})," ",Uwe()]}),f.jsx($e,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[k]:"keep-local"}),children:Wwe()}),f.jsx($e,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[k]:"take-overleaf"}),children:m5e()})]},k)),((g=e.last)==null?void 0:g.note)&&f.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),a&&f.jsx("div",{className:"text-sm text-accent-red whitespace-pre-wrap",children:a}),f.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[f.jsx(XC,{href:e.uploadUrl}),f.jsx($e,{variant:"ghost",type:"button",onClick:d,children:V7()})]})]})}return f.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:h,children:[f.jsx("div",{className:"text-sm text-subtext",children:_?i3e():c3e()}),f.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[f.jsx("input",{className:"flex-1 min-w-55 text-sm",type:_?"password":"text",value:n,onChange:S=>t(S.target.value),placeholder:_?mwe():"https://www.overleaf.com/project/…",autoComplete:"off"}),f.jsx($e,{type:"submit",disabled:r||!n.trim(),children:r?_?oa():Kp():_?U5e():Nwe()}),f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:_?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:_?fwe():Twe()})]}),a&&f.jsx("div",{className:"text-sm text-accent-red whitespace-pre-wrap",children:a}),f.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[f.jsx(XC,{href:e.uploadUrl}),o?f.jsx($e,{variant:"ghost",type:"button",onClick:()=>c(!1),children:$we()}):e.hasToken&&f.jsx($e,{variant:"ghost",type:"button",onClick:d,children:V7()})]})]})}function wbt({command:e}){const[n,t]=M.useState("idle"),r=M.useRef(null),s=async()=>{try{await navigator.clipboard.writeText(e),t("copied"),setTimeout(()=>t("idle"),1500)}catch{const a=r.current;if(a){const l=document.createRange();l.selectNodeContents(a);const o=window.getSelection();o==null||o.removeAllRanges(),o==null||o.addRange(l)}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(Kt,{"data-tip":n==="copied"?Xf():n==="select"?l_e():Xde(),"aria-label":efe(),onClick:()=>void s(),children:n==="copied"?f.jsx(mi,{size:13}):f.jsx(Qp,{size:13})})]})}function Sbt({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:a,branchLabel:l,onOpenFile:o,scrollPosition:c,onScrollPositionChange:d,lineScrollRequest:_,onLineScrollRequestHandled:h,onEdit:m,artifactVersion:g,artifactEntries:S=[],initialBuffer:k,onBufferStateChange:b,remote:v=!1}){var qr,Cn,Pn;const[x,y]=M.useState(null),[C,j]=M.useState(null),[N,T]=M.useState(!0),[z,D]=M.useState(0),O=t==="artifacts",H=t==="abs",P=P4(n),F=WM(n),W=Tvt(n),Z=P||W,[U,X]=M.useState(!1),[J,$]=M.useState(k??null),L=M.useRef(J),B=M.useRef(b);B.current=b;const Y=Pe=>{var ht;L.current=Pe,$(Pe),(ht=B.current)==null||ht.call(B,Pe&&(go(Pe)||Pe.conflict)?Pe:null)},[V,ie]=M.useState(!1),le=M.useRef(!1),[ae,re]=M.useState(null),[q,oe]=M.useState(!1),ce=M.useRef(0),_e=M.useRef(null),de=M.useRef(c),ve=(x==null?void 0:x.file)??null,Ce=J&&go(J)?J.path:(x==null?void 0:x.source)==="checkout"?x.file.path:n,Le=Ce.split("/").slice(0,-1).join("/"),Ue=(x==null?void 0:x.source)==="artifact",He=M.useCallback(Pe=>{var ht;return((ht=VC(Le,Pe,H))==null?void 0:ht.path)??null},[H,Le]),Bt=M.useCallback(Pe=>H?GJe(Pe):Ue?Lh(e,Pe):mS(e,Pe,{sessionId:r,ref:s}),[Ue,s,H,e,r]),Et=M.useCallback(Pe=>{if(_R(Pe))return Pe;const ht=VC(Le,Pe,H);return ht?fbt(Bt(ht.path),ht):null},[H,Le,Bt]),Nt=eR(ve==null?void 0:ve.presentation),cn=(x==null?void 0:x.source)==="artifact"&&!O,vt=O&&(x==null?void 0:x.source)==="checkout",rt=!s&&(x==null?void 0:x.source)==="checkout"&&ve!=null&&!ve.notFound,Je=r!=null&&(x==null?void 0:x.source)==="checkout"&&x.file.root==="clone",qt=rt&&ve!=null&&!ve.binary&&!ve.truncated&&!Nt&&!Je,we=qt&&ve.version===void 0,Oe=J!==null&&go(J),Xe=!we&&(qt&&typeof ve.version=="string"||Oe),st=(J==null?void 0:J.draft)??ux((ve==null?void 0:ve.content)??""),tt=(J==null?void 0:J.baseline)??ux((ve==null?void 0:ve.content)??""),zt=Xe&&J!==null&&go(J);M.useEffect(()=>{if(!Xe||(x==null?void 0:x.source)!=="checkout"||typeof(ve==null?void 0:ve.version)!="string")return;const Pe=L.current;Pe&&go(Pe)||(Y(GC(ve.path,ve.content,ve.version)),re(null))},[ve==null?void 0:ve.content,ve==null?void 0:ve.version,Xe,x==null?void 0:x.source,n]);const bt=async Pe=>{const ht=L.current;if(!Xe||!ht||!go(ht))return!0;if(le.current)return!1;if(ht.conflict&&Pe===void 0)return re(ht.conflict.exists?w7():k7()),!1;const Jn=ht.draft,pr=obt(ht);le.current=!0,ie(!0),re(null);try{const On=await VJe(e,Ce,pr,{sessionId:r,expectedVersion:Pe??ht.version}),_t=L.current??ht;return ce.current++,T(!1),Y({..._t,baseline:Jn,version:On.version,conflict:null}),y(tn=>tn&&tn.source==="checkout"?{source:"checkout",file:{...tn.file,content:pr,version:On.version}}:tn),!0}catch(On){if(On instanceof qb){const _t=L.current??ht;return go(_t)&&Y({..._t,conflict:{currentVersion:On.currentVersion,exists:On.exists}}),!1}return re(On instanceof Error?On.message:String(On)),!1}finally{le.current=!1,ie(!1)}},Rt=F&&rt&&!Je,et=cbt({projectId:e,filePath:Ce,sessionId:r,enabled:Rt,ready:ve!=null&&!ve.notFound,source:Xe?st:(ve==null?void 0:ve.content)??""}),Vt=dbt({projectId:e,filePath:Ce,sessionId:r,enabled:Rt,savedSource:tt,dirty:zt,onPulled:M.useCallback(Pe=>{Pe.includes(Ce)&&D(ht=>ht+1)},[Ce])}),[jt,Gn]=M.useState(!1),nn=((qr=Vt.last)==null?void 0:qr.conflicts.length)??0;M.useEffect(()=>{nn>0&&Gn(!0)},[nn]);const ur=Vt.error?Z5e():nn>0?lwe():Vt.blocked?QE():Vt.link?ZE():W5e(),yr=Vt.error||nn>0?"text-accent-red":Vt.link?"text-accent-green":void 0,An=F&&et.showPdf&&et.compiled!=null,Vn=we&&Oe,rn=(Xe||Vn)&&!(Z&&!U)&&!An,wn=et.compiled?`${mS(e,et.compiled.path,{sessionId:r})}&v=${et.compiled.version}`:null,Sn=wn?`${wn}&view=${et.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,dt=et.compiled?et.compiled.path.split("/").pop()??et.compiled.path:null,un=async()=>{zt&&!await bt()||F&&et.engine&&et.compile()},Ye=async()=>{zt&&await un()},[at,on]=M.useState(!1),[$t,Tt]=M.useState(null),Tn=async()=>{on(!0),Tt(null);try{await KJe(e,Ce,{sessionId:r})}catch(Pe){Tt(Pe instanceof Error?Pe.message:String(Pe))}finally{on(!1)}},Wn=M.useCallback(()=>{le.current||D(Pe=>Pe+1)},[]),kn=()=>{Y(null),oe(!1),re(null),Wn()};vz(e,r,!s&&(x==null?void 0:x.source)==="checkout",Wn),M.useEffect(()=>{if(!(s||!x||x.source==="artifact"))return window.addEventListener("focus",Wn),()=>window.removeEventListener("focus",Wn)},[s,x==null?void 0:x.source,Wn]);const Ur=`${Bt(Ce)}&v=${Ue?g??z:z}`;M.useEffect(()=>{let Pe=!1;const ht=++ce.current;T(!0);const Jn=async()=>{const _t=await qet(e,n),tn=(_t==null?void 0:_t.presentation)==="text"||(_t==null?void 0:_t.presentation)==="unknown",Qt=_t&&tn?await lz(e,n):null,St=_t===null||tn&&Qt===null;return{path:n,content:(Qt==null?void 0:Qt.content)??"",truncated:(Qt==null?void 0:Qt.truncated)??!1,binary:(Qt==null?void 0:Qt.binary)??(_t==null?void 0:_t.presentation)==="download",notFound:St,presentation:Qt?Qt.binary?"download":"text":(_t==null?void 0:_t.presentation)??"download"}},pr=async()=>{for(const _t of[`artifacts/${n}`,n]){const tn=await pS(e,_t,{sessionId:r}).catch(()=>null);if(tn&&!tn.notFound)return tn}return null};return(H?qJe(n).then(_t=>({source:"absolute",file:_t})):O?Jn().then(async _t=>{if(!_t.notFound)return{source:"artifact",file:_t};const tn=await pr();return tn?{source:"checkout",file:tn}:{source:"artifact",file:_t}}):pS(e,n,{sessionId:r,ref:s}).then(_t=>_t.notFound&&!s?Jn().then(tn=>tn.notFound?{source:"checkout",file:_t}:{source:"artifact",file:tn,checkoutRoot:_t.root}):{source:"checkout",file:_t})).then(_t=>{var Qt,St;if(Pe||ht!==ce.current)return;const tn=L.current;if(tn&&go(tn)){const In=_t.source==="checkout"?_t.file:null,_n=In!==null&&In.path===tn.path&&(!r||In.root==="worktree"),qe=lbt(tn,_n&&typeof In.version=="string"?In.version:null,_n&&!In.notFound);qe&&(qe.currentVersion!==((Qt=tn.conflict)==null?void 0:Qt.currentVersion)||qe.exists!==((St=tn.conflict)==null?void 0:St.exists))?Y({...tn,conflict:qe}):tn.conflict&&Y({...tn,conflict:null}),y(_t),j(null);return}y(_t),j(null)}).catch(_t=>{!Pe&&ht===ce.current&&j(_t.message)}).finally(()=>{!Pe&&ht===ce.current&&T(!1)}),()=>{Pe=!0}},[e,n,t,r,s,z,g]),M.useLayoutEffect(()=>{const Pe=_e.current,ht=de.current;!Pe||!ve||!ht||(Pe.scrollTop=ht.top,Pe.scrollLeft=ht.left)},[ve]);const Ui=Pe=>{if(Pe.source==="absolute")return uhe();if(O)return nhe({root:r?l0():o0()});if(s)return ahe({branch:ke(s)});if(r&&Pe.source==="checkout"&&Pe.file.root==="clone")return B_e();const ht=Pe.source==="checkout"?Pe.file.root:Pe.checkoutRoot;return _he({root:ht==="worktree"?l0():o0()})};return f.jsxs("div",{className:"file-view flex flex-col h-full min-h-0",children:[f.jsxs("div",{className:"file-view-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant text-text shrink-0",children:[f.jsx(td,{size:13,className:"shrink-0"}),f.jsx("code",{className:"file-view-path font-mono text-sm text-text flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:Ce,children:Ce}),l&&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:iI({branch:ke(l)}),children:[f.jsx(em,{size:11}),l]}),rn&&(V||zt||ae)&&f.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${ae?"text-accent-red":"text-muted"}`,title:ae??(V?oa():A_e()),children:V?f.jsxs(f.Fragment,{children:[f.jsx(Dt,{})," ",s_e()]}):ae?e_e():E_e()}),F&&et.compiled&&f.jsx(Kt,{active:!et.showPdf,"data-tip":et.stale&&et.showPdf?Rhe():et.showPdf?$u():j7(),"data-tip-align":"end","aria-label":et.showPdf?$u():j7(),onClick:()=>et.setShowPdf(!et.showPdf),children:et.showPdf?f.jsx(Fb,{size:13}):f.jsx(td,{size:13,className:et.stale?"text-accent-amber":void 0})}),F&&wn&&dt&&f.jsx(rm,{"data-tip":et.stale?jfe({name:ke(dt)}):L6({name:ke(dt)}),"data-tip-align":"end","aria-label":L6({name:ke(dt)}),href:wn,download:dt,children:f.jsx(dQe,{size:13,className:et.stale?"text-accent-amber":void 0})}),Rt&&f.jsx(Kt,{active:jt,"data-tip":ur,"data-tip-align":"end","aria-label":AB({status:ur}),"aria-expanded":jt,onClick:()=>Gn(Pe=>!Pe),children:Vt.syncing?f.jsx(Dt,{}):f.jsx(sQe,{size:13,className:yr})}),F&&rt&&f.jsx(Kt,{"data-tip":et.compiled?N7():S7(),"data-tip-align":"end","aria-label":et.compiled?N7():S7(),disabled:et.compiling||!et.engine,onClick:()=>void un(),children:et.compiling?f.jsx(Dt,{}):f.jsx(mQe,{size:13})}),Z&&f.jsx(Kt,{active:U,"data-tip":U?dp():$u(),"data-tip-align":"end","aria-label":U?dp():$u(),onClick:()=>X(Pe=>!Pe),children:f.jsx(Fb,{size:13})}),rt&&!v&&f.jsx(Kt,{"data-tip":$t??E7(),"data-tip-align":"end","aria-label":E7(),disabled:at,onClick:()=>void Tn(),children:at?f.jsx(Dt,{}):f.jsx(Dc,{size:13})}),!s&&(x==null?void 0:x.source)!=="artifact"&&f.jsx(Kt,{"data-tip":z7(),"data-tip-align":"end","aria-label":z7(),onPointerDown:Pe=>{zt&&Pe.preventDefault()},onClick:()=>zt?oe(!0):Wn(),children:N?f.jsx(Dt,{}):f.jsx(UN,{size:13})})]}),!C&&vt&&(x==null?void 0:x.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:vhe({root:x.file.root==="worktree"?l0():o0()})}),we&&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:D_e()}),((J==null?void 0:J.conflict)||q)&&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:q&&!(J!=null&&J.conflict)?Uhe():(Cn=J==null?void 0:J.conflict)!=null&&Cn.exists?w7():k7()}),((Pn=J==null?void 0:J.conflict)==null?void 0:Pn.exists)&&J.conflict.currentVersion&&f.jsx($e,{disabled:V,onPointerDown:Pe=>Pe.preventDefault(),onClick:()=>{var Pe;return void bt(((Pe=J.conflict)==null?void 0:Pe.currentVersion)??void 0)},children:jhe()}),q&&!(J!=null&&J.conflict)&&f.jsx($e,{onPointerDown:Pe=>Pe.preventDefault(),onClick:()=>oe(!1),children:TE()}),f.jsx($e,{disabled:V,onPointerDown:Pe=>Pe.preventDefault(),onClick:kn,children:Xhe()})]}),(et.error||et.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 ${et.builtWithErrors?"text-subtext":"text-accent-red"}`,children:et.error??(et.builtWithErrors?Vde():$de())}),f.jsx(Kt,{"data-tip":C7(),"data-tip-align":"end","aria-label":vfe(),onClick:et.dismiss,children:f.jsx(Zr,{size:13})})]}),et.log&&f.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:et.log})]}),Rt&&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:Che()}),f.jsx($e,{onClick:()=>{Vt.reloaded(),D(Pe=>Pe+1)},children:ofe()})]}),Rt&&Vt.error&&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 flex items-start gap-2",children:[f.jsx("span",{className:"flex-1 min-w-0 text-sm text-accent-red whitespace-pre-wrap",children:Vt.error}),f.jsx(Kt,{"data-tip":C7(),"data-tip-align":"end","aria-label":wfe(),onClick:Vt.dismiss,children:f.jsx(Zr,{size:13})})]}),Rt&&jt&&Vt.loaded&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4",children:f.jsx(ybt,{overleaf:Vt})}),F&&rt&&et.engine===null&&et.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:[et.installHint,et.installCommand&&f.jsx(wbt,{command:et.installCommand})]}),et.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:et.note}),An&&et.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:v_e()}),f.jsxs("div",{ref:_e,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",onScroll:Pe=>{const ht={top:Pe.currentTarget.scrollTop,left:Pe.currentTarget.scrollLeft};de.current=ht,d==null||d(ht)},children:[!rn&&!C&&!O&&(x==null?void 0:x.source)==="checkout"&&!x.file.notFound&&!s&&r&&x.file.root==="clone"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:w_e()}),!rn&&!C&&(x==null?void 0:x.source)==="artifact"&&!x.file.notFound&&cn&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:zde({root:x.checkoutRoot==="worktree"?l0():o0()})}),C?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Rfe()," ",ke(C)]}):ve===null?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:UE()}):rn?f.jsx(TT,{value:st,onChange:Pe=>{const ht=L.current??(ve&&typeof ve.version=="string"?GC(ve.path,ve.content,ve.version):null);ht&&Y({...ht,draft:Pe}),m==null||m(),ae&&re(null)},onSave:()=>void Ye(),onBlur:()=>void Ye(),readOnly:Vn,path:n,highlightLine:a,scrollRequest:_,onScrollRequestHandled:h}):ve.notFound?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:x?Ui(x):Qfe()}):Nt?f.jsx(cx,{kind:Nt,url:Ur,name:n.split("/").pop()??n}):ve.binary?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Mde()," ",f.jsx("a",{href:Ur,download:n.split("/").pop()??n,children:FE()})]}):An&&Sn&&dt?f.jsx(cx,{kind:"pdf",url:Sn,name:dt,downloadBar:!1},Sn):P&&!U?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:Ue?f.jsx(iR,{projectId:e,folder:Le,markdown:ve.content,entries:S}):f.jsx(Oa,{text:ve.content,resolveFilePath:He,resolveImageSrc:Et,onOpenFile:o&&((Pe,ht,Jn,pr,On)=>o(Pe,r,s,On))})}):W&&!U?f.jsx(bbt,{html:ve.content,truncated:ve.truncated,url:Ur,name:Ce,resolveSrc:Et}):f.jsxs(f.Fragment,{children:[f.jsx(JM,{text:ve.content,path:n,highlightLine:a,scrollRequest:_,onScrollRequestHandled:h}),ve.truncated&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Ife()})]})]})]})}const bb=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function kbt({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:a,setOpen:l,ref:o}=Va(),c=M.useRef(null);return M.useEffect(()=>{if(!a)return;const d=_=>{var h;_.key==="Escape"&&((h=c.current)==null||h.focus())};return document.addEventListener("keydown",d,!0),()=>document.removeEventListener("keydown",d,!0)},[a]),f.jsxs("div",{className:"rail-brand flex items-center gap-1 h-16 p-2 border-b border-b-border shrink-0 [&_.project-switcher]:relative [&_.project-switcher]:flex-1 [&_.project-switcher]:self-stretch [&_.project-switcher]:min-w-0 [&_.project-back]:shrink-0 [&_.brand]:flex [&_.brand]:items-center [&_.brand]:justify-between [&_.brand]:gap-2 [&_.brand]:w-full [&_.brand]:h-full [&_.brand]:min-w-0 [&_.brand]:font-semibold [&_.brand]:text-base [&_.brand]:text-text [&_.brand]:py-1 [&_.brand]:px-1.5 [&_.brand]:border [&_.brand]:border-transparent [&_.brand]:rounded-sm [&_.brand:hover]:bg-surface [&_.brand:hover]:border-border [&_.brand.open]:bg-surface [&_.brand.open]:border-border [&_.brand_svg]:shrink-0 [&_.brand-project-copy]:flex [&_.brand-project-copy]:flex-col [&_.brand-project-copy]:gap-[3px] [&_.brand-project-copy]:min-w-0 [&_.brand-project-copy]:leading-[1.15] [&_.brand-project-copy]:text-start [&_.brand-project-label]:text-muted [&_.brand-project-label]:text-xs [&_.brand-project-label]:font-medium [&_.brand-project-label]:tracking-[0.04em] [&_.brand-project-label]:uppercase [&_.brand_.brand-project]:min-w-0 [&_.brand_.brand-project]:overflow-hidden [&_.brand_.brand-project]:text-ellipsis [&_.brand_.brand-project]:whitespace-nowrap [&_.brand_.brand-project]:text-xl [&_.project-chevron]:text-muted [&_.project-chevron]:opacity-0 [&_.project-chevron]:transition-transform [&_.project-chevron]:duration-120 [&_.project-chevron]:ease-standard [&_.brand:hover_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:rotate-180 [&_.project-menu]:start-0 [&_.project-menu]:w-52.5 [&_.project-menu]:z-70",children:[f.jsx(Kt,{className:"project-back text-text","aria-label":A7(),onClick:n,children:f.jsx(Zf,{size:18})}),f.jsxs("div",{className:"project-switcher",ref:o,children:[f.jsxs("button",{ref:c,className:`brand${a?" open":""}`,onClick:()=>l(d=>!d),"aria-expanded":a,children:[f.jsxs("span",{className:"brand-project-copy",children:[f.jsx("span",{className:"brand-project-label",children:spe()}),f.jsx("span",{className:"brand-project",children:e})]}),f.jsx($a,{className:"project-chevron",size:14})]}),a&&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 project-menu",children:[f.jsx(Nr,{onClick:()=>{l(!1),r()},children:f.jsxs("span",{className:bb,children:[f.jsx(BN,{size:14}),W0e()]})}),f.jsx(Nr,{onClick:()=>{l(!1),n()},children:f.jsxs("span",{className:bb,children:[f.jsx(MQe,{size:14}),A7()]})}),f.jsx(Nr,{onClick:()=>{var d;(d=c.current)==null||d.focus(),l(!1),t()},children:f.jsxs("span",{className:bb,children:[f.jsx(wQe,{size:14}),Z0e()]})})]})]}),s&&f.jsx(Kt,{"data-tip":T7(),"data-tip-align":"end","aria-label":T7(),onClick:s,children:f.jsx(PN,{size:15})})]})}function ZC(){const e=M.useSyncExternalStore($tt,xS,xS);return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":$b()}),!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(RN,{size:13,className:"shrink-0 text-accent-amber"}),f.jsx("span",{dir:"auto",className:"min-w-0",children:$b()})]})]})}const QC=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),ph=["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(" "),JC=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),pR=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),e9=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),Cbt=[{id:"AI/ML",label:i2e},{id:"Biology",label:c2e},{id:"Physics",label:g2e},{id:"Other",label:h2e}];function Ebt({onDone:e,preferredAgent:n}){const[t,r]=M.useState(0),[s,a]=M.useState(null),[l,o]=M.useState(),[c,d]=M.useState(!1),[_,h]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState([]),[x,y]=M.useState(""),[C,j]=M.useState(""),[N,T]=M.useState([]),[z,D]=M.useState(""),[O,H]=M.useState([]),[P,F]=M.useState(!1),W=M.useRef(0),[Z,U]=M.useState(!1),[X,J]=M.useState(!1),$=(s==null?void 0:s.some(q=>q.agentReady))??!1,L=l!=null,B=M.useRef(0),Y=(q,oe=!1)=>{const ce=++B.current;k(!0),U(!1),J(!1),o(void 0);const _e=()=>ce===B.current;Promise.allSettled([pp(q,oe).then(de=>_e()&&a(de)),ZN().then(de=>_e()&&o(de.gitVersion))]).then(([de,ve])=>{_e()&&(de.status==="rejected"&&(U(!0),a(null)),ve.status==="rejected"&&(J(!0),o(void 0)))}).finally(()=>_e()&&k(!1))};M.useEffect(()=>Y(!1),[]),M.useEffect(()=>{if(s===null)return;const q=s.filter(oe=>oe.agentReady);g(oe=>{var _e;if(oe&&q.some(de=>de.id===oe))return oe;const ce=n&&q.find(de=>de.id===n.harness);return(ce==null?void 0:ce.id)??((_e=q[0])==null?void 0:_e.id)??null})},[s,n]),M.useEffect(()=>Jx(()=>{pp(!0).then(q=>{a(q),U(!1)}).catch(()=>U(!0))}),[]),M.useEffect(()=>{Get().then(q=>{v(q.researchAreas),y(q.otherArea??""),j(q.background??""),T(q.papers)}).catch(()=>{})},[]),M.useEffect(()=>{const q=z.trim();if(q.length<3){H([]),F(!1);return}const oe=++W.current;F(!0);const ce=setTimeout(()=>{QN(q).then(_e=>oe===W.current&&H(_e)).catch(()=>oe===W.current&&H([])).finally(()=>oe===W.current&&F(!1))},350);return()=>clearTimeout(ce)},[z]);const V=q=>{const oe=N.some(ce=>ce.paperId===q.paperId);T(ce=>ce.some(_e=>_e.paperId===q.paperId)?ce:[...ce,{paperId:q.paperId,title:t9(q.title)}]),D(""),H([]),oe||Gb(q.paperId).then(ce=>{var de;const _e=(de=ce.title)==null?void 0:de.trim();_e&&T(ve=>ve.map(Ce=>Ce.paperId===q.paperId?{...Ce,title:_e}:Ce))}).catch(()=>{})},ie=q=>T(oe=>oe.filter(ce=>ce.paperId!==q)),le=q=>{v(oe=>oe.includes(q)?oe.filter(ce=>ce!==q):[...oe,q])},ae=b.length>0&&(!b.includes("Other")||x.trim().length>0),re=async()=>{const q=s==null?void 0:s.find(ce=>ce.id===m&&ce.agentReady);if(!q||c)return;const oe=zbt(q);d(!0),h(null);try{const ce=await AJe(oe,{researchAreas:b,otherArea:b.includes("Other")?x:null,background:C||null,papers:N});e(ce.project,ce.selection)}catch(ce){h(ce instanceof Error?ce.message:String(ce))}finally{d(!1)}};return f.jsx("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${t===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:f.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${t===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:t===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(hv,{})}),f.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:Kbe()})]}),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:nxe()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:A4e()})]})}),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:Rxe()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:u4e()})]})}),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:yxe()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:ewe()})]})})]})]}),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($e,{variant:"primary",size:"large",onClick:()=>r(1),children:[U7()," ",f.jsx(G0,{size:20})]})})]}):t===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(hv,{}),f.jsx("span",{children:_4e()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:O2e()}),f.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:iye()}),s!==null&&!$&&f.jsx("p",{className:QC,children:n4e()}),s!==null&&$&&m===null&&f.jsx("p",{className:QC,children:H2e()}),f.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:s!==null?s.map(q=>f.jsx(Abt,{h:q,selected:m===q.id,onSelect:()=>g(q.id)},q.id)):Z?f.jsx("div",{className:ph,children:G7()}):f.jsxs(jr,{className:"py-2",children:[f.jsx(Dt,{})," ",hxe()]})}),(l===null||X)&&f.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[f.jsx(Tbt,{gitVersion:l,error:X}),X?f.jsx("p",{className:JC,children:G7()}):f.jsx("p",{className:JC,children:jxe()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs($e,{variant:"ghost",onClick:()=>r(0),children:[f.jsx(Zf,{size:12})," ",F7()]}),(Z||X||l===null||s!==null&&!$)&&f.jsxs($e,{variant:"ghost",onClick:()=>Y(!0,!0),disabled:S,children:[f.jsx(bd,{size:12,className:S?"animate-[spin_0.9s_linear_infinite]":""})," ",hye()]}),f.jsx("div",{className:"flex-1"}),f.jsxs($e,{variant:"primary",onClick:()=>r(2),disabled:S||!$||m===null||!L,title:S?V4e():$?m===null?Q2e():X?yye():l===void 0?F4e():l===null?Pxe():void 0:Qye(),children:[U7()," ",f.jsx(G0,{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(hv,{}),f.jsx("span",{children:v4e()})]}),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:w4e()}),f.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:f.jsxs("div",{className:pR,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:X4e()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:K2e()}),f.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:Cbt.map(q=>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:b.includes(q.id),onChange:()=>le(q.id),disabled:c}),f.jsx("span",{children:q.label()})]},q.id))}),b.includes("Other")&&f.jsx("input",{className:"onb-other-area w-full mt-2",value:x,onChange:q=>y(q.target.value),disabled:c,placeholder:E4e(),"aria-label":cye()})]}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:jye()}),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:C,onChange:q=>j(q.target.value),disabled:c,rows:4,placeholder:gxe()}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:Cye()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:Qbe()}),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:z,onChange:q=>D(q.target.value),disabled:c,placeholder:Oye()}),P?f.jsx("div",{className:ph,children:Hye()}):O.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:O.map(q=>f.jsxs("button",{type:"button",onClick:()=>V(q),disabled:c,children:[f.jsx(lh,{children:t9(q.title)}),f.jsx("span",{className:"id",children:q.paperId})]},q.paperId))}):null]}),N.length>0&&f.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:N.map(q=>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(lh,{children:q.title||q.paperId}),f.jsx("span",{className:"id",children:q.paperId}),f.jsx("button",{type:"button","aria-label":FB({name:ke(q.paperId)}),onClick:()=>ie(q.paperId),disabled:c,children:f.jsx(Zr,{size:12})})]},q.paperId))})]})}),!ae&&f.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:b.length===0?q2e():cxe()}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs($e,{variant:"ghost",onClick:()=>r(1),disabled:c,children:[f.jsx(Zf,{size:12})," ",F7()]}),f.jsx("div",{className:"flex-1"}),f.jsx($e,{variant:"primary",onClick:()=>void re(),disabled:c||m===null||!ae,children:c?f.jsxs(f.Fragment,{children:[f.jsx(Dt,{})," ",Kye()]}):f.jsxs(f.Fragment,{children:[Cxe()," ",f.jsx(G0,{size:13})]})})]}),m===null&&f.jsx("p",{className:e9,children:swe()}),_&&f.jsx("p",{className:e9,children:_})]})})})}function t9(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function Nbt(e){return e.agentReady?{tone:"success",label:a4e()}:e.installed?e.installBroken?{tone:"warning",label:Ixe()}:e.authState==="unknown"?{tone:"warning",label:D4e()}:e.authState==="unsupported"?{tone:"warning",label:B4e()}:e.installed?{tone:"warning",label:tye()}:{tone:"neutral",label:q7()}:{tone:"neutral",label:q7()}}function zbt(e){var t,r;const n=((t=e.models[0])==null?void 0:t.id)??null;return{harness:e.id,model:n,permissionMode:((r=e.options)==null?void 0:r.defaultPermissionMode)??null,reasoningLevel:nm(e,n).defaultId}}function jbt({harness:e}){return f.jsx(H2,{harness:e,size:26})}function Abt({h:e,selected:n,onSelect:t}){var c;const r=Nbt(e),s=n?{tone:"success",label:qye()}:r,l=[(c=e.version)==null?void 0:c.replace(/\s*\(.*\)$/,""),e.models.length>0&&`${e.models.length} model${e.models.length===1?"":"s"} — ${e.models.slice(0,3).map(d=>fp(d)).join(", ")}${e.models.length>3?", …":""}`].filter(Boolean).join(" · "),o=f.jsxs("div",{className:"onb-card-head flex 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(jbt,{harness:e.id}),f.jsx("span",{className:"onb-card-name text-lg font-semibold tracking-[-0.01em]",children:e.name})]}),f.jsx(ry,{tone:s.tone,children:s.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-5.5 px-6 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${n?" selected":""}`,"aria-pressed":n,onClick:t,children:[o,f.jsxs("div",{className:"onb-card-detail text-sm",children:[e.account??YE(),e.plan?` · ${e.plan}`:""]}),f.jsx("div",{className:`${ph} w-full overflow-hidden text-ellipsis whitespace-nowrap`,title:l,children:l})]}):f.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[o,f.jsx("div",{className:ph,children:Gh(e.agentNote)})]})}function Tbt({gitVersion:e,error:n}){return f.jsxs("div",{className:pR,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:Gxe()}),f.jsx(ry,{tone:e?"success":n||e===null?"danger":"warning",children:e?gye():n?k2e():e===null?XE():z2e()})]}),(e||!n&&e===void 0)&&f.jsx("div",{className:ph,children:e??M2e()})]})}function xb(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function Mbt(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 Rbt(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 Dbt(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function Lbt({onCreated:e,onCancel:n,remote:t=!1}){const[r,s]=M.useState("blank"),[a,l]=M.useState(""),[o,c]=M.useState(!1),[d,_]=M.useState(""),[h,m]=M.useState(!1),[g,S]=M.useState(null),[k,b]=M.useState(null),[v,x]=M.useState(!1),[y,C]=M.useState(!1),[j,N]=M.useState(!1),[T,z]=M.useState(null),[D,O]=M.useState(!1),[H,P]=M.useState(!1),[F,W]=M.useState(void 0),[Z,U]=M.useState("research-project"),[X,J]=M.useState(null),[$,L]=M.useState(!1),[B,Y]=M.useState(!1),[V,ie]=M.useState(""),[le,ae]=M.useState(null),[re,q]=M.useState([]),[oe,ce]=M.useState(!1),[_e,de]=M.useState(""),[ve,Ce]=M.useState(0),Le=M.useRef(0),Ue=M.useRef(0),He=M.useRef(0),Bt=M.useRef({blank:{name:"",nameTouched:!1,path:"",pathTouched:!1},folder:{name:"",nameTouched:!1,path:"",pathTouched:!1},paper:{name:"",nameTouched:!1,path:"",pathTouched:!1}}),Et=r==="paper"?Rbt(le==null?void 0:le.repoUrl):null,Nt=a.trim()?`~/OpenResearch/${xb(a,48)}`:"",cn=`~/OpenResearch/${xb(a||(le==null?void 0:le.title)||(le==null?void 0:le.paperId)||"")}`,vt=r==="blank"&&!h?Nt:r==="paper"&&le&&!h?cn:d,rt=Et??(r==="folder"&&(g!=null&&g.githubOwner)&&g.githubRepo?{owner:g.githubOwner,repo:g.githubRepo}:null);M.useEffect(()=>{RJe().then(({login:Ye})=>W(Ye)).catch(()=>W(null)),Yx().then(Ye=>P(Ye.githubForNewProjects)).catch(()=>{})},[]),M.useEffect(()=>{let Ye=!0;L(!0);const at=setTimeout(()=>{DJe(a.trim()).then(({repo:on})=>Ye&&U(on)).catch(()=>Ye&&U(xb(a,48))).finally(()=>Ye&&L(!1))},150);return()=>{Ye=!1,clearTimeout(at)}},[a]),M.useEffect(()=>{let Ye=!0;if(J(null),Y(!!rt),!!rt)return LJe(rt.owner,rt.repo).then(({canPush:at})=>{Ye&&at&&J(`github.com/${rt.owner}/${rt.repo}`)}).catch(()=>{}).finally(()=>Ye&&Y(!1)),()=>{Ye=!1}},[rt==null?void 0:rt.owner,rt==null?void 0:rt.repo]),M.useEffect(()=>{const Ye=++Ue.current,at=vt.trim();if(!at){S(null),b(null),x(!1);return}x(!0),b(null);const on=setTimeout(()=>{ZN(at).then($t=>{Ye===Ue.current&&S($t)}).catch($t=>{Ye===Ue.current&&(S(null),b($t instanceof Error?$t.message:String($t)))}).finally(()=>{Ye===Ue.current&&x(!1)})},200);return()=>clearTimeout(on)},[r,ve,vt]),M.useEffect(()=>{const Ye=++Le.current;if(r!=="paper"||le){ce(!1);return}const at=V.trim(),on=Mbt(at);if(!on&&at.length<3){q([]),de(""),ce(!1);return}z(null),ce(!0),q([]),de("");const $t=setTimeout(()=>{if(on){Gb(on).then(Tt=>{var Tn;Ye===Le.current&&(ae(Tt),o||l(((Tn=Tt.title)==null?void 0:Tn.trim())||Tt.paperId))}).catch(Tt=>Ye===Le.current&&z(Tt instanceof Error?Tt.message:String(Tt))).finally(()=>Ye===Le.current&&ce(!1));return}QN(at).then(Tt=>{Ye===Le.current&&(q(Tt),de(at))}).catch(Tt=>Ye===Le.current&&z(Tt instanceof Error?Tt.message:String(Tt))).finally(()=>Ye===Le.current&&ce(!1))},350);return()=>clearTimeout($t)},[r,le,V,o]);async function Je(Ye){var on;const at=++Le.current;ce(!0),z(null);try{const $t=await Gb(Ye);if(at!==Le.current)return;ae($t),q([]),o||l(((on=$t.title)==null?void 0:on.trim())||$t.paperId)}catch($t){at===Le.current&&z($t instanceof Error?$t.message:String($t))}finally{at===Le.current&&ce(!1)}}function qt(){Le.current+=1,He.current+=1,ae(null),ie(""),q([]),de(""),ce(!1),C(!1),_(""),m(!1),Bt.current.paper={name:o?a:"",nameTouched:o,path:"",pathTouched:!1},o||l("")}function we(Ye){if(Ye===r)return;Le.current+=1,He.current+=1,Bt.current[r]={name:a,nameTouched:o,path:d,pathTouched:h};const at=Bt.current[Ye];s(Ye),z(null),b(null),S(null),ce(!1),C(!1),l(at.name),c(at.nameTouched),_(at.path),m(at.pathTouched)}async function Oe(){if(y)return;const Ye=++He.current;C(!0),z(null);try{const at=await TJe();if(Ye!==He.current||!at)return;if(m(!0),S(null),x(!0),_(at),Ce(on=>on+1),r==="folder"&&!o){const on=at.replace(/[\\/]+$/,"").split(/[\\/]/).pop();on&&l(on)}}catch(at){Ye===He.current&&z(at instanceof Error?at.message:String(at))}finally{Ye===He.current&&C(!1)}}async function Xe(Ye){if(Ye.preventDefault(),!!wn){N(!0),z(null);try{const at=await MJe({name:a.trim(),path:vt.trim(),createFolder:r!=="folder",requireNewFolder:r==="blank",initializeGit:!0,githubSyncEnabled:H,locale:E(),...r==="paper"&&le?{paperId:le.paperId,cloneUrl:le.repoUrl??void 0}:{}});e(at.project,at.githubPublicationError)}catch(at){z(at instanceof Error?at.message:String(at))}finally{N(!1)}}}const st=a.trim(),tt=r==="paper"&&le&&!le.repoUrl?le.paperId:null,zt=r==="folder"&&(g==null?void 0:g.gitState)==="ready"?g.resolvedPath??null:null,bt=st!==""&&(r==="blank"||tt!==null||zt!==null);M.useEffect(()=>{if(!bt)return;const Ye=window.setTimeout(()=>{OJe({name:st,paperId:tt??void 0,path:zt??void 0,locale:E()}).catch(()=>{})},1200);return()=>window.clearTimeout(Ye)},[bt,st,tt,zt]);const Rt=(g==null?void 0:g.gitVersion)===null,et=r==="folder"&&!!vt.trim()&&g!==null&&g.exists===!1,Vt=r==="blank"&&(g==null?void 0:g.exists)===!0,jt=!!vt.trim()&&(g==null?void 0:g.exists)===!0&&g.directory===!1,Gn=r==="paper"&&!!(le!=null&&le.repoUrl)&&(g==null?void 0:g.empty)===!1,nn=r==="paper"&&!!le&&!(le!=null&&le.repoUrl)&&(g==null?void 0:g.empty)===!1,ur=r==="folder"&&((g==null?void 0:g.gitState)==="detached"||(g==null?void 0:g.gitState)==="invalid"),yr=h&&!vt.trim()||jt||Gn||nn,An=h&&!vt.trim()||jt||Vt,Vn=h&&!vt.trim()?P7():jt?I7():Vt?A1e():null,rn=h&&!vt.trim()?P7():jt?I7():Gn?Cbe():nn?Zge():null,wn=!!(a.trim()&&vt.trim())&&!j&&!y&&!v&&g!==null&&!k&&!Rt&&!et&&!Vt&&!jt&&!Gn&&!nn&&!ur&&(r!=="paper"||!!le)&&(!H||typeof F=="string"&&!$&&!B),Sn=X??`github.com/${F??"you"}/${Z}`,dt=F===void 0||$||B,un=r==="paper"&&!le&&V.trim().length>=3&&_e===V.trim()&&!oe&&re.length===0&&!T;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:Xe,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:()=>we("blank"),children:D1e()}),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:()=>we("folder"),children:rve()}),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:()=>we("paper"),children:dve()})]}),r==="paper"&&!le&&f.jsxs("label",{className:"!font-normal",children:[Dve(),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:V,onChange:Ye=>{z(null),de(""),ie(Ye.target.value)},placeholder:qve()}),!un&&f.jsx("span",{className:"repo-hint",children:oe?Ibe():jbe()}),un&&f.jsx("span",{className:"project-path-notice block",children:wve()}),re.length>0&&f.jsx("div",{className:"paper-results",children:re.map(Ye=>f.jsxs("button",{type:"button",onClick:()=>void Je(Ye.paperId),children:[f.jsx(lh,{children:Ye.title}),f.jsx("span",{className:"id",children:Ye.paperId})]},Ye.paperId))})]}),le&&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(lh,{className:"block",children:le.title||le.paperId}),le.repoUrl&&f.jsx("div",{className:"id",children:Dbt(le.repoUrl)})]}),f.jsx($e,{size:"small",type:"button","aria-label":V1e(),onClick:qt,children:F1e()})]}),!le.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(RN,{size:16})," ",Eve()]}),f.jsx("span",{className:"text-sm font-normal text-accent-amber",children:Ave()})]})]}),(r!=="paper"||le)&&f.jsxs(f.Fragment,{children:[r==="blank"&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:H7()}),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:a,onChange:Ye=>{c(!0),l(Ye.target.value)},placeholder:$7()})]}),r==="paper"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:le!=null&&le.repoUrl?f1e():cv()}),f.jsx("input",{className:"text-sm font-normal",value:vt,onChange:Ye=>{m(!0),S(null),_(Ye.target.value)},"aria-describedby":yr?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),v&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:B7()}),yr&&f.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:rn})]}):r==="folder"&&!t?f.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":d?t1e({path:ke(d)}):L7(),disabled:y,title:d||void 0,onClick:()=>void Oe(),children:[f.jsx(Qf,{className:d?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),f.jsx("span",{className:d?"text-sm":"placeholder",children:y?l1e():d||L7()}),f.jsx(Ha,{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:cv()}),f.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:d,onChange:Ye=>{m(!0),S(null),_(Ye.target.value)},placeholder:"/home/user/project",spellCheck:!1,dir:"ltr"})]}):a.trim()?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:cv()}),f.jsx("input",{className:"text-sm font-normal",value:vt,onChange:Ye=>{m(!0),S(null),_(Ye.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":An?"blank-destination-description":void 0,spellCheck:!1}),v&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:B7()}),An&&f.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Vn})]}):null,r!=="blank"&&vt&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:H7()}),f.jsx("input",{className:"text-sm font-normal",value:a,onChange:Ye=>{c(!0),l(Ye.target.value)},placeholder:$7()})]}),Rt&&f.jsx("div",{className:"project-path-notice error",children:pve()}),!Rt&&r==="folder"&&d.trim()&&!v&&(g==null?void 0:g.exists)===!1&&f.jsx("div",{className:"project-path-notice error",children:Qve()}),!Rt&&r==="folder"&&d.trim()&&!v&&jt&&f.jsx("div",{className:"project-path-notice error",children:abe()}),!Rt&&r==="folder"&&!v&&(g==null?void 0:g.gitState)==="detached"&&f.jsx("div",{className:"project-path-notice error",children:X1e()}),!Rt&&r==="folder"&&!v&&(g==null?void 0:g.gitState)==="invalid"&&f.jsx("div",{className:"project-path-notice error",children:nbe()}),k&&f.jsx("div",{className:"project-path-notice error",role:"alert",children:k})]}),T&&f.jsx("div",{className:"error",role:"alert",children:T}),(r!=="paper"||le)&&vt&&(r!=="blank"||a.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${H&&F===null?" text-accent-red":" text-text"}`,"aria-expanded":D,"aria-controls":"new-project-advanced-settings",onClick:()=>O(Ye=>!Ye),children:[H?F===null?Uge():Wge():$ge(),f.jsx($a,{className:D?"rotate-180":"",size:16})]}),D&&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:H,onChange:Ye=>P(Ye.target.checked),disabled:j}),f.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:Kve()})]}),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:dt?ube({repository:ke(Sn)}):X?vbe({repository:ke(Sn)}):_be({repository:ke(Sn)})}),f.jsx("span",{children:ove()}),F===null&&f.jsx("span",{children:Rbe({command:ke("gh auth login")})})]})]})]}),f.jsxs("div",{className:"actions new-project-actions",children:[n&&f.jsx($e,{type:"button",onClick:n,children:B1e()}),f.jsx($e,{variant:"primary",className:"ms-auto",disabled:!wn,children:j?S1e():r==="paper"?le!=null&&le.repoUrl?m1e():O7():r==="folder"?Pbe():O7()})]})]})}function mR({onClose:e,onCreated:n,remote:t=!1}){const r=M.useRef(null),s=M.useRef(e);return s.current=e,M.useEffect(()=>{const a=r.current;if(!a)return;const l=document.activeElement instanceof HTMLElement?document.activeElement:null,o=()=>[...a.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(a.querySelector("[data-initial-focus]")??o()[0]??a).focus();const c=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),s.current();return}if(d.key==="Enter"&&(d.metaKey||d.ctrlKey)&&!d.altKey&&d.shiftKey){d.preventDefault(),d.stopPropagation();return}if(d.key!=="Tab")return;const _=o();if(_.length===0){d.preventDefault(),a.focus();return}const h=_[0],m=_[_.length-1];d.shiftKey&&document.activeElement===h?(d.preventDefault(),m.focus()):!d.shiftKey&&document.activeElement===m&&(d.preventDefault(),h.focus())};return document.addEventListener("keydown",c,!0),()=>{document.removeEventListener("keydown",c,!0),l==null||l.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:a=>{a.target===a.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:JE()}),f.jsx(Lbt,{onCancel:e,onCreated:n,remote:t})]})})}function Obt({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const a=M.useRef(null),l=M.useRef(r),o=M.useRef(n);l.current=r,o.current=n,M.useEffect(()=>{const d=a.current;if(!d)return;const _=document.activeElement instanceof HTMLElement?document.activeElement:null,h=()=>[...d.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(h()[0]??d).focus();const m=g=>{if(g.key==="Escape"){g.preventDefault(),o.current||l.current();return}if(g.key!=="Tab")return;const S=h();if(S.length===0){g.preventDefault(),d.focus();return}const k=S[0],b=S[S.length-1];g.shiftKey&&document.activeElement===k?(g.preventDefault(),b.focus()):!g.shiftKey&&document.activeElement===b&&(g.preventDefault(),k.focus())};return document.addEventListener("keydown",m,!0),()=>{document.removeEventListener("keydown",m,!0),_==null||_.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:d=>{!n&&d.target===d.currentTarget&&r()},children:f.jsxs("div",{ref:a,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:B6e()}),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:b6e({name:Ra(e.name)})}),f.jsx("p",{className:"m-0",children:c?J6e():r7e()}),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($e,{disabled:n,onClick:r,children:A6e()}),f.jsx($e,{variant:"danger",disabled:n,onClick:s,children:n?V6e():F6e()})]})]})})}function n9(){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 r9({projects:e,onOpen:n,onCreated:t,onDeleted:r,remote:s=!1}){const[a,l]=M.useState(!1),[o,c]=M.useState(null),[d,_]=M.useState(null),[h,m]=M.useState(null),[g,S]=M.useState({}),k=M.useRef(0),b=e.map(x=>x.id).join("\0");M.useEffect(()=>{let x=!0,y=null;const C=()=>{y=null;const T=++k.current;zJe().then(z=>{!x||T!==k.current||S(Object.fromEntries(z.map(D=>[D.projectId,D])))}).catch(()=>{})},j=()=>{y===null&&(y=setTimeout(C,100))};C();const N=Ltt(j);return()=>{x=!1,N(),y!==null&&clearTimeout(y)}},[b]);async function v(x){c(x.id),_(null);try{await $Je(x.id),_(null),m(null),r(x.id)}catch(y){_(y instanceof Error?y.message:String(y))}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:v7e()}),f.jsxs($e,{onClick:()=>l(!0),children:[f.jsx(Gx,{size:15})," ",JE()]})]}),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:_7e()}),f.jsx("span",{children:W7()}),f.jsx("span",{children:K7()}),f.jsx("span",{children:Y7()})]}),e.length===0?f.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:u7e()}):[...e].sort((x,y)=>{var N,T;const C=((N=g[x.id])==null?void 0:N.lastMessageAt)??x.createdAt;return(((T=g[y.id])==null?void 0:T.lastMessageAt)??y.createdAt)-C||x.name.localeCompare(y.name)}).map(x=>{const y=g[x.id],C=x.githubEnabled?x.githubUrl??(x.githubOwner&&x.githubRepo?`https://github.com/${x.githubOwner}/${x.githubRepo}`:null):null,j=C?x.githubOwner&&x.githubRepo?`${x.githubOwner}/${x.githubRepo}`:C.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):eN(),N=y?y.activeAgents>0?d6e({count:Yt(y.activeAgents)}):C7e():"—",T=y?y.totalAgents===1?M7e():p6e({count:Yt(y.totalAgents)}):"—",z=y?y.runningExperiments>0?O7e({count:Yt(y.runningExperiments)}):y.totalExperiments===0?Dx():X7({count:Yt(y.totalExperiments)}):"—",D=y&&y.runningExperiments>0?X7({count:Yt(y.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":pB({name:Ra(x.name)}),onClick:()=>n(x.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:x.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:[D6e()," ",La(x.createdAt)]}),x.paperId&&f.jsx("span",{"aria-hidden":"true",children:"·"}),x.paperId&&f.jsxs("span",{children:[E6e()," ",ke(x.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":Ib({name:Ra(x.name)}),disabled:o===x.id,onClick:O=>{O.stopPropagation(),_(null),m(x)},children:f.jsx(xd,{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:W7()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[y&&y.activeAgents>0&&f.jsx(n9,{}),N]}),f.jsx("span",{className:"text-xs text-muted",children:T})]}),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:K7()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[y&&y.runningExperiments>0&&f.jsx(n9,{}),z]}),D&&f.jsx("span",{className:"text-xs text-muted",children:D})]}),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:Y7()}),C?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:C,target:"_blank",rel:"noreferrer","aria-label":up({name:Ra(x.name)}),children:[f.jsx("span",{className:"inline-flex shrink-0",children:f.jsx(Em,{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:ke(j)})]}):f.jsx("span",{className:"text-sm text-text pointer-events-none",children:j})]})]},x.id)})]})})]}),a&&f.jsx(mR,{remote:s,onClose:()=>l(!1),onCreated:(x,y)=>{l(!1),t(x,y)}}),h&&f.jsx(Obt,{project:h,deleting:o===h.id,error:d,onClose:()=>{_(null),m(null)},onConfirm:()=>void v(h)})]})}function Ibt({runs:e,experiments:n,emptyHint:t,onOpen:r,onOpenLogs:s,onOpenCode:a,onCancel:l}){const[o,c]=M.useState(new Set),[d,_]=M.useState(null),h=new Map;for(const S of e){const k=h.get(S.experimentId);k?k.push(S):h.set(S.experimentId,[S])}for(const S of h.values())S.sort((k,b)=>b.createdAt-k.createdAt);const m=[...n].sort((S,k)=>{var x,y,C,j;const b=((y=(x=h.get(S.id))==null?void 0:x[0])==null?void 0:y.createdAt)??S.createdAt;return(((j=(C=h.get(k.id))==null?void 0:C[0])==null?void 0:j.createdAt)??k.createdAt)-b});if(m.length===0)return f.jsx("div",{className:"empty-state absolute inset-0 flex flex-col items-center justify-center gap-2.5 p-6 text-center text-subtext [&_p]:max-w-[46ch] [&_p]:m-0 [&_p]:leading-normal [&_p]:text-balance [&_p.empty-state-title]:text-2xl [&_p.empty-state-title]:font-normal [&_p.empty-state-title]:text-text [&_p.empty-state-hint]:text-lg [&_p.empty-state-hint]:text-subtext experiments-empty-state [&_p]:text-2xl",children:f.jsx("p",{children:t??_ue()})});async function g(S){_(null),c(k=>new Set(k).add(S));try{await l(S)}catch(k){c(b=>{const v=new Set(b);return v.delete(S),v}),_(k instanceof Error?k.message:String(k))}}return f.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[d&&f.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[ede()," ",d]}),f.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":Vue(),children:m.map(S=>{const k=h.get(S.id)??[],b=k[0]??null,v=k.find(j=>j.status==="running"||j.status==="starting"),x=v??b,y=!!(v&&(v.cancelRequested||o.has(v.id))),C=v?y?"cancelling":Hi(v):b?Hi(b):"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(S,"preview"),onDoubleClick:()=>r(S,"keepOpen"),onAuxClick:j=>{j.button===1&&(j.preventDefault(),r(S,"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",...zr(j=>r(S,j),{stopPropagation:!0}),children:S.title||S.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:S.branchName,children:[f.jsx(em,{size:14,"aria-hidden":"true"}),f.jsx("code",{children:S.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(ko,{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?wue():Aue({count:Yt(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:b?La(b.createdAt):vue()})})]}),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":ZO({name:S.title||S.slug}),onClick:j=>j.stopPropagation(),onDoubleClick:j=>j.stopPropagation(),onAuxClick:j=>j.stopPropagation(),children:[f.jsxs($e,{size:"small",disabled:!x,title:x?Eue():uue(),...zr(j=>{x&&s(S.id,x.id,j)},{stopPropagation:!0}),children:[f.jsx(nd,{size:15}),Xue()]}),f.jsxs($e,{size:"small",title:EE({branch:ke(S.branchName)}),...zr(j=>a(S.id,j),{stopPropagation:!0}),children:[f.jsx(Jp,{size:15}),Fue()]}),v&&f.jsxs($e,{size:"small",variant:"danger",className:"[@container((max-width:_560px))]:ms-auto",disabled:y,title:y?Due():Bue(),onClick:()=>void g(v.id),children:[f.jsx(DN,{size:15}),y?bie():HE()]})]})]},S.id)})})]})}function Bbt({onClose:e,onCreateProject:n}){const[t,r]=M.useState(!1),[s,a]=M.useState(null),l=M.useRef(null),o=M.useCallback(c=>{t||(r(!0),a(null),c().catch(()=>a(HKe())).finally(()=>r(!1)))},[t]);return M.useEffect(()=>{const c=d=>{d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),o(e))};return document.addEventListener("keydown",c,!0),()=>document.removeEventListener("keydown",c,!0)},[e,o]),M.useEffect(()=>{const c=l.current;if(!c)return;const d=document.activeElement instanceof HTMLElement?document.activeElement:null,_=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(_()[0]??c).focus();const h=m=>{if(m.key!=="Tab")return;const g=_();if(g.length===0){m.preventDefault(),c.focus();return}const S=g[0],k=g[g.length-1];m.shiftKey&&document.activeElement===S?(m.preventDefault(),k.focus()):!m.shiftKey&&document.activeElement===k&&(m.preventDefault(),S.focus())};return document.addEventListener("keydown",h,!0),()=>{document.removeEventListener("keydown",h,!0),d==null||d.focus()}},[]),Il.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:l,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(Kt,{className:"absolute end-3.5 top-3.5","aria-label":mKe(),onClick:()=>o(e),disabled:t,children:f.jsx(Zr,{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(Qx,{})}),f.jsxs("div",{children:[f.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:kKe()}),f.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:KKe()})]})]}),f.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[f.jsxs("p",{dir:"auto",children:[qKe()," ",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:OKe()}),fKe()]}),f.jsx("p",{dir:"auto",children:MKe()})]}),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($e,{onClick:()=>o(n),disabled:t,children:xKe()}),f.jsx($e,{variant:"primary",onClick:()=>o(e),disabled:t,children:t?oa():zKe()})]})]})}),document.body)}function Fr(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function Gm(){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}})}tp.prototype=Gm.prototype={constructor:tp,on:function(e,n){var t=this._,r=Hbt(e+"",t),s,a=-1,l=r.length;if(arguments.length<2){for(;++a0)for(var t=new Array(s),r=0,s,a;r=0&&(n=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),i9.hasOwnProperty(n)?{space:i9[n],local:e}:e}function Fbt(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===dx&&n.documentElement.namespaceURI===dx?n.createElement(e):n.createElementNS(t,e)}}function Ubt(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function gR(e){var n=Vm(e);return(n.local?Ubt:Fbt)(n)}function qbt(){}function U4(e){return e==null?qbt:function(){return this.querySelector(e)}}function Gbt(e){typeof e!="function"&&(e=U4(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=y&&(y=x+1);!(j=b[y])&&++y=0;)(l=r[s])&&(a&&l.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(l,a),a=l);return this}function m2t(e){e||(e=g2t);function n(h,m){return h&&m?e(h.__data__,m.__data__):!h-!m}for(var t=this._groups,r=t.length,s=new Array(r),a=0;an?1:e>=n?0:NaN}function v2t(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function b2t(){return Array.from(this)}function x2t(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?T2t:typeof n=="function"?R2t:M2t)(e,n,t??"")):hd(this.node(),e)}function hd(e,n){return e.style.getPropertyValue(n)||wR(e).getComputedStyle(e,null).getPropertyValue(n)}function L2t(e){return function(){delete this[e]}}function O2t(e,n){return function(){this[e]=n}}function I2t(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function B2t(e,n){return arguments.length>1?this.each((n==null?L2t:typeof n=="function"?I2t:O2t)(e,n)):this.node()[e]}function SR(e){return e.trim().split(/^|\s+/)}function q4(e){return e.classList||new kR(e)}function kR(e){this._node=e,this._names=SR(e.getAttribute("class")||"")}kR.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 CR(e,n){for(var t=q4(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function fxt(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,a;t()=>e;function fx(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:a,x:l,y:o,dx:c,dy:d,dispatch:_}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:_}})}fx.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function wxt(e){return!e.ctrlKey&&!e.button}function Sxt(){return this.parentNode}function kxt(e,n){return n??{x:e.x,y:e.y}}function Cxt(){return navigator.maxTouchPoints||"ontouchstart"in this}function TR(){var e=wxt,n=Sxt,t=kxt,r=Cxt,s={},a=Gm("start","drag","end"),l=0,o,c,d,_,h=0;function m(C){C.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",v,yxt).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(C,j){if(!(_||!e.call(this,C,j))){var N=y(this,n.call(this,C,j),C,j,"mouse");N&&(_i(C.view).on("mousemove.drag",S,mh).on("mouseup.drag",k,mh),jR(C.view),yb(C),d=!1,o=C.clientX,c=C.clientY,N("start",C))}}function S(C){if(Xu(C),!d){var j=C.clientX-o,N=C.clientY-c;d=j*j+N*N>h}s.mouse("drag",C)}function k(C){_i(C.view).on("mousemove.drag mouseup.drag",null),AR(C.view,d),Xu(C),s.mouse("end",C)}function b(C,j){if(e.call(this,C,j)){var N=C.changedTouches,T=n.call(this,C,j),z=N.length,D,O;for(D=0;D>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?L0(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?L0(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=Nxt.exec(e))?new Qs(n[1],n[2],n[3],1):(n=zxt.exec(e))?new Qs(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=jxt.exec(e))?L0(n[1],n[2],n[3],n[4]):(n=Axt.exec(e))?L0(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Txt.exec(e))?f9(n[1],n[2]/100,n[3]/100,1):(n=Mxt.exec(e))?f9(n[1],n[2]/100,n[3]/100,n[4]):a9.hasOwnProperty(e)?c9(a9[e]):e==="transparent"?new Qs(NaN,NaN,NaN,0):null}function c9(e){return new Qs(e>>16&255,e>>8&255,e&255,1)}function L0(e,n,t,r){return r<=0&&(e=n=t=NaN),new Qs(e,n,t,r)}function Lxt(e){return e instanceof Yh||(e=Oc(e)),e?(e=e.rgb(),new Qs(e.r,e.g,e.b,e.opacity)):new Qs}function hx(e,n,t,r){return arguments.length===1?Lxt(e):new Qs(e,n,t,r??1)}function Qs(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}G4(Qs,hx,MR(Yh,{brighter(e){return e=e==null?Bp:Math.pow(Bp,e),new Qs(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?gh:Math.pow(gh,e),new Qs(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Qs(Tc(this.r),Tc(this.g),Tc(this.b),$p(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:u9,formatHex:u9,formatHex8:Oxt,formatRgb:d9,toString:d9}));function u9(){return`#${kc(this.r)}${kc(this.g)}${kc(this.b)}`}function Oxt(){return`#${kc(this.r)}${kc(this.g)}${kc(this.b)}${kc((isNaN(this.opacity)?1:this.opacity)*255)}`}function d9(){const e=$p(this.opacity);return`${e===1?"rgb(":"rgba("}${Tc(this.r)}, ${Tc(this.g)}, ${Tc(this.b)}${e===1?")":`, ${e})`}`}function $p(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Tc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function kc(e){return e=Tc(e),(e<16?"0":"")+e.toString(16)}function f9(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new ea(e,n,t,r)}function RR(e){if(e instanceof ea)return new ea(e.h,e.s,e.l,e.opacity);if(e instanceof Yh||(e=Oc(e)),!e)return new ea;if(e instanceof ea)return e;e=e.rgb();var n=e.r/255,t=e.g/255,r=e.b/255,s=Math.min(n,t,r),a=Math.max(n,t,r),l=NaN,o=a-s,c=(a+s)/2;return o?(n===a?l=(t-r)/o+(t0&&c<1?0:l,new ea(l,o,c,e.opacity)}function Ixt(e,n,t,r){return arguments.length===1?RR(e):new ea(e,n,t,r??1)}function ea(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}G4(ea,Ixt,MR(Yh,{brighter(e){return e=e==null?Bp:Math.pow(Bp,e),new ea(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?gh:Math.pow(gh,e),new ea(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 Qs(wb(e>=240?e-240:e+120,s,r),wb(e,s,r),wb(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new ea(h9(this.h),O0(this.s),O0(this.l),$p(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=$p(this.opacity);return`${e===1?"hsl(":"hsla("}${h9(this.h)}, ${O0(this.s)*100}%, ${O0(this.l)*100}%${e===1?")":`, ${e})`}`}}));function h9(e){return e=(e||0)%360,e<0?e+360:e}function O0(e){return Math.max(0,Math.min(1,e||0))}function wb(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 V4=e=>()=>e;function Bxt(e,n){return function(t){return e+t*n}}function $xt(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 Hxt(e){return(e=+e)==1?DR:function(n,t){return t-n?$xt(n,t,e):V4(isNaN(n)?t:n)}}function DR(e,n){var t=n-e;return t?Bxt(e,t):V4(isNaN(e)?n:e)}const Hp=(function e(n){var t=Hxt(n);function r(s,a){var l=t((s=hx(s)).r,(a=hx(a)).r),o=t(s.g,a.g),c=t(s.b,a.b),d=DR(s.opacity,a.opacity);return function(_){return s.r=l(_),s.g=o(_),s.b=c(_),s.opacity=d(_),s+""}}return r.gamma=e,r})(1);function Pxt(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,r=n.slice(),s;return function(a){for(s=0;st&&(a=n.slice(t,a),o[l]?o[l]+=a:o[++l]=a),(r=r[0])===(s=s[0])?o[l]?o[l]+=s:o[++l]=s:(o[++l]=null,c.push({i:l,x:Aa(r,s)})),t=Sb.lastIndex;return t180?_+=360:_-d>180&&(d+=360),m.push({i:h.push(s(h)+"rotate(",null,r)-2,x:Aa(d,_)})):_&&h.push(s(h)+"rotate("+_+r)}function o(d,_,h,m){d!==_?m.push({i:h.push(s(h)+"skewX(",null,r)-2,x:Aa(d,_)}):_&&h.push(s(h)+"skewX("+_+r)}function c(d,_,h,m,g,S){if(d!==h||_!==m){var k=g.push(s(g)+"scale(",null,",",null,")");S.push({i:k-4,x:Aa(d,h)},{i:k-2,x:Aa(_,m)})}else(h!==1||m!==1)&&g.push(s(g)+"scale("+h+","+m+")")}return function(d,_){var h=[],m=[];return d=e(d),_=e(_),a(d.translateX,d.translateY,_.translateX,_.translateY,h,m),l(d.rotate,_.rotate,h,m),o(d.skewX,_.skewX,h,m),c(d.scaleX,d.scaleY,_.scaleX,_.scaleY,h,m),d=_=null,function(g){for(var S=-1,k=m.length,b;++S=0&&e._call.call(void 0,n),e=e._next;--_d}function m9(){Ic=(Fp=bh.now())+Wm,_d=If=0;try{nyt()}finally{_d=0,syt(),Ic=0}}function ryt(){var e=bh.now(),n=e-Fp;n>BR&&(Wm-=n,Fp=e)}function syt(){for(var e,n=Pp,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:Pp=t);Bf=e,mx(r)}function mx(e){if(!_d){If&&(If=clearTimeout(If));var n=e-Ic;n>24?(e<1/0&&(If=setTimeout(m9,e-bh.now()-Wm)),jf&&(jf=clearInterval(jf))):(jf||(Fp=bh.now(),jf=setInterval(ryt,BR)),_d=1,$R(m9))}}function g9(e,n,t){var r=new Up;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var iyt=Gm("start","end","cancel","interrupt"),ayt=[],PR=0,v9=1,gx=2,rp=3,b9=4,vx=5,sp=6;function Km(e,n,t,r,s,a){var l=e.__transition;if(!l)e.__transition={};else if(t in l)return;oyt(e,t,{name:n,index:r,group:s,on:iyt,tween:ayt,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:PR})}function K4(e,n){var t=la(e,n);if(t.state>PR)throw new Error("too late; already scheduled");return t}function Wa(e,n){var t=la(e,n);if(t.state>rp)throw new Error("too late; already running");return t}function la(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function oyt(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=HR(a,0,t.time);function a(d){t.state=v9,t.timer.restart(l,t.delay,t.time),t.delay<=d&&l(d-t.delay)}function l(d){var _,h,m,g;if(t.state!==v9)return c();for(_ in r)if(g=r[_],g.name===t.name){if(g.state===rp)return g9(l);g.state===b9?(g.state=sp,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[_]):+_gx&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function Iyt(e,n,t){var r,s,a=Oyt(n)?K4:Wa;return function(){var l=a(this,e),o=l.on;o!==r&&(s=(r=o).copy()).on(n,t),l.on=s}}function Byt(e,n){var t=this._id;return arguments.length<2?la(this.node(),t).on.on(e):this.each(Iyt(t,e,n))}function $yt(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function Hyt(){return this.on("end.remove",$yt(this._id))}function Pyt(e){var n=this._name,t=this._id;typeof e!="function"&&(e=U4(e));for(var r=this._groups,s=r.length,a=new Array(s),l=0;l()=>e;function f4t(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 wo(e,n,t){this.k=e,this.x=n,this.y=t}wo.prototype={constructor:wo,scale:function(e){return e===1?this:new wo(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new wo(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 Ym=new wo(1,0,0);GR.prototype=wo.prototype;function GR(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ym;return e.__zoom}function kb(e){e.stopImmediatePropagation()}function Af(e){e.preventDefault(),e.stopImmediatePropagation()}function h4t(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function _4t(){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 x9(){return this.__zoom||Ym}function p4t(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function m4t(){return navigator.maxTouchPoints||"ontouchstart"in this}function g4t(e,n,t){var r=e.invertX(n[0][0])-t[0][0],s=e.invertX(n[1][0])-t[1][0],a=e.invertY(n[0][1])-t[0][1],l=e.invertY(n[1][1])-t[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),l>a?(a+l)/2:Math.min(0,a)||Math.max(0,l))}function VR(){var e=h4t,n=_4t,t=g4t,r=p4t,s=m4t,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],o=250,c=np,d=Gm("start","zoom","end"),_,h,m,g=500,S=150,k=0,b=10;function v(W){W.property("__zoom",x9).on("wheel.zoom",z,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",O).filter(s).on("touchstart.zoom",H).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(W,Z,U,X){var J=W.selection?W.selection():W;J.property("__zoom",x9),W!==J?j(W,Z,U,X):J.interrupt().each(function(){N(this,arguments).event(X).start().zoom(null,typeof Z=="function"?Z.apply(this,arguments):Z).end()})},v.scaleBy=function(W,Z,U,X){v.scaleTo(W,function(){var J=this.__zoom.k,$=typeof Z=="function"?Z.apply(this,arguments):Z;return J*$},U,X)},v.scaleTo=function(W,Z,U,X){v.transform(W,function(){var J=n.apply(this,arguments),$=this.__zoom,L=U==null?C(J):typeof U=="function"?U.apply(this,arguments):U,B=$.invert(L),Y=typeof Z=="function"?Z.apply(this,arguments):Z;return t(y(x($,Y),L,B),J,l)},U,X)},v.translateBy=function(W,Z,U,X){v.transform(W,function(){return t(this.__zoom.translate(typeof Z=="function"?Z.apply(this,arguments):Z,typeof U=="function"?U.apply(this,arguments):U),n.apply(this,arguments),l)},null,X)},v.translateTo=function(W,Z,U,X,J){v.transform(W,function(){var $=n.apply(this,arguments),L=this.__zoom,B=X==null?C($):typeof X=="function"?X.apply(this,arguments):X;return t(Ym.translate(B[0],B[1]).scale(L.k).translate(typeof Z=="function"?-Z.apply(this,arguments):-Z,typeof U=="function"?-U.apply(this,arguments):-U),$,l)},X,J)};function x(W,Z){return Z=Math.max(a[0],Math.min(a[1],Z)),Z===W.k?W:new wo(Z,W.x,W.y)}function y(W,Z,U){var X=Z[0]-U[0]*W.k,J=Z[1]-U[1]*W.k;return X===W.x&&J===W.y?W:new wo(W.k,X,J)}function C(W){return[(+W[0][0]+ +W[1][0])/2,(+W[0][1]+ +W[1][1])/2]}function j(W,Z,U,X){W.on("start.zoom",function(){N(this,arguments).event(X).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(X).end()}).tween("zoom",function(){var J=this,$=arguments,L=N(J,$).event(X),B=n.apply(J,$),Y=U==null?C(B):typeof U=="function"?U.apply(J,$):U,V=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),ie=J.__zoom,le=typeof Z=="function"?Z.apply(J,$):Z,ae=c(ie.invert(Y).concat(V/ie.k),le.invert(Y).concat(V/le.k));return function(re){if(re===1)re=le;else{var q=ae(re),oe=V/q[2];re=new wo(oe,Y[0]-q[0]*oe,Y[1]-q[1]*oe)}L.zoom(null,re)}})}function N(W,Z,U){return!U&&W.__zooming||new T(W,Z)}function T(W,Z){this.that=W,this.args=Z,this.active=0,this.sourceEvent=null,this.extent=n.apply(W,Z),this.taps=0}T.prototype={event:function(W){return W&&(this.sourceEvent=W),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(W,Z){return this.mouse&&W!=="mouse"&&(this.mouse[1]=Z.invert(this.mouse[0])),this.touch0&&W!=="touch"&&(this.touch0[1]=Z.invert(this.touch0[0])),this.touch1&&W!=="touch"&&(this.touch1[1]=Z.invert(this.touch1[0])),this.that.__zoom=Z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(W){var Z=_i(this.that).datum();d.call(W,this.that,new f4t(W,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:d}),Z)}};function z(W,...Z){if(!e.apply(this,arguments))return;var U=N(this,Z).event(W),X=this.__zoom,J=Math.max(a[0],Math.min(a[1],X.k*Math.pow(2,r.apply(this,arguments)))),$=Qi(W);if(U.wheel)(U.mouse[0][0]!==$[0]||U.mouse[0][1]!==$[1])&&(U.mouse[1]=X.invert(U.mouse[0]=$)),clearTimeout(U.wheel);else{if(X.k===J)return;U.mouse=[$,X.invert($)],ip(this),U.start()}Af(W),U.wheel=setTimeout(L,S),U.zoom("mouse",t(y(x(X,J),U.mouse[0],U.mouse[1]),U.extent,l));function L(){U.wheel=null,U.end()}}function D(W,...Z){if(m||!e.apply(this,arguments))return;var U=W.currentTarget,X=N(this,Z,!0).event(W),J=_i(W.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",V,!0),$=Qi(W,U),L=W.clientX,B=W.clientY;jR(W.view),kb(W),X.mouse=[$,this.__zoom.invert($)],ip(this),X.start();function Y(ie){if(Af(ie),!X.moved){var le=ie.clientX-L,ae=ie.clientY-B;X.moved=le*le+ae*ae>k}X.event(ie).zoom("mouse",t(y(X.that.__zoom,X.mouse[0]=Qi(ie,U),X.mouse[1]),X.extent,l))}function V(ie){J.on("mousemove.zoom mouseup.zoom",null),AR(ie.view,X.moved),Af(ie),X.event(ie).end()}}function O(W,...Z){if(e.apply(this,arguments)){var U=this.__zoom,X=Qi(W.changedTouches?W.changedTouches[0]:W,this),J=U.invert(X),$=U.k*(W.shiftKey?.5:2),L=t(y(x(U,$),X,J),n.apply(this,Z),l);Af(W),o>0?_i(this).transition().duration(o).call(j,L,X,W):_i(this).call(v.transform,L,X,W)}}function H(W,...Z){if(e.apply(this,arguments)){var U=W.touches,X=U.length,J=N(this,Z,W.changedTouches.length===X).event(W),$,L,B,Y;for(kb(W),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.`},xh=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],WR=["Enter"," ","Escape"],KR={"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 pd;(function(e){e.Strict="strict",e.Loose="loose"})(pd||(pd={}));var Mc;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Mc||(Mc={}));var yh;(function(e){e.Partial="partial",e.Full="full"})(yh||(yh={}));const YR={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Sl;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Sl||(Sl={}));var qp;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(qp||(qp={}));var xt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(xt||(xt={}));const y9={[xt.Left]:xt.Right,[xt.Right]:xt.Left,[xt.Top]:xt.Bottom,[xt.Bottom]:xt.Top};function XR(e){return e===null?null:e?"valid":"invalid"}const ZR=e=>"id"in e&&"source"in e&&"target"in e,v4t=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),X4=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Xh=(e,n=[0,0])=>{const{width:t,height:r}=Do(e),s=e.origin??n,a=t*s[0],l=r*s[1];return{x:e.position.x-a,y:e.position.y-l}},b4t=(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 a=typeof s=="string";let l=!n.nodeLookup&&!a?s:void 0;n.nodeLookup&&(l=a?n.nodeLookup.get(s):X4(s)?s:n.nodeLookup.get(s.id));const o=l?Gp(l,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Xm(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Zm(t)},Zh=(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=Xm(t,Gp(s)),r=!0)}),r?Zm(t):{x:0,y:0,width:0,height:0}},Z4=(e,n,[t,r,s]=[0,0,1],a=!1,l=!1)=>{const o=(n.x-t)/s,c=(n.y-r)/s,d=n.width/s,_=n.height/s,h=[];for(const m of e.values()){const{measured:g,selectable:S=!0,hidden:k=!1}=m;if(l&&!S||k)continue;const b=g.width??m.width??m.initialWidth??0,v=g.height??m.height??m.initialHeight??0,{x,y}=m.internals.positionAbsolute,C=tD(o,c,d,_,x,y,b,v),j=b*v,N=a&&C>0;(!m.internals.handleBounds||N||C>=j||m.dragging)&&h.push(m)}return h},x4t=(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 y4t(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 w4t({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:a},l){if(e.size===0)return!0;const o=y4t(e,l),c=Zh(o),d=J4(c,n,t,(l==null?void 0:l.minZoom)??s,(l==null?void 0:l.maxZoom)??a,(l==null?void 0:l.padding)??.1);return await r.setViewport(d,{duration:l==null?void 0:l.duration,ease:l==null?void 0:l.ease,interpolate:l==null?void 0:l.interpolate}),!0}function QR({nodeId:e,nextPosition:n,nodeLookup:t,nodeOrigin:r=[0,0],nodeExtent:s,onError:a}){const l=t.get(e),o=l.parentId?t.get(l.parentId):void 0,{x:c,y:d}=o?o.internals.positionAbsolute:{x:0,y:0},_=l.origin??r;let h=l.extent||s;if(l.extent==="parent"&&!l.expandParent)if(!o)a==null||a("005",aa.error005());else{const g=o.measured.width,S=o.measured.height;g&&S&&(h=[[c,d],[c+g,d+S]])}else o&&$c(l.extent)&&(h=[[l.extent[0][0]+c,l.extent[0][1]+d],[l.extent[1][0]+c,l.extent[1][1]+d]]);const m=$c(h)?Bc(n,h,l.measured):n;return(l.measured.width===void 0||l.measured.height===void 0)&&(a==null||a("015",aa.error015())),{position:{x:m.x-c+(l.measured.width??0)*_[0],y:m.y-d+(l.measured.height??0)*_[1]},positionAbsolute:m}}async function S4t({nodesToRemove:e=[],edgesToRemove:n=[],nodes:t,edges:r,onBeforeDelete:s}){const a=new Set(e.map(m=>m.id)),l=[];for(const m of t){if(m.deletable===!1)continue;const g=a.has(m.id),S=!g&&m.parentId&&l.find(k=>k.id===m.parentId);(g||S)&&l.push(m)}const o=new Set(n.map(m=>m.id)),c=r.filter(m=>m.deletable!==!1),_=x4t(l,c);for(const m of c)o.has(m.id)&&!_.find(S=>S.id===m.id)&&_.push(m);if(!s)return{edges:_,nodes:l};const h=await s({nodes:l,edges:_});return typeof h=="boolean"?h?{edges:_,nodes:l}:{edges:[],nodes:[]}:h}const md=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),Bc=(e={x:0,y:0},n,t)=>({x:md(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:md(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function JR(e,n,t){const{width:r,height:s}=Do(t),{x:a,y:l}=t.internals.positionAbsolute;return Bc(e,[[a,l],[a+r,l+s]],n)}const w9=(e,n,t)=>et?-md(Math.abs(e-t),1,n)/n:0,Q4=(e,n,t=15,r=40)=>{const s=w9(e.x,r,n.width-r)*t,a=w9(e.y,r,n.height-r)*t;return[s,a]},Xm=(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)}),bx=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),Zm=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),wh=(e,n=[0,0])=>{var s,a;const{x:t,y:r}=X4(e)?e.internals.positionAbsolute:Xh(e,n);return{x:t,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},Gp=(e,n=[0,0])=>{var s,a;const{x:t,y:r}=X4(e)?e.internals.positionAbsolute:Xh(e,n);return{x:t,y:r,x2:t+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},eD=(e,n)=>Zm(Xm(bx(e),bx(n))),tD=(e,n,t,r,s,a,l,o)=>{const c=Math.max(0,Math.min(e+t,s+l)-Math.max(e,s)),d=Math.max(0,Math.min(n+r,a+o)-Math.max(n,a));return Math.ceil(c*d)},Vp=(e,n)=>tD(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),S9=e=>ta(e.width)&&ta(e.height)&&ta(e.x)&&ta(e.y),ta=e=>!isNaN(e)&&isFinite(e),nD=(e,n)=>(t,r)=>{},Qh=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Jh=({x:e,y:n},[t,r,s],a=!1,l=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return a?Qh(o,l):o},gd=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function Tu(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 k4t(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=Tu(e,t),s=Tu(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=Tu(e.top??e.y??0,t),s=Tu(e.bottom??e.y??0,t),a=Tu(e.left??e.x??0,n),l=Tu(e.right??e.x??0,n);return{top:r,right:l,bottom:s,left:a,x:a+l,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function C4t(e,n,t,r,s,a){const{x:l,y:o}=gd(e,[n,t,r]),{x:c,y:d}=gd({x:e.x+e.width,y:e.y+e.height},[n,t,r]),_=s-c,h=a-d;return{left:Math.floor(l),top:Math.floor(o),right:Math.floor(_),bottom:Math.floor(h)}}const J4=(e,n,t,r,s,a)=>{const l=k4t(a,n,t),o=(n-l.x)/e.width,c=(t-l.y)/e.height,d=Math.min(o,c),_=md(d,r,s),h=e.x+e.width/2,m=e.y+e.height/2,g=n/2-h*_,S=t/2-m*_,k=C4t(e,g,S,_,n,t),b={left:Math.min(k.left-l.left,0),top:Math.min(k.top-l.top,0),right:Math.min(k.right-l.right,0),bottom:Math.min(k.bottom-l.bottom,0)};return{x:g-b.left+b.right,y:S-b.top+b.bottom,zoom:_}},Sh=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function $c(e){return e!=null&&e!=="parent"}function Do(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 rD(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 sD(e,n={width:0,height:0},t,r,s){const a={...e},l=r.get(t);if(l){const o=l.origin||s;a.x+=l.internals.positionAbsolute.x-(n.width??0)*o[0],a.y+=l.internals.positionAbsolute.y-(n.height??0)*o[1]}return a}function k9(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function E4t(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function N4t(e){return{...KR,...e||{}}}function Wf(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:a,y:l}=na(e),o=Jh({x:a-((s==null?void 0:s.left)??0),y:l-((s==null?void 0:s.top)??0)},r),{x:c,y:d}=t?Qh(o,n):o;return{xSnapped:c,ySnapped:d,...o}}const ew=e=>({width:e.offsetWidth,height:e.offsetHeight}),iD=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},z4t=["INPUT","SELECT","TEXTAREA"];function aD(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:z4t.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const oD=e=>"clientX"in e,na=(e,n)=>{var a,l;const t=oD(e),r=t?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,s=t?e.clientY:(l=e.touches)==null?void 0:l[0].clientY;return{x:r-((n==null?void 0:n.left)??0),y:s-((n==null?void 0:n.top)??0)}},C9=(e,n,t,r,s)=>{const a=n.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(l=>{const o=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:s,position:l.getAttribute("data-handlepos"),x:(o.left-t.left)/r,y:(o.top-t.top)/r,...ew(l)}})};function lD({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:a,targetControlX:l,targetControlY:o}){const c=e*.125+s*.375+l*.375+t*.125,d=n*.125+a*.375+o*.375+r*.125,_=Math.abs(c-e),h=Math.abs(d-n);return[c,d,_,h]}function $0(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function E9({pos:e,x1:n,y1:t,x2:r,y2:s,c:a}){switch(e){case xt.Left:return[n-$0(n-r,a),t];case xt.Right:return[n+$0(r-n,a),t];case xt.Top:return[n,t-$0(t-s,a)];case xt.Bottom:return[n,t+$0(s-t,a)]}}function cD({sourceX:e,sourceY:n,sourcePosition:t=xt.Bottom,targetX:r,targetY:s,targetPosition:a=xt.Top,curvature:l=.25}){const[o,c]=E9({pos:t,x1:e,y1:n,x2:r,y2:s,c:l}),[d,_]=E9({pos:a,x1:r,y1:s,x2:e,y2:n,c:l}),[h,m,g,S]=lD({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:c,targetControlX:d,targetControlY:_});return[`M${e},${n} C${o},${c} ${d},${_} ${r},${s}`,h,m,g,S]}function uD({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,a=t0}const T4t=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,M4t=(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)),R4t=(e,n,t={})=>{var a;if(!e.source||!e.target)return(a=t.onError)==null||a.call(t,"006",aa.error006()),n;const r=t.getEdgeId||T4t;let s;return ZR(e)?s={...e}:s={...e,id:r(e)},M4t(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function dD({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,a,l,o]=uD({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,a,l,o]}const N9={[xt.Left]:{x:-1,y:0},[xt.Right]:{x:1,y:0},[xt.Top]:{x:0,y:-1},[xt.Bottom]:{x:0,y:1}},D4t=({source:e,sourcePosition:n=xt.Bottom,target:t})=>n===xt.Left||n===xt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function L4t({source:e,sourcePosition:n=xt.Bottom,target:t,targetPosition:r=xt.Top,center:s,offset:a,stepPosition:l}){const o=N9[n],c=N9[r],d={x:e.x+o.x*a,y:e.y+o.y*a},_={x:t.x+c.x*a,y:t.y+c.y*a},h=D4t({source:d,sourcePosition:n,target:_}),m=h.x!==0?"x":"y",g=h[m];let S=[],k,b;const v={x:0,y:0},x={x:0,y:0},[,,y,C]=uD({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(o[m]*c[m]===-1){m==="x"?(k=s.x??d.x+(_.x-d.x)*l,b=s.y??(d.y+_.y)/2):(k=s.x??(d.x+_.x)/2,b=s.y??d.y+(_.y-d.y)*l);const z=[{x:k,y:d.y},{x:k,y:_.y}],D=[{x:d.x,y:b},{x:_.x,y:b}];o[m]===g?S=m==="x"?z:D:S=m==="x"?D:z}else{const z=[{x:d.x,y:_.y}],D=[{x:_.x,y:d.y}];if(m==="x"?S=o.x===g?D:z:S=o.y===g?z:D,n===r){const W=Math.abs(e[m]-t[m]);if(W<=a){const Z=Math.min(a-1,a-W);o[m]===g?v[m]=(d[m]>e[m]?-1:1)*Z:x[m]=(_[m]>t[m]?-1:1)*Z}}if(n!==r){const W=m==="x"?"y":"x",Z=o[m]===c[W],U=d[W]>_[W],X=d[W]<_[W];(o[m]===1&&(!Z&&U||Z&&X)||o[m]!==1&&(!Z&&X||Z&&U))&&(S=m==="x"?z:D)}const O={x:d.x+v.x,y:d.y+v.y},H={x:_.x+x.x,y:_.y+x.y},P=Math.max(Math.abs(O.x-S[0].x),Math.abs(H.x-S[0].x)),F=Math.max(Math.abs(O.y-S[0].y),Math.abs(H.y-S[0].y));P>=F?(k=(O.x+H.x)/2,b=S[0].y):(k=S[0].x,b=(O.y+H.y)/2)}const j={x:d.x+v.x,y:d.y+v.y},N={x:_.x+x.x,y:_.y+x.y};return[[e,...j.x!==S[0].x||j.y!==S[0].y?[j]:[],...S,...N.x!==S[S.length-1].x||N.y!==S[S.length-1].y?[N]:[],t],k,b,y,C]}function O4t(e,n,t,r){const s=Math.min(z9(e,n)/2,z9(n,t)/2,r),{x:a,y:l}=n;if(e.x===a&&a===t.x||e.y===l&&l===t.y)return`L${a} ${l}`;if(e.y===l){const d=e.xt.id===n):e[0])||null}function yx(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function B4t(e,{id:n,defaultColor:t,defaultMarkerStart:r,defaultMarkerEnd:s}){const a=new Set;return e.reduce((l,o)=>([o.markerStart||r,o.markerEnd||s].forEach(c=>{if(c&&typeof c=="object"){const d=yx(c,n);a.has(d)||(l.push({id:d,color:c.color||t,...c}),a.add(d))}}),l),[]).sort((l,o)=>l.id.localeCompare(o.id))}const fD=1e3,$4t=10,tw={nodeOrigin:[0,0],nodeExtent:xh,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},H4t={...tw,checkEquality:!0};function nw(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function P4t(e,n,t){const r=nw(tw,t);for(const s of e.values())if(s.parentId)sw(s,e,n,r);else{const a=Xh(s,r.nodeOrigin),l=$c(s.extent)?s.extent:r.nodeExtent,o=Bc(a,l,Do(s));s.internals.positionAbsolute=o}}function F4t(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 a={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(a):s.type==="target"&&r.push(a)}return{source:t,target:r}}function rw(e){return e==="manual"}function wx(e,n,t,r={}){var _,h;const s=nw(H4t,r),a={i:0},l=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!rw(s.zIndexMode)?fD:0;let c=e.length>0,d=!1;n.clear(),t.clear();for(const m of e){let g=l.get(m.id);if(s.checkEquality&&m===(g==null?void 0:g.internals.userNode))n.set(m.id,g);else{const S=Xh(m,s.nodeOrigin),k=$c(m.extent)?m.extent:s.nodeExtent,b=Bc(S,k,Do(m));g={...s.defaults,...m,measured:{width:(_=m.measured)==null?void 0:_.width,height:(h=m.measured)==null?void 0:h.height},internals:{positionAbsolute:b,handleBounds:F4t(m,g),z:hD(m,o,s.zIndexMode),userNode:m}},n.set(m.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(c=!1),m.parentId&&sw(g,n,t,r,a),d||(d=m.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:d}}function U4t(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 sw(e,n,t,r,s){const{elevateNodesOnSelect:a,nodeOrigin:l,nodeExtent:o,zIndexMode:c}=nw(tw,r),d=e.parentId,_=n.get(d);if(!_){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}U4t(e,t),s&&!_.parentId&&_.internals.rootParentIndex===void 0&&c==="auto"&&(_.internals.rootParentIndex=++s.i,_.internals.z=_.internals.z+s.i*$4t),s&&_.internals.rootParentIndex!==void 0&&(s.i=_.internals.rootParentIndex);const h=a&&!rw(c)?fD:0,{x:m,y:g,z:S}=q4t(e,_,l,o,h,c),{positionAbsolute:k}=e.internals,b=m!==k.x||g!==k.y;(b||S!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:m,y:g}:k,z:S}})}function hD(e,n,t){const r=ta(e.zIndex)?e.zIndex:0;return rw(t)?r:r+(e.selected?n:0)}function q4t(e,n,t,r,s,a){const{x:l,y:o}=n.internals.positionAbsolute,c=Do(e),d=Xh(e,t),_=$c(e.extent)?Bc(d,e.extent,c):d;let h=Bc({x:l+_.x,y:o+_.y},r,c);e.extent==="parent"&&(h=JR(h,c,n));const m=hD(e,s,a),g=n.internals.z??0;return{x:h.x,y:h.y,z:g>=m?g+1:m}}function iw(e,n,t,r=[0,0]){var l;const s=[],a=new Map;for(const o of e){const c=n.get(o.parentId);if(!c)continue;const d=((l=a.get(o.parentId))==null?void 0:l.expandedRect)??wh(c),_=eD(d,o.rect);a.set(o.parentId,{expandedRect:_,parent:c})}return a.size>0&&a.forEach(({expandedRect:o,parent:c},d)=>{var y;const _=c.internals.positionAbsolute,h=Do(c),m=c.origin??r,g=o.x<_.x?Math.round(Math.abs(_.x-o.x)):0,S=o.y<_.y?Math.round(Math.abs(_.y-o.y)):0,k=Math.max(h.width,Math.round(o.width)),b=Math.max(h.height,Math.round(o.height)),v=(k-h.width)*m[0],x=(b-h.height)*m[1];(g>0||S>0||v||x)&&(s.push({id:d,type:"position",position:{x:c.position.x-g+v,y:c.position.y-S+x}}),(y=t.get(d))==null||y.forEach(C=>{e.some(j=>j.id===C.id)||s.push({id:C.id,type:"position",position:{x:C.position.x+g,y:C.position.y+S}})})),(h.width0){const g=iw(m,n,t,s);d.push(...g)}return{changes:d,updatedInternals:c}}async function V4t({delta:e,panZoom:n,transform:t,translateExtent:r,width:s,height:a}){if(!n||!e.x&&!e.y)return!1;const l=await n.setViewportConstrained({x:t[0]+e.x,y:t[1]+e.y,zoom:t[2]},[[0,0],[s,a]],r);return!!l&&(l.x!==t[0]||l.y!==t[1]||l.k!==t[2])}function M9(e,n,t,r,s,a){let l=s;const o=r.get(l)||new Map;r.set(l,o.set(t,n)),l=`${s}-${e}`;const c=r.get(l)||new Map;if(r.set(l,c.set(t,n)),a){l=`${s}-${e}-${a}`;const d=r.get(l)||new Map;r.set(l,d.set(t,n))}}function _D(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:a,sourceHandle:l=null,targetHandle:o=null}=r,c={edgeId:r.id,source:s,target:a,sourceHandle:l,targetHandle:o},d=`${s}-${l}--${a}-${o}`,_=`${a}-${o}--${s}-${l}`;M9("source",c,_,e,s,l),M9("target",c,d,e,a,o),n.set(r.id,r)}}function pD(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:pD(t,n):!1}function R9(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 W4t(e,n,t,r){const s=new Map;for(const[a,l]of e)if((l.selected||l.id===r)&&(!l.parentId||!pD(l,e))&&(l.draggable||n&&typeof l.draggable>"u")){const o=e.get(a);o&&s.set(a,{id:a,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 Cb({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var l,o,c;const s=[];for(const[d,_]of n){const h=(l=t.get(d))==null?void 0:l.internals.userNode;h&&s.push({...h,position:_.position,dragging:r})}if(!e)return[s[0],s];const a=(o=t.get(e))==null?void 0:o.internals.userNode;return[a?{...a,position:((c=n.get(e))==null?void 0:c.position)||a.position,dragging:r}:s[0],s]}function K4t({dragItems:e,snapGrid:n,x:t,y:r}){const s=e.values().next().value;if(!s)return null;const a={x:t-s.distance.x,y:r-s.distance.y},l=Qh(a,n);return{x:l.x-a.x,y:l.y-a.y}}function Y4t({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let a={x:null,y:null},l=0,o=new Map,c=!1,d={x:0,y:0},_=null,h=!1,m=null,g=!1,S=!1,k=null;function b({noDragClassName:x,handleSelector:y,domNode:C,isSelectable:j,nodeId:N,nodeClickDistance:T=0}){m=_i(C);function z({x:P,y:F}){const{nodeLookup:W,nodeExtent:Z,snapGrid:U,snapToGrid:X,nodeOrigin:J,onNodeDrag:$,onSelectionDrag:L,onError:B,updateNodePositions:Y}=n();a={x:P,y:F};let V=!1;const ie=o.size>1,le=ie&&Z?bx(Zh(o)):null,ae=ie&&X?K4t({dragItems:o,snapGrid:U,x:P,y:F}):null;for(const[re,q]of o){if(!W.has(re))continue;let oe={x:P-q.distance.x,y:F-q.distance.y};X&&(oe=ae?{x:Math.round(oe.x+ae.x),y:Math.round(oe.y+ae.y)}:Qh(oe,U));let ce=null;if(ie&&Z&&!q.extent&&le){const{positionAbsolute:ve}=q.internals,Ce=ve.x-le.x+Z[0][0],Le=ve.x+q.measured.width-le.x2+Z[1][0],Ue=ve.y-le.y+Z[0][1],He=ve.y+q.measured.height-le.y2+Z[1][1];ce=[[Ce,Ue],[Le,He]]}const{position:_e,positionAbsolute:de}=QR({nodeId:re,nextPosition:oe,nodeLookup:W,nodeExtent:ce||Z,nodeOrigin:J,onError:B});V=V||q.position.x!==_e.x||q.position.y!==_e.y,q.position=_e,q.internals.positionAbsolute=de}if(S=S||V,!!V&&(Y(o,!0),k&&(r||$||!N&&L))){const[re,q]=Cb({nodeId:N,dragItems:o,nodeLookup:W});r==null||r(k,o,re,q),$==null||$(k,re,q),N||L==null||L(k,q)}}async function D(){if(!_)return;const{transform:P,panBy:F,autoPanSpeed:W,autoPanOnNodeDrag:Z}=n();if(!Z){c=!1,cancelAnimationFrame(l);return}const[U,X]=Q4(d,_,W);(U!==0||X!==0)&&(a.x=(a.x??0)-U/P[2],a.y=(a.y??0)-X/P[2],await F({x:U,y:X})&&z(a)),l=requestAnimationFrame(D)}function O(P){var ie;const{nodeLookup:F,multiSelectionActive:W,nodesDraggable:Z,transform:U,snapGrid:X,snapToGrid:J,selectNodesOnDrag:$,onNodeDragStart:L,onSelectionDragStart:B,unselectNodesAndEdges:Y}=n();h=!0,(!$||!j)&&!W&&N&&((ie=F.get(N))!=null&&ie.selected||Y()),j&&$&&N&&(e==null||e(N));const V=Wf(P.sourceEvent,{transform:U,snapGrid:X,snapToGrid:J,containerBounds:_});if(a=V,o=W4t(F,Z,V,N),o.size>0&&(t||L||!N&&B)){const[le,ae]=Cb({nodeId:N,dragItems:o,nodeLookup:F});t==null||t(P.sourceEvent,o,le,ae),L==null||L(P.sourceEvent,le,ae),N||B==null||B(P.sourceEvent,ae)}}const H=TR().clickDistance(T).on("start",P=>{const{domNode:F,nodeDragThreshold:W,transform:Z,snapGrid:U,snapToGrid:X}=n();_=(F==null?void 0:F.getBoundingClientRect())||null,g=!1,S=!1,k=P.sourceEvent,W===0&&O(P),a=Wf(P.sourceEvent,{transform:Z,snapGrid:U,snapToGrid:X,containerBounds:_}),d=na(P.sourceEvent,_)}).on("drag",P=>{const{autoPanOnNodeDrag:F,transform:W,snapGrid:Z,snapToGrid:U,nodeDragThreshold:X,nodeLookup:J}=n(),$=Wf(P.sourceEvent,{transform:W,snapGrid:Z,snapToGrid:U,containerBounds:_});if(k=P.sourceEvent,(P.sourceEvent.type==="touchmove"&&P.sourceEvent.touches.length>1||N&&!J.has(N))&&(g=!0),!g){if(!c&&F&&h&&(c=!0,D()),!h){const L=na(P.sourceEvent,_),B=L.x-d.x,Y=L.y-d.y;Math.sqrt(B*B+Y*Y)>X&&O(P)}(a.x!==$.xSnapped||a.y!==$.ySnapped)&&o&&h&&(d=na(P.sourceEvent,_),z($))}}).on("end",P=>{if(!h||g){g&&o.size>0&&n().updateNodePositions(o,!1);return}if(c=!1,h=!1,cancelAnimationFrame(l),o.size>0){const{nodeLookup:F,updateNodePositions:W,onNodeDragStop:Z,onSelectionDragStop:U}=n();if(S&&(W(o,!1),S=!1),s||Z||!N&&U){const[X,J]=Cb({nodeId:N,dragItems:o,nodeLookup:F,dragging:!1});s==null||s(P.sourceEvent,o,X,J),Z==null||Z(P.sourceEvent,X,J),N||U==null||U(P.sourceEvent,J)}}}).filter(P=>{const F=P.target;return!P.button&&(!x||!R9(F,`.${x}`,C))&&(!y||R9(F,y,C))});m.call(H)}function v(){m==null||m.on(".drag",null)}return{update:b,destroy:v}}function X4t(e,n,t){const r=[],s={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const a of n.values())Vp(s,wh(a))>0&&r.push(a);return r}const Z4t=250;function Q4t(e,n,t,r){var o,c;let s=[],a=1/0;const l=X4t(e,t,n+Z4t);for(const d of l){const _=[...((o=d.internals.handleBounds)==null?void 0:o.source)??[],...((c=d.internals.handleBounds)==null?void 0:c.target)??[]];for(const h of _){if(r.nodeId===h.nodeId&&r.type===h.type&&r.id===h.id)continue;const{x:m,y:g}=Hc(d,h,h.position,!0),S=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(g-e.y,2));S>n||(S1){const d=r.type==="source"?"target":"source";return s.find(_=>_.type===d)??s[0]}return s[0]}function mD(e,n,t,r,s,a=!1){var d,_,h;const l=r.get(e);if(!l)return null;const o=s==="strict"?(d=l.internals.handleBounds)==null?void 0:d[n]:[...((_=l.internals.handleBounds)==null?void 0:_.source)??[],...((h=l.internals.handleBounds)==null?void 0:h.target)??[]],c=(t?o==null?void 0:o.find(m=>m.id===t):o==null?void 0:o[0])??null;return c&&a?{...c,...Hc(l,c,c.position,!0)}:c}function gD(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function J4t(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const vD=()=>!0;function ewt(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:a,isTarget:l,domNode:o,nodeLookup:c,lib:d,autoPanOnConnect:_,flowId:h,panBy:m,cancelConnection:g,onConnectStart:S,onConnect:k,onConnectEnd:b,isValidConnection:v=vD,onReconnectEnd:x,updateConnection:y,getTransform:C,getFromHandle:j,autoPanSpeed:N,dragThreshold:T=1,handleDomNode:z}){const D=iD(e.target);let O=0,H;const{x:P,y:F}=na(e),W=gD(a,z),Z=o==null?void 0:o.getBoundingClientRect();let U=!1;if(!Z||!W)return;const X=mD(s,W,r,c,n);if(!X)return;let J=na(e,Z),$=!1,L=null,B=!1,Y=null;function V(){if(!_||!Z)return;const[_e,de]=Q4(J,Z,N);m({x:_e,y:de}),O=requestAnimationFrame(V)}const ie={...X,nodeId:s,type:W,position:X.position},le=c.get(s);let re={inProgress:!0,isValid:null,from:Hc(le,ie,xt.Left,!0),fromHandle:ie,fromPosition:ie.position,fromNode:le,to:J,toHandle:null,toPosition:y9[ie.position],toNode:null,pointer:J};function q(){U=!0,y(re),S==null||S(e,{nodeId:s,handleId:r,handleType:W})}T===0&&q();function oe(_e){if(!U){const{x:He,y:Bt}=na(_e),Et=He-P,Nt=Bt-F;if(!(Et*Et+Nt*Nt>T*T))return;q()}if(!j()||!ie){ce(_e);return}const de=C();J=na(_e,Z),H=Q4t(Jh(J,de,!1,[1,1]),t,c,ie),$||(V(),$=!0);const ve=bD(_e,{handle:H,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:l?"target":"source",isValidConnection:v,doc:D,lib:d,flowId:h,nodeLookup:c});Y=ve.handleDomNode,L=ve.connection,B=J4t(!!H,ve.isValid);const Ce=c.get(s),Le=Ce?Hc(Ce,ie,xt.Left,!0):re.from,Ue={...re,from:Le,isValid:B,to:ve.toHandle&&B?gd({x:ve.toHandle.x,y:ve.toHandle.y},de):J,toHandle:ve.toHandle,toPosition:B&&ve.toHandle?ve.toHandle.position:y9[ie.position],toNode:ve.toHandle?c.get(ve.toHandle.nodeId):null,pointer:J};y(Ue),re=Ue}function ce(_e){if(!("touches"in _e&&_e.touches.length>0)){if(U){(H||Y)&&L&&B&&(k==null||k(L));const{inProgress:de,...ve}=re,Ce={...ve,toPosition:re.toHandle?re.toPosition:null};b==null||b(_e,Ce),a&&(x==null||x(_e,Ce))}g(),cancelAnimationFrame(O),$=!1,B=!1,L=null,Y=null,D.removeEventListener("mousemove",oe),D.removeEventListener("mouseup",ce),D.removeEventListener("touchmove",oe),D.removeEventListener("touchend",ce)}}D.addEventListener("mousemove",oe),D.addEventListener("mouseup",ce),D.addEventListener("touchmove",oe),D.addEventListener("touchend",ce)}function bD(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:a,doc:l,lib:o,flowId:c,isValidConnection:d=vD,nodeLookup:_}){const h=a==="target",m=n?l.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:g,y:S}=na(e),k=l.elementFromPoint(g,S),b=k!=null&&k.classList.contains(`${o}-flow__handle`)?k:m,v={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const x=gD(void 0,b),y=b.getAttribute("data-nodeid"),C=b.getAttribute("data-handleid"),j=b.classList.contains("connectable"),N=b.classList.contains("connectableend");if(!y||!x)return v;const T={source:h?y:r,sourceHandle:h?C:s,target:h?r:y,targetHandle:h?s:C};v.connection=T;const D=j&&N&&(t===pd.Strict?h&&x==="source"||!h&&x==="target":y!==r||C!==s);v.isValid=D&&d(T),v.toHandle=mD(y,x,C,_,t,!0)}return v}const Sx={onPointerDown:ewt,isValid:bD};function twt({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=_i(e);function a({translateExtent:o,width:c,height:d,zoomStep:_=1,pannable:h=!0,zoomable:m=!0,inversePan:g=!1}){const S=y=>{if(y.sourceEvent.type!=="wheel"||!n)return;const C=t(),j=y.sourceEvent.ctrlKey&&Sh()?10:1,N=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*_,T=C[2]*Math.pow(2,N*j);n.scaleTo(T)};let k=[0,0];const b=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])},v=y=>{const C=t();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!n)return;const j=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],N=[j[0]-k[0],j[1]-k[1]];k=j;const T=r()*Math.max(C[2],Math.log(C[2]))*(g?-1:1),z={x:C[0]-N[0]*T,y:C[1]-N[1]*T},D=[[0,0],[c,d]];n.setViewportConstrained({x:z.x,y:z.y,zoom:C[2]},D,o)},x=VR().on("start",b).on("zoom",h?v:null).on("zoom.wheel",m?S:null);s.call(x,{})}function l(){s.on("zoom",null)}return{update:a,destroy:l,pointer:Qi}}const Qm=e=>({x:e.x,y:e.y,zoom:e.k}),Eb=({x:e,y:n,zoom:t})=>Ym.translate(e,n).scale(t),Uu=(e,n)=>e.target.closest(`.${n}`),xD=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),nwt=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Nb=(e,n=0,t=nwt,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},yD=e=>{const n=e.ctrlKey&&Sh()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function rwt({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:a,zoomOnPinch:l,onPanZoomStart:o,onPanZoom:c,onPanZoomEnd:d}){return _=>{if(Uu(_,n))return _.ctrlKey&&_.preventDefault(),!1;_.preventDefault(),_.stopImmediatePropagation();const h=t.property("__zoom").k||1;if(_.ctrlKey&&l){const b=Qi(_),v=yD(_),x=h*Math.pow(2,v);r.scaleTo(t,x,b,_);return}const m=_.deltaMode===1?20:1;let g=s===Mc.Vertical?0:_.deltaX*m,S=s===Mc.Horizontal?0:_.deltaY*m;!Sh()&&_.shiftKey&&s!==Mc.Vertical&&(g=_.deltaY*m,S=0),r.translateBy(t,-(g/h)*a,-(S/h)*a,{internal:!0});const k=Qm(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(_,k),e.panScrollTimeout=setTimeout(()=>{d==null||d(_,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(_,k))}}function swt({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const a=r.type==="wheel",l=!n&&a&&!r.ctrlKey,o=Uu(r,e);if(r.ctrlKey&&a&&o&&r.preventDefault(),l||o)return null;r.preventDefault(),t.call(this,r,s)}}function iwt({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var a,l,o;if((a=r.sourceEvent)!=null&&a.internal)return;const s=Qm(r.transform);e.mouseButton=((l=r.sourceEvent)==null?void 0:l.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 awt({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return a=>{var l,o;e.usedRightMouseButton=!!(t&&xD(n,e.mouseButton??0)),(l=a.sourceEvent)!=null&&l.sync||r([a.transform.x,a.transform.y,a.transform.k]),s&&!((o=a.sourceEvent)!=null&&o.internal)&&(s==null||s(a.sourceEvent,Qm(a.transform)))}}function owt({zoomPanValues:e,panOnDrag:n,panOnScroll:t,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:a}){return l=>{var o;if(!((o=l.sourceEvent)!=null&&o.internal)&&(e.isZoomingOrPanning=!1,a&&xD(n,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&a(l.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=Qm(l.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(l.sourceEvent,c)},t?150:0)}}}function lwt({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:a,userSelectionActive:l,noWheelClassName:o,noPanClassName:c,lib:d,connectionInProgress:_}){return h=>{var b;const m=e||n,g=t&&h.ctrlKey,S=h.type==="wheel";if(h.button===1&&h.type==="mousedown"&&(Uu(h,`${d}-flow__node`)||Uu(h,`${d}-flow__edge`)))return!0;if(!r&&!m&&!s&&!a&&!t||l||_&&!S||Uu(h,o)&&S||Uu(h,c)&&(!S||s&&S&&!e)||!t&&h.ctrlKey&&S)return!1;if(!t&&h.type==="touchstart"&&((b=h.touches)==null?void 0:b.length)>1)return h.preventDefault(),!1;if(!m&&!s&&!g&&S||!r&&(h.type==="mousedown"||h.type==="touchstart")||Array.isArray(r)&&!r.includes(h.button)&&h.type==="mousedown")return!1;const k=Array.isArray(r)&&r.includes(h.button)||!h.button||h.button<=1;return(!h.ctrlKey||S)&&k}}function cwt({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:a,onPanZoomStart:l,onPanZoomEnd:o,onDraggingChange:c}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},_=e.getBoundingClientRect(),h=VR().scaleExtent([n,t]).translateExtent(r),m=_i(e).call(h);x({x:s.x,y:s.y,zoom:md(s.zoom,n,t)},[[0,0],[_.width,_.height]],r);const g=m.on("wheel.zoom"),S=m.on("dblclick.zoom");h.wheelDelta(yD);async function k(H,P){return m?new Promise(F=>{h==null||h.interpolate((P==null?void 0:P.interpolate)==="linear"?Vf:np).transform(Nb(m,P==null?void 0:P.duration,P==null?void 0:P.ease,()=>F(!0)),H)}):!1}function b({noWheelClassName:H,noPanClassName:P,onPaneContextMenu:F,userSelectionActive:W,panOnScroll:Z,panOnDrag:U,panOnScrollMode:X,panOnScrollSpeed:J,preventScrolling:$,zoomOnPinch:L,zoomOnScroll:B,zoomOnDoubleClick:Y,zoomActivationKeyPressed:V,lib:ie,onTransformChange:le,connectionInProgress:ae,paneClickDistance:re,selectionOnDrag:q}){W&&!d.isZoomingOrPanning&&v();const oe=Z&&!V&&!W;h.clickDistance(q?1/0:!ta(re)||re<0?0:re);const ce=oe?rwt({zoomPanValues:d,noWheelClassName:H,d3Selection:m,d3Zoom:h,panOnScrollMode:X,panOnScrollSpeed:J,zoomOnPinch:L,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:o}):swt({noWheelClassName:H,preventScrolling:$,d3ZoomHandler:g});m.on("wheel.zoom",ce,{passive:!1});const _e=iwt({zoomPanValues:d,onDraggingChange:c,onPanZoomStart:l});h.on("start",_e);const de=awt({zoomPanValues:d,panOnDrag:U,onPaneContextMenu:!!F,onPanZoom:a,onTransformChange:le});h.on("zoom",de);const ve=owt({zoomPanValues:d,panOnDrag:U,panOnScroll:Z,onPaneContextMenu:F,onPanZoomEnd:o,onDraggingChange:c});h.on("end",ve);const Ce=lwt({zoomActivationKeyPressed:V,panOnDrag:U,zoomOnScroll:B,panOnScroll:Z,zoomOnDoubleClick:Y,zoomOnPinch:L,userSelectionActive:W,noPanClassName:P,noWheelClassName:H,lib:ie,connectionInProgress:ae});h.filter(Ce),Y?m.on("dblclick.zoom",S):m.on("dblclick.zoom",null)}function v(){h.on("zoom",null)}async function x(H,P,F){const W=Eb(H),Z=h==null?void 0:h.constrain()(W,P,F);return Z&&await k(Z),Z}async function y(H,P){const F=Eb(H);return await k(F,P),F}function C(H){if(m){const P=Eb(H),F=m.property("__zoom");(F.k!==H.zoom||F.x!==H.x||F.y!==H.y)&&(h==null||h.transform(m,P,null,{sync:!0}))}}function j(){const H=m?GR(m.node()):{x:0,y:0,k:1};return{x:H.x,y:H.y,zoom:H.k}}async function N(H,P){return m?new Promise(F=>{h==null||h.interpolate((P==null?void 0:P.interpolate)==="linear"?Vf:np).scaleTo(Nb(m,P==null?void 0:P.duration,P==null?void 0:P.ease,()=>F(!0)),H)}):!1}async function T(H,P){return m?new Promise(F=>{h==null||h.interpolate((P==null?void 0:P.interpolate)==="linear"?Vf:np).scaleBy(Nb(m,P==null?void 0:P.duration,P==null?void 0:P.ease,()=>F(!0)),H)}):!1}function z(H){h==null||h.scaleExtent(H)}function D(H){h==null||h.translateExtent(H)}function O(H){const P=!ta(H)||H<0?0:H;h==null||h.clickDistance(P)}return{update:b,destroy:v,setViewport:y,setViewportConstrained:x,getViewport:j,scaleTo:N,scaleBy:T,setScaleExtent:z,setTranslateExtent:D,syncViewport:C,setClickDistance:O}}var vd;(function(e){e.Line="line",e.Handle="handle"})(vd||(vd={}));function uwt({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:a}){const l=e-n,o=t-r,c=[l>0?1:l<0?-1:0,o>0?1:o<0?-1:0];return l&&s&&(c[0]=c[0]*-1),o&&a&&(c[1]=c[1]*-1),c}function D9(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 yl(e,n){return Math.max(0,n-e)}function wl(e,n){return Math.max(0,e-n)}function H0(e,n,t){return Math.max(0,n-e,e-t)}function L9(e,n){return e?!n:n}function dwt(e,n,t,r,s,a,l,o){let{affectsX:c,affectsY:d}=n;const{isHorizontal:_,isVertical:h}=n,m=_&&h,{xSnapped:g,ySnapped:S}=t,{minWidth:k,maxWidth:b,minHeight:v,maxHeight:x}=r,{x:y,y:C,width:j,height:N,aspectRatio:T}=e;let z=Math.floor(_?g-e.pointerX:0),D=Math.floor(h?S-e.pointerY:0);const O=j+(c?-z:z),H=N+(d?-D:D),P=-a[0]*j,F=-a[1]*N;let W=H0(O,k,b),Z=H0(H,v,x);if(l){let J=0,$=0;c&&z<0?J=yl(y+z+P,l[0][0]):!c&&z>0&&(J=wl(y+O+P,l[1][0])),d&&D<0?$=yl(C+D+F,l[0][1]):!d&&D>0&&($=wl(C+H+F,l[1][1])),W=Math.max(W,J),Z=Math.max(Z,$)}if(o){let J=0,$=0;c&&z>0?J=wl(y+z,o[0][0]):!c&&z<0&&(J=yl(y+O,o[1][0])),d&&D>0?$=wl(C+D,o[0][1]):!d&&D<0&&($=yl(C+H,o[1][1])),W=Math.max(W,J),Z=Math.max(Z,$)}if(s){if(_){const J=H0(O/T,v,x)*T;if(W=Math.max(W,J),l){let $=0;!c&&!d||c&&!d&&m?$=wl(C+F+O/T,l[1][1])*T:$=yl(C+F+(c?z:-z)/T,l[0][1])*T,W=Math.max(W,$)}if(o){let $=0;!c&&!d||c&&!d&&m?$=yl(C+O/T,o[1][1])*T:$=wl(C+(c?z:-z)/T,o[0][1])*T,W=Math.max(W,$)}}if(h){const J=H0(H*T,k,b)/T;if(Z=Math.max(Z,J),l){let $=0;!c&&!d||d&&!c&&m?$=wl(y+H*T+P,l[1][0])/T:$=yl(y+(d?D:-D)*T+P,l[0][0])/T,Z=Math.max(Z,$)}if(o){let $=0;!c&&!d||d&&!c&&m?$=yl(y+H*T,o[1][0])/T:$=wl(y+(d?D:-D)*T,o[0][0])/T,Z=Math.max(Z,$)}}}D=D+(D<0?Z:-Z),z=z+(z<0?W:-W),s&&(m?O>H*T?D=(L9(c,d)?-z:z)/T:z=(L9(c,d)?-D:D)*T:_?(D=z/T,d=c):(z=D*T,c=d));const U=c?y+z:y,X=d?C+D:C;return{width:j+(c?-z:z),height:N+(d?-D:D),x:a[0]*z*(c?-1:1)+U,y:a[1]*D*(d?-1:1)+X}}const wD={width:0,height:0,x:0,y:0},fwt={...wD,pointerX:0,pointerY:0,aspectRatio:1};function hwt(e,n,t){const r=n.position.x+e.position.x,s=n.position.y+e.position.y,a=e.measured.width??0,l=e.measured.height??0,o=t[0]*a,c=t[1]*l;return[[r-o,s-c],[r+a-o,s+l-c]]}function _wt({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const a=_i(e);let l={controlDirection:D9("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function o({controlPosition:d,boundaries:_,keepAspectRatio:h,resizeDirection:m,onResizeStart:g,onResize:S,onResizeEnd:k,shouldResize:b}){let v={...wD},x={...fwt};l={boundaries:_,resizeDirection:m,keepAspectRatio:h,controlDirection:D9(d)};let y,C=null,j=[],N,T,z,D=!1;const O=TR().on("start",H=>{const{nodeLookup:P,transform:F,snapGrid:W,snapToGrid:Z,nodeOrigin:U,paneDomNode:X}=t();if(y=P.get(n),!y)return;C=(X==null?void 0:X.getBoundingClientRect())??null;const{xSnapped:J,ySnapped:$}=Wf(H.sourceEvent,{transform:F,snapGrid:W,snapToGrid:Z,containerBounds:C});v={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},x={...v,pointerX:J,pointerY:$,aspectRatio:v.width/v.height},N=void 0,T=$c(y.extent)?y.extent:void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(N=P.get(y.parentId)),N&&y.extent==="parent"&&(T=[[0,0],[N.measured.width,N.measured.height]]),j=[],z=void 0;for(const[L,B]of P)if(B.parentId===n&&(j.push({id:L,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){const Y=hwt(B,y,B.origin??U);z?z=[[Math.min(Y[0][0],z[0][0]),Math.min(Y[0][1],z[0][1])],[Math.max(Y[1][0],z[1][0]),Math.max(Y[1][1],z[1][1])]]:z=Y}g==null||g(H,{...v})}).on("drag",H=>{const{transform:P,snapGrid:F,snapToGrid:W,nodeOrigin:Z}=t(),U=Wf(H.sourceEvent,{transform:P,snapGrid:F,snapToGrid:W,containerBounds:C}),X=[];if(!y)return;const{x:J,y:$,width:L,height:B}=v,Y={},V=y.origin??Z,{width:ie,height:le,x:ae,y:re}=dwt(x,l.controlDirection,U,l.boundaries,l.keepAspectRatio,V,T,z),q=ie!==L,oe=le!==B,ce=ae!==J&&q,_e=re!==$&&oe;if(!ce&&!_e&&!q&&!oe)return;if((ce||_e||V[0]===1||V[1]===1)&&(Y.x=ce?ae:v.x,Y.y=_e?re:v.y,v.x=Y.x,v.y=Y.y,j.length>0)){const Le=ae-J,Ue=re-$;for(const He of j)He.position={x:He.position.x-Le+V[0]*(ie-L),y:He.position.y-Ue+V[1]*(le-B)},X.push(He)}if((q||oe)&&(Y.width=q&&(!l.resizeDirection||l.resizeDirection==="horizontal")?ie:v.width,Y.height=oe&&(!l.resizeDirection||l.resizeDirection==="vertical")?le:v.height,v.width=Y.width,v.height=Y.height),N&&y.expandParent){const Le=V[0]*(Y.width??0);Y.x&&Y.x{D&&(k==null||k(H,{...v}),s==null||s({...v}),D=!1)});a.call(O)}function c(){a.on(".drag",null)}return{update:o,destroy:c}}var zb={exports:{}},jb={},Ab={exports:{}},Tb={};/** + * @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 O9;function pwt(){if(O9)return Tb;O9=1;var e=Mh();function n(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,s=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function o(h,m){var g=m(),S=r({inst:{value:g,getSnapshot:m}}),k=S[0].inst,b=S[1];return a(function(){k.value=g,k.getSnapshot=m,c(k)&&b({inst:k})},[h,g,m]),s(function(){return c(k)&&b({inst:k}),h(function(){c(k)&&b({inst:k})})},[h]),l(g),g}function c(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!t(h,g)}catch{return!0}}function d(h,m){return m()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:o;return Tb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,Tb}var I9;function mwt(){return I9||(I9=1,Ab.exports=pwt()),Ab.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 B9;function gwt(){if(B9)return jb;B9=1;var e=Mh(),n=mwt();function t(d,_){return d===_&&(d!==0||1/d===1/_)||d!==d&&_!==_}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,a=e.useRef,l=e.useEffect,o=e.useMemo,c=e.useDebugValue;return jb.useSyncExternalStoreWithSelector=function(d,_,h,m,g){var S=a(null);if(S.current===null){var k={hasValue:!1,value:null};S.current=k}else k=S.current;S=o(function(){function v(N){if(!x){if(x=!0,y=N,N=m(N),g!==void 0&&k.hasValue){var T=k.value;if(g(T,N))return C=T}return C=N}if(T=C,r(y,N))return T;var z=m(N);return g!==void 0&&g(T,z)?(y=N,T):(y=N,C=z)}var x=!1,y,C,j=h===void 0?null:h;return[function(){return v(_())},j===null?void 0:function(){return v(j())}]},[_,h,m,g]);var b=s(d,S[0],S[1]);return l(function(){k.hasValue=!0,k.value=b},[b]),c(b),b},jb}var $9;function vwt(){return $9||($9=1,zb.exports=gwt()),zb.exports}var bwt=vwt();const xwt=Th(bwt),ywt={},H9=e=>{let n;const t=new Set,r=(_,h)=>{const m=typeof _=="function"?_(n):_;if(!Object.is(m,n)){const g=n;n=h??(typeof m!="object"||m===null)?m:Object.assign({},n,m),t.forEach(S=>S(n,g))}},s=()=>n,c={setState:r,getState:s,getInitialState:()=>d,subscribe:_=>(t.add(_),()=>t.delete(_)),destroy:()=>{(ywt?"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()}},d=n=e(r,s,c);return c},wwt=e=>e?H9(e):H9,{useDebugValue:Swt}=Qe,{useSyncExternalStoreWithSelector:kwt}=xwt,Cwt=e=>e;function SD(e,n=Cwt,t){const r=kwt(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return Swt(r),r}const P9=(e,n)=>{const t=wwt(e),r=(s,a=n)=>SD(t,s,a);return Object.assign(r,t),r},Ewt=(e,n)=>e?P9(e,n):P9;function or(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 Jm=M.createContext(null),Nwt=Jm.Provider,kD=aa.error001("react");function bn(e,n){const t=M.useContext(Jm);if(t===null)throw new Error(kD);return SD(t,e,n)}function cr(){const e=M.useContext(Jm);if(e===null)throw new Error(kD);return M.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const F9={display:"none"},zwt={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},CD="react-flow__node-desc",ED="react-flow__edge-desc",jwt="react-flow__aria-live",Awt=e=>e.ariaLiveMessage,Twt=e=>e.ariaLabelConfig;function Mwt({rfId:e}){const n=bn(Awt);return f.jsx("div",{id:`${jwt}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:zwt,children:n})}function Rwt({rfId:e,disableKeyboardA11y:n}){const t=bn(Twt);return f.jsxs(f.Fragment,{children:[f.jsx("div",{id:`${CD}-${e}`,style:F9,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),f.jsx("div",{id:`${ED}-${e}`,style:F9,children:t["edge.a11yDescription.default"]}),!n&&f.jsx(Mwt,{rfId:e})]})}const eg=M.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},a)=>{const l=`${e}`.split("-");return f.jsx("div",{className:Fr(["react-flow__panel",t,...l]),style:r,ref:a,...s,children:n})});eg.displayName="Panel";const U9="https://reactflow.dev?utm_source=attribution";function Dwt({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:f.jsx(eg,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${U9}`,children:f.jsx("a",{href:U9,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Lwt=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}},P0=e=>e.id;function Owt(e,n){return or(e.selectedNodes.map(P0),n.selectedNodes.map(P0))&&or(e.selectedEdges.map(P0),n.selectedEdges.map(P0))}function Iwt({onSelectionChange:e}){const n=cr(),{selectedNodes:t,selectedEdges:r}=bn(Lwt,Owt);return M.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(a=>a(s))},[t,r,e]),null}const Bwt=e=>!!e.onSelectionChangeHandlers;function $wt({onSelectionChange:e}){const n=bn(Bwt);return e||n?f.jsx(Iwt,{onSelectionChange:e}):null}const ND=[0,0],Hwt={x:0,y:0,zoom:1},Pwt=["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"],q9=[...Pwt,"rfId"],Fwt=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}),G9={translateExtent:xh,nodeOrigin:ND,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Uwt(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:a,setNodeExtent:l,reset:o,setDefaultNodesAndEdges:c}=bn(Fwt,or),d=cr();M.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{_.current=G9,o()}),[]);const _=M.useRef(G9);return M.useEffect(()=>{for(const h of q9){const m=e[h],g=_.current[h];m!==g&&(typeof e[h]>"u"||(h==="nodes"?n(m):h==="edges"?t(m):h==="minZoom"?r(m):h==="maxZoom"?s(m):h==="translateExtent"?a(m):h==="nodeExtent"?l(m):h==="ariaLabelConfig"?d.setState({ariaLabelConfig:N4t(m)}):h==="fitView"?d.setState({fitViewQueued:m}):h==="fitViewOptions"?d.setState({fitViewOptions:m}):d.setState({[h]:m})))}_.current=e},q9.map(h=>e[h])),null}function V9(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function qwt(e){var r;const[n,t]=M.useState(e==="system"?null:e);return M.useEffect(()=>{if(e!=="system"){t(e);return}const s=V9(),a=()=>t(s!=null&&s.matches?"dark":"light");return a(),s==null||s.addEventListener("change",a),()=>{s==null||s.removeEventListener("change",a)}},[e]),n!==null?n:(r=V9())!=null&&r.matches?"dark":"light"}const W9=typeof document<"u"?document:null;function kh(e=null,n={target:W9,actInsideInputWithModifier:!0}){const[t,r]=M.useState(!1),s=M.useRef(!1),a=M.useRef(new Set([])),[l,o]=M.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(h=>typeof h=="string").map(h=>h.replace("+",` +`).replace(` + +`,` ++`).split(` +`)),_=d.reduce((h,m)=>h.concat(...m),[]);return[d,_]}return[[],[]]},[e]);return M.useEffect(()=>{const c=(n==null?void 0:n.target)??W9,d=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const _=g=>{var b,v;if(s.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!s.current||s.current&&!d)&&aD(g))return!1;const k=Y9(g.code,o);if(a.current.add(g[k]),K9(l,a.current,!1)){const x=((v=(b=g.composedPath)==null?void 0:b.call(g))==null?void 0:v[0])||g.target,y=(x==null?void 0:x.nodeName)==="BUTTON"||(x==null?void 0:x.nodeName)==="A";n.preventDefault!==!1&&(s.current||!y)&&g.preventDefault(),r(!0)}},h=g=>{const S=Y9(g.code,o);K9(l,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(g[S]),g.key==="Meta"&&a.current.clear(),s.current=!1},m=()=>{a.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",_),c==null||c.addEventListener("keyup",h),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c==null||c.removeEventListener("keydown",_),c==null||c.removeEventListener("keyup",h),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,r]),t}function K9(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function Y9(e,n){return n.includes(e)?"code":"key"}const Gwt=()=>{const e=cr();return M.useMemo(()=>({zoomIn:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1.2,n):!1},zoomOut:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1/1.2,n):!1},zoomTo:async(n,t)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(n,t):!1},getZoom:()=>e.getState().transform[2],setViewport:async(n,t)=>{const{transform:[r,s,a],panZoom:l}=e.getState();return l?(await l.setViewport({x:n.x??r,y:n.y??s,zoom:n.zoom??a},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:a,maxZoom:l,panZoom:o}=e.getState(),c=J4(n,r,s,a,l,(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:a,domNode:l}=e.getState();if(!l)return n;const{x:o,y:c}=l.getBoundingClientRect(),d={x:n.x-o,y:n.y-c},_=t.snapGrid??s,h=t.snapToGrid??a;return Jh(d,r,h,_)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:a}=r.getBoundingClientRect(),l=gd(n,t);return{x:l.x+s,y:l.y+a}}}),[])};function zD(e,n){const t=[],r=new Map,s=[];for(const a of e)if(a.type==="add"){s.push(a);continue}else if(a.type==="remove"||a.type==="replace")r.set(a.id,[a]);else{const l=r.get(a.id);l?l.push(a):r.set(a.id,[a])}for(const a of n){const l=r.get(a.id);if(!l){t.push(a);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){t.push({...l[0].item});continue}const o={...a};for(const c of l)Vwt(c,o);t.push(o)}return s.length&&s.forEach(a=>{a.index!==void 0?t.splice(a.index,0,{...a.item}):t.push({...a.item})}),t}function Vwt(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 Wwt(e,n){return zD(e,n)}function Kwt(e,n){return zD(e,n)}function yc(e,n){return{id:e,type:"select",selected:n}}function qu(e,n=new Set,t=!1){const r=[];for(const[s,a]of e){const l=n.has(s);!(a.selected===void 0&&!l)&&a.selected!==l&&(t&&(a.selected=l),r.push(yc(a.id,l)))}return r}function X9({items:e=[],lookup:n}){var s;const t=[],r=new Map(e.map(a=>[a.id,a]));for(const[a,l]of e.entries()){const o=n.get(l.id),c=((s=o==null?void 0:o.internals)==null?void 0:s.userNode)??o;c!==void 0&&c!==l&&t.push({id:l.id,item:l,type:"replace"}),c===void 0&&t.push({item:l,type:"add",index:a})}for(const[a]of n)r.get(a)===void 0&&t.push({id:a,type:"remove"});return t}function Z9(e){return{id:e.id,type:"remove"}}const Ywt=nD();function Xwt(e,n,t={}){return R4t(e,n,{...t,onError:t.onError??Ywt})}const Q9=e=>v4t(e),Zwt=e=>ZR(e);function jD(e){return M.forwardRef(e)}const Qwt=typeof window<"u"?M.useLayoutEffect:M.useEffect;function J9(e){const[n,t]=M.useState(BigInt(0)),[r]=M.useState(()=>Jwt(()=>t(s=>s+BigInt(1))));return Qwt(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function Jwt(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const AD=M.createContext(null);function e5t({children:e}){const n=cr(),t=M.useCallback(o=>{const{nodes:c=[],setNodes:d,hasDefaultNodes:_,onNodesChange:h,nodeLookup:m,fitViewQueued:g,onNodesChangeMiddlewareMap:S}=n.getState();let k=c;for(const v of o)k=typeof v=="function"?v(k):v;let b=X9({items:k,lookup:m});for(const v of S.values())b=v(b);_&&d(k),b.length>0?h==null||h(b):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:x,setNodes:y}=n.getState();v&&y(x)})},[]),r=J9(t),s=M.useCallback(o=>{const{edges:c=[],setEdges:d,hasDefaultEdges:_,onEdgesChange:h,edgeLookup:m}=n.getState();let g=c;for(const S of o)g=typeof S=="function"?S(g):S;_?d(g):h&&h(X9({items:g,lookup:m}))},[]),a=J9(s),l=M.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return f.jsx(AD.Provider,{value:l,children:e})}function t5t(){const e=M.useContext(AD);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const n5t=e=>!!e.panZoom;function aw(){const e=Gwt(),n=cr(),t=t5t(),r=bn(n5t),s=M.useMemo(()=>{const a=h=>n.getState().nodeLookup.get(h),l=h=>{t.nodeQueue.push(h)},o=h=>{t.edgeQueue.push(h)},c=h=>{var v,x;const{nodeLookup:m,nodeOrigin:g}=n.getState(),S=Q9(h)?h:m.get(h.id),k=S.parentId?sD(S.position,S.measured,S.parentId,m,g):S.position,b={...S,position:k,width:((v=S.measured)==null?void 0:v.width)??S.width,height:((x=S.measured)==null?void 0:x.height)??S.height};return wh(b)},d=(h,m,g={replace:!1})=>{l(S=>S.map(k=>{if(k.id===h){const b=typeof m=="function"?m(k):m;return g.replace&&Q9(b)?b:{...k,...b}}return k}))},_=(h,m,g={replace:!1})=>{o(S=>S.map(k=>{if(k.id===h){const b=typeof m=="function"?m(k):m;return g.replace&&Zwt(b)?b:{...k,...b}}return k}))};return{getNodes:()=>n.getState().nodes.map(h=>({...h})),getNode:h=>{var m;return(m=a(h))==null?void 0:m.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:h=[]}=n.getState();return h.map(m=>({...m}))},getEdge:h=>n.getState().edgeLookup.get(h),setNodes:l,setEdges:o,addNodes:h=>{const m=Array.isArray(h)?h:[h];t.nodeQueue.push(g=>[...g,...m])},addEdges:h=>{const m=Array.isArray(h)?h:[h];t.edgeQueue.push(g=>[...g,...m])},toObject:()=>{const{nodes:h=[],edges:m=[],transform:g}=n.getState(),[S,k,b]=g;return{nodes:h.map(v=>({...v})),edges:m.map(v=>({...v})),viewport:{x:S,y:k,zoom:b}}},deleteElements:async({nodes:h=[],edges:m=[]})=>{const{nodes:g,edges:S,onNodesDelete:k,onEdgesDelete:b,triggerNodeChanges:v,triggerEdgeChanges:x,onDelete:y,onBeforeDelete:C}=n.getState(),{nodes:j,edges:N}=await S4t({nodesToRemove:h,edgesToRemove:m,nodes:g,edges:S,onBeforeDelete:C}),T=N.length>0,z=j.length>0;if(T){const D=N.map(Z9);b==null||b(N),x(D)}if(z){const D=j.map(Z9);k==null||k(j),v(D)}return(z||T)&&(y==null||y({nodes:j,edges:N})),{deletedNodes:j,deletedEdges:N}},getIntersectingNodes:(h,m=!0,g)=>{const S=S9(h),k=S?h:c(h),b=g!==void 0;return k?(g||n.getState().nodes).filter(v=>{const x=n.getState().nodeLookup.get(v.id);if(x&&!S&&(v.id===h.id||!x.internals.positionAbsolute))return!1;const y=wh(b?v:x),C=Vp(y,k);return m&&C>0||C>=y.width*y.height||C>=k.width*k.height}):[]},isNodeIntersecting:(h,m,g=!0)=>{const k=S9(h)?h:c(h);if(!k)return!1;const b=Vp(k,m);return g&&b>0||b>=m.width*m.height||b>=k.width*k.height},updateNode:d,updateNodeData:(h,m,g={replace:!1})=>{d(h,S=>{const k=typeof m=="function"?m(S):m;return g.replace?{...S,data:k}:{...S,data:{...S.data,...k}}},g)},updateEdge:_,updateEdgeData:(h,m,g={replace:!1})=>{_(h,S=>{const k=typeof m=="function"?m(S):m;return g.replace?{...S,data:k}:{...S,data:{...S.data,...k}}},g)},getNodesBounds:h=>{const{nodeLookup:m,nodeOrigin:g}=n.getState();return b4t(h,{nodeLookup:m,nodeOrigin:g})},getHandleConnections:({type:h,id:m,nodeId:g})=>{var S;return Array.from(((S=n.getState().connectionLookup.get(`${g}-${h}${m?`-${m}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:h,handleId:m,nodeId:g})=>{var S;return Array.from(((S=n.getState().connectionLookup.get(`${g}${h?m?`-${h}-${m}`:`-${h}`:""}`))==null?void 0:S.values())??[])},fitView:async h=>{const m=n.getState().fitViewResolver??E4t();return n.setState({fitViewQueued:!0,fitViewOptions:h,fitViewResolver:m}),t.nodeQueue.push(g=>[...g]),m.promise}}},[]);return M.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const eE=e=>e.selected,r5t=typeof window<"u"?window:void 0;function s5t({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=cr(),{deleteElements:r}=aw(),s=kh(e,{actInsideInputWithModifier:!1}),a=kh(n,{target:r5t});M.useEffect(()=>{if(s){const{edges:l,nodes:o}=t.getState();r({nodes:o.filter(eE),edges:l.filter(eE)}),t.setState({nodesSelectionActive:!1})}},[s]),M.useEffect(()=>{t.setState({multiSelectionActive:a})},[a])}function i5t(e){const n=cr();M.useEffect(()=>{const t=()=>{var s,a,l,o;if(!e.current||!(((a=(s=e.current).checkVisibility)==null?void 0:a.call(s))??!0))return!1;const r=ew(e.current);(r.height===0||r.width===0)&&((o=(l=n.getState()).onError)==null||o.call(l,"004",aa.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 tg={position:"absolute",width:"100%",height:"100%",top:0,left:0},a5t=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function o5t({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:a=Mc.Free,zoomOnDoubleClick:l=!0,panOnDrag:o=!0,defaultViewport:c,translateExtent:d,minZoom:_,maxZoom:h,zoomActivationKeyCode:m,preventScrolling:g=!0,children:S,noWheelClassName:k,noPanClassName:b,onViewportChange:v,isControlledViewport:x,paneClickDistance:y,selectionOnDrag:C}){const j=cr(),N=M.useRef(null),{userSelectionActive:T,lib:z,connectionInProgress:D}=bn(a5t,or),O=kh(m),H=M.useRef();i5t(N);const P=M.useCallback(F=>{v==null||v({x:F[0],y:F[1],zoom:F[2]}),x||j.setState({transform:F})},[v,x]);return M.useEffect(()=>{if(N.current){H.current=cwt({domNode:N.current,minZoom:_,maxZoom:h,translateExtent:d,viewport:c,onDraggingChange:U=>j.setState(X=>X.paneDragging===U?X:{paneDragging:U}),onPanZoomStart:(U,X)=>{const{onViewportChangeStart:J,onMoveStart:$}=j.getState();$==null||$(U,X),J==null||J(X)},onPanZoom:(U,X)=>{const{onViewportChange:J,onMove:$}=j.getState();$==null||$(U,X),J==null||J(X)},onPanZoomEnd:(U,X)=>{const{onViewportChangeEnd:J,onMoveEnd:$}=j.getState();$==null||$(U,X),J==null||J(X)}});const{x:F,y:W,zoom:Z}=H.current.getViewport();return j.setState({panZoom:H.current,transform:[F,W,Z],domNode:N.current.closest(".react-flow")}),()=>{var U;(U=H.current)==null||U.destroy()}}},[]),M.useEffect(()=>{var F;(F=H.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:a,zoomOnDoubleClick:l,panOnDrag:o,zoomActivationKeyPressed:O,preventScrolling:g,noPanClassName:b,userSelectionActive:T,noWheelClassName:k,lib:z,onTransformChange:P,connectionInProgress:D,selectionOnDrag:C,paneClickDistance:y})},[e,n,t,r,s,a,l,o,O,g,b,T,k,z,P,D,C,y]),f.jsx("div",{className:"react-flow__renderer",ref:N,style:tg,children:S})}const l5t=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function c5t(){const{userSelectionActive:e,userSelectionRect:n}=bn(l5t,or);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 Mb=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},u5t=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function d5t({isSelecting:e,selectionKeyPressed:n,selectionMode:t=yh.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:a,selectionOnDrag:l,onSelectionStart:o,onSelectionEnd:c,onPaneClick:d,onPaneContextMenu:_,onPaneScroll:h,onPaneMouseEnter:m,onPaneMouseMove:g,onPaneMouseLeave:S,children:k}){const b=M.useRef(0),v=cr(),{userSelectionActive:x,elementsSelectable:y,dragging:C,panBy:j,autoPanSpeed:N}=bn(u5t,or),T=y&&(e||x),z=M.useRef(null),D=M.useRef(),O=M.useRef(new Set),H=M.useRef(new Set),P=M.useRef(!1),F=M.useRef(!1),W=M.useRef({x:0,y:0}),Z=M.useRef(!1),U=q=>{if(F.current||P.current||v.getState().connection.inProgress){F.current=!1,P.current=!1;return}d==null||d(q),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},X=q=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){q.preventDefault();return}_==null||_(q)},J=h?q=>h(q):void 0,$=q=>{F.current&&(q.stopPropagation(),F.current=!1)},L=q=>{var He,Bt;const{domNode:oe,transform:ce}=v.getState();if(D.current=oe==null?void 0:oe.getBoundingClientRect(),!D.current)return;const _e=q.target===z.current;if(!_e&&!!q.target.closest(".nokey")||!e||!(l&&_e||n)||q.button!==0||!q.isPrimary)return;(Bt=(He=q.target)==null?void 0:He.setPointerCapture)==null||Bt.call(He,q.pointerId),F.current=!1;const{x:Ce,y:Le}=na(q.nativeEvent,D.current),Ue=Jh({x:Ce,y:Le},ce);v.setState({userSelectionRect:{width:0,height:0,startX:Ue.x,startY:Ue.y,x:Ce,y:Le}}),_e||(q.stopPropagation(),q.preventDefault())};function B(q,oe){const{userSelectionRect:ce}=v.getState();if(!ce)return;const{transform:_e,nodeLookup:de,edgeLookup:ve,connectionLookup:Ce,triggerNodeChanges:Le,triggerEdgeChanges:Ue,defaultEdgeOptions:He}=v.getState(),Bt={x:ce.startX,y:ce.startY},{x:Et,y:Nt}=gd(Bt,_e),cn={startX:Bt.x,startY:Bt.y,x:qqt.id)),H.current=new Set;const Je=(He==null?void 0:He.selectable)??!0;for(const qt of O.current){const we=Ce.get(qt);if(we)for(const{edgeId:Oe}of we.values()){const Xe=ve.get(Oe);Xe&&(Xe.selectable??Je)&&H.current.add(Oe)}}if(!k9(vt,O.current)){const qt=qu(de,O.current,!0);Le(qt)}if(!k9(rt,H.current)){const qt=qu(ve,H.current);Ue(qt)}v.setState({userSelectionRect:cn,userSelectionActive:!0,nodesSelectionActive:!1})}function Y(){if(!s||!D.current)return;const[q,oe]=Q4(W.current,D.current,N);j({x:q,y:oe}).then(ce=>{if(!F.current||!ce){b.current=requestAnimationFrame(Y);return}const{x:_e,y:de}=W.current;B(_e,de),b.current=requestAnimationFrame(Y)})}const V=()=>{cancelAnimationFrame(b.current),b.current=0,Z.current=!1};M.useEffect(()=>()=>V(),[]);const ie=q=>{const{userSelectionRect:oe,transform:ce,resetSelectedElements:_e}=v.getState();if(!D.current||!oe)return;const{x:de,y:ve}=na(q.nativeEvent,D.current);W.current={x:de,y:ve};const Ce=gd({x:oe.startX,y:oe.startY},ce);if(!F.current){const Le=n?0:a;if(Math.hypot(de-Ce.x,ve-Ce.y)<=Le)return;_e(),o==null||o(q)}F.current=!0,Z.current||(Y(),Z.current=!0),B(de,ve)},le=q=>{var oe,ce;if(!T){q.target===z.current&&v.getState().connection.inProgress&&(P.current=!0);return}q.button===0&&((ce=(oe=q.target)==null?void 0:oe.releasePointerCapture)==null||ce.call(oe,q.pointerId),!x&&q.target===z.current&&v.getState().userSelectionRect&&(U==null||U(q)),v.setState({userSelectionActive:!1,userSelectionRect:null}),F.current&&(c==null||c(q),v.setState({nodesSelectionActive:O.current.size>0})),V())},ae=q=>{var oe,ce;(ce=(oe=q.target)==null?void 0:oe.releasePointerCapture)==null||ce.call(oe,q.pointerId),V()},re=r===!0||Array.isArray(r)&&r.includes(0);return f.jsxs("div",{className:Fr(["react-flow__pane",{draggable:re,dragging:C,selection:e}]),onClick:T?void 0:Mb(U,z),onContextMenu:Mb(X,z),onWheel:Mb(J,z),onPointerEnter:T?void 0:m,onPointerMove:T?ie:g,onPointerUp:le,onPointerCancel:T?ae:void 0,onPointerDownCapture:T?L:void 0,onClickCapture:T?$:void 0,onPointerLeave:S,ref:z,style:tg,children:[k,f.jsx(c5t,{})]})}function kx({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:a,multiSelectionActive:l,nodeLookup:o,onError:c}=n.getState(),d=o.get(e);if(!d){c==null||c("012",aa.error012(e));return}n.setState({nodesSelectionActive:!1}),d.selected?(t||d.selected&&l)&&(a({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var _;return(_=r==null?void 0:r.current)==null?void 0:_.blur()})):s([e])}function TD({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:a,nodeClickDistance:l}){const o=cr(),[c,d]=M.useState(!1),_=M.useRef();return M.useEffect(()=>{_.current=Y4t({getStoreItems:()=>o.getState(),onNodeMouseDown:h=>{kx({id:h,store:o,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),M.useEffect(()=>{if(!(n||!e.current||!_.current))return _.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:s,nodeClickDistance:l}),()=>{var h;(h=_.current)==null||h.destroy()}},[t,r,n,a,e,s,l]),c}const f5t=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function MD(){const e=cr();return M.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:a,nodesDraggable:l,onError:o,updateNodePositions:c,nodeLookup:d,nodeOrigin:_}=e.getState(),h=new Map,m=f5t(l),g=s?a[0]:5,S=s?a[1]:5,k=t.direction.x*g*t.factor,b=t.direction.y*S*t.factor;for(const[,v]of d){if(!m(v))continue;let x={x:v.internals.positionAbsolute.x+k,y:v.internals.positionAbsolute.y+b};s&&(x=Qh(x,a));const{position:y,positionAbsolute:C}=QR({nodeId:v.id,nextPosition:x,nodeLookup:d,nodeExtent:r,nodeOrigin:_,onError:o});v.position=y,v.internals.positionAbsolute=C,h.set(v.id,v)}c(h)},[])}const ow=M.createContext(null),h5t=ow.Provider;ow.Consumer;const RD=()=>M.useContext(ow),_5t=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),DD=M.createContext(null);function p5t({children:e}){const n=bn(_5t,or);return f.jsx(DD.Provider,{value:n,children:e})}function m5t(){const e=M.useContext(DD);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const g5t={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},v5t=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:a,connection:l}=r,{fromHandle:o,toHandle:c,isValid:d}=l;if(!o&&!s)return g5t;const _=(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:_,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:a===pd.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:_&&d}};function b5t({type:e="source",position:n=xt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:a=!0,id:l,onConnect:o,children:c,className:d,onMouseDown:_,onTouchStart:h,...m},g){var Z,U;const S=l||null,k=e==="target",b=cr(),v=RD(),{connectOnClick:x,noPanClassName:y,rfId:C}=m5t(),{connectingFrom:j,connectingTo:N,clickConnecting:T,isPossibleEndHandle:z,connectionInProcess:D,clickConnectionInProcess:O,valid:H}=bn(v5t(v,S,e),or);v||(U=(Z=b.getState()).onError)==null||U.call(Z,"010",aa.error010());const P=X=>{const{defaultEdgeOptions:J,onConnect:$,hasDefaultEdges:L}=b.getState(),B={...J,...X};if(L){const{edges:Y,setEdges:V,onError:ie}=b.getState();V(Xwt(B,Y,{onError:ie}))}$==null||$(B),o==null||o(B)},F=X=>{if(!v)return;const J=oD(X.nativeEvent);if(s&&(J&&X.button===0||!J)){const $=b.getState();Sx.onPointerDown(X.nativeEvent,{handleDomNode:X.currentTarget,autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:k,handleId:S,nodeId:v,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:(...L)=>{var B,Y;return(Y=(B=b.getState()).onConnectEnd)==null?void 0:Y.call(B,...L)},updateConnection:$.updateConnection,onConnect:P,isValidConnection:t||((...L)=>{var B,Y;return((Y=(B=b.getState()).isValidConnection)==null?void 0:Y.call(B,...L))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}J?_==null||_(X):h==null||h(X)},W=X=>{const{onClickConnectStart:J,onClickConnectEnd:$,connectionClickStartHandle:L,connectionMode:B,isValidConnection:Y,lib:V,rfId:ie,nodeLookup:le,connection:ae}=b.getState();if(!v||!L&&!s)return;if(!L){J==null||J(X.nativeEvent,{nodeId:v,handleId:S,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:v,type:e,id:S}});return}const re=iD(X.target),q=t||Y,{connection:oe,isValid:ce}=Sx.isValid(X.nativeEvent,{handle:{nodeId:v,id:S,type:e},connectionMode:B,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:q,flowId:ie,doc:re,lib:V,nodeLookup:le});ce&&oe&&P(oe);const _e=structuredClone(ae);delete _e.inProgress,_e.toPosition=_e.toHandle?_e.toHandle.position:null,$==null||$(X,_e),b.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":S,"data-nodeid":v,"data-handlepos":n,"data-id":`${C}-${v}-${S}-${e}`,className:Fr(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",y,d,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:a,clickconnecting:T,connectingfrom:j,connectingto:N,valid:H,connectionindicator:r&&(!D||z)&&(D||O?a:s)}]),onMouseDown:F,onTouchStart:F,onClick:x?W:void 0,ref:g,...m,children:c})}const Dl=M.memo(jD(b5t));function x5t({data:e,isConnectable:n,sourcePosition:t=xt.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(Dl,{type:"source",position:t,isConnectable:n})]})}function y5t({data:e,isConnectable:n,targetPosition:t=xt.Top,sourcePosition:r=xt.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(Dl,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,f.jsx(Dl,{type:"source",position:r,isConnectable:n})]})}function w5t(){return null}function S5t({data:e,isConnectable:n,targetPosition:t=xt.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(Dl,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Wp={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},tE={input:x5t,default:y5t,output:S5t,group:w5t};function k5t(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 C5t=e=>{const{width:n,height:t,x:r,y:s}=Zh(e.nodeLookup,{filter:a=>!!a.selected});return{width:ta(n)?n:null,height:ta(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 E5t({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=cr(),{width:s,height:a,transformString:l,userSelectionActive:o}=bn(C5t,or),c=MD(),d=M.useRef(null);M.useEffect(()=>{var g;t||(g=d.current)==null||g.focus({preventScroll:!0})},[t]);const _=!o&&s!==null&&a!==null;if(TD({nodeRef:d,disabled:!_}),!_)return null;const h=e?g=>{const S=r.getState().nodes.filter(k=>k.selected);e(g,S)}:void 0,m=g=>{Object.prototype.hasOwnProperty.call(Wp,g.key)&&(g.preventDefault(),c({direction:Wp[g.key],factor:g.shiftKey?4:1}))};return f.jsx("div",{className:Fr(["react-flow__nodesselection","react-flow__container",n]),style:{transform:l},children:f.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:t?void 0:-1,onKeyDown:t?void 0:m,style:{width:s,height:a}})})}const nE=typeof window<"u"?window:void 0,N5t=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function LD({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:l,paneClickDistance:o,deleteKeyCode:c,selectionKeyCode:d,selectionOnDrag:_,selectionMode:h,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:S,panActivationKeyCode:k,zoomActivationKeyCode:b,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:C,panOnScrollSpeed:j,panOnScrollMode:N,zoomOnDoubleClick:T,panOnDrag:z,autoPanOnSelection:D,defaultViewport:O,translateExtent:H,minZoom:P,maxZoom:F,preventScrolling:W,onSelectionContextMenu:Z,noWheelClassName:U,noPanClassName:X,disableKeyboardA11y:J,onViewportChange:$,isControlledViewport:L}){const{nodesSelectionActive:B,userSelectionActive:Y}=bn(N5t,or),V=kh(d,{target:nE}),ie=kh(k,{target:nE}),le=ie||z,ae=ie||C,re=_&&le!==!0,q=V||Y||re;return s5t({deleteKeyCode:c,multiSelectionKeyCode:S}),f.jsx(o5t,{onPaneContextMenu:a,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:ae,panOnScrollSpeed:j,panOnScrollMode:N,zoomOnDoubleClick:T,panOnDrag:!V&&le,defaultViewport:O,translateExtent:H,minZoom:P,maxZoom:F,zoomActivationKeyCode:b,preventScrolling:W,noWheelClassName:U,noPanClassName:X,onViewportChange:$,isControlledViewport:L,paneClickDistance:o,selectionOnDrag:re,children:f.jsxs(d5t,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:le,autoPanOnSelection:D,isSelecting:!!q,selectionMode:h,selectionKeyPressed:V,paneClickDistance:o,selectionOnDrag:re,children:[e,B&&f.jsx(E5t,{onSelectionContextMenu:Z,noPanClassName:X,disableKeyboardA11y:J})]})})}LD.displayName="FlowRenderer";const z5t=M.memo(LD),j5t=e=>n=>e?Z4(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 A5t(e){return bn(M.useCallback(j5t(e),[e]),or)}const T5t=e=>e.updateNodeInternals;function M5t(){const e=bn(T5t),[n]=M.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(t=>{const r=new Map;t.forEach(s=>{const a=s.target.getAttribute("data-id");r.set(a,{id:a,nodeElement:s.target,force:!0})}),e(r)}));return M.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function R5t({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=cr(),a=M.useRef(null),l=M.useRef(null),o=M.useRef(e.sourcePosition),c=M.useRef(e.targetPosition),d=M.useRef(n),_=t&&!!e.internals.handleBounds;return M.useEffect(()=>{a.current&&!e.hidden&&(!_||l.current!==a.current)&&(l.current&&(r==null||r.unobserve(l.current)),r==null||r.observe(a.current),l.current=a.current)},[_,e.hidden]),M.useEffect(()=>()=>{l.current&&(r==null||r.unobserve(l.current),l.current=null)},[]),M.useEffect(()=>{if(a.current){const h=d.current!==n,m=o.current!==e.sourcePosition,g=c.current!==e.targetPosition;(h||m||g)&&(d.current=n,o.current=e.sourcePosition,c.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),a}function D5t({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:a,onDoubleClick:l,nodesDraggable:o,elementsSelectable:c,nodesConnectable:d,nodesFocusable:_,resizeObserver:h,noDragClassName:m,noPanClassName:g,disableKeyboardA11y:S,rfId:k,nodeTypes:b,nodeClickDistance:v,onError:x}){const{node:y,internals:C,isParent:j}=bn(q=>{const oe=q.nodeLookup.get(e),ce=q.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:ce}},or);let N=y.type||"default",T=(b==null?void 0:b[N])||tE[N];T===void 0&&(x==null||x("003",aa.error003(N)),N="default",T=(b==null?void 0:b.default)||tE.default);const z=!!(y.draggable||o&&typeof y.draggable>"u"),D=!!(y.selectable||c&&typeof y.selectable>"u"),O=!!(y.connectable||d&&typeof y.connectable>"u"),H=!!(y.focusable||_&&typeof y.focusable>"u"),P=cr(),F=rD(y),W=R5t({node:y,nodeType:N,hasDimensions:F,resizeObserver:h}),Z=TD({nodeRef:W,disabled:y.hidden||!z,noDragClassName:m,handleSelector:y.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:v}),U=MD();if(y.hidden)return null;const X=Do(y),J=k5t(y),$=D||z||n||t||r||s,L=t?q=>t(q,{...C.userNode}):void 0,B=r?q=>r(q,{...C.userNode}):void 0,Y=s?q=>s(q,{...C.userNode}):void 0,V=a?q=>a(q,{...C.userNode}):void 0,ie=l?q=>l(q,{...C.userNode}):void 0,le=q=>{const{selectNodesOnDrag:oe,nodeDragThreshold:ce}=P.getState();D&&(!oe||!z||ce>0)&&kx({id:e,store:P,nodeRef:W}),n&&n(q,{...C.userNode})},ae=q=>{if(!(aD(q.nativeEvent)||S)){if(WR.includes(q.key)&&D){const oe=q.key==="Escape";kx({id:e,store:P,unselect:oe,nodeRef:W})}else if(z&&y.selected&&Object.prototype.hasOwnProperty.call(Wp,q.key)){q.preventDefault();const{ariaLabelConfig:oe}=P.getState();P.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:q.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),U({direction:Wp[q.key],factor:q.shiftKey?4:1})}}},re=()=>{var Ce;if(S||!((Ce=W.current)!=null&&Ce.matches(":focus-visible")))return;const{transform:q,width:oe,height:ce,autoPanOnNodeFocus:_e,setCenter:de}=P.getState();if(!_e)return;Z4(new Map([[e,y]]),{x:0,y:0,width:oe,height:ce},q,!0).length>0||de(y.position.x+X.width/2,y.position.y+X.height/2,{zoom:q[2]})};return f.jsx("div",{className:Fr(["react-flow__node",`react-flow__node-${N}`,{[g]:z},y.className,{selected:y.selected,selectable:D,parent:j,draggable:z,dragging:Z}]),ref:W,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:F?"visible":"hidden",...y.style,...J},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:B,onMouseLeave:Y,onContextMenu:V,onClick:le,onDoubleClick:ie,onKeyDown:H?ae:void 0,tabIndex:H?0:void 0,onFocus:H?re:void 0,role:y.ariaRole??(H?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${CD}-${k}`,"aria-label":y.ariaLabel,...y.domAttributes,children:f.jsx(h5t,{value:e,children:f.jsx(T,{id:e,data:y.data,type:N,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:y.selected??!1,selectable:D,draggable:z,deletable:y.deletable??!0,isConnectable:O,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:Z,dragHandle:y.dragHandle,zIndex:C.z,parentId:y.parentId,...X})})})}var L5t=M.memo(D5t);const O5t=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function OD(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:a}=bn(O5t,or),l=A5t(e.onlyRenderVisibleElements),o=M5t();return f.jsx("div",{className:"react-flow__nodes",style:tg,children:l.map(c=>f.jsx(L5t,{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:a},c))})}OD.displayName="NodeRenderer";const I5t=M.memo(OD);function B5t(e){return bn(M.useCallback(t=>{if(!e)return t.edges.map(s=>s.id);const r=[];if(t.width&&t.height)for(const s of t.edges){const a=t.nodeLookup.get(s.source),l=t.nodeLookup.get(s.target);a&&l&&A4t({sourceNode:a,targetNode:l,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),or)}const $5t=({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"})},H5t=({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"})},rE={[qp.Arrow]:$5t,[qp.ArrowClosed]:H5t};function P5t(e){const n=cr();return M.useMemo(()=>{var s,a;return Object.prototype.hasOwnProperty.call(rE,e)?rE[e]:((a=(s=n.getState()).onError)==null||a.call(s,"009",aa.error009(e)),null)},[e])}const F5t=({id:e,type:n,color:t,width:r=12.5,height:s=12.5,markerUnits:a="strokeWidth",strokeWidth:l,orient:o="auto-start-reverse"})=>{const c=P5t(n);return c?f.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:o,refX:"0",refY:"0",children:f.jsx(c,{color:t,strokeWidth:l})}):null},ID=({defaultColor:e,rfId:n})=>{const t=bn(a=>a.edges),r=bn(a=>a.defaultEdgeOptions),s=M.useMemo(()=>B4t(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(a=>f.jsx(F5t,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};ID.displayName="MarkerDefinitions";var U5t=M.memo(ID);function BD({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:a,labelBgPadding:l=[2,4],labelBgBorderRadius:o=2,children:c,className:d,..._}){const[h,m]=M.useState({x:1,y:0,width:0,height:0}),g=Fr(["react-flow__edge-textwrapper",d]),S=M.useRef(null);return M.useEffect(()=>{if(S.current){const k=S.current.getBBox();m({x:k.x,y:k.y,width:k.width,height:k.height})}},[t]),t?f.jsxs("g",{transform:`translate(${e-h.width/2} ${n-h.height/2})`,className:g,visibility:h.width?"visible":"hidden",..._,children:[s&&f.jsx("rect",{width:h.width+2*l[0],x:-l[0],y:-l[1],height:h.height+2*l[1],className:"react-flow__edge-textbg",style:a,rx:o,ry:o}),f.jsx("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:S,style:r,children:t}),c]}):null}BD.displayName="EdgeText";const q5t=M.memo(BD);function ng({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:o,labelBgBorderRadius:c,interactionWidth:d=20,..._}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{..._,d:e,fill:"none",className:Fr(["react-flow__edge-path",_.className])}),d?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,r&&ta(n)&&ta(t)?f.jsx(q5t,{x:n,y:t,label:r,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:o,labelBgBorderRadius:c}):null]})}function sE({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===xt.Left||e===xt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function $D({sourceX:e,sourceY:n,sourcePosition:t=xt.Bottom,targetX:r,targetY:s,targetPosition:a=xt.Top}){const[l,o]=sE({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,d]=sE({pos:a,x1:r,y1:s,x2:e,y2:n}),[_,h,m,g]=lD({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:l,sourceControlY:o,targetControlX:c,targetControlY:d});return[`M${e},${n} C${l},${o} ${c},${d} ${r},${s}`,_,h,m,g]}function HD(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,sourcePosition:l,targetPosition:o,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:v})=>{const[x,y,C]=$D({sourceX:t,sourceY:r,sourcePosition:l,targetX:s,targetY:a,targetPosition:o}),j=e.isInternal?void 0:n;return f.jsx(ng,{id:j,path:x,labelX:y,labelY:C,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:v})})}const G5t=HD({isInternal:!1}),PD=HD({isInternal:!0});G5t.displayName="SimpleBezierEdge";PD.displayName="SimpleBezierEdgeInternal";function FD(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,label:l,labelStyle:o,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:h,style:m,sourcePosition:g=xt.Bottom,targetPosition:S=xt.Top,markerEnd:k,markerStart:b,pathOptions:v,interactionWidth:x})=>{const[y,C,j]=xx({sourceX:t,sourceY:r,sourcePosition:g,targetX:s,targetY:a,targetPosition:S,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset,stepPosition:v==null?void 0:v.stepPosition}),N=e.isInternal?void 0:n;return f.jsx(ng,{id:N,path:y,labelX:C,labelY:j,label:l,labelStyle:o,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:h,style:m,markerEnd:k,markerStart:b,interactionWidth:x})})}const UD=FD({isInternal:!1}),qD=FD({isInternal:!0});UD.displayName="SmoothStepEdge";qD.displayName="SmoothStepEdgeInternal";function GD(e){return M.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return f.jsx(UD,{...t,id:r,pathOptions:M.useMemo(()=>{var a;return{borderRadius:0,offset:(a=t.pathOptions)==null?void 0:a.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const V5t=GD({isInternal:!1}),VD=GD({isInternal:!0});V5t.displayName="StepEdge";VD.displayName="StepEdgeInternal";function WD(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,label:l,labelStyle:o,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:h,style:m,markerEnd:g,markerStart:S,interactionWidth:k})=>{const[b,v,x]=dD({sourceX:t,sourceY:r,targetX:s,targetY:a}),y=e.isInternal?void 0:n;return f.jsx(ng,{id:y,path:b,labelX:v,labelY:x,label:l,labelStyle:o,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:h,style:m,markerEnd:g,markerStart:S,interactionWidth:k})})}const W5t=WD({isInternal:!1}),KD=WD({isInternal:!0});W5t.displayName="StraightEdge";KD.displayName="StraightEdgeInternal";function YD(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,sourcePosition:l=xt.Bottom,targetPosition:o=xt.Top,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,pathOptions:v,interactionWidth:x})=>{const[y,C,j]=cD({sourceX:t,sourceY:r,sourcePosition:l,targetX:s,targetY:a,targetPosition:o,curvature:v==null?void 0:v.curvature}),N=e.isInternal?void 0:n;return f.jsx(ng,{id:N,path:y,labelX:C,labelY:j,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:x})})}const K5t=YD({isInternal:!1}),XD=YD({isInternal:!0});K5t.displayName="BezierEdge";XD.displayName="BezierEdgeInternal";const iE={default:XD,straight:KD,step:VD,smoothstep:qD,simplebezier:PD},aE={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},Y5t=(e,n,t)=>t===xt.Left?e-n:t===xt.Right?e+n:e,X5t=(e,n,t)=>t===xt.Top?e-n:t===xt.Bottom?e+n:e,oE="react-flow__edgeupdater";function lE({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:a,onMouseOut:l,type:o}){return f.jsx("circle",{onMouseDown:s,onMouseEnter:a,onMouseOut:l,className:Fr([oE,`${oE}-${o}`]),cx:Y5t(n,r,e),cy:X5t(t,r,e),r,stroke:"transparent",fill:"transparent"})}function Z5t({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:a,targetY:l,sourcePosition:o,targetPosition:c,onReconnect:d,onReconnectStart:_,onReconnectEnd:h,setReconnecting:m,setUpdateHover:g}){const S=cr(),k=(C,j)=>{if(C.button!==0)return;const{autoPanOnConnect:N,domNode:T,connectionMode:z,connectionRadius:D,lib:O,onConnectStart:H,cancelConnection:P,nodeLookup:F,rfId:W,panBy:Z,updateConnection:U}=S.getState(),X=j.type==="target",J=(B,Y)=>{m(!1),h==null||h(B,t,j.type,Y)},$=B=>d==null?void 0:d(t,B),L=(B,Y)=>{m(!0),_==null||_(C,t,j.type),H==null||H(B,Y)};Sx.onPointerDown(C.nativeEvent,{autoPanOnConnect:N,connectionMode:z,connectionRadius:D,domNode:T,handleId:j.id,nodeId:j.nodeId,nodeLookup:F,isTarget:X,edgeUpdaterType:j.type,lib:O,flowId:W,cancelConnection:P,panBy:Z,isValidConnection:(...B)=>{var Y,V;return((V=(Y=S.getState()).isValidConnection)==null?void 0:V.call(Y,...B))??!0},onConnect:$,onConnectStart:L,onConnectEnd:(...B)=>{var Y,V;return(V=(Y=S.getState()).onConnectEnd)==null?void 0:V.call(Y,...B)},onReconnectEnd:J,updateConnection:U,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},b=C=>k(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),v=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),x=()=>g(!0),y=()=>g(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(lE,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:b,onMouseEnter:x,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&f.jsx(lE,{position:c,centerX:a,centerY:l,radius:n,onMouseDown:v,onMouseEnter:x,onMouseOut:y,type:"target"})]})}function Q5t({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:a,onContextMenu:l,onMouseEnter:o,onMouseMove:c,onMouseLeave:d,reconnectRadius:_,onReconnect:h,onReconnectStart:m,onReconnectEnd:g,rfId:S,edgeTypes:k,noPanClassName:b,onError:v,disableKeyboardA11y:x}){let y=bn(de=>de.edgeLookup.get(e));const C=bn(de=>de.defaultEdgeOptions);y=C?{...C,...y}:y;let j=y.type||"default",N=(k==null?void 0:k[j])||iE[j];N===void 0&&(v==null||v("011",aa.error011(j)),j="default",N=(k==null?void 0:k.default)||iE.default);const T=!!(y.focusable||n&&typeof y.focusable>"u"),z=typeof h<"u"&&(y.reconnectable||t&&typeof y.reconnectable>"u"),D=!!(y.selectable||r&&typeof y.selectable>"u"),O=M.useRef(null),[H,P]=M.useState(!1),[F,W]=M.useState(!1),Z=cr(),{zIndex:U=y.zIndex,sourceX:X,sourceY:J,targetX:$,targetY:L,sourcePosition:B,targetPosition:Y}=bn(M.useCallback(de=>{const ve=de.nodeLookup.get(y.source),Ce=de.nodeLookup.get(y.target);if(!ve||!Ce)return aE;const Le=I4t({id:e,sourceNode:ve,targetNode:Ce,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:de.connectionMode,onError:v}),Ue=j4t({selected:y.selected,zIndex:y.zIndex,sourceNode:ve,targetNode:Ce,elevateOnSelect:de.elevateEdgesOnSelect,zIndexMode:de.zIndexMode});return{...Le||aE,zIndex:Ue}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),or),V=M.useMemo(()=>y.markerStart?`url('#${yx(y.markerStart,S)}')`:void 0,[y.markerStart,S]),ie=M.useMemo(()=>y.markerEnd?`url('#${yx(y.markerEnd,S)}')`:void 0,[y.markerEnd,S]);if(y.hidden||X===null||J===null||$===null||L===null)return null;const le=de=>{var Ue;const{addSelectedEdges:ve,unselectNodesAndEdges:Ce,multiSelectionActive:Le}=Z.getState();D&&(Z.setState({nodesSelectionActive:!1}),y.selected&&Le?(Ce({nodes:[],edges:[y]}),(Ue=O.current)==null||Ue.blur()):ve([e])),s&&s(de,y)},ae=a?de=>{a(de,{...y})}:void 0,re=l?de=>{l(de,{...y})}:void 0,q=o?de=>{o(de,{...y})}:void 0,oe=c?de=>{c(de,{...y})}:void 0,ce=d?de=>{d(de,{...y})}:void 0,_e=de=>{var ve;if(!x&&WR.includes(de.key)&&D){const{unselectNodesAndEdges:Ce,addSelectedEdges:Le}=Z.getState();de.key==="Escape"?((ve=O.current)==null||ve.blur(),Ce({edges:[y]})):Le([e])}};return f.jsx("svg",{style:{zIndex:U},children:f.jsxs("g",{className:Fr(["react-flow__edge",`react-flow__edge-${j}`,y.className,b,{selected:y.selected,animated:y.animated,inactive:!D&&!s,updating:H,selectable:D}]),onClick:le,onDoubleClick:ae,onContextMenu:re,onMouseEnter:q,onMouseMove:oe,onMouseLeave:ce,onKeyDown:T?_e: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?`${ED}-${S}`:void 0,ref:O,...y.domAttributes,children:[!F&&f.jsx(N,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:D,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:X,sourceY:J,targetX:$,targetY:L,sourcePosition:B,targetPosition:Y,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:V,markerEnd:ie,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),z&&f.jsx(Z5t,{edge:y,isReconnectable:z,reconnectRadius:_,onReconnect:h,onReconnectStart:m,onReconnectEnd:g,sourceX:X,sourceY:J,targetX:$,targetY:L,sourcePosition:B,targetPosition:Y,setUpdateHover:P,setReconnecting:W})]})})}var J5t=M.memo(Q5t);const e3t=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function ZD({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:a,onEdgeContextMenu:l,onEdgeMouseEnter:o,onEdgeMouseMove:c,onEdgeMouseLeave:d,onEdgeClick:_,reconnectRadius:h,onEdgeDoubleClick:m,onReconnectStart:g,onReconnectEnd:S,disableKeyboardA11y:k}){const{edgesFocusable:b,edgesReconnectable:v,elementsSelectable:x,onError:y}=bn(e3t,or),C=B5t(n);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(U5t,{defaultColor:e,rfId:t}),C.map(j=>f.jsx(J5t,{id:j,edgesFocusable:b,edgesReconnectable:v,elementsSelectable:x,noPanClassName:s,onReconnect:a,onContextMenu:l,onMouseEnter:o,onMouseMove:c,onMouseLeave:d,onClick:_,reconnectRadius:h,onDoubleClick:m,onReconnectStart:g,onReconnectEnd:S,rfId:t,onError:y,edgeTypes:r,disableKeyboardA11y:k},j))]})}ZD.displayName="EdgeRenderer";const t3t=M.memo(ZD),n3t=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function r3t({children:e}){const n=bn(n3t);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function s3t(e){const n=aw(),t=M.useRef(!1);M.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const i3t=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function a3t(e){const n=bn(i3t),t=cr();return M.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function o3t(e){return e.connection.inProgress?{...e.connection,to:Jh(e.connection.to,e.transform)}:{...e.connection}}function l3t(e){return o3t}function c3t(e){const n=l3t();return bn(n,or)}const u3t=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function d3t({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:a,height:l,isValid:o,inProgress:c}=bn(u3t,or);return!(a&&s&&c)?null:f.jsx("svg",{style:e,width:a,height:l,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:Fr(["react-flow__connection",XR(o)]),children:f.jsx(QD,{style:n,type:t,CustomComponent:r,isValid:o})})})}const QD=({style:e,type:n=Sl.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:a,fromNode:l,fromHandle:o,fromPosition:c,to:d,toNode:_,toHandle:h,toPosition:m,pointer:g}=c3t();if(!s)return;if(t)return f.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:l,fromHandle:o,fromX:a.x,fromY:a.y,toX:d.x,toY:d.y,fromPosition:c,toPosition:m,connectionStatus:XR(r),toNode:_,toHandle:h,pointer:g});let S="";const k={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:d.x,targetY:d.y,targetPosition:m};switch(n){case Sl.Bezier:[S]=cD(k);break;case Sl.SimpleBezier:[S]=$D(k);break;case Sl.Step:[S]=xx({...k,borderRadius:0});break;case Sl.SmoothStep:[S]=xx(k);break;default:[S]=dD(k)}return f.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:e})};QD.displayName="ConnectionLine";const f3t={};function cE(e=f3t){M.useRef(e),cr(),M.useEffect(()=>{},[e])}function h3t(){cr(),M.useRef(!1),M.useEffect(()=>{},[])}function JD({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:a,onEdgeDoubleClick:l,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:_,onSelectionContextMenu:h,onSelectionStart:m,onSelectionEnd:g,connectionLineType:S,connectionLineStyle:k,connectionLineComponent:b,connectionLineContainerStyle:v,selectionKeyCode:x,selectionOnDrag:y,selectionMode:C,multiSelectionKeyCode:j,panActivationKeyCode:N,zoomActivationKeyCode:T,deleteKeyCode:z,onlyRenderVisibleElements:D,elementsSelectable:O,defaultViewport:H,translateExtent:P,minZoom:F,maxZoom:W,preventScrolling:Z,defaultMarkerColor:U,zoomOnScroll:X,zoomOnPinch:J,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:B,zoomOnDoubleClick:Y,panOnDrag:V,autoPanOnSelection:ie,onPaneClick:le,onPaneMouseEnter:ae,onPaneMouseMove:re,onPaneMouseLeave:q,onPaneScroll:oe,onPaneContextMenu:ce,paneClickDistance:_e,nodeClickDistance:de,onEdgeContextMenu:ve,onEdgeMouseEnter:Ce,onEdgeMouseMove:Le,onEdgeMouseLeave:Ue,reconnectRadius:He,onReconnect:Bt,onReconnectStart:Et,onReconnectEnd:Nt,noDragClassName:cn,noWheelClassName:vt,noPanClassName:rt,disableKeyboardA11y:Je,nodeExtent:qt,rfId:we,viewport:Oe,onViewportChange:Xe}){return cE(e),cE(n),h3t(),s3t(t),a3t(Oe),f.jsx(z5t,{onPaneClick:le,onPaneMouseEnter:ae,onPaneMouseMove:re,onPaneMouseLeave:q,onPaneContextMenu:ce,onPaneScroll:oe,paneClickDistance:_e,deleteKeyCode:z,selectionKeyCode:x,selectionOnDrag:y,selectionMode:C,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:j,panActivationKeyCode:N,zoomActivationKeyCode:T,elementsSelectable:O,zoomOnScroll:X,zoomOnPinch:J,zoomOnDoubleClick:Y,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:B,panOnDrag:V,autoPanOnSelection:ie,defaultViewport:H,translateExtent:P,minZoom:F,maxZoom:W,onSelectionContextMenu:h,preventScrolling:Z,noDragClassName:cn,noWheelClassName:vt,noPanClassName:rt,disableKeyboardA11y:Je,onViewportChange:Xe,isControlledViewport:!!Oe,children:f.jsxs(r3t,{children:[f.jsx(t3t,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:l,onReconnect:Bt,onReconnectStart:Et,onReconnectEnd:Nt,onlyRenderVisibleElements:D,onEdgeContextMenu:ve,onEdgeMouseEnter:Ce,onEdgeMouseMove:Le,onEdgeMouseLeave:Ue,reconnectRadius:He,defaultMarkerColor:U,noPanClassName:rt,disableKeyboardA11y:Je,rfId:we}),f.jsx(d3t,{style:k,type:S,component:b,containerStyle:v}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(I5t,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:_,nodeClickDistance:de,onlyRenderVisibleElements:D,noPanClassName:rt,noDragClassName:cn,disableKeyboardA11y:Je,nodeExtent:qt,rfId:we}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}JD.displayName="GraphView";const _3t=M.memo(JD),p3t=nD(),uE=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:l,fitViewOptions:o,minZoom:c=.5,maxZoom:d=2,nodeOrigin:_,nodeExtent:h,zIndexMode:m="basic"}={})=>{const g=new Map,S=new Map,k=new Map,b=new Map,v=r??n??[],x=t??e??[],y=_??[0,0],C=h??xh;_D(k,b,v);const{nodesInitialized:j}=wx(x,g,S,{nodeOrigin:y,nodeExtent:C,zIndexMode:m});let N=[0,0,1];if(l&&s&&a){const T=Zh(g,{filter:H=>!!((H.width||H.initialWidth)&&(H.height||H.initialHeight))}),{x:z,y:D,zoom:O}=J4(T,s,a,c,d,(o==null?void 0:o.padding)??.1);N=[z,D,O]}return{rfId:"1",width:s??0,height:a??0,transform:N,nodes:x,nodesInitialized:j,nodeLookup:g,parentLookup:S,edges:v,edgeLookup:b,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:d,translateExtent:xh,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:pd.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:l??!1,fitViewOptions:o,fitViewResolver:null,connection:{...YR},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:p3t,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:KR,zIndexMode:m,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},m3t=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:l,fitViewOptions:o,minZoom:c,maxZoom:d,nodeOrigin:_,nodeExtent:h,zIndexMode:m})=>Ewt((g,S)=>{async function k(){const{nodeLookup:b,panZoom:v,fitViewOptions:x,fitViewResolver:y,width:C,height:j,minZoom:N,maxZoom:T}=S();v&&(await w4t({nodes:b,width:C,height:j,panZoom:v,minZoom:N,maxZoom:T},x),y==null||y.resolve(!0),g({fitViewResolver:null}))}return{...uE({nodes:e,edges:n,width:s,height:a,fitView:l,fitViewOptions:o,minZoom:c,maxZoom:d,nodeOrigin:_,nodeExtent:h,defaultNodes:t,defaultEdges:r,zIndexMode:m}),setNodes:b=>{const{nodeLookup:v,parentLookup:x,nodeOrigin:y,elevateNodesOnSelect:C,fitViewQueued:j,zIndexMode:N,nodesSelectionActive:T}=S(),{nodesInitialized:z,hasSelectedNodes:D}=wx(b,v,x,{nodeOrigin:y,nodeExtent:h,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:N}),O=T&&D;j&&z?(k(),g({nodes:b,nodesInitialized:z,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:O})):g({nodes:b,nodesInitialized:z,nodesSelectionActive:O})},setEdges:b=>{const{connectionLookup:v,edgeLookup:x}=S();_D(v,x,b),g({edges:b})},setDefaultNodesAndEdges:(b,v)=>{if(b){const{setNodes:x}=S();x(b),g({hasDefaultNodes:!0})}if(v){const{setEdges:x}=S();x(v),g({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:v,nodeLookup:x,parentLookup:y,domNode:C,nodeOrigin:j,nodeExtent:N,debug:T,fitViewQueued:z,zIndexMode:D}=S(),{changes:O,updatedInternals:H}=G4t(b,x,y,C,j,N,D);H&&(P4t(x,y,{nodeOrigin:j,nodeExtent:N,zIndexMode:D}),z?(k(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(O==null?void 0:O.length)>0&&(T&&console.log("React Flow: trigger node changes",O),v==null||v(O)))},updateNodePositions:(b,v=!1)=>{const x=[];let y=[];const{nodeLookup:C,triggerNodeChanges:j,connection:N,updateConnection:T,onNodesChangeMiddlewareMap:z}=S();for(const[D,O]of b){const H=C.get(D),P=!!(H!=null&&H.expandParent&&(H!=null&&H.parentId)&&(O!=null&&O.position)),F={id:D,type:"position",position:P?{x:Math.max(0,O.position.x),y:Math.max(0,O.position.y)}:O.position,dragging:v};if(H&&N.inProgress&&N.fromNode.id===H.id){const W=Hc(H,N.fromHandle,xt.Left,!0);T({...N,from:W})}P&&H.parentId&&x.push({id:D,parentId:H.parentId,rect:{...O.internals.positionAbsolute,width:O.measured.width??0,height:O.measured.height??0}}),y.push(F)}if(x.length>0){const{parentLookup:D,nodeOrigin:O}=S(),H=iw(x,C,D,O);y.push(...H)}for(const D of z.values())y=D(y);j(y)},triggerNodeChanges:b=>{const{onNodesChange:v,setNodes:x,nodes:y,hasDefaultNodes:C,debug:j}=S();if(b!=null&&b.length){if(C){const N=Wwt(b,y);x(N)}j&&console.log("React Flow: trigger node changes",b),v==null||v(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:v,setEdges:x,edges:y,hasDefaultEdges:C,debug:j}=S();if(b!=null&&b.length){if(C){const N=Kwt(b,y);x(N)}j&&console.log("React Flow: trigger edge changes",b),v==null||v(b)}},addSelectedNodes:b=>{const{multiSelectionActive:v,edgeLookup:x,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:j}=S();if(v){const N=b.map(T=>yc(T,!0));C(N);return}C(qu(y,new Set([...b]),!0)),j(qu(x))},addSelectedEdges:b=>{const{multiSelectionActive:v,edgeLookup:x,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:j}=S();if(v){const N=b.map(T=>yc(T,!0));j(N);return}j(qu(x,new Set([...b]))),C(qu(y,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:v}={})=>{const{edges:x,nodes:y,nodeLookup:C,triggerNodeChanges:j,triggerEdgeChanges:N}=S(),T=b||y,z=v||x,D=[];for(const H of T){if(!H.selected)continue;const P=C.get(H.id);P&&(P.selected=!1),D.push(yc(H.id,!1))}const O=[];for(const H of z)H.selected&&O.push(yc(H.id,!1));j(D),N(O)},setMinZoom:b=>{const{panZoom:v,maxZoom:x}=S();v==null||v.setScaleExtent([b,x]),g({minZoom:b})},setMaxZoom:b=>{const{panZoom:v,minZoom:x}=S();v==null||v.setScaleExtent([x,b]),g({maxZoom:b})},setTranslateExtent:b=>{var v;(v=S().panZoom)==null||v.setTranslateExtent(b),g({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:v,triggerNodeChanges:x,triggerEdgeChanges:y,elementsSelectable:C}=S();if(!C)return;const j=v.reduce((T,z)=>z.selected?[...T,yc(z.id,!1)]:T,[]),N=b.reduce((T,z)=>z.selected?[...T,yc(z.id,!1)]:T,[]);x(j),y(N)},setNodeExtent:b=>{const{nodes:v,nodeLookup:x,parentLookup:y,nodeOrigin:C,elevateNodesOnSelect:j,nodeExtent:N,zIndexMode:T}=S();b[0][0]===N[0][0]&&b[0][1]===N[0][1]&&b[1][0]===N[1][0]&&b[1][1]===N[1][1]||(wx(v,x,y,{nodeOrigin:C,nodeExtent:b,elevateNodesOnSelect:j,checkEquality:!1,zIndexMode:T}),g({nodeExtent:b}))},panBy:b=>{const{transform:v,width:x,height:y,panZoom:C,translateExtent:j}=S();return V4t({delta:b,panZoom:C,transform:v,translateExtent:j,width:x,height:y})},setCenter:async(b,v,x)=>{const{width:y,height:C,maxZoom:j,panZoom:N}=S();if(!N)return!1;const T=typeof(x==null?void 0:x.zoom)<"u"?x.zoom:j;return await N.setViewport({x:y/2-b*T,y:C/2-v*T,zoom:T},{duration:x==null?void 0:x.duration,ease:x==null?void 0:x.ease,interpolate:x==null?void 0:x.interpolate}),!0},cancelConnection:()=>{g({connection:{...YR}})},updateConnection:b=>{g({connection:b})},reset:()=>g({...uE()})}},Object.is);function g3t({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:a,initialMinZoom:l,initialMaxZoom:o,initialFitViewOptions:c,fitView:d,nodeOrigin:_,nodeExtent:h,zIndexMode:m,children:g}){const[S]=M.useState(()=>m3t({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:d,minZoom:l,maxZoom:o,fitViewOptions:c,nodeOrigin:_,nodeExtent:h,zIndexMode:m}));return f.jsx(Nwt,{value:S,children:f.jsx(e5t,{children:f.jsx(p5t,{children:g})})})}function v3t({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:a,height:l,fitView:o,fitViewOptions:c,minZoom:d,maxZoom:_,nodeOrigin:h,nodeExtent:m,zIndexMode:g}){return M.useContext(Jm)?f.jsx(f.Fragment,{children:e}):f.jsx(g3t,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:a,initialHeight:l,fitView:o,initialFitViewOptions:c,initialMinZoom:d,initialMaxZoom:_,nodeOrigin:h,nodeExtent:m,zIndexMode:g,children:e})}const b3t={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function x3t({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:a,edgeTypes:l,onNodeClick:o,onEdgeClick:c,onInit:d,onMove:_,onMoveStart:h,onMoveEnd:m,onConnect:g,onConnectStart:S,onConnectEnd:k,onClickConnectStart:b,onClickConnectEnd:v,onNodeMouseEnter:x,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:j,onNodeDoubleClick:N,onNodeDragStart:T,onNodeDrag:z,onNodeDragStop:D,onNodesDelete:O,onEdgesDelete:H,onDelete:P,onSelectionChange:F,onSelectionDragStart:W,onSelectionDrag:Z,onSelectionDragStop:U,onSelectionContextMenu:X,onSelectionStart:J,onSelectionEnd:$,onBeforeDelete:L,connectionMode:B,connectionLineType:Y=Sl.Bezier,connectionLineStyle:V,connectionLineComponent:ie,connectionLineContainerStyle:le,deleteKeyCode:ae="Backspace",selectionKeyCode:re="Shift",selectionOnDrag:q=!1,selectionMode:oe=yh.Full,panActivationKeyCode:ce="Space",multiSelectionKeyCode:_e=Sh()?"Meta":"Control",zoomActivationKeyCode:de=Sh()?"Meta":"Control",snapToGrid:ve,snapGrid:Ce,onlyRenderVisibleElements:Le=!1,selectNodesOnDrag:Ue,nodesDraggable:He,autoPanOnNodeFocus:Bt,nodesConnectable:Et,nodesFocusable:Nt,nodeOrigin:cn=ND,edgesFocusable:vt,edgesReconnectable:rt,elementsSelectable:Je=!0,defaultViewport:qt=Hwt,minZoom:we=.5,maxZoom:Oe=2,translateExtent:Xe=xh,preventScrolling:st=!0,nodeExtent:tt,defaultMarkerColor:zt="#b1b1b7",zoomOnScroll:bt=!0,zoomOnPinch:Rt=!0,panOnScroll:et=!1,panOnScrollSpeed:Vt=.5,panOnScrollMode:jt=Mc.Free,zoomOnDoubleClick:Gn=!0,panOnDrag:nn=!0,onPaneClick:ur,onPaneMouseEnter:yr,onPaneMouseMove:An,onPaneMouseLeave:Vn,onPaneScroll:rn,onPaneContextMenu:wn,paneClickDistance:Sn=1,nodeClickDistance:dt=0,children:un,onReconnect:Ye,onReconnectStart:at,onReconnectEnd:on,onEdgeContextMenu:$t,onEdgeDoubleClick:Tt,onEdgeMouseEnter:Tn,onEdgeMouseMove:Wn,onEdgeMouseLeave:kn,reconnectRadius:Ur=10,onNodesChange:Ui,onEdgesChange:qr,noDragClassName:Cn="nodrag",noWheelClassName:Pn="nowheel",noPanClassName:Pe="nopan",fitView:ht,fitViewOptions:Jn,connectOnClick:pr,attributionPosition:On,proOptions:_t,defaultEdgeOptions:tn,elevateNodesOnSelect:Qt=!0,elevateEdgesOnSelect:St=!1,disableKeyboardA11y:In=!1,autoPanOnConnect:_n,autoPanOnNodeDrag:qe,autoPanOnSelection:Ht=!0,autoPanSpeed:Os,connectionRadius:Cs,isValidConnection:Es,onError:ns,style:Is,id:ca,nodeDragThreshold:sn,connectionDragThreshold:mr,viewport:Bs,onViewportChange:Gr,width:wr,height:Wt,colorMode:Lo="light",debug:ei,onScroll:dr,ariaLabelConfig:$s,zIndexMode:Oo="basic",...Kn},Ci){const ua=ca||"1",ti=qwt(Lo),ni=M.useCallback(ds=>{ds.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),dr==null||dr(ds)},[dr]);return f.jsx("div",{"data-testid":"rf__wrapper",...Kn,onScroll:ni,style:{...Is,...b3t},ref:Ci,className:Fr(["react-flow",s,ti]),id:ca,role:"application",children:f.jsxs(v3t,{nodes:e,edges:n,width:wr,height:Wt,fitView:ht,fitViewOptions:Jn,minZoom:we,maxZoom:Oe,nodeOrigin:cn,nodeExtent:tt,zIndexMode:Oo,children:[f.jsx(Uwt,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:g,onConnectStart:S,onConnectEnd:k,onClickConnectStart:b,onClickConnectEnd:v,nodesDraggable:He,autoPanOnNodeFocus:Bt,nodesConnectable:Et,nodesFocusable:Nt,edgesFocusable:vt,edgesReconnectable:rt,elementsSelectable:Je,elevateNodesOnSelect:Qt,elevateEdgesOnSelect:St,minZoom:we,maxZoom:Oe,nodeExtent:tt,onNodesChange:Ui,onEdgesChange:qr,snapToGrid:ve,snapGrid:Ce,connectionMode:B,translateExtent:Xe,connectOnClick:pr,defaultEdgeOptions:tn,fitView:ht,fitViewOptions:Jn,onNodesDelete:O,onEdgesDelete:H,onDelete:P,onNodeDragStart:T,onNodeDrag:z,onNodeDragStop:D,onSelectionDrag:Z,onSelectionDragStart:W,onSelectionDragStop:U,onMove:_,onMoveStart:h,onMoveEnd:m,noPanClassName:Pe,nodeOrigin:cn,rfId:ua,autoPanOnConnect:_n,autoPanOnNodeDrag:qe,autoPanSpeed:Os,onError:ns,connectionRadius:Cs,isValidConnection:Es,selectNodesOnDrag:Ue,nodeDragThreshold:sn,connectionDragThreshold:mr,onBeforeDelete:L,debug:ei,ariaLabelConfig:$s,zIndexMode:Oo}),f.jsx(_3t,{onInit:d,onNodeClick:o,onEdgeClick:c,onNodeMouseEnter:x,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:j,onNodeDoubleClick:N,nodeTypes:a,edgeTypes:l,connectionLineType:Y,connectionLineStyle:V,connectionLineComponent:ie,connectionLineContainerStyle:le,selectionKeyCode:re,selectionOnDrag:q,selectionMode:oe,deleteKeyCode:ae,multiSelectionKeyCode:_e,panActivationKeyCode:ce,zoomActivationKeyCode:de,onlyRenderVisibleElements:Le,defaultViewport:qt,translateExtent:Xe,minZoom:we,maxZoom:Oe,preventScrolling:st,zoomOnScroll:bt,zoomOnPinch:Rt,zoomOnDoubleClick:Gn,panOnScroll:et,panOnScrollSpeed:Vt,panOnScrollMode:jt,panOnDrag:nn,autoPanOnSelection:Ht,onPaneClick:ur,onPaneMouseEnter:yr,onPaneMouseMove:An,onPaneMouseLeave:Vn,onPaneScroll:rn,onPaneContextMenu:wn,paneClickDistance:Sn,nodeClickDistance:dt,onSelectionContextMenu:X,onSelectionStart:J,onSelectionEnd:$,onReconnect:Ye,onReconnectStart:at,onReconnectEnd:on,onEdgeContextMenu:$t,onEdgeDoubleClick:Tt,onEdgeMouseEnter:Tn,onEdgeMouseMove:Wn,onEdgeMouseLeave:kn,reconnectRadius:Ur,defaultMarkerColor:zt,noDragClassName:Cn,noWheelClassName:Pn,noPanClassName:Pe,rfId:ua,disableKeyboardA11y:In,nodeExtent:tt,viewport:Bs,onViewportChange:Gr}),f.jsx($wt,{onSelectionChange:F}),un,f.jsx(Dwt,{proOptions:_t,position:On}),f.jsx(Rwt,{rfId:ua,disableKeyboardA11y:In})]})})}var y3t=jD(x3t);function w3t({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:Fr(["react-flow__background-pattern",t,r])})}function S3t({radius:e,className:n}){return f.jsx("circle",{cx:e,cy:e,r:e,className:Fr(["react-flow__background-pattern","dots",n])})}var Co;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Co||(Co={}));const k3t={[Co.Dots]:1,[Co.Lines]:1,[Co.Cross]:6},C3t=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function eL({id:e,variant:n=Co.Dots,gap:t=20,size:r,lineWidth:s=1,offset:a=0,color:l,bgColor:o,style:c,className:d,patternClassName:_}){const h=M.useRef(null),{transform:m,patternId:g}=bn(C3t,or),S=r||k3t[n],k=n===Co.Dots,b=n===Co.Cross,v=Array.isArray(t)?t:[t,t],x=[v[0]*m[2]||1,v[1]*m[2]||1],y=S*m[2],C=Array.isArray(a)?a:[a,a],j=b?[y,y]:x,N=[C[0]*m[2]||1+j[0]/2,C[1]*m[2]||1+j[1]/2],T=`${g}${e||""}`;return f.jsxs("svg",{className:Fr(["react-flow__background",d]),style:{...c,...tg,"--xy-background-color-props":o,"--xy-background-pattern-color-props":l},ref:h,"data-testid":"rf__background",children:[f.jsx("pattern",{id:T,x:m[0]%x[0],y:m[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${N[0]},-${N[1]})`,children:k?f.jsx(S3t,{radius:y/2,className:_}):f.jsx(w3t,{dimensions:j,lineWidth:s,variant:n,className:_})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${T})`})]})}eL.displayName="Background";const E3t=M.memo(eL);function N3t(){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 z3t(){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 j3t(){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 A3t(){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 T3t(){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 F0({children:e,className:n,...t}){return f.jsx("button",{type:"button",className:Fr(["react-flow__controls-button",n]),...t,children:e})}const M3t=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function tL({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:a,onZoomOut:l,onFitView:o,onInteractiveChange:c,className:d,children:_,position:h="bottom-left",orientation:m="vertical","aria-label":g}){const S=cr(),{isInteractive:k,minZoomReached:b,maxZoomReached:v,ariaLabelConfig:x}=bn(M3t,or),{zoomIn:y,zoomOut:C,fitView:j}=aw(),N=()=>{y(),a==null||a()},T=()=>{C(),l==null||l()},z=()=>{j(s),o==null||o()},D=()=>{S.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),c==null||c(!k)},O=m==="horizontal"?"horizontal":"vertical";return f.jsxs(eg,{className:Fr(["react-flow__controls",O,d]),position:h,style:e,"data-testid":"rf__controls","aria-label":g??x["controls.ariaLabel"],children:[n&&f.jsxs(f.Fragment,{children:[f.jsx(F0,{onClick:N,className:"react-flow__controls-zoomin",title:x["controls.zoomIn.ariaLabel"],"aria-label":x["controls.zoomIn.ariaLabel"],disabled:v,children:f.jsx(N3t,{})}),f.jsx(F0,{onClick:T,className:"react-flow__controls-zoomout",title:x["controls.zoomOut.ariaLabel"],"aria-label":x["controls.zoomOut.ariaLabel"],disabled:b,children:f.jsx(z3t,{})})]}),t&&f.jsx(F0,{className:"react-flow__controls-fitview",onClick:z,title:x["controls.fitView.ariaLabel"],"aria-label":x["controls.fitView.ariaLabel"],children:f.jsx(j3t,{})}),r&&f.jsx(F0,{className:"react-flow__controls-interactive",onClick:D,title:x["controls.interactive.ariaLabel"],"aria-label":x["controls.interactive.ariaLabel"],children:k?f.jsx(T3t,{}):f.jsx(A3t,{})}),_]})}tL.displayName="Controls";M.memo(tL);function R3t({id:e,x:n,y:t,width:r,height:s,style:a,color:l,strokeColor:o,strokeWidth:c,className:d,borderRadius:_,shapeRendering:h,selected:m,onClick:g}){const{background:S,backgroundColor:k}=a||{},b=l||S||k;return f.jsx("rect",{className:Fr(["react-flow__minimap-node",{selected:m},d]),x:n,y:t,rx:_,ry:_,width:r,height:s,style:{fill:b,stroke:o,strokeWidth:c},shapeRendering:h,onClick:g?v=>g(v,e):void 0})}const D3t=M.memo(R3t),L3t=e=>e.nodes.map(n=>n.id),Rb=e=>e instanceof Function?e:()=>e;function O3t({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:a=D3t,onClick:l}){const o=bn(L3t,or),c=Rb(n),d=Rb(e),_=Rb(t),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:o.map(m=>f.jsx(B3t,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:d,nodeClassNameFunc:_,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:a,onClick:l,shapeRendering:h},m))})}function I3t({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:a,shapeRendering:l,NodeComponent:o,onClick:c}){const{node:d,x:_,y:h,width:m,height:g}=bn(S=>{const k=S.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const b=k.internals.userNode,{x:v,y:x}=k.internals.positionAbsolute,{width:y,height:C}=Do(b);return{node:b,x:v,y:x,width:y,height:C}},or);return!d||d.hidden||!rD(d)?null:f.jsx(o,{x:_,y:h,width:m,height:g,style:d.style,selected:!!d.selected,className:r(d),color:n(d),borderRadius:s,strokeColor:t(d),strokeWidth:a,shapeRendering:l,onClick:c,id:d.id})}const B3t=M.memo(I3t);var $3t=M.memo(O3t);const H3t=200,P3t=150,F3t=e=>!e.hidden,U3t=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?eD(Zh(e.nodeLookup,{filter:F3t}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},q3t="react-flow__minimap-desc";function nL({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:a=5,nodeStrokeWidth:l,nodeComponent:o,bgColor:c,maskColor:d,maskStrokeColor:_,maskStrokeWidth:h,position:m="bottom-right",onClick:g,onNodeClick:S,pannable:k=!1,zoomable:b=!1,ariaLabel:v,inversePan:x,zoomStep:y=1,offsetScale:C=5}){const j=cr(),N=M.useRef(null),{boundingRect:T,viewBB:z,rfId:D,panZoom:O,translateExtent:H,flowWidth:P,flowHeight:F,ariaLabelConfig:W}=bn(U3t,or),Z=(e==null?void 0:e.width)??H3t,U=(e==null?void 0:e.height)??P3t,X=T.width/Z,J=T.height/U,$=Math.max(X,J),L=$*Z,B=$*U,Y=C*$,V=T.x-(L-T.width)/2-Y,ie=T.y-(B-T.height)/2-Y,le=L+Y*2,ae=B+Y*2,re=`${q3t}-${D}`,q=M.useRef(0),oe=M.useRef();q.current=$,M.useEffect(()=>{if(N.current&&O)return oe.current=twt({domNode:N.current,panZoom:O,getTransform:()=>j.getState().transform,getViewScale:()=>q.current}),()=>{var ve;(ve=oe.current)==null||ve.destroy()}},[O]),M.useEffect(()=>{var ve;(ve=oe.current)==null||ve.update({translateExtent:H,width:P,height:F,inversePan:x,pannable:k,zoomStep:y,zoomable:b})},[k,b,x,y,H,P,F]);const ce=g?ve=>{var Ue;const[Ce,Le]=((Ue=oe.current)==null?void 0:Ue.pointer(ve))||[0,0];g(ve,{x:Ce,y:Le})}:void 0,_e=S?M.useCallback((ve,Ce)=>{const Le=j.getState().nodeLookup.get(Ce).internals.userNode;S(ve,Le)},[]):void 0,de=v??W["minimap.ariaLabel"];return f.jsx(eg,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof _=="string"?_:void 0,"--xy-minimap-mask-stroke-width-props":typeof h=="number"?h*$: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 l=="number"?l:void 0},className:Fr(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:Z,height:U,viewBox:`${V} ${ie} ${le} ${ae}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":re,ref:N,onClick:ce,children:[de&&f.jsx("title",{id:re,children:de}),f.jsx($3t,{onClick:_e,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:a,nodeClassName:s,nodeStrokeWidth:l,nodeComponent:o}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${V-Y},${ie-Y}h${le+Y*2}v${ae+Y*2}h${-le-Y*2}z + M${z.x},${z.y}h${z.width}v${z.height}h${-z.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}nL.displayName="MiniMap";M.memo(nL);const G3t=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,V3t={[vd.Line]:"right",[vd.Handle]:"bottom-right"};function W3t({nodeId:e,position:n,variant:t=vd.Handle,className:r,style:s=void 0,children:a,color:l,minWidth:o=10,minHeight:c=10,maxWidth:d=Number.MAX_VALUE,maxHeight:_=Number.MAX_VALUE,keepAspectRatio:h=!1,resizeDirection:m,autoScale:g=!0,shouldResize:S,onResizeStart:k,onResize:b,onResizeEnd:v}){const x=RD(),y=typeof e=="string"?e:x,C=cr(),j=M.useRef(null),N=t===vd.Handle,T=bn(M.useCallback(G3t(N&&g),[N,g]),or),z=M.useRef(null),D=n??V3t[t];M.useEffect(()=>{if(!(!j.current||!y))return z.current||(z.current=_wt({domNode:j.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:H,transform:P,snapGrid:F,snapToGrid:W,nodeOrigin:Z,domNode:U}=C.getState();return{nodeLookup:H,transform:P,snapGrid:F,snapToGrid:W,nodeOrigin:Z,paneDomNode:U}},onChange:(H,P)=>{const{triggerNodeChanges:F,nodeLookup:W,parentLookup:Z,nodeOrigin:U}=C.getState(),X=[],J={x:H.x,y:H.y},$=W.get(y);if($&&$.expandParent&&$.parentId){const L=$.origin??U,B=H.width??$.measured.width??0,Y=H.height??$.measured.height??0,V={id:$.id,parentId:$.parentId,rect:{width:B,height:Y,...sD({x:H.x??$.position.x,y:H.y??$.position.y},{width:B,height:Y},$.parentId,W,L)}},ie=iw([V],W,Z,U);X.push(...ie),J.x=H.x?Math.max(L[0]*B,H.x):void 0,J.y=H.y?Math.max(L[1]*Y,H.y):void 0}if(J.x!==void 0&&J.y!==void 0){const L={id:y,type:"position",position:{...J}};X.push(L)}if(H.width!==void 0&&H.height!==void 0){const B={id:y,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:H.width,height:H.height}};X.push(B)}for(const L of P){const B={...L,type:"position"};X.push(B)}F(X)},onEnd:({width:H,height:P})=>{const F={id:y,type:"dimensions",resizing:!1,dimensions:{width:H,height:P}};C.getState().triggerNodeChanges([F])}})),z.current.update({controlPosition:D,boundaries:{minWidth:o,minHeight:c,maxWidth:d,maxHeight:_},keepAspectRatio:h,resizeDirection:m,onResizeStart:k,onResize:b,onResizeEnd:v,shouldResize:S}),()=>{var H;(H=z.current)==null||H.destroy()}},[D,o,c,d,_,h,k,b,v,S]);const O=D.split("-");return f.jsx("div",{className:Fr(["react-flow__resize-control","nodrag",...O,t,r]),ref:j,style:{...s,scale:T,...l&&{[N?"backgroundColor":"borderColor"]:l}},children:a})}M.memo(W3t);function K3t(){const[e,n]=M.useState(0),[t,r]=M.useState(0);return{ref:M.useCallback(a=>{if(!a)return;function l(){n(a.offsetWidth),r(a.offsetHeight)}const o=new ResizeObserver(l),c=new MutationObserver(l);return o.observe(a),c.observe(a,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),l(),()=>{o.disconnect(),c.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const U0=8;function Y3t(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:a},l]=M.useState({viewWidth:0,viewHeight:0});M.useEffect(()=>{function _(){l({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",_),_(),()=>window.removeEventListener("resize",_)},[]);let o=0,c=0,d=0;if(e){const{distance:_}=e;switch(e.anchor){case"left":o=e.x-t-_,c=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+_,c=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,c=e.y+e.height+_;break;case"above":o=e.x+e.width/2-t/2,c=e.y-r-_;break}const h=o,m=c;o=Math.min(Math.max(o,U0),a-t-U0),c=Math.min(Math.max(c,U0),s-r-U0),d=e.anchor==="left"||e.anchor==="right"?m-c:h-o}return{x:o,y:c,arrowAdjustment:d}}const Db=380,Lb=12,X3t=350,Z3t=150,Cx=new EventTarget;function Q3t(){Cx.dispatchEvent(new Event("move"))}function J3t(e,n){const[t,r]=M.useState(null),s=M.useRef(void 0),a=M.useRef(void 0);M.useEffect(()=>{const d=()=>{window.clearTimeout(s.current),window.clearTimeout(a.current),r(null)};return Cx.addEventListener("move",d),()=>{Cx.removeEventListener("move",d),window.clearTimeout(s.current),window.clearTimeout(a.current)}},[]),M.useEffect(()=>{r(d=>{var h;if(!d)return d;const _=((h=e.current)==null?void 0:h.getBoundingClientRect())??null;return _&&d.x===_.x&&d.y===_.y&&d.width===_.width&&d.height===_.height?d:_})},[e,n]);const l=M.useCallback(()=>{window.clearTimeout(a.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{var d;r(((d=e.current)==null?void 0:d.getBoundingClientRect())??null)},X3t)},[e]),o=M.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(a.current),a.current=window.setTimeout(()=>r(null),Z3t)},[]),c=M.useCallback(()=>window.clearTimeout(a.current),[]);return{rect:t,onMouseEnter:l,onMouseLeave:o,keepOpen:c}}function e6t(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 t6t({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:a,onOpenCode:l,onMouseEnter:o,onMouseLeave:c}){const d=K3t(),_=s.right+Lb+Db<=window.innerWidth,h=s.x-Lb-Db>=0,m=_?"right":h?"left":s.y>window.innerHeight/2?"above":"below",{x:g,y:S}=Y3t({x:s.x,y:s.y,width:s.width,height:s.height,anchor:m,distance:Lb},d),[k,b]=M.useState(null),v=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null;M.useEffect(()=>{if(b(null),!v)return;let H=!1;return FJe(v).then(P=>{let F=P.diff;if(P.truncated){const X=F.lastIndexOf(` +diff --git `);F=X!==-1?F.slice(0,X+1):F.slice(0,F.lastIndexOf(` +`)+1)}let W=[];try{W=F.trim()?Q2(F):[]}catch{return}if(P.truncated&&W.every(X=>X.hunks.length===0))return;let Z=0,U=0;for(const X of W){const J=H4(X);Z+=J.additions,U+=J.deletions}H||b({fileCount:W.length,additions:Z,deletions:U,truncated:P.truncated})}).catch(()=>{}),()=>{H=!0}},[v]);const x={done:0,failed:0,cancelled:0,live:0};for(const H of n)H.status==="done"?x.done+=1:H.status==="failed"?x.failed+=1:H.status==="cancelled"?x.cancelled+=1:x.live+=1;const y=t?mp((t.endedAt??Date.now())-t.createdAt):null,C=(t==null?void 0:t.status)==="failed"&&t.resultMarkdown?t.resultMarkdown:null,j=e.description||(C?null:t==null?void 0:t.resultMarkdown)||null,N=M.useRef(null),[T,z]=M.useState(!1),[D,O]=M.useState(!1);return M.useEffect(()=>{z(!1)},[j]),M.useEffect(()=>{const H=N.current;H&&O(H.scrollHeight>H.clientHeight+1)},[j,T]),Il.createPortal(f.jsxs("div",{ref:d.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:Db,left:g,top:S,visibility:d.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(ko,{status:t?Hi(t):"idle"})]}),e.title&&f.jsx("div",{className:"hc-title",children:e.title}),f.jsxs("div",{className:"hc-actions",children:[a&&f.jsxs("button",{type:"button",...zr(a),children:[f.jsx(nd,{size:13}),lce()]}),f.jsxs("button",{type:"button",...zr(l),children:[f.jsx(Jp,{size:13}),Xle()]})]}),j&&f.jsx("div",{className:`hc-body${T?" expanded":""}`,ref:N,children:j}),j&&(D||T)&&f.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>z(H=>!H),children:T?$E():fie()}),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?Ope():Hpe({count:Yt(n.length)}),...x.done>0?[fpe({count:Yt(x.done)})]:[],...x.failed>0?[mpe({count:Yt(x.failed)})]:[],...x.cancelled>0?[lpe({count:Yt(x.cancelled)})]:[],...x.live>0?[zpe({count:Yt(x.live)})]:[]])}),t&&Xx(t.backend)&&f.jsx(v4,{backend:t.backend}),y&&f.jsx("span",{children:y}),t&&f.jsx("span",{children:La(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(em,{size:12}),e.branchName]}),r&&f.jsxs("span",{children:[sce()," ",f.jsx("span",{children:r})]})]}),k&&k.fileCount>0&&f.jsx("div",{className:"hc-git-row",title:k.truncated?kI({parent:ke(r??"parent")}):xI({parent:ke(r??"parent")}),children:f.jsxs("span",{children:[k.truncated&&"≥ ",f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",k.additions]})," ",f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",k.deletions]})," · ",k.fileCount===1&&!k.truncated?Mpe():k.truncated?kpe({count:Yt(k.fileCount)}):xpe({count:Yt(k.fileCount)})]})})]}),f.jsxs("div",{className:"hc-foot",children:[f.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),f.jsxs("span",{children:[ece()," ",e6t(e.createdAt)]})]})]}),document.body)}const dE=["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(" "),n6t=264,fE=132,ap=44,r6t=72,s6t=148,i6t=44;function a6t(e){const n=new Map(e.map(a=>[a.id,{exp:a,children:[]}])),t=[];for(const a of e){const l=n.get(a.id),o=a.parentExperimentId?n.get(a.parentExperimentId):void 0;o?o.children.push(l):t.push(l)}const r=(a,l)=>a.exp.createdAt-l.exp.createdAt,s=a=>{a.children.sort(r),a.children.forEach(s)};return t.sort(r),t.forEach(s),t}function o6t(e,n){const t=new Map,r=o=>{const c=t.get(o)??1+o.children.reduce((d,_)=>d+r(_),0);return t.set(o,c),c},s=new Map,a=o=>{const c=s.get(o)??(n(o)||o.children.some(a));return s.set(o,c),c};function l(o){if(n(o)){const _=[];let h=0;for(const m of o.children)a(m)?_.push(...l(m)):h+=r(m);return h>0&&_.push({kind:"elided",id:`el-${o.exp.id}`,count:h,children:[]}),[{kind:"exp",exp:o.exp,children:_}]}if(!a(o))return[];let c=0;const d=[];return(function _(h){c+=1;for(const m of h.children)n(m)?d.push(...l(m)):a(m)?_(m):c+=r(m)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:c,children:d}]}return e.flatMap(l)}function Ex(e){return e.kind==="exp"?n6t:s6t}function q0(e){return e.kind==="exp"?e.exp.id:e.id}function op(e){if(e.children.length===0)return Ex(e);const n=e.children.reduce((t,r)=>t+op(r),0)+ap*(e.children.length-1);return Math.max(Ex(e),n)}function l6t(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const c6t=M.memo(function({data:n}){Pc();const{exp:t,latestRun:r,runs:s,isBaseline:a,parentSlug:l,githubOwner:o,githubRepo:c,onOpenView:d,onOpenCode:_}=n,h=r?Hi(r):void 0,m=h==="running"||h==="starting"||h==="cancelling",g=a?QKe():m?hYe():bo(),S=s.slice(-8),k=M.useRef(null),b=J3t(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] ${m?"live":""}`,onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,children:[f.jsx(Dl,{type:"target",position:xt.Top}),f.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...zr(v=>d(t.id,"overview",v)),children:[f.jsxs("div",{className:"node-eyebrow",children:[f.jsx("span",{children:g}),f.jsx(ko,{status:h??"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:QYe()}),S.length>0?f.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:S.map(v=>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 ${l6t(Hi(v))}`,title:kT(Hi(v))},v.id))}):f.jsx("span",{children:HYe()}),f.jsx("span",{className:"flex-1"}),r&&f.jsx("span",{children:La(r.createdAt)})]})]}),f.jsxs("div",{className:"node-actions",onClick:v=>v.stopPropagation(),children:[s.length>0&&f.jsxs("button",{className:"node-action",title:qYe(),...zr(v=>d(t.id,"terminal",v)),children:[f.jsx(nd,{size:13}),NN()]}),f.jsxs("button",{className:"node-action",title:EE({branch:ke(t.branchName)}),...zr(v=>_(t.id,t.branchName,"files",v)),children:[f.jsx(Jp,{size:13}),CYe()]}),o&&c&&f.jsx("a",{className:"node-action node-action-ext",title:up({name:ke(t.branchName)}),"aria-label":up({name:ke(t.branchName)}),href:tm(o,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),children:f.jsx(Em,{size:13})})]}),f.jsx(Dl,{type:"source",position:xt.Bottom}),b.rect&&f.jsx(t6t,{exp:t,runs:s,latestRun:r,parentSlug:l,anchor:b.rect,onOpenLogs:s.length>0?v=>d(t.id,"terminal",v):void 0,onOpenCode:v=>_(t.id,t.branchName,"files",v),onMouseEnter:b.keepOpen,onMouseLeave:b.onMouseLeave})]})}),u6t=M.memo(function({data:n}){Pc();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:nXe(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[f.jsx(Dl,{type:"target",position:xt.Top}),f.jsx(Px,{size:14}),f.jsxs("span",{className:"elided-node-label",children:[t===1?cYe():iYe({count:Yt(t)}),f.jsx("span",{className:"elided-node-sub",children:KYe()})]}),f.jsx(Dl,{type:"source",position:xt.Bottom})]})}),d6t={exp:c6t,elided:u6t},rL={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},f6t={...rL.style,strokeDasharray:"4 4"};function h6t({experiments:e,runs:n,project:t,onOpenView:r,onOpenCode:s,agentSessionId:a,onShowProjectScope:l}){const{nodes:o,edges:c}=M.useMemo(()=>{const d=new Map;for(const v of n){const x=d.get(v.experimentId);x?x.push(v):d.set(v.experimentId,[v])}for(const v of d.values())v.sort((x,y)=>x.createdAt-y.createdAt);const _=[],h=[],m=v=>!a||v.exp.chatSessionId===a,g=o6t(a6t(e),m),S=new Map(e.map(v=>[v.id,v.slug]));function k(v,x,y){const C=x-Ex(v)/2;if(v.kind==="exp"){const T=d.get(v.exp.id)??[];_.push({id:v.exp.id,type:"exp",position:{x:C,y},data:{exp:v.exp,latestRun:T[T.length-1]??null,runs:T,isBaseline:!v.exp.parentExperimentId,parentSlug:v.exp.parentExperimentId?S.get(v.exp.parentExperimentId)??null:null,githubOwner:t.githubEnabled?t.githubOwner:"",githubRepo:t.githubEnabled?t.githubRepo:"",onOpenView:r,onOpenCode:s}})}else _.push({id:v.id,type:"elided",position:{x:C,y:y+(fE-i6t)/2},data:{count:v.count,onShowProjectScope:l}});if(v.children.length===0)return;const j=v.children.reduce((T,z)=>T+op(z),0)+ap*(v.children.length-1);let N=x-j/2;for(const T of v.children){const z=op(T),D=v.kind==="elided"||T.kind==="elided";h.push({id:`e-${q0(v)}-${q0(T)}`,source:q0(v),target:q0(T),...D?{style:f6t}:{}}),k(T,N+z/2,y+fE+r6t),N+=z+ap}}let b=0;for(const v of g){const x=op(v);k(v,b+x/2,0),b+=x+ap}return{nodes:_,edges:h}},[e,n,r,s,t.githubOwner,t.githubRepo,t.githubEnabled,a,l]);return e.length===0?f.jsxs("div",{className:dE,children:[f.jsx("p",{className:"empty-state-title",children:OYe()}),f.jsx("p",{className:"empty-state-hint",children:yYe()})]}):o.length===0&&a?f.jsxs("div",{className:dE,children:[f.jsx("p",{className:"empty-state-title",children:MYe()}),f.jsx("p",{className:"empty-state-hint",children:gYe()})]}):f.jsx(y3t,{className:"[&_.react-flow\\_\\_node.react-flow\\_\\_node-exp.selectable]:cursor-default [&_.react-flow\\_\\_node.react-flow\\_\\_node-elided.selectable]:cursor-pointer [&_.react-flow\\_\\_handle]:opacity-0 [&_.react-flow\\_\\_handle]:pointer-events-none [&_.react-flow\\_\\_attribution]:hidden!",nodes:o,edges:c,nodeTypes:d6t,defaultEdgeOptions:rL,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:Q3t,minZoom:.15,fitView:!0,fitViewOptions:{padding:.25,maxZoom:1},children:f.jsx(E3t,{variant:Co.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},a??"project")}const hE=["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(" "),Ob=(e,n)=>e.id===n.id&&e.view===n.view,Mu=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,lw=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,mo=(e,n,t)=>`${e}:${n??""}:${lw(t)}`,sL=e=>({...e,lineScrollRequest:void 0});function Tf(e){return typeof e=="object"&&"path"in e?sL(e):e}const Ru=(e,n)=>e.branch===n.branch;function Zt(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:${lw(e)}`:`experiment:${e.id}:${e.view}`}function Mf(e,n){const t=e.filter(r=>Zt(r)!==n);return t.length===e.length?e:t}function _6t(e){return e!==void 0}function _E(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1};if(e===$f&&n){const r={path:Ub,source:"artifacts"},s="experiments";return{...t,rightTab:s,tabHistory:[r,s],experimentsTabOpen:!0,fileTabs:[r],contentTabOrder:[Zt(r)],panelOpen:!0}}if(e===KN){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(Zt),panelOpen:!0}}if(e===YN){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Zt),panelOpen:!0}}return t}function p6t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m6t(e,n,t,r,s){let a=e,l;const o=n==null?void 0:n.replace(/\/+$/,""),c=r==null?void 0:r.replace(/\/+$/,"");if(a.startsWith("artifacts/"))return a=a.slice(10),a?{path:a,source:"artifacts"}:null;if(a==="~"||a.startsWith("~/"))return{path:a,source:"abs"};const d=m=>{const g=b=>b.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[S,k]=[g(a),g(m)];return S===k?"":S.startsWith(`${k}/`)?S.slice(k.length).replace(/^\/+/,""):null},_=a.startsWith("/")&&c?d(c):null,h=a.startsWith("/")&&o?d(o):null;if(!a.startsWith("/"))l=t;else{if(_!==null)return _?{path:_,source:"artifacts"}:null;if(h!==null)a=h;else{const m=s?p6t(s):"[^/]+",g=a.match(new RegExp(`/files/${m}/(.+)$`)),S=g?null:a.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),k=g||S?null:a.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(g)return{path:g[1],source:"artifacts"};S?(l=S[1],a=S[2]):k&&(a=k[1])}}return a?a.startsWith("/")?{path:a,source:"abs"}:{path:a,sessionId:l}:null}function g6t(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const Nx="orx:panel-width",iL="orx:experiments-view";function v6t(){try{return localStorage.getItem(iL)==="tree"?"tree":"table"}catch{return"table"}}const Ch=360,b6t=10,x6t=272,y6t=380,w6t=x6t+56,S6t=80,k6t=48;function lp(){return Math.max(Ch,window.innerWidth-w6t-y6t)}function C6t(){const e=lp();try{const n=Number(localStorage.getItem(Nx));if(Number.isFinite(n)&&n>=Ch)return Math.min(n,e)}catch{}return Math.max(Ch,Math.min(760,e,Math.round(window.innerWidth*.4)))}function Rf(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 pE(e){const n=M.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}function mE({runtime:e}){var Gl;const n=Pc(),{status:t}=yT(e.kind==="local"),[r,s]=M.useState(null),[a,l]=M.useState(null),o=M.useRef(void 0);o.current=a==null?void 0:a.tourCompleted;const c=M.useRef(!1),[d,_]=M.useState(null),h=M.useRef(null),[m,g]=M.useState(null),[S,k]=M.useState([]),[b,v]=M.useState([]),x=M.useRef(b);x.current=b;const y=M.useRef(new Map),C=M.useRef(new Set),j=M.useRef(null),N=M.useRef(!1),T=M.useRef(new Map),z=M.useRef(new Map),D=M.useRef(0),O=M.useRef(S);O.current=S;const[H,P]=M.useState(null),[F,W]=M.useState(v6t),[Z,U]=M.useState("project"),X=M.useRef(null),{open:J,setOpen:$,ref:L}=Va(X),[B,Y]=M.useState(null),[V,ie]=M.useState(!1),le=S.every(se=>se.chatSessionId),ae=B&&le?Z:"project",re=M.useMemo(()=>ae!=="agent"?S:S.filter(se=>se.chatSessionId===B),[S,ae,B]),q=M.useMemo(()=>{if(ae!=="agent")return b;const se=new Set(re.map(xe=>xe.id));return b.filter(xe=>se.has(xe.experimentId))},[b,re,ae]);M.useEffect(()=>{try{localStorage.setItem(iL,F)}catch{}},[F]);const[oe,ce]=M.useState(null),[_e,de]=M.useState("experiments"),[ve,Ce]=M.useState([]),[Le,Ue]=M.useState(!1),[He,Bt]=M.useState(!1),[Et,Nt]=M.useState(!1),[cn,vt]=M.useState([]),[rt,Je]=M.useState([]),qt=M.useRef(new Map),we=M.useRef(new Map),Oe=M.useRef(0),[Xe,st]=M.useState([]),[tt,zt]=M.useState([]),[bt,Rt]=M.useState([]),[et,Vt]=M.useState([]),[jt,Gn]=M.useState(null),[nn,ur]=M.useState("files"),[yr,An]=M.useState(new Set),[Vn,rn]=M.useState(!1),[wn,Sn]=M.useState(!1),[dt,un]=M.useState(C6t),[Ye,at]=M.useState(!0),[on,$t]=M.useState(!1),[Tt,Tn]=M.useState(!1),[Wn,kn]=M.useState("chat"),[Ur,Ui]=M.useState(null),qr=M.useRef(new Map),Cn=M.useRef(_E()),Pn=M.useRef(null),Pe=M.useRef(!1),ht=M.useRef(ve);ht.current=ve;const Jn=M.useRef(et);Jn.current=et;const pr=M.useRef(null),On=M.useCallback(se=>{const xe=[...se];Jn.current=xe,Vt(xe)},[]),_t=M.useCallback(se=>{pr.current=se,Gn(se)},[]),tn=M.useCallback(se=>{const xe=Zt(se);vt(Ie=>Mf(Ie,xe)),Je(Ie=>Mf(Ie,xe)),st(Ie=>Mf(Ie,xe)),zt(Ie=>Mf(Ie,xe)),Rt(Ie=>Mf(Ie,xe));const Ee=mr.current;if(Ee&&"path"in se){const Ie=mo(Ee,Pn.current,se);qt.current.delete(Ie)}const Me=ht.current.filter(Ie=>Zt(Ie)!==xe);ht.current=Me,Ce(Me)},[]),Qt=M.useCallback(se=>{Pe.current=!1;const xe=Zt(se),Ee=[...ht.current.filter(Me=>Zt(Me)!==xe),Tf(se)];ht.current=Ee,Ce(Ee),de(se)},[]),St=M.useCallback((se,xe)=>{Pe.current=!1;const Ee=Zt(se),Me=pr.current,Ie=qht({order:Jn.current,previewKey:Me?Zt(Me):null},Ee,xe);Ie.replacedKey&&Me&&typeof Me!="string"&&Zt(Me)===Ie.replacedKey&&tn(Me),On(Ie.order),Ie.previewKey===null?_t(null):Ie.previewKey===Ee&&_t(Tf(se));const mt=[...ht.current.filter(lt=>Zt(lt)!==Ee),Tf(se)];ht.current=mt,Ce(mt),de(se)},[tn,On,_t]),In=M.useCallback(se=>{const xe=pr.current;xe&&Zt(xe)===Zt(se)&&_t(null)},[_t]);M.useEffect(()=>{let se=!1;const xe=Me=>{const Ie=pr.current,mt=Me.target;if(mt instanceof Element&&mt.closest("input, textarea, [contenteditable='true']")!==null){se=!1;return}if(Ie&&Zt(Ie)===Zt(Cn.current.rightTab)&&(Me.metaKey||Me.ctrlKey)&&!Me.altKey&&!Me.shiftKey&&Me.key.toLowerCase()==="k"){Me.preventDefault(),se=!0;return}if(se&&Me.key==="Enter"){Me.preventDefault(),se=!1;const Pt=pr.current;Pt&&In(Pt);return}se=!1},Ee=()=>{se=!1};return window.addEventListener("keydown",xe),window.addEventListener("blur",Ee),window.addEventListener("pointerdown",Ee),()=>{window.removeEventListener("keydown",xe),window.removeEventListener("blur",Ee),window.removeEventListener("pointerdown",Ee)}},[In]);const _n=M.useCallback((se,xe)=>{Pe.current=!1;const Ee=Zt(se),Me=pr.current;Me&&Zt(Me)===Ee&&_t(null);const Ie=Ght({order:Jn.current,previewKey:Me?Zt(Me):null},Ee,ht.current.map(Zt));On(Ie.order);const mt=ht.current.filter(Pt=>Zt(Pt)!==Ee);if(ht.current=mt,Ce(mt),!xe)return;const lt=Ie.fallbackKey?mt.find(Pt=>Zt(Pt)===Ie.fallbackKey):void 0;lt?de(lt):(rn(!1),Sn(!1))},[On,_t]),qe=M.useCallback(se=>{se!=="chat"&&(Pe.current=!1),kn(se)},[]);Cn.current={rightTab:Tf(_e),tabHistory:ve,experimentsTabOpen:Le,filesTabOpen:He,artifactsTabOpen:Et,expTabs:cn,fileTabs:rt,planTabs:Xe,subagentTabs:tt,codeTabs:bt,contentTabOrder:Jn.current,previewTab:pr.current,filesView:nn,filesToggled:yr,selectedRunId:oe,scope:Z,panelOpen:Vn,panelMax:wn};const Ht=M.useCallback(se=>{const xe=Pn.current;if(xe===se)return;xe&&qr.current.set(xe,Cn.current);let Ee=se?qr.current.get(se):void 0;if(!Ee){const Me=se===$f&&o.current===!1&&!c.current;Me&&(c.current=!0,ie(!0)),Ee=_E(se??void 0,Me)}if(se&&Pe.current){Pe.current=!1;const Me="experiments";Ee={...Ee,rightTab:Me,tabHistory:[...Ee.tabHistory.filter(Ie=>Zt(Ie)!==Zt(Me)),Me],experimentsTabOpen:!0,panelOpen:!0}}de(Ee.rightTab),ht.current=Ee.tabHistory,Ce(Ee.tabHistory),Ue(Ee.experimentsTabOpen),Bt(Ee.filesTabOpen),Nt(Ee.artifactsTabOpen),vt(Ee.expTabs),Je(Ee.fileTabs),st(Ee.planTabs),zt(Ee.subagentTabs),Rt(Ee.codeTabs),On(Ee.contentTabOrder),_t(Ee.previewTab),ur(Ee.filesView),An(Ee.filesToggled),ce(Ee.selectedRunId),U(Ee.scope),rn(Ee.panelOpen),Sn(Ee.panelMax),Pn.current=se,Y(se)},[On,_t]),Os=(a==null?void 0:a.onboardingCompleted)??!1,[Cs,Es]=M.useState(!1),ns=M.useCallback(()=>Es(!0),[]),Is=M.useCallback(async()=>{const se=await _S({tourCompleted:!0});l(xe=>xe&&{...xe,tourCompleted:se.tourCompleted}),Es(!1)},[]),ca=M.useCallback(async()=>{await Is(),Tn(!0)},[Is]);M.useEffect(()=>{!m||!c0(m)||on||!Os||a!=null&&a.tourCompleted||ns()},[m,on,Os,ns,a==null?void 0:a.tourCompleted]);const sn=(r==null?void 0:r.find(se=>se.id===m))??null;M.useEffect(()=>{const se=on||d||a===null?null:sn==null?void 0:sn.name;document.title=se?`${Ra(se)} — OpenResearch`:"OpenResearch"},[on,d,a,sn]);const mr=M.useRef(m);mr.current=m;const Bs=M.useCallback(()=>{kn("chat"),Ue(!0),Qt("experiments"),rn(!0),Pn.current||(Pe.current=!0)},[Qt]),Gr=M.useCallback(()=>{_(null),s(null),l(null),Promise.allSettled([NJe(),jJe()]).then(([se,xe])=>{const Ee=[];se.status==="fulfilled"?(s(se.value),g(Me=>{var Ie;return Me&&se.value.some(mt=>mt.id===Me)?Me:((Ie=se.value[0])==null?void 0:Ie.id)??null})):Ee.push(fG()),xe.status==="fulfilled"?(h.current=xe.value.preferredAgent,l(xe.value)):Ee.push(EG()),Ee.length>0&&_(AG({items:new Intl.ListFormat(E()).format(Ee)}))})},[]);M.useEffect(()=>{Gr()},[Gr]);const wr=M.useRef(Promise.resolve()),Wt=M.useRef(0),Lo=M.useCallback(se=>{const xe=++Wt.current;l(Me=>Me&&{...Me,preferredAgent:se});const Ee=wr.current.then(()=>_S({preferredAgent:se})).then(Me=>{h.current=Me.preferredAgent,xe===Wt.current&&l(Ie=>Ie&&{...Ie,preferredAgent:Me.preferredAgent})}).catch(Me=>{throw xe===Wt.current&&l(Ie=>Ie&&{...Ie,preferredAgent:h.current}),Me});return wr.current=Ee.catch(()=>{}),Ee},[]);M.useEffect(()=>{const se=()=>un(xe=>Math.min(xe,lp()));return window.addEventListener("resize",se),()=>window.removeEventListener("resize",se)},[]);const ei=M.useCallback(se=>{N.current=!1,T.current.clear(),z.current.clear();const xe=++D.current;Kx(se).then(Ee=>{if(mr.current!==se||j.current!==se||D.current!==xe)return;T.current=new Map(Ee.map(Ie=>[Ie.id,Ie]));const Me=[...z.current.values()].some(Ie=>{const mt=T.current.get(Ie.id);return!mt||mt.status!=="running"&&mt.updatedAt<=Ie.updatedAt});z.current.clear();for(const Ie of Ee){const mt=y.current.get(Ie.id);(!mt||mt.updatedAt{const mt=new Map(Ee.map(lt=>[lt.id,lt]));for(const lt of Ie){const Pt=mt.get(lt.id);(!Pt||Pt.updatedAt<=lt.updatedAt)&&mt.set(lt.id,lt)}return[...mt.values()]}),N.current=!0,Me&&Bs()}).catch(()=>{D.current===xe&&z.current.clear()})},[Bs]);M.useEffect(()=>{if(!m)return;const se=Pn.current;se&&qr.current.set(se,Cn.current),Pn.current=null,Pe.current=!1,Y(null),j.current=m,y.current.clear(),C.current.clear(),BJe(m).catch(()=>{}),k([]),v([]),P(null),ce(null),vt([]),Je([]),ie(!1),st([]),zt([]),Rt([]),On([]),_t(null),ur("files"),An(new Set),ht.current=[],Ce([]),de("experiments"),Ue(!1),Bt(!1),Nt(!1),rn(!1),Sn(!1),U("project"),HJe(m).then(k).catch(()=>{}),ei(m),gS(m).then(P).catch(()=>{})},[ei,m,On,_t]);const dr=M.useCallback(()=>{const se=mr.current;se&&gS(se).then(P).catch(()=>{})},[]),$s=M.useCallback(()=>{dr(),kn("chat"),Nt(!0),Qt("artifacts"),rn(!0)},[dr,Qt]);Ftt({onReconnect:()=>{const se=mr.current;se&&(j.current=se,y.current.clear(),C.current.clear(),ei(se))},onRun:se=>{if(se.projectId!==mr.current||se.projectId!==j.current)return;const xe=y.current.get(se.id),Ee=C.current.has(se.id);if(xe&&xe.updatedAt>se.updatedAt||(y.current.set(se.id,se),C.current.add(se.id),v(mt=>Rf(mt,se)),se.status!=="running"||(xe==null?void 0:xe.status)==="running"))return;const Me=T.current.get(se.id),Ie=N.current&&(!Me||Me.status!=="running"&&Me.updatedAt<=se.updatedAt);Ee&&xe||Ie?Bs():N.current||z.current.set(se.id,se)},onExperiment:se=>{se.projectId===mr.current&&k(xe=>Rf(xe,se))},onProject:se=>{s(xe=>xe?Rf(xe,se):[se])},onArtifacts:se=>{se===mr.current&&dr()}});const Oo=M.useCallback(()=>U("project"),[]),Kn=M.useCallback((se,xe="overview",Ee="preview")=>{const Me={id:se,view:xe};vt(Ie=>Ie.some(mt=>Ob(mt,Me))?Ie:[...Ie,Me]),St(Me,Ee),rn(!0)},[St]),Ci=M.useCallback((se,xe="preview")=>{const Ee=x.current.filter(Ie=>Ie.id===se||Ie.id.startsWith(se)),Me=Ee.length===1?Ee[0]:null;Me&&(ce(Me.id),Kn(Me.experimentId,"terminal",xe))},[Kn]),ua=M.useMemo(()=>new Map(S.map(se=>{var xe;return[se.id,((xe=se.title)==null?void 0:xe.trim())||se.slug||bo()]})),[S,n]),ti=pE(ua),ni=M.useMemo(()=>{const se=new Map;for(const xe of b)se.set(xe.id,ti.get(xe.experimentId)??bo());return se},[ti,b,n]),ds=pE(ni),Ei=M.useCallback(se=>{const xe=ds.get(se);if(xe)return xe;const Ee=[...ds].filter(([Me])=>Me.startsWith(se));return Ee.length===1?Ee[0][1]:""},[ds]),ri=M.useCallback(se=>{const xe=ti.get(se);if(xe)return xe;const Ee=[...ti].filter(([Me])=>Me.startsWith(se));return Ee.length===1?Ee[0][1]:""},[ti]),Io=M.useCallback((se,xe="preview")=>{const Ee=O.current.filter(Me=>Me.id===se||Me.id.startsWith(se));Ee.length===1&&Kn(Ee[0].id,"overview",xe)},[Kn]),Jr=M.useCallback(se=>{const xe=cn.findIndex(Ee=>Ob(Ee,se));xe!==-1&&(vt(Ee=>Ee.filter((Me,Ie)=>Ie!==xe)),_n(se,Zt(_e)===Zt(se)))},[cn,_n,_e]),Bn=M.useCallback((se,xe="preview")=>{const Ee=sL(se);Je(Me=>{const Ie=Me.findIndex(lt=>Mu(lt,se));if(Ie===-1)return[...Me,Ee];const mt=Me.slice();return mt[Ie]=Ee,mt}),St(se,xe),rn(!0)},[St]),da=M.useCallback((se,xe,Ee,Me,Ie,mt)=>{const lt=r==null?void 0:r.find(Fs=>Fs.id===m),Pt=m6t(se,lt==null?void 0:lt.repoPath,xe,(lt==null?void 0:lt.artifactsDir)??(lt==null?void 0:lt.filesDir),lt==null?void 0:lt.slug);if(!Pt)return null;const Rn=Ie?O.current.find(Fs=>Fs.id===Ie||Ie.length>=6&&Fs.id.startsWith(Ie)):void 0,zs=Ee??(Rn==null?void 0:Rn.branchName),ms=Pt.source==null||Pt.source==="repo";return zs&&ms&&(Pt.ref=zs),mt&&!Pt.ref&&ms&&(Pt.branchLabel=mt),Me!=null&&(Pt.line=Me,Pt.lineScrollRequest=++Oe.current),Pt},[r,m]),Bo=M.useCallback((se,xe,Ee,Me,Ie,mt,lt="preview")=>{const Pt=da(se,xe,Ee,Me,Ie,mt);Pt&&Bn(Pt,lt)},[Bn,da]),Ad=M.useCallback(se=>Bn({path:se,source:"artifacts"},"keepOpen"),[Bn]),fs=M.useCallback((se,xe,Ee,Me,Ie,mt="preview")=>{const lt=da(se,xe,Ie,Ee,Me);lt&&Bn(lt,mt)},[Bn,da]),gr=M.useCallback((se,xe)=>{In(se),xe()},[In]),Fl=M.useCallback(se=>{const xe=rt.findIndex(Me=>Mu(Me,se));if(xe===-1)return;const Ee=m?mo(m,B,se):null;Ee&&we.current.has(Ee)&&!window.confirm(dfe())||(Je(Me=>Me.filter((Ie,mt)=>mt!==xe)),Ee&&(qt.current.delete(Ee),we.current.delete(Ee)),B===$f&&Mu(se,{path:Ub,source:"artifacts"})&&ie(!1),_n(se,Zt(_e)===Zt(se)))},[B,rt,_n,m,_e]),fa=M.useCallback(se=>{se.lineScrollRequest!==void 0&&de(xe=>typeof xe!="object"||!("path"in xe)||!Mu(xe,se)||xe.lineScrollRequest!==se.lineScrollRequest?xe:Tf(xe))},[]),ha=M.useCallback((se,xe,Ee,Me="preview")=>{const Ie={kind:"plan",sessionId:xe,promptId:Ee,plan:se};st(mt=>{const lt=mt.findIndex(Rn=>Rn.promptId===Ee);if(lt===-1)return[...mt,Ie];const Pt=mt.slice();return Pt[lt]=Ie,Pt}),St(Ie,Me),rn(!0)},[St]),qi=M.useCallback(se=>{const xe=Xe.findIndex(Ee=>Ee.promptId===se.promptId);xe!==-1&&(st(Ee=>Ee.filter((Me,Ie)=>Ie!==xe)),_n(se,Zt(_e)===Zt(se)))},[_n,Xe,_e]),$o=M.useCallback((se,xe,Ee,Me="preview")=>{const Ie={kind:"subagent",sessionId:se,spawnPartId:xe,label:Ee};zt(mt=>mt.some(lt=>lt.spawnPartId===xe)?mt:[...mt,Ie]),St(Ie,Me),rn(!0)},[St]),Ho=M.useCallback(se=>{const xe=tt.findIndex(Ee=>Ee.spawnPartId===se.spawnPartId);xe!==-1&&(zt(Ee=>Ee.filter((Me,Ie)=>Ie!==xe)),_n(se,Zt(_e)===Zt(se)))},[_n,_e,tt]),[Ka,er]=M.useState({});M.useEffect(()=>{if(er(lt=>{const Pt=new Set(tt.map(Rn=>Rn.spawnPartId));return Object.keys(lt).every(Rn=>Pt.has(Rn))?lt:Object.fromEntries(Object.entries(lt).filter(([Rn])=>Pt.has(Rn)))}),tt.length===0)return;let se=!0;const xe=new Set,Ee=(lt,Pt,Rn)=>{er(zs=>{var Fs;let ms=zs;for(const gs of Pt)if(!(Rn&&xe.has(gs.spawnPartId)))for(const Po of lt){const Wi=z4(Po.parts,gs.spawnPartId);if(!Wi)continue;Rn||xe.add(gs.spawnPartId);const Vl={label:qpt(Wi),running:((Fs=Wi.state)==null?void 0:Fs.status)==="running"},Wl=ms[gs.spawnPartId];(!Wl||Wl.label!==Vl.label||Wl.running!==Vl.running)&&(ms===zs&&(ms={...zs}),ms[gs.spawnPartId]=Vl);break}return ms})};let Me=0;const Ie=()=>{const lt=++Me;for(const Pt of new Set(tt.map(Rn=>Rn.sessionId)))Hu(Pt).then(({messages:Rn})=>{se&<===Me&&Ee(Rn,tt.filter(zs=>zs.sessionId===Pt),!0)}).catch(()=>{})};Ie();const mt=Jf(lt=>{if(lt.type==="reconnected"){xe.clear(),Ie();return}if(lt.type!=="message")return;const Pt=tt.filter(Rn=>Rn.sessionId===lt.sessionId);Pt.length&&Ee([lt.message],Pt,!1)});return()=>{se=!1,mt()}},[tt]);const hs=M.useCallback((se,xe,Ee="files",Me="preview")=>{const Ie={code:!0,experimentId:se,branch:xe,view:Ee,toggled:new Set};Rt(mt=>mt.some(lt=>Ru(lt,Ie))?mt.map(lt=>Ru(lt,Ie)?{...lt,experimentId:se,view:Ee}:lt):[...mt,Ie]),St(Ie,Me),rn(!0)},[St]),Ar=M.useCallback((se,xe)=>{Rt(Ee=>Ee.map(Me=>Ru(Me,se)?{...Me,...xe}:Me))},[]),rs=M.useCallback(se=>{const xe=bt.findIndex(Ee=>Ru(Ee,se));xe!==-1&&(Rt(Ee=>Ee.filter((Me,Ie)=>Ie!==xe)),_n(se,Zt(_e)===Zt(se)))},[bt,_n,_e]),Vr=M.useCallback(()=>{kn("chat"),Bt(!0),Qt("files"),rn(!0)},[Qt]),_a=M.useCallback(se=>{se==="experiments"?Ue(!1):se==="files"?Bt(!1):Nt(!1),_n(se,_e===se)},[_n,_e]),Ns=se=>{se.preventDefault(),se.currentTarget.setPointerCapture(se.pointerId);const Ee=document.body.style.userSelect;document.body.style.userSelect="none";const Me=wn,Ie=se.clientX,mt=dt;let lt=!1;function Pt(){window.removeEventListener("pointermove",Rn),window.removeEventListener("pointerup",Pt),window.removeEventListener("pointercancel",Pt),document.body.style.userSelect=Ee}function Rn(zs){if(Me){const Po=zs.clientX-Ie;if(lt||PoFs+S6t){Sn(!0);return}Sn(!1);const gs=Math.min(Math.max(ms,Ch),Fs);un(gs);try{localStorage.setItem(Nx,String(gs))}catch{}}window.addEventListener("pointermove",Rn),window.addEventListener("pointerup",Pt),window.addEventListener("pointercancel",Pt)},Ya=(se,xe)=>{s(Ee=>Ee?Rf(Ee,se):[se]),g(se.id),$t(!1),xe&&(Ui({projectId:se.id,message:xe}),qe("git"))},pa=se=>{s(xe=>xe&&xe.filter(Ee=>Ee.id!==se)),m===se&&g(null)},ss=typeof _e=="object"&&"id"in _e?_e:null,Mn=typeof _e=="object"&&"path"in _e?_e:null,fr=(Mn==null?void 0:Mn.source)==="artifacts"&&H?_h(H.entries,Mn.path):null,Gi=fr?`${fr.modifiedAt}:${fr.size}`:null,Vi=B===$f&&V?rt.find(se=>Mu(se,{path:Ub,source:"artifacts"})):void 0,si=Vi?[Vi]:[],_s=typeof _e=="object"&&"kind"in _e&&_e.kind==="plan"?_e:null,Wr=typeof _e=="object"&&"kind"in _e&&_e.kind==="subagent"?_e:null,Hs=typeof _e=="object"&&"code"in _e?_e:null,Sr=Hs?bt.find(se=>Ru(se,Hs))??null:null,Ni=new Map;for(const se of[...cn,...rt,...Xe,...tt,...bt])Ni.set(Zt(se),se);const Ul=Vi?Zt(Vi):null,ql=et.filter(se=>se!==Ul).map(se=>Ni.get(se)).filter(_6t),Xa=se=>jt!==null&&Zt(jt)===Zt(se),Xc=se=>f.jsx(xl,{active:Mn!==null&&Mu(Mn,se),label:se.path.split("/").pop()||se.path,icon:f.jsx(IN,{size:12,className:"shrink-0"}),preview:Xa(se),onSelect:()=>Qt(se),onPromote:()=>In(se),onClose:()=>Fl(se)},`file:${lw(se)}`),Ps=ss?S.find(se=>se.id===ss.id)??null:null,ps=Sr?S.find(se=>se.id===Sr.experimentId)??null:null,Td=se=>{var Ee,Me;if("path"in se)return Xc(se);if("id"in se){const Ie=S.find(mt=>mt.id===se.id);return f.jsx(xl,{active:ss!==null&&Ob(ss,se),label:Ie?Ie.title||Ie.slug:"…",icon:se.view==="overview"?f.jsx(UZe,{size:12,className:"shrink-0"}):f.jsx(nd,{size:12,className:"shrink-0"}),preview:Xa(se),onSelect:()=>Qt(se),onPromote:()=>In(se),onClose:()=>Jr(se)},Zt(se))}if("kind"in se&&se.kind==="plan")return f.jsx(xl,{active:_s!==null&&_s.promptId===se.promptId,label:LE(),icon:f.jsx(Vx,{size:12,className:"shrink-0"}),preview:Xa(se),onSelect:()=>Qt(se),onPromote:()=>In(se),onClose:()=>qi(se)},Zt(se));if("kind"in se)return f.jsx(xl,{active:Wr!==null&&Wr.spawnPartId===se.spawnPartId,label:((Ee=Ka[se.spawnPartId])==null?void 0:Ee.label)??se.label??DG(),shimmer:((Me=Ka[se.spawnPartId])==null?void 0:Me.running)??!1,icon:f.jsx(Wx,{size:12,className:"shrink-0"}),preview:Xa(se),onSelect:()=>Qt(se),onPromote:()=>In(se),onClose:()=>Ho(se)},Zt(se));const xe=S.find(Ie=>Ie.id===se.experimentId);return f.jsx(xl,{active:Sr!==null&&Ru(Sr,se),label:(xe==null?void 0:xe.slug)??se.branch,icon:f.jsx(Qf,{size:12,className:"shrink-0"}),preview:Xa(se),onSelect:()=>Qt(se),onPromote:()=>In(se),onClose:()=>rs(se)},Zt(se))};if(d)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsxs("div",{className:hE,children:[f.jsx("p",{children:d}),f.jsx($e,{variant:"primary",onClick:Gr,children:Rc()})]}),e.kind==="ssh"&&f.jsx(Of,{runtime:e,corner:!0})]});if(r===null||a===null)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsx("div",{className:hE,children:f.jsx(Dt,{})}),e.kind==="ssh"&&f.jsx(Of,{runtime:e,corner:!0})]});if(r.length===0)return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsx(ZC,{}),Os?f.jsx(r9,{remote:e.kind==="ssh",projects:r,onOpen:g,onCreated:Ya,onDeleted:pa}):f.jsx(Ebt,{preferredAgent:a.preferredAgent,onDone:(se,xe)=>{H0t(),h.current=xe,s([se]),g(se.id),l(Ee=>({...Ee??{tourCompleted:!1},onboardingCompleted:!0,preferredAgent:xe}))}}),e.kind==="ssh"&&f.jsx(Of,{runtime:e,corner:!0})]});const Zc=f.jsx(kbt,{projectName:((Gl=r.find(se=>se.id===m))==null?void 0:Gl.name)??"",onHome:()=>$t(!0),onNewProject:()=>Tn(!0),onRepository:()=>qe("git"),onCollapse:()=>at(!1)});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsx(ZC,{}),e.kind==="local"&&f.jsx(n_t,{status:t}),on?f.jsxs(f.Fragment,{children:[f.jsx(r9,{remote:e.kind==="ssh",projects:r,onOpen:se=>{g(se),$t(!1)},onCreated:Ya,onDeleted:pa}),e.kind==="ssh"&&f.jsx(Of,{runtime:e,corner:!0})]}):f.jsxs("div",{className:"app-body flex flex-1 min-h-0 py-0 px-3.5",children:[m&&f.jsx(rmt,{projectId:m,projectName:(sn==null?void 0:sn.name)??"",railHeader:Zc,railOpen:Ye,onShowRail:()=>at(!0),mainView:Wn,onSelectMainView:qe,experimentsActive:Wn==="chat"&&Vn&&_e==="experiments",filesActive:Wn==="chat"&&Vn&&_e==="files",artifactsActive:Wn==="chat"&&Vn&&_e==="artifacts",onOpenExperiments:Bs,onOpenArtifacts:$s,onOpenFile:fs,onOpenRun:Ci,runExperimentName:Ei,onOpenExperiment:Io,experimentName:ri,onOpenPlan:ha,onOpenSubagent:$o,onOpenWorktree:Vr,composerPrefill:sn&&c0(sn.id)&&(a==null?void 0:a.tourCompleted)===!1?EJe:null,runtime:e,onOpenDemoWelcome:sn&&c0(sn.id)?ns:void 0,onActiveSessionChange:Ht,preferredAgent:a.preferredAgent,onPreferredAgentChange:Lo,children:Wn==="skills"?f.jsx(ebt,{}):Wn!=="chat"?f.jsx(C0t,{remote:e.kind==="ssh",tab:Wn,project:sn,githubPublicationError:Ur&&Ur.projectId===(sn==null?void 0:sn.id)?Ur.message:null,onProjectUpdate:se=>{s(xe=>xe?Rf(xe,se):[se]),se.githubEnabled&&Ui(null)},onSelectTab:qe}):null}),Wn==="chat"&&Vn&&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 ${wn?"max":""}`,style:wn?void 0:{width:dt},"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 ${wn?"cursor-e-resize":"cursor-col-resize"}`,title:wn?kq():xq(),onPointerDown:Ns}),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:[si.map(Xc),He&&f.jsx(xl,{active:_e==="files",label:Vq(),icon:f.jsx(Qf,{size:12,className:"shrink-0"}),onSelect:()=>Qt("files"),onClose:()=>_a("files")}),Et&&f.jsx(xl,{active:_e==="artifacts",label:uq(),icon:f.jsx(Ux,{size:12,className:"shrink-0"}),onSelect:()=>Qt("artifacts"),onClose:()=>_a("artifacts")}),Le&&f.jsx(xl,{active:_e==="experiments",label:Fq(),icon:f.jsx(Fx,{size:12,className:"shrink-0"}),onSelect:()=>Qt("experiments"),onClose:()=>_a("experiments")}),ql.map(Td)]}),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(Kt,{title:wn?U6():F6(),"aria-label":wn?U6():F6(),onClick:()=>Sn(se=>!se),children:wn?f.jsx(UQe,{size:14}):f.jsx(HQe,{size:14})}),f.jsx(Kt,{title:$6(),"aria-label":$6(),onClick:()=>{Pe.current=!1,rn(!1),Sn(!1)},children:f.jsx(Zr,{size:14})})]})]}),_e==="artifacts"?f.jsx(vo,{children:sn&&f.jsx(Vvt,{project:sn,artifacts:H,onChanged:dr,onOpenFile:Ad,canRenameFile:se=>!we.current.has(mo(sn.id,B,{path:se,source:"artifacts"})),onOpenStorage:e.kind==="ssh"?void 0:()=>qe("storage")},sn.id)}):_e==="experiments"?f.jsxs(vo,{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:L,children:[f.jsx(Kt,{size:"small",ref:X,className:"experiment-scope-trigger",active:ae==="agent",title:Dq({scope:ae==="agent"?H6():P6()}),"aria-label":Xq(),"aria-expanded":J,onClick:()=>$(se=>!se),children:f.jsx(CQe,{size:16,strokeWidth:2.5})}),J&&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(Nr,{"aria-pressed":ae==="agent",disabled:!B||!le,title:B?le?void 0:eG():lG(),onClick:()=>{U("agent"),$(!1)},children:[f.jsx("span",{children:H6()}),ae==="agent"&&f.jsx(mi,{size:13})]}),f.jsxs(Nr,{"aria-pressed":ae==="project",onClick:()=>{U("project"),$(!1)},children:[f.jsx("span",{children:P6()}),ae==="project"&&f.jsx(mi,{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":Bq(),children:[f.jsx("button",{className:F==="table"?"active":"","aria-pressed":F==="table",onClick:()=>W("table"),children:BG()}),f.jsx("button",{className:F==="tree"?"active":"","aria-pressed":F==="tree",onClick:()=>W("tree"),children:FG()})]})]})]}),f.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:F==="tree"?sn&&f.jsx(h6t,{experiments:S,runs:q,project:sn,onOpenView:Kn,onOpenCode:hs,agentSessionId:ae==="agent"?B:null,onShowProjectScope:Oo}):f.jsx(Ibt,{runs:q,emptyHint:ae==="agent"&&S.length>0?sG():void 0,experiments:re,onOpen:(se,xe)=>{Kn(se.id,"overview",xe)},onOpenLogs:(se,xe,Ee)=>{ce(xe),Kn(se,"terminal",Ee)},onOpenCode:(se,xe)=>{const Ee=S.find(Me=>Me.id===se);Ee&&hs(Ee.id,Ee.branchName,"files",xe)},onCancel:JN})})]}):_e==="files"?f.jsx(vo,{children:sn?f.jsx(Dvt,{sessionId:B??void 0,project:sn,view:nn,toggled:yr,onViewChange:ur,onToggledChange:An,canRenameFile:se=>!we.current.has(mo(sn.id,B,{path:se,source:"repo",sessionId:B??void 0})),onOpenFile:(se,xe,Ee,Me)=>Bo(se,xe,Ee,void 0,void 0,void 0,Me)},`files:${B??`project:${sn.id}`}`):f.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:f.jsx(Yu,{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(BN,{size:22}),f.jsx("p",{children:wG()})]})})})}):Mn?f.jsx(vo,{children:m&&f.jsx(Sbt,{remote:e.kind==="ssh",projectId:m,path:Mn.path,source:Mn.source,sessionId:Mn.source==="artifacts"?B??void 0:Mn.sessionId,gitRef:Mn.ref,line:Mn.line,branchLabel:g6t(Mn,sn==null?void 0:sn.baselineBranch),artifactVersion:Gi,artifactEntries:Mn.source==="artifacts"?H==null?void 0:H.entries:void 0,initialBuffer:we.current.get(mo(m,B,Mn)),onBufferStateChange:se=>{const xe=mo(m,B,Mn);se?we.current.set(xe,se):we.current.delete(xe)},onOpenFile:(se,xe,Ee,Me)=>gr(Mn,()=>Bo(se,xe,Ee,void 0,void 0,void 0,Me)),scrollPosition:qt.current.get(mo(m,B,Mn)),onScrollPositionChange:se=>{qt.current.set(mo(m,B,Mn),se)},lineScrollRequest:Mn.lineScrollRequest,onLineScrollRequestHandled:()=>fa(Mn),onEdit:()=>In(Mn)},mo(m,B,Mn))}):_s?f.jsx(vo,{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(Oa,{text:_s.plan,onOpenFile:(se,xe,Ee,Me,Ie)=>gr(_s,()=>Bo(se,_s.sessionId,Me,xe,Ee,void 0,Ie))})})}):Wr?f.jsx(smt,{sessionId:Wr.sessionId,spawnPartId:Wr.spawnPartId,onOpenFile:(se,xe,Ee,Me,Ie)=>gr(Wr,()=>fs(se,Wr.sessionId,xe,Ee,Me,Ie)),onOpenRun:(se,xe)=>gr(Wr,()=>Ci(se,xe)),runExperimentName:Ei,onOpenExperiment:(se,xe)=>gr(Wr,()=>Io(se,xe)),experimentName:ri,onOpenSubagent:(se,xe,Ee)=>gr(Wr,()=>$o(Wr.sessionId,se,xe,Ee))},Wr.spawnPartId):Sr?f.jsx(vo,{children:m&&sn&&Sr&&ps&&f.jsx(Rvt,{projectId:m,project:sn,experiment:ps,view:Sr.view,toggled:Sr.toggled,onViewChange:se=>Ar(Sr,{view:se}),onToggledChange:se=>Ar(Sr,{toggled:se}),onOpenFile:(se,xe,Ee,Me)=>gr(Sr,()=>Bo(se,xe,Ee,void 0,void 0,ps.branchName,Me))},`code:${Sr.branch}`)}):f.jsx(vo,{children:ss&&Ps&&sn&&f.jsx(ibt,{experiment:Ps,project:sn,view:ss.view,runs:b,selectedRunId:oe,onSelectRun:ce,parentExperiment:S.find(se=>se.id===Ps.parentExperimentId)??null,onOpenView:(se,xe,Ee)=>{xe&&ce(xe),gr(ss,()=>Kn(Ps.id,se,Ee))},onOpenCode:(se,xe)=>gr(ss,()=>hs(Ps.id,Ps.branchName,se,xe))},`${ss.id}:${ss.view}`)})]})]}),Tt&&f.jsx(mR,{remote:e.kind==="ssh",onClose:()=>Tn(!1),onCreated:(se,xe)=>{Tn(!1),Ya(se,xe)}}),Cs&&!on&&sn&&c0(sn.id)&&f.jsx(Bbt,{onClose:Is,onCreateProject:ca})]})}const E6t="data:image/svg+xml,"+encodeURIComponent('');function N6t(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?E6t:"/favicon.svg")}function gE(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function z6t(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!gE("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&_z(n),!gE("orx:locale")&&t&&SE(t)&&zN(t)}function j6t(e){return e.includes("ssh ")&&e.includes("failed")}function vE({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:nN({host:ke(e)})}),f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:$b()}),f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:rke()})]})})}function bE({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var D,O,H;const{session:s}=e,[a,l]=M.useState(s.installPaths),[o,c]=M.useState(!1),[d,_]=M.useState(null);M.useEffect(()=>l(s.installPaths),[(D=s.installPaths)==null?void 0:D.binary,(O=s.installPaths)==null?void 0:O.database,(H=s.installPaths)==null?void 0:H.cache]);async function h(){if(a){c(!0);try{await zet(a)}catch(P){Br(P instanceof Error?P.message:String(P),"error")}finally{c(!1)}}}async function m(P=!1){r(P?s.error:null),c(!0);try{await jet()}catch(F){Br(F instanceof Error?F.message:String(F),"error")}finally{c(!1)}}async function g(){c(!0);try{await sz()}catch(P){Br(P instanceof Error?P.message:String(P),"error")}finally{c(!1)}}async function S(){c(!0);try{_(await iz())}catch(P){Br(P instanceof Error?P.message:String(P),"error")}finally{c(!1)}}async function k(){if(d){c(!0);try{await az(d),_(null)}catch(P){_(null),Br(P instanceof Error?P.message:String(P),"error")}finally{c(!1)}}}async function b(){c(!0);try{await Aet()}catch(P){Br(P instanceof Error?P.message:String(P),"error")}finally{c(!1)}}const v=s.status==="applying"||o,x=s.status==="needsInstall",y=s.status==="needsUpdate",C=a&&x,j=["connecting","applying","reconnecting"].includes(s.status),N=s.status==="disconnected"&&s.error!==null&&j6t(s.error)&&t!==s.error&&!s.canStartNewHost,T=x?Tke():y?FCe():s.status==="applying"?cSe({host:ke(s.host)}):s.status==="reconnecting"?m8e({host:ke(s.host)}):s.status==="disconnected"?s.error?JSe({host:ke(s.host)}):s.canStartNewHost?dke({host:ke(s.host)}):nN({host:ke(s.host)}):zSe({host:ke(s.host)}),z=s.error??(s.canStartNewHost?oke():x?Uke({user:ke(s.user??""),host:ke(s.host)}):y?BCe({host:ke(s.host)}):s.status==="applying"?iSe():s.status==="reconnecting"?f8e():s.status==="disconnected"?VSe():kSe());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:[j&&f.jsx(Dt,{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}),!N&&f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:z})]})]}),N&&f.jsx(x4,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void m(!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:Nke()}),[["binary",pke()],["database",Ske()],["cache",bke()]].map(([P,F])=>f.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[F,f.jsx(id,{value:a[P],onChange:W=>l({...a,[P]:W.target.value}),disabled:v,dir:"ltr"})]},P)),!s.error&&f.jsx("div",{className:"flex justify-end pt-1",children:f.jsx($e,{variant:"primary",disabled:v,onClick:()=>void h(),children:v?f.jsxs(f.Fragment,{children:[f.jsx(Dt,{})," ",Lke()]}):y?eS():hN()})})]}),y&&a&&f.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&f.jsx($e,{variant:"primary",disabled:v,onClick:()=>void h(),children:v?f.jsxs(f.Fragment,{children:[f.jsx(Dt,{})," ",VCe()]}):eS()})}),s.status==="disconnected"&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?f.jsxs($e,{variant:"primary",disabled:o,onClick:()=>void b(),children:[o?f.jsx(Dt,{}):null,s.error?Q7():E8e()]}):f.jsxs($e,{variant:"primary",disabled:o,onClick:()=>void m(),children:[o?f.jsx(Dt,{}):null,Q7()]})}),(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($e,{disabled:o,onClick:()=>void g(),children:Hb()})}),y&&s.error&&f.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[f.jsx($e,{disabled:o,onClick:()=>void g(),children:Hb()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid m(),children:[o?f.jsx(Dt,{}):null,Z7()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid S(),children:[o?f.jsx(Dt,{}):null,rN()]})]}),x&&s.error&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsxs($e,{variant:"primary",disabled:o,onClick:()=>void m(),children:[o?f.jsx(Dt,{}):null,Z7()]})})]})}),d&&f.jsx(UT,{host:s.host,preview:d,currentClientAttached:!1,stopping:o,onClose:()=>{o||_(null)},onConfirm:()=>void k()})]})}function A6t({children:e}){const n=M.useRef(null);return M.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 T6t(){const e=location.pathname==="/remote-launch",[n,t]=M.useState(null),[r,s]=M.useState(null),a=M.useRef(!1),l=M.useRef(!1),o=M.useRef(!1),[c,d]=M.useState(null);if(M.useEffect(()=>{if(e)return;let m=!0,g;const S=async()=>{try{const k=await Cet();if(!m)return;k.kind==="ssh"&&(o.current||(o.current=!0,z6t(k)),k.session.status==="connected"?(a.current=!0,l.current=!0,d(null)):k.session.status==="disconnected"&&k.session.error===null&&(l.current=!1)),t(b=>JSON.stringify(b)===JSON.stringify(k)?b:k),s(null),k.kind==="ssh"&&(g=window.setTimeout(()=>void S(),2e3))}catch(k){m&&(s(k instanceof Error?k.message:String(k)),g=window.setTimeout(()=>void S(),2e3))}};return S(),()=>{m=!1,g!==void 0&&window.clearTimeout(g)}},[e]),M.useEffect(()=>{const m=(n==null?void 0:n.kind)==="ssh";N6t(m),m&&(!a.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(Dt,{})," ",i8e()]});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($e,{onClick:()=>location.reload(),children:Rc()})]}):f.jsx(Dt,{})});if(n.kind==="local")return f.jsx(mE,{runtime:n});if(!(l.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?f.jsx(vE,{host:n.session.host}):f.jsx(bE,{runtime:n,retriedInteractiveError:c,setRetriedInteractiveError:d});const h=n.session.status!=="connected"||r!==null;return f.jsxs("div",{className:"relative h-full",children:[f.jsx("div",{className:"h-full",inert:h,children:f.jsx(mE,{runtime:n})}),h&&f.jsx(A6t,{children:r?f.jsx(vE,{host:n.session.host,overlay:!0}):f.jsx(bE,{runtime:n,overlay:!0,retriedInteractiveError:c,setRetriedInteractiveError:d})})]})}const M6t=E();document.documentElement.lang=M6t;document.documentElement.dir="ltr";OO.createRoot(document.getElementById("root")).render(f.jsxs(M.StrictMode,{children:[f.jsx(T6t,{}),f.jsx(Irt,{})]})); diff --git a/ui/dist/assets/index-ztXpeWfh.css b/ui/dist/assets/index-ztXpeWfh.css deleted file mode 100644 index e61e6571..00000000 --- a/ui/dist/assets/index-ztXpeWfh.css +++ /dev/null @@ -1 +0,0 @@ -/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--spacing:.25rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:6px;--radius-md:8px;--radius-2xl:1rem;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-3xl:64px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--color-diff-selection:var(--surface)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-selection:color-mix(in oklab, var(--surface) 76%, var(--primary))}}:root,:host{--color-diff-gutter-selection:var(--surface)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-gutter-selection:color-mix(in oklab, var(--surface) 68%, var(--primary))}}:root,:host{--color-diff-insert-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-gutter:color-mix(in oklab, var(--base) 84%, var(--accent-green))}}:root,:host{--color-diff-delete-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-gutter:color-mix(in oklab, var(--base) 86%, var(--accent-red))}}:root,:host{--color-diff-insert-code:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-code:color-mix(in oklab, var(--base) 91%, var(--accent-green))}}:root,:host{--color-diff-delete-code:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-code:color-mix(in oklab, var(--base) 92%, var(--accent-red))}}:root,:host{--color-diff-insert-edit:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-edit:color-mix(in oklab, var(--base) 72%, var(--accent-green))}}:root,:host{--color-diff-delete-edit:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-edit:color-mix(in oklab, var(--base) 78%, var(--accent-red))}}:root,:host{--color-diff-omit-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-omit-gutter:color-mix(in oklab, var(--base) 86%, var(--text))}}}@layer base{*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--base);color:var(--text);font-family:var(--sans);font-size:1rem;line-height:1.45;overflow:hidden}::selection{background:var(--highlight)}.chat-thread-inner ::selection{background:var(--chat-annotation-highlight)}::highlight(chat-annotations){background:var(--chat-annotation-highlight)}.file-view-editarea::selection{background:var(--editor-selection)}button{font:inherit;color:inherit;cursor:pointer;background:0 0;border:none;padding:0}input,textarea,select{font:inherit;color:var(--text);background:var(--base);border:1px solid var(--border);border-radius:var(--radius-md);outline:none;padding:6px 10px}input:focus,textarea:focus,select:focus{border-color:var(--text)}input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--border);border-radius:var(--radius-sm);background-clip:padding-box;border:2px solid #0000}::-webkit-scrollbar-track{background:0 0}}@layer vendor{.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-color-default:inherit;--xy-node-border-default:1px solid #1a192b;--xy-node-background-color-default:#fff;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #00000014;--xy-node-boxshadow-selected-default:0 0 0 .5px #1a192b;--xy-node-border-radius-default:3px;--xy-handle-background-color-default:#1a192b;--xy-handle-border-color-default:#fff;--xy-selection-background-color-default:#0059dc14;--xy-selection-border-default:1px dotted #0059dccc;--xy-controls-button-background-color-default:#fefefe;--xy-controls-button-background-color-hover-default:#f4f4f4;--xy-controls-button-color-default:inherit;--xy-controls-button-color-hover-default:inherit;--xy-controls-button-border-color-default:#eee;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#fff;--xy-edge-label-color-default:inherit;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#777;--xy-background-pattern-lines-color-default:#777;--xy-background-pattern-cross-color-default:#777;--xy-node-color-default:#f8f8f8;--xy-node-border-default:1px solid #3c3c3c;--xy-node-background-color-default:#1e1e1e;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #ffffff14;--xy-node-boxshadow-selected-default:0 0 0 .5px #999;--xy-handle-background-color-default:#bebebe;--xy-handle-border-color-default:#1e1e1e;--xy-selection-background-color-default:#c8c8dc14;--xy-selection-border-default:1px dotted #c8c8dccc;--xy-controls-button-background-color-default:#2b2b2b;--xy-controls-button-background-color-hover-default:#3e3e3e;--xy-controls-button-color-default:#f8f8f8;--xy-controls-button-color-hover-default:#fff;--xy-controls-button-border-color-default:#5b5b5b;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#141414;--xy-edge-label-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{-webkit-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color,var(--xy-handle-border-color-default));border-radius:100%;width:6px;min-width:5px;height:6px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{box-shadow:var(--xy-controls-box-shadow,var(--xy-controls-box-shadow-default));flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{background:var(--xy-controls-button-background-color,var(--xy-controls-button-background-color-default));border:none;border-bottom:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)));width:26px;height:26px;color:var(--xy-controls-button-color-props,var(--xy-controls-button-color,var(--xy-controls-button-color-default)));cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border-radius:var(--xy-node-border-radius,var(--xy-node-border-radius-default));width:150px;color:var(--xy-node-color,var(--xy-node-color-default));text-align:center;border:var(--xy-node-border,var(--xy-node-border-default));background-color:var(--xy-node-background-color,var(--xy-node-background-color-default));padding:10px;font-size:12px}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover,var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected,var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color,var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var(--xy-controls-button-background-color-hover-props,var(--xy-controls-button-background-color-hover,var(--xy-controls-button-background-color-hover-default)));color:var(--xy-controls-button-color-hover-props,var(--xy-controls-button-color-hover,var(--xy-controls-button-color-hover-default)))}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)))}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color,var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color,var(--xy-edge-label-color-default))}.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;top:0;right:0;bottom:0;left:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2)format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff)format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff)format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff)format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2)format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff)format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2)format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff)format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2)format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff)format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2)format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff)format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2)format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff)format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2)format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff)format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff)format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff)format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff)format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2)format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff)format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2)format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff)format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2)format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff)format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC)format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff)format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2)format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff)format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2)format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff)format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf)format("truetype")}.katex{text-indent:0;text-rendering:auto;font:1.21em/1.2 KaTeX_Main,Times New Roman,serif;position:relative}.katex *{border-color:currentColor;-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.16.47"}.katex .katex-mathml{clip-path:inset(50%);border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{white-space:nowrap;width:min-content;position:relative}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.katex .vlist-r{display:table-row}.katex .vlist{vertical-align:bottom;display:table-cell;position:relative}.katex .vlist>span{height:0;display:block;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.katex .vbox{flex-direction:column;align-items:baseline;display:inline-flex}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{flex-direction:row;display:inline-flex}.katex .thinbox{width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{line-height:0;display:inline}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline{border-bottom-style:dashed;width:100%;display:inline-block}.katex .sqrt>.root{margin-left:.277778em;margin-right:-.555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.833333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.714286em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.857143em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14286em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71429em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96286em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55429em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.416667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.583333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.833333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.347222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.416667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.486111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.694444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.833333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44028em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.289352em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.347222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.405093em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.520833em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.578704em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.694444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.833333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.289296em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.385728em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.433944em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.578592em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.694311em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.833173em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.200965em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.241158em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.281351em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.321543em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.361736em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.401929em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.482315em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.694534em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.833601em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{width:.12em;display:inline-block}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{min-width:1px;display:inline-block}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;height:inherit;width:100%;display:block;position:absolute}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{width:50.2%;position:absolute;left:0;overflow:hidden}.katex .halfarrow-right{width:50.2%;position:absolute;right:0;overflow:hidden}.katex .brace-left{width:25.1%;position:absolute;left:0;overflow:hidden}.katex .brace-center{width:50%;position:absolute;left:25%;overflow:hidden}.katex .brace-right{width:25.1%;position:absolute;right:0;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{text-align:left;display:inline-block;position:absolute;right:calc(50% + .3em)}.katex .cd-label-right{text-align:right;display:inline-block;position:absolute;left:calc(50% + .3em)}.katex-display{text-align:center;margin:1em 0;display:block}.katex-display>.katex{text-align:center;white-space:nowrap;display:block}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo}:root{--diff-background-color:initial;--diff-text-color:initial;--diff-font-family:Consolas,Courier,monospace;--diff-selection-background-color:#b3d7ff;--diff-selection-text-color:var(--diff-text-color);--diff-gutter-insert-background-color:#d6fedb;--diff-gutter-insert-text-color:var(--diff-text-color);--diff-gutter-delete-background-color:#fadde0;--diff-gutter-delete-text-color:var(--diff-text-color);--diff-gutter-selected-background-color:#fffce0;--diff-gutter-selected-text-color:var(--diff-text-color);--diff-code-insert-background-color:#eaffee;--diff-code-insert-text-color:var(--diff-text-color);--diff-code-delete-background-color:#fdeff0;--diff-code-delete-text-color:var(--diff-text-color);--diff-code-insert-edit-background-color:#c0dc91;--diff-code-insert-edit-text-color:var(--diff-text-color);--diff-code-delete-edit-background-color:#f39ea2;--diff-code-delete-edit-text-color:var(--diff-text-color);--diff-code-selected-background-color:#fffce0;--diff-code-selected-text-color:var(--diff-text-color);--diff-omit-gutter-line-color:#cb2a1d}.diff{background-color:var(--diff-background-color);border-collapse:collapse;color:var(--diff-text-color);table-layout:fixed;width:100%}.diff::selection{background-color:#b3d7ff;background-color:var(--diff-selection-background-color);color:var(--diff-selection-text-color)}.diff td{vertical-align:top;padding-top:0;padding-bottom:0}.diff-line{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);line-height:1.5}.diff-gutter>a{color:inherit;display:block}.diff-gutter{cursor:pointer;text-align:right;-webkit-user-select:none;user-select:none;padding:0 1ch}.diff-gutter-insert{background-color:#d6fedb;background-color:var(--diff-gutter-insert-background-color);color:var(--diff-gutter-insert-text-color)}.diff-gutter-delete{background-color:#fadde0;background-color:var(--diff-gutter-delete-background-color);color:var(--diff-gutter-delete-text-color)}.diff-gutter-omit{cursor:default}.diff-gutter-selected{background-color:#fffce0;background-color:var(--diff-gutter-selected-background-color);color:var(--diff-gutter-selected-text-color)}.diff-code{word-wrap:break-word;white-space:pre-wrap;word-break:break-all;padding:0 0 0 .5em}.diff-code-edit{color:inherit}.diff-code-insert{background-color:#eaffee;background-color:var(--diff-code-insert-background-color);color:var(--diff-code-insert-text-color)}.diff-code-insert .diff-code-edit{background-color:#c0dc91;background-color:var(--diff-code-insert-edit-background-color);color:var(--diff-code-insert-edit-text-color)}.diff-code-delete{background-color:#fdeff0;background-color:var(--diff-code-delete-background-color);color:var(--diff-code-delete-text-color)}.diff-code-delete .diff-code-edit{background-color:#f39ea2;background-color:var(--diff-code-delete-edit-background-color);color:var(--diff-code-delete-edit-text-color)}.diff-code-selected{background-color:#fffce0;background-color:var(--diff-code-selected-background-color);color:var(--diff-code-selected-text-color)}.diff-widget-content{vertical-align:top}.diff-gutter-col{width:7ch}.diff-gutter-omit{height:0}.diff-gutter-omit:before{background-color:#cb2a1d;background-color:var(--diff-omit-gutter-line-color);content:" ";white-space:pre;width:2px;height:100%;margin-left:4.6ch;display:block;overflow:hidden}.diff-decoration{-webkit-user-select:none;user-select:none;line-height:1.5}.diff-decoration-content{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);padding:0}}@layer components;@layer utilities{.\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-14{inset:calc(var(--spacing) * -14)}.-inset-\[7px\]{top:-7px;right:-7px;bottom:-7px;left:-7px}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{inset-block:0}.start-0{inset-inline-start:calc(var(--spacing) * 0)}.start-1\/2{inset-inline-start:50%}.start-2{inset-inline-start:calc(var(--spacing) * 2)}.start-3{inset-inline-start:calc(var(--spacing) * 3)}.-end-\[3px\]{inset-inline-end:-3px}.end-0{inset-inline-end:calc(var(--spacing) * 0)}.end-1\.5{inset-inline-end:calc(var(--spacing) * 1.5)}.end-3\.5{inset-inline-end:calc(var(--spacing) * 3.5)}.top-0{top:0}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-\[calc\(100\%_\+_6px\)\]{top:calc(100% + 6px)}.bottom-0{bottom:0}.bottom-\[calc\(100\%_\+_4px\)\]{bottom:calc(100% + 4px)}.bottom-\[calc\(100\%_\+_6px\)\]{bottom:calc(100% + 6px)}.bottom-\[calc\(100\%_\+_8px\)\]{bottom:calc(100% + 8px)}.bottom-full{bottom:100%}.left-1\/2{left:50%}.z-0{z-index:0}.z-1{z-index:1}.z-2{z-index:2}.z-4{z-index:4}.z-5{z-index:5}.z-6{z-index:6}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-60{z-index:60}.z-100{z-index:100}.z-200{z-index:200}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.m-3{margin:calc(var(--spacing) * 3)}.m-5{margin:calc(var(--spacing) * 5)}.mx-0{margin-inline:0}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.-my-0\.5{margin-block:calc(var(--spacing) * -.5)}.my-0{margin-block:0}.my-2{margin-block:calc(var(--spacing) * 2)}.my-2\.5{margin-block:calc(var(--spacing) * 2.5)}.my-3{margin-block:calc(var(--spacing) * 3)}.my-3\.5{margin-block:calc(var(--spacing) * 3.5)}.my-\[5px\]{margin-block:5px}.ms-0{margin-inline-start:0}.ms-1{margin-inline-start:var(--spacing)}.ms-3\.5{margin-inline-start:calc(var(--spacing) * 3.5)}.ms-6{margin-inline-start:calc(var(--spacing) * 6)}.ms-auto{margin-inline-start:auto}.me-0{margin-inline-end:0}.me-2{margin-inline-end:calc(var(--spacing) * 2)}.me-3\.5{margin-inline-end:calc(var(--spacing) * 3.5)}.mt-0{margin-top:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-4\.5{margin-top:calc(var(--spacing) * 4.5)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-5\.5{margin-top:calc(var(--spacing) * 5.5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-7{margin-top:calc(var(--spacing) * 7)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-\[5px\]{margin-top:5px}.mt-\[13px\]{margin-top:13px}.mt-auto{margin-top:auto}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-3\.5{margin-bottom:calc(var(--spacing) * 3.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-4\.5{margin-bottom:calc(var(--spacing) * 4.5)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-5\.5{margin-bottom:calc(var(--spacing) * 5.5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.box-border{box-sizing:border-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.field-sizing-content{field-sizing:content}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-10\.5{height:calc(var(--spacing) * 10.5)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-40{height:calc(var(--spacing) * 40)}.h-\[7px\]{height:7px}.h-\[9px\]{height:9px}.h-\[13px\]{height:13px}.h-\[15px\]{height:15px}.h-\[min\(42rem\,calc\(100vh-2\.5rem\)\)\]{height:min(42rem,100vh - 2.5rem)}.h-\[min\(48rem\,calc\(100vh-2\.5rem\)\)\]{height:min(48rem,100vh - 2.5rem)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-45{max-height:calc(var(--spacing) * 45)}.max-h-50{max-height:calc(var(--spacing) * 50)}.max-h-65{max-height:calc(var(--spacing) * 65)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-85{max-height:calc(var(--spacing) * 85)}.max-h-95{max-height:calc(var(--spacing) * 95)}.max-h-100{max-height:calc(var(--spacing) * 100)}.max-h-\[calc\(100vh_-_var\(--modal-top\)_-_48px\)\]{max-height:calc(100vh - var(--modal-top) - 48px)}.max-h-\[calc\(100vh_-_var\(--new-project-modal-top\)_-_1\.25rem\)\]{max-height:calc(100vh - var(--new-project-modal-top) - 1.25rem)}.max-h-\[min\(70vh\,_720px\)\]{max-height:min(70vh,720px)}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-19\.5{min-height:calc(var(--spacing) * 19.5)}.min-h-22{min-height:calc(var(--spacing) * 22)}.min-h-41{min-height:calc(var(--spacing) * 41)}.min-h-dvh{min-height:100dvh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\/5{width:40%}.w-4{width:calc(var(--spacing) * 4)}.w-4\/5{width:80%}.w-5{width:calc(var(--spacing) * 5)}.w-6\.5{width:calc(var(--spacing) * 6.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-9\.5{width:calc(var(--spacing) * 9.5)}.w-10\.5{width:calc(var(--spacing) * 10.5)}.w-24{width:calc(var(--spacing) * 24)}.w-37{width:calc(var(--spacing) * 37)}.w-40{width:calc(var(--spacing) * 40)}.w-52{width:calc(var(--spacing) * 52)}.w-66{width:calc(var(--spacing) * 66)}.w-68{width:calc(var(--spacing) * 68)}.w-70{width:calc(var(--spacing) * 70)}.w-72{width:calc(var(--spacing) * 72)}.w-110{width:calc(var(--spacing) * 110)}.w-120{width:calc(var(--spacing) * 120)}.w-160{width:calc(var(--spacing) * 160)}.w-200{width:calc(var(--spacing) * 200)}.w-\[7px\]{width:7px}.w-\[9px\]{width:9px}.w-\[13px\]{width:13px}.w-\[15px\]{width:15px}.w-\[min\(440px\,_calc\(100vw_-_48px\)\)\]{width:min(440px,100vw - 48px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-36{max-width:calc(var(--spacing) * 36)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-55{max-width:calc(var(--spacing) * 55)}.max-w-60{max-width:calc(var(--spacing) * 60)}.max-w-64{max-width:calc(var(--spacing) * 64)}.max-w-65{max-width:calc(var(--spacing) * 65)}.max-w-68{max-width:calc(var(--spacing) * 68)}.max-w-72{max-width:calc(var(--spacing) * 72)}.max-w-120{max-width:calc(var(--spacing) * 120)}.max-w-155{max-width:calc(var(--spacing) * 155)}.max-w-160{max-width:calc(var(--spacing) * 160)}.max-w-230{max-width:calc(var(--spacing) * 230)}.max-w-290{max-width:calc(var(--spacing) * 290)}.max-w-\[88\%\]{max-width:88%}.max-w-\[94vw\]{max-width:94vw}.max-w-full{max-width:100%}.max-w-readable{max-width:var(--readable-col)}.min-w-0{min-width:0}.min-w-24{min-width:calc(var(--spacing) * 24)}.min-w-47\.5{min-width:calc(var(--spacing) * 47.5)}.min-w-55{min-width:calc(var(--spacing) * 55)}.min-w-57\.5{min-width:calc(var(--spacing) * 57.5)}.min-w-60{min-width:calc(var(--spacing) * 60)}.min-w-80{min-width:calc(var(--spacing) * 80)}.min-w-85{min-width:calc(var(--spacing) * 85)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.basis-full{flex-basis:100%}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\[or-pulse_1\.2s_ease-in-out_infinite\]{animation:1.2s ease-in-out infinite or-pulse}.animate-\[spin_0\.8s_linear_infinite\]{animation:.8s linear infinite spin}.animate-\[spin_0\.9s_linear_infinite\]{animation:.9s linear infinite spin}.animate-\[title-char-in_240ms_ease-out_both\]{animation:.24s ease-out both title-char-in}.animate-pulse{animation:var(--animate-pulse)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-e-resize{cursor:e-resize}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.\[scrollbar-width\:none\]{scrollbar-width:none}.\[scrollbar-gutter\:stable\]{scrollbar-gutter:stable}.\[scrollbar-gutter\:stable_both-edges\]{scrollbar-gutter:stable both-edges}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-\[8\.5rem_5rem\]{grid-template-columns:8.5rem 5rem}.grid-cols-\[9rem_minmax\(0\,1fr\)\]{grid-template-columns:9rem minmax(0,1fr)}.grid-cols-\[24px_minmax\(0\,_1fr\)\]{grid-template-columns:24px minmax(0,1fr)}.grid-cols-\[24px_minmax\(0\,_1fr\)_28px\]{grid-template-columns:24px minmax(0,1fr) 28px}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[minmax\(0\,1fr\)_9rem_9rem_minmax\(18rem\,max-content\)\]{grid-template-columns:minmax(0,1fr) 9rem 9rem minmax(18rem,max-content)}.grid-cols-\[minmax\(0\,_1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[minmax\(12rem\,18rem\)_minmax\(12rem\,18rem\)\]{grid-template-columns:minmax(12rem,18rem) minmax(12rem,18rem)}.grid-cols-\[minmax\(180px\,_260px\)_minmax\(0\,_1fr\)\]{grid-template-columns:minmax(180px,260px) minmax(0,1fr)}.grid-cols-\[repeat\(2\,_minmax\(0\,_1fr\)\)\]{grid-template-columns:repeat(2,minmax(0,1fr))}.\!flex-col{flex-direction:column!important}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.\!items-stretch{align-items:stretch!important}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-4\.5{gap:calc(var(--spacing) * 4.5)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-\[0\.4em\]{gap:.4em}.gap-\[3px\]{gap:3px}.gap-\[5px\]{gap:5px}.gap-\[7px\]{gap:7px}.gap-\[9px\]{gap:9px}.gap-px{gap:1px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.gap-x-4\.5{column-gap:calc(var(--spacing) * 4.5)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-x-12{column-gap:calc(var(--spacing) * 12)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2\.5{row-gap:calc(var(--spacing) * 2.5)}.gap-y-4{row-gap:calc(var(--spacing) * 4)}.gap-y-\[3px\]{row-gap:3px}.gap-y-\[7px\]{row-gap:7px}.gap-y-\[9px\]{row-gap:9px}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border-variant>:not(:last-child)){border-color:var(--border-variant)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[3px\]{border-radius:3px}.rounded-\[16px\]{border-radius:16px}.rounded-\[inherit\]{border-radius:inherit}.rounded-\[var\(--radius-md\)_var\(--radius-md\)_0_0\]{border-radius:var(--radius-md) var(--radius-md) 0 0}.rounded-full{border-radius:999px}.rounded-lg{border-radius:10px}.rounded-md{border-radius:8px}.rounded-none{border-radius:0}.rounded-sm{border-radius:6px}.rounded-xl{border-radius:12px}.rounded-xs{border-radius:4px}.rounded-s-none{border-start-start-radius:0;border-end-start-radius:0}.rounded-e-none{border-start-end-radius:0;border-end-end-radius:0}.rounded-b-lg{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-x-0{border-inline-style:var(--tw-border-style);border-inline-width:0}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-s-2{border-inline-start-style:var(--tw-border-style);border-inline-start-width:2px}.border-s-\[3px\]{border-inline-start-style:var(--tw-border-style);border-inline-start-width:3px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-solid{--tw-border-style:solid;border-style:solid}.border-accent-amber,.border-accent-amber\/45{border-color:var(--accent-amber)}@supports (color:color-mix(in lab,red,red)){.border-accent-amber\/45{border-color:color-mix(in oklab,var(--accent-amber) 45%,transparent)}}.border-accent-blue,.border-accent-blue\/45{border-color:var(--accent-blue)}@supports (color:color-mix(in lab,red,red)){.border-accent-blue\/45{border-color:color-mix(in oklab,var(--accent-blue) 45%,transparent)}}.border-accent-green,.border-accent-green\/45{border-color:var(--accent-green)}@supports (color:color-mix(in lab,red,red)){.border-accent-green\/45{border-color:color-mix(in oklab,var(--accent-green) 45%,transparent)}}.border-accent-red{border-color:var(--accent-red)}.border-border{border-color:var(--border)}.border-border-strong{border-color:var(--border-strong)}.border-border-variant{border-color:var(--border-variant)}.border-primary,.border-primary\/45{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,var(--primary) 45%,transparent)}}.border-transparent{border-color:#0000}.border-s-accent-blue{border-inline-start-color:var(--accent-blue)}.border-s-accent-red{border-inline-start-color:var(--accent-red)}.border-s-border{border-inline-start-color:var(--border)}.border-s-border-variant{border-inline-start-color:var(--border-variant)}.border-s-plan-caret{border-inline-start-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.border-s-plan-caret{border-inline-start-color:color-mix(in oklab,var(--base) 35%,var(--text))}}.border-e-border-variant{border-inline-end-color:var(--border-variant)}.border-t-border{border-top-color:var(--border)}.border-t-border-variant{border-top-color:var(--border-variant)}.border-t-primary{border-top-color:var(--primary)}.border-b-accent-amber{border-bottom-color:var(--accent-amber)}.border-b-border{border-bottom-color:var(--border)}.border-b-border-variant{border-bottom-color:var(--border-variant)}.border-b-divider-subtle{border-bottom-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.border-b-divider-subtle{border-bottom-color:color-mix(in oklab,var(--text) 7%,transparent)}}.bg-accent{background-color:var(--accent)}.bg-accent-amber-subtle{background-color:var(--accent-amber-subtle)}.bg-accent-blue{background-color:var(--accent-blue)}.bg-accent-blue-subtle{background-color:var(--accent-blue-subtle)}.bg-accent-green-subtle{background-color:var(--accent-green-subtle)}.bg-accent-red-subtle{background-color:var(--accent-red-subtle)}.bg-accent-teal{background-color:var(--accent-teal)}.bg-background{background-color:var(--base)}.bg-border-variant{background-color:var(--border-variant)}.bg-canvas{background-color:var(--canvas)}.bg-current{background-color:currentColor}.bg-hover-faint{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-faint{background-color:color-mix(in oklab,var(--text) 3%,transparent)}}.bg-hover-muted{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-muted{background-color:color-mix(in oklab,var(--text) 8%,transparent)}}.bg-hover-subtle{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-subtle{background-color:color-mix(in oklab,var(--text) 10%,transparent)}}.bg-modal-backdrop{background-color:#1d1b1a6b}.bg-modal-backdrop-light{background-color:#1d1b1a66}.bg-muted{background-color:var(--muted)}.bg-panel{background-color:var(--panel)}.bg-primary{background-color:var(--primary)}.bg-primary-subtle{background-color:var(--primary-subtle)}.bg-skill-blue-subtle{background-color:var(--skill-blue-subtle)}.bg-surface{background-color:var(--surface)}.bg-surface-bright{background-color:var(--surface-bright)}.bg-terminal{background-color:var(--term-bg)}.bg-text{background-color:var(--text)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.bg-none{background-image:none}.object-contain{object-fit:contain}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-7{padding:calc(var(--spacing) * 7)}.p-8{padding:calc(var(--spacing) * 8)}.p-\[1\.5px\]{padding:1.5px}.p-\[3px\]{padding:3px}.p-\[5px\]{padding:5px}.p-px{padding:1px}.px-0{padding-inline:0}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-4\.5{padding-inline:calc(var(--spacing) * 4.5)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-7{padding-inline:calc(var(--spacing) * 7)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[9px\]{padding-inline:9px}.px-\[11px\]{padding-inline:11px}.px-\[13px\]{padding-inline:13px}.px-\[15px\]{padding-inline:15px}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-4\.5{padding-block:calc(var(--spacing) * 4.5)}.py-5\.5{padding-block:calc(var(--spacing) * 5.5)}.py-6\.5{padding-block:calc(var(--spacing) * 6.5)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-\[3px\]{padding-block:3px}.py-\[5px\]{padding-block:5px}.py-\[7px\]{padding-block:7px}.py-\[9px\]{padding-block:9px}.py-\[11px\]{padding-block:11px}.py-px{padding-block:1px}.ps-1{padding-inline-start:var(--spacing)}.ps-1\.5{padding-inline-start:calc(var(--spacing) * 1.5)}.ps-2{padding-inline-start:calc(var(--spacing) * 2)}.ps-2\.5{padding-inline-start:calc(var(--spacing) * 2.5)}.ps-3{padding-inline-start:calc(var(--spacing) * 3)}.ps-4{padding-inline-start:calc(var(--spacing) * 4)}.ps-4\.5{padding-inline-start:calc(var(--spacing) * 4.5)}.ps-5{padding-inline-start:calc(var(--spacing) * 5)}.ps-\[2ch\]{padding-inline-start:2ch}.pe-0{padding-inline-end:0}.pe-1{padding-inline-end:var(--spacing)}.pe-1\.5{padding-inline-end:calc(var(--spacing) * 1.5)}.pe-2{padding-inline-end:calc(var(--spacing) * 2)}.pe-2\.5{padding-inline-end:calc(var(--spacing) * 2.5)}.pe-4{padding-inline-end:calc(var(--spacing) * 4)}.pe-8{padding-inline-end:calc(var(--spacing) * 8)}.pe-10{padding-inline-end:calc(var(--spacing) * 10)}.pe-14{padding-inline-end:calc(var(--spacing) * 14)}.pe-\[1ch\]{padding-inline-end:1ch}.pt-0{padding-top:0}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-4\.5{padding-top:calc(var(--spacing) * 4.5)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-6\.5{padding-top:calc(var(--spacing) * 6.5)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pt-\[var\(--modal-top\)\]{padding-top:var(--modal-top)}.pt-\[var\(--new-project-modal-top\)\]{padding-top:var(--new-project-modal-top)}.pb-0{padding-bottom:0}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-3\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pb-15{padding-bottom:calc(var(--spacing) * 15)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.pl-\[2ch\]{padding-left:2ch}.text-center{text-align:center}.text-end{text-align:end}.text-right{text-align:right}.text-start{text-align:start}.align-baseline{vertical-align:baseline}.font-\[inherit\]{font-family:inherit}.font-mono{font-family:var(--mono)}.font-sans{font-family:var(--sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-0{--tw-leading:0px;line-height:0}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-\[1\.3\]{--tw-leading:1.3;line-height:1.3}.leading-\[1\.4\]{--tw-leading:1.4;line-height:1.4}.leading-\[1\.6\]{--tw-leading:1.6;line-height:1.6}.leading-\[1\.08\]{--tw-leading:1.08;line-height:1.08}.leading-\[1\.45\]{--tw-leading:1.45;line-height:1.45}.leading-\[1\.55\]{--tw-leading:1.55;line-height:1.55}.leading-\[1\.62\]{--tw-leading:1.62;line-height:1.62}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\!font-medium{--tw-font-weight:var(--font-weight-medium)!important;font-weight:var(--font-weight-medium)!important}.\!font-normal{--tw-font-weight:var(--font-weight-normal)!important;font-weight:var(--font-weight-normal)!important}.font-\[375\]{--tw-font-weight:375;font-weight:375}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.01em\]{--tw-tracking:-.01em;letter-spacing:-.01em}.tracking-\[-0\.02em\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\[-0\.015em\]{--tw-tracking:-.015em;letter-spacing:-.015em}.tracking-\[-0\.035em\]{--tw-tracking:-.035em;letter-spacing:-.035em}.tracking-\[0\.05em\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\[0\.06em\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\[0\.08em\]{--tw-tracking:.08em;letter-spacing:.08em}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\[tab-size\:4\]{-moz-tab-size:4;tab-size:4}.\!text-accent-red{color:var(--accent-red)!important}.text-accent-amber{color:var(--accent-amber)}.text-accent-blue{color:var(--accent-blue)}.text-accent-green{color:var(--accent-green)}.text-accent-orange{color:var(--accent-orange)}.text-accent-purple{color:var(--accent-purple)}.text-accent-red{color:var(--accent-red)}.text-accent-teal{color:var(--accent-teal)}.text-background{color:var(--base)}.text-inherit{color:inherit}.text-muted{color:var(--muted)}.text-primary{color:var(--primary)}.text-skill-blue{color:var(--skill-blue)}.text-skill-blue-slash{color:var(--skill-blue-slash)}.text-subtext{color:var(--subtext)}.text-text{color:var(--text)}.text-transparent{color:#0000}.text-white{color:#fff}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.decoration-border-strong{-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.underline-offset-2{text-underline-offset:2px}.underline-offset-3{text-underline-offset:3px}.caret-text{caret-color:var(--text)}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-card{--tw-shadow:0 14px 36px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.shadow-card{--tw-shadow:0 14px 36px var(--tw-shadow-color,color-mix(in oklab, var(--text) 6%, transparent))}}.shadow-card{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-control{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-control-subtle{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-dropdown{--tw-shadow:0 10px 26px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-elevated{--tw-shadow:0 6px 24px var(--tw-shadow-color,var(--text)), 0 1px 4px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.shadow-elevated{--tw-shadow:0 6px 24px var(--tw-shadow-color,color-mix(in oklab, var(--text) 5%, transparent)), 0 1px 4px var(--tw-shadow-color,color-mix(in oklab, var(--text) 4%, transparent))}}.shadow-elevated{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-file-line{--tw-shadow:inset 2px 0 0 var(--tw-shadow-color,var(--accent-blue));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-floating{--tw-shadow:0 8px 24px var(--tw-shadow-color,#00000024);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-hairline{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-logo{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-menu{--tw-shadow:0 12px 32px var(--tw-shadow-color,#0000002e);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-modal{--tw-shadow:0 24px 60px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-plan{--tw-shadow:0 2px 10px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-plan-menu{--tw-shadow:0 6px 20px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-popover{--tw-shadow:0 4px 16px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-tree{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-3xl{--tw-blur:blur(var(--blur-3xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,border-color\,color\]{transition-property:background,border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,border-color\]{transition-property:background,border-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,color\]{transition-property:background,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,background\]{transition-property:border-color,background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,box-shadow\]{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,color\]{transition-property:border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[box-shadow\]{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,color\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-80{--tw-duration:80ms;transition-duration:80ms}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-standard{--tw-ease:ease;transition-timing-function:ease}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[--new-project-modal-top\:clamp\(4rem\,20vh\,24rem\)\]{--new-project-modal-top:clamp(4rem, 20vh, 24rem)}.\[font\:inherit\]{font:inherit}.\[grid-area\:actions\]{grid-area:actions}.\[grid-area\:meta\]{grid-area:meta}.\[grid-area\:name\]{grid-area:name}.\[grid-template-areas\:\'name_meta\'_\'actions_actions\'\]{grid-template-areas:"name meta""actions actions"}.group-focus-within\:pointer-events-auto:is(:where(.group):focus-within *){pointer-events:auto}.group-focus-within\:opacity-100:is(:where(.group):focus-within *),.group-focus-within\/turn\:opacity-100:is(:where(.group\/turn):focus-within *){opacity:1}@media(hover:hover){.group-hover\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto}.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/skill\:opacity-100:is(:where(.group\/skill):hover *),.group-hover\/turn\:opacity-100:is(:where(.group\/turn):hover *){opacity:1}}.group-focus\:opacity-100:is(:where(.group):focus *){opacity:1}.group-focus-visible\:opacity-0:is(:where(.group):focus-visible *){opacity:0}.group-focus-visible\:opacity-100:is(:where(.group):focus-visible *){opacity:1}.placeholder\:text-muted::placeholder{color:var(--muted)}.before\:content-\[attr\(data-line\)\]:before{--tw-content:attr(data-line);content:var(--tw-content)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:start-0:after{content:var(--tw-content);inset-inline-start:calc(var(--spacing) * 0)}.after\:end-0:after{content:var(--tw-content);inset-inline-end:calc(var(--spacing) * 0)}.after\:top-full:after{content:var(--tw-content);top:100%}.after\:h-2:after{content:var(--tw-content);height:calc(var(--spacing) * 2)}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:bg-surface-bright:focus-within{background-color:var(--surface-bright)}@media(hover:hover){.hover\:border-border-strong:hover{border-color:var(--border-strong)}.hover\:border-text:hover{border-color:var(--text)}.hover\:bg-skill-blue-subtle:hover{background-color:var(--skill-blue-subtle)}.hover\:bg-surface:hover{background-color:var(--surface)}.hover\:bg-surface-bright:hover{background-color:var(--surface-bright)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-accent-red:hover{color:var(--accent-red)}.hover\:text-text:hover{color:var(--text)}.hover\:underline:hover{text-decoration-line:underline}.hover\:decoration-primary:hover{-webkit-text-decoration-color:var(--primary);text-decoration-color:var(--primary)}}.focus\:pointer-events-auto:focus{pointer-events:auto}.focus\:border-text:focus{border-color:var(--text)}.focus\:opacity-100:focus,.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-offset-\[-2px\]:focus-visible{outline-offset:-2px}.focus-visible\:outline-text:focus-visible{outline-color:var(--text)}.focus-visible\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.disabled\:cursor-default:disabled{cursor:default}.disabled\:opacity-45:disabled{opacity:.45}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-52:disabled{opacity:.52}@media(min-width:1120px){.min-\[1120px\]\:col-start-1{grid-column-start:1}.min-\[1120px\]\:col-start-2{grid-column-start:2}.min-\[1120px\]\:row-start-1{grid-row-start:1}.min-\[1120px\]\:row-start-2{grid-row-start:2}.min-\[1120px\]\:mt-0{margin-top:0}.min-\[1120px\]\:grid{display:grid}.min-\[1120px\]\:grid-cols-\[minmax\(0\,_1\.1fr\)_minmax\(28rem\,_1fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(28rem,1fr)}.min-\[1120px\]\:grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.min-\[1120px\]\:content-center{align-content:center}.min-\[1120px\]\:gap-x-20{column-gap:calc(var(--spacing) * 20)}.min-\[1120px\]\:gap-y-10{row-gap:calc(var(--spacing) * 10)}.min-\[1120px\]\:self-end{align-self:flex-end}.min-\[1120px\]\:self-start{align-self:flex-start}}@media(min-width:40rem){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:px-12{padding-inline:calc(var(--spacing) * 12)}}@media(min-width:64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&_\+_\.settings-stack-section\]\:mt-6+.settings-stack-section{margin-top:calc(var(--spacing) * 6)}.\[\&_\.actions\]\:mt-1\.5 .actions{margin-top:calc(var(--spacing) * 1.5)}.\[\&_\.actions\]\:flex .actions{display:flex}.\[\&_\.actions\]\:justify-end .actions{justify-content:flex-end}.\[\&_\.actions\]\:gap-2\.5 .actions{gap:calc(var(--spacing) * 2.5)}.\[\&_\.artifact-img\]\:mx-0 .artifact-img{margin-inline:0}.\[\&_\.artifact-img\]\:my-3 .artifact-img{margin-block:calc(var(--spacing) * 3)}.\[\&_\.artifact-img\]\:block .artifact-img{display:block}.\[\&_\.artifact-img_img\]\:h-auto .artifact-img img{height:auto}.\[\&_\.artifact-img_img\]\:max-w-full .artifact-img img{max-width:100%}.\[\&_\.artifact-img_img\]\:rounded-sm .artifact-img img{border-radius:6px}.\[\&_\.artifact-img_img\]\:border .artifact-img img{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.artifact-img_img\]\:border-border .artifact-img img{border-color:var(--border)}.\[\&_\.artifact-img-caption\]\:mt-1 .artifact-img-caption{margin-top:var(--spacing)}.\[\&_\.artifact-img-caption\]\:block .artifact-img-caption{display:block}.\[\&_\.artifact-img-caption\]\:text-center .artifact-img-caption{text-align:center}.\[\&_\.artifact-img-caption\]\:text-sm .artifact-img-caption{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.artifact-img-caption\]\:text-subtext .artifact-img-caption{color:var(--subtext)}.\[\&_\.backend-badge\]\:text-text .backend-badge{color:var(--text)}.\[\&_\.backend-detail\]\:text-muted .backend-detail{color:var(--muted)}.\[\&_\.backend-name\]\:font-medium .backend-name{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.badge\]\:ms-2 .badge{margin-inline-start:calc(var(--spacing) * 2)}.\[\&_\.brand\]\:flex .brand{display:flex}.\[\&_\.brand\]\:h-full .brand{height:100%}.\[\&_\.brand\]\:w-full .brand{width:100%}.\[\&_\.brand\]\:min-w-0 .brand{min-width:0}.\[\&_\.brand\]\:items-center .brand{align-items:center}.\[\&_\.brand\]\:justify-between .brand{justify-content:space-between}.\[\&_\.brand\]\:gap-2 .brand{gap:calc(var(--spacing) * 2)}.\[\&_\.brand\]\:rounded-sm .brand{border-radius:6px}.\[\&_\.brand\]\:border .brand{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.brand\]\:border-transparent .brand{border-color:#0000}.\[\&_\.brand\]\:px-1\.5 .brand{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.brand\]\:py-1 .brand{padding-block:var(--spacing)}.\[\&_\.brand\]\:text-base .brand{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.brand\]\:font-semibold .brand{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.brand\]\:text-text .brand{color:var(--text)}.\[\&_\.brand_\.brand-project\]\:min-w-0 .brand .brand-project{min-width:0}.\[\&_\.brand_\.brand-project\]\:overflow-hidden .brand .brand-project{overflow:hidden}.\[\&_\.brand_\.brand-project\]\:text-xl .brand .brand-project{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\.brand_\.brand-project\]\:text-ellipsis .brand .brand-project{text-overflow:ellipsis}.\[\&_\.brand_\.brand-project\]\:whitespace-nowrap .brand .brand-project{white-space:nowrap}.\[\&_\.brand_svg\]\:shrink-0 .brand svg{flex-shrink:0}.\[\&_\.brand-project-copy\]\:flex .brand-project-copy{display:flex}.\[\&_\.brand-project-copy\]\:min-w-0 .brand-project-copy{min-width:0}.\[\&_\.brand-project-copy\]\:flex-col .brand-project-copy{flex-direction:column}.\[\&_\.brand-project-copy\]\:gap-\[3px\] .brand-project-copy{gap:3px}.\[\&_\.brand-project-copy\]\:text-start .brand-project-copy{text-align:start}.\[\&_\.brand-project-copy\]\:leading-\[1\.15\] .brand-project-copy{--tw-leading:1.15;line-height:1.15}.\[\&_\.brand-project-label\]\:text-xs .brand-project-label{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.brand-project-label\]\:font-medium .brand-project-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.brand-project-label\]\:tracking-\[0\.04em\] .brand-project-label{--tw-tracking:.04em;letter-spacing:.04em}.\[\&_\.brand-project-label\]\:text-muted .brand-project-label{color:var(--muted)}.\[\&_\.brand-project-label\]\:uppercase .brand-project-label{text-transform:uppercase}.\[\&_\.brand\.open\]\:border-border .brand.open{border-color:var(--border)}.\[\&_\.brand\.open\]\:bg-surface .brand.open{background-color:var(--surface)}.\[\&_\.brand\.open_\.project-chevron\]\:rotate-180 .brand.open .project-chevron{rotate:180deg}.\[\&_\.brand\.open_\.project-chevron\]\:opacity-100 .brand.open .project-chevron{opacity:1}.\[\&_\.brand\:hover\]\:border-border .brand:hover{border-color:var(--border)}.\[\&_\.brand\:hover\]\:bg-surface .brand:hover{background-color:var(--surface)}.\[\&_\.brand\:hover_\.project-chevron\]\:opacity-100 .brand:hover .project-chevron{opacity:1}.\[\&_\.btn\]\:inline-flex .btn{display:inline-flex}.\[\&_\.btn\]\:items-center .btn{align-items:center}.\[\&_\.btn\]\:gap-\[5px\] .btn{gap:5px}.\[\&_\.busy-dot\]\:h-\[7px\] .busy-dot{height:7px}.\[\&_\.busy-dot\]\:w-\[7px\] .busy-dot{width:7px}.\[\&_\.busy-dot\]\:shrink-0 .busy-dot{flex-shrink:0}.\[\&_\.busy-dot\]\:animate-\[or-pulse_1\.2s_infinite\] .busy-dot{animation:1.2s infinite or-pulse}.\[\&_\.busy-dot\]\:rounded-full .busy-dot{border-radius:999px}.\[\&_\.busy-dot\]\:bg-primary .busy-dot{background-color:var(--primary)}.\[\&_\.busy-dot\.waiting\]\:animate-none .busy-dot.waiting{animation:none}.\[\&_\.chev\]\:w-3 .chev{width:calc(var(--spacing) * 3)}.\[\&_\.chev\]\:shrink-0 .chev{flex-shrink:0}.\[\&_\.chev\]\:text-xs .chev{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.chev\]\:text-muted .chev{color:var(--muted)}.\[\&_\.count-badge\]\:inline-flex .count-badge{display:inline-flex}.\[\&_\.count-badge\]\:h-4\.5 .count-badge{height:calc(var(--spacing) * 4.5)}.\[\&_\.count-badge\]\:min-w-4\.5 .count-badge{min-width:calc(var(--spacing) * 4.5)}.\[\&_\.count-badge\]\:items-center .count-badge{align-items:center}.\[\&_\.count-badge\]\:justify-center .count-badge{justify-content:center}.\[\&_\.count-badge\]\:rounded-md .count-badge{border-radius:8px}.\[\&_\.count-badge\]\:border .count-badge{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.count-badge\]\:border-border .count-badge{border-color:var(--border)}.\[\&_\.count-badge\]\:bg-canvas .count-badge{background-color:var(--canvas)}.\[\&_\.count-badge\]\:px-\[5px\] .count-badge{padding-inline:5px}.\[\&_\.count-badge\]\:py-0 .count-badge{padding-block:0}.\[\&_\.count-badge\]\:text-xs .count-badge{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.count-badge\]\:font-medium .count-badge{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.count-badge\]\:text-text .count-badge{color:var(--text)}.\[\&_\.elided-node-label\]\:flex .elided-node-label{display:flex}.\[\&_\.elided-node-label\]\:flex-col .elided-node-label{flex-direction:column}.\[\&_\.elided-node-label\]\:leading-\[1\.3\] .elided-node-label{--tw-leading:1.3;line-height:1.3}.\[\&_\.elided-node-sub\]\:text-muted .elided-node-sub{color:var(--muted)}.\[\&_\.error\]\:basis-full .error{flex-basis:100%}.\[\&_\.error\]\:text-base .error{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.error\]\:text-sm .error{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.error\]\:whitespace-pre-wrap .error{white-space:pre-wrap}.\[\&_\.error\]\:text-accent-red .error{color:var(--accent-red)}.\[\&_\.file-chip\]\:mx-px .file-chip{margin-inline:1px}.\[\&_\.file-chip\]\:my-0 .file-chip{margin-block:0}.\[\&_\.file-chip\]\:inline-flex .file-chip{display:inline-flex}.\[\&_\.file-chip\]\:max-w-full .file-chip{max-width:100%}.\[\&_\.file-chip\]\:cursor-pointer .file-chip{cursor:pointer}.\[\&_\.file-chip\]\:items-center .file-chip{align-items:center}.\[\&_\.file-chip\]\:gap-1 .file-chip{gap:var(--spacing)}.\[\&_\.file-chip\]\:rounded-xs .file-chip{border-radius:4px}.\[\&_\.file-chip\]\:border .file-chip{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.file-chip\]\:border-border-variant .file-chip{border-color:var(--border-variant)}.\[\&_\.file-chip\]\:bg-panel .file-chip{background-color:var(--panel)}.\[\&_\.file-chip\]\:px-1\.5 .file-chip{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.file-chip\]\:py-0 .file-chip{padding-block:0}.\[\&_\.file-chip\]\:align-baseline .file-chip{vertical-align:baseline}.\[\&_\.file-chip\]\:font-mono .file-chip{font-family:var(--mono)}.\[\&_\.file-chip\]\:text-sm .file-chip{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.file-chip\]\:font-medium .file-chip{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.file-chip\]\:text-text .file-chip{color:var(--text)}.\[\&_\.file-chip_svg\]\:flex-none .file-chip svg{flex:none}.\[\&_\.file-chip_svg\]\:opacity-60 .file-chip svg{opacity:.6}.\[\&_\.file-chip-label\]\:max-w-65 .file-chip-label{max-width:calc(var(--spacing) * 65)}.\[\&_\.file-chip-label\]\:overflow-hidden .file-chip-label{overflow:hidden}.\[\&_\.file-chip-label\]\:text-ellipsis .file-chip-label{text-overflow:ellipsis}.\[\&_\.file-chip-label\]\:whitespace-nowrap .file-chip-label{white-space:nowrap}.\[\&_\.file-chip\:hover\:not\(\:disabled\)\]\:bg-surface .file-chip:hover:not(:disabled){background-color:var(--surface)}.\[\&_\.file-chip\:hover\:not\(\:disabled\)\]\:text-primary .file-chip:hover:not(:disabled){color:var(--primary)}.\[\&_\.files-pill\]\:rounded-sm .files-pill{border-radius:6px}.\[\&_\.files-pill\]\:px-2 .files-pill{padding-inline:calc(var(--spacing) * 2)}.\[\&_\.files-pill\]\:py-\[5px\] .files-pill{padding-block:5px}.\[\&_\.files-pill_code\]\:text-xs .files-pill code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.folder-picker-chevron\]\:flex-none .folder-picker-chevron{flex:none}.\[\&_\.folder-picker-chevron\]\:text-muted .folder-picker-chevron{color:var(--muted)}.\[\&_\.folder-picker-control\]\:flex .folder-picker-control{display:flex}.\[\&_\.folder-picker-control\]\:w-full .folder-picker-control{width:100%}.\[\&_\.folder-picker-control\]\:min-w-0 .folder-picker-control{min-width:0}.\[\&_\.folder-picker-control\]\:cursor-pointer .folder-picker-control{cursor:pointer}.\[\&_\.folder-picker-control\]\:items-center .folder-picker-control{align-items:center}.\[\&_\.folder-picker-control\]\:gap-\[9px\] .folder-picker-control{gap:9px}.\[\&_\.folder-picker-control\]\:overflow-hidden .folder-picker-control{overflow:hidden}.\[\&_\.folder-picker-control\]\:rounded-md .folder-picker-control{border-radius:8px}.\[\&_\.folder-picker-control\]\:border .folder-picker-control{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.folder-picker-control\]\:border-border .folder-picker-control{border-color:var(--border)}.\[\&_\.folder-picker-control\]\:bg-background .folder-picker-control{background-color:var(--base)}.\[\&_\.folder-picker-control\]\:px-2\.5 .folder-picker-control{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.folder-picker-control\]\:py-2 .folder-picker-control{padding-block:calc(var(--spacing) * 2)}.\[\&_\.folder-picker-control\]\:text-start .folder-picker-control{text-align:start}.\[\&_\.folder-picker-control\]\:transition-\[border-color\,box-shadow\] .folder-picker-control{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_\.folder-picker-control\]\:duration-120 .folder-picker-control{--tw-duration:.12s;transition-duration:.12s}.\[\&_\.folder-picker-control\]\:ease-standard .folder-picker-control{--tw-ease:ease;transition-timing-function:ease}.\[\&_\.folder-picker-control_\.placeholder\]\:text-muted .folder-picker-control .placeholder{color:var(--muted)}.\[\&_\.folder-picker-control_span\]\:min-w-0 .folder-picker-control span{min-width:0}.\[\&_\.folder-picker-control_span\]\:flex-1 .folder-picker-control span{flex:1}.\[\&_\.folder-picker-control_span\]\:overflow-hidden .folder-picker-control span{overflow:hidden}.\[\&_\.folder-picker-control_span\]\:text-ellipsis .folder-picker-control span{text-overflow:ellipsis}.\[\&_\.folder-picker-control_span\]\:whitespace-nowrap .folder-picker-control span{white-space:nowrap}.\[\&_\.folder-picker-control\:disabled\]\:cursor-default .folder-picker-control:disabled{cursor:default}.\[\&_\.folder-picker-control\:disabled\]\:opacity-65 .folder-picker-control:disabled{opacity:.65}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-2 .folder-picker-control:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-offset-2 .folder-picker-control:focus-visible{outline-offset:2px}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-text .folder-picker-control:focus-visible{outline-color:var(--text)}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-solid .folder-picker-control:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)\]\:border-muted .folder-picker-control:hover:not(:disabled){border-color:var(--muted)}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)\]\:shadow-control-subtle .folder-picker-control:hover:not(:disabled){--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)_\.folder-picker-chevron\]\:text-subtext .folder-picker-control:hover:not(:disabled) .folder-picker-chevron{color:var(--subtext)}.\[\&_\.folder-picker-hint\]\:text-sm .folder-picker-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.folder-picker-hint\]\:leading-\[1\.4\] .folder-picker-hint{--tw-leading:1.4;line-height:1.4}.\[\&_\.folder-picker-hint\]\:font-normal .folder-picker-hint{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.folder-picker-hint\]\:text-subtext .folder-picker-hint{color:var(--subtext)}.\[\&_\.folder-picker-icon\]\:flex-none .folder-picker-icon{flex:none}.\[\&_\.folder-picker-icon\]\:text-current .folder-picker-icon{color:currentColor}.\[\&_\.form-seg\]\:mb-0\.5 .form-seg{margin-bottom:calc(var(--spacing) * .5)}.\[\&_\.form-seg\]\:self-start .form-seg{align-self:flex-start}.\[\&_\.form-seg_button\]\:px-3 .form-seg button{padding-inline:calc(var(--spacing) * 3)}.\[\&_\.form-seg_button\]\:py-\[5px\] .form-seg button{padding-block:5px}.\[\&_\.ftree-footer\]\:mt-2\.5 .ftree-footer{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.ftree-footer\]\:max-w-full .ftree-footer{max-width:100%}.\[\&_\.ftree-footer\]\:rounded-md .ftree-footer{border-radius:8px}.\[\&_\.ftree-footer\]\:border .ftree-footer{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.ftree-footer\]\:border-border .ftree-footer{border-color:var(--border)}.\[\&_\.ftree-footer\]\:bg-background .ftree-footer{background-color:var(--base)}.\[\&_\.ftree-footer\]\:px-2\.5 .ftree-footer{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.ftree-footer\]\:py-1\.5 .ftree-footer{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\.ftree-footer_code\]\:max-w-95 .ftree-footer code{max-width:calc(var(--spacing) * 95)}.\[\&_\.hc-actions\]\:mt-2\.5 .hc-actions{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-actions\]\:flex .hc-actions{display:flex}.\[\&_\.hc-actions\]\:items-center .hc-actions{align-items:center}.\[\&_\.hc-actions\]\:gap-1\.5 .hc-actions{gap:calc(var(--spacing) * 1.5)}.\[\&_\.hc-actions_button\]\:inline-flex .hc-actions button{display:inline-flex}.\[\&_\.hc-actions_button\]\:min-w-21 .hc-actions button{min-width:calc(var(--spacing) * 21)}.\[\&_\.hc-actions_button\]\:items-center .hc-actions button{align-items:center}.\[\&_\.hc-actions_button\]\:justify-center .hc-actions button{justify-content:center}.\[\&_\.hc-actions_button\]\:gap-\[5px\] .hc-actions button{gap:5px}.\[\&_\.hc-actions_button\]\:rounded-md .hc-actions button{border-radius:8px}.\[\&_\.hc-actions_button\]\:border .hc-actions button{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.hc-actions_button\]\:border-border .hc-actions button{border-color:var(--border)}.\[\&_\.hc-actions_button\]\:bg-background .hc-actions button{background-color:var(--base)}.\[\&_\.hc-actions_button\]\:px-2\.5 .hc-actions button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.hc-actions_button\]\:py-1\.5 .hc-actions button{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\.hc-actions_button\]\:text-sm .hc-actions button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-actions_button\]\:font-medium .hc-actions button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.hc-actions_button\]\:text-text .hc-actions button{color:var(--text)}.\[\&_\.hc-actions_button\:hover\]\:border-border-hover-strong .hc-actions button:hover{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.hc-actions_button\:hover\]\:border-border-hover-strong .hc-actions button:hover{border-color:color-mix(in oklab,var(--border) 55%,var(--text))}}.\[\&_\.hc-actions_button\:hover\]\:bg-canvas .hc-actions button:hover{background-color:var(--canvas)}.\[\&_\.hc-body\]\:mt-2\.5 .hc-body{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-body\]\:line-clamp-10 .hc-body{-webkit-line-clamp:10;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-body\]\:border-t .hc-body{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-body\]\:border-t-border-variant .hc-body{border-top-color:var(--border-variant)}.\[\&_\.hc-body\]\:pt-2\.5 .hc-body{padding-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-body\]\:leading-\[1\.6\] .hc-body{--tw-leading:1.6;line-height:1.6}.\[\&_\.hc-body\]\:whitespace-pre-line .hc-body{white-space:pre-line}.\[\&_\.hc-body\.expanded\]\:line-clamp-none .hc-body.expanded{-webkit-line-clamp:unset;-webkit-box-orient:horizontal;display:block;overflow:visible}.\[\&_\.hc-body\.expanded\]\:block .hc-body.expanded{display:block}.\[\&_\.hc-body\.expanded\]\:max-h-\[45vh\] .hc-body.expanded{max-height:45vh}.\[\&_\.hc-body\.expanded\]\:overflow-x-hidden .hc-body.expanded{overflow-x:hidden}.\[\&_\.hc-body\.expanded\]\:overflow-y-auto .hc-body.expanded{overflow-y:auto}.\[\&_\.hc-body\.expanded\]\:pb-1 .hc-body.expanded{padding-bottom:var(--spacing)}.\[\&_\.hc-branch\]\:inline-flex .hc-branch{display:inline-flex}.\[\&_\.hc-branch\]\:min-w-0 .hc-branch{min-width:0}.\[\&_\.hc-branch\]\:items-center .hc-branch{align-items:center}.\[\&_\.hc-branch\]\:gap-1 .hc-branch{gap:var(--spacing)}.\[\&_\.hc-branch\]\:overflow-hidden .hc-branch{overflow:hidden}.\[\&_\.hc-branch\]\:text-ellipsis .hc-branch{text-overflow:ellipsis}.\[\&_\.hc-branch\]\:whitespace-nowrap .hc-branch{white-space:nowrap}.\[\&_\.hc-failure\]\:mt-2 .hc-failure{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-failure\]\:line-clamp-3 .hc-failure{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-failure\]\:text-accent-red .hc-failure{color:var(--accent-red)}.\[\&_\.hc-foot\]\:mt-2 .hc-foot{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-foot\]\:flex .hc-foot{display:flex}.\[\&_\.hc-foot\]\:items-center .hc-foot{align-items:center}.\[\&_\.hc-foot\]\:justify-between .hc-foot{justify-content:space-between}.\[\&_\.hc-foot\]\:gap-2\.5 .hc-foot{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-foot\]\:text-xs .hc-foot{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-foot\]\:text-muted .hc-foot{color:var(--muted)}.\[\&_\.hc-foot_\.hc-command\]\:min-w-0 .hc-foot .hc-command{min-width:0}.\[\&_\.hc-foot_\.hc-command\]\:overflow-hidden .hc-foot .hc-command{overflow:hidden}.\[\&_\.hc-foot_\.hc-command\]\:text-ellipsis .hc-foot .hc-command{text-overflow:ellipsis}.\[\&_\.hc-foot_\.hc-command\]\:whitespace-nowrap .hc-foot .hc-command{white-space:nowrap}.\[\&_\.hc-git\]\:mt-2\.5 .hc-git{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-git\]\:flex .hc-git{display:flex}.\[\&_\.hc-git\]\:flex-col .hc-git{flex-direction:column}.\[\&_\.hc-git\]\:gap-1 .hc-git{gap:var(--spacing)}.\[\&_\.hc-git\]\:border-t .hc-git{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-git\]\:border-t-border-variant .hc-git{border-top-color:var(--border-variant)}.\[\&_\.hc-git\]\:pt-2 .hc-git{padding-top:calc(var(--spacing) * 2)}.\[\&_\.hc-git\]\:text-xs .hc-git{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-git\]\:text-text .hc-git{color:var(--text)}.\[\&_\.hc-git-row\]\:flex .hc-git-row{display:flex}.\[\&_\.hc-git-row\]\:min-w-0 .hc-git-row{min-width:0}.\[\&_\.hc-git-row\]\:flex-wrap .hc-git-row{flex-wrap:wrap}.\[\&_\.hc-git-row\]\:items-center .hc-git-row{align-items:center}.\[\&_\.hc-git-row\]\:gap-2\.5 .hc-git-row{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-head\]\:flex .hc-head{display:flex}.\[\&_\.hc-head\]\:items-baseline .hc-head{align-items:baseline}.\[\&_\.hc-head\]\:justify-between .hc-head{justify-content:space-between}.\[\&_\.hc-head\]\:gap-2\.5 .hc-head{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-slug\]\:min-w-0 .hc-slug{min-width:0}.\[\&_\.hc-slug\]\:overflow-hidden .hc-slug{overflow:hidden}.\[\&_\.hc-slug\]\:text-sm .hc-slug{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-slug\]\:font-semibold .hc-slug{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.hc-slug\]\:text-ellipsis .hc-slug{text-overflow:ellipsis}.\[\&_\.hc-slug\]\:whitespace-nowrap .hc-slug{white-space:nowrap}.\[\&_\.hc-stats\]\:mt-2\.5 .hc-stats{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-stats\]\:flex .hc-stats{display:flex}.\[\&_\.hc-stats\]\:flex-wrap .hc-stats{flex-wrap:wrap}.\[\&_\.hc-stats\]\:items-center .hc-stats{align-items:center}.\[\&_\.hc-stats\]\:gap-3 .hc-stats{gap:calc(var(--spacing) * 3)}.\[\&_\.hc-stats\]\:border-t .hc-stats{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-stats\]\:border-t-border-variant .hc-stats{border-top-color:var(--border-variant)}.\[\&_\.hc-stats\]\:pt-2\.5 .hc-stats{padding-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-stats\]\:text-xs .hc-stats{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-stats\]\:text-text .hc-stats{color:var(--text)}.\[\&_\.hc-title\]\:mt-\[3px\] .hc-title{margin-top:3px}.\[\&_\.hc-title\]\:text-text .hc-title{color:var(--text)}.\[\&_\.hc-toggle\]\:mt-1 .hc-toggle{margin-top:var(--spacing)}.\[\&_\.hc-toggle\]\:text-sm .hc-toggle{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-toggle\]\:font-medium .hc-toggle{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.hc-toggle\]\:text-muted .hc-toggle{color:var(--muted)}.\[\&_\.hc-toggle\:hover\]\:text-text .hc-toggle:hover{color:var(--text)}.\[\&_\.home-inner\]\:max-w-140 .home-inner{max-width:calc(var(--spacing) * 140)}.\[\&_\.home-inner\]\:max-w-300 .home-inner{max-width:calc(var(--spacing) * 300)}.\[\&_\.home-inner\]\:pt-0 .home-inner{padding-top:0}.\[\&_\.home-inner\]\:pt-24 .home-inner{padding-top:calc(var(--spacing) * 24)}.\[\&_\.home-inner\]\:pb-0 .home-inner{padding-bottom:0}.\[\&_\.icon-btn\]\:ms-2 .icon-btn{margin-inline-start:calc(var(--spacing) * 2)}.\[\&_\.icon-btn\]\:align-middle .icon-btn{vertical-align:middle}.\[\&_\.id\]\:text-xs .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.id\]\:text-muted .id{color:var(--muted)}.\[\&_\.k\]\:text-sm .k{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.k\]\:font-medium .k{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.k\]\:text-subtext .k{color:var(--subtext)}.\[\&_\.k\]\:text-text .k{color:var(--text)}.\[\&_\.katex\]\:text-prose-emphasis .katex{font-size:1.05em}.\[\&_\.katex-display\]\:mx-0 .katex-display{margin-inline:0}.\[\&_\.katex-display\]\:my-3 .katex-display{margin-block:calc(var(--spacing) * 3)}.\[\&_\.katex-display\]\:overflow-x-auto .katex-display{overflow-x:auto}.\[\&_\.katex-display\]\:overflow-y-hidden .katex-display{overflow-y:hidden}.\[\&_\.katex-display\]\:px-0 .katex-display{padding-inline:0}.\[\&_\.katex-display\]\:py-0\.5 .katex-display{padding-block:calc(var(--spacing) * .5)}.\[\&_\.kv\]\:grid-cols-\[132px_minmax\(0\,_1fr\)\] .kv{grid-template-columns:132px minmax(0,1fr)}.\[\&_\.kv\]\:items-center .kv{align-items:center}.\[\&_\.kv\]\:gap-x-4\.5 .kv{column-gap:calc(var(--spacing) * 4.5)}.\[\&_\.kv\]\:gap-y-1\.5 .kv{row-gap:calc(var(--spacing) * 1.5)}.\[\&_\.kv\]\:gap-y-\[9px\] .kv{row-gap:9px}.\[\&_\.kv_\.k\]\:text-sm .kv .k{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.kv_\.v\]\:flex .kv .v{display:flex}.\[\&_\.kv_\.v\]\:min-w-0 .kv .v{min-width:0}.\[\&_\.kv_\.v\]\:flex-wrap .kv .v{flex-wrap:wrap}.\[\&_\.kv_\.v\]\:items-center .kv .v{align-items:center}.\[\&_\.kv_\.v\]\:gap-\[7px\] .kv .v{gap:7px}.\[\&_\.kv_\.v\]\:font-sans .kv .v{font-family:var(--sans)}.\[\&_\.kv_\.v\]\:text-base .kv .v{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.kv_\.v\]\:break-normal .kv .v{overflow-wrap:normal;word-break:normal}.\[\&_\.md\]\:max-w-readable .md{max-width:var(--readable-col)}.\[\&_\.md\]\:text-base .md{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.md\]\:leading-\[1\.65\] .md{--tw-leading:1.65;line-height:1.65}.\[\&_\.md\]\:text-text .md{color:var(--text)}.\[\&_\.md_h1\]\:mx-0 .md h1{margin-inline:0}.\[\&_\.md_h1\]\:mt-4\.5 .md h1{margin-top:calc(var(--spacing) * 4.5)}.\[\&_\.md_h1\]\:mb-2 .md h1{margin-bottom:calc(var(--spacing) * 2)}.\[\&_\.md_h1\]\:text-2xl .md h1{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_\.md_h2\]\:mx-0 .md h2{margin-inline:0}.\[\&_\.md_h2\]\:mt-4 .md h2{margin-top:calc(var(--spacing) * 4)}.\[\&_\.md_h2\]\:mb-2 .md h2{margin-bottom:calc(var(--spacing) * 2)}.\[\&_\.md_h2\]\:text-xl .md h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\.md_h3\]\:text-lg .md h3{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_\.model-id\]\:block .model-id{display:block}.\[\&_\.model-id\]\:text-xs .model-id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.model-id\]\:text-muted .model-id{color:var(--muted)}.\[\&_\.model-item\]\:ps-6 .model-item{padding-inline-start:calc(var(--spacing) * 6)}.\[\&_\.model-item\]\:whitespace-nowrap .model-item{white-space:nowrap}.\[\&_\.model-item\:disabled\]\:cursor-default .model-item:disabled{cursor:default}.\[\&_\.model-item\:disabled\]\:text-muted .model-item:disabled{color:var(--muted)}.\[\&_\.model-item\:disabled\:hover\]\:bg-transparent .model-item:disabled:hover{background-color:#0000}.\[\&_\.new-project-actions\]\:mt-2\.5 .new-project-actions{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.new-project-actions\]\:justify-start .new-project-actions{justify-content:flex-start}.\[\&_\.node-action\]\:inline-flex .node-action{display:inline-flex}.\[\&_\.node-action\]\:items-center .node-action{align-items:center}.\[\&_\.node-action\]\:gap-\[5px\] .node-action{gap:5px}.\[\&_\.node-action\]\:rounded-sm .node-action{border-radius:6px}.\[\&_\.node-action\]\:px-1\.5 .node-action{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.node-action\]\:py-\[3px\] .node-action{padding-block:3px}.\[\&_\.node-action\]\:text-sm .node-action{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-action\]\:font-medium .node-action{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.node-action\]\:text-text .node-action{color:var(--text)}.\[\&_\.node-action\]\:no-underline .node-action{text-decoration-line:none}.\[\&_\.node-action-ext\]\:ms-auto .node-action-ext{margin-inline-start:auto}.\[\&_\.node-action-ext\]\:px-\[5px\] .node-action-ext{padding-inline:5px}.\[\&_\.node-action-ext\]\:py-\[3px\] .node-action-ext{padding-block:3px}.\[\&_\.node-action\:hover\]\:bg-surface .node-action:hover{background-color:var(--surface)}.\[\&_\.node-action\:hover\]\:text-text .node-action:hover{color:var(--text)}.\[\&_\.node-actions\]\:mt-2 .node-actions{margin-top:calc(var(--spacing) * 2)}.\[\&_\.node-actions\]\:flex .node-actions{display:flex}.\[\&_\.node-actions\]\:items-center .node-actions{align-items:center}.\[\&_\.node-actions\]\:gap-\[3px\] .node-actions{gap:3px}.\[\&_\.node-actions\]\:border-t .node-actions{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.node-actions\]\:border-t-border-variant .node-actions{border-top-color:var(--border-variant)}.\[\&_\.node-actions\]\:pt-1\.5 .node-actions{padding-top:calc(var(--spacing) * 1.5)}.\[\&_\.node-eyebrow\]\:mb-1\.5 .node-eyebrow{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_\.node-eyebrow\]\:flex .node-eyebrow{display:flex}.\[\&_\.node-eyebrow\]\:items-center .node-eyebrow{align-items:center}.\[\&_\.node-eyebrow\]\:justify-between .node-eyebrow{justify-content:space-between}.\[\&_\.node-eyebrow\]\:gap-2 .node-eyebrow{gap:calc(var(--spacing) * 2)}.\[\&_\.node-eyebrow\]\:text-xs .node-eyebrow{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.node-eyebrow\]\:font-medium .node-eyebrow{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.node-eyebrow\]\:text-muted .node-eyebrow{color:var(--muted)}.\[\&_\.node-head\]\:flex .node-head{display:flex}.\[\&_\.node-head\]\:min-w-0 .node-head{min-width:0}.\[\&_\.node-head\]\:items-center .node-head{align-items:center}.\[\&_\.node-head\]\:gap-\[7px\] .node-head{gap:7px}.\[\&_\.node-meta\]\:mt-2 .node-meta{margin-top:calc(var(--spacing) * 2)}.\[\&_\.node-meta\]\:flex .node-meta{display:flex}.\[\&_\.node-meta\]\:items-center .node-meta{align-items:center}.\[\&_\.node-meta\]\:gap-2 .node-meta{gap:calc(var(--spacing) * 2)}.\[\&_\.node-meta\]\:text-xs .node-meta{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.node-meta\]\:text-muted .node-meta{color:var(--muted)}.\[\&_\.node-overview-link\]\:block .node-overview-link{display:block}.\[\&_\.node-overview-link\]\:w-full .node-overview-link{width:100%}.\[\&_\.node-overview-link\]\:cursor-pointer .node-overview-link{cursor:pointer}.\[\&_\.node-overview-link\]\:border-0 .node-overview-link{border-style:var(--tw-border-style);border-width:0}.\[\&_\.node-overview-link\]\:bg-transparent .node-overview-link{background-color:#0000}.\[\&_\.node-overview-link\]\:p-0 .node-overview-link{padding:0}.\[\&_\.node-overview-link\]\:text-start .node-overview-link{text-align:start}.\[\&_\.node-overview-link\]\:text-inherit .node-overview-link{color:inherit}.\[\&_\.node-overview-link\]\:\[font\:inherit\] .node-overview-link{font:inherit}.\[\&_\.node-overview-link\:focus-visible\]\:rounded-xs .node-overview-link:focus-visible{border-radius:4px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-2 .node-overview-link:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-offset-4 .node-overview-link:focus-visible{outline-offset:4px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-accent .node-overview-link:focus-visible{outline-color:var(--accent)}.\[\&_\.node-overview-link\:focus-visible\]\:outline-solid .node-overview-link:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&_\.node-overview-link\:hover_\.node-slug\]\:underline .node-overview-link:hover .node-slug{text-decoration-line:underline}.\[\&_\.node-overview-link\:hover_\.node-slug\]\:underline-offset-\[3px\] .node-overview-link:hover .node-slug{text-underline-offset:3px}.\[\&_\.node-slug\]\:min-w-0 .node-slug{min-width:0}.\[\&_\.node-slug\]\:flex-1 .node-slug{flex:1}.\[\&_\.node-slug\]\:overflow-hidden .node-slug{overflow:hidden}.\[\&_\.node-slug\]\:text-sm .node-slug{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-slug\]\:font-semibold .node-slug{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.node-slug\]\:text-ellipsis .node-slug{text-overflow:ellipsis}.\[\&_\.node-slug\]\:whitespace-nowrap .node-slug{white-space:nowrap}.\[\&_\.node-slug\]\:text-text .node-slug{color:var(--text)}.\[\&_\.node-status\]\:h-2 .node-status{height:calc(var(--spacing) * 2)}.\[\&_\.node-status\]\:w-2 .node-status{width:calc(var(--spacing) * 2)}.\[\&_\.node-status\]\:shrink-0 .node-status{flex-shrink:0}.\[\&_\.node-status\]\:rounded-full .node-status{border-radius:999px}.\[\&_\.node-title\]\:mt-1 .node-title{margin-top:var(--spacing)}.\[\&_\.node-title\]\:line-clamp-2 .node-title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.node-title\]\:text-sm .node-title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-title\]\:text-text .node-title{color:var(--text)}.\[\&_\.openresearch-diff-file\]\:w-full .openresearch-diff-file{width:100%}.\[\&_\.openresearch-diff-file\]\:text-sm .openresearch-diff-file{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.openresearch-diff-file\]\:leading-\[1\.55\] .openresearch-diff-file{--tw-leading:1.55;line-height:1.55}.\[\&_\.openresearch-diff-file\]\:\[--diff-background-color\:var\(--base\)\] .openresearch-diff-file{--diff-background-color:var(--base)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-background-color\:var\(--color-diff-delete-code\)\] .openresearch-diff-file{--diff-code-delete-background-color:var(--color-diff-delete-code)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-edit-background-color\:var\(--color-diff-delete-edit\)\] .openresearch-diff-file{--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-edit-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-delete-edit-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-delete-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-background-color\:var\(--color-diff-insert-code\)\] .openresearch-diff-file{--diff-code-insert-background-color:var(--color-diff-insert-code)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-edit-background-color\:var\(--color-diff-insert-edit\)\] .openresearch-diff-file{--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-edit-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-insert-edit-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-insert-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-selected-background-color\:var\(--diff-selection-background-color\)\] .openresearch-diff-file{--diff-code-selected-background-color:var(--diff-selection-background-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-selected-text-color\:var\(--diff-selection-text-color\)\] .openresearch-diff-file{--diff-code-selected-text-color:var(--diff-selection-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-font-family\:var\(--mono\)\] .openresearch-diff-file{--diff-font-family:var(--mono)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-delete-background-color\:var\(--color-diff-delete-gutter\)\] .openresearch-diff-file{--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-delete-text-color\:var\(--accent-red\)\] .openresearch-diff-file{--diff-gutter-delete-text-color:var(--accent-red)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-insert-background-color\:var\(--color-diff-insert-gutter\)\] .openresearch-diff-file{--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-insert-text-color\:var\(--accent-green\)\] .openresearch-diff-file{--diff-gutter-insert-text-color:var(--accent-green)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-selected-background-color\:var\(--color-diff-gutter-selection\)\] .openresearch-diff-file{--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-selected-text-color\:var\(--diff-selection-text-color\)\] .openresearch-diff-file{--diff-gutter-selected-text-color:var(--diff-selection-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-omit-gutter-line-color\:var\(--color-diff-omit-gutter\)\] .openresearch-diff-file{--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-selection-background-color\:var\(--color-diff-selection\)\] .openresearch-diff-file{--diff-selection-background-color:var(--color-diff-selection)}.\[\&_\.openresearch-diff-file\]\:\[--diff-selection-text-color\:var\(--primary\)\] .openresearch-diff-file{--diff-selection-text-color:var(--primary)}.\[\&_\.openresearch-diff-file\]\:\[--diff-text-color\:var\(--text\)\] .openresearch-diff-file{--diff-text-color:var(--text)}.\[\&_\.openresearch-diff-file_\.diff-code\]\:px-4 .openresearch-diff-file .diff-code{padding-inline:calc(var(--spacing) * 4)}.\[\&_\.openresearch-diff-file_\.diff-code\]\:py-0 .openresearch-diff-file .diff-code{padding-block:0}.\[\&_\.openresearch-diff-file_\.diff-code\]\:break-normal .openresearch-diff-file .diff-code{overflow-wrap:normal;word-break:normal}.\[\&_\.openresearch-diff-file_\.diff-code\]\:wrap-normal .openresearch-diff-file .diff-code{overflow-wrap:normal}.\[\&_\.openresearch-diff-file_\.diff-code\]\:whitespace-pre .openresearch-diff-file .diff-code{white-space:pre}.\[\&_\.openresearch-diff-file_\.diff-hunk_\+_\.diff-hunk_\.diff-line\:first-child_\>_td\]\:border-t .openresearch-diff-file .diff-hunk+.diff-hunk .diff-line:first-child>td{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.openresearch-diff-file_\.diff-hunk_\+_\.diff-hunk_\.diff-line\:first-child_\>_td\]\:border-t-border .openresearch-diff-file .diff-hunk+.diff-hunk .diff-line:first-child>td{border-top-color:var(--border)}.\[\&_\.openresearch-diff-file_\.diff-line\]\:leading-\[1\.55\] .openresearch-diff-file .diff-line{--tw-leading:1.55;line-height:1.55}.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-delete\)\]\:bg-diff-delete-code .openresearch-diff-file .diff-line:has(.diff-code-delete){background-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-delete\)\]\:bg-diff-delete-code .openresearch-diff-file .diff-line:has(.diff-code-delete){background-color:color-mix(in oklab,var(--base) 92%,var(--accent-red))}}.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-insert\)\]\:bg-diff-insert-code .openresearch-diff-file .diff-line:has(.diff-code-insert){background-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-insert\)\]\:bg-diff-insert-code .openresearch-diff-file .diff-line:has(.diff-code-insert){background-color:color-mix(in oklab,var(--base) 91%,var(--accent-green))}}.\[\&_\.openresearch-diff-file\.diff-unified\]\:table-auto .openresearch-diff-file.diff-unified{table-layout:auto}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:first-child\]\:hidden .openresearch-diff-file.diff-unified .diff-line>td:first-child{display:none}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:sticky .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){position:sticky}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:start-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:z-1 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){z-index:1}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:w-\[1\%\] .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){width:1%}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:cursor-default .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){cursor:default}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:border-e .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:border-e-border .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){border-inline-end-color:var(--border)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:ps-3\.5 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-inline-start:calc(var(--spacing) * 3.5)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pe-2\.5 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-inline-end:calc(var(--spacing) * 2.5)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pt-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-top:0}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pb-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-bottom:0}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:text-end .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){text-align:end}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:whitespace-nowrap .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){white-space:nowrap}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:text-diff-gutter-text .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:text-diff-gutter-text .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){color:color-mix(in oklab,var(--text) 45%,var(--base))}}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:select-none .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){-webkit-user-select:none;user-select:none}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:first-child\]\:collapse .openresearch-diff-file.diff-unified col.diff-gutter-col:first-child{visibility:collapse}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:first-child\]\:w-0 .openresearch-diff-file.diff-unified col.diff-gutter-col:first-child{width:0}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:nth-child\(2\)\]\:w-\[1\%\] .openresearch-diff-file.diff-unified col.diff-gutter-col:nth-child(2){width:1%}.\[\&_\.paper-destination\]\:flex .paper-destination{display:flex}.\[\&_\.paper-destination\]\:items-center .paper-destination{align-items:center}.\[\&_\.paper-destination\]\:gap-2\.5 .paper-destination{gap:calc(var(--spacing) * 2.5)}.\[\&_\.paper-destination\]\:rounded-md .paper-destination{border-radius:8px}.\[\&_\.paper-destination\]\:border .paper-destination{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-destination\]\:border-border .paper-destination{border-color:var(--border)}.\[\&_\.paper-destination\]\:bg-background .paper-destination{background-color:var(--base)}.\[\&_\.paper-destination\]\:ps-3 .paper-destination{padding-inline-start:calc(var(--spacing) * 3)}.\[\&_\.paper-destination\]\:pe-2 .paper-destination{padding-inline-end:calc(var(--spacing) * 2)}.\[\&_\.paper-destination\]\:pt-2 .paper-destination{padding-top:calc(var(--spacing) * 2)}.\[\&_\.paper-destination\]\:pb-2 .paper-destination{padding-bottom:calc(var(--spacing) * 2)}.\[\&_\.paper-destination_\.btn\]\:flex-none .paper-destination .btn{flex:none}.\[\&_\.paper-destination_code\]\:min-w-0 .paper-destination code{min-width:0}.\[\&_\.paper-destination_code\]\:flex-1 .paper-destination code{flex:1}.\[\&_\.paper-destination_code\]\:overflow-hidden .paper-destination code{overflow:hidden}.\[\&_\.paper-destination_code\]\:text-sm .paper-destination code{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-destination_code\]\:font-normal .paper-destination code{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.paper-destination_code\]\:text-ellipsis .paper-destination code{text-overflow:ellipsis}.\[\&_\.paper-destination_code\]\:whitespace-nowrap .paper-destination code{white-space:nowrap}.\[\&_\.paper-destination_code\]\:text-text .paper-destination code{color:var(--text)}.\[\&_\.paper-pick\]\:flex .paper-pick{display:flex}.\[\&_\.paper-pick\]\:items-center .paper-pick{align-items:center}.\[\&_\.paper-pick\]\:justify-between .paper-pick{justify-content:space-between}.\[\&_\.paper-pick\]\:gap-2\.5 .paper-pick{gap:calc(var(--spacing) * 2.5)}.\[\&_\.paper-pick\]\:rounded-md .paper-pick{border-radius:8px}.\[\&_\.paper-pick\]\:border .paper-pick{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-pick\]\:border-border .paper-pick{border-color:var(--border)}.\[\&_\.paper-pick\]\:bg-surface .paper-pick{background-color:var(--surface)}.\[\&_\.paper-pick\]\:px-3 .paper-pick{padding-inline:calc(var(--spacing) * 3)}.\[\&_\.paper-pick\]\:py-2\.5 .paper-pick{padding-block:calc(var(--spacing) * 2.5)}.\[\&_\.paper-pick_\.id\]\:text-xs .paper-pick .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.paper-pick_\.id\]\:text-muted .paper-pick .id{color:var(--muted)}.\[\&_\.paper-pick_\.meta\]\:min-w-0 .paper-pick .meta{min-width:0}.\[\&_\.paper-pick_\.title\]\:text-sm .paper-pick .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-pick_\.title\]\:font-medium .paper-pick .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.paper-results\]\:flex .paper-results{display:flex}.\[\&_\.paper-results\]\:max-h-60 .paper-results{max-height:calc(var(--spacing) * 60)}.\[\&_\.paper-results\]\:flex-col .paper-results{flex-direction:column}.\[\&_\.paper-results\]\:overflow-y-auto .paper-results{overflow-y:auto}.\[\&_\.paper-results\]\:rounded-md .paper-results{border-radius:8px}.\[\&_\.paper-results\]\:border .paper-results{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-results\]\:border-border .paper-results{border-color:var(--border)}.\[\&_\.paper-results_\.id\]\:text-xs .paper-results .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.paper-results_\.id\]\:text-muted .paper-results .id{color:var(--muted)}.\[\&_\.paper-results_\.title\]\:text-sm .paper-results .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-results_\.title\]\:font-medium .paper-results .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.paper-results_button\]\:flex .paper-results button{display:flex}.\[\&_\.paper-results_button\]\:cursor-pointer .paper-results button{cursor:pointer}.\[\&_\.paper-results_button\]\:flex-col .paper-results button{flex-direction:column}.\[\&_\.paper-results_button\]\:items-start .paper-results button{align-items:flex-start}.\[\&_\.paper-results_button\]\:gap-0\.5 .paper-results button{gap:calc(var(--spacing) * .5)}.\[\&_\.paper-results_button\]\:border-0 .paper-results button{border-style:var(--tw-border-style);border-width:0}.\[\&_\.paper-results_button\]\:border-b .paper-results button{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_\.paper-results_button\]\:border-b-border-variant .paper-results button{border-bottom-color:var(--border-variant)}.\[\&_\.paper-results_button\]\:bg-transparent .paper-results button{background-color:#0000}.\[\&_\.paper-results_button\]\:bg-none .paper-results button{background-image:none}.\[\&_\.paper-results_button\]\:px-2\.5 .paper-results button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.paper-results_button\]\:py-2 .paper-results button{padding-block:calc(var(--spacing) * 2)}.\[\&_\.paper-results_button\]\:text-start .paper-results button{text-align:start}.\[\&_\.paper-results_button\]\:text-text .paper-results button{color:var(--text)}.\[\&_\.paper-results_button\]\:\[font\:inherit\] .paper-results button{font:inherit}.\[\&_\.paper-results_button\:hover\]\:bg-surface .paper-results button:hover{background-color:var(--surface)}.\[\&_\.paper-results_button\:last-child\]\:border-b-0 .paper-results button:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_\.path\]\:flex .path{display:flex}.\[\&_\.path\]\:min-w-0 .path{min-width:0}.\[\&_\.path\]\:flex-1 .path{flex:1}.\[\&_\.path\]\:items-center .path{align-items:center}.\[\&_\.path\]\:gap-2 .path{gap:calc(var(--spacing) * 2)}.\[\&_\.path_code\]\:min-w-0 .path code{min-width:0}.\[\&_\.path_code\]\:flex-1 .path code{flex:1}.\[\&_\.path_code\]\:overflow-hidden .path code{overflow:hidden}.\[\&_\.path_code\]\:font-mono .path code{font-family:var(--mono)}.\[\&_\.path_code\]\:text-xs .path code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.path_code\]\:font-semibold .path code{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.path_code\]\:text-ellipsis .path code{text-overflow:ellipsis}.\[\&_\.path_code\]\:whitespace-nowrap .path code{white-space:nowrap}.\[\&_\.path_code\]\:text-text .path code{color:var(--text)}.\[\&_\.progress\]\:mx-0 .progress{margin-inline:0}.\[\&_\.progress\]\:mt-2 .progress{margin-top:calc(var(--spacing) * 2)}.\[\&_\.progress\]\:mb-0 .progress{margin-bottom:0}.\[\&_\.progress-track\]\:h-\[5px\] .progress-track{height:5px}.\[\&_\.progress-track\]\:border-0 .progress-track{border-style:var(--tw-border-style);border-width:0}.\[\&_\.progress-track\]\:bg-border .progress-track{background-color:var(--border)}.\[\&_\.project-back\]\:shrink-0 .project-back{flex-shrink:0}.\[\&_\.project-chevron\]\:text-muted .project-chevron{color:var(--muted)}.\[\&_\.project-chevron\]\:opacity-0 .project-chevron{opacity:0}.\[\&_\.project-chevron\]\:transition-transform .project-chevron{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_\.project-chevron\]\:duration-120 .project-chevron{--tw-duration:.12s;transition-duration:.12s}.\[\&_\.project-chevron\]\:ease-standard .project-chevron{--tw-ease:ease;transition-timing-function:ease}.\[\&_\.project-default-title\]\:text-base .project-default-title,.\[\&_\.project-field-label\]\:text-base .project-field-label{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-field-label\]\:font-medium .project-field-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.project-field-label\]\:text-text .project-field-label{color:var(--text)}.\[\&_\.project-location-field\]\:flex .project-location-field{display:flex}.\[\&_\.project-location-field\]\:flex-col .project-location-field{flex-direction:column}.\[\&_\.project-location-field\]\:gap-2 .project-location-field{gap:calc(var(--spacing) * 2)}.\[\&_\.project-location-label\]\:text-base .project-location-label{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-location-label\]\:font-medium .project-location-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.project-location-label\]\:text-text .project-location-label{color:var(--text)}.\[\&_\.project-menu\]\:start-0 .project-menu{inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\.project-menu\]\:z-70 .project-menu{z-index:70}.\[\&_\.project-menu\]\:w-52\.5 .project-menu{width:calc(var(--spacing) * 52.5)}.\[\&_\.project-path-notice\]\:rounded-sm .project-path-notice{border-radius:6px}.\[\&_\.project-path-notice\]\:border .project-path-notice{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.project-path-notice\]\:border-border-variant .project-path-notice{border-color:var(--border-variant)}.\[\&_\.project-path-notice\]\:bg-surface .project-path-notice{background-color:var(--surface)}.\[\&_\.project-path-notice\]\:px-\[11px\] .project-path-notice{padding-inline:11px}.\[\&_\.project-path-notice\]\:py-\[9px\] .project-path-notice{padding-block:9px}.\[\&_\.project-path-notice\]\:text-base .project-path-notice{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-path-notice\]\:text-sm .project-path-notice{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.project-path-notice\]\:leading-\[1\.4\] .project-path-notice{--tw-leading:1.4;line-height:1.4}.\[\&_\.project-path-notice\]\:leading-relaxed .project-path-notice{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_\.project-path-notice\]\:text-subtext .project-path-notice{color:var(--subtext)}.\[\&_\.project-path-notice\]\:text-text .project-path-notice{color:var(--text)}.\[\&_\.project-path-notice\.error\]\:border-danger-notice-border .project-path-notice.error{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.project-path-notice\.error\]\:border-danger-notice-border .project-path-notice.error{border-color:color-mix(in srgb,var(--accent-red) 35%,var(--border-variant))}}.\[\&_\.project-switcher\]\:relative .project-switcher{position:relative}.\[\&_\.project-switcher\]\:min-w-0 .project-switcher{min-width:0}.\[\&_\.project-switcher\]\:flex-1 .project-switcher{flex:1}.\[\&_\.project-switcher\]\:self-stretch .project-switcher{align-self:stretch}.\[\&_\.rail-body\]\:min-h-0 .rail-body{min-height:0}.\[\&_\.rail-body\]\:flex-1 .rail-body{flex:1}.\[\&_\.rail-body\]\:overflow-y-auto .rail-body{overflow-y:auto}.\[\&_\.rail-body\]\:px-2 .rail-body{padding-inline:calc(var(--spacing) * 2)}.\[\&_\.rail-body\]\:py-1 .rail-body{padding-block:var(--spacing)}.\[\&_\.react-flow\\_\\_attribution\]\:hidden\! .react-flow__attribution{display:none!important}.\[\&_\.react-flow\\_\\_handle\]\:pointer-events-none .react-flow__handle{pointer-events:none}.\[\&_\.react-flow\\_\\_handle\]\:opacity-0 .react-flow__handle{opacity:0}.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-elided\.selectable\]\:cursor-pointer .react-flow__node.react-flow__node-elided.selectable{cursor:pointer}.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-exp\.selectable\]\:cursor-default .react-flow__node.react-flow__node-exp.selectable{cursor:default}.\[\&_\.repo-hint\]\:text-sm .repo-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.repo-hint\]\:font-normal .repo-hint{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.repo-hint\]\:text-muted .repo-hint{color:var(--muted)}.\[\&_\.repo-hint\.ok\]\:text-accent-teal .repo-hint.ok{color:var(--accent-teal)}.\[\&_\.row2\]\:grid .row2{display:grid}.\[\&_\.row2\]\:grid-cols-2 .row2{grid-template-columns:repeat(2,minmax(0,1fr))}.\[\&_\.row2\]\:gap-2\.5 .row2{gap:calc(var(--spacing) * 2.5)}.\[\&_\.run-chip_svg\]\:text-primary .run-chip svg{color:var(--primary)}.\[\&_\.run-chip_svg\]\:opacity-100 .run-chip svg{opacity:1}.\[\&_\.sel\]\:font-medium .sel{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.sel\]\:text-text .sel{color:var(--text)}.\[\&_\.session-dot\]\:inline-flex .session-dot{display:inline-flex}.\[\&_\.session-dot\]\:w-3\.5 .session-dot{width:calc(var(--spacing) * 3.5)}.\[\&_\.session-dot\]\:shrink-0 .session-dot{flex-shrink:0}.\[\&_\.session-dot\]\:items-center .session-dot{align-items:center}.\[\&_\.session-dot\]\:justify-center .session-dot{justify-content:center}.\[\&_\.session-menu-btn\]\:mx-0 .session-menu-btn{margin-inline:0}.\[\&_\.session-menu-btn\]\:-my-0\.5 .session-menu-btn{margin-block:calc(var(--spacing) * -.5)}.\[\&_\.session-menu-btn\]\:hidden .session-menu-btn{display:none}.\[\&_\.session-menu-btn\]\:h-4 .session-menu-btn{height:calc(var(--spacing) * 4)}.\[\&_\.session-menu-btn\]\:w-4 .session-menu-btn{width:calc(var(--spacing) * 4)}.\[\&_\.session-menu-btn\]\:shrink-0 .session-menu-btn{flex-shrink:0}.\[\&_\.session-menu-btn\]\:items-center .session-menu-btn{align-items:center}.\[\&_\.session-menu-btn\]\:justify-center .session-menu-btn{justify-content:center}.\[\&_\.session-menu-btn\]\:rounded-sm .session-menu-btn{border-radius:6px}.\[\&_\.session-menu-btn\]\:text-muted .session-menu-btn{color:var(--muted)}.\[\&_\.session-menu-btn\:hover\]\:bg-panel .session-menu-btn:hover{background-color:var(--panel)}.\[\&_\.session-menu-btn\:hover\]\:text-text .session-menu-btn:hover{color:var(--text)}.\[\&_\.session-time\]\:shrink-0 .session-time{flex-shrink:0}.\[\&_\.session-time\]\:text-xs .session-time{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.session-time\]\:text-muted .session-time{color:var(--muted)}.\[\&_\.session-title\]\:min-w-0 .session-title{min-width:0}.\[\&_\.session-title\]\:flex-1 .session-title{flex:1}.\[\&_\.session-title\]\:overflow-hidden .session-title{overflow:hidden}.\[\&_\.session-title\]\:text-ellipsis .session-title{text-overflow:ellipsis}.\[\&_\.session-title\]\:whitespace-nowrap .session-title{white-space:nowrap}.\[\&_\.session-title-input\]\:mx-0 .session-title-input{margin-inline:0}.\[\&_\.session-title-input\]\:-my-0\.5 .session-title-input{margin-block:calc(var(--spacing) * -.5)}.\[\&_\.session-title-input\]\:min-w-0 .session-title-input{min-width:0}.\[\&_\.session-title-input\]\:flex-1 .session-title-input{flex:1}.\[\&_\.session-title-input\]\:rounded-sm .session-title-input{border-radius:6px}.\[\&_\.session-title-input\]\:border .session-title-input{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.session-title-input\]\:border-primary .session-title-input{border-color:var(--primary)}.\[\&_\.session-title-input\]\:bg-background .session-title-input{background-color:var(--base)}.\[\&_\.session-title-input\]\:px-\[5px\] .session-title-input{padding-inline:5px}.\[\&_\.session-title-input\]\:py-px .session-title-input{padding-block:1px}.\[\&_\.session-title-input\]\:text-text .session-title-input{color:var(--text)}.\[\&_\.session-title-input\]\:outline-none .session-title-input{--tw-outline-style:none;outline-style:none}.\[\&_\.session-title-input\]\:\[font\:inherit\] .session-title-input{font:inherit}.\[\&_\.settings-card\]\:mb-0 .settings-card,.\[\&_\.settings-card-head\]\:mb-0 .settings-card-head{margin-bottom:0}.\[\&_\.settings-card-head\]\:justify-between .settings-card-head{justify-content:space-between}.\[\&_\.settings-card-head\]\:pb-3 .settings-card-head{padding-bottom:calc(var(--spacing) * 3)}.\[\&_\.settings-card-head_h3\]\:m-0 .settings-card-head h3{margin:0}.\[\&_\.settings-form\]\:mt-6 .settings-form{margin-top:calc(var(--spacing) * 6)}.\[\&_\.settings-form\]\:border-t-0 .settings-form{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&_\.settings-form\]\:pt-0 .settings-form{padding-top:0}.\[\&_\.settings-sub\]\:mb-3 .settings-sub{margin-bottom:calc(var(--spacing) * 3)}.\[\&_\.skill-chip\]\:me-0\.5 .skill-chip{margin-inline-end:calc(var(--spacing) * .5)}.\[\&_\.skill-chip\]\:align-baseline .skill-chip{vertical-align:baseline}.\[\&_\.skill-desc\]\:text-sm .skill-desc{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.skill-desc\]\:text-subtext .skill-desc{color:var(--subtext)}.\[\&_\.skill-name\]\:text-sm .skill-name{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.spinner\]\:h-5\.5 .spinner{height:calc(var(--spacing) * 5.5)}.\[\&_\.spinner\]\:w-5\.5 .spinner{width:calc(var(--spacing) * 5.5)}.\[\&_\.spinner\]\:border-\[3px\] .spinner{border-style:var(--tw-border-style);border-width:3px}.\[\&_\.stats\]\:flex .stats{display:flex}.\[\&_\.stats\]\:shrink-0 .stats{flex-shrink:0}.\[\&_\.stats\]\:items-center .stats{align-items:center}.\[\&_\.stats\]\:gap-2 .stats{gap:calc(var(--spacing) * 2)}.\[\&_\.stats\]\:font-mono .stats{font-family:var(--mono)}.\[\&_\.stats\]\:text-xs .stats{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.stats\]\:font-medium .stats{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.stats\]\:tabular-nums .stats{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.\[\&_\.status-badge\]\:text-text .status-badge{color:var(--text)}.\[\&_\.tab-close\]\:inline-flex .tab-close{display:inline-flex}.\[\&_\.tab-close\]\:h-3\.5 .tab-close{height:calc(var(--spacing) * 3.5)}.\[\&_\.tab-close\]\:w-3\.5 .tab-close{width:calc(var(--spacing) * 3.5)}.\[\&_\.tab-close\]\:shrink-0 .tab-close{flex-shrink:0}.\[\&_\.tab-close\]\:items-center .tab-close{align-items:center}.\[\&_\.tab-close\]\:justify-center .tab-close{justify-content:center}.\[\&_\.tab-close\]\:rounded-xs .tab-close{border-radius:4px}.\[\&_\.tab-close\]\:text-muted .tab-close{color:var(--muted)}.\[\&_\.tab-close\:hover\]\:bg-hover-strong .tab-close:hover{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.tab-close\:hover\]\:bg-hover-strong .tab-close:hover{background-color:color-mix(in oklab,var(--text) 15%,transparent)}}.\[\&_\.tab-close\:hover\]\:text-text .tab-close:hover{color:var(--text)}.\[\&_\.tab-label\]\:grid .tab-label{display:grid}.\[\&_\.tab-label\]\:min-w-0 .tab-label{min-width:0}.\[\&_\.tab-label\]\:grid-cols-\[minmax\(0\,_1fr\)\] .tab-label{grid-template-columns:minmax(0,1fr)}.\[\&_\.tab-label\]\:overflow-hidden .tab-label,.\[\&_\.tab-label_\>_span\]\:overflow-hidden .tab-label>span{overflow:hidden}.\[\&_\.tab-label_\>_span\]\:pe-1 .tab-label>span{padding-inline-end:var(--spacing)}.\[\&_\.tab-label_\>_span\]\:text-ellipsis .tab-label>span{text-overflow:ellipsis}.\[\&_\.tab-label_\>_span\]\:whitespace-nowrap .tab-label>span{white-space:nowrap}.\[\&_\.tab-label_\>_span\]\:\[grid-area\:1_\/_1\] .tab-label>span{grid-area:1/1}.\[\&_\.tab-label\:\:after\]\:invisible .tab-label:after{visibility:hidden}.\[\&_\.tab-label\:\:after\]\:overflow-hidden .tab-label:after{overflow:hidden}.\[\&_\.tab-label\:\:after\]\:pe-1 .tab-label:after{padding-inline-end:var(--spacing)}.\[\&_\.tab-label\:\:after\]\:font-medium .tab-label:after{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.tab-label\:\:after\]\:text-ellipsis .tab-label:after{text-overflow:ellipsis}.\[\&_\.tab-label\:\:after\]\:whitespace-nowrap .tab-label:after{white-space:nowrap}.\[\&_\.tab-label\:\:after\]\:content-\[attr\(data-label\)\] .tab-label:after{--tw-content:attr(data-label);content:var(--tw-content)}.\[\&_\.tab-label\:\:after\]\:\[grid-area\:1_\/_1\] .tab-label:after{grid-area:1/1}.\[\&_\.title\]\:max-w-60 .title{max-width:calc(var(--spacing) * 60)}.\[\&_\.title\]\:overflow-hidden .title{overflow:hidden}.\[\&_\.title\]\:text-sm .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.title\]\:font-medium .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.title\]\:text-ellipsis .title{text-overflow:ellipsis}.\[\&_\.title\]\:whitespace-nowrap .title{white-space:nowrap}.\[\&_\.unread-dot\]\:h-\[7px\] .unread-dot{height:7px}.\[\&_\.unread-dot\]\:w-\[7px\] .unread-dot{width:7px}.\[\&_\.unread-dot\]\:shrink-0 .unread-dot{flex-shrink:0}.\[\&_\.unread-dot\]\:rounded-full .unread-dot{border-radius:999px}.\[\&_\.unread-dot\]\:bg-primary .unread-dot{background-color:var(--primary)}.\[\&_\.v\]\:flex .v{display:flex}.\[\&_\.v\]\:min-w-0 .v{min-width:0}.\[\&_\.v\]\:flex-wrap .v{flex-wrap:wrap}.\[\&_\.v\]\:items-center .v{align-items:center}.\[\&_\.v\]\:gap-2 .v{gap:calc(var(--spacing) * 2)}.\[\&_\.v\]\:font-sans .v{font-family:var(--sans)}.\[\&_\.v\]\:text-base .v{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.v\]\:break-words .v{overflow-wrap:break-word}.\[\&_\.v\]\:break-all .v{word-break:break-all}.\[\&_\.v\]\:text-text .v{color:var(--text)}.\[\&_\:where\(\[data-tip\]\)\]\:relative :where([data-tip]){position:relative}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:pointer-events-none :where([data-tip]):after{pointer-events:none}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:invisible :where([data-tip]):after{visibility:hidden}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:absolute :where([data-tip]):after{position:absolute}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:top-\[calc\(100\%_\+_6px\)\] :where([data-tip]):after{top:calc(100% + 6px)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:left-1\/2 :where([data-tip]):after{left:50%}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:z-\[9999\] :where([data-tip]):after{z-index:9999}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:w-max :where([data-tip]):after{width:max-content}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:max-w-none :where([data-tip]):after{max-width:none}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:-translate-x-1\/2 :where([data-tip]):after{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:rounded-sm :where([data-tip]):after{border-radius:6px}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:bg-text :where([data-tip]):after{background-color:var(--text)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:px-2 :where([data-tip]):after{padding-inline:calc(var(--spacing) * 2)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:py-\[5px\] :where([data-tip]):after{padding-block:5px}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:text-xs :where([data-tip]):after{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:leading-none :where([data-tip]):after{--tw-leading:1;line-height:1}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:font-medium :where([data-tip]):after{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:whitespace-nowrap :where([data-tip]):after{white-space:nowrap}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:text-background :where([data-tip]):after{color:var(--base)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:opacity-0 :where([data-tip]):after{opacity:0}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:content-\[attr\(data-tip\)\] :where([data-tip]):after{--tw-content:attr(data-tip);content:var(--tw-content)}.\[\&_\:where\(\[data-tip\]\)\:is\(\:hover\,\:focus-visible\)\:\:after\]\:visible :where([data-tip]):is(:hover,:focus-visible):after{visibility:visible}.\[\&_\:where\(\[data-tip\]\)\:is\(\:hover\,\:focus-visible\)\:\:after\]\:opacity-100 :where([data-tip]):is(:hover,:focus-visible):after{opacity:1}.\[\&_\>_\*\:first-child\]\:mt-0>:first-child{margin-top:0}.\[\&_\>_\*\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\>_\.changes-note\]\:mx-4>.changes-note{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.changes-note\]\:my-3\.5>.changes-note{margin-block:calc(var(--spacing) * 3.5)}.\[\&_\>_\.diff-explorer\]\:mx-4>.diff-explorer{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.diff-explorer\]\:mt-3\.5>.diff-explorer{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.diff-explorer\]\:mb-0>.diff-explorer{margin-bottom:0}.\[\&_\>_\.error\]\:mx-0>.error{margin-inline:0}.\[\&_\>_\.error\]\:mt-0>.error{margin-top:0}.\[\&_\>_\.error\]\:mt-3\.5>.error{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.error\]\:mb-3>.error{margin-bottom:calc(var(--spacing) * 3)}.\[\&_\>_\.error\]\:text-base>.error{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\>_\.error\]\:whitespace-pre-wrap>.error{white-space:pre-wrap}.\[\&_\>_\.error\]\:text-accent-red>.error{color:var(--accent-red)}.\[\&_\>_\.openresearch-diff\]\:mx-4>.openresearch-diff{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.openresearch-diff\]\:mt-3\.5>.openresearch-diff{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.openresearch-diff\]\:mb-0>.openresearch-diff{margin-bottom:0}.\[\&_\>_\.project-default-row\:first-child\]\:border-t-0>.project-default-row:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&_\>_\.project-default-row\:first-child\]\:pt-0>.project-default-row:first-child{padding-top:0}.\[\&_\>_\.seg\]\:rounded-sm>.seg{border-radius:6px}.\[\&_\>_\.seg\]\:p-0\.5>.seg{padding:calc(var(--spacing) * .5)}.\[\&_\>_\.seg_button\]\:px-2>.seg button{padding-inline:calc(var(--spacing) * 2)}.\[\&_\>_\.seg_button\]\:py-0\.5>.seg button{padding-block:calc(var(--spacing) * .5)}.\[\&_\>_\.seg_button\]\:text-sm>.seg button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\>_\.seg_button\]\:font-medium>.seg button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\>_\.truncated-notice\]\:mx-4>.truncated-notice{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.truncated-notice\]\:mt-3\.5>.truncated-notice{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.truncated-notice\]\:mb-0>.truncated-notice{margin-bottom:0}.\[\&_\>_\:first-child\]\:mt-3\.5>:first-child{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\>_h2\]\:mx-0>h2{margin-inline:0}.\[\&_\>_h2\]\:mt-0>h2{margin-top:0}.\[\&_\>_h2\]\:mb-1\.5>h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_\>_h2\]\:text-xl>h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\>_label\]\:gap-2>label{gap:calc(var(--spacing) * 2)}.\[\&_\>_p\]\:m-0>p{margin:0}.\[\&_\>_p\]\:text-sm>p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\>_p\]\:leading-relaxed>p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_\>_p\]\:text-text>p{color:var(--text)}.\[\&_\>_span\]\:inline-flex>span{display:inline-flex}.\[\&_\>_span\]\:items-center>span{align-items:center}.\[\&_\>_span\]\:gap-\[5px\]>span{gap:5px}.\[\&_\>_svg\]\:shrink-0>svg{flex-shrink:0}.\[\&_\>_svg\]\:text-muted>svg{color:var(--muted)}.\[\&_\>_svg\]\:text-subtext>svg{color:var(--subtext)}.\[\&_\>_svg\.file-tree-chevron\]\:text-muted>svg.file-tree-chevron{color:var(--muted)}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:start-auto [data-tip-align=end]:after{inset-inline-start:auto}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:end-0 [data-tip-align=end]:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:translate-none [data-tip-align=end]:after{translate:none}.\[\&_\[data-tip-align\=\'start\'\]\:\:after\]\:start-0 [data-tip-align=start]:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\[data-tip-align\=\'start\'\]\:\:after\]\:translate-none [data-tip-align=start]:after{translate:none}.\[\&_a\]\:text-sm a{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_a\]\:whitespace-nowrap a{white-space:nowrap}.\[\&_a\]\:text-primary a{color:var(--primary)}.\[\&_a\]\:text-subtext a{color:var(--subtext)}.\[\&_blockquote\]\:mx-0 blockquote{margin-inline:0}.\[\&_blockquote\]\:my-1\.5 blockquote{margin-block:calc(var(--spacing) * 1.5)}.\[\&_blockquote\]\:border-s-\[3px\] blockquote{border-inline-start-style:var(--tw-border-style);border-inline-start-width:3px}.\[\&_blockquote\]\:border-s-border blockquote{border-inline-start-color:var(--border)}.\[\&_blockquote\]\:ps-2\.5 blockquote{padding-inline-start:calc(var(--spacing) * 2.5)}.\[\&_blockquote\]\:pe-0 blockquote{padding-inline-end:0}.\[\&_blockquote\]\:pt-0\.5 blockquote{padding-top:calc(var(--spacing) * .5)}.\[\&_blockquote\]\:pb-0\.5 blockquote{padding-bottom:calc(var(--spacing) * .5)}.\[\&_blockquote\]\:text-subtext blockquote{color:var(--subtext)}.\[\&_button\]\:absolute button{position:absolute}.\[\&_button\]\:-top-\[5px\] button{top:-5px}.\[\&_button\]\:-right-\[5px\] button{right:-5px}.\[\&_button\]\:-mb-px button{margin-bottom:-1px}.\[\&_button\]\:flex button{display:flex}.\[\&_button\]\:grid button{display:grid}.\[\&_button\]\:inline-flex button{display:inline-flex}.\[\&_button\]\:h-4 button{height:calc(var(--spacing) * 4)}.\[\&_button\]\:w-4 button{width:calc(var(--spacing) * 4)}.\[\&_button\]\:w-full button{width:100%}.\[\&_button\]\:cursor-pointer button{cursor:pointer}.\[\&_button\]\:grid-cols-\[18px_minmax\(0\,_1fr\)_auto_auto\] button{grid-template-columns:18px minmax(0,1fr) auto auto}.\[\&_button\]\:grid-cols-\[minmax\(72px\,_0\.7fr\)_minmax\(100px\,_1fr\)_minmax\(70px\,_0\.7fr\)_60px_16px\] button{grid-template-columns:minmax(72px,.7fr) minmax(100px,1fr) minmax(70px,.7fr) 60px 16px}.\[\&_button\]\:flex-col button{flex-direction:column}.\[\&_button\]\:items-center button{align-items:center}.\[\&_button\]\:items-start button{align-items:flex-start}.\[\&_button\]\:justify-center button{justify-content:center}.\[\&_button\]\:gap-0\.5 button{gap:calc(var(--spacing) * .5)}.\[\&_button\]\:gap-3\.5 button{gap:calc(var(--spacing) * 3.5)}.\[\&_button\]\:gap-\[7px\] button{gap:7px}.\[\&_button\]\:rounded-full button{border-radius:999px}.\[\&_button\]\:rounded-sm button{border-radius:6px}.\[\&_button\]\:rounded-xs button{border-radius:4px}.\[\&_button\]\:border button{border-style:var(--tw-border-style);border-width:1px}.\[\&_button\]\:border-0 button{border-style:var(--tw-border-style);border-width:0}.\[\&_button\]\:border-b button{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_button\]\:border-b-2 button{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.\[\&_button\]\:border-border button{border-color:var(--border)}.\[\&_button\]\:border-b-border-variant button{border-bottom-color:var(--border-variant)}.\[\&_button\]\:border-b-transparent button{border-bottom-color:#0000}.\[\&_button\]\:bg-surface button{background-color:var(--surface)}.\[\&_button\]\:bg-transparent button{background-color:#0000}.\[\&_button\]\:bg-none button{background-image:none}.\[\&_button\]\:p-0 button{padding:0}.\[\&_button\]\:p-0\.5 button{padding:calc(var(--spacing) * .5)}.\[\&_button\]\:px-0 button{padding-inline:0}.\[\&_button\]\:px-0\.5 button{padding-inline:calc(var(--spacing) * .5)}.\[\&_button\]\:px-2 button{padding-inline:calc(var(--spacing) * 2)}.\[\&_button\]\:px-2\.5 button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_button\]\:px-3 button{padding-inline:calc(var(--spacing) * 3)}.\[\&_button\]\:px-\[9px\] button{padding-inline:9px}.\[\&_button\]\:py-0\.5 button{padding-block:calc(var(--spacing) * .5)}.\[\&_button\]\:py-2 button{padding-block:calc(var(--spacing) * 2)}.\[\&_button\]\:py-\[3px\] button{padding-block:3px}.\[\&_button\]\:py-\[7px\] button{padding-block:7px}.\[\&_button\]\:py-\[11px\] button{padding-block:11px}.\[\&_button\]\:text-start button{text-align:start}.\[\&_button\]\:text-sm button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_button\]\:font-medium button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_button\]\:text-muted button{color:var(--muted)}.\[\&_button\]\:text-text button{color:var(--text)}.\[\&_button\]\:\[font\:inherit\] button{font:inherit}.\[\&_button\.active\]\:border-b-primary button.active{border-bottom-color:var(--primary)}.\[\&_button\.active\]\:bg-background button.active{background-color:var(--base)}.\[\&_button\.active\]\:bg-surface button.active{background-color:var(--surface)}.\[\&_button\.active\]\:shadow-diff-active button.active{--tw-shadow:inset 2px 0 0 var(--tw-shadow-color,var(--text));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_button\.active\]\:shadow-segment button.active{--tw-shadow:0 1px 3px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.\[\&_button\.active\]\:shadow-segment button.active{--tw-shadow:0 1px 3px var(--tw-shadow-color,color-mix(in oklab, var(--text) 25%, transparent))}}.\[\&_button\.active\]\:shadow-segment button.active{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_button\:disabled\]\:cursor-default button:disabled{cursor:default}.\[\&_button\:disabled\]\:text-muted button:disabled{color:var(--muted)}.\[\&_button\:hover\]\:bg-panel button:hover{background-color:var(--panel)}.\[\&_button\:hover\]\:bg-surface button:hover{background-color:var(--surface)}.\[\&_button\:hover\]\:bg-text button:hover{background-color:var(--text)}.\[\&_button\:hover\]\:text-background button:hover{color:var(--base)}.\[\&_button\:hover\]\:text-text button:hover{color:var(--text)}.\[\&_button\:hover\]\:underline button:hover{text-decoration-line:underline}.\[\&_button\:hover\]\:underline-offset-2 button:hover{text-underline-offset:2px}.\[\&_button\:last-child\]\:border-b-0 button:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_button\:not\(\:disabled\)\:hover\]\:text-text button:not(:disabled):hover{color:var(--text)}.\[\&_code\]\:min-w-0 code{min-width:0}.\[\&_code\]\:flex-1 code{flex:1}.\[\&_code\]\:overflow-hidden code{overflow:hidden}.\[\&_code\]\:rounded-xs code{border-radius:4px}.\[\&_code\]\:border code{border-style:var(--tw-border-style);border-width:1px}.\[\&_code\]\:border-border-variant code{border-color:var(--border-variant)}.\[\&_code\]\:bg-panel code{background-color:var(--panel)}.\[\&_code\]\:px-\[5px\] code{padding-inline:5px}.\[\&_code\]\:py-px code{padding-block:1px}.\[\&_code\]\:text-left code{text-align:left}.\[\&_code\]\:font-mono code{font-family:var(--mono)}.\[\&_code\]\:text-sm code{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_code\]\:text-xs code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_code\]\:font-medium code{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_code\]\:text-ellipsis code{text-overflow:ellipsis}.\[\&_code\]\:whitespace-nowrap code{white-space:nowrap}.\[\&_code\]\:text-muted code{color:var(--muted)}.\[\&_code\]\:text-primary code{color:var(--primary)}.\[\&_code\]\:text-text code{color:var(--text)}.\[\&_code\]\:\[direction\:rtl\] code{direction:rtl}.\[\&_h1\]\:m-0 h1{margin:0}.\[\&_h1\]\:mx-0 h1{margin-inline:0}.\[\&_h1\]\:mt-0 h1{margin-top:0}.\[\&_h1\]\:mt-3 h1{margin-top:calc(var(--spacing) * 3)}.\[\&_h1\]\:mt-7 h1{margin-top:calc(var(--spacing) * 7)}.\[\&_h1\]\:mb-1\.5 h1{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h1\]\:mb-3\.5 h1{margin-bottom:calc(var(--spacing) * 3.5)}.\[\&_h1\]\:text-3xl h1{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\[\&_h1\]\:text-4xl h1{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.\[\&_h1\]\:text-xl h1{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h1\]\:text-prose-emphasis h1{font-size:1.05em}.\[\&_h1\]\:leading-\[1\.18\] h1{--tw-leading:1.18;line-height:1.18}.\[\&_h1\]\:leading-tight h1{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\[\&_h1\]\:font-semibold h1{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h1\]\:text-text h1{color:var(--text)}.\[\&_h2\]\:m-0 h2{margin:0}.\[\&_h2\]\:mx-0 h2{margin-inline:0}.\[\&_h2\]\:mt-0 h2{margin-top:0}.\[\&_h2\]\:mt-3 h2{margin-top:calc(var(--spacing) * 3)}.\[\&_h2\]\:mt-7 h2{margin-top:calc(var(--spacing) * 7)}.\[\&_h2\]\:mb-1\.5 h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h2\]\:mb-2\.5 h2{margin-bottom:calc(var(--spacing) * 2.5)}.\[\&_h2\]\:mb-3\.5 h2{margin-bottom:calc(var(--spacing) * 3.5)}.\[\&_h2\]\:flex h2{display:flex}.\[\&_h2\]\:items-center h2{align-items:center}.\[\&_h2\]\:gap-2 h2{gap:calc(var(--spacing) * 2)}.\[\&_h2\]\:text-3xl h2{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\[\&_h2\]\:text-4xl h2{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.\[\&_h2\]\:text-5xl h2{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.\[\&_h2\]\:text-lg h2{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_h2\]\:text-sm h2{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_h2\]\:text-xl h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h2\]\:text-prose-emphasis h2{font-size:1.05em}.\[\&_h2\]\:leading-tight h2{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\[\&_h2\]\:font-medium h2{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_h2\]\:font-semibold h2{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h2\]\:tracking-\[-0\.02em\] h2{--tw-tracking:-.02em;letter-spacing:-.02em}.\[\&_h2\]\:tracking-\[-0\.015em\] h2{--tw-tracking:-.015em;letter-spacing:-.015em}.\[\&_h2\]\:text-text h2{color:var(--text)}.\[\&_h3\]\:mx-0 h3{margin-inline:0}.\[\&_h3\]\:mt-0 h3{margin-top:0}.\[\&_h3\]\:mt-1\.5 h3{margin-top:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:mt-3 h3{margin-top:calc(var(--spacing) * 3)}.\[\&_h3\]\:mt-5\.5 h3{margin-top:calc(var(--spacing) * 5.5)}.\[\&_h3\]\:mb-0 h3{margin-bottom:0}.\[\&_h3\]\:mb-1\.5 h3{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:mb-2 h3{margin-bottom:calc(var(--spacing) * 2)}.\[\&_h3\]\:mb-2\.5 h3{margin-bottom:calc(var(--spacing) * 2.5)}.\[\&_h3\]\:mb-3 h3{margin-bottom:calc(var(--spacing) * 3)}.\[\&_h3\]\:text-base h3{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_h3\]\:text-xl h3{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h3\]\:text-prose-emphasis h3{font-size:1.05em}.\[\&_h3\]\:leading-\[1\.35\] h3{--tw-leading:1.35;line-height:1.35}.\[\&_h3\]\:font-semibold h3{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h3\]\:text-text h3{color:var(--text)}.\[\&_h4\]\:mx-0 h4{margin-inline:0}.\[\&_h4\]\:mt-0 h4{margin-top:0}.\[\&_h4\]\:mt-3 h4{margin-top:calc(var(--spacing) * 3)}.\[\&_h4\]\:mt-4\.5 h4{margin-top:calc(var(--spacing) * 4.5)}.\[\&_h4\]\:mb-1 h4{margin-bottom:var(--spacing)}.\[\&_h4\]\:mb-1\.5 h4{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h4\]\:text-lg h4{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_h4\]\:text-sm h4{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_h4\]\:text-prose-emphasis h4{font-size:1.05em}.\[\&_h4\]\:leading-\[1\.4\] h4{--tw-leading:1.4;line-height:1.4}.\[\&_h4\]\:font-semibold h4{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h4\]\:text-accent-amber h4{color:var(--accent-amber)}.\[\&_h4\]\:text-text h4{color:var(--text)}.\[\&_img\]\:block img{display:block}.\[\&_img\]\:h-13 img{height:calc(var(--spacing) * 13)}.\[\&_img\]\:h-auto img{height:auto}.\[\&_img\]\:max-h-40 img{max-height:calc(var(--spacing) * 40)}.\[\&_img\]\:w-13 img{width:calc(var(--spacing) * 13)}.\[\&_img\]\:max-w-55 img{max-width:calc(var(--spacing) * 55)}.\[\&_img\]\:max-w-full img{max-width:100%}.\[\&_img\]\:rounded-sm img{border-radius:6px}.\[\&_img\]\:rounded-xs img{border-radius:4px}.\[\&_img\]\:border img{border-style:var(--tw-border-style);border-width:1px}.\[\&_img\]\:border-border img{border-color:var(--border)}.\[\&_img\]\:border-border-variant img{border-color:var(--border-variant)}.\[\&_img\]\:object-cover img{object-fit:cover}.\[\&_input\]\:m-0 input{margin:0}.\[\&_input\]\:w-full input{width:100%}.\[\&_input\]\:min-w-55 input{min-width:calc(var(--spacing) * 55)}.\[\&_input\]\:flex-1 input{flex:1}.\[\&_input\]\:rounded-none input{border-radius:0}.\[\&_input\]\:border-0 input{border-style:var(--tw-border-style);border-width:0}.\[\&_input\]\:border-b input{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_input\]\:border-b-border-variant input{border-bottom-color:var(--border-variant)}.\[\&_input\]\:bg-transparent input{background-color:#0000}.\[\&_input\]\:bg-none input{background-image:none}.\[\&_input\]\:px-2\.5 input{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_input\]\:py-2 input{padding-block:calc(var(--spacing) * 2)}.\[\&_input\]\:font-sans input{font-family:var(--sans)}.\[\&_input\]\:text-sm input{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_input\]\:font-normal input{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_input\]\:text-text input{color:var(--text)}.\[\&_input\]\:outline-none input{--tw-outline-style:none;outline-style:none}.\[\&_input\:\:placeholder\]\:text-subtext input::placeholder{color:var(--subtext)}.\[\&_label\]\:flex label{display:flex}.\[\&_label\]\:flex-col label{flex-direction:column}.\[\&_label\]\:gap-1 label{gap:var(--spacing)}.\[\&_label\]\:text-sm label{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_label\]\:font-medium label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_label\]\:text-text label{color:var(--text)}.\[\&_legend\]\:mb-1\.5 legend{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_legend\]\:text-base legend{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_legend\]\:font-medium legend{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_li\:\:marker\]\:text-primary li::marker{color:var(--primary)}.\[\&_ol\]\:mx-0 ol{margin-inline:0}.\[\&_ol\]\:my-1\.5 ol{margin-block:calc(var(--spacing) * 1.5)}.\[\&_ol\]\:ps-5\.5 ol{padding-inline-start:calc(var(--spacing) * 5.5)}.\[\&_p\]\:m-0 p{margin:0}.\[\&_p\]\:mx-0 p{margin-inline:0}.\[\&_p\]\:my-2\.5 p{margin-block:calc(var(--spacing) * 2.5)}.\[\&_p\]\:mt-\[3px\] p{margin-top:3px}.\[\&_p\]\:mb-0 p{margin-bottom:0}.\[\&_p\]\:max-w-80 p{max-width:calc(var(--spacing) * 80)}.\[\&_p\]\:max-w-105 p{max-width:calc(var(--spacing) * 105)}.\[\&_p\]\:max-w-\[46ch\] p{max-width:46ch}.\[\&_p\]\:text-2xl p{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_p\]\:text-sm p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_p\]\:leading-\[1\.55\] p{--tw-leading:1.55;line-height:1.55}.\[\&_p\]\:leading-normal p{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_p\]\:text-balance p{text-wrap:balance}.\[\&_p\]\:text-subtext p{color:var(--subtext)}.\[\&_p\]\:text-text p{color:var(--text)}.\[\&_p_\+_p\]\:mt-3 p+p{margin-top:calc(var(--spacing) * 3)}.\[\&_p\.empty-state-hint\]\:text-lg p.empty-state-hint{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_p\.empty-state-hint\]\:text-subtext p.empty-state-hint{color:var(--subtext)}.\[\&_p\.empty-state-title\]\:text-2xl p.empty-state-title{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_p\.empty-state-title\]\:font-normal p.empty-state-title{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_p\.empty-state-title\]\:text-text p.empty-state-title{color:var(--text)}.\[\&_pre\]\:m-0 pre{margin:0}.\[\&_pre\]\:overflow-x-auto pre{overflow-x:auto}.\[\&_pre\]\:rounded-md pre{border-radius:8px}.\[\&_pre\]\:border pre{border-style:var(--tw-border-style);border-width:1px}.\[\&_pre\]\:border-border-muted pre{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_pre\]\:border-border-muted pre{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.\[\&_pre\]\:bg-surface pre{background-color:var(--surface)}.\[\&_pre\]\:px-3 pre{padding-inline:calc(var(--spacing) * 3)}.\[\&_pre\]\:py-2 pre{padding-block:calc(var(--spacing) * 2)}.\[\&_pre\]\:text-sm pre{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_pre\]\:text-text pre{color:var(--text)}.\[\&_pre_code\]\:border-0 pre code{border-style:var(--tw-border-style);border-width:0}.\[\&_pre_code\]\:bg-transparent pre code{background-color:#0000}.\[\&_pre_code\]\:bg-none pre code{background-image:none}.\[\&_pre_code\]\:p-0 pre code{padding:0}.\[\&_pre_code\]\:font-normal pre code{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_pre_code\]\:text-inherit pre code{color:inherit}.\[\&_select\]\:font-sans select{font-family:var(--sans)}.\[\&_select\]\:text-sm select{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_select\]\:font-normal select{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_select\]\:text-text select{color:var(--text)}.\[\&_span\]\:absolute span{position:absolute}.\[\&_span\]\:start-\[3px\] span{inset-inline-start:3px}.\[\&_span\]\:top-\[3px\] span{top:3px}.\[\&_span\]\:h-3\.5 span{height:calc(var(--spacing) * 3.5)}.\[\&_span\]\:w-3\.5 span{width:calc(var(--spacing) * 3.5)}.\[\&_span\]\:translate-x-4 span{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&_span\]\:overflow-hidden span{overflow:hidden}.\[\&_span\]\:rounded-full span{border-radius:999px}.\[\&_span\]\:bg-background span{background-color:var(--base)}.\[\&_span\]\:bg-muted span{background-color:var(--muted)}.\[\&_span\]\:text-ellipsis span{text-overflow:ellipsis}.\[\&_span\]\:whitespace-nowrap span{white-space:nowrap}.\[\&_span\]\:transition-\[translate\,background\] span{transition-property:translate,background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_span\]\:duration-120 span{--tw-duration:.12s;transition-duration:.12s}.\[\&_span\]\:ease-standard span{--tw-ease:ease;transition-timing-function:ease}.\[\&_strong\]\:font-medium strong{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_strong\]\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_strong\]\:text-accent-amber strong{color:var(--accent-amber)}.\[\&_strong\]\:text-text strong{color:var(--text)}.\[\&_summary\]\:flex summary{display:flex}.\[\&_summary\]\:w-fit summary{width:fit-content}.\[\&_summary\]\:max-w-full summary{max-width:100%}.\[\&_summary\]\:cursor-pointer summary{cursor:pointer}.\[\&_summary\]\:list-none summary{list-style-type:none}.\[\&_summary\]\:items-center summary{align-items:center}.\[\&_summary\]\:gap-2 summary{gap:calc(var(--spacing) * 2)}.\[\&_summary\]\:rounded-sm summary{border-radius:6px}.\[\&_summary\]\:px-1 summary{padding-inline:var(--spacing)}.\[\&_summary\]\:py-\[3px\] summary{padding-block:3px}.\[\&_summary\]\:select-none summary{-webkit-user-select:none;user-select:none}.\[\&_summary_\.plan-chevron\]\:transition-transform summary .plan-chevron{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_summary_\.plan-chevron\]\:duration-120 summary .plan-chevron{--tw-duration:.12s;transition-duration:.12s}.\[\&_summary_\.plan-chevron\]\:ease-standard summary .plan-chevron{--tw-ease:ease;transition-timing-function:ease}.\[\&_summary\:\:-webkit-details-marker\]\:hidden summary::-webkit-details-marker{display:none}.\[\&_summary\:\:after\]\:text-muted summary:after{color:var(--muted)}.\[\&_summary\:\:after\]\:transition-transform summary:after{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_summary\:\:after\]\:duration-80 summary:after{--tw-duration:80ms;transition-duration:80ms}.\[\&_summary\:\:after\]\:ease-standard summary:after{--tw-ease:ease;transition-timing-function:ease}.\[\&_summary\:\:after\]\:content-\[\'›\'\] summary:after{--tw-content:"›";content:var(--tw-content)}.\[\&_summary\:hover\]\:bg-surface summary:hover{background-color:var(--surface)}.\[\&_svg\]\:block svg{display:block}.\[\&_svg\]\:h-\[1em\] svg{height:1em}.\[\&_svg\]\:h-full svg{height:100%}.\[\&_svg\]\:w-\[1em\] svg{width:1em}.\[\&_svg\]\:w-full svg{width:100%}.\[\&_svg\]\:flex-none svg{flex:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\]\:text-muted svg{color:var(--muted)}.\[\&_table\]\:mx-0 table{margin-inline:0}.\[\&_table\]\:my-2\.5 table{margin-block:calc(var(--spacing) * 2.5)}.\[\&_table\]\:block table{display:block}.\[\&_table\]\:w-max table{width:max-content}.\[\&_table\]\:max-w-full table{max-width:100%}.\[\&_table\]\:border-collapse table{border-collapse:collapse}.\[\&_table\]\:overflow-x-auto table{overflow-x:auto}.\[\&_table\]\:rounded-md table{border-radius:8px}.\[\&_table\]\:border table{border-style:var(--tw-border-style);border-width:1px}.\[\&_table\]\:border-border table{border-color:var(--border)}.\[\&_table\]\:text-sm table{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_tbody_tr\:hover_td\]\:bg-surface-bright tbody tr:hover td{background-color:var(--surface-bright)}.\[\&_td\]\:h-12 td{height:calc(var(--spacing) * 12)}.\[\&_td\]\:border-b td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_td\]\:border-b-border-variant td{border-bottom-color:var(--border-variant)}.\[\&_td\]\:border-b-divider-faint td{border-bottom-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_td\]\:border-b-divider-faint td{border-bottom-color:color-mix(in oklab,var(--text) 6%,transparent)}}.\[\&_td\]\:px-3 td{padding-inline:calc(var(--spacing) * 3)}.\[\&_td\]\:px-3\.5 td{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_td\]\:py-2 td{padding-block:calc(var(--spacing) * 2)}.\[\&_td\]\:ps-0 td{padding-inline-start:0}.\[\&_td\]\:pe-2\.5 td{padding-inline-end:calc(var(--spacing) * 2.5)}.\[\&_td\]\:pt-0 td{padding-top:0}.\[\&_td\]\:pb-0 td{padding-bottom:0}.\[\&_td\]\:text-start td{text-align:start}.\[\&_td\]\:align-middle td{vertical-align:middle}.\[\&_td\]\:break-normal td{overflow-wrap:normal;word-break:normal}.\[\&_td\]\:break-words td{overflow-wrap:break-word}.\[\&_td\]\:whitespace-nowrap td{white-space:nowrap}.\[\&_td\]\:text-text td{color:var(--text)}.\[\&_td\:first-child\]\:w-\[32\%\] td:first-child{width:32%}.\[\&_td\:first-child\]\:wrap-anywhere td:first-child{overflow-wrap:anywhere}.\[\&_td\:last-child\]\:w-29 td:last-child{width:calc(var(--spacing) * 29)}.\[\&_td\:last-child\]\:text-end td:last-child{text-align:end}.\[\&_td\:last-child\]\:whitespace-nowrap td:last-child{white-space:nowrap}.\[\&_td\[colspan\]\]\:text-start td[colspan]{text-align:start}.\[\&_td\[colspan\]\]\:whitespace-normal td[colspan]{white-space:normal}.\[\&_textarea\]\:field-sizing-content textarea{field-sizing:content}.\[\&_textarea\]\:max-h-45 textarea{max-height:calc(var(--spacing) * 45)}.\[\&_textarea\]\:min-h-18 textarea{min-height:calc(var(--spacing) * 18)}.\[\&_textarea\]\:flex-1 textarea{flex:1}.\[\&_textarea\]\:resize-none textarea{resize:none}.\[\&_textarea\]\:border-0 textarea{border-style:var(--tw-border-style);border-width:0}.\[\&_textarea\]\:bg-transparent textarea{background-color:#0000}.\[\&_textarea\]\:bg-none textarea{background-image:none}.\[\&_textarea\]\:px-3 textarea{padding-inline:calc(var(--spacing) * 3)}.\[\&_textarea\]\:pt-2\.5 textarea{padding-top:calc(var(--spacing) * 2.5)}.\[\&_textarea\]\:pb-1 textarea{padding-bottom:var(--spacing)}.\[\&_textarea\]\:font-mono textarea{font-family:var(--mono)}.\[\&_textarea\]\:text-base textarea{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_textarea\]\:text-sm textarea{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_th\]\:sticky th{position:sticky}.\[\&_th\]\:top-0 th{top:0}.\[\&_th\]\:z-1 th{z-index:1}.\[\&_th\]\:border-b th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_th\]\:border-b-border th{border-bottom-color:var(--border)}.\[\&_th\]\:border-b-border-variant th{border-bottom-color:var(--border-variant)}.\[\&_th\]\:bg-background th{background-color:var(--base)}.\[\&_th\]\:px-3 th{padding-inline:calc(var(--spacing) * 3)}.\[\&_th\]\:px-3\.5 th{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_th\]\:py-2 th{padding-block:calc(var(--spacing) * 2)}.\[\&_th\]\:text-start th{text-align:start}.\[\&_th\]\:text-sm th{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_th\]\:font-medium th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_th\]\:break-normal th{overflow-wrap:normal;word-break:normal}.\[\&_th\]\:break-words th{overflow-wrap:break-word}.\[\&_th\]\:text-text th{color:var(--text)}.\[\&_thead_th\]\:border-b thead th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_thead_th\]\:border-b-border thead th{border-bottom-color:var(--border)}.\[\&_thead_th\]\:bg-surface thead th{background-color:var(--surface)}.\[\&_thead_th\]\:font-medium thead th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_thead_th\]\:text-text thead th{color:var(--text)}.\[\&_tr\.clickable\]\:cursor-pointer tr.clickable{cursor:pointer}.\[\&_tr\.clickable\:hover_td\]\:bg-canvas tr.clickable:hover td{background-color:var(--canvas)}.\[\&_tr\:last-child_td\]\:border-b-0 tr:last-child td{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_ul\]\:mx-0 ul{margin-inline:0}.\[\&_ul\]\:my-1\.5 ul{margin-block:calc(var(--spacing) * 1.5)}.\[\&_ul\]\:ps-5\.5 ul{padding-inline-start:calc(var(--spacing) * 5.5)}.\[\&\+\&\]\:border-t+.\[\&\+\&\]\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&\+\&\]\:border-border-variant+.\[\&\+\&\]\:border-border-variant{border-color:var(--border-variant)}.\[\&\.active\]\:border-border.active{border-color:var(--border)}.\[\&\.active\]\:bg-background.active{background-color:var(--base)}.\[\&\.active\]\:bg-panel.active{background-color:var(--panel)}.\[\&\.active\]\:bg-surface.active{background-color:var(--surface)}.\[\&\.active\]\:font-medium.active{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&\.active\]\:text-muted.active{color:var(--muted)}.\[\&\.active\]\:text-primary.active{color:var(--primary)}.\[\&\.active\]\:text-text.active{color:var(--text)}.\[\&\.active\:\:after\]\:absolute.active:after{position:absolute}.\[\&\.active\:\:after\]\:start-0.active:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&\.active\:\:after\]\:end-0.active:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\.active\:\:after\]\:-bottom-px.active:after{bottom:-1px}.\[\&\.active\:\:after\]\:h-px.active:after{height:1px}.\[\&\.active\:\:after\]\:bg-background.active:after{background-color:var(--base)}.\[\&\.active\:\:after\]\:content-\[\'\'\].active:after{--tw-content:"";content:var(--tw-content)}.\[\&\.align-right\]\:start-auto.align-right{inset-inline-start:auto}.\[\&\.align-right\]\:end-0.align-right{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\.approved\]\:text-accent-green.approved{color:var(--accent-green)}.\[\&\.approved\:\:before\]\:content-\[\'✓_\'\].approved:before{--tw-content:"✓ ";content:var(--tw-content)}.\[\&\.archive\]\:text-accent-amber.archive{color:var(--accent-amber)}.\[\&\.chosen\]\:text-accent-green.chosen{color:var(--accent-green)}.\[\&\.chosen\:\:before\]\:content-\[\'✓_\'\].chosen:before{--tw-content:"✓ ";content:var(--tw-content)}.\[\&\.clamped\]\:relative.clamped{position:relative}.\[\&\.clamped\]\:max-h-\[9\.5em\].clamped{max-height:9.5em}.\[\&\.clamped\]\:overflow-hidden.clamped{overflow:hidden}.\[\&\.clamped\:\:after\]\:pointer-events-none.clamped:after{pointer-events:none}.\[\&\.clamped\:\:after\]\:absolute.clamped:after{position:absolute}.\[\&\.clamped\:\:after\]\:inset-x-0.clamped:after{inset-inline:0}.\[\&\.clamped\:\:after\]\:top-auto.clamped:after{top:auto}.\[\&\.clamped\:\:after\]\:bottom-0.clamped:after{bottom:0}.\[\&\.clamped\:\:after\]\:h-8\.5.clamped:after{height:calc(var(--spacing) * 8.5)}.\[\&\.clamped\:\:after\]\:bg-\[linear-gradient\(to_bottom\,_transparent\,_var\(--surface\)\)\].clamped:after{background-image:linear-gradient(to bottom,transparent,var(--surface))}.\[\&\.clamped\:\:after\]\:content-\[\'\'\].clamped:after{--tw-content:"";content:var(--tw-content)}.\[\&\.closable\]\:max-w-60.closable{max-width:calc(var(--spacing) * 60)}.\[\&\.closable\]\:pe-0\.5.closable{padding-inline-end:calc(var(--spacing) * .5)}.\[\&\.code\]\:text-accent-orange.code{color:var(--accent-orange)}.\[\&\.doc\]\:px-7.doc{padding-inline:calc(var(--spacing) * 7)}.\[\&\.doc\]\:pt-4\.5.doc{padding-top:calc(var(--spacing) * 4.5)}.\[\&\.doc\]\:pb-12.doc{padding-bottom:calc(var(--spacing) * 12)}.\[\&\.doc_\.artifact-md\]\:mx-auto.doc .artifact-md{margin-inline:auto}.\[\&\.doc_\.artifact-md\]\:my-0.doc .artifact-md{margin-block:0}.\[\&\.doc_\.artifact-md\]\:max-w-readable.doc .artifact-md{max-width:var(--readable-col)}.\[\&\.document\]\:text-subtext.document{color:var(--subtext)}.\[\&\.drop-down\]\:top-\[calc\(100\%_\+_4px\)\].drop-down{top:calc(100% + 4px)}.\[\&\.drop-down\]\:bottom-auto.drop-down{bottom:auto}.\[\&\.editing\]\:cursor-default.editing{cursor:default}.\[\&\.editing\]\:bg-surface.editing{background-color:var(--surface)}.\[\&\.editing_\.session-menu-btn\]\:hidden.editing .session-menu-btn,.\[\&\.editing_\.session-time\]\:hidden.editing .session-time{display:none}.\[\&\.err\]\:bg-accent-red.err{background-color:var(--accent-red)}.\[\&\.expanded_\.diff-file-header\]\:border-b.expanded .diff-file-header{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&\.expanded_\.diff-file-header\]\:border-b-border.expanded .diff-file-header{border-bottom-color:var(--border)}.\[\&\.fail\]\:border-\[1\.5px\].fail{border-style:var(--tw-border-style);border-width:1.5px}.\[\&\.fail\]\:border-danger-outline.fail{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\.fail\]\:border-danger-outline.fail{border-color:color-mix(in oklab,var(--accent-red) 55%,transparent)}}.\[\&\.failed\]\:text-accent-red.failed{color:var(--accent-red)}.\[\&\.image\]\:text-accent-purple.image{color:var(--accent-purple)}.\[\&\.live\]\:animate-\[or-pulse_1\.2s_ease-in-out_infinite\].live{animation:1.2s ease-in-out infinite or-pulse}.\[\&\.live\]\:border-accent-teal.live{border-color:var(--accent-teal)}.\[\&\.live\]\:bg-accent-teal.live{background-color:var(--accent-teal)}.\[\&\.live\]\:shadow-tree-live.live{--tw-shadow:0 2px 12px var(--tw-shadow-color,#209a8433);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.markdown\]\:text-accent-blue.markdown{color:var(--accent-blue)}.\[\&\.max\]\:fixed.max{position:fixed}.\[\&\.max\]\:inset-2\.5.max{inset:calc(var(--spacing) * 2.5)}.\[\&\.max\]\:z-60.max{z-index:60}.\[\&\.max\]\:m-0.max{margin:0}.\[\&\.max\]\:shadow-panel-max.max{--tw-shadow:0 12px 40px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.\[\&\.max\]\:shadow-panel-max.max{--tw-shadow:0 12px 40px var(--tw-shadow-color,color-mix(in oklab, var(--text) 22%, transparent))}}.\[\&\.max\]\:shadow-panel-max.max{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.menu-open_\.session-menu-btn\]\:inline-flex.menu-open .session-menu-btn{display:inline-flex}.\[\&\.menu-open_\.session-time\]\:hidden.menu-open .session-time{display:none}.\[\&\.muted\]\:text-muted.muted{color:var(--muted)}.\[\&\.ok\]\:bg-accent-green.ok{background-color:var(--accent-green)}.\[\&\.on\]\:bg-primary.on{background-color:var(--primary)}.\[\&\.on\]\:text-background.on{color:var(--base)}.\[\&\.open\]\:rotate-90.open{rotate:90deg}.\[\&\.other\]\:border-\[1\.5px\].other{border-style:var(--tw-border-style);border-width:1.5px}.\[\&\.other\]\:border-border.other{border-color:var(--border)}.\[\&\.pass\]\:bg-accent-green.pass{background-color:var(--accent-green)}.\[\&\.pdf\]\:text-accent-red.pdf{color:var(--accent-red)}.\[\&\.permission\]\:border-s-accent-amber.permission{border-inline-start-color:var(--accent-amber)}.\[\&\.plan\]\:border-s-accent-blue.plan{border-inline-start-color:var(--accent-blue)}.\[\&\.question\]\:border-s-accent-purple.question{border-inline-start-color:var(--accent-purple)}.\[\&\.rail-hidden\]\:max-w-none.rail-hidden{max-width:none}.\[\&\.rail-hidden\]\:px-0\.5.rail-hidden{padding-inline:calc(var(--spacing) * .5)}.\[\&\.rail-hidden\]\:py-0.rail-hidden{padding-block:0}.\[\&\.readonly\]\:opacity-60.readonly{opacity:.6}.\[\&\.rejected\]\:text-accent-amber.rejected,.\[\&\.revised\]\:text-accent-amber.revised{color:var(--accent-amber)}.\[\&\.sel\]\:border-primary.sel{border-color:var(--primary)}.\[\&\.sel\]\:bg-primary-subtle.sel{background-color:var(--primary-subtle)}.\[\&\.selected\]\:border-accent.selected{border-color:var(--accent)}.\[\&\.selected\]\:bg-panel.selected{background-color:var(--panel)}.\[\&\.selected\]\:shadow-selected.selected{--tw-shadow:0 0 0 1px var(--tw-shadow-color,var(--accent));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.selected\:hover\]\:bg-panel.selected:hover{background-color:var(--panel)}.\[\&\.session-menu\]\:start-auto.session-menu{inset-inline-start:auto}.\[\&\.session-menu\]\:end-1\.5.session-menu{inset-inline-end:calc(var(--spacing) * 1.5)}.\[\&\.session-menu\]\:top-\[calc\(100\%_-_2px\)\].session-menu{top:calc(100% - 2px)}.\[\&\.session-menu\]\:min-w-35.session-menu{min-width:calc(var(--spacing) * 35)}.\[\&\.spreadsheet\]\:text-accent-green.spreadsheet,.\[\&\.status-add\]\:text-accent-green.status-add{color:var(--accent-green)}.\[\&\.status-copy\]\:text-accent-blue.status-copy{color:var(--accent-blue)}.\[\&\.status-delete\]\:text-accent-red.status-delete{color:var(--accent-red)}.\[\&\.status-rename\]\:text-accent-blue.status-rename{color:var(--accent-blue)}.\[\&\.unread_\.session-title\]\:font-semibold.unread .session-title{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&\.warn\]\:bg-accent-amber.warn{background-color:var(--accent-amber)}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}.\[\&\:\:after\]\:absolute:after{position:absolute}.\[\&\:\:after\]\:start-0:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&\:\:after\]\:end-0:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\:\:after\]\:top-full:after{top:100%}.\[\&\:\:after\]\:h-6:after{height:calc(var(--spacing) * 6)}.\[\&\:\:after\]\:bg-\[linear-gradient\(to_bottom\,_var\(--base\)\,_transparent\)\]:after{background-image:linear-gradient(to bottom,var(--base),transparent)}.\[\&\:\:after\]\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.\[\&\:active\]\:bg-resizer-hover:active{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\]\:bg-resizer-hover:active{background-color:color-mix(in oklab,var(--text) 12%,transparent)}}.\[\&\:active\:not\(\:disabled\)\]\:border-primary-active:active:not(:disabled){border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:border-primary-active:active:not(:disabled){border-color:color-mix(in oklab,var(--primary) 80%,var(--text))}}.\[\&\:active\:not\(\:disabled\)\]\:bg-danger-active:active:not(:disabled){background-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:bg-danger-active:active:not(:disabled){background-color:color-mix(in oklab,var(--accent-red) 14%,transparent)}}.\[\&\:active\:not\(\:disabled\)\]\:bg-highlight:active:not(:disabled){background-color:var(--highlight)}.\[\&\:active\:not\(\:disabled\)\]\:bg-primary-active:active:not(:disabled){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:bg-primary-active:active:not(:disabled){background-color:color-mix(in oklab,var(--primary) 80%,var(--text))}}.\[\&\:disabled\]\:cursor-default:disabled{cursor:default}.\[\&\:focus\]\:border-accent-blue:focus{border-color:var(--accent-blue)}.\[\&\:focus-visible\]\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&\:focus-visible\]\:outline-offset-2:focus-visible{outline-offset:2px}.\[\&\:focus-visible\]\:outline-text:focus-visible{outline-color:var(--text)}.\[\&\:focus-visible\]\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&\:focus-within_\.session-menu-btn\]\:inline-flex:focus-within .session-menu-btn{display:inline-flex}.\[\&\:focus-within_\.session-time\]\:hidden:focus-within .session-time{display:none}.\[\&\:has\(input\:checked\)\]\:border-accent:has(input:checked){border-color:var(--accent)}.\[\&\:has\(input\:checked\)\]\:bg-primary-subtle:has(input:checked){background-color:var(--primary-subtle)}.\[\&\:hover\]\:border-primary:hover{border-color:var(--primary)}.\[\&\:hover\]\:border-text:hover{border-color:var(--text)}.\[\&\:hover\]\:bg-canvas:hover{background-color:var(--canvas)}.\[\&\:hover\]\:bg-panel:hover{background-color:var(--panel)}.\[\&\:hover\]\:bg-resizer-hover:hover{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\]\:bg-resizer-hover:hover{background-color:color-mix(in oklab,var(--text) 12%,transparent)}}.\[\&\:hover\]\:bg-surface:hover{background-color:var(--surface)}.\[\&\:hover\]\:bg-text:hover{background-color:var(--text)}.\[\&\:hover\]\:text-background:hover{color:var(--base)}.\[\&\:hover\]\:text-text:hover{color:var(--text)}.\[\&\:hover\]\:underline:hover{text-decoration-line:underline}.\[\&\:hover\]\:shadow-tree-hover:hover{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\:hover_\.ft-row-delete\]\:opacity-100:hover .ft-row-delete,.\[\&\:hover_\.md-code-copy\]\:opacity-100:hover .md-code-copy{opacity:1}.\[\&\:hover_\.session-menu-btn\]\:inline-flex:hover .session-menu-btn{display:inline-flex}.\[\&\:hover_\.session-time\]\:hidden:hover .session-time{display:none}.\[\&\:hover\:not\(\.active\)\]\:bg-surface:hover:not(.active){background-color:var(--surface)}.\[\&\:hover\:not\(\.on\)\]\:bg-highlight:hover:not(.on){background-color:var(--highlight)}.\[\&\:hover\:not\(\.on\)\]\:text-text:hover:not(.on){color:var(--text)}.\[\&\:hover\:not\(\:disabled\)\]\:border-accent-blue:hover:not(:disabled){border-color:var(--accent-blue)}.\[\&\:hover\:not\(\:disabled\)\]\:border-border-strong:hover:not(:disabled){border-color:var(--border-strong)}.\[\&\:hover\:not\(\:disabled\)\]\:border-primary-hover:hover:not(:disabled){border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:border-primary-hover:hover:not(:disabled){border-color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:border-text:hover:not(:disabled){border-color:var(--text)}.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-amber-subtle:hover:not(:disabled){background-color:var(--accent-amber-subtle)}.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-blue\/90:hover:not(:disabled){background-color:var(--accent-blue)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-blue\/90:hover:not(:disabled){background-color:color-mix(in oklab,var(--accent-blue) 90%,transparent)}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-danger-hover:hover:not(:disabled){background-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-danger-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--accent-red) 8%,transparent)}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-primary-hover:hover:not(:disabled){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-primary-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-stop-hover:hover:not(:disabled){background-color:var(--surface)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-stop-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--surface) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-surface:hover:not(:disabled){background-color:var(--surface)}.\[\&\:hover\:not\(\:disabled\)\]\:text-accent-red:hover:not(:disabled){color:var(--accent-red)}.\[\&\:hover\:not\(\:disabled\)\]\:text-text:hover:not(:disabled){color:var(--text)}.\[\&\:last-child\]\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:absolute:not(.active)+.tab:not(.active):before{position:absolute}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:-start-px:not(.active)+.tab:not(.active):before{inset-inline-start:-1px}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:top-2\.5:not(.active)+.tab:not(.active):before{top:calc(var(--spacing) * 2.5)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:bottom-2\.5:not(.active)+.tab:not(.active):before{bottom:calc(var(--spacing) * 2.5)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:w-px:not(.active)+.tab:not(.active):before{width:1px}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:bg-border:not(.active)+.tab:not(.active):before{background-color:var(--border)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:content-\[\'\'\]:not(.active)+.tab:not(.active):before{--tw-content:"";content:var(--tw-content)}.\[\&\>\.settings-form\:first-child\]\:mt-0>.settings-form:first-child{margin-top:0}.\[\&\>div\:first-child\]\:border-t-0>div:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&\[data-tip\]\:\:after\]\:top-auto[data-tip]:after{top:auto}.\[\&\[data-tip\]\:\:after\]\:bottom-\[calc\(100\%_\+_6px\)\][data-tip]:after{bottom:calc(100% + 6px)}.\[\&\[open\]_summary_\.plan-chevron\]\:rotate-90[open] summary .plan-chevron,.\[\&\[open\]_summary\:\:after\]\:rotate-90[open] summary:after{rotate:90deg}.chat-header.rail-hidden>.\[\.chat-header\.rail-hidden_\>_\&\:first-child\]\:me-3:first-child{margin-inline-end:calc(var(--spacing) * 3)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.atrule\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.atrule{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.attr-name\]\:text-syntax-green,.openresearch-diff,.file-view) .token.attr-name{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.attr-value\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.attr-value,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.boolean\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.boolean{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.builtin\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.builtin{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.cdata\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.cdata{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.cdata\]\:italic,.openresearch-diff,.file-view) .token.cdata{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.char\]\:text-syntax-green,.openresearch-diff,.file-view) .token.char{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.class-name\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.class-name{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.comment\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.comment{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.comment\]\:italic,.openresearch-diff,.file-view) .token.comment{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.constant\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.constant{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.decorator\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.decorator,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.def\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.def{color:var(--syntax-blue)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.deleted\]\:text-syntax-red,.openresearch-diff,.file-view) .token.deleted{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.entity\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.entity{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.function\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.function{color:var(--syntax-blue)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.important\]\:text-syntax-red,.openresearch-diff,.file-view) .token.important{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.inserted\]\:text-syntax-green,.openresearch-diff,.file-view) .token.inserted{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.keyword\]\:text-syntax-purple,.openresearch-diff,.file-view) .token.keyword{color:var(--syntax-purple)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.namespace\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.namespace{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.number\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.number{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.operator\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.operator{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.parameter\]\:text-syntax-text,.openresearch-diff,.file-view) .token.parameter{color:var(--syntax-text)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.prolog\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.prolog{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.prolog\]\:italic,.openresearch-diff,.file-view) .token.prolog{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.property\]\:text-syntax-red,.openresearch-diff,.file-view) .token.property{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.punctuation\]\:text-syntax-text,.openresearch-diff,.file-view) .token.punctuation{color:var(--syntax-text)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.regex\]\:text-syntax-green,.openresearch-diff,.file-view) .token.regex,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.selector\]\:text-syntax-green,.openresearch-diff,.file-view) .token.selector,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.string\]\:text-syntax-green,.openresearch-diff,.file-view) .token.string{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.symbol\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.symbol{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.tag\]\:text-syntax-red,.openresearch-diff,.file-view) .token.tag{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.url\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.url{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.variable\]\:text-syntax-red,.openresearch-diff,.file-view) .token.variable{color:var(--syntax-red)}@container (max-width:400px){.\[\@container\(\(max-width\:_400px\)\)\]\:grid-cols-\[minmax\(0\,_1fr\)\]{grid-template-columns:minmax(0,1fr)}.\[\@container\(\(max-width\:_400px\)\)\]\:\!flex-row{flex-direction:row!important}.\[\@container\(\(max-width\:_400px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@container\(\(max-width\:_400px\)\)\]\:\!items-center{align-items:center!important}.\[\@container\(\(max-width\:_400px\)\)\]\:justify-start{justify-content:flex-start}.\[\@container\(\(max-width\:_400px\)\)\]\:gap-3{gap:calc(var(--spacing) * 3)}.\[\@container\(\(max-width\:_400px\)\)\]\:\[grid-template-areas\:\'name\'_\'meta\'_\'actions\'\]{grid-template-areas:"name""meta""actions"}}@container (max-width:560px){.\[\@container\(\(max-width\:_560px\)\)\]\:ms-auto{margin-inline-start:auto}.\[\@container\(\(max-width\:_560px\)\)\]\:grid-cols-\[minmax\(0\,_1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.\[\@container\(\(max-width\:_560px\)\)\]\:flex-col{flex-direction:column}.\[\@container\(\(max-width\:_560px\)\)\]\:items-end{align-items:flex-end}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-1\.5{gap:calc(var(--spacing) * 1.5)}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-y-\[9px\]{row-gap:9px}}@container (max-width:960px){.\[\@container\(\(max-width\:_960px\)\)\]\:static{position:static}.\[\@container\(\(max-width\:_960px\)\)\]\:max-h-55{max-height:calc(var(--spacing) * 55)}.\[\@container\(\(max-width\:_960px\)\)\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(max-width:520px){.\[\@media\(\(max-width\:_520px\)\)\]\:flex-col{flex-direction:column}.\[\@media\(\(max-width\:_520px\)\)\]\:items-start{align-items:flex-start}}@media(max-width:600px){.\[\@media\(\(max-width\:_600px\)\)\]\:col-span-2{grid-column:span 2/span 2}.\[\@media\(\(max-width\:_600px\)\)\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.\[\@media\(\(max-width\:_640px\)\)\]\:flex-col{flex-direction:column}.\[\@media\(\(max-width\:_640px\)\)\]\:items-stretch{align-items:stretch}.\[\@media\(\(max-width\:_640px\)\)\]\:justify-start{justify-content:flex-start}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv\]\:grid-cols-1 .kv{grid-template-columns:repeat(1,minmax(0,1fr))}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv\]\:gap-\[3px\] .kv{gap:3px}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv_\.v_\+_\.k\]\:mt-\[7px\] .kv .v+.k{margin-top:7px}}@media(max-width:720px){.\[\@media\(\(max-width\:_720px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@media\(\(max-width\:_720px\)\)\]\:px-4\.5{padding-inline:calc(var(--spacing) * 4.5)}.\[\@media\(\(max-width\:_720px\)\)\]\:pt-5{padding-top:calc(var(--spacing) * 5)}.\[\@media\(\(max-width\:_720px\)\)\]\:pb-8{padding-bottom:calc(var(--spacing) * 8)}.\[\@media\(\(max-width\:_720px\)\)\]\:\[\&_button\]\:grid-cols-\[65px_1fr_60px_16px\] button{grid-template-columns:65px 1fr 60px 16px}.\[\@media\(\(max-width\:_720px\)\)\]\:\[\&_button_\>_\:nth-child\(3\)\]\:hidden button>:nth-child(3){display:none}}@media(max-width:960px){.\[\@media\(\(max-width\:_960px\)\)\]\:col-span-3{grid-column:span 3/span 3}.\[\@media\(\(max-width\:_960px\)\)\]\:mb-1{margin-bottom:var(--spacing)}.\[\@media\(\(max-width\:_960px\)\)\]\:block{display:block}.\[\@media\(\(max-width\:_960px\)\)\]\:hidden{display:none}.\[\@media\(\(max-width\:_960px\)\)\]\:grid-cols-\[minmax\(0\,0\.8fr\)_minmax\(0\,0\.8fr\)_minmax\(0\,1\.4fr\)\]{grid-template-columns:minmax(0,.8fr) minmax(0,.8fr) minmax(0,1.4fr)}.\[\@media\(\(max-width\:_960px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@media\(\(max-width\:_960px\)\)\]\:items-start{align-items:flex-start}.\[\@media\(\(max-width\:_960px\)\)\]\:gap-x-4{column-gap:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:gap-y-3{row-gap:calc(var(--spacing) * 3)}.\[\@media\(\(max-width\:_960px\)\)\]\:px-4{padding-inline:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:py-4{padding-block:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:pt-6{padding-top:calc(var(--spacing) * 6)}.\[\@media\(\(max-width\:_960px\)\)\]\:break-all{word-break:break-all}.\[\@media\(\(max-width\:_960px\)\)\]\:whitespace-normal{white-space:normal}}@media(prefers-reduced-motion:reduce){.\[\@media\(\(prefers-reduced-motion\:_reduce\)\)\]\:animate-none{animation:none}}a.\[a\&\:hover\]\:border-muted:hover{border-color:var(--muted)}button.\[button\&\]\:inline-flex{display:inline-flex}button.\[button\&\]\:h-\[13px\]{height:13px}button.\[button\&\]\:w-\[13px\]{width:13px}button.\[button\&\]\:cursor-pointer{cursor:pointer}button.\[button\&\]\:items-center{align-items:center}button.\[button\&\]\:justify-center{justify-content:center}button.\[button\&\]\:border-0{border-style:var(--tw-border-style);border-width:0}button.\[button\&\]\:bg-transparent{background-color:#0000}button.\[button\&\]\:p-0{padding:0}button.\[button\&_\>_svg\]\:transition-transform>svg{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}button.\[button\&_\>_svg\]\:duration-120>svg{--tw-duration:.12s;transition-duration:.12s}button.\[button\&_\>_svg\]\:ease-standard>svg{--tw-ease:ease;transition-timing-function:ease}button.\[button\&_\>_svg\.open\]\:rotate-90>svg.open{rotate:90deg}button.\[button\&\:hover\]\:border-muted:hover{border-color:var(--muted)}}:root{--base:#fff;--canvas:#faf8f4;--panel:#f3f0ea;--surface:#faf7f2;--surface-bright:#fdfbfb;--highlight:#fdf3f1;--chat-annotation-highlight:#b8d4ff;--text:#1d1b1a;--subtext:#737373;--muted:#a1a1a1;--primary:#9a2036;--primary-subtle:#f7e9ec;--border:#d4d4d4;--border-variant:#e5e5e5;--accent-orange:#da642c;--accent-red:#d94654;--accent-teal:#209a84;--accent-blue:#3a8dff;--accent-amber:#da9100;--accent-green:#5eb64c;--accent-purple:#9c5cff;--accent-green-subtle:#e7f4e5;--accent-amber-subtle:#fff3e1;--accent-teal-subtle:#e1f3f0;--accent-red-subtle:#fbe9ea;--accent-blue-subtle:#e5f0ff;--skill-blue:#184f91;--skill-blue-subtle:#d9e9fb;--skill-blue-slash:#7fa6d2;--accent-purple-subtle:#f1e8ff;--dots-muted:#e3ded5;--dots-strong:#bdb6a8;--mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;--sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;--modal-top:min(30vh, 260px);--term-bg:#1a1a1a;--term-foreground:#e6e1e0;--term-selection:#2c3441;--tool-shimmer:var(--text)}@supports (color:color-mix(in lab,red,red)){:root{--tool-shimmer:color-mix(in srgb, var(--text) 58%, var(--subtext))}}:root{--editor-selection:var(--primary)}@supports (color:color-mix(in lab,red,red)){:root{--editor-selection:color-mix(in oklab, var(--primary) 22%, transparent)}}:root{--readable-col:840px;--border-strong:var(--border);--accent:var(--primary);--teal:var(--accent-teal);--green:var(--accent-green);--red:var(--accent-red);--amber:var(--accent-amber);--syntax-comment:#a0a1a7;--syntax-text:#383a42;--syntax-red:#e45649;--syntax-orange:#986801;--syntax-green:#50a14f;--syntax-yellow:#c18401;--syntax-cyan:#56b6c2;--syntax-purple:#a626a4;--syntax-blue:#4078f2;color-scheme:light}:root[data-theme=dark]{--base:#0e0c0c;--canvas:#141110;--panel:#221f1e;--surface:#1d1b1a;--surface-bright:#130f0f;--highlight:#393433;--chat-annotation-highlight:#244e7a;--text:#e6e1e0;--subtext:#a68e8b;--muted:#737373;--primary:#ffb3ad;--primary-subtle:#33191b;--border:#525252;--border-variant:#404040;--accent-amber:#e67e22;--accent-green-subtle:#1c2b18;--accent-amber-subtle:#33260f;--accent-teal-subtle:#12332d;--accent-red-subtle:#331418;--accent-blue-subtle:#10233a;--skill-blue:#79adf0;--skill-blue-subtle:#183452;--skill-blue-slash:#527ca8;--accent-purple-subtle:#251933;--dots-muted:#2a2523;--dots-strong:#555;--syntax-comment:#7f848e;--syntax-text:#abb2bf;--syntax-red:#e06c75;--syntax-orange:#d19a66;--syntax-green:#98c379;--syntax-yellow:#e5c07b;--syntax-purple:#c678dd;--syntax-blue:#61afef;color-scheme:dark}.tinker-logo{clip-path:inset(34% 9%)}:root[data-theme=dark] .tinker-logo{filter:invert();mix-blend-mode:screen}:root[lang=fa] #root :where(p,h1,h2,h3,h4,h5,h6,button,label,li,th,td,dt,dd,[role=status],[role=alert]),.md :where(p,h1,h2,h3,h4,li,th,td,blockquote),:root[lang=fa] #root .file-view-note{unicode-bidi:plaintext}:where(pre,code:not(.path-front-ellipsis),.font-mono,.xterm,.openresearch-diff){direction:ltr;unicode-bidi:isolate}.path-front-ellipsis{unicode-bidi:isolate}@keyframes or-pulse{50%{opacity:.35}}@keyframes tool-target-reveal{0%{opacity:0;filter:blur(1.5px)}to{opacity:1;filter:blur()}}@keyframes tool-running-shimmer{0%{background-position:200% 0}to{background-position:-100% 0}}@keyframes tool-running-shimmer-icon{0%,to{color:var(--muted);opacity:.35}50%{color:var(--tool-shimmer);opacity:1}}.tool-running-shimmer{color:#0000;background:linear-gradient(100deg,var(--muted) 12%,var(--subtext) 34%,var(--tool-shimmer) 50%,var(--subtext) 66%,var(--muted) 88%);-webkit-text-fill-color:transparent;background-size:300% 100%;-webkit-background-clip:text;background-clip:text;animation:1.75s linear infinite tool-running-shimmer}.tool-running-shimmer::selection{color:var(--text);-webkit-text-fill-color:var(--text)}.tool-running-shimmer-icon{color:var(--muted);animation:1.75s ease-in-out infinite tool-running-shimmer-icon}.tool-group-summary .tool-group-label{transition:color .12s}.tool-group-summary:hover .tool-group-label,.tool-group-summary:hover .tool-chevron{color:var(--text)}.tool-group-disclosure{grid-template-rows:0fr;transition:grid-template-rows .22s cubic-bezier(.2,.75,.25,1);display:grid}.tool-group-disclosure.open{grid-template-rows:1fr}.tool-group-disclosure-inner{min-height:0;position:relative;overflow:hidden}.tool-target-reveal{animation:.18s cubic-bezier(.2,.75,.25,1) tool-target-reveal}.tool-target,.tool-target-more{color:inherit;cursor:pointer;font-weight:inherit;text-align:inherit;text-underline-offset:3px;-webkit-text-decoration-skip-ink:auto;text-decoration-skip-ink:auto;text-decoration-line:underline;text-decoration-thickness:.6px;transition:color .14s,text-decoration-color .14s;display:inline}.tool-line,.tool-group-summary{font-weight:375}.tool-group-rows .tool-line{font-size:var(--text-sm)}.msg-assistant .md table{margin-block:14px;margin-inline:auto}.msg-assistant .md th,.msg-assistant .md td{padding-block:10px}.msg-assistant .md figure{width:fit-content;max-width:100%;margin-inline:auto}.md .file-chip{padding-block:.5px;line-height:1.3}.md .file-chip .file-chip-open{color:currentColor;opacity:.6}.md .file-chip .file-chip-label{text-decoration-line:underline;-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong);text-underline-offset:2px;text-decoration-thickness:.6px}.md .file-chip:hover:not(:disabled) .file-chip-label,.md .file-chip:focus-visible .file-chip-label{-webkit-text-decoration-color:var(--primary);text-decoration-color:var(--primary)}.md .file-chip:disabled .file-chip-label{text-decoration-line:none}.md .file-chip:disabled .file-chip-open{display:none}.msg-assistant .md img{max-width:100%;height:auto;margin-inline:auto;display:block}.md[data-streaming=true] .katex-error{visibility:hidden}.tool-target{-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.tool-target-more{text-decoration-color:#0000}.project-row:hover .project-row-title{text-underline-offset:2px;text-decoration-line:underline}.project-row:has(.project-row-secondary:hover) .project-row-title{text-decoration-line:none}@media(hover:none){.project-row-delete{opacity:1;pointer-events:auto}}.tool-target:hover,.tool-target-more:hover{color:var(--primary);-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.tool-target:focus-visible,.tool-target-more:focus-visible{color:var(--primary);-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong);outline:1px solid var(--border-strong);outline-offset:2px}@media(prefers-reduced-motion:reduce){.activity-pulse{animation:none}.tool-group-disclosure{transition:none}.tool-target-reveal{animation:none}.tool-running-shimmer{color:var(--subtext);-webkit-text-fill-color:currentColor;background:0 0;animation:none}.tool-running-shimmer-icon{animation:none}}@media(forced-colors:active){.tool-running-shimmer{color:canvastext;-webkit-text-fill-color:currentColor;background:0 0;animation:none}.tool-running-shimmer::selection{color:highlighttext;-webkit-text-fill-color:HighlightText}.tool-running-shimmer-icon{color:canvastext;animation:none}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes title-char-in{0%{opacity:0;filter:blur(4px);transform:translateY(.15em)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes pulse{50%{opacity:.5}} diff --git a/ui/dist/index.html b/ui/dist/index.html index 28f93d0d..e76e342e 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -49,8 +49,8 @@ html { background: #ffffff; } html[data-theme="dark"] { background: #0e0c0c; } - - + +
(list: T[], item: T): T[] { @@ -522,6 +523,7 @@ export default function App({ runtime }: { runtime: RuntimeInfo }) { const [expTabs, setExpTabs] = useState([]); const [fileTabs, setFileTabs] = useState([]); const fileScrollPositionsRef = useRef(new Map()); + const fileBuffersRef = useRef(new Map()); const fileLineScrollRequestRef = useRef(0); const [planTabs, setPlanTabs] = useState([]); const [subagentTabs, setSubagentTabs] = useState([]); @@ -576,9 +578,8 @@ export default function App({ runtime }: { runtime: RuntimeInfo }) { setCodeTabs((prev) => withoutTab(prev, key)); const project = projectIdRef.current; if (project && "path" in tab) { - fileScrollPositionsRef.current.delete( - fileScrollKey(project, activeSessionIdRef.current, tab), - ); + const fileKey = fileScrollKey(project, activeSessionIdRef.current, tab); + fileScrollPositionsRef.current.delete(fileKey); } const next = tabHistoryRef.current.filter((item) => rightTabKey(item) !== key); tabHistoryRef.current = next; @@ -1238,9 +1239,12 @@ export default function App({ runtime }: { runtime: RuntimeInfo }) { (tab: FileViewDef) => { const idx = fileTabs.findIndex((t) => sameFileTab(t, tab)); if (idx === -1) return; + const key = projectId ? fileScrollKey(projectId, activeSessionId, tab) : null; + if (key && fileBuffersRef.current.has(key) && !window.confirm(m.file_viewer_discard_unsaved_changes())) return; setFileTabs((prev) => prev.filter((_, i) => i !== idx)); - if (projectId) { - fileScrollPositionsRef.current.delete(fileScrollKey(projectId, activeSessionId, tab)); + if (key) { + fileScrollPositionsRef.current.delete(key); + fileBuffersRef.current.delete(key); } if ( activeSessionId === DEMO_MAIN_SESSION_ID && @@ -1538,6 +1542,12 @@ export default function App({ runtime }: { runtime: RuntimeInfo }) { const expTab = typeof rightTab === "object" && "id" in rightTab ? rightTab : null; const fileTab = typeof rightTab === "object" && "path" in rightTab ? rightTab : null; + const fileArtifactEntry = fileTab?.source === "artifacts" && artifacts + ? findArtifactEntry(artifacts.entries, fileTab.path) + : null; + const artifactVersion = fileArtifactEntry + ? `${fileArtifactEntry.modifiedAt}:${fileArtifactEntry.size}` + : null; const onboardingOverviewTab = activeSessionId === DEMO_MAIN_SESSION_ID && demoOverviewLeading ? fileTabs.find( @@ -1881,6 +1891,9 @@ export default function App({ runtime }: { runtime: RuntimeInfo }) { artifacts={artifacts} onChanged={refreshArtifacts} onOpenFile={openArtifactFileTab} + canRenameFile={(path) => !fileBuffersRef.current.has( + fileScrollKey(activeProject.id, activeSessionId, { path, source: "artifacts" }), + )} onOpenStorage={runtime.kind === "ssh" ? undefined : () => selectMainView("storage")} /> )} @@ -2012,6 +2025,13 @@ export default function App({ runtime }: { runtime: RuntimeInfo }) { toggled={filesToggled} onViewChange={setFilesView} onToggledChange={setFilesToggled} + canRenameFile={(path) => !fileBuffersRef.current.has( + fileScrollKey(activeProject.id, activeSessionId, { + path, + source: "repo", + sessionId: activeSessionId ?? undefined, + }), + )} onOpenFile={(path, sessionId, ref, intent) => openFileTab( path, @@ -2053,6 +2073,16 @@ export default function App({ runtime }: { runtime: RuntimeInfo }) { gitRef={fileTab.ref} line={fileTab.line} branchLabel={fileBranchLabel(fileTab, activeProject?.baselineBranch)} + artifactVersion={artifactVersion} + artifactEntries={fileTab.source === "artifacts" ? artifacts?.entries : undefined} + initialBuffer={fileBuffersRef.current.get( + fileScrollKey(projectId, activeSessionId, fileTab), + )} + onBufferStateChange={(buffer) => { + const key = fileScrollKey(projectId, activeSessionId, fileTab); + if (buffer) fileBuffersRef.current.set(key, buffer); + else fileBuffersRef.current.delete(key); + }} onOpenFile={(path, sessionId, ref, intent) => openFromRightTab(fileTab, () => openFileTab( diff --git a/ui/src/api.ts b/ui/src/api.ts index 96c04dee..ad02a16b 100644 --- a/ui/src/api.ts +++ b/ui/src/api.ts @@ -16,6 +16,22 @@ export const DEMO_OVERVIEW_ARTIFACT = "cpu-apple-silicon-pipeline-results.md"; export const DEMO_RUN_EXPERIMENT_PROMPT = "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."; +export class FileChangedError extends Error { + readonly currentVersion: string | null; + readonly exists: boolean; + + constructor( + message: string, + currentVersion: string | null, + exists: boolean, + ) { + super(message); + this.name = "FileChangedError"; + this.currentVersion = currentVersion; + this.exists = exists; + } +} + export interface Project { id: string; name: string; @@ -84,9 +100,25 @@ async function json(res: Response): Promise { const text = await res.text().catch(() => ""); let message = text; try { - const parsed = JSON.parse(text) as { error?: string }; - if (parsed.error) message = parsed.error; - } catch { + const parsed: unknown = JSON.parse(text); + if (typeof parsed === "object" && parsed !== null) { + if ("error" in parsed && typeof parsed.error === "string") message = parsed.error; + if ( + res.status === 409 && + "code" in parsed && + parsed.code === "fileChanged" && + "exists" in parsed && + typeof parsed.exists === "boolean" + ) { + const currentVersion = + "currentVersion" in parsed && typeof parsed.currentVersion === "string" + ? parsed.currentVersion + : null; + throw new FileChangedError(message, currentVersion, parsed.exists); + } + } + } catch (error) { + if (error instanceof FileChangedError) throw error; // non-JSON body — show it raw } throw new Error(message || `HTTP ${res.status}`); @@ -356,6 +388,9 @@ export interface ProjectFile { notFound: boolean; root: CheckoutRoot; presentation: FilePresentation; + /** Exact live-checkout bytes; null for read-only/incomplete sources and + * absent when connected to an older remote server. */ + version?: string | null; } /** One file from the project — a branch's committed copy when `ref` is given, @@ -393,13 +428,34 @@ export const saveProjectFile = ( projectId: string, path: string, content: string, - opts: { sessionId?: string } = {}, + opts: { sessionId?: string; expectedVersion: string }, ) => - put<{ ok: boolean; root: CheckoutRoot; bytesWritten: number }>( + put<{ ok: boolean; root: CheckoutRoot; bytesWritten: number; version: string }>( `/api/projects/${projectId}/file`, - { path, content, sessionId: opts.sessionId }, + { path, content, sessionId: opts.sessionId, expectedVersion: opts.expectedVersion }, ); +export type FileAction = + | { action: "rename"; newName: string } + | { action: "duplicate" | "delete" }; + +export interface FileActionResult { + ok: boolean; + path: string; +} + +export const manageProjectFile = ( + projectId: string, + path: string, + action: FileAction, + opts: { sessionId?: string } = {}, +) => + patch(`/api/projects/${projectId}/file`, { + path, + ...action, + sessionId: opts.sessionId, + }); + /** Open a checkout file on the machine running `orx up`, in the OS default app * for its type (the user's editor for source files). */ export const openFileInEditor = ( @@ -553,6 +609,8 @@ export const overleafUploadUrl = ( export interface CodeTree { root: CheckoutRoot; + /** Absolute live checkout path; absent for committed branch listings. */ + path?: string; /** The listed branch (`ref` mode), else the checked-out branch, else null * (detached HEAD). */ branch: string | null; @@ -1057,6 +1115,9 @@ export const deleteArtifact = (projectId: string, path: string) => method: "DELETE", }).then((r) => json<{ ok: boolean }>(r)); +export const manageArtifactFile = (projectId: string, path: string, action: FileAction) => + patch(`/api/projects/${projectId}/files`, { path, ...action }); + /** Raw artifact bytes served by the compatibility `/files` API. */ export const artifactUrl = (projectId: string, path: string) => `/api/projects/${projectId}/files/file?path=${encodeURIComponent(path)}`; diff --git a/ui/src/components/ArtifactsTab.tsx b/ui/src/components/ArtifactsTab.tsx index 6ce1388c..49bd2dcb 100644 --- a/ui/src/components/ArtifactsTab.tsx +++ b/ui/src/components/ArtifactsTab.tsx @@ -24,6 +24,7 @@ import { FILE_PREVIEW_BYTES, fmtBytes, getArtifactFileText, + manageArtifactFile, type ArtifactEntry, type Project, type ProjectArtifacts, @@ -33,7 +34,15 @@ import { FileTypeIcon, isMarkdownFile } from "./FileTypeIcon"; import { MediaPreview, mediaPreviewKind, type MediaPreviewKind } from "./MediaPreview"; import { normalizeMarkdownForRendering } from "../markdownNormalization"; import { mdCodeComponents, remarkMathOptions } from "./Md"; -import { IconButton, IconButtonLink, LoadingRow, Spinner } from "./ui"; +import { + FileContextMenu, + FileRenameInput, + copyFilePath, + fileContextMenuTarget, + type FileContextMenuEvent, + type FileContextMenuTarget, +} from "./FileTreeActions"; +import { IconButton, IconButtonLink, LoadingRow, showAlert, Spinner } from "./ui"; const TOOLTIP_ICON_BUTTON_CLASS_NAME = "tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]"; @@ -46,7 +55,7 @@ function isExternalSrc(src: string): boolean { /** Resolve a Markdown target within the artifacts root. URL suffixes stay * outside the encoded filesystem path, and upward escapes are rejected. */ -function artifactTargetUrl(projectId: string, folder: string, src: string): string | null { +function artifactTarget(projectId: string, folder: string, src: string) { const hashAt = src.indexOf("#"); const beforeHash = hashAt === -1 ? src : src.slice(0, hashAt); const hash = hashAt === -1 ? "" : src.slice(hashAt); @@ -72,7 +81,10 @@ function artifactTargetUrl(projectId: string, folder: string, src: string): stri const queryParams = new URLSearchParams(query); queryParams.delete("path"); const querySuffix = queryParams.toString(); - return `${artifactUrl(projectId, path)}${querySuffix ? `&${querySuffix}` : ""}${hash}`; + return { + path, + url: `${artifactUrl(projectId, path)}${querySuffix ? `&${querySuffix}` : ""}${hash}`, + }; } /** Drop a leading YAML frontmatter block so it doesn't render as markdown. */ @@ -86,7 +98,7 @@ function stripFrontmatter(md: string): string { const TREE_WIDTH_KEY = "orx:files-tree-width"; const COLLAPSED_DIRS_KEY_PREFIX = "orx:artifacts-collapsed:"; const TREE_MIN_WIDTH = 180; -const TREE_MAX_WIDTH = 560; +const TREE_MAX_WIDTH = 320; const TREE_MAX_INDENT_DEPTH = 8; const TREE_DEFAULT_WIDTH = 280; @@ -113,11 +125,11 @@ function initialCollapsed(projectId: string): Set { } /** Depth-first lookup of a tree entry by its directory-relative path. */ -function findEntry(entries: ArtifactEntry[], path: string): ArtifactEntry | null { +export function findArtifactEntry(entries: ArtifactEntry[], path: string): ArtifactEntry | null { for (const e of entries) { if (e.path === path) return e; if (e.isDir && path.startsWith(e.path + "/")) { - const hit = findEntry(e.children ?? [], path); + const hit = findArtifactEntry(e.children ?? [], path); if (hit) return hit; } } @@ -130,14 +142,23 @@ export function ArtifactMarkdown({ projectId, folder, markdown, + entries, }: { projectId: string; folder: string; markdown: string; + entries: ArtifactEntry[]; }) { const resolve = (src: string) => { if (isExternalSrc(src)) return src; - return artifactTargetUrl(projectId, folder, src); + const target = artifactTarget(projectId, folder, src); + if (!target) return null; + const entry = findArtifactEntry(entries, target.path); + if (!entry) return target.url; + const hashAt = target.url.indexOf("#"); + const base = hashAt === -1 ? target.url : target.url.slice(0, hashAt); + const hash = hashAt === -1 ? "" : target.url.slice(hashAt); + return `${base}&v=${entry.modifiedAt}:${entry.size}${hash}`; }; return (
@@ -242,10 +263,12 @@ function PreviewPane({ projectId, entry, onDelete, + artifactEntries, }: { projectId: string; entry: ArtifactEntry; onDelete: (path: string) => void; + artifactEntries: ArtifactEntry[]; }) { const kind = previewKind(entry); const { text, binary, truncated, error, wantsText } = useTextBody(projectId, entry, kind); @@ -282,14 +305,14 @@ function PreviewPane({ ); } else if (isDoc && !showSource) { - body = ; + body = ; } else { body = ; } return ( // `file-view` scopes the shared syntax-token colors onto the code view. -
+
@@ -359,6 +382,10 @@ function TreeRows({ onSelect, onOpenFile, onDelete, + renamingPath, + onContextMenu, + onRename, + onCancelRename, }: { entries: ArtifactEntry[]; depth: number; @@ -368,6 +395,10 @@ function TreeRows({ onSelect: (path: string) => void; onOpenFile: (path: string) => void; onDelete: (path: string) => void; + renamingPath: string | null; + onContextMenu: (event: FileContextMenuEvent, path: string) => void; + onRename: (path: string, name: string) => void; + onCancelRename: () => void; }) { return (
@@ -413,6 +444,10 @@ function TreeRows({ onSelect={onSelect} onOpenFile={onOpenFile} onDelete={onDelete} + renamingPath={renamingPath} + onContextMenu={onContextMenu} + onRename={onRename} + onCancelRename={onCancelRename} /> )}
@@ -420,6 +455,22 @@ function TreeRows({ } // Artifacts keeps preview in this split view; explicit opens use file tabs. + if (renamingPath === e.path) { + return ( +
+ + onRename(e.path, name)} + onCancel={onCancelRename} + /> +
+ ); + } return (