diff --git a/pyproject.toml b/pyproject.toml index ba3f0a34..2aae0541 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -122,6 +122,7 @@ module = [ "pydantic_settings.*", "reportlab.*", "pypdf.*", + "pygments.*", ] ignore_missing_imports = true disable_error_code = ["import-untyped"] diff --git a/strix/interface/tui/app.py b/strix/interface/tui/app.py index e3344a65..4c84e84d 100644 --- a/strix/interface/tui/app.py +++ b/strix/interface/tui/app.py @@ -39,6 +39,7 @@ from strix.interface.tui.live_view import TuiLiveView from strix.interface.tui.messages import send_user_message_to_agent from strix.interface.tui.renderers import render_tool_widget from strix.interface.tui.renderers.agent_message_renderer import AgentMessageRenderer +from strix.interface.tui.renderers.fenced import parse_fenced_code from strix.interface.tui.renderers.user_message_renderer import UserMessageRenderer from strix.interface.utils import build_tui_stats_text from strix.report.state import ReportState, set_global_report_state @@ -330,12 +331,16 @@ class VulnerabilityDetailScreen(ModalScreen): # type: ignore[misc] return "#65a30d" return "#6b7280" - def _highlight_python(self, code: str) -> Text: + def _highlight_python(self, code: str, language: str | None = None) -> Text: try: - from pygments.lexers import PythonLexer + from pygments.lexers import PythonLexer, get_lexer_by_name from pygments.styles import get_style_by_name + from pygments.util import ClassNotFound lexer = PythonLexer() + if language: + with contextlib.suppress(ClassNotFound): + lexer = get_lexer_by_name(language) style = get_style_by_name("native") colors = { token: f"#{style_def['color']}" for token, style_def in style if style_def["color"] @@ -501,10 +506,11 @@ class VulnerabilityDetailScreen(ModalScreen): # type: ignore[misc] poc_script_code = vuln.get("poc_script_code", "") if poc_script_code: + poc_language, poc_code = parse_fenced_code(poc_script_code) text.append("\n\n") text.append("PoC Code", style=self.FIELD_STYLE) text.append("\n") - text.append_text(self._highlight_python(poc_script_code)) + text.append_text(self._highlight_python(poc_code, poc_language)) remediation_steps = vuln.get("remediation_steps", "") if remediation_steps: @@ -601,8 +607,9 @@ class VulnerabilityDetailScreen(ModalScreen): # type: ignore[misc] lines.append(vuln["poc_description"]) lines.append("") if vuln.get("poc_script_code"): - lines.append("```python") - lines.append(vuln["poc_script_code"]) + poc_language, poc_code = parse_fenced_code(vuln["poc_script_code"]) + lines.append(f"```{poc_language or 'python'}") + lines.append(poc_code) lines.append("```") if vuln.get("code_locations"): diff --git a/strix/interface/tui/renderers/fenced.py b/strix/interface/tui/renderers/fenced.py new file mode 100644 index 00000000..91efd314 --- /dev/null +++ b/strix/interface/tui/renderers/fenced.py @@ -0,0 +1,20 @@ +import re + + +_FENCE_RE = re.compile(r"^```([^\n`]*)\n(.*?)\n?```$", re.DOTALL) + + +def parse_fenced_code(raw: str) -> tuple[str | None, str]: + """Split an optionally fenced code string into ``(language, code)``. + + Agent-generated code fields (e.g. ``poc_script_code``) are stored wrapped in + a markdown fence carrying the language, like ``` ```python\n...\n``` ```. + Return the fence's language tag and the inner code, or ``(None, raw)`` when + the value isn't fenced. + """ + match = _FENCE_RE.match(raw.strip()) + if not match: + return None, raw + info = match.group(1).strip() + language = info.split()[0] if info else None + return (language or None), match.group(2) diff --git a/strix/interface/tui/renderers/reporting_renderer.py b/strix/interface/tui/renderers/reporting_renderer.py index d7ba6edd..54558a82 100644 --- a/strix/interface/tui/renderers/reporting_renderer.py +++ b/strix/interface/tui/renderers/reporting_renderer.py @@ -1,12 +1,15 @@ from functools import cache from typing import Any, ClassVar -from pygments.lexers import PythonLexer +from pygments.lexer import Lexer +from pygments.lexers import PythonLexer, get_lexer_by_name from pygments.styles import get_style_by_name +from pygments.util import ClassNotFound from rich.text import Text from textual.widgets import Static from .base_renderer import BaseToolRenderer +from .fenced import parse_fenced_code from .registry import register_tool_renderer @@ -61,8 +64,17 @@ class CreateVulnerabilityReportRenderer(BaseToolRenderer): return None @classmethod - def _highlight_python(cls, code: str) -> Text: - lexer = PythonLexer() + def _get_lexer(cls, language: str | None) -> Lexer: + if language: + try: + return get_lexer_by_name(language) + except ClassNotFound: + pass + return PythonLexer() + + @classmethod + def _highlight_code(cls, code: str, language: str | None) -> Text: + lexer = cls._get_lexer(language) text = Text() for token_type, token_value in lexer.get_tokens(code): @@ -234,10 +246,11 @@ class CreateVulnerabilityReportRenderer(BaseToolRenderer): text.append(poc_description) if poc_script_code: + poc_language, poc_code = parse_fenced_code(poc_script_code) text.append("\n\n") text.append("PoC Code", style=FIELD_STYLE) text.append("\n") - text.append_text(cls._highlight_python(poc_script_code)) + text.append_text(cls._highlight_code(poc_code, poc_language)) if remediation_steps: text.append("\n\n") diff --git a/strix/viewer/frontend/src/components/live/tool-renderers/VulnReportRenderer.tsx b/strix/viewer/frontend/src/components/live/tool-renderers/VulnReportRenderer.tsx index 8c1fec09..fa8a08ee 100644 --- a/strix/viewer/frontend/src/components/live/tool-renderers/VulnReportRenderer.tsx +++ b/strix/viewer/frontend/src/components/live/tool-renderers/VulnReportRenderer.tsx @@ -3,6 +3,7 @@ import type { ToolRendererProps } from "@/types/events"; import { TruncatedText } from "./ToolCard"; import { MdCodeBlock } from "@/components/vulnerability/MdCodeBlock"; +import { parseFencedCode } from "@/lib/fenced-code"; import Markdown from "./Markdown"; const SEVERITY_COLORS: Record = { @@ -19,7 +20,7 @@ export default function VulnReportRenderer({ args, result }: ToolRendererProps) const method = (args.method as string) ?? ""; const technicalAnalysis = (args.technical_analysis as string) ?? ""; const pocDescription = (args.poc_description as string) ?? ""; - const pocCode = (args.poc_script_code as string) ?? ""; + const { language: pocLang, code: pocCode } = parseFencedCode((args.poc_script_code as string) ?? ""); const remediation = (args.remediation_steps as string) ?? ""; const cve = (args.cve as string) ?? ""; const cwe = (args.cwe as string) ?? ""; @@ -59,7 +60,7 @@ export default function VulnReportRenderer({ args, result }: ToolRendererProps)
Proof of Concept {pocDescription &&
} - {pocCode && {pocCode}} + {pocCode && {pocCode}}
)} {remediation && ( diff --git a/strix/viewer/frontend/src/components/vulnerability/PocBlock.tsx b/strix/viewer/frontend/src/components/vulnerability/PocBlock.tsx index fa2184b9..2ead721c 100644 --- a/strix/viewer/frontend/src/components/vulnerability/PocBlock.tsx +++ b/strix/viewer/frontend/src/components/vulnerability/PocBlock.tsx @@ -7,6 +7,7 @@ import ReactMarkdown from "react-markdown"; import remarkGfm from "remark-gfm"; import { Copy, Check } from "lucide-react"; import { copyToClipboard } from "@/lib/vulnerability-utils"; +import { parseFencedCode } from "@/lib/fenced-code"; import { rehypeCodeMeta, mdComponents } from "./MdCodeBlock"; interface PocBlockProps { @@ -20,9 +21,21 @@ export function PocBlock({ description, scriptCode, onCopy }: PocBlockProps) { if (!description && !scriptCode) return null; + const { language, code } = parseFencedCode(scriptCode); + const highlighted = (() => { + try { + if (language && hljs.getLanguage(language)) { + return hljs.highlight(code, { language }).value; + } + return hljs.highlightAuto(code).value; + } catch { + return hljs.highlightAuto(code).value; + } + })(); + const copy = () => { - if (!scriptCode) return; - copyToClipboard(scriptCode); + if (!code) return; + copyToClipboard(code); setCopied(true); setTimeout(() => setCopied(false), 2000); onCopy?.(); @@ -43,7 +56,7 @@ export function PocBlock({ description, scriptCode, onCopy }: PocBlockProps) { )} - {scriptCode && ( + {code && (
PoC Script @@ -64,7 +77,7 @@ export function PocBlock({ description, scriptCode, onCopy }: PocBlockProps) {
                 
               
diff --git a/strix/viewer/frontend/src/lib/fenced-code.ts b/strix/viewer/frontend/src/lib/fenced-code.ts new file mode 100644 index 00000000..0c89d8c8 --- /dev/null +++ b/strix/viewer/frontend/src/lib/fenced-code.ts @@ -0,0 +1,27 @@ +export interface ParsedFencedCode { + language?: string; + code: string; +} + +const FENCE_RE = /^```([^\n`]*)\n([\s\S]*?)\n?```$/; + +/** + * Agent-generated `poc_script_code` is stored wrapped in a markdown code fence + * that carries the language, e.g. + * + * ```python + * import requests + * ``` + * + * Renderers that show the value as bare code must not display the fence lines + * literally. This extracts the inner code and the fence's language tag. Returns + * the input unchanged (no language) when it isn't fenced. + */ +export function parseFencedCode(raw: string | null | undefined): ParsedFencedCode { + if (!raw) return { code: "" }; + const match = FENCE_RE.exec(raw.trim()); + if (!match) return { code: raw }; + const info = match[1].trim(); + const language = info ? info.split(/\s+/)[0] : undefined; + return { language: language || undefined, code: match[2] }; +} diff --git a/strix/viewer/report_pdf.py b/strix/viewer/report_pdf.py index 10f5c2b7..c3b011c9 100644 --- a/strix/viewer/report_pdf.py +++ b/strix/viewer/report_pdf.py @@ -151,19 +151,35 @@ def _styles() -> dict[str, ParagraphStyle]: "Finding", fontName=_SANS_BOLD, fontSize=13, leading=17, textColor=_INK, spaceBefore=6 ) styles["field_label"] = ParagraphStyle( - "FieldLabel", fontName=_SANS_BOLD, fontSize=8.5, leading=12, textColor=_MUTED, - spaceBefore=10, spaceAfter=2, + "FieldLabel", + fontName=_SANS_BOLD, + fontSize=8.5, + leading=12, + textColor=_MUTED, + spaceBefore=10, + spaceAfter=2, ) styles["body"] = ParagraphStyle( "Body", fontName=_SANS, fontSize=10, leading=15, textColor=_TEXT, spaceAfter=8 ) styles["md_heading"] = ParagraphStyle( - "MdHeading", fontName=_SANS_BOLD, fontSize=11, leading=15, textColor=_INK, - spaceBefore=10, spaceAfter=4, + "MdHeading", + fontName=_SANS_BOLD, + fontSize=11, + leading=15, + textColor=_INK, + spaceBefore=10, + spaceAfter=4, ) styles["bullet"] = ParagraphStyle( - "Bullet", fontName=_SANS, fontSize=10, leading=15, textColor=_TEXT, - leftIndent=16, firstLineIndent=-11, spaceAfter=3, + "Bullet", + fontName=_SANS, + fontSize=10, + leading=15, + textColor=_TEXT, + leftIndent=16, + firstLineIndent=-11, + spaceAfter=3, ) styles["meta_inline"] = ParagraphStyle( "MetaInline", fontName=_SANS, fontSize=9, leading=13, textColor=_MUTED, spaceBefore=4 @@ -172,23 +188,44 @@ def _styles() -> dict[str, ParagraphStyle]: # a bordered paragraph's top padding, so too small a gap lets the background # box bleed up over the field label above it. styles["code"] = ParagraphStyle( - "Code", fontName=_MONO, fontSize=8, leading=11, textColor=_TEXT, - backColor=_LIGHT_BG, borderColor=_BORDER, borderWidth=0.5, borderPadding=8, - spaceBefore=12, spaceAfter=12, + "Code", + fontName=_MONO, + fontSize=8, + leading=11, + textColor=_TEXT, + backColor=_LIGHT_BG, + borderColor=_BORDER, + borderWidth=0.5, + borderPadding=8, + spaceBefore=12, + spaceAfter=12, ) styles["count"] = ParagraphStyle( "Count", fontName=_SANS_BOLD, fontSize=30, leading=32, alignment=TA_CENTER ) styles["count_label"] = ParagraphStyle( - "CountLabel", fontName=_SANS_BOLD, fontSize=8, leading=12, textColor=_MUTED, - alignment=TA_CENTER, spaceBefore=4, + "CountLabel", + fontName=_SANS_BOLD, + fontSize=8, + leading=12, + textColor=_MUTED, + alignment=TA_CENTER, + spaceBefore=4, ) styles["badge"] = ParagraphStyle( - "Badge", fontName=_SANS_BOLD, fontSize=9, leading=11, textColor=colors.white, + "Badge", + fontName=_SANS_BOLD, + fontSize=9, + leading=11, + textColor=colors.white, alignment=TA_CENTER, ) styles["confidential"] = ParagraphStyle( - "Confidential", fontName=_SANS_BOLD, fontSize=9, leading=12, textColor=colors.white, + "Confidential", + fontName=_SANS_BOLD, + fontSize=9, + leading=12, + textColor=colors.white, alignment=TA_CENTER, ) return styles @@ -256,8 +293,10 @@ def _severity_grid(styles: dict[str, ParagraphStyle], counts: dict[str, int]) -> color = _SEVERITY_COLORS[name] count_style = ParagraphStyle(f"Count{name}", parent=styles["count"], textColor=color) cells.append( - [Paragraph(str(counts.get(name, 0)), count_style), - Paragraph(name.upper(), styles["count_label"])] + [ + Paragraph(str(counts.get(name, 0)), count_style), + Paragraph(name.upper(), styles["count_label"]), + ] ) col = (_PAGE_W - 40 * mm) / 4 table = Table([cells], colWidths=[col] * 4) @@ -320,8 +359,10 @@ def _cover( ("DURATION", _duration(record.get("start_time"), record.get("end_time"))), ] meta_table = Table( - [[Paragraph(label, styles["meta_label"]), Paragraph(_esc(value), styles["meta_value"])] - for label, value in meta_rows], + [ + [Paragraph(label, styles["meta_label"]), Paragraph(_esc(value), styles["meta_value"])] + for label, value in meta_rows + ], colWidths=[38 * mm, _PAGE_W - 40 * mm - 38 * mm], ) meta_table.setStyle( @@ -462,6 +503,18 @@ def _markdown_flowables( # noqa: PLR0915 - cohesive block parser, splitting hur return flow +_FENCE_RE = re.compile(r"^```([^\n`]*)\n(.*?)\n?```$", re.DOTALL) + + +def _strip_code_fence(value: Any) -> Any: + """Drop a wrapping markdown code fence so raw-code fields don't show the + ``` ```lang ``` marker lines literally in the PDF.""" + if not isinstance(value, str): + return value + match = _FENCE_RE.match(value.strip()) + return match.group(2) if match else value + + def _field_block( styles: dict[str, ParagraphStyle], label: str, value: Any, *, code: bool = False ) -> list[Flowable]: @@ -503,7 +556,8 @@ def _finding_flowables( story.extend(_field_block(styles, "Impact", vuln.get("impact"))) story.extend(_field_block(styles, "Technical analysis", vuln.get("technical_analysis"))) story.extend(_field_block(styles, "Proof of concept", vuln.get("poc_description"))) - story.extend(_field_block(styles, "PoC script", vuln.get("poc_script_code"), code=True)) + poc_script = _strip_code_fence(vuln.get("poc_script_code")) + story.extend(_field_block(styles, "PoC script", poc_script, code=True)) story.extend(_field_block(styles, "Evidence", vuln.get("evidence"), code=True)) remediation = vuln.get("remediation_steps") diff --git a/strix/viewer/static/assets/index-e2r6VuTm.js b/strix/viewer/static/assets/index-B3PIcykV.js similarity index 72% rename from strix/viewer/static/assets/index-e2r6VuTm.js rename to strix/viewer/static/assets/index-B3PIcykV.js index a010dffe..f7960ecd 100644 --- a/strix/viewer/static/assets/index-e2r6VuTm.js +++ b/strix/viewer/static/assets/index-B3PIcykV.js @@ -1,4 +1,4 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();function To(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oh={exports:{}},Yl={};/** +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();function Co(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oh={exports:{}},Yl={};/** * @license React * react-jsx-runtime.production.js * @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var F0;function pk(){if(F0)return Yl;F0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var d in s)d!=="key"&&(o[d]=s[d])}else o=s;return s=o.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:o}}return Yl.Fragment=t,Yl.jsx=r,Yl.jsxs=r,Yl}var G0;function gk(){return G0||(G0=1,oh.exports=pk()),oh.exports}var g=gk(),ch={exports:{}},Ve={};/** + */var F0;function gk(){if(F0)return Yl;F0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var d in s)d!=="key"&&(o[d]=s[d])}else o=s;return s=o.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:o}}return Yl.Fragment=t,Yl.jsx=r,Yl.jsxs=r,Yl}var G0;function bk(){return G0||(G0=1,oh.exports=gk()),oh.exports}var g=bk(),ch={exports:{}},Ve={};/** * @license React * react.production.js * @@ -14,7 +14,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var V0;function bk(){if(V0)return Ve;V0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function x(j){return j===null||typeof j!="object"?null:(j=y&&j[y]||j["@@iterator"],typeof j=="function"?j:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,S={};function w(j,Y,L){this.props=j,this.context=Y,this.refs=S,this.updater=L||_}w.prototype.isReactComponent={},w.prototype.setState=function(j,Y){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,Y,"setState")},w.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function k(){}k.prototype=w.prototype;function E(j,Y,L){this.props=j,this.context=Y,this.refs=S,this.updater=L||_}var M=E.prototype=new k;M.constructor=E,N(M,w.prototype),M.isPureReactComponent=!0;var I=Array.isArray;function R(){}var U={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function Z(j,Y,L){var G=L.ref;return{$$typeof:e,type:j,key:Y,ref:G!==void 0?G:null,props:L}}function D(j,Y){return Z(j.type,Y,j.props)}function z(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function V(j){var Y={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(L){return Y[L]})}var P=/\/+/g;function C(j,Y){return typeof j=="object"&&j!==null&&j.key!=null?V(""+j.key):Y.toString(36)}function $(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(R,R):(j.status="pending",j.then(function(Y){j.status==="pending"&&(j.status="fulfilled",j.value=Y)},function(Y){j.status==="pending"&&(j.status="rejected",j.reason=Y)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function O(j,Y,L,G,q){var Q=typeof j;(Q==="undefined"||Q==="boolean")&&(j=null);var J=!1;if(j===null)J=!0;else switch(Q){case"bigint":case"string":case"number":J=!0;break;case"object":switch(j.$$typeof){case e:case t:J=!0;break;case m:return J=j._init,O(J(j._payload),Y,L,G,q)}}if(J)return q=q(j),J=G===""?"."+C(j,0):G,I(q)?(L="",J!=null&&(L=J.replace(P,"$&/")+"/"),O(q,Y,L,"",function(ce){return ce})):q!=null&&(z(q)&&(q=D(q,L+(q.key==null||j&&j.key===q.key?"":(""+q.key).replace(P,"$&/")+"/")+J)),Y.push(q)),1;J=0;var W=G===""?".":G+":";if(I(j))for(var te=0;te>>1,T=O[K];if(0>>1;Ks(L,X))Gs(q,L)?(O[K]=q,O[G]=X,K=G):(O[K]=L,O[Y]=X,K=Y);else if(Gs(q,X))O[K]=q,O[G]=X,K=G;else break e}}return H}function s(O,H){var X=O.sortIndex-H.sortIndex;return X!==0?X:O.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],h=[],m=1,p=null,y=3,x=!1,_=!1,N=!1,S=!1,w=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function M(O){for(var H=r(h);H!==null;){if(H.callback===null)a(h);else if(H.startTime<=O)a(h),H.sortIndex=H.expirationTime,t(f,H);else break;H=r(h)}}function I(O){if(N=!1,M(O),!_)if(r(f)!==null)_=!0,R||(R=!0,V());else{var H=r(h);H!==null&&$(I,H.startTime-O)}}var R=!1,U=-1,B=5,Z=-1;function D(){return S?!0:!(e.unstable_now()-ZO&&D());){var K=p.callback;if(typeof K=="function"){p.callback=null,y=p.priorityLevel;var T=K(p.expirationTime<=O);if(O=e.unstable_now(),typeof T=="function"){p.callback=T,M(O),H=!0;break t}p===r(f)&&a(f),M(O)}else a(f);p=r(f)}if(p!==null)H=!0;else{var j=r(h);j!==null&&$(I,j.startTime-O),H=!1}}break e}finally{p=null,y=X,x=!1}H=void 0}}finally{H?V():R=!1}}}var V;if(typeof E=="function")V=function(){E(z)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,C=P.port2;P.port1.onmessage=z,V=function(){C.postMessage(null)}}else V=function(){w(z,0)};function $(O,H){U=w(function(){O(e.unstable_now())},H)}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(O){O.callback=null},e.unstable_forceFrameRate=function(O){0>O||125K?(O.sortIndex=X,t(h,O),r(f)===null&&O===r(h)&&(N?(k(U),U=-1):N=!0,$(I,X-K))):(O.sortIndex=T,t(f,O),_||x||(_=!0,R||(R=!0,V()))),O},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(O){var H=y;return function(){var X=y;y=H;try{return O.apply(this,arguments)}finally{y=X}}}})(fh)),fh}var K0;function yk(){return K0||(K0=1,dh.exports=xk()),dh.exports}var hh={exports:{}},Tn={};/** + */var X0;function yk(){return X0||(X0=1,(function(e){function t(O,H){var X=O.length;O.push(H);e:for(;0>>1,C=O[K];if(0>>1;Ks(L,X))Gs(q,L)?(O[K]=q,O[G]=X,K=G):(O[K]=L,O[Y]=X,K=Y);else if(Gs(q,X))O[K]=q,O[G]=X,K=G;else break e}}return H}function s(O,H){var X=O.sortIndex-H.sortIndex;return X!==0?X:O.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],h=[],m=1,p=null,y=3,x=!1,_=!1,N=!1,S=!1,w=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function M(O){for(var H=r(h);H!==null;){if(H.callback===null)a(h);else if(H.startTime<=O)a(h),H.sortIndex=H.expirationTime,t(f,H);else break;H=r(h)}}function I(O){if(N=!1,M(O),!_)if(r(f)!==null)_=!0,R||(R=!0,V());else{var H=r(h);H!==null&&$(I,H.startTime-O)}}var R=!1,U=-1,B=5,Z=-1;function D(){return S?!0:!(e.unstable_now()-ZO&&D());){var K=p.callback;if(typeof K=="function"){p.callback=null,y=p.priorityLevel;var C=K(p.expirationTime<=O);if(O=e.unstable_now(),typeof C=="function"){p.callback=C,M(O),H=!0;break t}p===r(f)&&a(f),M(O)}else a(f);p=r(f)}if(p!==null)H=!0;else{var j=r(h);j!==null&&$(I,j.startTime-O),H=!1}}break e}finally{p=null,y=X,x=!1}H=void 0}}finally{H?V():R=!1}}}var V;if(typeof E=="function")V=function(){E(z)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,T=P.port2;P.port1.onmessage=z,V=function(){T.postMessage(null)}}else V=function(){w(z,0)};function $(O,H){U=w(function(){O(e.unstable_now())},H)}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(O){O.callback=null},e.unstable_forceFrameRate=function(O){0>O||125K?(O.sortIndex=X,t(h,O),r(f)===null&&O===r(h)&&(N?(k(U),U=-1):N=!0,$(I,X-K))):(O.sortIndex=C,t(f,O),_||x||(_=!0,R||(R=!0,V()))),O},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(O){var H=y;return function(){var X=y;y=H;try{return O.apply(this,arguments)}finally{y=X}}}})(fh)),fh}var K0;function vk(){return K0||(K0=1,dh.exports=yk()),dh.exports}var hh={exports:{}},Tn={};/** * @license React * react-dom.production.js * @@ -30,7 +30,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Z0;function vk(){if(Z0)return Tn;Z0=1;var e=Co();function t(f){var h="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),hh.exports=vk(),hh.exports}/** + */var Z0;function _k(){if(Z0)return Tn;Z0=1;var e=To();function t(f){var h="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),hh.exports=_k(),hh.exports}/** * @license React * react-dom-client.production.js * @@ -38,15 +38,15 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var W0;function _k(){if(W0)return Xl;W0=1;var e=yk(),t=Co(),r=N_();function a(n){var i="https://react.dev/errors/"+n;if(1T||(n.current=K[T],K[T]=null,T--)}function L(n,i){T++,K[T]=n.current,n.current=i}var G=j(null),q=j(null),Q=j(null),J=j(null);function W(n,i){switch(L(Q,i),L(q,n),L(G,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?h0(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=h0(i),n=m0(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Y(G),L(G,n)}function te(){Y(G),Y(q),Y(Q)}function ce(n){n.memoizedState!==null&&L(J,n);var i=G.current,l=m0(i,n.type);i!==l&&(L(q,n),L(G,l))}function fe(n){q.current===n&&(Y(G),Y(q)),J.current===n&&(Y(J),Pl._currentValue=X)}var be,we;function Ne(n){if(be===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);be=i&&i[1]||"",we=-1C||(n.current=K[C],K[C]=null,C--)}function L(n,i){C++,K[C]=n.current,n.current=i}var G=j(null),q=j(null),Q=j(null),J=j(null);function W(n,i){switch(L(Q,i),L(q,n),L(G,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?h0(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=h0(i),n=m0(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Y(G),L(G,n)}function te(){Y(G),Y(q),Y(Q)}function ce(n){n.memoizedState!==null&&L(J,n);var i=G.current,l=m0(i,n.type);i!==l&&(L(q,n),L(G,l))}function fe(n){q.current===n&&(Y(G),Y(q)),J.current===n&&(Y(J),Pl._currentValue=X)}var be,we;function Ne(n){if(be===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);be=i&&i[1]||"",we=-1)":-1b||ne[u]!==le[b]){var he=` `+ne[u].replace(" at new "," at ");return n.displayName&&he.includes("")&&(he=he.replace("",n.displayName)),he}while(1<=u&&0<=b);break}}}finally{je=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?Ne(l):""}function st(n,i){switch(n.tag){case 26:case 27:case 5:return Ne(n.type);case 16:return Ne("Lazy");case 13:return n.child!==i&&i!==null?Ne("Suspense Fallback"):Ne("Suspense");case 19:return Ne("SuspenseList");case 0:case 15:return $e(n.type,!1);case 11:return $e(n.type.render,!1);case 1:return $e(n.type,!0);case 31:return Ne("Activity");default:return""}}function Rt(n){try{var i="",l=null;do i+=st(n,l),l=n,n=n.return;while(n);return i}catch(u){return` Error generating stack: `+u.message+` -`+u.stack}}var Yt=Object.prototype.hasOwnProperty,Pt=e.unstable_scheduleCallback,Xt=e.unstable_cancelCallback,Yn=e.unstable_shouldYield,En=e.unstable_requestPaint,ct=e.unstable_now,It=e.unstable_getCurrentPriorityLevel,ue=e.unstable_ImmediatePriority,xe=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,Fe=e.unstable_LowPriority,Ze=e.unstable_IdlePriority,on=e.log,Nn=e.unstable_setDisableYieldValue,Kt=null,At=null;function Wt(n){if(typeof on=="function"&&Nn(n),At&&typeof At.setStrictMode=="function")try{At.setStrictMode(Kt,n)}catch{}}var ut=Math.clz32?Math.clz32:Ni,zn=Math.log,cn=Math.LN2;function Ni(n){return n>>>=0,n===0?32:31-(zn(n)/cn|0)|0}var nt=256,Xn=262144,Mn=4194304;function hn(n){var i=n&42;if(i!==0)return i;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function re(n,i,l){var u=n.pendingLanes;if(u===0)return 0;var b=0,v=n.suspendedLanes,A=n.pingedLanes;n=n.warmLanes;var F=u&134217727;return F!==0?(u=F&~v,u!==0?b=hn(u):(A&=F,A!==0?b=hn(A):l||(l=F&~n,l!==0&&(b=hn(l))))):(F=u&~v,F!==0?b=hn(F):A!==0?b=hn(A):l||(l=u&~n,l!==0&&(b=hn(l)))),b===0?0:i!==0&&i!==b&&(i&v)===0&&(v=b&-b,l=i&-i,v>=l||v===32&&(l&4194048)!==0)?i:b}function me(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function Ee(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 Pe(){var n=Mn;return Mn<<=1,(Mn&62914560)===0&&(Mn=4194304),n}function St(n){for(var i=[],l=0;31>l;l++)i.push(n);return i}function gt(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Ae(n,i,l,u,b,v){var A=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var F=n.entanglements,ne=n.expirationTimes,le=n.hiddenUpdates;for(l=A&~l;0"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var ns=/[\n"\\]/g;function kn(n){return n.replace(ns,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function ba(n,i,l,u,b,v,A,F){n.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?n.type=A:n.removeAttribute("type"),i!=null?A==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+_t(i)):n.value!==""+_t(i)&&(n.value=""+_t(i)):A!=="submit"&&A!=="reset"||n.removeAttribute("value"),i!=null?Oi(n,A,_t(i)):l!=null?Oi(n,A,_t(l)):u!=null&&n.removeAttribute("value"),b==null&&v!=null&&(n.defaultChecked=!!v),b!=null&&(n.checked=b&&typeof b!="function"&&typeof b!="symbol"),F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?n.name=""+_t(F):n.removeAttribute("name")}function Er(n,i,l,u,b,v,A,F){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.type=v),i!=null||l!=null){if(!(v!=="submit"&&v!=="reset"||i!=null)){Ai(n);return}l=l!=null?""+_t(l):"",i=i!=null?""+_t(i):l,F||i===n.value||(n.value=i),n.defaultValue=i}u=u??b,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=F?n.checked:!!u,n.defaultChecked=!!u,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(n.name=A),Ai(n)}function Oi(n,i,l){i==="number"&&Mi(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function un(n,i,l,u){if(n=n.options,i){i={};for(var b=0;b"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ld=!1;if(ti)try{var ll={};Object.defineProperty(ll,"passive",{get:function(){ld=!0}}),window.addEventListener("test",ll,ll),window.removeEventListener("test",ll,ll)}catch{ld=!1}var ji=null,od=null,qo=null;function mg(){if(qo)return qo;var n,i=od,l=i.length,u,b="value"in ji?ji.value:ji.textContent,v=b.length;for(n=0;n=ul),vg=" ",_g=!1;function wg(n,i){switch(n){case"keyup":return IS.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var is=!1;function US(n,i){switch(n){case"compositionend":return Eg(i);case"keypress":return i.which!==32?null:(_g=!0,vg);case"textInput":return n=i.data,n===vg&&_g?null:n;default:return null}}function HS(n,i){if(is)return n==="compositionend"||!hd&&wg(n,i)?(n=mg(),qo=od=ji=null,is=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:l,offset:i-n};n=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Og(l)}}function Dg(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?Dg(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function jg(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=Mi(n.document);i instanceof n.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)n=i.contentWindow;else break;i=Mi(n.document)}return i}function gd(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var XS=ti&&"documentMode"in document&&11>=document.documentMode,as=null,bd=null,ml=null,xd=!1;function Lg(n,i,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;xd||as==null||as!==Mi(u)||(u=as,"selectionStart"in u&&gd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),ml&&hl(ml,u)||(ml=u,u=Lc(bd,"onSelect"),0>=A,b-=A,Hr=1<<32-ut(i)+b|l<Ke?(at=De,De=null):at=De.sibling;var mt=oe(ae,De,se[Ke],pe);if(mt===null){De===null&&(De=at);break}n&&De&&mt.alternate===null&&i(ae,De),ie=v(mt,ie,Ke),ht===null?Ie=mt:ht.sibling=mt,ht=mt,De=at}if(Ke===se.length)return l(ae,De),lt&&ri(ae,Ke),Ie;if(De===null){for(;KeKe?(at=De,De=null):at=De.sibling;var na=oe(ae,De,mt.value,pe);if(na===null){De===null&&(De=at);break}n&&De&&na.alternate===null&&i(ae,De),ie=v(na,ie,Ke),ht===null?Ie=na:ht.sibling=na,ht=na,De=at}if(mt.done)return l(ae,De),lt&&ri(ae,Ke),Ie;if(De===null){for(;!mt.done;Ke++,mt=se.next())mt=ge(ae,mt.value,pe),mt!==null&&(ie=v(mt,ie,Ke),ht===null?Ie=mt:ht.sibling=mt,ht=mt);return lt&&ri(ae,Ke),Ie}for(De=u(De);!mt.done;Ke++,mt=se.next())mt=de(De,ae,Ke,mt.value,pe),mt!==null&&(n&&mt.alternate!==null&&De.delete(mt.key===null?Ke:mt.key),ie=v(mt,ie,Ke),ht===null?Ie=mt:ht.sibling=mt,ht=mt);return n&&De.forEach(function(mk){return i(ae,mk)}),lt&&ri(ae,Ke),Ie}function Nt(ae,ie,se,pe){if(typeof se=="object"&&se!==null&&se.type===N&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case x:e:{for(var Ie=se.key;ie!==null;){if(ie.key===Ie){if(Ie=se.type,Ie===N){if(ie.tag===7){l(ae,ie.sibling),pe=b(ie,se.props.children),pe.return=ae,ae=pe;break e}}else if(ie.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===B&&Ca(Ie)===ie.type){l(ae,ie.sibling),pe=b(ie,se.props),vl(pe,se),pe.return=ae,ae=pe;break e}l(ae,ie);break}else i(ae,ie);ie=ie.sibling}se.type===N?(pe=Ea(se.props.children,ae.mode,pe,se.key),pe.return=ae,ae=pe):(pe=Wo(se.type,se.key,se.props,null,ae.mode,pe),vl(pe,se),pe.return=ae,ae=pe)}return A(ae);case _:e:{for(Ie=se.key;ie!==null;){if(ie.key===Ie)if(ie.tag===4&&ie.stateNode.containerInfo===se.containerInfo&&ie.stateNode.implementation===se.implementation){l(ae,ie.sibling),pe=b(ie,se.children||[]),pe.return=ae,ae=pe;break e}else{l(ae,ie);break}else i(ae,ie);ie=ie.sibling}pe=Sd(se,ae.mode,pe),pe.return=ae,ae=pe}return A(ae);case B:return se=Ca(se),Nt(ae,ie,se,pe)}if($(se))return Ce(ae,ie,se,pe);if(V(se)){if(Ie=V(se),typeof Ie!="function")throw Error(a(150));return se=Ie.call(se),He(ae,ie,se,pe)}if(typeof se.then=="function")return Nt(ae,ie,ac(se),pe);if(se.$$typeof===E)return Nt(ae,ie,tc(ae,se),pe);sc(ae,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,ie!==null&&ie.tag===6?(l(ae,ie.sibling),pe=b(ie,se),pe.return=ae,ae=pe):(l(ae,ie),pe=Nd(se,ae.mode,pe),pe.return=ae,ae=pe),A(ae)):l(ae,ie)}return function(ae,ie,se,pe){try{yl=0;var Ie=Nt(ae,ie,se,pe);return gs=null,Ie}catch(De){if(De===ps||De===rc)throw De;var ht=Zn(29,De,null,ae.mode);return ht.lanes=pe,ht.return=ae,ht}finally{}}}var Ma=ib(!0),ab=ib(!1),Ui=!1;function Id(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bd(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Hi(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function $i(n,i,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(pt&2)!==0){var b=u.pending;return b===null?i.next=i:(i.next=b.next,b.next=i),u.pending=i,i=Qo(n),qg(n,null,l),i}return Zo(n,u,i,l),Qo(n)}function _l(n,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194048)!==0)){var u=i.lanes;u&=n.pendingLanes,l|=u,i.lanes=l,Ue(n,l)}}function Ud(n,i){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var b=null,v=null;if(l=l.firstBaseUpdate,l!==null){do{var A={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};v===null?b=v=A:v=v.next=A,l=l.next}while(l!==null);v===null?b=v=i:v=v.next=i}else b=v=i;l={baseState:u.baseState,firstBaseUpdate:b,lastBaseUpdate:v,shared:u.shared,callbacks:u.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=i:n.next=i,l.lastBaseUpdate=i}var Hd=!1;function wl(){if(Hd){var n=ms;if(n!==null)throw n}}function El(n,i,l,u){Hd=!1;var b=n.updateQueue;Ui=!1;var v=b.firstBaseUpdate,A=b.lastBaseUpdate,F=b.shared.pending;if(F!==null){b.shared.pending=null;var ne=F,le=ne.next;ne.next=null,A===null?v=le:A.next=le,A=ne;var he=n.alternate;he!==null&&(he=he.updateQueue,F=he.lastBaseUpdate,F!==A&&(F===null?he.firstBaseUpdate=le:F.next=le,he.lastBaseUpdate=ne))}if(v!==null){var ge=b.baseState;A=0,he=le=ne=null,F=v;do{var oe=F.lane&-536870913,de=oe!==F.lane;if(de?(it&oe)===oe:(u&oe)===oe){oe!==0&&oe===hs&&(Hd=!0),he!==null&&(he=he.next={lane:0,tag:F.tag,payload:F.payload,callback:null,next:null});e:{var Ce=n,He=F;oe=i;var Nt=l;switch(He.tag){case 1:if(Ce=He.payload,typeof Ce=="function"){ge=Ce.call(Nt,ge,oe);break e}ge=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=He.payload,oe=typeof Ce=="function"?Ce.call(Nt,ge,oe):Ce,oe==null)break e;ge=p({},ge,oe);break e;case 2:Ui=!0}}oe=F.callback,oe!==null&&(n.flags|=64,de&&(n.flags|=8192),de=b.callbacks,de===null?b.callbacks=[oe]:de.push(oe))}else de={lane:oe,tag:F.tag,payload:F.payload,callback:F.callback,next:null},he===null?(le=he=de,ne=ge):he=he.next=de,A|=oe;if(F=F.next,F===null){if(F=b.shared.pending,F===null)break;de=F,F=de.next,de.next=null,b.lastBaseUpdate=de,b.shared.pending=null}}while(!0);he===null&&(ne=ge),b.baseState=ne,b.firstBaseUpdate=le,b.lastBaseUpdate=he,v===null&&(b.shared.lanes=0),Vi|=A,n.lanes=A,n.memoizedState=ge}}function sb(n,i){if(typeof n!="function")throw Error(a(191,n));n.call(i)}function lb(n,i){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;nv?v:8;var A=O.T,F={};O.T=F,sf(n,!1,i,l);try{var ne=b(),le=O.S;if(le!==null&&le(F,ne),ne!==null&&typeof ne=="object"&&typeof ne.then=="function"){var he=r2(ne,u);kl(n,i,he,tr(n))}else kl(n,i,u,tr(n))}catch(ge){kl(n,i,{then:function(){},status:"rejected",reason:ge},tr())}finally{H.p=v,A!==null&&F.types!==null&&(A.types=F.types),O.T=A}}function c2(){}function rf(n,i,l,u){if(n.tag!==5)throw Error(a(476));var b=Ub(n).queue;Bb(n,b,i,X,l===null?c2:function(){return Hb(n),l(u)})}function Ub(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:li,lastRenderedState:X},next:null};var l={};return i.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:li,lastRenderedState:l},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function Hb(n){var i=Ub(n);i.next===null&&(i=n.alternate.memoizedState),kl(n,i.next.queue,{},tr())}function af(){return yn(Pl)}function $b(){return Qt().memoizedState}function qb(){return Qt().memoizedState}function u2(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var l=tr();n=Hi(l);var u=$i(i,n,l);u!==null&&(qn(u,i,l),_l(u,i,l)),i={cache:Dd()},n.payload=i;return}i=i.return}}function d2(n,i,l){var u=tr();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},gc(n)?Fb(i,l):(l=wd(n,i,l,u),l!==null&&(qn(l,n,u),Gb(l,i,u)))}function Pb(n,i,l){var u=tr();kl(n,i,l,u)}function kl(n,i,l,u){var b={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(gc(n))Fb(i,b);else{var v=n.alternate;if(n.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var A=i.lastRenderedState,F=v(A,l);if(b.hasEagerState=!0,b.eagerState=F,Kn(F,A))return Zo(n,i,b,0),kt===null&&Ko(),!1}catch{}finally{}if(l=wd(n,i,b,u),l!==null)return qn(l,n,u),Gb(l,i,u),!0}return!1}function sf(n,i,l,u){if(u={lane:2,revertLane:Bf(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},gc(n)){if(i)throw Error(a(479))}else i=wd(n,l,u,2),i!==null&&qn(i,n,2)}function gc(n){var i=n.alternate;return n===Xe||i!==null&&i===Xe}function Fb(n,i){xs=cc=!0;var l=n.pending;l===null?i.next=i:(i.next=l.next,l.next=i),n.pending=i}function Gb(n,i,l){if((l&4194048)!==0){var u=i.lanes;u&=n.pendingLanes,l|=u,i.lanes=l,Ue(n,l)}}var Tl={readContext:yn,use:fc,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt,useHostTransitionStatus:Gt,useFormState:Gt,useActionState:Gt,useOptimistic:Gt,useMemoCache:Gt,useCacheRefresh:Gt};Tl.useEffectEvent=Gt;var Vb={readContext:yn,use:fc,useCallback:function(n,i){return Dn().memoizedState=[n,i===void 0?null:i],n},useContext:yn,useEffect:Ab,useImperativeHandle:function(n,i,l){l=l!=null?l.concat([n]):null,mc(4194308,4,Db.bind(null,i,n),l)},useLayoutEffect:function(n,i){return mc(4194308,4,n,i)},useInsertionEffect:function(n,i){mc(4,2,n,i)},useMemo:function(n,i){var l=Dn();i=i===void 0?null:i;var u=n();if(Oa){Wt(!0);try{n()}finally{Wt(!1)}}return l.memoizedState=[u,i],u},useReducer:function(n,i,l){var u=Dn();if(l!==void 0){var b=l(i);if(Oa){Wt(!0);try{l(i)}finally{Wt(!1)}}}else b=i;return u.memoizedState=u.baseState=b,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:b},u.queue=n,n=n.dispatch=d2.bind(null,Xe,n),[u.memoizedState,n]},useRef:function(n){var i=Dn();return n={current:n},i.memoizedState=n},useState:function(n){n=Wd(n);var i=n.queue,l=Pb.bind(null,Xe,i);return i.dispatch=l,[n.memoizedState,l]},useDebugValue:tf,useDeferredValue:function(n,i){var l=Dn();return nf(l,n,i)},useTransition:function(){var n=Wd(!1);return n=Bb.bind(null,Xe,n.queue,!0,!1),Dn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,l){var u=Xe,b=Dn();if(lt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=i(),kt===null)throw Error(a(349));(it&127)!==0||hb(u,i,l)}b.memoizedState=l;var v={value:l,getSnapshot:i};return b.queue=v,Ab(pb.bind(null,u,v,n),[n]),u.flags|=2048,vs(9,{destroy:void 0},mb.bind(null,u,v,l,i),null),l},useId:function(){var n=Dn(),i=kt.identifierPrefix;if(lt){var l=$r,u=Hr;l=(u&~(1<<32-ut(u)-1)).toString(32)+l,i="_"+i+"R_"+l,l=uc++,0<\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof u.is=="string"?A.createElement("select",{is:u.is}):A.createElement("select"),u.multiple?v.multiple=!0:u.size&&(v.size=u.size);break;default:v=typeof u.is=="string"?A.createElement(b,{is:u.is}):A.createElement(b)}}v[Ut]=i,v[mn]=u;e:for(A=i.child;A!==null;){if(A.tag===5||A.tag===6)v.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===i)break e;for(;A.sibling===null;){if(A.return===null||A.return===i)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}i.stateNode=v;e:switch(_n(v,b,u),b){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&ci(i)}}return jt(i),vf(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,l),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==u&&ci(i);else{if(typeof u!="string"&&i.stateNode===null)throw Error(a(166));if(n=Q.current,ds(i)){if(n=i.stateNode,l=i.memoizedProps,u=null,b=xn,b!==null)switch(b.tag){case 27:case 5:u=b.memoizedProps}n[Ut]=i,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||d0(n.nodeValue,l)),n||Ii(i,!0)}else n=zc(n).createTextNode(u),n[Ut]=i,i.stateNode=n}return jt(i),null;case 31:if(l=i.memoizedState,n===null||n.memoizedState!==null){if(u=ds(i),l!==null){if(n===null){if(!u)throw Error(a(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Ut]=i}else Na(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;jt(i),n=!1}else l=Ad(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return i.flags&256?(Wn(i),i):(Wn(i),null);if((i.flags&128)!==0)throw Error(a(558))}return jt(i),null;case 13:if(u=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(b=ds(i),u!==null&&u.dehydrated!==null){if(n===null){if(!b)throw Error(a(318));if(b=i.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(a(317));b[Ut]=i}else Na(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;jt(i),b=!1}else b=Ad(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=b),b=!0;if(!b)return i.flags&256?(Wn(i),i):(Wn(i),null)}return Wn(i),(i.flags&128)!==0?(i.lanes=l,i):(l=u!==null,n=n!==null&&n.memoizedState!==null,l&&(u=i.child,b=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(b=u.alternate.memoizedState.cachePool.pool),v=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),v!==b&&(u.flags|=2048)),l!==n&&l&&(i.child.flags|=8192),_c(i,i.updateQueue),jt(i),null);case 4:return te(),n===null&&qf(i.stateNode.containerInfo),jt(i),null;case 10:return ai(i.type),jt(i),null;case 19:if(Y(Zt),u=i.memoizedState,u===null)return jt(i),null;if(b=(i.flags&128)!==0,v=u.rendering,v===null)if(b)Al(u,!1);else{if(Vt!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(v=oc(n),v!==null){for(i.flags|=128,Al(u,!1),n=v.updateQueue,i.updateQueue=n,_c(i,n),i.subtreeFlags=0,n=l,l=i.child;l!==null;)Pg(l,n),l=l.sibling;return L(Zt,Zt.current&1|2),lt&&ri(i,u.treeForkCount),i.child}n=n.sibling}u.tail!==null&&ct()>kc&&(i.flags|=128,b=!0,Al(u,!1),i.lanes=4194304)}else{if(!b)if(n=oc(v),n!==null){if(i.flags|=128,b=!0,n=n.updateQueue,i.updateQueue=n,_c(i,n),Al(u,!0),u.tail===null&&u.tailMode==="hidden"&&!v.alternate&&!lt)return jt(i),null}else 2*ct()-u.renderingStartTime>kc&&l!==536870912&&(i.flags|=128,b=!0,Al(u,!1),i.lanes=4194304);u.isBackwards?(v.sibling=i.child,i.child=v):(n=u.last,n!==null?n.sibling=v:i.child=v,u.last=v)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=ct(),n.sibling=null,l=Zt.current,L(Zt,b?l&1|2:l&1),lt&&ri(i,u.treeForkCount),n):(jt(i),null);case 22:case 23:return Wn(i),qd(),u=i.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(i.flags|=8192):u&&(i.flags|=8192),u?(l&536870912)!==0&&(i.flags&128)===0&&(jt(i),i.subtreeFlags&6&&(i.flags|=8192)):jt(i),l=i.updateQueue,l!==null&&_c(i,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==l&&(i.flags|=2048),n!==null&&Y(Ta),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),ai(en),jt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function g2(n,i){switch(Td(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return ai(en),te(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return fe(i),null;case 31:if(i.memoizedState!==null){if(Wn(i),i.alternate===null)throw Error(a(340));Na()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(Wn(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Na()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return Y(Zt),null;case 4:return te(),null;case 10:return ai(i.type),null;case 22:case 23:return Wn(i),qd(),n!==null&&Y(Ta),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return ai(en),null;case 25:return null;default:return null}}function gx(n,i){switch(Td(i),i.tag){case 3:ai(en),te();break;case 26:case 27:case 5:fe(i);break;case 4:te();break;case 31:i.memoizedState!==null&&Wn(i);break;case 13:Wn(i);break;case 19:Y(Zt);break;case 10:ai(i.type);break;case 22:case 23:Wn(i),qd(),n!==null&&Y(Ta);break;case 24:ai(en)}}function Ml(n,i){try{var l=i.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var b=u.next;l=b;do{if((l.tag&n)===n){u=void 0;var v=l.create,A=l.inst;u=v(),A.destroy=u}l=l.next}while(l!==b)}}catch(F){yt(i,i.return,F)}}function Fi(n,i,l){try{var u=i.updateQueue,b=u!==null?u.lastEffect:null;if(b!==null){var v=b.next;u=v;do{if((u.tag&n)===n){var A=u.inst,F=A.destroy;if(F!==void 0){A.destroy=void 0,b=i;var ne=l,le=F;try{le()}catch(he){yt(b,ne,he)}}}u=u.next}while(u!==v)}}catch(he){yt(i,i.return,he)}}function bx(n){var i=n.updateQueue;if(i!==null){var l=n.stateNode;try{lb(i,l)}catch(u){yt(n,n.return,u)}}}function xx(n,i,l){l.props=Ra(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){yt(n,i,u)}}function Ol(n,i){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof l=="function"?n.refCleanup=l(u):l.current=u}}catch(b){yt(n,i,b)}}function qr(n,i){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(b){yt(n,i,b)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(b){yt(n,i,b)}else l.current=null}function yx(n){var i=n.type,l=n.memoizedProps,u=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(b){yt(n,n.return,b)}}function _f(n,i,l){try{var u=n.stateNode;B2(u,n.type,l,i),u[mn]=i}catch(b){yt(n,n.return,b)}}function vx(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Qi(n.type)||n.tag===4}function wf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||vx(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Qi(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Ef(n,i,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,i?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,i):(i=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,i.appendChild(n),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=_e));else if(u!==4&&(u===27&&Qi(n.type)&&(l=n.stateNode,i=null),n=n.child,n!==null))for(Ef(n,i,l),n=n.sibling;n!==null;)Ef(n,i,l),n=n.sibling}function wc(n,i,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,i?l.insertBefore(n,i):l.appendChild(n);else if(u!==4&&(u===27&&Qi(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(wc(n,i,l),n=n.sibling;n!==null;)wc(n,i,l),n=n.sibling}function _x(n){var i=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,b=i.attributes;b.length;)i.removeAttributeNode(b[0]);_n(i,u,l),i[Ut]=n,i[mn]=l}catch(v){yt(n,n.return,v)}}var ui=!1,rn=!1,Nf=!1,wx=typeof WeakSet=="function"?WeakSet:Set,gn=null;function b2(n,i){if(n=n.containerInfo,Gf=Pc,n=jg(n),gd(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var b=u.anchorOffset,v=u.focusNode;u=u.focusOffset;try{l.nodeType,v.nodeType}catch{l=null;break e}var A=0,F=-1,ne=-1,le=0,he=0,ge=n,oe=null;t:for(;;){for(var de;ge!==l||b!==0&&ge.nodeType!==3||(F=A+b),ge!==v||u!==0&&ge.nodeType!==3||(ne=A+u),ge.nodeType===3&&(A+=ge.nodeValue.length),(de=ge.firstChild)!==null;)oe=ge,ge=de;for(;;){if(ge===n)break t;if(oe===l&&++le===b&&(F=A),oe===v&&++he===u&&(ne=A),(de=ge.nextSibling)!==null)break;ge=oe,oe=ge.parentNode}ge=de}l=F===-1||ne===-1?null:{start:F,end:ne}}else l=null}l=l||{start:0,end:0}}else l=null;for(Vf={focusedElem:n,selectionRange:l},Pc=!1,gn=i;gn!==null;)if(i=gn,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,gn=n;else for(;gn!==null;){switch(i=gn,v=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l title"))),_n(v,u,l),v[Ut]=n,Ft(v),u=v;break e;case"link":var A=C0("link","href",b).get(u+(l.href||""));if(A){for(var F=0;FNt&&(A=Nt,Nt=He,He=A);var ae=Rg(F,He),ie=Rg(F,Nt);if(ae&&ie&&(de.rangeCount!==1||de.anchorNode!==ae.node||de.anchorOffset!==ae.offset||de.focusNode!==ie.node||de.focusOffset!==ie.offset)){var se=ge.createRange();se.setStart(ae.node,ae.offset),de.removeAllRanges(),He>Nt?(de.addRange(se),de.extend(ie.node,ie.offset)):(se.setEnd(ie.node,ie.offset),de.addRange(se))}}}}for(ge=[],de=F;de=de.parentNode;)de.nodeType===1&&ge.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof F.focus=="function"&&F.focus(),F=0;Fl?32:l,O.T=null,l=Of,Of=null;var v=Xi,A=pi;if(dn=0,Ss=Xi=null,pi=0,(pt&6)!==0)throw Error(a(331));var F=pt;if(pt|=4,Dx(v.current),Mx(v,v.current,A,l),pt=F,Il(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(Kt,v)}catch{}return!0}finally{H.p=b,O.T=u,Qx(n,i)}}function Jx(n,i,l){i=ur(l,i),i=uf(n.stateNode,i,2),n=$i(n,i,2),n!==null&&(gt(n,2),Pr(n))}function yt(n,i,l){if(n.tag===3)Jx(n,n,l);else for(;i!==null;){if(i.tag===3){Jx(i,n,l);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Yi===null||!Yi.has(u))){n=ur(l,n),l=ex(2),u=$i(i,l,2),u!==null&&(tx(l,u,i,n),gt(u,2),Pr(u));break}}i=i.return}}function Lf(n,i,l){var u=n.pingCache;if(u===null){u=n.pingCache=new v2;var b=new Set;u.set(i,b)}else b=u.get(i),b===void 0&&(b=new Set,u.set(i,b));b.has(l)||(Tf=!0,b.add(l),n=S2.bind(null,n,i,l),i.then(n,n))}function S2(n,i,l){var u=n.pingCache;u!==null&&u.delete(i),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,kt===n&&(it&l)===l&&(Vt===4||Vt===3&&(it&62914560)===it&&300>ct()-Sc?(pt&2)===0&&ks(n,0):Cf|=l,Ns===it&&(Ns=0)),Pr(n)}function e0(n,i){i===0&&(i=Pe()),n=wa(n,i),n!==null&&(gt(n,i),Pr(n))}function k2(n){var i=n.memoizedState,l=0;i!==null&&(l=i.retryLane),e0(n,l)}function T2(n,i){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,b=n.memoizedState;b!==null&&(l=b.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(i),e0(n,l)}function C2(n,i){return Pt(n,i)}var Rc=null,Cs=null,zf=!1,Dc=!1,If=!1,Zi=0;function Pr(n){n!==Cs&&n.next===null&&(Cs===null?Rc=Cs=n:Cs=Cs.next=n),Dc=!0,zf||(zf=!0,M2())}function Il(n,i){if(!If&&Dc){If=!0;do for(var l=!1,u=Rc;u!==null;){if(n!==0){var b=u.pendingLanes;if(b===0)var v=0;else{var A=u.suspendedLanes,F=u.pingedLanes;v=(1<<31-ut(42|n)+1)-1,v&=b&~(A&~F),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(l=!0,i0(u,v))}else v=it,v=re(u,u===kt?v:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(v&3)===0||me(u,v)||(l=!0,i0(u,v));u=u.next}while(l);If=!1}}function A2(){t0()}function t0(){Dc=zf=!1;var n=0;Zi!==0&&H2()&&(n=Zi);for(var i=ct(),l=null,u=Rc;u!==null;){var b=u.next,v=n0(u,i);v===0?(u.next=null,l===null?Rc=b:l.next=b,b===null&&(Cs=l)):(l=u,(n!==0||(v&3)!==0)&&(Dc=!0)),u=b}dn!==0&&dn!==5||Il(n),Zi!==0&&(Zi=0)}function n0(n,i){for(var l=n.suspendedLanes,u=n.pingedLanes,b=n.expirationTimes,v=n.pendingLanes&-62914561;0F)break;var he=ne.transferSize,ge=ne.initiatorType;he&&f0(ge)&&(ne=ne.responseEnd,A+=he*(ne"u"?null:document;function N0(n,i,l){var u=As;if(u&&typeof i=="string"&&i){var b=kn(i);b='link[rel="'+n+'"][href="'+b+'"]',typeof l=="string"&&(b+='[crossorigin="'+l+'"]'),E0.has(b)||(E0.add(b),n={rel:n,crossOrigin:l,href:i},u.querySelector(b)===null&&(i=u.createElement("link"),_n(i,"link",n),Ft(i),u.head.appendChild(i)))}}function K2(n){gi.D(n),N0("dns-prefetch",n,null)}function Z2(n,i){gi.C(n,i),N0("preconnect",n,i)}function Q2(n,i,l){gi.L(n,i,l);var u=As;if(u&&n&&i){var b='link[rel="preload"][as="'+kn(i)+'"]';i==="image"&&l&&l.imageSrcSet?(b+='[imagesrcset="'+kn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(b+='[imagesizes="'+kn(l.imageSizes)+'"]')):b+='[href="'+kn(n)+'"]';var v=b;switch(i){case"style":v=Ms(n);break;case"script":v=Os(n)}gr.has(v)||(n=p({rel:"preload",href:i==="image"&&l&&l.imageSrcSet?void 0:n,as:i},l),gr.set(v,n),u.querySelector(b)!==null||i==="style"&&u.querySelector($l(v))||i==="script"&&u.querySelector(ql(v))||(i=u.createElement("link"),_n(i,"link",n),Ft(i),u.head.appendChild(i)))}}function W2(n,i){gi.m(n,i);var l=As;if(l&&n){var u=i&&typeof i.as=="string"?i.as:"script",b='link[rel="modulepreload"][as="'+kn(u)+'"][href="'+kn(n)+'"]',v=b;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Os(n)}if(!gr.has(v)&&(n=p({rel:"modulepreload",href:n},i),gr.set(v,n),l.querySelector(b)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ql(v)))return}u=l.createElement("link"),_n(u,"link",n),Ft(u),l.head.appendChild(u)}}}function J2(n,i,l){gi.S(n,i,l);var u=As;if(u&&n){var b=Br(u).hoistableStyles,v=Ms(n);i=i||"default";var A=b.get(v);if(!A){var F={loading:0,preload:null};if(A=u.querySelector($l(v)))F.loading=5;else{n=p({rel:"stylesheet",href:n,"data-precedence":i},l),(l=gr.get(v))&&Jf(n,l);var ne=A=u.createElement("link");Ft(ne),_n(ne,"link",n),ne._p=new Promise(function(le,he){ne.onload=le,ne.onerror=he}),ne.addEventListener("load",function(){F.loading|=1}),ne.addEventListener("error",function(){F.loading|=2}),F.loading|=4,Bc(A,i,u)}A={type:"stylesheet",instance:A,count:1,state:F},b.set(v,A)}}}function ek(n,i){gi.X(n,i);var l=As;if(l&&n){var u=Br(l).hoistableScripts,b=Os(n),v=u.get(b);v||(v=l.querySelector(ql(b)),v||(n=p({src:n,async:!0},i),(i=gr.get(b))&&eh(n,i),v=l.createElement("script"),Ft(v),_n(v,"link",n),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(b,v))}}function tk(n,i){gi.M(n,i);var l=As;if(l&&n){var u=Br(l).hoistableScripts,b=Os(n),v=u.get(b);v||(v=l.querySelector(ql(b)),v||(n=p({src:n,async:!0,type:"module"},i),(i=gr.get(b))&&eh(n,i),v=l.createElement("script"),Ft(v),_n(v,"link",n),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(b,v))}}function S0(n,i,l,u){var b=(b=Q.current)?Ic(b):null;if(!b)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(i=Ms(l.href),l=Br(b).hoistableStyles,u=l.get(i),u||(u={type:"style",instance:null,count:0,state:null},l.set(i,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=Ms(l.href);var v=Br(b).hoistableStyles,A=v.get(n);if(A||(b=b.ownerDocument||b,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(n,A),(v=b.querySelector($l(n)))&&!v._p&&(A.instance=v,A.state.loading=5),gr.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},gr.set(n,l),v||nk(b,n,l,A.state))),i&&u===null)throw Error(a(528,""));return A}if(i&&u!==null)throw Error(a(529,""));return null;case"script":return i=l.async,l=l.src,typeof l=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Os(l),l=Br(b).hoistableScripts,u=l.get(i),u||(u={type:"script",instance:null,count:0,state:null},l.set(i,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Ms(n){return'href="'+kn(n)+'"'}function $l(n){return'link[rel="stylesheet"]['+n+"]"}function k0(n){return p({},n,{"data-precedence":n.precedence,precedence:null})}function nk(n,i,l,u){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?u.loading=1:(i=n.createElement("link"),u.preload=i,i.addEventListener("load",function(){return u.loading|=1}),i.addEventListener("error",function(){return u.loading|=2}),_n(i,"link",l),Ft(i),n.head.appendChild(i))}function Os(n){return'[src="'+kn(n)+'"]'}function ql(n){return"script[async]"+n}function T0(n,i,l){if(i.count++,i.instance===null)switch(i.type){case"style":var u=n.querySelector('style[data-href~="'+kn(l.href)+'"]');if(u)return i.instance=u,Ft(u),u;var b=p({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Ft(u),_n(u,"style",b),Bc(u,l.precedence,n),i.instance=u;case"stylesheet":b=Ms(l.href);var v=n.querySelector($l(b));if(v)return i.state.loading|=4,i.instance=v,Ft(v),v;u=k0(l),(b=gr.get(b))&&Jf(u,b),v=(n.ownerDocument||n).createElement("link"),Ft(v);var A=v;return A._p=new Promise(function(F,ne){A.onload=F,A.onerror=ne}),_n(v,"link",u),i.state.loading|=4,Bc(v,l.precedence,n),i.instance=v;case"script":return v=Os(l.src),(b=n.querySelector(ql(v)))?(i.instance=b,Ft(b),b):(u=l,(b=gr.get(v))&&(u=p({},l),eh(u,b)),n=n.ownerDocument||n,b=n.createElement("script"),Ft(b),_n(b,"link",u),n.head.appendChild(b),i.instance=b);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(u=i.instance,i.state.loading|=4,Bc(u,l.precedence,n));return i.instance}function Bc(n,i,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=u.length?u[u.length-1]:null,v=b,A=0;A title"):null)}function rk(n,i,l){if(l===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return n=i.disabled,typeof i.precedence=="string"&&n==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function M0(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function ik(n,i,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var b=Ms(u.href),v=i.querySelector($l(b));if(v){i=v._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Hc.bind(n),i.then(n,n)),l.state.loading|=4,l.instance=v,Ft(v);return}v=i.ownerDocument||i,u=k0(u),(b=gr.get(b))&&Jf(u,b),v=v.createElement("link"),Ft(v);var A=v;A._p=new Promise(function(F,ne){A.onload=F,A.onerror=ne}),_n(v,"link",u),l.instance=v}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,i),(i=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=Hc.bind(n),i.addEventListener("load",l),i.addEventListener("error",l))}}var th=0;function ak(n,i){return n.stylesheets&&n.count===0&&qc(n,n.stylesheets),0th?50:800)+i);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(b)}}:null}function Hc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var $c=null;function qc(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,$c=new Map,i.forEach(sk,n),$c=null,Hc.call(n))}function sk(n,i){if(!(i.state.loading&4)){var l=$c.get(n);if(l)var u=l.get(null);else{l=new Map,$c.set(n,l);for(var b=n.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),uh.exports=_k(),uh.exports}var Ek=wk();/** +`+u.stack}}var Yt=Object.prototype.hasOwnProperty,Pt=e.unstable_scheduleCallback,Xt=e.unstable_cancelCallback,Yn=e.unstable_shouldYield,Nn=e.unstable_requestPaint,ct=e.unstable_now,It=e.unstable_getCurrentPriorityLevel,ue=e.unstable_ImmediatePriority,xe=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,Fe=e.unstable_LowPriority,Ze=e.unstable_IdlePriority,on=e.log,Sn=e.unstable_setDisableYieldValue,Kt=null,At=null;function Wt(n){if(typeof on=="function"&&Sn(n),At&&typeof At.setStrictMode=="function")try{At.setStrictMode(Kt,n)}catch{}}var ut=Math.clz32?Math.clz32:Ni,In=Math.log,cn=Math.LN2;function Ni(n){return n>>>=0,n===0?32:31-(In(n)/cn|0)|0}var nt=256,Xn=262144,On=4194304;function hn(n){var i=n&42;if(i!==0)return i;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function re(n,i,l){var u=n.pendingLanes;if(u===0)return 0;var b=0,v=n.suspendedLanes,A=n.pingedLanes;n=n.warmLanes;var F=u&134217727;return F!==0?(u=F&~v,u!==0?b=hn(u):(A&=F,A!==0?b=hn(A):l||(l=F&~n,l!==0&&(b=hn(l))))):(F=u&~v,F!==0?b=hn(F):A!==0?b=hn(A):l||(l=u&~n,l!==0&&(b=hn(l)))),b===0?0:i!==0&&i!==b&&(i&v)===0&&(v=b&-b,l=i&-i,v>=l||v===32&&(l&4194048)!==0)?i:b}function me(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function Ee(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 Pe(){var n=On;return On<<=1,(On&62914560)===0&&(On=4194304),n}function St(n){for(var i=[],l=0;31>l;l++)i.push(n);return i}function gt(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Ae(n,i,l,u,b,v){var A=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var F=n.entanglements,ne=n.expirationTimes,le=n.hiddenUpdates;for(l=A&~l;0"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var ns=/[\n"\\]/g;function Cn(n){return n.replace(ns,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function ba(n,i,l,u,b,v,A,F){n.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?n.type=A:n.removeAttribute("type"),i!=null?A==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+_t(i)):n.value!==""+_t(i)&&(n.value=""+_t(i)):A!=="submit"&&A!=="reset"||n.removeAttribute("value"),i!=null?Oi(n,A,_t(i)):l!=null?Oi(n,A,_t(l)):u!=null&&n.removeAttribute("value"),b==null&&v!=null&&(n.defaultChecked=!!v),b!=null&&(n.checked=b&&typeof b!="function"&&typeof b!="symbol"),F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?n.name=""+_t(F):n.removeAttribute("name")}function Er(n,i,l,u,b,v,A,F){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.type=v),i!=null||l!=null){if(!(v!=="submit"&&v!=="reset"||i!=null)){Ai(n);return}l=l!=null?""+_t(l):"",i=i!=null?""+_t(i):l,F||i===n.value||(n.value=i),n.defaultValue=i}u=u??b,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=F?n.checked:!!u,n.defaultChecked=!!u,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(n.name=A),Ai(n)}function Oi(n,i,l){i==="number"&&Mi(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function un(n,i,l,u){if(n=n.options,i){i={};for(var b=0;b"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ld=!1;if(ti)try{var ll={};Object.defineProperty(ll,"passive",{get:function(){ld=!0}}),window.addEventListener("test",ll,ll),window.removeEventListener("test",ll,ll)}catch{ld=!1}var ji=null,od=null,qo=null;function mg(){if(qo)return qo;var n,i=od,l=i.length,u,b="value"in ji?ji.value:ji.textContent,v=b.length;for(n=0;n=ul),vg=" ",_g=!1;function wg(n,i){switch(n){case"keyup":return BS.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var is=!1;function HS(n,i){switch(n){case"compositionend":return Eg(i);case"keypress":return i.which!==32?null:(_g=!0,vg);case"textInput":return n=i.data,n===vg&&_g?null:n;default:return null}}function $S(n,i){if(is)return n==="compositionend"||!hd&&wg(n,i)?(n=mg(),qo=od=ji=null,is=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:l,offset:i-n};n=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Og(l)}}function Dg(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?Dg(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function jg(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=Mi(n.document);i instanceof n.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)n=i.contentWindow;else break;i=Mi(n.document)}return i}function gd(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var KS=ti&&"documentMode"in document&&11>=document.documentMode,as=null,bd=null,ml=null,xd=!1;function Lg(n,i,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;xd||as==null||as!==Mi(u)||(u=as,"selectionStart"in u&&gd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),ml&&hl(ml,u)||(ml=u,u=Lc(bd,"onSelect"),0>=A,b-=A,Hr=1<<32-ut(i)+b|l<Ke?(at=De,De=null):at=De.sibling;var mt=oe(ae,De,se[Ke],pe);if(mt===null){De===null&&(De=at);break}n&&De&&mt.alternate===null&&i(ae,De),ie=v(mt,ie,Ke),ht===null?Ie=mt:ht.sibling=mt,ht=mt,De=at}if(Ke===se.length)return l(ae,De),lt&&ri(ae,Ke),Ie;if(De===null){for(;KeKe?(at=De,De=null):at=De.sibling;var na=oe(ae,De,mt.value,pe);if(na===null){De===null&&(De=at);break}n&&De&&na.alternate===null&&i(ae,De),ie=v(na,ie,Ke),ht===null?Ie=na:ht.sibling=na,ht=na,De=at}if(mt.done)return l(ae,De),lt&&ri(ae,Ke),Ie;if(De===null){for(;!mt.done;Ke++,mt=se.next())mt=ge(ae,mt.value,pe),mt!==null&&(ie=v(mt,ie,Ke),ht===null?Ie=mt:ht.sibling=mt,ht=mt);return lt&&ri(ae,Ke),Ie}for(De=u(De);!mt.done;Ke++,mt=se.next())mt=de(De,ae,Ke,mt.value,pe),mt!==null&&(n&&mt.alternate!==null&&De.delete(mt.key===null?Ke:mt.key),ie=v(mt,ie,Ke),ht===null?Ie=mt:ht.sibling=mt,ht=mt);return n&&De.forEach(function(pk){return i(ae,pk)}),lt&&ri(ae,Ke),Ie}function Nt(ae,ie,se,pe){if(typeof se=="object"&&se!==null&&se.type===N&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case x:e:{for(var Ie=se.key;ie!==null;){if(ie.key===Ie){if(Ie=se.type,Ie===N){if(ie.tag===7){l(ae,ie.sibling),pe=b(ie,se.props.children),pe.return=ae,ae=pe;break e}}else if(ie.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===B&&Ta(Ie)===ie.type){l(ae,ie.sibling),pe=b(ie,se.props),vl(pe,se),pe.return=ae,ae=pe;break e}l(ae,ie);break}else i(ae,ie);ie=ie.sibling}se.type===N?(pe=Ea(se.props.children,ae.mode,pe,se.key),pe.return=ae,ae=pe):(pe=Wo(se.type,se.key,se.props,null,ae.mode,pe),vl(pe,se),pe.return=ae,ae=pe)}return A(ae);case _:e:{for(Ie=se.key;ie!==null;){if(ie.key===Ie)if(ie.tag===4&&ie.stateNode.containerInfo===se.containerInfo&&ie.stateNode.implementation===se.implementation){l(ae,ie.sibling),pe=b(ie,se.children||[]),pe.return=ae,ae=pe;break e}else{l(ae,ie);break}else i(ae,ie);ie=ie.sibling}pe=Sd(se,ae.mode,pe),pe.return=ae,ae=pe}return A(ae);case B:return se=Ta(se),Nt(ae,ie,se,pe)}if($(se))return Te(ae,ie,se,pe);if(V(se)){if(Ie=V(se),typeof Ie!="function")throw Error(a(150));return se=Ie.call(se),He(ae,ie,se,pe)}if(typeof se.then=="function")return Nt(ae,ie,ac(se),pe);if(se.$$typeof===E)return Nt(ae,ie,tc(ae,se),pe);sc(ae,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,ie!==null&&ie.tag===6?(l(ae,ie.sibling),pe=b(ie,se),pe.return=ae,ae=pe):(l(ae,ie),pe=Nd(se,ae.mode,pe),pe.return=ae,ae=pe),A(ae)):l(ae,ie)}return function(ae,ie,se,pe){try{yl=0;var Ie=Nt(ae,ie,se,pe);return gs=null,Ie}catch(De){if(De===ps||De===rc)throw De;var ht=Zn(29,De,null,ae.mode);return ht.lanes=pe,ht.return=ae,ht}finally{}}}var Ma=ib(!0),ab=ib(!1),Ui=!1;function Id(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bd(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Hi(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function $i(n,i,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(pt&2)!==0){var b=u.pending;return b===null?i.next=i:(i.next=b.next,b.next=i),u.pending=i,i=Qo(n),qg(n,null,l),i}return Zo(n,u,i,l),Qo(n)}function _l(n,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194048)!==0)){var u=i.lanes;u&=n.pendingLanes,l|=u,i.lanes=l,Ue(n,l)}}function Ud(n,i){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var b=null,v=null;if(l=l.firstBaseUpdate,l!==null){do{var A={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};v===null?b=v=A:v=v.next=A,l=l.next}while(l!==null);v===null?b=v=i:v=v.next=i}else b=v=i;l={baseState:u.baseState,firstBaseUpdate:b,lastBaseUpdate:v,shared:u.shared,callbacks:u.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=i:n.next=i,l.lastBaseUpdate=i}var Hd=!1;function wl(){if(Hd){var n=ms;if(n!==null)throw n}}function El(n,i,l,u){Hd=!1;var b=n.updateQueue;Ui=!1;var v=b.firstBaseUpdate,A=b.lastBaseUpdate,F=b.shared.pending;if(F!==null){b.shared.pending=null;var ne=F,le=ne.next;ne.next=null,A===null?v=le:A.next=le,A=ne;var he=n.alternate;he!==null&&(he=he.updateQueue,F=he.lastBaseUpdate,F!==A&&(F===null?he.firstBaseUpdate=le:F.next=le,he.lastBaseUpdate=ne))}if(v!==null){var ge=b.baseState;A=0,he=le=ne=null,F=v;do{var oe=F.lane&-536870913,de=oe!==F.lane;if(de?(it&oe)===oe:(u&oe)===oe){oe!==0&&oe===hs&&(Hd=!0),he!==null&&(he=he.next={lane:0,tag:F.tag,payload:F.payload,callback:null,next:null});e:{var Te=n,He=F;oe=i;var Nt=l;switch(He.tag){case 1:if(Te=He.payload,typeof Te=="function"){ge=Te.call(Nt,ge,oe);break e}ge=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=He.payload,oe=typeof Te=="function"?Te.call(Nt,ge,oe):Te,oe==null)break e;ge=p({},ge,oe);break e;case 2:Ui=!0}}oe=F.callback,oe!==null&&(n.flags|=64,de&&(n.flags|=8192),de=b.callbacks,de===null?b.callbacks=[oe]:de.push(oe))}else de={lane:oe,tag:F.tag,payload:F.payload,callback:F.callback,next:null},he===null?(le=he=de,ne=ge):he=he.next=de,A|=oe;if(F=F.next,F===null){if(F=b.shared.pending,F===null)break;de=F,F=de.next,de.next=null,b.lastBaseUpdate=de,b.shared.pending=null}}while(!0);he===null&&(ne=ge),b.baseState=ne,b.firstBaseUpdate=le,b.lastBaseUpdate=he,v===null&&(b.shared.lanes=0),Vi|=A,n.lanes=A,n.memoizedState=ge}}function sb(n,i){if(typeof n!="function")throw Error(a(191,n));n.call(i)}function lb(n,i){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;nv?v:8;var A=O.T,F={};O.T=F,sf(n,!1,i,l);try{var ne=b(),le=O.S;if(le!==null&&le(F,ne),ne!==null&&typeof ne=="object"&&typeof ne.then=="function"){var he=i2(ne,u);kl(n,i,he,tr(n))}else kl(n,i,u,tr(n))}catch(ge){kl(n,i,{then:function(){},status:"rejected",reason:ge},tr())}finally{H.p=v,A!==null&&F.types!==null&&(A.types=F.types),O.T=A}}function u2(){}function rf(n,i,l,u){if(n.tag!==5)throw Error(a(476));var b=Ub(n).queue;Bb(n,b,i,X,l===null?u2:function(){return Hb(n),l(u)})}function Ub(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:li,lastRenderedState:X},next:null};var l={};return i.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:li,lastRenderedState:l},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function Hb(n){var i=Ub(n);i.next===null&&(i=n.alternate.memoizedState),kl(n,i.next.queue,{},tr())}function af(){return yn(Pl)}function $b(){return Qt().memoizedState}function qb(){return Qt().memoizedState}function d2(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var l=tr();n=Hi(l);var u=$i(i,n,l);u!==null&&(Pn(u,i,l),_l(u,i,l)),i={cache:Dd()},n.payload=i;return}i=i.return}}function f2(n,i,l){var u=tr();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},gc(n)?Fb(i,l):(l=wd(n,i,l,u),l!==null&&(Pn(l,n,u),Gb(l,i,u)))}function Pb(n,i,l){var u=tr();kl(n,i,l,u)}function kl(n,i,l,u){var b={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(gc(n))Fb(i,b);else{var v=n.alternate;if(n.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var A=i.lastRenderedState,F=v(A,l);if(b.hasEagerState=!0,b.eagerState=F,Kn(F,A))return Zo(n,i,b,0),kt===null&&Ko(),!1}catch{}finally{}if(l=wd(n,i,b,u),l!==null)return Pn(l,n,u),Gb(l,i,u),!0}return!1}function sf(n,i,l,u){if(u={lane:2,revertLane:Bf(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},gc(n)){if(i)throw Error(a(479))}else i=wd(n,l,u,2),i!==null&&Pn(i,n,2)}function gc(n){var i=n.alternate;return n===Xe||i!==null&&i===Xe}function Fb(n,i){xs=cc=!0;var l=n.pending;l===null?i.next=i:(i.next=l.next,l.next=i),n.pending=i}function Gb(n,i,l){if((l&4194048)!==0){var u=i.lanes;u&=n.pendingLanes,l|=u,i.lanes=l,Ue(n,l)}}var Cl={readContext:yn,use:fc,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt,useHostTransitionStatus:Gt,useFormState:Gt,useActionState:Gt,useOptimistic:Gt,useMemoCache:Gt,useCacheRefresh:Gt};Cl.useEffectEvent=Gt;var Vb={readContext:yn,use:fc,useCallback:function(n,i){return jn().memoizedState=[n,i===void 0?null:i],n},useContext:yn,useEffect:Ab,useImperativeHandle:function(n,i,l){l=l!=null?l.concat([n]):null,mc(4194308,4,Db.bind(null,i,n),l)},useLayoutEffect:function(n,i){return mc(4194308,4,n,i)},useInsertionEffect:function(n,i){mc(4,2,n,i)},useMemo:function(n,i){var l=jn();i=i===void 0?null:i;var u=n();if(Oa){Wt(!0);try{n()}finally{Wt(!1)}}return l.memoizedState=[u,i],u},useReducer:function(n,i,l){var u=jn();if(l!==void 0){var b=l(i);if(Oa){Wt(!0);try{l(i)}finally{Wt(!1)}}}else b=i;return u.memoizedState=u.baseState=b,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:b},u.queue=n,n=n.dispatch=f2.bind(null,Xe,n),[u.memoizedState,n]},useRef:function(n){var i=jn();return n={current:n},i.memoizedState=n},useState:function(n){n=Wd(n);var i=n.queue,l=Pb.bind(null,Xe,i);return i.dispatch=l,[n.memoizedState,l]},useDebugValue:tf,useDeferredValue:function(n,i){var l=jn();return nf(l,n,i)},useTransition:function(){var n=Wd(!1);return n=Bb.bind(null,Xe,n.queue,!0,!1),jn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,l){var u=Xe,b=jn();if(lt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=i(),kt===null)throw Error(a(349));(it&127)!==0||hb(u,i,l)}b.memoizedState=l;var v={value:l,getSnapshot:i};return b.queue=v,Ab(pb.bind(null,u,v,n),[n]),u.flags|=2048,vs(9,{destroy:void 0},mb.bind(null,u,v,l,i),null),l},useId:function(){var n=jn(),i=kt.identifierPrefix;if(lt){var l=$r,u=Hr;l=(u&~(1<<32-ut(u)-1)).toString(32)+l,i="_"+i+"R_"+l,l=uc++,0<\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof u.is=="string"?A.createElement("select",{is:u.is}):A.createElement("select"),u.multiple?v.multiple=!0:u.size&&(v.size=u.size);break;default:v=typeof u.is=="string"?A.createElement(b,{is:u.is}):A.createElement(b)}}v[Ut]=i,v[mn]=u;e:for(A=i.child;A!==null;){if(A.tag===5||A.tag===6)v.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===i)break e;for(;A.sibling===null;){if(A.return===null||A.return===i)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}i.stateNode=v;e:switch(_n(v,b,u),b){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&ci(i)}}return jt(i),vf(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,l),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==u&&ci(i);else{if(typeof u!="string"&&i.stateNode===null)throw Error(a(166));if(n=Q.current,ds(i)){if(n=i.stateNode,l=i.memoizedProps,u=null,b=xn,b!==null)switch(b.tag){case 27:case 5:u=b.memoizedProps}n[Ut]=i,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||d0(n.nodeValue,l)),n||Ii(i,!0)}else n=zc(n).createTextNode(u),n[Ut]=i,i.stateNode=n}return jt(i),null;case 31:if(l=i.memoizedState,n===null||n.memoizedState!==null){if(u=ds(i),l!==null){if(n===null){if(!u)throw Error(a(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Ut]=i}else Na(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;jt(i),n=!1}else l=Ad(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return i.flags&256?(Wn(i),i):(Wn(i),null);if((i.flags&128)!==0)throw Error(a(558))}return jt(i),null;case 13:if(u=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(b=ds(i),u!==null&&u.dehydrated!==null){if(n===null){if(!b)throw Error(a(318));if(b=i.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(a(317));b[Ut]=i}else Na(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;jt(i),b=!1}else b=Ad(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=b),b=!0;if(!b)return i.flags&256?(Wn(i),i):(Wn(i),null)}return Wn(i),(i.flags&128)!==0?(i.lanes=l,i):(l=u!==null,n=n!==null&&n.memoizedState!==null,l&&(u=i.child,b=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(b=u.alternate.memoizedState.cachePool.pool),v=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),v!==b&&(u.flags|=2048)),l!==n&&l&&(i.child.flags|=8192),_c(i,i.updateQueue),jt(i),null);case 4:return te(),n===null&&qf(i.stateNode.containerInfo),jt(i),null;case 10:return ai(i.type),jt(i),null;case 19:if(Y(Zt),u=i.memoizedState,u===null)return jt(i),null;if(b=(i.flags&128)!==0,v=u.rendering,v===null)if(b)Al(u,!1);else{if(Vt!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(v=oc(n),v!==null){for(i.flags|=128,Al(u,!1),n=v.updateQueue,i.updateQueue=n,_c(i,n),i.subtreeFlags=0,n=l,l=i.child;l!==null;)Pg(l,n),l=l.sibling;return L(Zt,Zt.current&1|2),lt&&ri(i,u.treeForkCount),i.child}n=n.sibling}u.tail!==null&&ct()>kc&&(i.flags|=128,b=!0,Al(u,!1),i.lanes=4194304)}else{if(!b)if(n=oc(v),n!==null){if(i.flags|=128,b=!0,n=n.updateQueue,i.updateQueue=n,_c(i,n),Al(u,!0),u.tail===null&&u.tailMode==="hidden"&&!v.alternate&&!lt)return jt(i),null}else 2*ct()-u.renderingStartTime>kc&&l!==536870912&&(i.flags|=128,b=!0,Al(u,!1),i.lanes=4194304);u.isBackwards?(v.sibling=i.child,i.child=v):(n=u.last,n!==null?n.sibling=v:i.child=v,u.last=v)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=ct(),n.sibling=null,l=Zt.current,L(Zt,b?l&1|2:l&1),lt&&ri(i,u.treeForkCount),n):(jt(i),null);case 22:case 23:return Wn(i),qd(),u=i.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(i.flags|=8192):u&&(i.flags|=8192),u?(l&536870912)!==0&&(i.flags&128)===0&&(jt(i),i.subtreeFlags&6&&(i.flags|=8192)):jt(i),l=i.updateQueue,l!==null&&_c(i,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==l&&(i.flags|=2048),n!==null&&Y(Ca),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),ai(en),jt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function b2(n,i){switch(Cd(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return ai(en),te(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return fe(i),null;case 31:if(i.memoizedState!==null){if(Wn(i),i.alternate===null)throw Error(a(340));Na()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(Wn(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Na()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return Y(Zt),null;case 4:return te(),null;case 10:return ai(i.type),null;case 22:case 23:return Wn(i),qd(),n!==null&&Y(Ca),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return ai(en),null;case 25:return null;default:return null}}function gx(n,i){switch(Cd(i),i.tag){case 3:ai(en),te();break;case 26:case 27:case 5:fe(i);break;case 4:te();break;case 31:i.memoizedState!==null&&Wn(i);break;case 13:Wn(i);break;case 19:Y(Zt);break;case 10:ai(i.type);break;case 22:case 23:Wn(i),qd(),n!==null&&Y(Ca);break;case 24:ai(en)}}function Ml(n,i){try{var l=i.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var b=u.next;l=b;do{if((l.tag&n)===n){u=void 0;var v=l.create,A=l.inst;u=v(),A.destroy=u}l=l.next}while(l!==b)}}catch(F){yt(i,i.return,F)}}function Fi(n,i,l){try{var u=i.updateQueue,b=u!==null?u.lastEffect:null;if(b!==null){var v=b.next;u=v;do{if((u.tag&n)===n){var A=u.inst,F=A.destroy;if(F!==void 0){A.destroy=void 0,b=i;var ne=l,le=F;try{le()}catch(he){yt(b,ne,he)}}}u=u.next}while(u!==v)}}catch(he){yt(i,i.return,he)}}function bx(n){var i=n.updateQueue;if(i!==null){var l=n.stateNode;try{lb(i,l)}catch(u){yt(n,n.return,u)}}}function xx(n,i,l){l.props=Ra(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){yt(n,i,u)}}function Ol(n,i){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof l=="function"?n.refCleanup=l(u):l.current=u}}catch(b){yt(n,i,b)}}function qr(n,i){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(b){yt(n,i,b)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(b){yt(n,i,b)}else l.current=null}function yx(n){var i=n.type,l=n.memoizedProps,u=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(b){yt(n,n.return,b)}}function _f(n,i,l){try{var u=n.stateNode;U2(u,n.type,l,i),u[mn]=i}catch(b){yt(n,n.return,b)}}function vx(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Qi(n.type)||n.tag===4}function wf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||vx(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Qi(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Ef(n,i,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,i?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,i):(i=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,i.appendChild(n),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=_e));else if(u!==4&&(u===27&&Qi(n.type)&&(l=n.stateNode,i=null),n=n.child,n!==null))for(Ef(n,i,l),n=n.sibling;n!==null;)Ef(n,i,l),n=n.sibling}function wc(n,i,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,i?l.insertBefore(n,i):l.appendChild(n);else if(u!==4&&(u===27&&Qi(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(wc(n,i,l),n=n.sibling;n!==null;)wc(n,i,l),n=n.sibling}function _x(n){var i=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,b=i.attributes;b.length;)i.removeAttributeNode(b[0]);_n(i,u,l),i[Ut]=n,i[mn]=l}catch(v){yt(n,n.return,v)}}var ui=!1,rn=!1,Nf=!1,wx=typeof WeakSet=="function"?WeakSet:Set,gn=null;function x2(n,i){if(n=n.containerInfo,Gf=Pc,n=jg(n),gd(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var b=u.anchorOffset,v=u.focusNode;u=u.focusOffset;try{l.nodeType,v.nodeType}catch{l=null;break e}var A=0,F=-1,ne=-1,le=0,he=0,ge=n,oe=null;t:for(;;){for(var de;ge!==l||b!==0&&ge.nodeType!==3||(F=A+b),ge!==v||u!==0&&ge.nodeType!==3||(ne=A+u),ge.nodeType===3&&(A+=ge.nodeValue.length),(de=ge.firstChild)!==null;)oe=ge,ge=de;for(;;){if(ge===n)break t;if(oe===l&&++le===b&&(F=A),oe===v&&++he===u&&(ne=A),(de=ge.nextSibling)!==null)break;ge=oe,oe=ge.parentNode}ge=de}l=F===-1||ne===-1?null:{start:F,end:ne}}else l=null}l=l||{start:0,end:0}}else l=null;for(Vf={focusedElem:n,selectionRange:l},Pc=!1,gn=i;gn!==null;)if(i=gn,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,gn=n;else for(;gn!==null;){switch(i=gn,v=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l title"))),_n(v,u,l),v[Ut]=n,Ft(v),u=v;break e;case"link":var A=T0("link","href",b).get(u+(l.href||""));if(A){for(var F=0;FNt&&(A=Nt,Nt=He,He=A);var ae=Rg(F,He),ie=Rg(F,Nt);if(ae&&ie&&(de.rangeCount!==1||de.anchorNode!==ae.node||de.anchorOffset!==ae.offset||de.focusNode!==ie.node||de.focusOffset!==ie.offset)){var se=ge.createRange();se.setStart(ae.node,ae.offset),de.removeAllRanges(),He>Nt?(de.addRange(se),de.extend(ie.node,ie.offset)):(se.setEnd(ie.node,ie.offset),de.addRange(se))}}}}for(ge=[],de=F;de=de.parentNode;)de.nodeType===1&&ge.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof F.focus=="function"&&F.focus(),F=0;Fl?32:l,O.T=null,l=Of,Of=null;var v=Xi,A=pi;if(dn=0,Ss=Xi=null,pi=0,(pt&6)!==0)throw Error(a(331));var F=pt;if(pt|=4,Dx(v.current),Mx(v,v.current,A,l),pt=F,Il(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(Kt,v)}catch{}return!0}finally{H.p=b,O.T=u,Qx(n,i)}}function Jx(n,i,l){i=ur(l,i),i=uf(n.stateNode,i,2),n=$i(n,i,2),n!==null&&(gt(n,2),Pr(n))}function yt(n,i,l){if(n.tag===3)Jx(n,n,l);else for(;i!==null;){if(i.tag===3){Jx(i,n,l);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Yi===null||!Yi.has(u))){n=ur(l,n),l=ex(2),u=$i(i,l,2),u!==null&&(tx(l,u,i,n),gt(u,2),Pr(u));break}}i=i.return}}function Lf(n,i,l){var u=n.pingCache;if(u===null){u=n.pingCache=new _2;var b=new Set;u.set(i,b)}else b=u.get(i),b===void 0&&(b=new Set,u.set(i,b));b.has(l)||(Cf=!0,b.add(l),n=k2.bind(null,n,i,l),i.then(n,n))}function k2(n,i,l){var u=n.pingCache;u!==null&&u.delete(i),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,kt===n&&(it&l)===l&&(Vt===4||Vt===3&&(it&62914560)===it&&300>ct()-Sc?(pt&2)===0&&ks(n,0):Tf|=l,Ns===it&&(Ns=0)),Pr(n)}function e0(n,i){i===0&&(i=Pe()),n=wa(n,i),n!==null&&(gt(n,i),Pr(n))}function C2(n){var i=n.memoizedState,l=0;i!==null&&(l=i.retryLane),e0(n,l)}function T2(n,i){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,b=n.memoizedState;b!==null&&(l=b.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(i),e0(n,l)}function A2(n,i){return Pt(n,i)}var Rc=null,Ts=null,zf=!1,Dc=!1,If=!1,Zi=0;function Pr(n){n!==Ts&&n.next===null&&(Ts===null?Rc=Ts=n:Ts=Ts.next=n),Dc=!0,zf||(zf=!0,O2())}function Il(n,i){if(!If&&Dc){If=!0;do for(var l=!1,u=Rc;u!==null;){if(n!==0){var b=u.pendingLanes;if(b===0)var v=0;else{var A=u.suspendedLanes,F=u.pingedLanes;v=(1<<31-ut(42|n)+1)-1,v&=b&~(A&~F),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(l=!0,i0(u,v))}else v=it,v=re(u,u===kt?v:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(v&3)===0||me(u,v)||(l=!0,i0(u,v));u=u.next}while(l);If=!1}}function M2(){t0()}function t0(){Dc=zf=!1;var n=0;Zi!==0&&$2()&&(n=Zi);for(var i=ct(),l=null,u=Rc;u!==null;){var b=u.next,v=n0(u,i);v===0?(u.next=null,l===null?Rc=b:l.next=b,b===null&&(Ts=l)):(l=u,(n!==0||(v&3)!==0)&&(Dc=!0)),u=b}dn!==0&&dn!==5||Il(n),Zi!==0&&(Zi=0)}function n0(n,i){for(var l=n.suspendedLanes,u=n.pingedLanes,b=n.expirationTimes,v=n.pendingLanes&-62914561;0F)break;var he=ne.transferSize,ge=ne.initiatorType;he&&f0(ge)&&(ne=ne.responseEnd,A+=he*(ne"u"?null:document;function N0(n,i,l){var u=As;if(u&&typeof i=="string"&&i){var b=Cn(i);b='link[rel="'+n+'"][href="'+b+'"]',typeof l=="string"&&(b+='[crossorigin="'+l+'"]'),E0.has(b)||(E0.add(b),n={rel:n,crossOrigin:l,href:i},u.querySelector(b)===null&&(i=u.createElement("link"),_n(i,"link",n),Ft(i),u.head.appendChild(i)))}}function Z2(n){gi.D(n),N0("dns-prefetch",n,null)}function Q2(n,i){gi.C(n,i),N0("preconnect",n,i)}function W2(n,i,l){gi.L(n,i,l);var u=As;if(u&&n&&i){var b='link[rel="preload"][as="'+Cn(i)+'"]';i==="image"&&l&&l.imageSrcSet?(b+='[imagesrcset="'+Cn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(b+='[imagesizes="'+Cn(l.imageSizes)+'"]')):b+='[href="'+Cn(n)+'"]';var v=b;switch(i){case"style":v=Ms(n);break;case"script":v=Os(n)}gr.has(v)||(n=p({rel:"preload",href:i==="image"&&l&&l.imageSrcSet?void 0:n,as:i},l),gr.set(v,n),u.querySelector(b)!==null||i==="style"&&u.querySelector($l(v))||i==="script"&&u.querySelector(ql(v))||(i=u.createElement("link"),_n(i,"link",n),Ft(i),u.head.appendChild(i)))}}function J2(n,i){gi.m(n,i);var l=As;if(l&&n){var u=i&&typeof i.as=="string"?i.as:"script",b='link[rel="modulepreload"][as="'+Cn(u)+'"][href="'+Cn(n)+'"]',v=b;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Os(n)}if(!gr.has(v)&&(n=p({rel:"modulepreload",href:n},i),gr.set(v,n),l.querySelector(b)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ql(v)))return}u=l.createElement("link"),_n(u,"link",n),Ft(u),l.head.appendChild(u)}}}function ek(n,i,l){gi.S(n,i,l);var u=As;if(u&&n){var b=Br(u).hoistableStyles,v=Ms(n);i=i||"default";var A=b.get(v);if(!A){var F={loading:0,preload:null};if(A=u.querySelector($l(v)))F.loading=5;else{n=p({rel:"stylesheet",href:n,"data-precedence":i},l),(l=gr.get(v))&&Jf(n,l);var ne=A=u.createElement("link");Ft(ne),_n(ne,"link",n),ne._p=new Promise(function(le,he){ne.onload=le,ne.onerror=he}),ne.addEventListener("load",function(){F.loading|=1}),ne.addEventListener("error",function(){F.loading|=2}),F.loading|=4,Bc(A,i,u)}A={type:"stylesheet",instance:A,count:1,state:F},b.set(v,A)}}}function tk(n,i){gi.X(n,i);var l=As;if(l&&n){var u=Br(l).hoistableScripts,b=Os(n),v=u.get(b);v||(v=l.querySelector(ql(b)),v||(n=p({src:n,async:!0},i),(i=gr.get(b))&&eh(n,i),v=l.createElement("script"),Ft(v),_n(v,"link",n),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(b,v))}}function nk(n,i){gi.M(n,i);var l=As;if(l&&n){var u=Br(l).hoistableScripts,b=Os(n),v=u.get(b);v||(v=l.querySelector(ql(b)),v||(n=p({src:n,async:!0,type:"module"},i),(i=gr.get(b))&&eh(n,i),v=l.createElement("script"),Ft(v),_n(v,"link",n),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(b,v))}}function S0(n,i,l,u){var b=(b=Q.current)?Ic(b):null;if(!b)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(i=Ms(l.href),l=Br(b).hoistableStyles,u=l.get(i),u||(u={type:"style",instance:null,count:0,state:null},l.set(i,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=Ms(l.href);var v=Br(b).hoistableStyles,A=v.get(n);if(A||(b=b.ownerDocument||b,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(n,A),(v=b.querySelector($l(n)))&&!v._p&&(A.instance=v,A.state.loading=5),gr.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},gr.set(n,l),v||rk(b,n,l,A.state))),i&&u===null)throw Error(a(528,""));return A}if(i&&u!==null)throw Error(a(529,""));return null;case"script":return i=l.async,l=l.src,typeof l=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Os(l),l=Br(b).hoistableScripts,u=l.get(i),u||(u={type:"script",instance:null,count:0,state:null},l.set(i,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Ms(n){return'href="'+Cn(n)+'"'}function $l(n){return'link[rel="stylesheet"]['+n+"]"}function k0(n){return p({},n,{"data-precedence":n.precedence,precedence:null})}function rk(n,i,l,u){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?u.loading=1:(i=n.createElement("link"),u.preload=i,i.addEventListener("load",function(){return u.loading|=1}),i.addEventListener("error",function(){return u.loading|=2}),_n(i,"link",l),Ft(i),n.head.appendChild(i))}function Os(n){return'[src="'+Cn(n)+'"]'}function ql(n){return"script[async]"+n}function C0(n,i,l){if(i.count++,i.instance===null)switch(i.type){case"style":var u=n.querySelector('style[data-href~="'+Cn(l.href)+'"]');if(u)return i.instance=u,Ft(u),u;var b=p({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Ft(u),_n(u,"style",b),Bc(u,l.precedence,n),i.instance=u;case"stylesheet":b=Ms(l.href);var v=n.querySelector($l(b));if(v)return i.state.loading|=4,i.instance=v,Ft(v),v;u=k0(l),(b=gr.get(b))&&Jf(u,b),v=(n.ownerDocument||n).createElement("link"),Ft(v);var A=v;return A._p=new Promise(function(F,ne){A.onload=F,A.onerror=ne}),_n(v,"link",u),i.state.loading|=4,Bc(v,l.precedence,n),i.instance=v;case"script":return v=Os(l.src),(b=n.querySelector(ql(v)))?(i.instance=b,Ft(b),b):(u=l,(b=gr.get(v))&&(u=p({},l),eh(u,b)),n=n.ownerDocument||n,b=n.createElement("script"),Ft(b),_n(b,"link",u),n.head.appendChild(b),i.instance=b);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(u=i.instance,i.state.loading|=4,Bc(u,l.precedence,n));return i.instance}function Bc(n,i,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=u.length?u[u.length-1]:null,v=b,A=0;A title"):null)}function ik(n,i,l){if(l===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return n=i.disabled,typeof i.precedence=="string"&&n==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function M0(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function ak(n,i,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var b=Ms(u.href),v=i.querySelector($l(b));if(v){i=v._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Hc.bind(n),i.then(n,n)),l.state.loading|=4,l.instance=v,Ft(v);return}v=i.ownerDocument||i,u=k0(u),(b=gr.get(b))&&Jf(u,b),v=v.createElement("link"),Ft(v);var A=v;A._p=new Promise(function(F,ne){A.onload=F,A.onerror=ne}),_n(v,"link",u),l.instance=v}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,i),(i=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=Hc.bind(n),i.addEventListener("load",l),i.addEventListener("error",l))}}var th=0;function sk(n,i){return n.stylesheets&&n.count===0&&qc(n,n.stylesheets),0th?50:800)+i);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(b)}}:null}function Hc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var $c=null;function qc(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,$c=new Map,i.forEach(lk,n),$c=null,Hc.call(n))}function lk(n,i){if(!(i.state.loading&4)){var l=$c.get(n);if(l)var u=l.get(null);else{l=new Map,$c.set(n,l);for(var b=n.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),uh.exports=wk(),uh.exports}var Nk=Ek();/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -56,22 +56,22 @@ Error generating stack: `+u.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Nk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + */const Sk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Sk=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,a)=>a?a.toUpperCase():r.toLowerCase());/** + */const kk=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,a)=>a?a.toUpperCase():r.toLowerCase());/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ey=e=>{const t=Sk(e);return t.charAt(0).toUpperCase()+t.slice(1)};/** + */const ey=e=>{const t=kk(e);return t.charAt(0).toUpperCase()+t.slice(1)};/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */var kk={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"};/** + */var Ck={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 v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -81,364 +81,364 @@ Error generating stack: `+u.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ck=ee.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:s="",children:o,iconNode:c,...d},f)=>ee.createElement("svg",{ref:f,...kk,width:t,height:t,stroke:e,strokeWidth:a?Number(r)*24/Number(t):r,className:S_("lucide",s),...!o&&!Tk(d)&&{"aria-hidden":"true"},...d},[...c.map(([h,m])=>ee.createElement(h,m)),...Array.isArray(o)?o:[o]]));/** + */const Ak=ee.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:s="",children:o,iconNode:c,...d},f)=>ee.createElement("svg",{ref:f,...Ck,width:t,height:t,stroke:e,strokeWidth:a?Number(r)*24/Number(t):r,className:S_("lucide",s),...!o&&!Tk(d)&&{"aria-hidden":"true"},...d},[...c.map(([h,m])=>ee.createElement(h,m)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Me=(e,t)=>{const r=ee.forwardRef(({className:a,...s},o)=>ee.createElement(Ck,{ref:o,iconNode:t,className:S_(`lucide-${Nk(ey(e))}`,`lucide-${e}`,a),...s}));return r.displayName=ey(e),r};/** + */const Me=(e,t)=>{const r=ee.forwardRef(({className:a,...s},o)=>ee.createElement(Ak,{ref:o,iconNode:t,className:S_(`lucide-${Sk(ey(e))}`,`lucide-${e}`,a),...s}));return r.displayName=ey(e),r};/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ak=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],gp=Me("arrow-left",Ak);/** + */const Mk=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],gp=Me("arrow-left",Mk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Mk=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],k_=Me("arrow-up-right",Mk);/** + */const Ok=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],k_=Me("arrow-up-right",Ok);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ok=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Rk=Me("arrow-up",Ok);/** + */const Rk=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Dk=Me("arrow-up",Rk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Dk=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],T_=Me("ban",Dk);/** + */const jk=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],C_=Me("ban",jk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jk=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]],Lk=Me("bell-off",jk);/** + */const Lk=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]],zk=Me("bell-off",Lk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zk=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Ao=Me("bot",zk);/** + */const Ik=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Ao=Me("bot",Ik);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ik=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],C_=Me("brain",Ik);/** + */const Bk=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],T_=Me("brain",Bk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Bk=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],Uk=Me("calendar-clock",Bk);/** + */const Uk=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],Hk=Me("calendar-clock",Uk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Hk=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],$k=Me("check-check",Hk);/** + */const $k=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],qk=Me("check-check",$k);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qk=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Gs=Me("check",qk);/** + */const Pk=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Gs=Me("check",Pk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Pk=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ho=Me("chevron-down",Pk);/** + */const Fk=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ho=Me("chevron-down",Fk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Fk=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Gk=Me("chevron-right",Fk);/** + */const Gk=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Vk=Me("chevron-right",Gk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Vk=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],A_=Me("chevron-up",Vk);/** + */const Yk=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],A_=Me("chevron-up",Yk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Yk=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Xk=Me("chevrons-up-down",Yk);/** + */const Xk=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Kk=Me("chevrons-up-down",Xk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Kk=[["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"}]],Hu=Me("circle-alert",Kk);/** + */const Zk=[["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"}]],Hu=Me("circle-alert",Zk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Zk=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],M_=Me("circle-check-big",Zk);/** + */const Qk=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],M_=Me("circle-check-big",Qk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Qk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],O_=Me("circle-check",Qk);/** + */const Wk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],O_=Me("circle-check",Wk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Wk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],Jk=Me("circle-dot",Wk);/** + */const Jk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],eC=Me("circle-dot",Jk);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const eT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],tT=Me("circle",eT);/** + */const tC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],nC=Me("circle",tC);/** * @license lucide-react v0.563.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=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],R_=Me("clock",nT);/** + */const rC=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],R_=Me("clock",rC);/** * @license lucide-react v0.563.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=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],iT=Me("code",rT);/** + */const iC=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],aC=Me("code",iC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const aT=[["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"}]],mo=Me("copy",aT);/** + */const sC=[["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"}]],mo=Me("copy",sC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const sT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]],lT=Me("crosshair",sT);/** + */const lC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]],oC=Me("crosshair",lC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const oT=[["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"}]],ty=Me("external-link",oT);/** + */const cC=[["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"}]],ty=Me("external-link",cC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const cT=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],uT=Me("eye",cT);/** + */const uC=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],dC=Me("eye",uC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dT=[["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"}]],fT=Me("file-text",dT);/** + */const fC=[["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"}]],hC=Me("file-text",fC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const hT=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],D_=Me("flag",hT);/** + */const mC=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],D_=Me("flag",mC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mT=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],pT=Me("git-merge",mT);/** + */const pC=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],gC=Me("git-merge",pC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const gT=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],bT=Me("git-pull-request",gT);/** + */const bC=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],xC=Me("git-pull-request",bC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xT=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],yT=Me("github",xT);/** + */const yC=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],vC=Me("github",yC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vT=[["path",{d:"m22 13.29-3.33-10a.42.42 0 0 0-.14-.18.38.38 0 0 0-.22-.11.39.39 0 0 0-.23.07.42.42 0 0 0-.14.18l-2.26 6.67H8.32L6.1 3.26a.42.42 0 0 0-.1-.18.38.38 0 0 0-.26-.08.39.39 0 0 0-.23.07.42.42 0 0 0-.14.18L2 13.29a.74.74 0 0 0 .27.83L12 21l9.69-6.88a.71.71 0 0 0 .31-.83Z",key:"148pdi"}]],_T=Me("gitlab",vT);/** + */const _C=[["path",{d:"m22 13.29-3.33-10a.42.42 0 0 0-.14-.18.38.38 0 0 0-.22-.11.39.39 0 0 0-.23.07.42.42 0 0 0-.14.18l-2.26 6.67H8.32L6.1 3.26a.42.42 0 0 0-.1-.18.38.38 0 0 0-.26-.08.39.39 0 0 0-.23.07.42.42 0 0 0-.14.18L2 13.29a.74.74 0 0 0 .27.83L12 21l9.69-6.88a.71.71 0 0 0 .31-.83Z",key:"148pdi"}]],wC=Me("gitlab",_C);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wT=[["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"}]],j_=Me("globe",wT);/** + */const EC=[["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"}]],j_=Me("globe",EC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ET=[["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"}]],Vs=Me("history",ET);/** + */const NC=[["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"}]],Vs=Me("history",NC);/** * @license lucide-react v0.563.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=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],ST=Me("image",NT);/** + */const SC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],kC=Me("image",SC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],TT=Me("info",kT);/** + */const CC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],TC=Me("info",CC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const CT=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],AT=Me("list-todo",CT);/** + */const AC=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],MC=Me("list-todo",AC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const MT=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],qs=Me("loader-circle",MT);/** + */const OC=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],qs=Me("loader-circle",OC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const OT=[["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"}]],RT=Me("lock",OT);/** + */const RC=[["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"}]],DC=Me("lock",RC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const DT=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],jT=Me("log-out",DT);/** + */const jC=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],LC=Me("log-out",jC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const LT=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],bp=Me("mail",LT);/** + */const zC=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],bp=Me("mail",zC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zT=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],ny=Me("message-circle",zT);/** + */const IC=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],ny=Me("message-circle",IC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const IT=[["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"}]],BT=Me("pencil",IT);/** + */const BC=[["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"}]],UC=Me("pencil",BC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const UT=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],HT=Me("plug",UT);/** + */const HC=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],$C=Me("plug",HC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $T=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],qT=Me("plus",$T);/** + */const qC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],PC=Me("plus",qC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const PT=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],FT=Me("radar",PT);/** + */const FC=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],GC=Me("radar",FC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GT=[["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"}]],VT=Me("refresh-cw",GT);/** + */const VC=[["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"}]],YC=Me("refresh-cw",VC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const YT=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],XT=Me("rocket",YT);/** + */const XC=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],KC=Me("rocket",XC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const KT=[["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"}]],ZT=Me("rotate-ccw",KT);/** + */const ZC=[["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"}]],QC=Me("rotate-ccw",ZC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const QT=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],WT=Me("search",QT);/** + */const WC=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],JC=Me("search",WC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const JT=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],eC=Me("shield-alert",JT);/** + */const eT=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],tT=Me("shield-alert",eT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const tC=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],L_=Me("shield-check",tC);/** + */const nT=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],L_=Me("shield-check",nT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nC=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],rC=Me("shield",nC);/** + */const rT=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],iT=Me("shield",rT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const iC=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Im=Me("sparkles",iC);/** + */const aT=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Im=Me("sparkles",aT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const aC=[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]],sC=Me("sticky-note",aC);/** + */const sT=[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]],lT=Me("sticky-note",sT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const lC=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],z_=Me("terminal",lC);/** + */const oT=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],z_=Me("terminal",oT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const oC=[["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"}]],cC=Me("trash-2",oC);/** + */const cT=[["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"}]],uT=Me("trash-2",cT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const uC=[["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"}]],dC=Me("triangle-alert",uC);/** + */const dT=[["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"}]],fT=Me("triangle-alert",dT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const fC=[["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"}]],hC=Me("users",fC);/** + */const hT=[["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"}]],mT=Me("users",hT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mC=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],pC=Me("wand-sparkles",mC);/** + */const pT=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],gT=Me("wand-sparkles",pT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const gC=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Bm=Me("wrench",gC);/** + */const bT=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Bm=Me("wrench",bT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xp=Me("x",bC);/** + */const xT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xp=Me("x",xT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xC=[["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"}]],yC=Me("zap",xC),vC={open:{label:"Open",color:"bg-red-500/10 text-red-400 border-red-500/20",dotColor:"bg-red-500",description:"Newly discovered, awaiting triage"},in_progress:{label:"In Progress",color:"bg-blue-500/10 text-blue-400 border-blue-500/20",dotColor:"bg-blue-500",description:"Someone is working on this"},snoozed:{label:"Snoozed",color:"bg-purple-500/10 text-purple-400 border-purple-500/20",dotColor:"bg-purple-500",description:"Temporarily hidden until a follow-up date"},fixed:{label:"Fixed",color:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20",dotColor:"bg-emerald-500",description:"This vulnerability has been fixed"},ignored:{label:"Ignored",color:"bg-gray-500/10 text-gray-400 border-gray-500/20",dotColor:"bg-gray-500",description:"Acknowledged but accepted"}},_C={trivial:{label:"Trivial",color:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20"},low:{label:"Low",color:"bg-blue-500/10 text-blue-400 border-blue-500/20"},medium:{label:"Medium",color:"bg-yellow-500/10 text-yellow-400 border-yellow-500/20"},high:{label:"High",color:"bg-orange-500/10 text-orange-400 border-orange-500/20"}},I_={critical:"bg-red-500/20 text-red-500 border-red-500/30",high:"bg-orange-500/20 text-orange-500 border-orange-500/30",medium:"bg-yellow-500/20 text-yellow-500 border-yellow-500/30",low:"bg-blue-500/20 text-blue-500 border-blue-500/30"};function Zc(e){return e.original_severity!=null&&e.original_severity!==e.severity}const wC={js:"javascript",ts:"typescript",tsx:"typescript",jsx:"javascript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",php:"php",cs:"csharp",cpp:"cpp",c:"c",sh:"bash",bash:"bash",sql:"sql",html:"html",css:"css",json:"json",yaml:"yaml",yml:"yaml",xml:"xml"};function EC(e){var r;if(!e)return null;const t=(r=e.split(".").pop())==null?void 0:r.toLowerCase();return t&&wC[t]||null}function yp(e){switch(e){case"critical":return"bg-red-500";case"high":return"bg-orange-500";case"medium":return"bg-yellow-500";default:return"bg-blue-500"}}async function vp(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}const $u="https://app.strix.ai/api/auth/signup",NC="https://strix.ai/pricing",SC="ref=oss_viewer&utm_source=oss_viewer&utm_medium=local_viewer&utm_campaign=oss_viewer";function fa(e,t){const r=e.includes("?")?"&":"?";return`${e}${r}${SC}&utm_content=${encodeURIComponent(t)}`}function Cr(e,t={}){try{const r={event:e};for(const[s,o]of Object.entries(t))o!==void 0&&(r[s]=o);const a=JSON.stringify(r);typeof navigator<"u"&&navigator.sendBeacon?navigator.sendBeacon("/api/event",a):fetch("/api/event",{method:"POST",body:a,keepalive:!0})}catch{}}function Dr(e,t){Cr("cta_clicked",{cta:e,surface:t})}function B_(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t{const r=new Array(e.length+t.length);for(let a=0;a({classGroupId:e,validator:t}),U_=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),vu="-",ry=[],AC="arbitrary..",MC=e=>{const t=RC(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return OC(c);const d=c.split(vu),f=d[0]===""&&d.length>1?1:0;return H_(d,f,t)},getConflictingClassGroupIds:(c,d)=>{if(d){const f=a[c],h=r[c];return f?h?TC(h,f):f:h||ry}return r[c]||ry}}},H_=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const s=e[t],o=r.nextPart.get(s);if(o){const h=H_(e,t+1,o);if(h)return h}const c=r.validators;if(c===null)return;const d=t===0?e.join(vu):e.slice(t).join(vu),f=c.length;for(let h=0;he.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?AC+a:void 0})(),RC=e=>{const{theme:t,classGroups:r}=e;return DC(r,t)},DC=(e,t)=>{const r=U_();for(const a in e){const s=e[a];_p(s,r,a,t)}return r},_p=(e,t,r,a)=>{const s=e.length;for(let o=0;o{if(typeof e=="string"){LC(e,t,r);return}if(typeof e=="function"){zC(e,t,r,a);return}IC(e,t,r,a)},LC=(e,t,r)=>{const a=e===""?t:$_(t,e);a.classGroupId=r},zC=(e,t,r,a)=>{if(BC(e)){_p(e(a),t,r,a);return}t.validators===null&&(t.validators=[]),t.validators.push(CC(r,e))},IC=(e,t,r,a)=>{const s=Object.entries(e),o=s.length;for(let c=0;c{let r=e;const a=t.split(vu),s=a.length;for(let o=0;o"isThemeGetter"in e&&e.isThemeGetter===!0,UC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null);const s=(o,c)=>{r[o]=c,t++,t>e&&(t=0,a=r,r=Object.create(null))};return{get(o){let c=r[o];if(c!==void 0)return c;if((c=a[o])!==void 0)return s(o,c),c},set(o,c){o in r?r[o]=c:s(o,c)}}},Um="!",iy=":",HC=[],ay=(e,t,r,a,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:s}),$C=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=s=>{const o=[];let c=0,d=0,f=0,h;const m=s.length;for(let N=0;Nf?h-f:void 0;return ay(o,x,y,_)};if(t){const s=t+iy,o=a;a=c=>c.startsWith(s)?o(c.slice(s.length)):ay(HC,!1,c,void 0,!0)}if(r){const s=a;a=o=>r({className:o,parseClassName:s})}return a},qC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{t.set(r,1e6+a)}),r=>{const a=[];let s=[];for(let o=0;o0&&(s.sort(),a.push(...s),s=[]),a.push(c)):s.push(c)}return s.length>0&&(s.sort(),a.push(...s)),a}},PC=e=>({cache:UC(e.cacheSize),parseClassName:$C(e),sortModifiers:qC(e),postfixLookupClassGroupIds:FC(e),...MC(e)}),FC=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let a=0;a{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:o,postfixLookupClassGroupIds:c}=t,d=[],f=e.trim().split(GC);let h="";for(let m=f.length-1;m>=0;m-=1){const p=f[m],{isExternal:y,modifiers:x,hasImportantModifier:_,baseClassName:N,maybePostfixModifierPosition:S}=r(p);if(y){h=p+(h.length>0?" "+h:h);continue}let w=!!S,k;if(w){const U=N.substring(0,S);k=a(U);const B=k&&c[k]?a(N):void 0;B&&B!==k&&(k=B,w=!1)}else k=a(N);if(!k){if(!w){h=p+(h.length>0?" "+h:h);continue}if(k=a(N),!k){h=p+(h.length>0?" "+h:h);continue}w=!1}const E=x.length===0?"":x.length===1?x[0]:o(x).join(":"),M=_?E+Um:E,I=M+k;if(d.indexOf(I)>-1)continue;d.push(I);const R=s(k,w);for(let U=0;U0?" "+h:h)}return h},YC=(...e)=>{let t=0,r,a,s="";for(;t{if(typeof e=="string")return e;let t,r="";for(let a=0;a{let r,a,s,o;const c=f=>{const h=t.reduce((m,p)=>p(m),e());return r=PC(h),a=r.cache.get,s=r.cache.set,o=d,d(f)},d=f=>{const h=a(f);if(h)return h;const m=VC(f,r);return s(f,m),m};return o=c,(...f)=>o(YC(...f))},KC=[],fn=e=>{const t=r=>r[e]||KC;return t.isThemeGetter=!0,t},P_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,F_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ZC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,QC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,WC=/\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$/,JC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ra=e=>ZC.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),Fr=e=>!!e&&Number.isInteger(Number(e)),mh=e=>e.endsWith("%")&&We(e.slice(0,-1)),bi=e=>QC.test(e),G_=()=>!0,nA=e=>WC.test(e)&&!JC.test(e),wp=()=>!1,rA=e=>eA.test(e),iA=e=>tA.test(e),aA=e=>!ke(e)&&!Te(e),sA=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)),lA=e=>ha(e,X_,wp),ke=e=>P_.test(e),La=e=>ha(e,K_,nA),sy=e=>ha(e,pA,We),oA=e=>ha(e,Q_,G_),cA=e=>ha(e,Z_,wp),ly=e=>ha(e,V_,wp),uA=e=>ha(e,Y_,iA),Qc=e=>ha(e,W_,rA),Te=e=>F_.test(e),Kl=e=>Za(e,K_),dA=e=>Za(e,Z_),oy=e=>Za(e,V_),fA=e=>Za(e,X_),hA=e=>Za(e,Y_),Wc=e=>Za(e,W_,!0),mA=e=>Za(e,Q_,!0),ha=(e,t,r)=>{const a=P_.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},Za=(e,t,r=!1)=>{const a=F_.exec(e);return a?a[1]?t(a[1]):r:!1},V_=e=>e==="position"||e==="percentage",Y_=e=>e==="image"||e==="url",X_=e=>e==="length"||e==="size"||e==="bg-size",K_=e=>e==="length",pA=e=>e==="number",Z_=e=>e==="family-name",Q_=e=>e==="number"||e==="weight",W_=e=>e==="shadow",gA=()=>{const e=fn("color"),t=fn("font"),r=fn("text"),a=fn("font-weight"),s=fn("tracking"),o=fn("leading"),c=fn("breakpoint"),d=fn("container"),f=fn("spacing"),h=fn("radius"),m=fn("shadow"),p=fn("inset-shadow"),y=fn("text-shadow"),x=fn("drop-shadow"),_=fn("blur"),N=fn("perspective"),S=fn("aspect"),w=fn("ease"),k=fn("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...M(),Te,ke],R=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],B=()=>[Te,ke,f],Z=()=>[ra,"full","auto",...B()],D=()=>[Fr,"none","subgrid",Te,ke],z=()=>["auto",{span:["full",Fr,Te,ke]},Fr,Te,ke],V=()=>[Fr,"auto",Te,ke],P=()=>["auto","min","max","fr",Te,ke],C=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...B()],H=()=>[ra,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],X=()=>[ra,"screen","full","dvw","lvw","svw","min","max","fit",...B()],K=()=>[ra,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],T=()=>[e,Te,ke],j=()=>[...M(),oy,ly,{position:[Te,ke]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",fA,lA,{size:[Te,ke]}],G=()=>[mh,Kl,La],q=()=>["","none","full",h,Te,ke],Q=()=>["",We,Kl,La],J=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[We,mh,oy,ly],ce=()=>["","none",_,Te,ke],fe=()=>["none",We,Te,ke],be=()=>["none",We,Te,ke],we=()=>[We,Te,ke],Ne=()=>[ra,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bi],breakpoint:[bi],color:[G_],container:[bi],"drop-shadow":[bi],ease:["in","out","in-out"],font:[aA],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bi],shadow:[bi],spacing:["px",We],text:[bi],"text-shadow":[bi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ra,ke,Te,S]}],container:["container"],"container-type":[{"@container":["","normal","size",Te,ke]}],"container-named":[sA],columns:[{columns:[We,ke,Te,d]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:I()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[Fr,"auto",Te,ke]}],basis:[{basis:[ra,"full","auto",d,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,ra,"auto","initial","none",ke]}],grow:[{grow:["",We,Te,ke]}],shrink:[{shrink:["",We,Te,ke]}],order:[{order:[Fr,"first","last","none",Te,ke]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...C(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...C()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":C()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],"inline-size":[{inline:["auto",...X()]}],"min-inline-size":[{"min-inline":["auto",...X()]}],"max-inline-size":[{"max-inline":["none",...X()]}],"block-size":[{block:["auto",...K()]}],"min-block-size":[{"min-block":["auto",...K()]}],"max-block-size":[{"max-block":["none",...K()]}],w:[{w:[d,"screen",...H()]}],"min-w":[{"min-w":[d,"screen","none",...H()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",r,Kl,La]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,mA,oA]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",mh,ke]}],"font-family":[{font:[dA,cA,t]}],"font-features":[{"font-features":[ke]}],"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,Te,ke]}],"line-clamp":[{"line-clamp":[We,"none",Te,sy]}],leading:[{leading:[o,...B()]}],"list-image":[{"list-image":["none",Te,ke]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Te,La]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[We,"auto",Te,ke]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"tab-size":[{tab:[Fr,Te,ke]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,ke]}],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",Te,ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fr,Te,ke],radial:["",Te,ke],conic:[Fr,Te,ke]},hA,uA]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Te,ke]}],"outline-w":[{outline:["",We,Kl,La]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",m,Wc,Qc]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",p,Wc,Qc]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[We,La]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",y,Wc,Qc]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[We,Te,ke]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"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":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[Te,ke]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"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":M()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,ke]}],filter:[{filter:["","none",Te,ke]}],blur:[{blur:ce()}],brightness:[{brightness:[We,Te,ke]}],contrast:[{contrast:[We,Te,ke]}],"drop-shadow":[{"drop-shadow":["","none",x,Wc,Qc]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",We,Te,ke]}],"hue-rotate":[{"hue-rotate":[We,Te,ke]}],invert:[{invert:["",We,Te,ke]}],saturate:[{saturate:[We,Te,ke]}],sepia:[{sepia:["",We,Te,ke]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,ke]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[We,Te,ke]}],"backdrop-contrast":[{"backdrop-contrast":[We,Te,ke]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,Te,ke]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,Te,ke]}],"backdrop-invert":[{"backdrop-invert":["",We,Te,ke]}],"backdrop-opacity":[{"backdrop-opacity":[We,Te,ke]}],"backdrop-saturate":[{"backdrop-saturate":[We,Te,ke]}],"backdrop-sepia":[{"backdrop-sepia":["",We,Te,ke]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,ke]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",Te,ke]}],ease:[{ease:["linear","initial",w,Te,ke]}],delay:[{delay:[We,Te,ke]}],animate:[{animate:["none",k,Te,ke]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,Te,ke]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[Te,ke,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ne()}],"translate-x":[{"translate-x":Ne()}],"translate-y":[{"translate-y":Ne()}],"translate-z":[{"translate-z":Ne()}],"translate-none":["translate-none"],zoom:[{zoom:[Fr,Te,ke]}],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",Te,ke]}],"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":T()}],"scrollbar-track-color":[{"scrollbar-track":T()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"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",Te,ke]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[We,Kl,La,sy]}],stroke:[{stroke:["none",...T()]}],"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"]}},bA=XC(gA);function Mr(...e){return bA(kC(e))}function xA(e){return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function Hm(e){const t=new Date(e),a=Math.floor((new Date().getTime()-t.getTime())/1e3);return a<60?"just now":a<3600?`${Math.floor(a/60)}m ago`:a<86400?`${Math.floor(a/3600)}h ago`:a<604800?`${Math.floor(a/86400)}d ago`:xA(e)}function yA(e){return`STRIX-${e}`}function Ds(e){return new Intl.NumberFormat("en-US").format(e)}function vA(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const _A=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,EA={};function cy(e,t){return(EA.jsx?wA:_A).test(e)}const NA=/[ \t\n\f\r]/g;function SA(e){return typeof e=="object"?e.type==="text"?uy(e.value):!1:uy(e)}function uy(e){return e.replace(NA,"")===""}class Mo{constructor(t,r,a){this.normal=r,this.property=t,a&&(this.space=a)}}Mo.prototype.normal={};Mo.prototype.property={};Mo.prototype.space=void 0;function J_(e,t){const r={},a={};for(const s of e)Object.assign(r,s.property),Object.assign(a,s.normal);return new Mo(r,a,t)}function $m(e){return e.toLowerCase()}class Vn{constructor(t,r){this.attribute=r,this.property=t}}Vn.prototype.attribute="";Vn.prototype.booleanish=!1;Vn.prototype.boolean=!1;Vn.prototype.commaOrSpaceSeparated=!1;Vn.prototype.commaSeparated=!1;Vn.prototype.defined=!1;Vn.prototype.mustUseProperty=!1;Vn.prototype.number=!1;Vn.prototype.overloadedBoolean=!1;Vn.prototype.property="";Vn.prototype.spaceSeparated=!1;Vn.prototype.space=void 0;let kA=0;const Ge=Qa(),an=Qa(),qm=Qa(),ve=Qa(),Tt=Qa(),$a=Qa(),rr=Qa();function Qa(){return 2**++kA}const Pm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:an,commaOrSpaceSeparated:rr,commaSeparated:$a,number:ve,overloadedBoolean:qm,spaceSeparated:Tt},Symbol.toStringTag,{value:"Module"})),ph=Object.keys(Pm);class Ep extends Vn{constructor(t,r,a,s){let o=-1;if(super(t,r),dy(this,"space",s),typeof a=="number")for(;++o4&&r.slice(0,4)==="data"&&OA.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(fy,jA);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!fy.test(o)){let c=o.replace(MA,DA);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=Ep}return new s(a,t)}function DA(e){return"-"+e.toLowerCase()}function jA(e){return e.charAt(1).toUpperCase()}const LA=J_([ew,TA,rw,iw,aw],"html"),Np=J_([ew,CA,rw,iw,aw],"svg");function zA(e){return e.join(" ").trim()}var js={},gh,hy;function IA(){if(hy)return gh;hy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,f=` -`,h="/",m="*",p="",y="comment",x="declaration";function _(S,w){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];w=w||{};var k=1,E=1;function M(C){var $=C.match(t);$&&(k+=$.length);var O=C.lastIndexOf(f);E=~O?C.length-O:E+C.length}function I(){var C={line:k,column:E};return function($){return $.position=new R(C),Z(),$}}function R(C){this.start=C,this.end={line:k,column:E},this.source=w.source}R.prototype.content=S;function U(C){var $=new Error(w.source+":"+k+":"+E+": "+C);if($.reason=C,$.filename=w.source,$.line=k,$.column=E,$.source=S,!w.silent)throw $}function B(C){var $=C.exec(S);if($){var O=$[0];return M(O),S=S.slice(O.length),$}}function Z(){B(r)}function D(C){var $;for(C=C||[];$=z();)$!==!1&&C.push($);return C}function z(){var C=I();if(!(h!=S.charAt(0)||m!=S.charAt(1))){for(var $=2;p!=S.charAt($)&&(m!=S.charAt($)||h!=S.charAt($+1));)++$;if($+=2,p===S.charAt($-1))return U("End of comment missing");var O=S.slice(2,$-2);return E+=2,M(O),S=S.slice($),E+=2,C({type:y,comment:O})}}function V(){var C=I(),$=B(a);if($){if(z(),!B(s))return U("property missing ':'");var O=B(o),H=C({type:x,property:N($[0].replace(e,p)),value:O?N(O[0].replace(e,p)):p});return B(c),H}}function P(){var C=[];D(C);for(var $;$=V();)$!==!1&&(C.push($),D(C));return C}return Z(),P()}function N(S){return S?S.replace(d,p):p}return gh=_,gh}var my;function BA(){if(my)return js;my=1;var e=js&&js.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(js,"__esModule",{value:!0}),js.default=r;const t=e(IA());function r(a,s){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),d=typeof s=="function";return c.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:m}=f;d?s(h,m,f):m&&(o=o||{},o[h]=m)}),o}return js}var Zl={},py;function UA(){if(py)return Zl;py=1,Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(h){return!h||r.test(h)||e.test(h)},c=function(h,m){return m.toUpperCase()},d=function(h,m){return"".concat(m,"-")},f=function(h,m){return m===void 0&&(m={}),o(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(s,d):h=h.replace(a,d),h.replace(t,c))};return Zl.camelCase=f,Zl}var Ql,gy;function HA(){if(gy)return Ql;gy=1;var e=Ql&&Ql.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(BA()),r=UA();function a(s,o){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(d,f){d&&f&&(c[(0,r.camelCase)(d,o)]=f)}),c}return a.default=a,Ql=a,Ql}var $A=HA();const qA=To($A),sw=lw("end"),Sp=lw("start");function lw(e){return t;function t(r){const a=r&&r.position&&r.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function PA(e){const t=Sp(e),r=sw(e);if(t&&r)return{start:t,end:r}}function lo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?by(e.position):"start"in e||"end"in e?by(e):"line"in e||"column"in e?Fm(e):""}function Fm(e){return xy(e&&e.line)+":"+xy(e&&e.column)}function by(e){return Fm(e&&e.start)+"-"+Fm(e&&e.end)}function xy(e){return e&&typeof e=="number"?e:1}class An extends Error{constructor(t,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let s="",o={},c=!1;if(r&&("line"in r&&"column"in r?o={place:r}:"start"in r&&"end"in r?o={place:r}:"type"in r?o={ancestors:[r],place:r.position}:o={...r}),typeof t=="string"?s=t:!o.cause&&t&&(c=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const f=a.indexOf(":");f===-1?o.ruleId=a:(o.source=a.slice(0,f),o.ruleId=a.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const d=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=lo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}An.prototype.file="";An.prototype.name="";An.prototype.reason="";An.prototype.message="";An.prototype.stack="";An.prototype.column=void 0;An.prototype.line=void 0;An.prototype.ancestors=void 0;An.prototype.cause=void 0;An.prototype.fatal=void 0;An.prototype.place=void 0;An.prototype.ruleId=void 0;An.prototype.source=void 0;const kp={}.hasOwnProperty,FA=new Map,GA=/[A-Z]/g,VA=new Set(["table","tbody","thead","tfoot","tr"]),YA=new Set(["td","th"]),ow="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function XA(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=nM(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=tM(r,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Np:LA,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=cw(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function cw(e,t,r){if(t.type==="element")return KA(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return ZA(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return WA(e,t,r);if(t.type==="mdxjsEsm")return QA(e,t);if(t.type==="root")return JA(e,t,r);if(t.type==="text")return eM(e,t)}function KA(e,t,r){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=Np,e.schema=s),e.ancestors.push(t);const o=dw(e,t.tagName,!1),c=rM(e,t);let d=Cp(e,t);return VA.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!SA(f):!0})),uw(e,c,o,t),Tp(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,r)}function ZA(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}po(e,t.position)}function QA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);po(e,t.position)}function WA(e,t,r){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=Np,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:dw(e,t.name,!0),c=iM(e,t),d=Cp(e,t);return uw(e,c,o,t),Tp(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,r)}function JA(e,t,r){const a={};return Tp(a,Cp(e,t)),e.create(t,e.Fragment,a,r)}function eM(e,t){return t.value}function uw(e,t,r,a){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=a)}function Tp(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function tM(e,t,r){return a;function a(s,o,c,d){const h=Array.isArray(c.children)?r:t;return d?h(o,c,d):h(o,c)}}function nM(e,t){return r;function r(a,s,o,c){const d=Array.isArray(o.children),f=Sp(a);return t(s,o,c,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function rM(e,t){const r={};let a,s;for(s in t.properties)if(s!=="children"&&kp.call(t.properties,s)){const o=aM(e,s,t.properties[s]);if(o){const[c,d]=o;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&YA.has(t.tagName)?a=d:r[c]=d}}if(a){const o=r.style||(r.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function iM(e,t){const r={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const d=c.properties[0];d.type,Object.assign(r,e.evaluater.evaluateExpression(d.argument))}else po(e,t.position);else{const s=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const d=a.value.data.estree.body[0];d.type,o=e.evaluater.evaluateExpression(d.expression)}else po(e,t.position);else o=a.value===null?!0:a.value;r[s]=o}return r}function Cp(e,t){const r=[];let a=-1;const s=e.passKeys?new Map:FA;for(;++as?0:s+t:t=t>s?s:t,r=r>0?r:0,a.length<1e4)c=Array.from(a),c.unshift(t,r),e.splice(...c);else for(r&&e.splice(t,r);o0?(ar(e,e.length,0,t),e):t}const _y={}.hasOwnProperty;function hw(e){const t={};let r=-1;for(;++r13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function jr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const jn=ma(/[A-Za-z]/),Cn=ma(/[\dA-Za-z]/),mM=ma(/[#-'*+\--9=?A-Z^-~]/);function _u(e){return e!==null&&(e<32||e===127)}const Gm=ma(/\d/),pM=ma(/[\dA-Fa-f]/),gM=ma(/[!-/:-@[-`{-~]/);function Be(e){return e!==null&&e<-2}function Ct(e){return e!==null&&(e<0||e===32)}function tt(e){return e===-2||e===-1||e===32}const qu=ma(new RegExp("\\p{P}|\\p{S}","u")),Fa=ma(/\s/);function ma(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function nl(e){const t=[];let r=-1,a=0,s=0;for(;++r55295&&o<57344){const d=e.charCodeAt(r+1);o<56320&&d>56319&&d<57344?(c=String.fromCharCode(o,d),s=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(a,r),encodeURIComponent(c)),a=r+s+1,c=""),s&&(r+=s,s=0)}return t.join("")+e.slice(a)}function ot(e,t,r,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(f){return tt(f)?(e.enter(r),d(f)):t(f)}function d(f){return tt(f)&&o++c))return;const U=t.events.length;let B=U,Z,D;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(Z){D=t.events[B][1].end;break}Z=!0}for(w(a),R=U;RE;){const I=r[M];t.containerState=I[1],I[0].exit.call(t,e)}r.length=E}function k(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function _M(e,t,r){return ot(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ys(e){if(e===null||Ct(e)||Fa(e))return 1;if(qu(e))return 2}function Pu(e,t,r){const a=[];let s=-1;for(;++s1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const p={...e[a][1].end},y={...e[r][1].start};Ey(p,-f),Ey(y,f),c={type:f>1?"strongSequence":"emphasisSequence",start:p,end:{...e[a][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:y},o={type:f>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[r][1].start}},s={type:f>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[a][1].end={...c.start},e[r][1].start={...d.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=br(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=br(h,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",o,t]]),h=br(h,Pu(t.parser.constructs.insideSpan.null,e.slice(a+1,r),t)),h=br(h,[["exit",o,t],["enter",d,t],["exit",d,t],["exit",s,t]]),e[r][1].end.offset-e[r][1].start.offset?(m=2,h=br(h,[["enter",e[r][1],t],["exit",e[r][1],t]])):m=0,ar(e,a-1,r-a+3,h),r=a+h.length-m-2;break}}for(r=-1;++r0&&tt(R)?ot(e,k,"linePrefix",o+1)(R):k(R)}function k(R){return R===null||Be(R)?e.check(Ny,N,M)(R):(e.enter("codeFlowValue"),E(R))}function E(R){return R===null||Be(R)?(e.exit("codeFlowValue"),k(R)):(e.consume(R),E)}function M(R){return e.exit("codeFenced"),t(R)}function I(R,U,B){let Z=0;return D;function D($){return R.enter("lineEnding"),R.consume($),R.exit("lineEnding"),z}function z($){return R.enter("codeFencedFence"),tt($)?ot(R,V,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):V($)}function V($){return $===d?(R.enter("codeFencedFenceSequence"),P($)):B($)}function P($){return $===d?(Z++,R.consume($),P):Z>=c?(R.exit("codeFencedFenceSequence"),tt($)?ot(R,C,"whitespace")($):C($)):B($)}function C($){return $===null||Be($)?(R.exit("codeFencedFence"),U($)):B($)}}}function DM(e,t,r){const a=this;return s;function s(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?r(c):t(c)}}const xh={name:"codeIndented",tokenize:LM},jM={partial:!0,tokenize:zM};function LM(e,t,r){const a=this;return s;function s(h){return e.enter("codeIndented"),ot(e,o,"linePrefix",5)(h)}function o(h){const m=a.events[a.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(h):r(h)}function c(h){return h===null?f(h):Be(h)?e.attempt(jM,c,f)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||Be(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),d)}function f(h){return e.exit("codeIndented"),t(h)}}function zM(e,t,r){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?r(c):Be(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):ot(e,o,"linePrefix",5)(c)}function o(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Be(c)?s(c):r(c)}}const IM={name:"codeText",previous:UM,resolve:BM,tokenize:HM};function BM(e){let t=e.length-4,r=3,a,s;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=r;++a=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,r,a){const s=r||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&Wl(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Wl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Wl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(c):e.interrupt(a.parser.constructs.flow,r,t)(c)}}function yw(e,t,r,a,s,o,c,d,f){const h=f||Number.POSITIVE_INFINITY;let m=0;return p;function p(w){return w===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(w),e.exit(o),y):w===null||w===32||w===41||_u(w)?r(w):(e.enter(a),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),N(w))}function y(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),x(w))}function x(w){return w===62?(e.exit("chunkString"),e.exit(d),y(w)):w===null||w===60||Be(w)?r(w):(e.consume(w),w===92?_:x)}function _(w){return w===60||w===62||w===92?(e.consume(w),x):x(w)}function N(w){return!m&&(w===null||w===41||Ct(w))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(a),t(w)):m999||x===null||x===91||x===93&&!f||x===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?r(x):x===93?(e.exit(o),e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):Be(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===null||x===91||x===93||Be(x)||d++>999?(e.exit("chunkString"),m(x)):(e.consume(x),f||(f=!tt(x)),x===92?y:p)}function y(x){return x===91||x===92||x===93?(e.consume(x),d++,p):p(x)}}function _w(e,t,r,a,s,o){let c;return d;function d(y){return y===34||y===39||y===40?(e.enter(a),e.enter(s),e.consume(y),e.exit(s),c=y===40?41:y,f):r(y)}function f(y){return y===c?(e.enter(s),e.consume(y),e.exit(s),e.exit(a),t):(e.enter(o),h(y))}function h(y){return y===c?(e.exit(o),f(c)):y===null?r(y):Be(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),ot(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===c||y===null||Be(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?p:m)}function p(y){return y===c||y===92?(e.consume(y),m):m(y)}}function oo(e,t){let r;return a;function a(s){return Be(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),r=!0,a):tt(s)?ot(e,a,r?"linePrefix":"lineSuffix")(s):t(s)}}const XM={name:"definition",tokenize:ZM},KM={partial:!0,tokenize:QM};function ZM(e,t,r){const a=this;let s;return o;function o(x){return e.enter("definition"),c(x)}function c(x){return vw.call(a,e,d,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function d(x){return s=jr(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),f):r(x)}function f(x){return Ct(x)?oo(e,h)(x):h(x)}function h(x){return yw(e,m,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function m(x){return e.attempt(KM,p,p)(x)}function p(x){return tt(x)?ot(e,y,"whitespace")(x):y(x)}function y(x){return x===null||Be(x)?(e.exit("definition"),a.parser.defined.push(s),t(x)):r(x)}}function QM(e,t,r){return a;function a(d){return Ct(d)?oo(e,s)(d):r(d)}function s(d){return _w(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return tt(d)?ot(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Be(d)?t(d):r(d)}}const WM={name:"hardBreakEscape",tokenize:JM};function JM(e,t,r){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Be(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}const e5={name:"headingAtx",resolve:t5,tokenize:n5};function t5(e,t){let r=e.length-2,a=3,s,o;return e[a][1].type==="whitespace"&&(a+=2),r-2>a&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(a===r-1||r-4>a&&e[r-2][1].type==="whitespace")&&(r-=a+1===r?2:4),r>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[r][1].end},o={type:"chunkText",start:e[a][1].start,end:e[r][1].end,contentType:"text"},ar(e,a,r-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function n5(e,t,r){let a=0;return s;function s(m){return e.enter("atxHeading"),o(m)}function o(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&a++<6?(e.consume(m),c):m===null||Ct(m)?(e.exit("atxHeadingSequence"),d(m)):r(m)}function d(m){return m===35?(e.enter("atxHeadingSequence"),f(m)):m===null||Be(m)?(e.exit("atxHeading"),t(m)):tt(m)?ot(e,d,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function f(m){return m===35?(e.consume(m),f):(e.exit("atxHeadingSequence"),d(m))}function h(m){return m===null||m===35||Ct(m)?(e.exit("atxHeadingText"),d(m)):(e.consume(m),h)}}const r5=["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"],ky=["pre","script","style","textarea"],i5={concrete:!0,name:"htmlFlow",resolveTo:l5,tokenize:o5},a5={partial:!0,tokenize:u5},s5={partial:!0,tokenize:c5};function l5(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function o5(e,t,r){const a=this;let s,o,c,d,f;return h;function h(L){return m(L)}function m(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),p}function p(L){return L===33?(e.consume(L),y):L===47?(e.consume(L),o=!0,N):L===63?(e.consume(L),s=3,a.interrupt?t:T):jn(L)?(e.consume(L),c=String.fromCharCode(L),S):r(L)}function y(L){return L===45?(e.consume(L),s=2,x):L===91?(e.consume(L),s=5,d=0,_):jn(L)?(e.consume(L),s=4,a.interrupt?t:T):r(L)}function x(L){return L===45?(e.consume(L),a.interrupt?t:T):r(L)}function _(L){const G="CDATA[";return L===G.charCodeAt(d++)?(e.consume(L),d===G.length?a.interrupt?t:V:_):r(L)}function N(L){return jn(L)?(e.consume(L),c=String.fromCharCode(L),S):r(L)}function S(L){if(L===null||L===47||L===62||Ct(L)){const G=L===47,q=c.toLowerCase();return!G&&!o&&ky.includes(q)?(s=1,a.interrupt?t(L):V(L)):r5.includes(c.toLowerCase())?(s=6,G?(e.consume(L),w):a.interrupt?t(L):V(L)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(L):o?k(L):E(L))}return L===45||Cn(L)?(e.consume(L),c+=String.fromCharCode(L),S):r(L)}function w(L){return L===62?(e.consume(L),a.interrupt?t:V):r(L)}function k(L){return tt(L)?(e.consume(L),k):D(L)}function E(L){return L===47?(e.consume(L),D):L===58||L===95||jn(L)?(e.consume(L),M):tt(L)?(e.consume(L),E):D(L)}function M(L){return L===45||L===46||L===58||L===95||Cn(L)?(e.consume(L),M):I(L)}function I(L){return L===61?(e.consume(L),R):tt(L)?(e.consume(L),I):E(L)}function R(L){return L===null||L===60||L===61||L===62||L===96?r(L):L===34||L===39?(e.consume(L),f=L,U):tt(L)?(e.consume(L),R):B(L)}function U(L){return L===f?(e.consume(L),f=null,Z):L===null||Be(L)?r(L):(e.consume(L),U)}function B(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||Ct(L)?I(L):(e.consume(L),B)}function Z(L){return L===47||L===62||tt(L)?E(L):r(L)}function D(L){return L===62?(e.consume(L),z):r(L)}function z(L){return L===null||Be(L)?V(L):tt(L)?(e.consume(L),z):r(L)}function V(L){return L===45&&s===2?(e.consume(L),O):L===60&&s===1?(e.consume(L),H):L===62&&s===4?(e.consume(L),j):L===63&&s===3?(e.consume(L),T):L===93&&s===5?(e.consume(L),K):Be(L)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(a5,Y,P)(L)):L===null||Be(L)?(e.exit("htmlFlowData"),P(L)):(e.consume(L),V)}function P(L){return e.check(s5,C,Y)(L)}function C(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),$}function $(L){return L===null||Be(L)?P(L):(e.enter("htmlFlowData"),V(L))}function O(L){return L===45?(e.consume(L),T):V(L)}function H(L){return L===47?(e.consume(L),c="",X):V(L)}function X(L){if(L===62){const G=c.toLowerCase();return ky.includes(G)?(e.consume(L),j):V(L)}return jn(L)&&c.length<8?(e.consume(L),c+=String.fromCharCode(L),X):V(L)}function K(L){return L===93?(e.consume(L),T):V(L)}function T(L){return L===62?(e.consume(L),j):L===45&&s===2?(e.consume(L),T):V(L)}function j(L){return L===null||Be(L)?(e.exit("htmlFlowData"),Y(L)):(e.consume(L),j)}function Y(L){return e.exit("htmlFlow"),t(L)}}function c5(e,t,r){const a=this;return s;function s(c){return Be(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):r(c)}function o(c){return a.parser.lazy[a.now().line]?r(c):t(c)}}function u5(e,t,r){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Oo,t,r)}}const d5={name:"htmlText",tokenize:f5};function f5(e,t,r){const a=this;let s,o,c;return d;function d(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),f}function f(T){return T===33?(e.consume(T),h):T===47?(e.consume(T),I):T===63?(e.consume(T),E):jn(T)?(e.consume(T),B):r(T)}function h(T){return T===45?(e.consume(T),m):T===91?(e.consume(T),o=0,_):jn(T)?(e.consume(T),k):r(T)}function m(T){return T===45?(e.consume(T),x):r(T)}function p(T){return T===null?r(T):T===45?(e.consume(T),y):Be(T)?(c=p,H(T)):(e.consume(T),p)}function y(T){return T===45?(e.consume(T),x):p(T)}function x(T){return T===62?O(T):T===45?y(T):p(T)}function _(T){const j="CDATA[";return T===j.charCodeAt(o++)?(e.consume(T),o===j.length?N:_):r(T)}function N(T){return T===null?r(T):T===93?(e.consume(T),S):Be(T)?(c=N,H(T)):(e.consume(T),N)}function S(T){return T===93?(e.consume(T),w):N(T)}function w(T){return T===62?O(T):T===93?(e.consume(T),w):N(T)}function k(T){return T===null||T===62?O(T):Be(T)?(c=k,H(T)):(e.consume(T),k)}function E(T){return T===null?r(T):T===63?(e.consume(T),M):Be(T)?(c=E,H(T)):(e.consume(T),E)}function M(T){return T===62?O(T):E(T)}function I(T){return jn(T)?(e.consume(T),R):r(T)}function R(T){return T===45||Cn(T)?(e.consume(T),R):U(T)}function U(T){return Be(T)?(c=U,H(T)):tt(T)?(e.consume(T),U):O(T)}function B(T){return T===45||Cn(T)?(e.consume(T),B):T===47||T===62||Ct(T)?Z(T):r(T)}function Z(T){return T===47?(e.consume(T),O):T===58||T===95||jn(T)?(e.consume(T),D):Be(T)?(c=Z,H(T)):tt(T)?(e.consume(T),Z):O(T)}function D(T){return T===45||T===46||T===58||T===95||Cn(T)?(e.consume(T),D):z(T)}function z(T){return T===61?(e.consume(T),V):Be(T)?(c=z,H(T)):tt(T)?(e.consume(T),z):Z(T)}function V(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),s=T,P):Be(T)?(c=V,H(T)):tt(T)?(e.consume(T),V):(e.consume(T),C)}function P(T){return T===s?(e.consume(T),s=void 0,$):T===null?r(T):Be(T)?(c=P,H(T)):(e.consume(T),P)}function C(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||Ct(T)?Z(T):(e.consume(T),C)}function $(T){return T===47||T===62||Ct(T)?Z(T):r(T)}function O(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):r(T)}function H(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),X}function X(T){return tt(T)?ot(e,K,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):K(T)}function K(T){return e.enter("htmlTextData"),c(T)}}const Op={name:"labelEnd",resolveAll:g5,resolveTo:b5,tokenize:x5},h5={tokenize:y5},m5={tokenize:v5},p5={tokenize:_5};function g5(e){let t=-1;const r=[];for(;++t=3&&(h===null||Be(h))?(e.exit("thematicBreak"),t(h)):r(h)}function f(h){return h===s?(e.consume(h),a++,f):(e.exit("thematicBreakSequence"),tt(h)?ot(e,d,"whitespace")(h):d(h))}}const Pn={continuation:{tokenize:O5},exit:D5,name:"list",tokenize:M5},C5={partial:!0,tokenize:j5},A5={partial:!0,tokenize:R5};function M5(e,t,r){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(x){const _=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:Gm(x)){if(a.containerState.type||(a.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(mu,r,h)(x):h(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(x)}return r(x)}function f(x){return Gm(x)&&++c<10?(e.consume(x),f):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):r(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,e.check(Oo,a.interrupt?r:m,e.attempt(C5,y,p))}function m(x){return a.containerState.initialBlankLine=!0,o++,y(x)}function p(x){return tt(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),y):r(x)}function y(x){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function O5(e,t,r){const a=this;return a.containerState._closeFlow=void 0,e.check(Oo,s,o);function s(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,ot(e,t,"listItemIndent",a.containerState.size+1)(d)}function o(d){return a.containerState.furtherBlankLines||!tt(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(A5,t,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,ot(e,e.attempt(Pn,t,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function R5(e,t,r){const a=this;return ot(e,s,"listItemIndent",a.containerState.size+1);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(o):r(o)}}function D5(e){e.exit(this.containerState.type)}function j5(e,t,r){const a=this;return ot(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=a.events[a.events.length-1];return!tt(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):r(o)}}const Ty={name:"setextUnderline",resolveTo:L5,tokenize:z5};function L5(e,t){let r=e.length,a,s,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){a=r;break}e[r][1].type==="paragraph"&&(s=r)}else e[r][1].type==="content"&&e.splice(r,1),!o&&e[r][1].type==="definition"&&(o=r);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",c,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function z5(e,t,r){const a=this;let s;return o;function o(h){let m=a.events.length,p;for(;m--;)if(a.events[m][1].type!=="lineEnding"&&a.events[m][1].type!=="linePrefix"&&a.events[m][1].type!=="content"){p=a.events[m][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||p)?(e.enter("setextHeadingLine"),s=h,c(h)):r(h)}function c(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===s?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),tt(h)?ot(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Be(h)?(e.exit("setextHeadingLine"),t(h)):r(h)}}const I5={tokenize:B5};function B5(e){const t=this,r=e.attempt(Oo,a,e.attempt(this.parser.constructs.flowInitial,s,ot(e,e.attempt(this.parser.constructs.flow,s,e.attempt(PM,s)),"linePrefix")));return r;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const U5={resolveAll:Ew()},H5=ww("string"),$5=ww("text");function ww(e){return{resolveAll:Ew(e==="text"?q5:void 0),tokenize:t};function t(r){const a=this,s=this.parser.constructs[e],o=r.attempt(s,c,d);return c;function c(m){return h(m)?o(m):d(m)}function d(m){if(m===null){r.consume(m);return}return r.enter("data"),r.consume(m),f}function f(m){return h(m)?(r.exit("data"),o(m)):(r.consume(m),f)}function h(m){if(m===null)return!0;const p=s[m];let y=-1;if(p)for(;++y-1){const d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function tO(e,t){let r=-1;const a=[];let s;for(;++r
",o=re=>!!re.scope,c=(re,{prefix:me})=>{if(re.startsWith("language:"))return re.replace("language:","language-");if(re.includes(".")){const Ee=re.split(".");return[`${me}${Ee.shift()}`,...Ee.map((Pe,St)=>`${Pe}${"_".repeat(St+1)}`)].join(" ")}return`${me}${re}`};class d{constructor(me,Ee){this.buffer="",this.classPrefix=Ee.classPrefix,me.walk(this)}addText(me){this.buffer+=r(me)}openNode(me){if(!o(me))return;const Ee=c(me.scope,{prefix:this.classPrefix});this.span(Ee)}closeNode(me){o(me)&&(this.buffer+=s)}value(){return this.buffer}span(me){this.buffer+=``}}const f=(re={})=>{const me={children:[]};return Object.assign(me,re),me};class h{constructor(){this.rootNode=f(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(me){this.top.children.push(me)}openNode(me){const Ee=f({scope:me});this.add(Ee),this.stack.push(Ee)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(me){return this.constructor._walk(me,this.rootNode)}static _walk(me,Ee){return typeof Ee=="string"?me.addText(Ee):Ee.children&&(me.openNode(Ee),Ee.children.forEach(Pe=>this._walk(me,Pe)),me.closeNode(Ee)),me}static _collapse(me){typeof me!="string"&&me.children&&(me.children.every(Ee=>typeof Ee=="string")?me.children=[me.children.join("")]:me.children.forEach(Ee=>{h._collapse(Ee)}))}}class m extends h{constructor(me){super(),this.options=me}addText(me){me!==""&&this.add(me)}startScope(me){this.openNode(me)}endScope(){this.closeNode()}__addSublanguage(me,Ee){const Pe=me.root;Ee&&(Pe.scope=`language:${Ee}`),this.add(Pe)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function p(re){return re?typeof re=="string"?re:re.source:null}function y(re){return N("(?=",re,")")}function x(re){return N("(?:",re,")*")}function _(re){return N("(?:",re,")?")}function N(...re){return re.map(Ee=>p(Ee)).join("")}function S(re){const me=re[re.length-1];return typeof me=="object"&&me.constructor===Object?(re.splice(re.length-1,1),me):{}}function w(...re){return"("+(S(re).capture?"":"?:")+re.map(Pe=>p(Pe)).join("|")+")"}function k(re){return new RegExp(re.toString()+"|").exec("").length-1}function E(re,me){const Ee=re&&re.exec(me);return Ee&&Ee.index===0}const M=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function I(re,{joinWith:me}){let Ee=0;return re.map(Pe=>{Ee+=1;const St=Ee;let gt=p(Pe),Ae="";for(;gt.length>0;){const Se=M.exec(gt);if(!Se){Ae+=gt;break}Ae+=gt.substring(0,Se.index),gt=gt.substring(Se.index+Se[0].length),Se[0][0]==="\\"&&Se[1]?Ae+="\\"+String(Number(Se[1])+St):(Ae+=Se[0],Se[0]==="("&&Ee++)}return Ae}).map(Pe=>`(${Pe})`).join(me)}const R=/\b\B/,U="[a-zA-Z]\\w*",B="[a-zA-Z_]\\w*",Z="\\b\\d+(\\.\\d+)?",D="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",z="\\b(0b[01]+)",V="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",P=(re={})=>{const me=/^#![ ]*\//;return re.binary&&(re.begin=N(me,/.*\b/,re.binary,/\b.*/)),a({scope:"meta",begin:me,end:/$/,relevance:0,"on:begin":(Ee,Pe)=>{Ee.index!==0&&Pe.ignoreMatch()}},re)},C={begin:"\\\\[\\s\\S]",relevance:0},$={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[C]},O={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[C]},H={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},X=function(re,me,Ee={}){const Pe=a({scope:"comment",begin:re,end:me,contains:[]},Ee);Pe.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const St=w("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Pe.contains.push({begin:N(/[ ]+/,"(",St,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Pe},K=X("//","$"),T=X("/\\*","\\*/"),j=X("#","$"),Y={scope:"number",begin:Z,relevance:0},L={scope:"number",begin:D,relevance:0},G={scope:"number",begin:z,relevance:0},q={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[C,{begin:/\[/,end:/\]/,relevance:0,contains:[C]}]},Q={scope:"title",begin:U,relevance:0},J={scope:"title",begin:B,relevance:0},W={begin:"\\.\\s*"+B,relevance:0};var ce=Object.freeze({__proto__:null,APOS_STRING_MODE:$,BACKSLASH_ESCAPE:C,BINARY_NUMBER_MODE:G,BINARY_NUMBER_RE:z,COMMENT:X,C_BLOCK_COMMENT_MODE:T,C_LINE_COMMENT_MODE:K,C_NUMBER_MODE:L,C_NUMBER_RE:D,END_SAME_AS_BEGIN:function(re){return Object.assign(re,{"on:begin":(me,Ee)=>{Ee.data._beginMatch=me[1]},"on:end":(me,Ee)=>{Ee.data._beginMatch!==me[1]&&Ee.ignoreMatch()}})},HASH_COMMENT_MODE:j,IDENT_RE:U,MATCH_NOTHING_RE:R,METHOD_GUARD:W,NUMBER_MODE:Y,NUMBER_RE:Z,PHRASAL_WORDS_MODE:H,QUOTE_STRING_MODE:O,REGEXP_MODE:q,RE_STARTERS_RE:V,SHEBANG:P,TITLE_MODE:Q,UNDERSCORE_IDENT_RE:B,UNDERSCORE_TITLE_MODE:J});function fe(re,me){re.input[re.index-1]==="."&&me.ignoreMatch()}function be(re,me){re.className!==void 0&&(re.scope=re.className,delete re.className)}function we(re,me){me&&re.beginKeywords&&(re.begin="\\b("+re.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",re.__beforeBegin=fe,re.keywords=re.keywords||re.beginKeywords,delete re.beginKeywords,re.relevance===void 0&&(re.relevance=0))}function Ne(re,me){Array.isArray(re.illegal)&&(re.illegal=w(...re.illegal))}function je(re,me){if(re.match){if(re.begin||re.end)throw new Error("begin & end are not supported with match");re.begin=re.match,delete re.match}}function $e(re,me){re.relevance===void 0&&(re.relevance=1)}const st=(re,me)=>{if(!re.beforeMatch)return;if(re.starts)throw new Error("beforeMatch cannot be used with starts");const Ee=Object.assign({},re);Object.keys(re).forEach(Pe=>{delete re[Pe]}),re.keywords=Ee.keywords,re.begin=N(Ee.beforeMatch,y(Ee.begin)),re.starts={relevance:0,contains:[Object.assign(Ee,{endsParent:!0})]},re.relevance=0,delete Ee.beforeMatch},Rt=["of","and","for","in","not","or","if","then","parent","list","value"],Yt="keyword";function Pt(re,me,Ee=Yt){const Pe=Object.create(null);return typeof re=="string"?St(Ee,re.split(" ")):Array.isArray(re)?St(Ee,re):Object.keys(re).forEach(function(gt){Object.assign(Pe,Pt(re[gt],me,gt))}),Pe;function St(gt,Ae){me&&(Ae=Ae.map(Se=>Se.toLowerCase())),Ae.forEach(function(Se){const Ue=Se.split("|");Pe[Ue[0]]=[gt,Xt(Ue[0],Ue[1])]})}}function Xt(re,me){return me?Number(me):Yn(re)?0:1}function Yn(re){return Rt.includes(re.toLowerCase())}const En={},ct=re=>{console.error(re)},It=(re,...me)=>{console.log(`WARN: ${re}`,...me)},ue=(re,me)=>{En[`${re}/${me}`]||(console.log(`Deprecated as of ${re}. ${me}`),En[`${re}/${me}`]=!0)},xe=new Error;function Oe(re,me,{key:Ee}){let Pe=0;const St=re[Ee],gt={},Ae={};for(let Se=1;Se<=me.length;Se++)Ae[Se+Pe]=St[Se],gt[Se+Pe]=!0,Pe+=k(me[Se-1]);re[Ee]=Ae,re[Ee]._emit=gt,re[Ee]._multi=!0}function Fe(re){if(Array.isArray(re.begin)){if(re.skip||re.excludeBegin||re.returnBegin)throw ct("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),xe;if(typeof re.beginScope!="object"||re.beginScope===null)throw ct("beginScope must be object"),xe;Oe(re,re.begin,{key:"beginScope"}),re.begin=I(re.begin,{joinWith:""})}}function Ze(re){if(Array.isArray(re.end)){if(re.skip||re.excludeEnd||re.returnEnd)throw ct("skip, excludeEnd, returnEnd not compatible with endScope: {}"),xe;if(typeof re.endScope!="object"||re.endScope===null)throw ct("endScope must be object"),xe;Oe(re,re.end,{key:"endScope"}),re.end=I(re.end,{joinWith:""})}}function on(re){re.scope&&typeof re.scope=="object"&&re.scope!==null&&(re.beginScope=re.scope,delete re.scope)}function Nn(re){on(re),typeof re.beginScope=="string"&&(re.beginScope={_wrap:re.beginScope}),typeof re.endScope=="string"&&(re.endScope={_wrap:re.endScope}),Fe(re),Ze(re)}function Kt(re){function me(Ae,Se){return new RegExp(p(Ae),"m"+(re.case_insensitive?"i":"")+(re.unicodeRegex?"u":"")+(Se?"g":""))}class Ee{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Se,Ue){Ue.position=this.position++,this.matchIndexes[this.matchAt]=Ue,this.regexes.push([Ue,Se]),this.matchAt+=k(Se)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Se=this.regexes.map(Ue=>Ue[1]);this.matcherRe=me(I(Se,{joinWith:"|"}),!0),this.lastIndex=0}exec(Se){this.matcherRe.lastIndex=this.lastIndex;const Ue=this.matcherRe.exec(Se);if(!Ue)return null;const Bt=Ue.findIndex((xr,Si)=>Si>0&&xr!==void 0),Mt=this.matchIndexes[Bt];return Ue.splice(0,Bt),Object.assign(Ue,Mt)}}class Pe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Se){if(this.multiRegexes[Se])return this.multiRegexes[Se];const Ue=new Ee;return this.rules.slice(Se).forEach(([Bt,Mt])=>Ue.addRule(Bt,Mt)),Ue.compile(),this.multiRegexes[Se]=Ue,Ue}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Se,Ue){this.rules.push([Se,Ue]),Ue.type==="begin"&&this.count++}exec(Se){const Ue=this.getMatcher(this.regexIndex);Ue.lastIndex=this.lastIndex;let Bt=Ue.exec(Se);if(this.resumingScanAtSamePosition()&&!(Bt&&Bt.index===this.lastIndex)){const Mt=this.getMatcher(0);Mt.lastIndex=this.lastIndex+1,Bt=Mt.exec(Se)}return Bt&&(this.regexIndex+=Bt.position+1,this.regexIndex===this.count&&this.considerAll()),Bt}}function St(Ae){const Se=new Pe;return Ae.contains.forEach(Ue=>Se.addRule(Ue.begin,{rule:Ue,type:"begin"})),Ae.terminatorEnd&&Se.addRule(Ae.terminatorEnd,{type:"end"}),Ae.illegal&&Se.addRule(Ae.illegal,{type:"illegal"}),Se}function gt(Ae,Se){const Ue=Ae;if(Ae.isCompiled)return Ue;[be,je,Nn,st].forEach(Mt=>Mt(Ae,Se)),re.compilerExtensions.forEach(Mt=>Mt(Ae,Se)),Ae.__beforeBegin=null,[we,Ne,$e].forEach(Mt=>Mt(Ae,Se)),Ae.isCompiled=!0;let Bt=null;return typeof Ae.keywords=="object"&&Ae.keywords.$pattern&&(Ae.keywords=Object.assign({},Ae.keywords),Bt=Ae.keywords.$pattern,delete Ae.keywords.$pattern),Bt=Bt||/\w+/,Ae.keywords&&(Ae.keywords=Pt(Ae.keywords,re.case_insensitive)),Ue.keywordPatternRe=me(Bt,!0),Se&&(Ae.begin||(Ae.begin=/\B|\b/),Ue.beginRe=me(Ue.begin),!Ae.end&&!Ae.endsWithParent&&(Ae.end=/\B|\b/),Ae.end&&(Ue.endRe=me(Ue.end)),Ue.terminatorEnd=p(Ue.end)||"",Ae.endsWithParent&&Se.terminatorEnd&&(Ue.terminatorEnd+=(Ae.end?"|":"")+Se.terminatorEnd)),Ae.illegal&&(Ue.illegalRe=me(Ae.illegal)),Ae.contains||(Ae.contains=[]),Ae.contains=[].concat(...Ae.contains.map(function(Mt){return Wt(Mt==="self"?Ae:Mt)})),Ae.contains.forEach(function(Mt){gt(Mt,Ue)}),Ae.starts&>(Ae.starts,Se),Ue.matcher=St(Ue),Ue}if(re.compilerExtensions||(re.compilerExtensions=[]),re.contains&&re.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return re.classNameAliases=a(re.classNameAliases||{}),gt(re)}function At(re){return re?re.endsWithParent||At(re.starts):!1}function Wt(re){return re.variants&&!re.cachedVariants&&(re.cachedVariants=re.variants.map(function(me){return a(re,{variants:null},me)})),re.cachedVariants?re.cachedVariants:At(re)?a(re,{starts:re.starts?a(re.starts):null}):Object.isFrozen(re)?a(re):re}var ut="11.11.1";class zn extends Error{constructor(me,Ee){super(me),this.name="HTMLInjectionError",this.html=Ee}}const cn=r,Ni=a,nt=Symbol("nomatch"),Xn=7,Mn=function(re){const me=Object.create(null),Ee=Object.create(null),Pe=[];let St=!0;const gt="Could not find the language '{}', did you forget to load/include a language module?",Ae={disableAutodetect:!0,name:"Plain text",contains:[]};let Se={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:m};function Ue(ye){return Se.noHighlightRe.test(ye)}function Bt(ye){let Le=ye.className+" ";Le+=ye.parentNode?ye.parentNode.className:"";const Qe=Se.languageDetectRe.exec(Le);if(Qe){const ft=bn(Qe[1]);return ft||(It(gt.replace("{}",Qe[1])),It("Falling back to no-highlight mode for this block.",ye)),ft?Qe[1]:"no-highlight"}return Le.split(/\s+/).find(ft=>Ue(ft)||bn(ft))}function Mt(ye,Le,Qe){let ft="",Ht="";typeof Le=="object"?(ft=ye,Qe=Le.ignoreIllegals,Ht=Le.language):(ue("10.7.0","highlight(lang, code, ...args) has been deprecated."),ue("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),Ht=ye,ft=Le),Qe===void 0&&(Qe=!0);const pn={code:ft,language:Ht};Jr("before:highlight",pn);const On=pn.result?pn.result:xr(pn.language,pn.code,Qe);return On.code=pn.code,Jr("after:highlight",On),On}function xr(ye,Le,Qe,ft){const Ht=Object.create(null);function pn(_e,Re){return _e.keywords[Re]}function On(){if(!qe.keywords){Jt.addText(bt);return}let _e=0;qe.keywordPatternRe.lastIndex=0;let Re=qe.keywordPatternRe.exec(bt),Ye="";for(;Re;){Ye+=bt.substring(_e,Re.index);const rt=un.case_insensitive?Re[0].toLowerCase():Re[0],$t=pn(qe,rt);if($t){const[or,al]=$t;if(Jt.addText(Ye),Ye="",Ht[rt]=(Ht[rt]||0)+1,Ht[rt]<=Xn&&(Ri+=al),or.startsWith("_"))Ye+=Re[0];else{const $o=un.classNameAliases[or]||or;Rn(Re[0],$o)}}else Ye+=Re[0];_e=qe.keywordPatternRe.lastIndex,Re=qe.keywordPatternRe.exec(bt)}Ye+=bt.substring(_e),Jt.addText(Ye)}function Sn(){if(bt==="")return;let _e=null;if(typeof qe.subLanguage=="string"){if(!me[qe.subLanguage]){Jt.addText(bt);return}_e=xr(qe.subLanguage,bt,!0,Ho[qe.subLanguage]),Ho[qe.subLanguage]=_e._top}else _e=ki(bt,qe.subLanguage.length?qe.subLanguage:null);qe.relevance>0&&(Ri+=_e.relevance),Jt.__addSublanguage(_e._emitter,_e.language)}function _t(){qe.subLanguage!=null?Sn():On(),bt=""}function Rn(_e,Re){_e!==""&&(Jt.startScope(Re),Jt.addText(_e),Jt.endScope())}function ts(_e,Re){let Ye=1;const rt=Re.length-1;for(;Ye<=rt;){if(!_e._emit[Ye]){Ye++;continue}const $t=un.classNameAliases[_e[Ye]]||_e[Ye],or=Re[Ye];$t?Rn(or,$t):(bt=or,On(),bt=""),Ye++}}function Ai(_e,Re){return _e.scope&&typeof _e.scope=="string"&&Jt.openNode(un.classNameAliases[_e.scope]||_e.scope),_e.beginScope&&(_e.beginScope._wrap?(Rn(bt,un.classNameAliases[_e.beginScope._wrap]||_e.beginScope._wrap),bt=""):_e.beginScope._multi&&(ts(_e.beginScope,Re),bt="")),qe=Object.create(_e,{parent:{value:qe}}),qe}function Ur(_e,Re,Ye){let rt=E(_e.endRe,Ye);if(rt){if(_e["on:end"]){const $t=new t(_e);_e["on:end"](Re,$t),$t.isMatchIgnored&&(rt=!1)}if(rt){for(;_e.endsParent&&_e.parent;)_e=_e.parent;return _e}}if(_e.endsWithParent)return Ur(_e.parent,Re,Ye)}function Mi(_e){return qe.matcher.regexIndex===0?(bt+=_e[0],1):(Di=!0,0)}function ns(_e){const Re=_e[0],Ye=_e.rule,rt=new t(Ye),$t=[Ye.__beforeBegin,Ye["on:begin"]];for(const or of $t)if(or&&(or(_e,rt),rt.isMatchIgnored))return Mi(Re);return Ye.skip?bt+=Re:(Ye.excludeBegin&&(bt+=Re),_t(),!Ye.returnBegin&&!Ye.excludeBegin&&(bt=Re)),Ai(Ye,_e),Ye.returnBegin?0:Re.length}function kn(_e){const Re=_e[0],Ye=Le.substring(_e.index),rt=Ur(qe,_e,Ye);if(!rt)return nt;const $t=qe;qe.endScope&&qe.endScope._wrap?(_t(),Rn(Re,qe.endScope._wrap)):qe.endScope&&qe.endScope._multi?(_t(),ts(qe.endScope,_e)):$t.skip?bt+=Re:($t.returnEnd||$t.excludeEnd||(bt+=Re),_t(),$t.excludeEnd&&(bt=Re));do qe.scope&&Jt.closeNode(),!qe.skip&&!qe.subLanguage&&(Ri+=qe.relevance),qe=qe.parent;while(qe!==rt.parent);return rt.starts&&Ai(rt.starts,_e),$t.returnEnd?0:Re.length}function ba(){const _e=[];for(let Re=qe;Re!==un;Re=Re.parent)Re.scope&&_e.unshift(Re.scope);_e.forEach(Re=>Jt.openNode(Re))}let Er={};function Oi(_e,Re){const Ye=Re&&Re[0];if(bt+=_e,Ye==null)return _t(),0;if(Er.type==="begin"&&Re.type==="end"&&Er.index===Re.index&&Ye===""){if(bt+=Le.slice(Re.index,Re.index+1),!St){const rt=new Error(`0 width match regex (${ye})`);throw rt.languageName=ye,rt.badRule=Er.rule,rt}return 1}if(Er=Re,Re.type==="begin")return ns(Re);if(Re.type==="illegal"&&!Qe){const rt=new Error('Illegal lexeme "'+Ye+'" for mode "'+(qe.scope||"")+'"');throw rt.mode=qe,rt}else if(Re.type==="end"){const rt=kn(Re);if(rt!==nt)return rt}if(Re.type==="illegal"&&Ye==="")return bt+=` -`,1;if(il>1e5&&il>Re.index*3)throw new Error("potential infinite loop, way more iterations than matches");return bt+=Ye,Ye.length}const un=bn(ye);if(!un)throw ct(gt.replace("{}",ye)),new Error('Unknown language: "'+ye+'"');const xa=Kt(un);let rs="",qe=ft||xa;const Ho={},Jt=new Se.__emitter(Se);ba();let bt="",Ri=0,ei=0,il=0,Di=!1;try{if(un.__emitTokens)un.__emitTokens(Le,Jt);else{for(qe.matcher.considerAll();;){il++,Di?Di=!1:qe.matcher.considerAll(),qe.matcher.lastIndex=ei;const _e=qe.matcher.exec(Le);if(!_e)break;const Re=Le.substring(ei,_e.index),Ye=Oi(Re,_e);ei=_e.index+Ye}Oi(Le.substring(ei))}return Jt.finalize(),rs=Jt.toHTML(),{language:ye,value:rs,relevance:Ri,illegal:!1,_emitter:Jt,_top:qe}}catch(_e){if(_e.message&&_e.message.includes("Illegal"))return{language:ye,value:cn(Le),illegal:!0,relevance:0,_illegalBy:{message:_e.message,index:ei,context:Le.slice(ei-100,ei+100),mode:_e.mode,resultSoFar:rs},_emitter:Jt};if(St)return{language:ye,value:cn(Le),illegal:!1,relevance:0,errorRaised:_e,_emitter:Jt,_top:qe};throw _e}}function Si(ye){const Le={value:cn(ye),illegal:!1,relevance:0,_top:Ae,_emitter:new Se.__emitter(Se)};return Le._emitter.addText(ye),Le}function ki(ye,Le){Le=Le||Se.languages||Object.keys(me);const Qe=Si(ye),ft=Le.filter(bn).filter(_r).map(_t=>xr(_t,ye,!1));ft.unshift(Qe);const Ht=ft.sort((_t,Rn)=>{if(_t.relevance!==Rn.relevance)return Rn.relevance-_t.relevance;if(_t.language&&Rn.language){if(bn(_t.language).supersetOf===Rn.language)return 1;if(bn(Rn.language).supersetOf===_t.language)return-1}return 0}),[pn,On]=Ht,Sn=pn;return Sn.secondBest=On,Sn}function lr(ye,Le,Qe){const ft=Le&&Ee[Le]||Qe;ye.classList.add("hljs"),ye.classList.add(`language-${ft}`)}function Ut(ye){let Le=null;const Qe=Bt(ye);if(Ue(Qe))return;if(Jr("before:highlightElement",{el:ye,language:Qe}),ye.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ye);return}if(ye.children.length>0&&(Se.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ye)),Se.throwUnescapedHTML))throw new zn("One of your code blocks includes unescaped HTML.",ye.innerHTML);Le=ye;const ft=Le.textContent,Ht=Qe?Mt(ft,{language:Qe,ignoreIllegals:!0}):ki(ft);ye.innerHTML=Ht.value,ye.dataset.highlighted="yes",lr(ye,Qe,Ht.language),ye.result={language:Ht.language,re:Ht.relevance,relevance:Ht.relevance},Ht.secondBest&&(ye.secondBest={language:Ht.secondBest.language,relevance:Ht.secondBest.relevance}),Jr("after:highlightElement",{el:ye,result:Ht,text:ft})}function mn(ye){Se=Ni(Se,ye)}const yr=()=>{Ci(),ue("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ti(){Ci(),ue("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let pa=!1;function Ci(){function ye(){Ci()}if(document.readyState==="loading"){pa||window.addEventListener("DOMContentLoaded",ye,!1),pa=!0;return}document.querySelectorAll(Se.cssSelector).forEach(Ut)}function Ja(ye,Le){let Qe=null;try{Qe=Le(re)}catch(ft){if(ct("Language definition for '{}' could not be registered.".replace("{}",ye)),St)ct(ft);else throw ft;Qe=Ae}Qe.name||(Qe.name=ye),me[ye]=Qe,Qe.rawDefinition=Le.bind(null,re),Qe.aliases&&vr(Qe.aliases,{languageName:ye})}function Wr(ye){delete me[ye];for(const Le of Object.keys(Ee))Ee[Le]===ye&&delete Ee[Le]}function ga(){return Object.keys(me)}function bn(ye){return ye=(ye||"").toLowerCase(),me[ye]||me[Ee[ye]]}function vr(ye,{languageName:Le}){typeof ye=="string"&&(ye=[ye]),ye.forEach(Qe=>{Ee[Qe.toLowerCase()]=Le})}function _r(ye){const Le=bn(ye);return Le&&!Le.disableAutodetect}function Br(ye){ye["before:highlightBlock"]&&!ye["before:highlightElement"]&&(ye["before:highlightElement"]=Le=>{ye["before:highlightBlock"](Object.assign({block:Le.el},Le))}),ye["after:highlightBlock"]&&!ye["after:highlightElement"]&&(ye["after:highlightElement"]=Le=>{ye["after:highlightBlock"](Object.assign({block:Le.el},Le))})}function Ft(ye){Br(ye),Pe.push(ye)}function es(ye){const Le=Pe.indexOf(ye);Le!==-1&&Pe.splice(Le,1)}function Jr(ye,Le){const Qe=ye;Pe.forEach(function(ft){ft[Qe]&&ft[Qe](Le)})}function wr(ye){return ue("10.7.0","highlightBlock will be removed entirely in v12.0"),ue("10.7.0","Please use highlightElement now."),Ut(ye)}Object.assign(re,{highlight:Mt,highlightAuto:ki,highlightAll:Ci,highlightElement:Ut,highlightBlock:wr,configure:mn,initHighlighting:yr,initHighlightingOnLoad:Ti,registerLanguage:Ja,unregisterLanguage:Wr,listLanguages:ga,getLanguage:bn,registerAliases:vr,autoDetection:_r,inherit:Ni,addPlugin:Ft,removePlugin:es}),re.debugMode=function(){St=!1},re.safeMode=function(){St=!0},re.versionString=ut,re.regex={concat:N,lookahead:y,either:w,optional:_,anyNumberOfTimes:x};for(const ye in ce)typeof ce[ye]=="object"&&e(ce[ye]);return Object.assign(re,ce),re},hn=Mn({});return hn.newInstance=()=>Mn({}),Rh=hn,hn.HighlightJS=hn,hn.default=hn,Rh}var Dh,Jy;function P4(){if(Jy)return Dh;Jy=1;function e(t){const r=t.regex,a=r.concat(/[\p{L}_]/u,r.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},c={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},d=t.inherit(c,{begin:/\(/,end:/\)/}),f=t.inherit(t.APOS_STRING_MODE,{className:"string"}),h=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),m={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[c,h,f,d,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[c,d,h,f]}]}]},t.COMMENT(//,{relevance:10}),{begin://,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:r.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:a,relevance:0,starts:m}]},{className:"tag",begin:r.concat(/<\//,r.lookahead(r.concat(a,/>/))),contains:[{className:"name",begin:a,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return Dh=e,Dh}var jh,ev;function F4(){if(ev)return jh;ev=1;function e(t){const r=t.regex,a={},s={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[a]}]};Object.assign(a,{className:"variable",variants:[{begin:r.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},s]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},c=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),d={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,a,o]};o.contains.push(f);const h={match:/\\"/},m={className:"string",begin:/'/,end:/'/},p={match:/\\'/},y={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,a]},x=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],_=t.SHEBANG({binary:`(${x.join("|")})`,relevance:10}),N={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},S=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],w=["true","false"],k={match:/(\/[a-z._-]+)+/},E=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],M=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],I=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],R=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:S,literal:w,built_in:[...E,...M,"set","shopt",...I,...R]},contains:[_,t.SHEBANG(),N,y,c,d,k,f,h,m,p,a]}}return jh=e,jh}var Lh,tv;function G4(){if(tv)return Lh;tv=1;function e(t){const r=t.regex,a=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",d="("+s+"|"+r.optional(o)+"[a-zA-Z_]\\w*"+r.optional("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},p={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},y={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},a,t.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:r.optional(o)+t.IDENT_RE,relevance:0},_=r.optional(o)+t.IDENT_RE+"\\s*\\(",w={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},k=[y,f,a,t.C_BLOCK_COMMENT_MODE,p,m],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:w,contains:k.concat([{begin:/\(/,end:/\)/,keywords:w,contains:k.concat(["self"]),relevance:0}]),relevance:0},M={begin:"("+d+"[\\*&\\s]+)+"+_,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:w,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:w,relevance:0},{begin:_,returnBegin:!0,contains:[t.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:[a,t.C_BLOCK_COMMENT_MODE,m,p,f,{begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:["self",a,t.C_BLOCK_COMMENT_MODE,m,p,f]}]},f,a,t.C_BLOCK_COMMENT_MODE,y]};return{name:"C",aliases:["h"],keywords:w,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:y,strings:m,keywords:w}}}return Lh=e,Lh}var zh,nv;function V4(){if(nv)return zh;nv=1;function e(t){const r=t.regex,a=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",d="(?!struct)("+s+"|"+r.optional(o)+"[a-zA-Z_]\\w*"+r.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},p={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},y={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},a,t.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:r.optional(o)+t.IDENT_RE,relevance:0},_=r.optional(o)+t.IDENT_RE+"\\s*\\(",N=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],w=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],k=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],I={type:S,keyword:N,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},R={className:"function.dispatch",relevance:0,keywords:{_hint:k},begin:r.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,r.lookahead(/(<[^<>]+>|)\s*\(/))},U=[R,y,f,a,t.C_BLOCK_COMMENT_MODE,p,m],B={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:I,contains:U.concat([{begin:/\(/,end:/\)/,keywords:I,contains:U.concat(["self"]),relevance:0}]),relevance:0},Z={className:"function",begin:"("+d+"[\\*&\\s]+)+"+_,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:I,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:I,relevance:0},{begin:_,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,p]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:I,relevance:0,contains:[a,t.C_BLOCK_COMMENT_MODE,m,p,f,{begin:/\(/,end:/\)/,keywords:I,relevance:0,contains:["self",a,t.C_BLOCK_COMMENT_MODE,m,p,f]}]},f,a,t.C_BLOCK_COMMENT_MODE,y]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:I,illegal:"",keywords:I,contains:["self",f]},{begin:t.IDENT_RE+"::",keywords:I},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return zh=e,zh}var Ih,rv;function Y4(){if(rv)return Ih;rv=1;function e(t){const r=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],a=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],s=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],c=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],d={keyword:o.concat(c),built_in:r,literal:s},f=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},m={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},p={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},y=t.inherit(p,{illegal:/\n/}),x={className:"subst",begin:/\{/,end:/\}/,keywords:d},_=t.inherit(x,{illegal:/\n/}),N={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,_]},S={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]},w=t.inherit(S,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},_]});x.contains=[S,N,p,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,t.C_BLOCK_COMMENT_MODE],_.contains=[w,N,y,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const k={variants:[m,S,N,p,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},M=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",I={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:d,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},k,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,E,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,E,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+M+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:d,contains:[{beginKeywords:a.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,E],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,relevance:0,contains:[k,h,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},I]}}return Ih=e,Ih}var Bh,iv;function X4(){if(iv)return Bh;iv=1;const e=h=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:h.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:h.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],a=[...t,...r],s=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),d=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function f(h){const m=h.regex,p=e(h),y={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},x="and or not only",_=/@-?\w[\w]*(-\w+)*/,N="[a-zA-Z-][a-zA-Z0-9_-]*",S=[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[p.BLOCK_COMMENT,y,p.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+N,relevance:0},p.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+o.join("|")+")"},{begin:":(:)?("+c.join("|")+")"}]},p.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[p.BLOCK_COMMENT,p.HEXCOLOR,p.IMPORTANT,p.CSS_NUMBER_MODE,...S,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...S,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},p.FUNCTION_DISPATCH]},{begin:m.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:_},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:x,attribute:s.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...S,p.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+a.join("|")+")\\b"}]}}return Bh=f,Bh}var Uh,av;function K4(){if(av)return Uh;av=1;function e(t){const r=t.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},s={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},c={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},d={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:r.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},m={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},p={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},y=t.inherit(m,{contains:[]}),x=t.inherit(p,{contains:[]});m.contains.push(x),p.contains.push(y);let _=[a,h];return[m,p,y,x].forEach(k=>{k.contains=k.contains.concat(_)}),_=_.concat(m,p),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:_},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:_}]}]},a,c,m,p,{className:"quote",begin:"^>\\s+",contains:_,end:"$"},o,s,h,d,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return Uh=e,Uh}var Hh,sv;function Z4(){if(sv)return Hh;sv=1;function e(t){const r=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:r.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:r.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return Hh=e,Hh}var $h,lv;function Q4(){if(lv)return $h;lv=1;function e(t){const r=t.regex,a="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s=r.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=r.concat(s,/(::\w+)*/),d={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},f={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},m=[t.COMMENT("#","$",{contains:[f]}),t.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],p={className:"subst",begin:/#\{/,end:/\}/,keywords:d},y={className:"string",contains:[t.BACKSLASH_ESCAPE,p],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:r.concat(/<<[-~]?'?/,r.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,p]})]}]},x="[1-9](_?[0-9])*|0",_="[0-9](_?[0-9])*",N={className:"number",relevance:0,variants:[{begin:`\\b(${x})(\\.(${_}))?([eE][+-]?(${_})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},S={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:d}]},U=[y,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:d},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:d},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:s,scope:"title.class"},{match:[/def/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[S]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[y,{begin:a}],relevance:0},N,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:d},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,p],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(h,m),relevance:0}].concat(h,m);p.contains=U,S.contains=U;const z=[{begin:/^\s*=>/,starts:{end:"$",contains:U}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:d,contains:U}}];return m.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:d,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(z).concat(m).concat(U)}}return $h=e,$h}var qh,ov;function W4(){if(ov)return qh;ov=1;function e(t){const c={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:c,illegal:"s(c,d,f-1))}function o(c){const d=c.regex,f="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",h=f+s("(?:<"+f+"~~~(?:\\s*,\\s*"+f+"~~~)*>)?",/~~~/g,2),_={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},N={className:"meta",begin:"@"+f,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},S={className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[c.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:_,illegal:/<\/|#/,contains:[c.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[c.BACKSLASH_ESCAPE]},c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,f],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[d.concat(/(?!else)/,f),/\s+/,f,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,f],className:{1:"keyword",3:"title.class"},contains:[S,c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+h+"\\s+)",c.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:_,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[N,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,a,c.C_BLOCK_COMMENT_MODE]},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},a,N]}}return Gh=o,Gh}var Vh,fv;function nD(){if(fv)return Vh;fv=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],r=["true","false","null","undefined","NaN","Infinity"],a=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],o=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],d=[].concat(o,a,s);function f(h){const m=h.regex,p=(J,{after:W})=>{const te="",end:""},_=/<[A-Za-z0-9\\._:-]+\s*\/>/,N={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(J,W)=>{const te=J[0].length+J.index,ce=J.input[te];if(ce==="<"||ce===","){W.ignoreMatch();return}ce===">"&&(p(J,{after:te})||W.ignoreMatch());let fe;const be=J.input.substring(te);if(fe=be.match(/^\s*=/)){W.ignoreMatch();return}if((fe=be.match(/^\s+extends\s+/))&&fe.index===0){W.ignoreMatch();return}}},S={$pattern:e,keyword:t,literal:r,built_in:d,"variable.language":c},w="[0-9](_?[0-9])*",k=`\\.(${w})`,E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",M={className:"number",variants:[{begin:`(\\b(${E})((${k})|\\.)?|(${k}))[eE][+-]?(${w})\\b`},{begin:`\\b(${E})\\b((${k})\\b|\\.)?|(${k})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},I={className:"subst",begin:"\\$\\{",end:"\\}",keywords:S,contains:[]},R={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,I],subLanguage:"xml"}},U={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,I],subLanguage:"css"}},B={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,I],subLanguage:"graphql"}},Z={className:"string",begin:"`",end:"`",contains:[h.BACKSLASH_ESCAPE,I]},z={className:"comment",variants:[h.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:y+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),h.C_BLOCK_COMMENT_MODE,h.C_LINE_COMMENT_MODE]},V=[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE,R,U,B,Z,{match:/\$\d+/},M];I.contains=V.concat({begin:/\{/,end:/\}/,keywords:S,contains:["self"].concat(V)});const P=[].concat(z,I.contains),C=P.concat([{begin:/(\s*)\(/,end:/\)/,keywords:S,contains:["self"].concat(P)}]),$={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:S,contains:C},O={variants:[{match:[/class/,/\s+/,y,/\s+/,/extends/,/\s+/,m.concat(y,"(",m.concat(/\./,y),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,y],scope:{1:"keyword",3:"title.class"}}]},H={relevance:0,match:m.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...a,...s]}},X={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},K={variants:[{match:[/function/,/\s+/,y,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[$],illegal:/%/},T={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function j(J){return m.concat("(?!",J.join("|"),")")}const Y={match:m.concat(/\b/,j([...o,"super","import"].map(J=>`${J}\\s*\\(`)),y,m.lookahead(/\s*\(/)),className:"title.function",relevance:0},L={begin:m.concat(/\./,m.lookahead(m.concat(y,/(?![0-9A-Za-z$_(])/))),end:y,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},G={match:[/get|set/,/\s+/,y,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},$]},q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+h.UNDERSCORE_IDENT_RE+")\\s*=>",Q={match:[/const|var|let/,/\s+/,y,/\s*/,/=\s*/,/(async\s*)?/,m.lookahead(q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[$]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:S,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:H},illegal:/#(?![$_A-z])/,contains:[h.SHEBANG({label:"shebang",binary:"node",relevance:5}),X,h.APOS_STRING_MODE,h.QUOTE_STRING_MODE,R,U,B,Z,z,{match:/\$\d+/},M,H,{scope:"attr",match:y+m.lookahead(":"),relevance:0},Q,{begin:"("+h.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[z,h.REGEXP_MODE,{className:"function",begin:q,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:h.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:S,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:x.begin,end:x.end},{match:_},{begin:N.begin,"on:begin":N.isTrulyOpeningTag,end:N.end}],subLanguage:"xml",contains:[{begin:N.begin,end:N.end,skip:!0,contains:["self"]}]}]},K,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+h.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[$,h.inherit(h.TITLE_MODE,{begin:y,className:"title.function"})]},{match:/\.\.\./,relevance:0},L,{match:"\\$"+y,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[$]},Y,T,O,G,{match:/\$[(.]/}]}}return Vh=f,Vh}var Yh,hv;function rD(){if(hv)return Yh;hv=1;function e(t){const r={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},a={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],o={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:s},contains:[r,a,t.QUOTE_STRING_MODE,o,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return Yh=e,Yh}var Xh,mv;function iD(){if(mv)return Xh;mv=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,r="[0-9a-fA-F](_*[0-9a-fA-F])*",a={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${r})\\.?|(${r})?\\.(${r}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${r})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function s(o){const c={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},d={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},f={className:"symbol",begin:o.UNDERSCORE_IDENT_RE+"@"},h={className:"subst",begin:/\$\{/,end:/\}/,contains:[o.C_NUMBER_MODE]},m={className:"variable",begin:"\\$"+o.UNDERSCORE_IDENT_RE},p={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[m,h]},{begin:"'",end:"'",illegal:/\n/,contains:[o.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[o.BACKSLASH_ESCAPE,m,h]}]};h.contains.push(p);const y={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+o.UNDERSCORE_IDENT_RE+")?"},x={className:"meta",begin:"@"+o.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[o.inherit(p,{className:"string"}),"self"]}]},_=a,N=o.COMMENT("/\\*","\\*/",{contains:[o.C_BLOCK_COMMENT_MODE]}),S={variants:[{className:"type",begin:o.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},w=S;return w.variants[1].contains=[S],S.variants[1].contains=[w],{name:"Kotlin",aliases:["kt","kts"],keywords:c,contains:[o.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),o.C_LINE_COMMENT_MODE,N,d,f,y,x,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:c,relevance:5,contains:[{begin:o.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[o.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:c,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[S,o.C_LINE_COMMENT_MODE,N],relevance:0},o.C_LINE_COMMENT_MODE,N,y,x,p,o.C_NUMBER_MODE]},N]},{begin:[/class|interface|trait/,/\s+/,o.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},o.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},y,x]},p,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` -`},_]}}return Xh=s,Xh}var Kh,pv;function aD(){if(pv)return Kh;pv=1;const e=m=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:m.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[m.APOS_STRING_MODE,m.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:m.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],a=[...t,...r],s=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),d=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),f=o.concat(c).sort().reverse();function h(m){const p=e(m),y=f,x="and or not only",_="[\\w-]+",N="("+_+"|@\\{"+_+"\\})",S=[],w=[],k=function(P){return{className:"string",begin:"~?"+P+".*?"+P}},E=function(P,C,$){return{className:P,begin:C,relevance:$}},M={$pattern:/[a-z-]+/,keyword:x,attribute:s.join(" ")},I={begin:"\\(",end:"\\)",contains:w,keywords:M,relevance:0};w.push(m.C_LINE_COMMENT_MODE,m.C_BLOCK_COMMENT_MODE,k("'"),k('"'),p.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},p.HEXCOLOR,I,E("variable","@@?"+_,10),E("variable","@\\{"+_+"\\}"),E("built_in","~?`[^`]*?`"),{className:"attribute",begin:_+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},p.IMPORTANT,{beginKeywords:"and not"},p.FUNCTION_DISPATCH);const R=w.concat({begin:/\{/,end:/\}/,contains:S}),U={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(w)},B={begin:N+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},p.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:w}}]},Z={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:M,returnEnd:!0,contains:w,relevance:0}},D={className:"variable",variants:[{begin:"@"+_+"\\s*:",relevance:15},{begin:"@"+_}],starts:{end:"[;}]",returnEnd:!0,contains:R}},z={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:N,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[m.C_LINE_COMMENT_MODE,m.C_BLOCK_COMMENT_MODE,U,E("keyword","all\\b"),E("variable","@\\{"+_+"\\}"),{begin:"\\b("+a.join("|")+")\\b",className:"selector-tag"},p.CSS_NUMBER_MODE,E("selector-tag",N,0),E("selector-id","#"+N),E("selector-class","\\."+N,0),E("selector-tag","&",0),p.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+o.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+c.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:R},{begin:"!important"},p.FUNCTION_DISPATCH]},V={begin:_+`:(:)?(${y.join("|")})`,returnBegin:!0,contains:[z]};return S.push(m.C_LINE_COMMENT_MODE,m.C_BLOCK_COMMENT_MODE,Z,D,V,B,z,U,p.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:S}}return Kh=h,Kh}var Zh,gv;function sD(){if(gv)return Zh;gv=1;function e(t){const r="\\[=*\\[",a="\\]=*\\]",s={begin:r,end:a,contains:["self"]},o=[t.COMMENT("--(?!"+r+")","$"),t.COMMENT("--"+r,a,{contains:[s],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:r,end:a,contains:[s],relevance:5}])}}return Zh=e,Zh}var Qh,bv;function lD(){if(bv)return Qh;bv=1;function e(t){const r={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%\{/,end:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:r.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[f]},m={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},p=[t.BACKSLASH_ESCAPE,c,h],y=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],x=(S,w,k="\\1")=>{const E=k==="\\1"?k:r.concat(k,w);return r.concat(r.concat("(?:",S,")"),w,/(?:\\.|[^\\\/])*?/,E,/(?:\\.|[^\\\/])*?/,k,s)},_=(S,w,k)=>r.concat(r.concat("(?:",S,")"),w,/(?:\\.|[^\\\/])*?/,k,s),N=[h,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),d,{className:"string",contains:p,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},m,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:x("s|tr|y",r.either(...y,{capture:!0}))},{begin:x("s|tr|y","\\(","\\)")},{begin:x("s|tr|y","\\[","\\]")},{begin:x("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:_("(?:m|qr)?",/\//,/\//)},{begin:_("m|qr",r.either(...y,{capture:!0}),/\1/)},{begin:_("m|qr",/\(/,/\)/)},{begin:_("m|qr",/\[/,/\]/)},{begin:_("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,f]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,f,m]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return c.contains=N,d.contains=N,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:N}}return Wh=e,Wh}var Jh,yv;function cD(){if(yv)return Jh;yv=1;function e(t){const r={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},a=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:a,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},h={$pattern:a,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:f,illegal:"/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}return Jh=e,Jh}var em,vv;function uD(){if(vv)return em;vv=1;function e(t){const r=t.regex,a=/(?![A-Za-z0-9])(?![$])/,s=r.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,a),o=r.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,a),c=r.concat(/[A-Z]+/,a),d={scope:"variable",match:"\\$+"+s},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},m=t.inherit(t.APOS_STRING_MODE,{illegal:null}),p=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(h)}),y={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(h),"on:begin":($,O)=>{O.data._beginMatch=$[1]||$[2]},"on:end":($,O)=>{O.data._beginMatch!==$[1]&&O.ignoreMatch()}},x=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),_=`[ -]`,N={scope:"string",variants:[p,m,y,x]},S={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},w=["false","null","true"],k=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],E=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],I={keyword:k,literal:($=>{const O=[];return $.forEach(H=>{O.push(H),H.toLowerCase()===H?O.push(H.toUpperCase()):O.push(H.toLowerCase())}),O})(w),built_in:E},R=$=>$.map(O=>O.replace(/\|\d+$/,"")),U={variants:[{match:[/new/,r.concat(_,"+"),r.concat("(?!",R(E).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},B=r.concat(s,"\\b(?!\\()"),Z={variants:[{match:[r.concat(/::/,r.lookahead(/(?!class\b)/)),B],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,r.concat(/::/,r.lookahead(/(?!class\b)/)),B],scope:{1:"title.class",3:"variable.constant"}},{match:[o,r.concat("::",r.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},D={scope:"attr",match:r.concat(s,r.lookahead(":"),r.lookahead(/(?!::)/))},z={relevance:0,begin:/\(/,end:/\)/,keywords:I,contains:[D,d,Z,t.C_BLOCK_COMMENT_MODE,N,S,U]},V={relevance:0,match:[/\b/,r.concat("(?!fn\\b|function\\b|",R(k).join("\\b|"),"|",R(E).join("\\b|"),"\\b)"),s,r.concat(_,"*"),r.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[z]};z.contains.push(V);const P=[D,Z,t.C_BLOCK_COMMENT_MODE,N,S,U],C={begin:r.concat(/#\[\s*\\?/,r.either(o,c)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:w,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:w,keyword:["new","array"]},contains:["self",...P]},...P,{scope:"meta",variants:[{match:o},{match:c}]}]};return{case_insensitive:!1,keywords:I,contains:[C,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},d,V,Z,{match:[/const/,/\s/,s],scope:{1:"keyword",3:"variable.constant"}},U,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:I,contains:["self",C,d,Z,t.C_BLOCK_COMMENT_MODE,N,S]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},N,S]}}return em=e,em}var tm,_v;function dD(){if(_v)return tm;_v=1;function e(t){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return tm=e,tm}var nm,wv;function fD(){if(wv)return nm;wv=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return nm=e,nm}var rm,Ev;function hD(){if(Ev)return rm;Ev=1;function e(t){const r=t.regex,a=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],f={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},m={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},p={begin:/\{\{/,relevance:0},y={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,h,p,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,h,p,m]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,p,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,p,m]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},x="[0-9](_?[0-9])*",_=`(\\b(${x}))?\\.(${x})|\\b(${x})\\.`,N=`\\b|${s.join("|")}`,S={className:"number",relevance:0,variants:[{begin:`(\\b(${x})|(${_}))[eE][+-]?(${x})[jJ]?(?=${N})`},{begin:`(${_})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${N})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${N})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${N})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${N})`},{begin:`\\b(${x})[jJ](?=${N})`}]},w={className:"comment",begin:r.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},k={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",h,S,y,t.HASH_COMMENT_MODE]}]};return m.contains=[y,S,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[h,S,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},y,w,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[k]},{variants:[{match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[S,k,y]}]}}return rm=e,rm}var im,Nv;function mD(){if(Nv)return im;Nv=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return im=e,im}var am,Sv;function pD(){if(Sv)return am;Sv=1;function e(t){const r=t.regex,a=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,s=r.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,c=r.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:a,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:r.lookahead(r.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:a},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,s]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,s]},{scope:{1:"punctuation",2:"number"},match:[c,s]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,s]}]},{scope:{3:"operator"},match:[a,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:c},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return am=e,am}var sm,kv;function gD(){if(kv)return sm;kv=1;function e(t){const r=t.regex,a=/(r#)?/,s=r.concat(a,t.UNDERSCORE_IDENT_RE),o=r.concat(a,t.IDENT_RE),c={className:"title.function.invoke",relevance:0,begin:r.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,r.lookahead(/\s*\(/))},d="([ui](8|16|32|64|128|size)|f(32|64))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],h=["true","false","Some","None","Ok","Err"],m=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],p=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:p,keyword:f,literal:h,built_in:m},illegal:""},c]}}return sm=e,sm}var lm,Tv;function bD(){if(Tv)return lm;Tv=1;const e=h=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:h.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:h.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],a=[...t,...r],s=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),d=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function f(h){const m=e(h),p=c,y=o,x="@[a-z-]+",_="and or not only",S={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[h.C_LINE_COMMENT_MODE,h.C_BLOCK_COMMENT_MODE,m.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},m.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+a.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+y.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+p.join("|")+")"},S,{begin:/\(/,end:/\)/,contains:[m.CSS_NUMBER_MODE]},m.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[m.BLOCK_COMMENT,S,m.HEXCOLOR,m.CSS_NUMBER_MODE,h.QUOTE_STRING_MODE,h.APOS_STRING_MODE,m.IMPORTANT,m.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:x,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:_,attribute:s.join(" ")},contains:[{begin:x,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},S,h.QUOTE_STRING_MODE,h.APOS_STRING_MODE,m.HEXCOLOR,m.CSS_NUMBER_MODE]},m.FUNCTION_DISPATCH]}}return lm=f,lm}var om,Cv;function xD(){if(Cv)return om;Cv=1;function e(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return om=e,om}var cm,Av;function yD(){if(Av)return cm;Av=1;function e(t){const r=t.regex,a=t.COMMENT("--","$"),s={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},c=["true","false","unknown"],d=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],h=["add","asc","collation","desc","final","first","last","view"],m=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],p=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],y=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],x=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],_=p,N=[...m,...h].filter(R=>!p.includes(R)),S={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},w={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},k={match:r.concat(/\b/,r.either(..._),/\s*\(/),relevance:0,keywords:{built_in:_}};function E(R){return r.concat(/\b/,r.either(...R.map(U=>U.replace(/\s+/,"\\s+"))),/\b/)}const M={scope:"keyword",match:E(x),relevance:0};function I(R,{exceptions:U,when:B}={}){const Z=B;return U=U||[],R.map(D=>D.match(/\|\d+$/)||U.includes(D)?D:Z(D)?`${D}|0`:D)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:I(N,{when:R=>R.length<3}),literal:c,type:f,built_in:y},contains:[{scope:"type",match:E(d)},M,k,S,s,o,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,a,w]}}return cm=e,cm}var um,Mv;function vD(){if(Mv)return um;Mv=1;function e(B){return B?typeof B=="string"?B:B.source:null}function t(B){return r("(?=",B,")")}function r(...B){return B.map(D=>e(D)).join("")}function a(B){const Z=B[B.length-1];return typeof Z=="object"&&Z.constructor===Object?(B.splice(B.length-1,1),Z):{}}function s(...B){return"("+(a(B).capture?"":"?:")+B.map(z=>e(z)).join("|")+")"}const o=B=>r(/\b/,B,/\w$/.test(B)?/\b/:/\B/),c=["Protocol","Type"].map(o),d=["init","self"].map(o),f=["Any","Self"],h=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],m=["false","nil","true"],p=["assignment","associativity","higherThan","left","lowerThan","none","right"],y=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],x=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],_=s(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),N=s(_,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),S=r(_,N,"*"),w=s(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),k=s(w,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),E=r(w,k,"*"),M=r(/[A-Z]/,k,"*"),I=["attached","autoclosure",r(/convention\(/,s("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",r(/objc\(/,E,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],R=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function U(B){const Z={match:/\s+/,relevance:0},D=B.COMMENT("/\\*","\\*/",{contains:["self"]}),z=[B.C_LINE_COMMENT_MODE,D],V={match:[/\./,s(...c,...d)],className:{2:"keyword"}},P={match:r(/\./,s(...h)),relevance:0},C=h.filter(nt=>typeof nt=="string").concat(["_|0"]),$=h.filter(nt=>typeof nt!="string").concat(f).map(o),O={variants:[{className:"keyword",match:s(...$,...d)}]},H={$pattern:s(/\b\w+/,/#\w+/),keyword:C.concat(y),literal:m},X=[V,P,O],K={match:r(/\./,s(...x)),relevance:0},T={className:"built_in",match:r(/\b/,s(...x),/(?=\()/)},j=[K,T],Y={match:/->/,relevance:0},L={className:"operator",relevance:0,variants:[{match:S},{match:`\\.(\\.|${N})+`}]},G=[Y,L],q="([0-9]_*)+",Q="([0-9a-fA-F]_*)+",J={className:"number",relevance:0,variants:[{match:`\\b(${q})(\\.(${q}))?([eE][+-]?(${q}))?\\b`},{match:`\\b0x(${Q})(\\.(${Q}))?([pP][+-]?(${q}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},W=(nt="")=>({className:"subst",variants:[{match:r(/\\/,nt,/[0\\tnr"']/)},{match:r(/\\/,nt,/u\{[0-9a-fA-F]{1,8}\}/)}]}),te=(nt="")=>({className:"subst",match:r(/\\/,nt,/[\t ]*(?:[\r\n]|\r\n)/)}),ce=(nt="")=>({className:"subst",label:"interpol",begin:r(/\\/,nt,/\(/),end:/\)/}),fe=(nt="")=>({begin:r(nt,/"""/),end:r(/"""/,nt),contains:[W(nt),te(nt),ce(nt)]}),be=(nt="")=>({begin:r(nt,/"/),end:r(/"/,nt),contains:[W(nt),ce(nt)]}),we={className:"string",variants:[fe(),fe("#"),fe("##"),fe("###"),be(),be("#"),be("##"),be("###")]},Ne=[B.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[B.BACKSLASH_ESCAPE]}],je={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:Ne},$e=nt=>{const Xn=r(nt,/\//),Mn=r(/\//,nt);return{begin:Xn,end:Mn,contains:[...Ne,{scope:"comment",begin:`#(?!.*${Mn})`,end:/$/}]}},st={scope:"regexp",variants:[$e("###"),$e("##"),$e("#"),je]},Rt={match:r(/`/,E,/`/)},Yt={className:"variable",match:/\$\d+/},Pt={className:"variable",match:`\\$${k}+`},Xt=[Rt,Yt,Pt],Yn={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:R,contains:[...G,J,we]}]}},En={scope:"keyword",match:r(/@/,s(...I),t(s(/\(/,/\s+/)))},ct={scope:"meta",match:r(/@/,E)},It=[Yn,En,ct],ue={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:r(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,k,"+")},{className:"type",match:M,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:r(/\s+&\s+/,t(M)),relevance:0}]},xe={begin://,keywords:H,contains:[...z,...X,...It,Y,ue]};ue.contains.push(xe);const Oe={match:r(E,/\s*:/),keywords:"_|0",relevance:0},Fe={begin:/\(/,end:/\)/,relevance:0,keywords:H,contains:["self",Oe,...z,st,...X,...j,...G,J,we,...Xt,...It,ue]},Ze={begin://,keywords:"repeat each",contains:[...z,ue]},on={begin:s(t(r(E,/\s*:/)),t(r(E,/\s+/,E,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:E}]},Nn={begin:/\(/,end:/\)/,keywords:H,contains:[on,...z,...X,...G,J,we,...It,ue,Fe],endsParent:!0,illegal:/["']/},Kt={match:[/(func|macro)/,/\s+/,s(Rt.match,E,S)],className:{1:"keyword",3:"title.function"},contains:[Ze,Nn,Z],illegal:[/\[/,/%/]},At={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Ze,Nn,Z],illegal:/\[|%/},Wt={match:[/operator/,/\s+/,S],className:{1:"keyword",3:"title"}},ut={begin:[/precedencegroup/,/\s+/,M],className:{1:"keyword",3:"title"},contains:[ue],keywords:[...p,...m],end:/}/},zn={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},cn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ni={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,E,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:H,contains:[Ze,...X,{begin:/:/,end:/\{/,keywords:H,contains:[{scope:"title.class.inherited",match:M},...X],relevance:0}]};for(const nt of we.variants){const Xn=nt.contains.find(hn=>hn.label==="interpol");Xn.keywords=H;const Mn=[...X,...j,...G,J,we,...Xt];Xn.contains=[...Mn,{begin:/\(/,end:/\)/,contains:["self",...Mn]}]}return{name:"Swift",keywords:H,contains:[...z,Kt,At,zn,cn,Ni,Wt,ut,{beginKeywords:"import",end:/$/,contains:[...z],relevance:0},st,...X,...j,...G,J,we,...Xt,...It,ue,Fe]}}return um=U,um}var dm,Ov;function _D(){if(Ov)return dm;Ov=1;function e(t){const r="true false yes no null",a="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},c={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},d={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,o]},f=t.inherit(d,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),x={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},_={end:",",endsWithParent:!0,excludeEnd:!0,keywords:r,relevance:0},N={begin:/\{/,end:/\}/,contains:[_],illegal:"\\n",relevance:0},S={begin:"\\[",end:"\\]",contains:[_],illegal:"\\n",relevance:0},w=[s,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type",begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:r,keywords:{literal:r}},x,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},N,S,c,d],k=[...w];return k.pop(),k.push(f),_.contains=k,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:w}}return dm=e,dm}var fm,Rv;function wD(){if(Rv)return fm;Rv=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],r=["true","false","null","undefined","NaN","Infinity"],a=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],o=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],d=[].concat(o,a,s);function f(m){const p=m.regex,y=(W,{after:te})=>{const ce="",end:""},N=/<[A-Za-z0-9\\._:-]+\s*\/>/,S={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(W,te)=>{const ce=W[0].length+W.index,fe=W.input[ce];if(fe==="<"||fe===","){te.ignoreMatch();return}fe===">"&&(y(W,{after:ce})||te.ignoreMatch());let be;const we=W.input.substring(ce);if(be=we.match(/^\s*=/)){te.ignoreMatch();return}if((be=we.match(/^\s+extends\s+/))&&be.index===0){te.ignoreMatch();return}}},w={$pattern:e,keyword:t,literal:r,built_in:d,"variable.language":c},k="[0-9](_?[0-9])*",E=`\\.(${k})`,M="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",I={className:"number",variants:[{begin:`(\\b(${M})((${E})|\\.)?|(${E}))[eE][+-]?(${k})\\b`},{begin:`\\b(${M})\\b((${E})\\b|\\.)?|(${E})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},R={className:"subst",begin:"\\$\\{",end:"\\}",keywords:w,contains:[]},U={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[m.BACKSLASH_ESCAPE,R],subLanguage:"xml"}},B={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[m.BACKSLASH_ESCAPE,R],subLanguage:"css"}},Z={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[m.BACKSLASH_ESCAPE,R],subLanguage:"graphql"}},D={className:"string",begin:"`",end:"`",contains:[m.BACKSLASH_ESCAPE,R]},V={className:"comment",variants:[m.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:x+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),m.C_BLOCK_COMMENT_MODE,m.C_LINE_COMMENT_MODE]},P=[m.APOS_STRING_MODE,m.QUOTE_STRING_MODE,U,B,Z,D,{match:/\$\d+/},I];R.contains=P.concat({begin:/\{/,end:/\}/,keywords:w,contains:["self"].concat(P)});const C=[].concat(V,R.contains),$=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:w,contains:["self"].concat(C)}]),O={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:w,contains:$},H={variants:[{match:[/class/,/\s+/,x,/\s+/,/extends/,/\s+/,p.concat(x,"(",p.concat(/\./,x),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,x],scope:{1:"keyword",3:"title.class"}}]},X={relevance:0,match:p.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...a,...s]}},K={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,x,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[O],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Y(W){return p.concat("(?!",W.join("|"),")")}const L={match:p.concat(/\b/,Y([...o,"super","import"].map(W=>`${W}\\s*\\(`)),x,p.lookahead(/\s*\(/)),className:"title.function",relevance:0},G={begin:p.concat(/\./,p.lookahead(p.concat(x,/(?![0-9A-Za-z$_(])/))),end:x,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,x,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},O]},Q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+m.UNDERSCORE_IDENT_RE+")\\s*=>",J={match:[/const|var|let/,/\s+/,x,/\s*/,/=\s*/,/(async\s*)?/,p.lookahead(Q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[O]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:w,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:X},illegal:/#(?![$_A-z])/,contains:[m.SHEBANG({label:"shebang",binary:"node",relevance:5}),K,m.APOS_STRING_MODE,m.QUOTE_STRING_MODE,U,B,Z,D,V,{match:/\$\d+/},I,X,{scope:"attr",match:x+p.lookahead(":"),relevance:0},J,{begin:"("+m.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[V,m.REGEXP_MODE,{className:"function",begin:Q,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:m.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:w,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:_.begin,end:_.end},{match:N},{begin:S.begin,"on:begin":S.isTrulyOpeningTag,end:S.end}],subLanguage:"xml",contains:[{begin:S.begin,end:S.end,skip:!0,contains:["self"]}]}]},T,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+m.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[O,m.inherit(m.TITLE_MODE,{begin:x,className:"title.function"})]},{match:/\.\.\./,relevance:0},G,{match:"\\$"+x,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[O]},L,j,H,q,{match:/\$[(.]/}]}}function h(m){const p=m.regex,y=f(m),x=e,_=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],N={begin:[/namespace/,/\s+/,m.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},S={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:_},contains:[y.exports.CLASS_REFERENCE]},w={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},k=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],E={$pattern:e,keyword:t.concat(k),literal:r,built_in:d.concat(_),"variable.language":c},M={className:"meta",begin:"@"+x},I=(Z,D,z)=>{const V=Z.contains.findIndex(P=>P.label===D);if(V===-1)throw new Error("can not find mode to replace");Z.contains.splice(V,1,z)};Object.assign(y.keywords,E),y.exports.PARAMS_CONTAINS.push(M);const R=y.contains.find(Z=>Z.scope==="attr"),U=Object.assign({},R,{match:p.concat(x,p.lookahead(/\s*\?:/))});y.exports.PARAMS_CONTAINS.push([y.exports.CLASS_REFERENCE,R,U]),y.contains=y.contains.concat([M,N,S,U]),I(y,"shebang",m.SHEBANG()),I(y,"use_strict",w);const B=y.contains.find(Z=>Z.label==="func.def");return B.relevance=0,Object.assign(y,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),y}return fm=h,fm}var hm,Dv;function ED(){if(Dv)return hm;Dv=1;function e(t){const r=t.regex,a={className:"string",begin:/"(""|[^/n])"C\b/},s={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,c=/\d{4}-\d{1,2}-\d{1,2}/,d=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:r.concat(/# */,r.either(c,o),/ *#/)},{begin:r.concat(/# */,f,/ *#/)},{begin:r.concat(/# */,d,/ *#/)},{begin:r.concat(/# */,r.either(c,o),/ +/,r.either(d,f),/ *#/)}]},m={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},p={className:"label",begin:/^\w+:/},y=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),x=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[a,s,h,m,p,y,x,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[x]}]}}return hm=e,hm}var mm,jv;function ND(){if(jv)return mm;jv=1;function e(t){t.regex;const r=t.COMMENT(/\(;/,/;\)/);r.contains.push("self");const a=t.COMMENT(/;;/,/$/),s=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},c={className:"variable",begin:/\$[\w_]+/},d={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},m={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:s},contains:[a,r,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},c,d,o,t.QUOTE_STRING_MODE,h,m,f]}}return mm=e,mm}var pm,Lv;function SD(){if(Lv)return pm;Lv=1;var e=q4();return e.registerLanguage("xml",P4()),e.registerLanguage("bash",F4()),e.registerLanguage("c",G4()),e.registerLanguage("cpp",V4()),e.registerLanguage("csharp",Y4()),e.registerLanguage("css",X4()),e.registerLanguage("markdown",K4()),e.registerLanguage("diff",Z4()),e.registerLanguage("ruby",Q4()),e.registerLanguage("go",W4()),e.registerLanguage("graphql",J4()),e.registerLanguage("ini",eD()),e.registerLanguage("java",tD()),e.registerLanguage("javascript",nD()),e.registerLanguage("json",rD()),e.registerLanguage("kotlin",iD()),e.registerLanguage("less",aD()),e.registerLanguage("lua",sD()),e.registerLanguage("makefile",lD()),e.registerLanguage("perl",oD()),e.registerLanguage("objectivec",cD()),e.registerLanguage("php",uD()),e.registerLanguage("php-template",dD()),e.registerLanguage("plaintext",fD()),e.registerLanguage("python",hD()),e.registerLanguage("python-repl",mD()),e.registerLanguage("r",pD()),e.registerLanguage("rust",gD()),e.registerLanguage("scss",bD()),e.registerLanguage("shell",xD()),e.registerLanguage("sql",yD()),e.registerLanguage("swift",vD()),e.registerLanguage("yaml",_D()),e.registerLanguage("typescript",wD()),e.registerLanguage("vbnet",ED()),e.registerLanguage("wasm",ND()),e.HighlightJS=e,e.default=e,pm=e,pm}var kD=SD();const Gn=To(kD);function TD(e){const t=e.regex,r="HTTP/([32]|1\\.[01])",a=/[A-Za-z][A-Za-z0-9-]*/,s={className:"attribute",begin:t.concat("^",a,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},o=[s,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+r+" \\d{3})",end:/$/,contains:[{className:"meta",begin:r},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:o}},{begin:"(?=^[A-Z]+ (.*?) "+r+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:r},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:o}},e.inherit(s,{relevance:0})]}}function CD(e){const t=e.regex,r={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{\w+\}/},{begin:t.concat(/[$@]/,e.UNDERSCORE_IDENT_RE)}]},s={endsWithParent:!0,keywords:{$pattern:/[a-z_]{2,}|\/dev\/poll/,literal:["on","off","yes","no","true","false","none","blocked","debug","info","notice","warn","error","crit","select","break","last","permanent","redirect","kqueue","rtsig","epoll","poll","/dev/poll"]},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[r]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:"\\s\\^",end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|\\{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]?\\b",relevance:0},r]};return{name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{beginKeywords:"upstream location",end:/;|\{/,contains:s.contains,keywords:{section:"upstream location"}},{className:"section",begin:t.concat(e.UNDERSCORE_IDENT_RE+t.lookahead(/\s+\{/)),relevance:0},{begin:t.lookahead(e.UNDERSCORE_IDENT_RE+"\\s"),end:";|\\{",contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:s}],relevance:0}],illegal:"[^\\s\\}\\{]"}}function AD(e){const t={className:"number",begin:/[$%]\d+/},r={className:"number",begin:/\b\d+/},a={className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/},s={className:"number",begin:/:\d{1,5}/};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/,contains:[a,s,e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{_:["order","deny","allow","setenv","rewriterule","rewriteengine","rewritecond","documentroot","sethandler","errordocument","loadmodule","options","header","listen","serverroot","servername"]},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{scope:"punctuation",match:/\\\n/},{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable",begin:/[\$%]\{/,end:/\}/,contains:["self",t]},a,r,e.QUOTE_STRING_MODE]}}],illegal:/\S/}}function MD(e){return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:["from","maintainer","expose","env","arg","user","onbuild","stopsignal"],contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const _4={tokenize:A4,partial:!0};function w4(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:k4,continuation:{tokenize:C4},exit:T4}},text:{91:{name:"gfmFootnoteCall",tokenize:S4},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:E4,resolveTo:N4}}}}function E4(e,t,r){const a=this;let s=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const f=a.events[s][1];if(f.type==="labelImage"){c=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return d;function d(f){if(!c||!c._balanced)return r(f);const h=jr(a.sliceSerialize({start:c.end,end:a.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?r(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function N4(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},d=[e[r+1],e[r+2],["enter",a,t],e[r+3],e[r+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(r,e.length-r+1,...d),e}function S4(e,t,r){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return d;function d(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),f}function f(p){return p!==94?r(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(p){if(o>999||p===93&&!c||p===null||p===91||Tt(p))return r(p);if(p===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return s.includes(jr(a.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(p)}return Tt(p)||(c=!0),o++,e.consume(p),p===92?m:h}function m(p){return p===91||p===92||p===93?(e.consume(p),o++,h):h(p)}}function k4(e,t,r){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,d;return f;function f(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):r(_)}function m(_){if(c>999||_===93&&!d||_===null||_===91||Tt(_))return r(_);if(_===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return o=jr(a.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Tt(_)||(d=!0),c++,e.consume(_),_===92?p:m}function p(_){return _===91||_===92||_===93?(e.consume(_),c++,m):m(_)}function y(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),s.includes(o)||s.push(o),ot(e,x,"gfmFootnoteDefinitionWhitespace")):r(_)}function x(_){return t(_)}}function C4(e,t,r){return e.check(Oo,t,e.attempt(_4,t,r))}function T4(e){e.exit("gfmFootnoteDefinition")}function A4(e,t,r){const a=this;return ot(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):r(o)}}function M4(e){let r=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:s};return r==null&&(r=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,d){let f=-1;for(;++f1?f(_):(c.consume(_),p++,x);if(p<2&&!r)return f(_);const S=c.exit("strikethroughSequenceTemporary"),w=Ys(_);return S._open=!w||w===2&&!!N,S._close=!N||N===2&&!!w,d(_)}}}class O4{constructor(){this.map=[]}add(t,r,a){R4(this,t,r,a)}consume(t){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const a=[];for(;r>0;)r-=1,a.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];a.push(t.slice()),t.length=0;let s=a.pop();for(;s;){for(const o of s)t.push(o);s=a.pop()}this.map.length=0}}function R4(e,t,r,a){let s=0;if(!(r===0&&a.length===0)){for(;s-1;){const T=a.events[z][1].type;if(T==="lineEnding"||T==="linePrefix")z--;else break}const V=z>-1?a.events[z][1].type:null,P=V==="tableHead"||V==="tableRow"?R:f;return P===R&&a.parser.lazy[a.now().line]?r(D):P(D)}function f(D){return e.enter("tableHead"),e.enter("tableRow"),h(D)}function h(D){return D===124||(c=!0,o+=1),m(D)}function m(D){return D===null?r(D):Be(D)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),x):r(D):tt(D)?ot(e,m,"whitespace")(D):(o+=1,c&&(c=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),c=!0,m):(e.enter("data"),p(D)))}function p(D){return D===null||D===124||Tt(D)?(e.exit("data"),m(D)):(e.consume(D),D===92?y:p)}function y(D){return D===92||D===124?(e.consume(D),p):p(D)}function x(D){return a.interrupt=!1,a.parser.lazy[a.now().line]?r(D):(e.enter("tableDelimiterRow"),c=!1,tt(D)?ot(e,_,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):_(D))}function _(D){return D===45||D===58?S(D):D===124?(c=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),N):I(D)}function N(D){return tt(D)?ot(e,S,"whitespace")(D):S(D)}function S(D){return D===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),w):D===45?(o+=1,w(D)):D===null||Be(D)?M(D):I(D)}function w(D){return D===45?(e.enter("tableDelimiterFiller"),k(D)):I(D)}function k(D){return D===45?(e.consume(D),k):D===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(D))}function E(D){return tt(D)?ot(e,M,"whitespace")(D):M(D)}function M(D){return D===124?_(D):D===null||Be(D)?!c||s!==o?I(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):I(D)}function I(D){return r(D)}function R(D){return e.enter("tableRow"),U(D)}function U(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),U):D===null||Be(D)?(e.exit("tableRow"),t(D)):tt(D)?ot(e,U,"whitespace")(D):(e.enter("data"),B(D))}function B(D){return D===null||D===124||Tt(D)?(e.exit("data"),U(D)):(e.consume(D),D===92?Z:B)}function Z(D){return D===92||D===124?(e.consume(D),B):B(D)}}function z4(e,t){let r=-1,a=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],d=!1,f=0,h,m,p;const y=new O4;for(;++rr[2]+1){const _=r[2]+1,N=r[3]-r[2]-1;e.add(_,N,[])}}e.add(r[3]+1,0,[["exit",p,t]])}return s!==void 0&&(o.end=Object.assign({},Bs(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function Qy(e,t,r,a,s){const o=[],c=Bs(t.events,r);s&&(s.end=Object.assign({},c),o.push(["exit",s,t])),a.end=Object.assign({},c),o.push(["exit",a,t]),e.add(r+1,0,o)}function Bs(e,t){const r=e[t],a=r[0]==="enter"?"start":"end";return r[1][a]}const I4={name:"tasklistCheck",tokenize:U4};function B4(){return{text:{91:I4}}}function U4(e,t,r){const a=this;return s;function s(f){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?r(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),o)}function o(f){return Tt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),c):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),c):r(f)}function c(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):r(f)}function d(f){return Be(f)?t(f):tt(f)?e.check({tokenize:H4},t,r)(f):r(f)}}function H4(e,t,r){return ot(e,a,"whitespace");function a(s){return s===null?r(s):t(s)}}function $4(e){return hw([f4(),w4(),M4(e),j4(),B4()])}const q4={};function qp(e){const t=this,r=e||q4,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push($4(r)),o.push(o4()),c.push(c4(r))}var Rh,Wy;function P4(){if(Wy)return Rh;Wy=1;function e(re){return re instanceof Map?re.clear=re.delete=re.set=function(){throw new Error("map is read-only")}:re instanceof Set&&(re.add=re.clear=re.delete=function(){throw new Error("set is read-only")}),Object.freeze(re),Object.getOwnPropertyNames(re).forEach(me=>{const Ee=re[me],Pe=typeof Ee;(Pe==="object"||Pe==="function")&&!Object.isFrozen(Ee)&&e(Ee)}),re}class t{constructor(me){me.data===void 0&&(me.data={}),this.data=me.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(re){return re.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function a(re,...me){const Ee=Object.create(null);for(const Pe in re)Ee[Pe]=re[Pe];return me.forEach(function(Pe){for(const St in Pe)Ee[St]=Pe[St]}),Ee}const s="",o=re=>!!re.scope,c=(re,{prefix:me})=>{if(re.startsWith("language:"))return re.replace("language:","language-");if(re.includes(".")){const Ee=re.split(".");return[`${me}${Ee.shift()}`,...Ee.map((Pe,St)=>`${Pe}${"_".repeat(St+1)}`)].join(" ")}return`${me}${re}`};class d{constructor(me,Ee){this.buffer="",this.classPrefix=Ee.classPrefix,me.walk(this)}addText(me){this.buffer+=r(me)}openNode(me){if(!o(me))return;const Ee=c(me.scope,{prefix:this.classPrefix});this.span(Ee)}closeNode(me){o(me)&&(this.buffer+=s)}value(){return this.buffer}span(me){this.buffer+=``}}const f=(re={})=>{const me={children:[]};return Object.assign(me,re),me};class h{constructor(){this.rootNode=f(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(me){this.top.children.push(me)}openNode(me){const Ee=f({scope:me});this.add(Ee),this.stack.push(Ee)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(me){return this.constructor._walk(me,this.rootNode)}static _walk(me,Ee){return typeof Ee=="string"?me.addText(Ee):Ee.children&&(me.openNode(Ee),Ee.children.forEach(Pe=>this._walk(me,Pe)),me.closeNode(Ee)),me}static _collapse(me){typeof me!="string"&&me.children&&(me.children.every(Ee=>typeof Ee=="string")?me.children=[me.children.join("")]:me.children.forEach(Ee=>{h._collapse(Ee)}))}}class m extends h{constructor(me){super(),this.options=me}addText(me){me!==""&&this.add(me)}startScope(me){this.openNode(me)}endScope(){this.closeNode()}__addSublanguage(me,Ee){const Pe=me.root;Ee&&(Pe.scope=`language:${Ee}`),this.add(Pe)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function p(re){return re?typeof re=="string"?re:re.source:null}function y(re){return N("(?=",re,")")}function x(re){return N("(?:",re,")*")}function _(re){return N("(?:",re,")?")}function N(...re){return re.map(Ee=>p(Ee)).join("")}function S(re){const me=re[re.length-1];return typeof me=="object"&&me.constructor===Object?(re.splice(re.length-1,1),me):{}}function w(...re){return"("+(S(re).capture?"":"?:")+re.map(Pe=>p(Pe)).join("|")+")"}function k(re){return new RegExp(re.toString()+"|").exec("").length-1}function E(re,me){const Ee=re&&re.exec(me);return Ee&&Ee.index===0}const M=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function I(re,{joinWith:me}){let Ee=0;return re.map(Pe=>{Ee+=1;const St=Ee;let gt=p(Pe),Ae="";for(;gt.length>0;){const Se=M.exec(gt);if(!Se){Ae+=gt;break}Ae+=gt.substring(0,Se.index),gt=gt.substring(Se.index+Se[0].length),Se[0][0]==="\\"&&Se[1]?Ae+="\\"+String(Number(Se[1])+St):(Ae+=Se[0],Se[0]==="("&&Ee++)}return Ae}).map(Pe=>`(${Pe})`).join(me)}const R=/\b\B/,U="[a-zA-Z]\\w*",B="[a-zA-Z_]\\w*",Z="\\b\\d+(\\.\\d+)?",D="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",z="\\b(0b[01]+)",V="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",P=(re={})=>{const me=/^#![ ]*\//;return re.binary&&(re.begin=N(me,/.*\b/,re.binary,/\b.*/)),a({scope:"meta",begin:me,end:/$/,relevance:0,"on:begin":(Ee,Pe)=>{Ee.index!==0&&Pe.ignoreMatch()}},re)},T={begin:"\\\\[\\s\\S]",relevance:0},$={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[T]},O={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[T]},H={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},X=function(re,me,Ee={}){const Pe=a({scope:"comment",begin:re,end:me,contains:[]},Ee);Pe.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const St=w("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Pe.contains.push({begin:N(/[ ]+/,"(",St,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Pe},K=X("//","$"),C=X("/\\*","\\*/"),j=X("#","$"),Y={scope:"number",begin:Z,relevance:0},L={scope:"number",begin:D,relevance:0},G={scope:"number",begin:z,relevance:0},q={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[T,{begin:/\[/,end:/\]/,relevance:0,contains:[T]}]},Q={scope:"title",begin:U,relevance:0},J={scope:"title",begin:B,relevance:0},W={begin:"\\.\\s*"+B,relevance:0};var ce=Object.freeze({__proto__:null,APOS_STRING_MODE:$,BACKSLASH_ESCAPE:T,BINARY_NUMBER_MODE:G,BINARY_NUMBER_RE:z,COMMENT:X,C_BLOCK_COMMENT_MODE:C,C_LINE_COMMENT_MODE:K,C_NUMBER_MODE:L,C_NUMBER_RE:D,END_SAME_AS_BEGIN:function(re){return Object.assign(re,{"on:begin":(me,Ee)=>{Ee.data._beginMatch=me[1]},"on:end":(me,Ee)=>{Ee.data._beginMatch!==me[1]&&Ee.ignoreMatch()}})},HASH_COMMENT_MODE:j,IDENT_RE:U,MATCH_NOTHING_RE:R,METHOD_GUARD:W,NUMBER_MODE:Y,NUMBER_RE:Z,PHRASAL_WORDS_MODE:H,QUOTE_STRING_MODE:O,REGEXP_MODE:q,RE_STARTERS_RE:V,SHEBANG:P,TITLE_MODE:Q,UNDERSCORE_IDENT_RE:B,UNDERSCORE_TITLE_MODE:J});function fe(re,me){re.input[re.index-1]==="."&&me.ignoreMatch()}function be(re,me){re.className!==void 0&&(re.scope=re.className,delete re.className)}function we(re,me){me&&re.beginKeywords&&(re.begin="\\b("+re.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",re.__beforeBegin=fe,re.keywords=re.keywords||re.beginKeywords,delete re.beginKeywords,re.relevance===void 0&&(re.relevance=0))}function Ne(re,me){Array.isArray(re.illegal)&&(re.illegal=w(...re.illegal))}function je(re,me){if(re.match){if(re.begin||re.end)throw new Error("begin & end are not supported with match");re.begin=re.match,delete re.match}}function $e(re,me){re.relevance===void 0&&(re.relevance=1)}const st=(re,me)=>{if(!re.beforeMatch)return;if(re.starts)throw new Error("beforeMatch cannot be used with starts");const Ee=Object.assign({},re);Object.keys(re).forEach(Pe=>{delete re[Pe]}),re.keywords=Ee.keywords,re.begin=N(Ee.beforeMatch,y(Ee.begin)),re.starts={relevance:0,contains:[Object.assign(Ee,{endsParent:!0})]},re.relevance=0,delete Ee.beforeMatch},Rt=["of","and","for","in","not","or","if","then","parent","list","value"],Yt="keyword";function Pt(re,me,Ee=Yt){const Pe=Object.create(null);return typeof re=="string"?St(Ee,re.split(" ")):Array.isArray(re)?St(Ee,re):Object.keys(re).forEach(function(gt){Object.assign(Pe,Pt(re[gt],me,gt))}),Pe;function St(gt,Ae){me&&(Ae=Ae.map(Se=>Se.toLowerCase())),Ae.forEach(function(Se){const Ue=Se.split("|");Pe[Ue[0]]=[gt,Xt(Ue[0],Ue[1])]})}}function Xt(re,me){return me?Number(me):Yn(re)?0:1}function Yn(re){return Rt.includes(re.toLowerCase())}const Nn={},ct=re=>{console.error(re)},It=(re,...me)=>{console.log(`WARN: ${re}`,...me)},ue=(re,me)=>{Nn[`${re}/${me}`]||(console.log(`Deprecated as of ${re}. ${me}`),Nn[`${re}/${me}`]=!0)},xe=new Error;function Oe(re,me,{key:Ee}){let Pe=0;const St=re[Ee],gt={},Ae={};for(let Se=1;Se<=me.length;Se++)Ae[Se+Pe]=St[Se],gt[Se+Pe]=!0,Pe+=k(me[Se-1]);re[Ee]=Ae,re[Ee]._emit=gt,re[Ee]._multi=!0}function Fe(re){if(Array.isArray(re.begin)){if(re.skip||re.excludeBegin||re.returnBegin)throw ct("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),xe;if(typeof re.beginScope!="object"||re.beginScope===null)throw ct("beginScope must be object"),xe;Oe(re,re.begin,{key:"beginScope"}),re.begin=I(re.begin,{joinWith:""})}}function Ze(re){if(Array.isArray(re.end)){if(re.skip||re.excludeEnd||re.returnEnd)throw ct("skip, excludeEnd, returnEnd not compatible with endScope: {}"),xe;if(typeof re.endScope!="object"||re.endScope===null)throw ct("endScope must be object"),xe;Oe(re,re.end,{key:"endScope"}),re.end=I(re.end,{joinWith:""})}}function on(re){re.scope&&typeof re.scope=="object"&&re.scope!==null&&(re.beginScope=re.scope,delete re.scope)}function Sn(re){on(re),typeof re.beginScope=="string"&&(re.beginScope={_wrap:re.beginScope}),typeof re.endScope=="string"&&(re.endScope={_wrap:re.endScope}),Fe(re),Ze(re)}function Kt(re){function me(Ae,Se){return new RegExp(p(Ae),"m"+(re.case_insensitive?"i":"")+(re.unicodeRegex?"u":"")+(Se?"g":""))}class Ee{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Se,Ue){Ue.position=this.position++,this.matchIndexes[this.matchAt]=Ue,this.regexes.push([Ue,Se]),this.matchAt+=k(Se)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Se=this.regexes.map(Ue=>Ue[1]);this.matcherRe=me(I(Se,{joinWith:"|"}),!0),this.lastIndex=0}exec(Se){this.matcherRe.lastIndex=this.lastIndex;const Ue=this.matcherRe.exec(Se);if(!Ue)return null;const Bt=Ue.findIndex((xr,Si)=>Si>0&&xr!==void 0),Mt=this.matchIndexes[Bt];return Ue.splice(0,Bt),Object.assign(Ue,Mt)}}class Pe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Se){if(this.multiRegexes[Se])return this.multiRegexes[Se];const Ue=new Ee;return this.rules.slice(Se).forEach(([Bt,Mt])=>Ue.addRule(Bt,Mt)),Ue.compile(),this.multiRegexes[Se]=Ue,Ue}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Se,Ue){this.rules.push([Se,Ue]),Ue.type==="begin"&&this.count++}exec(Se){const Ue=this.getMatcher(this.regexIndex);Ue.lastIndex=this.lastIndex;let Bt=Ue.exec(Se);if(this.resumingScanAtSamePosition()&&!(Bt&&Bt.index===this.lastIndex)){const Mt=this.getMatcher(0);Mt.lastIndex=this.lastIndex+1,Bt=Mt.exec(Se)}return Bt&&(this.regexIndex+=Bt.position+1,this.regexIndex===this.count&&this.considerAll()),Bt}}function St(Ae){const Se=new Pe;return Ae.contains.forEach(Ue=>Se.addRule(Ue.begin,{rule:Ue,type:"begin"})),Ae.terminatorEnd&&Se.addRule(Ae.terminatorEnd,{type:"end"}),Ae.illegal&&Se.addRule(Ae.illegal,{type:"illegal"}),Se}function gt(Ae,Se){const Ue=Ae;if(Ae.isCompiled)return Ue;[be,je,Sn,st].forEach(Mt=>Mt(Ae,Se)),re.compilerExtensions.forEach(Mt=>Mt(Ae,Se)),Ae.__beforeBegin=null,[we,Ne,$e].forEach(Mt=>Mt(Ae,Se)),Ae.isCompiled=!0;let Bt=null;return typeof Ae.keywords=="object"&&Ae.keywords.$pattern&&(Ae.keywords=Object.assign({},Ae.keywords),Bt=Ae.keywords.$pattern,delete Ae.keywords.$pattern),Bt=Bt||/\w+/,Ae.keywords&&(Ae.keywords=Pt(Ae.keywords,re.case_insensitive)),Ue.keywordPatternRe=me(Bt,!0),Se&&(Ae.begin||(Ae.begin=/\B|\b/),Ue.beginRe=me(Ue.begin),!Ae.end&&!Ae.endsWithParent&&(Ae.end=/\B|\b/),Ae.end&&(Ue.endRe=me(Ue.end)),Ue.terminatorEnd=p(Ue.end)||"",Ae.endsWithParent&&Se.terminatorEnd&&(Ue.terminatorEnd+=(Ae.end?"|":"")+Se.terminatorEnd)),Ae.illegal&&(Ue.illegalRe=me(Ae.illegal)),Ae.contains||(Ae.contains=[]),Ae.contains=[].concat(...Ae.contains.map(function(Mt){return Wt(Mt==="self"?Ae:Mt)})),Ae.contains.forEach(function(Mt){gt(Mt,Ue)}),Ae.starts&>(Ae.starts,Se),Ue.matcher=St(Ue),Ue}if(re.compilerExtensions||(re.compilerExtensions=[]),re.contains&&re.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return re.classNameAliases=a(re.classNameAliases||{}),gt(re)}function At(re){return re?re.endsWithParent||At(re.starts):!1}function Wt(re){return re.variants&&!re.cachedVariants&&(re.cachedVariants=re.variants.map(function(me){return a(re,{variants:null},me)})),re.cachedVariants?re.cachedVariants:At(re)?a(re,{starts:re.starts?a(re.starts):null}):Object.isFrozen(re)?a(re):re}var ut="11.11.1";class In extends Error{constructor(me,Ee){super(me),this.name="HTMLInjectionError",this.html=Ee}}const cn=r,Ni=a,nt=Symbol("nomatch"),Xn=7,On=function(re){const me=Object.create(null),Ee=Object.create(null),Pe=[];let St=!0;const gt="Could not find the language '{}', did you forget to load/include a language module?",Ae={disableAutodetect:!0,name:"Plain text",contains:[]};let Se={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:m};function Ue(ye){return Se.noHighlightRe.test(ye)}function Bt(ye){let Le=ye.className+" ";Le+=ye.parentNode?ye.parentNode.className:"";const Qe=Se.languageDetectRe.exec(Le);if(Qe){const ft=bn(Qe[1]);return ft||(It(gt.replace("{}",Qe[1])),It("Falling back to no-highlight mode for this block.",ye)),ft?Qe[1]:"no-highlight"}return Le.split(/\s+/).find(ft=>Ue(ft)||bn(ft))}function Mt(ye,Le,Qe){let ft="",Ht="";typeof Le=="object"?(ft=ye,Qe=Le.ignoreIllegals,Ht=Le.language):(ue("10.7.0","highlight(lang, code, ...args) has been deprecated."),ue("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),Ht=ye,ft=Le),Qe===void 0&&(Qe=!0);const pn={code:ft,language:Ht};Jr("before:highlight",pn);const Rn=pn.result?pn.result:xr(pn.language,pn.code,Qe);return Rn.code=pn.code,Jr("after:highlight",Rn),Rn}function xr(ye,Le,Qe,ft){const Ht=Object.create(null);function pn(_e,Re){return _e.keywords[Re]}function Rn(){if(!qe.keywords){Jt.addText(bt);return}let _e=0;qe.keywordPatternRe.lastIndex=0;let Re=qe.keywordPatternRe.exec(bt),Ye="";for(;Re;){Ye+=bt.substring(_e,Re.index);const rt=un.case_insensitive?Re[0].toLowerCase():Re[0],$t=pn(qe,rt);if($t){const[or,al]=$t;if(Jt.addText(Ye),Ye="",Ht[rt]=(Ht[rt]||0)+1,Ht[rt]<=Xn&&(Ri+=al),or.startsWith("_"))Ye+=Re[0];else{const $o=un.classNameAliases[or]||or;Dn(Re[0],$o)}}else Ye+=Re[0];_e=qe.keywordPatternRe.lastIndex,Re=qe.keywordPatternRe.exec(bt)}Ye+=bt.substring(_e),Jt.addText(Ye)}function kn(){if(bt==="")return;let _e=null;if(typeof qe.subLanguage=="string"){if(!me[qe.subLanguage]){Jt.addText(bt);return}_e=xr(qe.subLanguage,bt,!0,Ho[qe.subLanguage]),Ho[qe.subLanguage]=_e._top}else _e=ki(bt,qe.subLanguage.length?qe.subLanguage:null);qe.relevance>0&&(Ri+=_e.relevance),Jt.__addSublanguage(_e._emitter,_e.language)}function _t(){qe.subLanguage!=null?kn():Rn(),bt=""}function Dn(_e,Re){_e!==""&&(Jt.startScope(Re),Jt.addText(_e),Jt.endScope())}function ts(_e,Re){let Ye=1;const rt=Re.length-1;for(;Ye<=rt;){if(!_e._emit[Ye]){Ye++;continue}const $t=un.classNameAliases[_e[Ye]]||_e[Ye],or=Re[Ye];$t?Dn(or,$t):(bt=or,Rn(),bt=""),Ye++}}function Ai(_e,Re){return _e.scope&&typeof _e.scope=="string"&&Jt.openNode(un.classNameAliases[_e.scope]||_e.scope),_e.beginScope&&(_e.beginScope._wrap?(Dn(bt,un.classNameAliases[_e.beginScope._wrap]||_e.beginScope._wrap),bt=""):_e.beginScope._multi&&(ts(_e.beginScope,Re),bt="")),qe=Object.create(_e,{parent:{value:qe}}),qe}function Ur(_e,Re,Ye){let rt=E(_e.endRe,Ye);if(rt){if(_e["on:end"]){const $t=new t(_e);_e["on:end"](Re,$t),$t.isMatchIgnored&&(rt=!1)}if(rt){for(;_e.endsParent&&_e.parent;)_e=_e.parent;return _e}}if(_e.endsWithParent)return Ur(_e.parent,Re,Ye)}function Mi(_e){return qe.matcher.regexIndex===0?(bt+=_e[0],1):(Di=!0,0)}function ns(_e){const Re=_e[0],Ye=_e.rule,rt=new t(Ye),$t=[Ye.__beforeBegin,Ye["on:begin"]];for(const or of $t)if(or&&(or(_e,rt),rt.isMatchIgnored))return Mi(Re);return Ye.skip?bt+=Re:(Ye.excludeBegin&&(bt+=Re),_t(),!Ye.returnBegin&&!Ye.excludeBegin&&(bt=Re)),Ai(Ye,_e),Ye.returnBegin?0:Re.length}function Cn(_e){const Re=_e[0],Ye=Le.substring(_e.index),rt=Ur(qe,_e,Ye);if(!rt)return nt;const $t=qe;qe.endScope&&qe.endScope._wrap?(_t(),Dn(Re,qe.endScope._wrap)):qe.endScope&&qe.endScope._multi?(_t(),ts(qe.endScope,_e)):$t.skip?bt+=Re:($t.returnEnd||$t.excludeEnd||(bt+=Re),_t(),$t.excludeEnd&&(bt=Re));do qe.scope&&Jt.closeNode(),!qe.skip&&!qe.subLanguage&&(Ri+=qe.relevance),qe=qe.parent;while(qe!==rt.parent);return rt.starts&&Ai(rt.starts,_e),$t.returnEnd?0:Re.length}function ba(){const _e=[];for(let Re=qe;Re!==un;Re=Re.parent)Re.scope&&_e.unshift(Re.scope);_e.forEach(Re=>Jt.openNode(Re))}let Er={};function Oi(_e,Re){const Ye=Re&&Re[0];if(bt+=_e,Ye==null)return _t(),0;if(Er.type==="begin"&&Re.type==="end"&&Er.index===Re.index&&Ye===""){if(bt+=Le.slice(Re.index,Re.index+1),!St){const rt=new Error(`0 width match regex (${ye})`);throw rt.languageName=ye,rt.badRule=Er.rule,rt}return 1}if(Er=Re,Re.type==="begin")return ns(Re);if(Re.type==="illegal"&&!Qe){const rt=new Error('Illegal lexeme "'+Ye+'" for mode "'+(qe.scope||"")+'"');throw rt.mode=qe,rt}else if(Re.type==="end"){const rt=Cn(Re);if(rt!==nt)return rt}if(Re.type==="illegal"&&Ye==="")return bt+=` +`,1;if(il>1e5&&il>Re.index*3)throw new Error("potential infinite loop, way more iterations than matches");return bt+=Ye,Ye.length}const un=bn(ye);if(!un)throw ct(gt.replace("{}",ye)),new Error('Unknown language: "'+ye+'"');const xa=Kt(un);let rs="",qe=ft||xa;const Ho={},Jt=new Se.__emitter(Se);ba();let bt="",Ri=0,ei=0,il=0,Di=!1;try{if(un.__emitTokens)un.__emitTokens(Le,Jt);else{for(qe.matcher.considerAll();;){il++,Di?Di=!1:qe.matcher.considerAll(),qe.matcher.lastIndex=ei;const _e=qe.matcher.exec(Le);if(!_e)break;const Re=Le.substring(ei,_e.index),Ye=Oi(Re,_e);ei=_e.index+Ye}Oi(Le.substring(ei))}return Jt.finalize(),rs=Jt.toHTML(),{language:ye,value:rs,relevance:Ri,illegal:!1,_emitter:Jt,_top:qe}}catch(_e){if(_e.message&&_e.message.includes("Illegal"))return{language:ye,value:cn(Le),illegal:!0,relevance:0,_illegalBy:{message:_e.message,index:ei,context:Le.slice(ei-100,ei+100),mode:_e.mode,resultSoFar:rs},_emitter:Jt};if(St)return{language:ye,value:cn(Le),illegal:!1,relevance:0,errorRaised:_e,_emitter:Jt,_top:qe};throw _e}}function Si(ye){const Le={value:cn(ye),illegal:!1,relevance:0,_top:Ae,_emitter:new Se.__emitter(Se)};return Le._emitter.addText(ye),Le}function ki(ye,Le){Le=Le||Se.languages||Object.keys(me);const Qe=Si(ye),ft=Le.filter(bn).filter(_r).map(_t=>xr(_t,ye,!1));ft.unshift(Qe);const Ht=ft.sort((_t,Dn)=>{if(_t.relevance!==Dn.relevance)return Dn.relevance-_t.relevance;if(_t.language&&Dn.language){if(bn(_t.language).supersetOf===Dn.language)return 1;if(bn(Dn.language).supersetOf===_t.language)return-1}return 0}),[pn,Rn]=Ht,kn=pn;return kn.secondBest=Rn,kn}function lr(ye,Le,Qe){const ft=Le&&Ee[Le]||Qe;ye.classList.add("hljs"),ye.classList.add(`language-${ft}`)}function Ut(ye){let Le=null;const Qe=Bt(ye);if(Ue(Qe))return;if(Jr("before:highlightElement",{el:ye,language:Qe}),ye.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ye);return}if(ye.children.length>0&&(Se.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ye)),Se.throwUnescapedHTML))throw new In("One of your code blocks includes unescaped HTML.",ye.innerHTML);Le=ye;const ft=Le.textContent,Ht=Qe?Mt(ft,{language:Qe,ignoreIllegals:!0}):ki(ft);ye.innerHTML=Ht.value,ye.dataset.highlighted="yes",lr(ye,Qe,Ht.language),ye.result={language:Ht.language,re:Ht.relevance,relevance:Ht.relevance},Ht.secondBest&&(ye.secondBest={language:Ht.secondBest.language,relevance:Ht.secondBest.relevance}),Jr("after:highlightElement",{el:ye,result:Ht,text:ft})}function mn(ye){Se=Ni(Se,ye)}const yr=()=>{Ti(),ue("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ci(){Ti(),ue("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let pa=!1;function Ti(){function ye(){Ti()}if(document.readyState==="loading"){pa||window.addEventListener("DOMContentLoaded",ye,!1),pa=!0;return}document.querySelectorAll(Se.cssSelector).forEach(Ut)}function Ja(ye,Le){let Qe=null;try{Qe=Le(re)}catch(ft){if(ct("Language definition for '{}' could not be registered.".replace("{}",ye)),St)ct(ft);else throw ft;Qe=Ae}Qe.name||(Qe.name=ye),me[ye]=Qe,Qe.rawDefinition=Le.bind(null,re),Qe.aliases&&vr(Qe.aliases,{languageName:ye})}function Wr(ye){delete me[ye];for(const Le of Object.keys(Ee))Ee[Le]===ye&&delete Ee[Le]}function ga(){return Object.keys(me)}function bn(ye){return ye=(ye||"").toLowerCase(),me[ye]||me[Ee[ye]]}function vr(ye,{languageName:Le}){typeof ye=="string"&&(ye=[ye]),ye.forEach(Qe=>{Ee[Qe.toLowerCase()]=Le})}function _r(ye){const Le=bn(ye);return Le&&!Le.disableAutodetect}function Br(ye){ye["before:highlightBlock"]&&!ye["before:highlightElement"]&&(ye["before:highlightElement"]=Le=>{ye["before:highlightBlock"](Object.assign({block:Le.el},Le))}),ye["after:highlightBlock"]&&!ye["after:highlightElement"]&&(ye["after:highlightElement"]=Le=>{ye["after:highlightBlock"](Object.assign({block:Le.el},Le))})}function Ft(ye){Br(ye),Pe.push(ye)}function es(ye){const Le=Pe.indexOf(ye);Le!==-1&&Pe.splice(Le,1)}function Jr(ye,Le){const Qe=ye;Pe.forEach(function(ft){ft[Qe]&&ft[Qe](Le)})}function wr(ye){return ue("10.7.0","highlightBlock will be removed entirely in v12.0"),ue("10.7.0","Please use highlightElement now."),Ut(ye)}Object.assign(re,{highlight:Mt,highlightAuto:ki,highlightAll:Ti,highlightElement:Ut,highlightBlock:wr,configure:mn,initHighlighting:yr,initHighlightingOnLoad:Ci,registerLanguage:Ja,unregisterLanguage:Wr,listLanguages:ga,getLanguage:bn,registerAliases:vr,autoDetection:_r,inherit:Ni,addPlugin:Ft,removePlugin:es}),re.debugMode=function(){St=!1},re.safeMode=function(){St=!0},re.versionString=ut,re.regex={concat:N,lookahead:y,either:w,optional:_,anyNumberOfTimes:x};for(const ye in ce)typeof ce[ye]=="object"&&e(ce[ye]);return Object.assign(re,ce),re},hn=On({});return hn.newInstance=()=>On({}),Rh=hn,hn.HighlightJS=hn,hn.default=hn,Rh}var Dh,Jy;function F4(){if(Jy)return Dh;Jy=1;function e(t){const r=t.regex,a=r.concat(/[\p{L}_]/u,r.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},c={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},d=t.inherit(c,{begin:/\(/,end:/\)/}),f=t.inherit(t.APOS_STRING_MODE,{className:"string"}),h=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),m={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[c,h,f,d,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[c,d,h,f]}]}]},t.COMMENT(//,{relevance:10}),{begin://,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:r.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:a,relevance:0,starts:m}]},{className:"tag",begin:r.concat(/<\//,r.lookahead(r.concat(a,/>/))),contains:[{className:"name",begin:a,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return Dh=e,Dh}var jh,ev;function G4(){if(ev)return jh;ev=1;function e(t){const r=t.regex,a={},s={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[a]}]};Object.assign(a,{className:"variable",variants:[{begin:r.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},s]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},c=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),d={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,a,o]};o.contains.push(f);const h={match:/\\"/},m={className:"string",begin:/'/,end:/'/},p={match:/\\'/},y={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,a]},x=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],_=t.SHEBANG({binary:`(${x.join("|")})`,relevance:10}),N={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},S=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],w=["true","false"],k={match:/(\/[a-z._-]+)+/},E=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],M=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],I=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],R=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:S,literal:w,built_in:[...E,...M,"set","shopt",...I,...R]},contains:[_,t.SHEBANG(),N,y,c,d,k,f,h,m,p,a]}}return jh=e,jh}var Lh,tv;function V4(){if(tv)return Lh;tv=1;function e(t){const r=t.regex,a=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",d="("+s+"|"+r.optional(o)+"[a-zA-Z_]\\w*"+r.optional("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},p={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},y={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},a,t.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:r.optional(o)+t.IDENT_RE,relevance:0},_=r.optional(o)+t.IDENT_RE+"\\s*\\(",w={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},k=[y,f,a,t.C_BLOCK_COMMENT_MODE,p,m],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:w,contains:k.concat([{begin:/\(/,end:/\)/,keywords:w,contains:k.concat(["self"]),relevance:0}]),relevance:0},M={begin:"("+d+"[\\*&\\s]+)+"+_,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:w,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:w,relevance:0},{begin:_,returnBegin:!0,contains:[t.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:[a,t.C_BLOCK_COMMENT_MODE,m,p,f,{begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:["self",a,t.C_BLOCK_COMMENT_MODE,m,p,f]}]},f,a,t.C_BLOCK_COMMENT_MODE,y]};return{name:"C",aliases:["h"],keywords:w,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:y,strings:m,keywords:w}}}return Lh=e,Lh}var zh,nv;function Y4(){if(nv)return zh;nv=1;function e(t){const r=t.regex,a=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",d="(?!struct)("+s+"|"+r.optional(o)+"[a-zA-Z_]\\w*"+r.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},p={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},y={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},a,t.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:r.optional(o)+t.IDENT_RE,relevance:0},_=r.optional(o)+t.IDENT_RE+"\\s*\\(",N=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],w=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],k=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],I={type:S,keyword:N,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},R={className:"function.dispatch",relevance:0,keywords:{_hint:k},begin:r.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,r.lookahead(/(<[^<>]+>|)\s*\(/))},U=[R,y,f,a,t.C_BLOCK_COMMENT_MODE,p,m],B={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:I,contains:U.concat([{begin:/\(/,end:/\)/,keywords:I,contains:U.concat(["self"]),relevance:0}]),relevance:0},Z={className:"function",begin:"("+d+"[\\*&\\s]+)+"+_,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:I,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:I,relevance:0},{begin:_,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,p]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:I,relevance:0,contains:[a,t.C_BLOCK_COMMENT_MODE,m,p,f,{begin:/\(/,end:/\)/,keywords:I,relevance:0,contains:["self",a,t.C_BLOCK_COMMENT_MODE,m,p,f]}]},f,a,t.C_BLOCK_COMMENT_MODE,y]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:I,illegal:"",keywords:I,contains:["self",f]},{begin:t.IDENT_RE+"::",keywords:I},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return zh=e,zh}var Ih,rv;function X4(){if(rv)return Ih;rv=1;function e(t){const r=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],a=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],s=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],c=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],d={keyword:o.concat(c),built_in:r,literal:s},f=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},m={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},p={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},y=t.inherit(p,{illegal:/\n/}),x={className:"subst",begin:/\{/,end:/\}/,keywords:d},_=t.inherit(x,{illegal:/\n/}),N={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,_]},S={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]},w=t.inherit(S,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},_]});x.contains=[S,N,p,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,t.C_BLOCK_COMMENT_MODE],_.contains=[w,N,y,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const k={variants:[m,S,N,p,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},M=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",I={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:d,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},k,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,E,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,E,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+M+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:d,contains:[{beginKeywords:a.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,E],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,relevance:0,contains:[k,h,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},I]}}return Ih=e,Ih}var Bh,iv;function K4(){if(iv)return Bh;iv=1;const e=h=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:h.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:h.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],a=[...t,...r],s=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),d=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function f(h){const m=h.regex,p=e(h),y={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},x="and or not only",_=/@-?\w[\w]*(-\w+)*/,N="[a-zA-Z-][a-zA-Z0-9_-]*",S=[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[p.BLOCK_COMMENT,y,p.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+N,relevance:0},p.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+o.join("|")+")"},{begin:":(:)?("+c.join("|")+")"}]},p.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[p.BLOCK_COMMENT,p.HEXCOLOR,p.IMPORTANT,p.CSS_NUMBER_MODE,...S,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...S,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},p.FUNCTION_DISPATCH]},{begin:m.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:_},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:x,attribute:s.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...S,p.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+a.join("|")+")\\b"}]}}return Bh=f,Bh}var Uh,av;function Z4(){if(av)return Uh;av=1;function e(t){const r=t.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},s={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},c={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},d={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:r.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},m={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},p={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},y=t.inherit(m,{contains:[]}),x=t.inherit(p,{contains:[]});m.contains.push(x),p.contains.push(y);let _=[a,h];return[m,p,y,x].forEach(k=>{k.contains=k.contains.concat(_)}),_=_.concat(m,p),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:_},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:_}]}]},a,c,m,p,{className:"quote",begin:"^>\\s+",contains:_,end:"$"},o,s,h,d,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return Uh=e,Uh}var Hh,sv;function Q4(){if(sv)return Hh;sv=1;function e(t){const r=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:r.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:r.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return Hh=e,Hh}var $h,lv;function W4(){if(lv)return $h;lv=1;function e(t){const r=t.regex,a="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s=r.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=r.concat(s,/(::\w+)*/),d={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},f={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},m=[t.COMMENT("#","$",{contains:[f]}),t.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],p={className:"subst",begin:/#\{/,end:/\}/,keywords:d},y={className:"string",contains:[t.BACKSLASH_ESCAPE,p],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:r.concat(/<<[-~]?'?/,r.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,p]})]}]},x="[1-9](_?[0-9])*|0",_="[0-9](_?[0-9])*",N={className:"number",relevance:0,variants:[{begin:`\\b(${x})(\\.(${_}))?([eE][+-]?(${_})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},S={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:d}]},U=[y,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:d},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:d},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:s,scope:"title.class"},{match:[/def/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[S]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[y,{begin:a}],relevance:0},N,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:d},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,p],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(h,m),relevance:0}].concat(h,m);p.contains=U,S.contains=U;const z=[{begin:/^\s*=>/,starts:{end:"$",contains:U}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:d,contains:U}}];return m.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:d,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(z).concat(m).concat(U)}}return $h=e,$h}var qh,ov;function J4(){if(ov)return qh;ov=1;function e(t){const c={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:c,illegal:"s(c,d,f-1))}function o(c){const d=c.regex,f="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",h=f+s("(?:<"+f+"~~~(?:\\s*,\\s*"+f+"~~~)*>)?",/~~~/g,2),_={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},N={className:"meta",begin:"@"+f,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},S={className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[c.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:_,illegal:/<\/|#/,contains:[c.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[c.BACKSLASH_ESCAPE]},c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,f],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[d.concat(/(?!else)/,f),/\s+/,f,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,f],className:{1:"keyword",3:"title.class"},contains:[S,c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+h+"\\s+)",c.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:_,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[N,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,a,c.C_BLOCK_COMMENT_MODE]},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},a,N]}}return Gh=o,Gh}var Vh,fv;function rD(){if(fv)return Vh;fv=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],r=["true","false","null","undefined","NaN","Infinity"],a=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],o=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],d=[].concat(o,a,s);function f(h){const m=h.regex,p=(J,{after:W})=>{const te="",end:""},_=/<[A-Za-z0-9\\._:-]+\s*\/>/,N={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(J,W)=>{const te=J[0].length+J.index,ce=J.input[te];if(ce==="<"||ce===","){W.ignoreMatch();return}ce===">"&&(p(J,{after:te})||W.ignoreMatch());let fe;const be=J.input.substring(te);if(fe=be.match(/^\s*=/)){W.ignoreMatch();return}if((fe=be.match(/^\s+extends\s+/))&&fe.index===0){W.ignoreMatch();return}}},S={$pattern:e,keyword:t,literal:r,built_in:d,"variable.language":c},w="[0-9](_?[0-9])*",k=`\\.(${w})`,E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",M={className:"number",variants:[{begin:`(\\b(${E})((${k})|\\.)?|(${k}))[eE][+-]?(${w})\\b`},{begin:`\\b(${E})\\b((${k})\\b|\\.)?|(${k})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},I={className:"subst",begin:"\\$\\{",end:"\\}",keywords:S,contains:[]},R={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,I],subLanguage:"xml"}},U={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,I],subLanguage:"css"}},B={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,I],subLanguage:"graphql"}},Z={className:"string",begin:"`",end:"`",contains:[h.BACKSLASH_ESCAPE,I]},z={className:"comment",variants:[h.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:y+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),h.C_BLOCK_COMMENT_MODE,h.C_LINE_COMMENT_MODE]},V=[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE,R,U,B,Z,{match:/\$\d+/},M];I.contains=V.concat({begin:/\{/,end:/\}/,keywords:S,contains:["self"].concat(V)});const P=[].concat(z,I.contains),T=P.concat([{begin:/(\s*)\(/,end:/\)/,keywords:S,contains:["self"].concat(P)}]),$={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:S,contains:T},O={variants:[{match:[/class/,/\s+/,y,/\s+/,/extends/,/\s+/,m.concat(y,"(",m.concat(/\./,y),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,y],scope:{1:"keyword",3:"title.class"}}]},H={relevance:0,match:m.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...a,...s]}},X={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},K={variants:[{match:[/function/,/\s+/,y,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[$],illegal:/%/},C={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function j(J){return m.concat("(?!",J.join("|"),")")}const Y={match:m.concat(/\b/,j([...o,"super","import"].map(J=>`${J}\\s*\\(`)),y,m.lookahead(/\s*\(/)),className:"title.function",relevance:0},L={begin:m.concat(/\./,m.lookahead(m.concat(y,/(?![0-9A-Za-z$_(])/))),end:y,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},G={match:[/get|set/,/\s+/,y,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},$]},q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+h.UNDERSCORE_IDENT_RE+")\\s*=>",Q={match:[/const|var|let/,/\s+/,y,/\s*/,/=\s*/,/(async\s*)?/,m.lookahead(q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[$]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:S,exports:{PARAMS_CONTAINS:T,CLASS_REFERENCE:H},illegal:/#(?![$_A-z])/,contains:[h.SHEBANG({label:"shebang",binary:"node",relevance:5}),X,h.APOS_STRING_MODE,h.QUOTE_STRING_MODE,R,U,B,Z,z,{match:/\$\d+/},M,H,{scope:"attr",match:y+m.lookahead(":"),relevance:0},Q,{begin:"("+h.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[z,h.REGEXP_MODE,{className:"function",begin:q,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:h.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:S,contains:T}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:x.begin,end:x.end},{match:_},{begin:N.begin,"on:begin":N.isTrulyOpeningTag,end:N.end}],subLanguage:"xml",contains:[{begin:N.begin,end:N.end,skip:!0,contains:["self"]}]}]},K,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+h.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[$,h.inherit(h.TITLE_MODE,{begin:y,className:"title.function"})]},{match:/\.\.\./,relevance:0},L,{match:"\\$"+y,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[$]},Y,C,O,G,{match:/\$[(.]/}]}}return Vh=f,Vh}var Yh,hv;function iD(){if(hv)return Yh;hv=1;function e(t){const r={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},a={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],o={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:s},contains:[r,a,t.QUOTE_STRING_MODE,o,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return Yh=e,Yh}var Xh,mv;function aD(){if(mv)return Xh;mv=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,r="[0-9a-fA-F](_*[0-9a-fA-F])*",a={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${r})\\.?|(${r})?\\.(${r}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${r})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function s(o){const c={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},d={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},f={className:"symbol",begin:o.UNDERSCORE_IDENT_RE+"@"},h={className:"subst",begin:/\$\{/,end:/\}/,contains:[o.C_NUMBER_MODE]},m={className:"variable",begin:"\\$"+o.UNDERSCORE_IDENT_RE},p={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[m,h]},{begin:"'",end:"'",illegal:/\n/,contains:[o.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[o.BACKSLASH_ESCAPE,m,h]}]};h.contains.push(p);const y={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+o.UNDERSCORE_IDENT_RE+")?"},x={className:"meta",begin:"@"+o.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[o.inherit(p,{className:"string"}),"self"]}]},_=a,N=o.COMMENT("/\\*","\\*/",{contains:[o.C_BLOCK_COMMENT_MODE]}),S={variants:[{className:"type",begin:o.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},w=S;return w.variants[1].contains=[S],S.variants[1].contains=[w],{name:"Kotlin",aliases:["kt","kts"],keywords:c,contains:[o.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),o.C_LINE_COMMENT_MODE,N,d,f,y,x,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:c,relevance:5,contains:[{begin:o.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[o.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:c,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[S,o.C_LINE_COMMENT_MODE,N],relevance:0},o.C_LINE_COMMENT_MODE,N,y,x,p,o.C_NUMBER_MODE]},N]},{begin:[/class|interface|trait/,/\s+/,o.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},o.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},y,x]},p,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` +`},_]}}return Xh=s,Xh}var Kh,pv;function sD(){if(pv)return Kh;pv=1;const e=m=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:m.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[m.APOS_STRING_MODE,m.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:m.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],a=[...t,...r],s=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),d=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),f=o.concat(c).sort().reverse();function h(m){const p=e(m),y=f,x="and or not only",_="[\\w-]+",N="("+_+"|@\\{"+_+"\\})",S=[],w=[],k=function(P){return{className:"string",begin:"~?"+P+".*?"+P}},E=function(P,T,$){return{className:P,begin:T,relevance:$}},M={$pattern:/[a-z-]+/,keyword:x,attribute:s.join(" ")},I={begin:"\\(",end:"\\)",contains:w,keywords:M,relevance:0};w.push(m.C_LINE_COMMENT_MODE,m.C_BLOCK_COMMENT_MODE,k("'"),k('"'),p.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},p.HEXCOLOR,I,E("variable","@@?"+_,10),E("variable","@\\{"+_+"\\}"),E("built_in","~?`[^`]*?`"),{className:"attribute",begin:_+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},p.IMPORTANT,{beginKeywords:"and not"},p.FUNCTION_DISPATCH);const R=w.concat({begin:/\{/,end:/\}/,contains:S}),U={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(w)},B={begin:N+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},p.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:w}}]},Z={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:M,returnEnd:!0,contains:w,relevance:0}},D={className:"variable",variants:[{begin:"@"+_+"\\s*:",relevance:15},{begin:"@"+_}],starts:{end:"[;}]",returnEnd:!0,contains:R}},z={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:N,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[m.C_LINE_COMMENT_MODE,m.C_BLOCK_COMMENT_MODE,U,E("keyword","all\\b"),E("variable","@\\{"+_+"\\}"),{begin:"\\b("+a.join("|")+")\\b",className:"selector-tag"},p.CSS_NUMBER_MODE,E("selector-tag",N,0),E("selector-id","#"+N),E("selector-class","\\."+N,0),E("selector-tag","&",0),p.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+o.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+c.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:R},{begin:"!important"},p.FUNCTION_DISPATCH]},V={begin:_+`:(:)?(${y.join("|")})`,returnBegin:!0,contains:[z]};return S.push(m.C_LINE_COMMENT_MODE,m.C_BLOCK_COMMENT_MODE,Z,D,V,B,z,U,p.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:S}}return Kh=h,Kh}var Zh,gv;function lD(){if(gv)return Zh;gv=1;function e(t){const r="\\[=*\\[",a="\\]=*\\]",s={begin:r,end:a,contains:["self"]},o=[t.COMMENT("--(?!"+r+")","$"),t.COMMENT("--"+r,a,{contains:[s],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:r,end:a,contains:[s],relevance:5}])}}return Zh=e,Zh}var Qh,bv;function oD(){if(bv)return Qh;bv=1;function e(t){const r={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%\{/,end:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:r.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[f]},m={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},p=[t.BACKSLASH_ESCAPE,c,h],y=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],x=(S,w,k="\\1")=>{const E=k==="\\1"?k:r.concat(k,w);return r.concat(r.concat("(?:",S,")"),w,/(?:\\.|[^\\\/])*?/,E,/(?:\\.|[^\\\/])*?/,k,s)},_=(S,w,k)=>r.concat(r.concat("(?:",S,")"),w,/(?:\\.|[^\\\/])*?/,k,s),N=[h,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),d,{className:"string",contains:p,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},m,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:x("s|tr|y",r.either(...y,{capture:!0}))},{begin:x("s|tr|y","\\(","\\)")},{begin:x("s|tr|y","\\[","\\]")},{begin:x("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:_("(?:m|qr)?",/\//,/\//)},{begin:_("m|qr",r.either(...y,{capture:!0}),/\1/)},{begin:_("m|qr",/\(/,/\)/)},{begin:_("m|qr",/\[/,/\]/)},{begin:_("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,f]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,f,m]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return c.contains=N,d.contains=N,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:N}}return Wh=e,Wh}var Jh,yv;function uD(){if(yv)return Jh;yv=1;function e(t){const r={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},a=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:a,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},h={$pattern:a,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:f,illegal:"/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}return Jh=e,Jh}var em,vv;function dD(){if(vv)return em;vv=1;function e(t){const r=t.regex,a=/(?![A-Za-z0-9])(?![$])/,s=r.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,a),o=r.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,a),c=r.concat(/[A-Z]+/,a),d={scope:"variable",match:"\\$+"+s},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},m=t.inherit(t.APOS_STRING_MODE,{illegal:null}),p=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(h)}),y={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(h),"on:begin":($,O)=>{O.data._beginMatch=$[1]||$[2]},"on:end":($,O)=>{O.data._beginMatch!==$[1]&&O.ignoreMatch()}},x=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),_=`[ +]`,N={scope:"string",variants:[p,m,y,x]},S={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},w=["false","null","true"],k=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],E=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],I={keyword:k,literal:($=>{const O=[];return $.forEach(H=>{O.push(H),H.toLowerCase()===H?O.push(H.toUpperCase()):O.push(H.toLowerCase())}),O})(w),built_in:E},R=$=>$.map(O=>O.replace(/\|\d+$/,"")),U={variants:[{match:[/new/,r.concat(_,"+"),r.concat("(?!",R(E).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},B=r.concat(s,"\\b(?!\\()"),Z={variants:[{match:[r.concat(/::/,r.lookahead(/(?!class\b)/)),B],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,r.concat(/::/,r.lookahead(/(?!class\b)/)),B],scope:{1:"title.class",3:"variable.constant"}},{match:[o,r.concat("::",r.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},D={scope:"attr",match:r.concat(s,r.lookahead(":"),r.lookahead(/(?!::)/))},z={relevance:0,begin:/\(/,end:/\)/,keywords:I,contains:[D,d,Z,t.C_BLOCK_COMMENT_MODE,N,S,U]},V={relevance:0,match:[/\b/,r.concat("(?!fn\\b|function\\b|",R(k).join("\\b|"),"|",R(E).join("\\b|"),"\\b)"),s,r.concat(_,"*"),r.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[z]};z.contains.push(V);const P=[D,Z,t.C_BLOCK_COMMENT_MODE,N,S,U],T={begin:r.concat(/#\[\s*\\?/,r.either(o,c)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:w,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:w,keyword:["new","array"]},contains:["self",...P]},...P,{scope:"meta",variants:[{match:o},{match:c}]}]};return{case_insensitive:!1,keywords:I,contains:[T,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},d,V,Z,{match:[/const/,/\s/,s],scope:{1:"keyword",3:"variable.constant"}},U,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:I,contains:["self",T,d,Z,t.C_BLOCK_COMMENT_MODE,N,S]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},N,S]}}return em=e,em}var tm,_v;function fD(){if(_v)return tm;_v=1;function e(t){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return tm=e,tm}var nm,wv;function hD(){if(wv)return nm;wv=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return nm=e,nm}var rm,Ev;function mD(){if(Ev)return rm;Ev=1;function e(t){const r=t.regex,a=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],f={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},m={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},p={begin:/\{\{/,relevance:0},y={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,h,p,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,h,p,m]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,p,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,p,m]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},x="[0-9](_?[0-9])*",_=`(\\b(${x}))?\\.(${x})|\\b(${x})\\.`,N=`\\b|${s.join("|")}`,S={className:"number",relevance:0,variants:[{begin:`(\\b(${x})|(${_}))[eE][+-]?(${x})[jJ]?(?=${N})`},{begin:`(${_})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${N})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${N})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${N})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${N})`},{begin:`\\b(${x})[jJ](?=${N})`}]},w={className:"comment",begin:r.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},k={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",h,S,y,t.HASH_COMMENT_MODE]}]};return m.contains=[y,S,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[h,S,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},y,w,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[k]},{variants:[{match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[S,k,y]}]}}return rm=e,rm}var im,Nv;function pD(){if(Nv)return im;Nv=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return im=e,im}var am,Sv;function gD(){if(Sv)return am;Sv=1;function e(t){const r=t.regex,a=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,s=r.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,c=r.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:a,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:r.lookahead(r.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:a},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,s]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,s]},{scope:{1:"punctuation",2:"number"},match:[c,s]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,s]}]},{scope:{3:"operator"},match:[a,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:c},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return am=e,am}var sm,kv;function bD(){if(kv)return sm;kv=1;function e(t){const r=t.regex,a=/(r#)?/,s=r.concat(a,t.UNDERSCORE_IDENT_RE),o=r.concat(a,t.IDENT_RE),c={className:"title.function.invoke",relevance:0,begin:r.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,r.lookahead(/\s*\(/))},d="([ui](8|16|32|64|128|size)|f(32|64))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],h=["true","false","Some","None","Ok","Err"],m=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],p=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:p,keyword:f,literal:h,built_in:m},illegal:""},c]}}return sm=e,sm}var lm,Cv;function xD(){if(Cv)return lm;Cv=1;const e=h=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:h.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:h.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],a=[...t,...r],s=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),d=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function f(h){const m=e(h),p=c,y=o,x="@[a-z-]+",_="and or not only",S={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[h.C_LINE_COMMENT_MODE,h.C_BLOCK_COMMENT_MODE,m.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},m.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+a.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+y.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+p.join("|")+")"},S,{begin:/\(/,end:/\)/,contains:[m.CSS_NUMBER_MODE]},m.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[m.BLOCK_COMMENT,S,m.HEXCOLOR,m.CSS_NUMBER_MODE,h.QUOTE_STRING_MODE,h.APOS_STRING_MODE,m.IMPORTANT,m.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:x,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:_,attribute:s.join(" ")},contains:[{begin:x,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},S,h.QUOTE_STRING_MODE,h.APOS_STRING_MODE,m.HEXCOLOR,m.CSS_NUMBER_MODE]},m.FUNCTION_DISPATCH]}}return lm=f,lm}var om,Tv;function yD(){if(Tv)return om;Tv=1;function e(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return om=e,om}var cm,Av;function vD(){if(Av)return cm;Av=1;function e(t){const r=t.regex,a=t.COMMENT("--","$"),s={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},c=["true","false","unknown"],d=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],h=["add","asc","collation","desc","final","first","last","view"],m=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],p=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],y=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],x=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],_=p,N=[...m,...h].filter(R=>!p.includes(R)),S={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},w={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},k={match:r.concat(/\b/,r.either(..._),/\s*\(/),relevance:0,keywords:{built_in:_}};function E(R){return r.concat(/\b/,r.either(...R.map(U=>U.replace(/\s+/,"\\s+"))),/\b/)}const M={scope:"keyword",match:E(x),relevance:0};function I(R,{exceptions:U,when:B}={}){const Z=B;return U=U||[],R.map(D=>D.match(/\|\d+$/)||U.includes(D)?D:Z(D)?`${D}|0`:D)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:I(N,{when:R=>R.length<3}),literal:c,type:f,built_in:y},contains:[{scope:"type",match:E(d)},M,k,S,s,o,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,a,w]}}return cm=e,cm}var um,Mv;function _D(){if(Mv)return um;Mv=1;function e(B){return B?typeof B=="string"?B:B.source:null}function t(B){return r("(?=",B,")")}function r(...B){return B.map(D=>e(D)).join("")}function a(B){const Z=B[B.length-1];return typeof Z=="object"&&Z.constructor===Object?(B.splice(B.length-1,1),Z):{}}function s(...B){return"("+(a(B).capture?"":"?:")+B.map(z=>e(z)).join("|")+")"}const o=B=>r(/\b/,B,/\w$/.test(B)?/\b/:/\B/),c=["Protocol","Type"].map(o),d=["init","self"].map(o),f=["Any","Self"],h=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],m=["false","nil","true"],p=["assignment","associativity","higherThan","left","lowerThan","none","right"],y=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],x=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],_=s(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),N=s(_,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),S=r(_,N,"*"),w=s(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),k=s(w,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),E=r(w,k,"*"),M=r(/[A-Z]/,k,"*"),I=["attached","autoclosure",r(/convention\(/,s("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",r(/objc\(/,E,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],R=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function U(B){const Z={match:/\s+/,relevance:0},D=B.COMMENT("/\\*","\\*/",{contains:["self"]}),z=[B.C_LINE_COMMENT_MODE,D],V={match:[/\./,s(...c,...d)],className:{2:"keyword"}},P={match:r(/\./,s(...h)),relevance:0},T=h.filter(nt=>typeof nt=="string").concat(["_|0"]),$=h.filter(nt=>typeof nt!="string").concat(f).map(o),O={variants:[{className:"keyword",match:s(...$,...d)}]},H={$pattern:s(/\b\w+/,/#\w+/),keyword:T.concat(y),literal:m},X=[V,P,O],K={match:r(/\./,s(...x)),relevance:0},C={className:"built_in",match:r(/\b/,s(...x),/(?=\()/)},j=[K,C],Y={match:/->/,relevance:0},L={className:"operator",relevance:0,variants:[{match:S},{match:`\\.(\\.|${N})+`}]},G=[Y,L],q="([0-9]_*)+",Q="([0-9a-fA-F]_*)+",J={className:"number",relevance:0,variants:[{match:`\\b(${q})(\\.(${q}))?([eE][+-]?(${q}))?\\b`},{match:`\\b0x(${Q})(\\.(${Q}))?([pP][+-]?(${q}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},W=(nt="")=>({className:"subst",variants:[{match:r(/\\/,nt,/[0\\tnr"']/)},{match:r(/\\/,nt,/u\{[0-9a-fA-F]{1,8}\}/)}]}),te=(nt="")=>({className:"subst",match:r(/\\/,nt,/[\t ]*(?:[\r\n]|\r\n)/)}),ce=(nt="")=>({className:"subst",label:"interpol",begin:r(/\\/,nt,/\(/),end:/\)/}),fe=(nt="")=>({begin:r(nt,/"""/),end:r(/"""/,nt),contains:[W(nt),te(nt),ce(nt)]}),be=(nt="")=>({begin:r(nt,/"/),end:r(/"/,nt),contains:[W(nt),ce(nt)]}),we={className:"string",variants:[fe(),fe("#"),fe("##"),fe("###"),be(),be("#"),be("##"),be("###")]},Ne=[B.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[B.BACKSLASH_ESCAPE]}],je={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:Ne},$e=nt=>{const Xn=r(nt,/\//),On=r(/\//,nt);return{begin:Xn,end:On,contains:[...Ne,{scope:"comment",begin:`#(?!.*${On})`,end:/$/}]}},st={scope:"regexp",variants:[$e("###"),$e("##"),$e("#"),je]},Rt={match:r(/`/,E,/`/)},Yt={className:"variable",match:/\$\d+/},Pt={className:"variable",match:`\\$${k}+`},Xt=[Rt,Yt,Pt],Yn={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:R,contains:[...G,J,we]}]}},Nn={scope:"keyword",match:r(/@/,s(...I),t(s(/\(/,/\s+/)))},ct={scope:"meta",match:r(/@/,E)},It=[Yn,Nn,ct],ue={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:r(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,k,"+")},{className:"type",match:M,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:r(/\s+&\s+/,t(M)),relevance:0}]},xe={begin://,keywords:H,contains:[...z,...X,...It,Y,ue]};ue.contains.push(xe);const Oe={match:r(E,/\s*:/),keywords:"_|0",relevance:0},Fe={begin:/\(/,end:/\)/,relevance:0,keywords:H,contains:["self",Oe,...z,st,...X,...j,...G,J,we,...Xt,...It,ue]},Ze={begin://,keywords:"repeat each",contains:[...z,ue]},on={begin:s(t(r(E,/\s*:/)),t(r(E,/\s+/,E,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:E}]},Sn={begin:/\(/,end:/\)/,keywords:H,contains:[on,...z,...X,...G,J,we,...It,ue,Fe],endsParent:!0,illegal:/["']/},Kt={match:[/(func|macro)/,/\s+/,s(Rt.match,E,S)],className:{1:"keyword",3:"title.function"},contains:[Ze,Sn,Z],illegal:[/\[/,/%/]},At={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Ze,Sn,Z],illegal:/\[|%/},Wt={match:[/operator/,/\s+/,S],className:{1:"keyword",3:"title"}},ut={begin:[/precedencegroup/,/\s+/,M],className:{1:"keyword",3:"title"},contains:[ue],keywords:[...p,...m],end:/}/},In={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},cn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ni={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,E,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:H,contains:[Ze,...X,{begin:/:/,end:/\{/,keywords:H,contains:[{scope:"title.class.inherited",match:M},...X],relevance:0}]};for(const nt of we.variants){const Xn=nt.contains.find(hn=>hn.label==="interpol");Xn.keywords=H;const On=[...X,...j,...G,J,we,...Xt];Xn.contains=[...On,{begin:/\(/,end:/\)/,contains:["self",...On]}]}return{name:"Swift",keywords:H,contains:[...z,Kt,At,In,cn,Ni,Wt,ut,{beginKeywords:"import",end:/$/,contains:[...z],relevance:0},st,...X,...j,...G,J,we,...Xt,...It,ue,Fe]}}return um=U,um}var dm,Ov;function wD(){if(Ov)return dm;Ov=1;function e(t){const r="true false yes no null",a="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},c={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},d={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,o]},f=t.inherit(d,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),x={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},_={end:",",endsWithParent:!0,excludeEnd:!0,keywords:r,relevance:0},N={begin:/\{/,end:/\}/,contains:[_],illegal:"\\n",relevance:0},S={begin:"\\[",end:"\\]",contains:[_],illegal:"\\n",relevance:0},w=[s,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type",begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:r,keywords:{literal:r}},x,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},N,S,c,d],k=[...w];return k.pop(),k.push(f),_.contains=k,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:w}}return dm=e,dm}var fm,Rv;function ED(){if(Rv)return fm;Rv=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],r=["true","false","null","undefined","NaN","Infinity"],a=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],o=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],d=[].concat(o,a,s);function f(m){const p=m.regex,y=(W,{after:te})=>{const ce="",end:""},N=/<[A-Za-z0-9\\._:-]+\s*\/>/,S={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(W,te)=>{const ce=W[0].length+W.index,fe=W.input[ce];if(fe==="<"||fe===","){te.ignoreMatch();return}fe===">"&&(y(W,{after:ce})||te.ignoreMatch());let be;const we=W.input.substring(ce);if(be=we.match(/^\s*=/)){te.ignoreMatch();return}if((be=we.match(/^\s+extends\s+/))&&be.index===0){te.ignoreMatch();return}}},w={$pattern:e,keyword:t,literal:r,built_in:d,"variable.language":c},k="[0-9](_?[0-9])*",E=`\\.(${k})`,M="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",I={className:"number",variants:[{begin:`(\\b(${M})((${E})|\\.)?|(${E}))[eE][+-]?(${k})\\b`},{begin:`\\b(${M})\\b((${E})\\b|\\.)?|(${E})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},R={className:"subst",begin:"\\$\\{",end:"\\}",keywords:w,contains:[]},U={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[m.BACKSLASH_ESCAPE,R],subLanguage:"xml"}},B={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[m.BACKSLASH_ESCAPE,R],subLanguage:"css"}},Z={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[m.BACKSLASH_ESCAPE,R],subLanguage:"graphql"}},D={className:"string",begin:"`",end:"`",contains:[m.BACKSLASH_ESCAPE,R]},V={className:"comment",variants:[m.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:x+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),m.C_BLOCK_COMMENT_MODE,m.C_LINE_COMMENT_MODE]},P=[m.APOS_STRING_MODE,m.QUOTE_STRING_MODE,U,B,Z,D,{match:/\$\d+/},I];R.contains=P.concat({begin:/\{/,end:/\}/,keywords:w,contains:["self"].concat(P)});const T=[].concat(V,R.contains),$=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:w,contains:["self"].concat(T)}]),O={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:w,contains:$},H={variants:[{match:[/class/,/\s+/,x,/\s+/,/extends/,/\s+/,p.concat(x,"(",p.concat(/\./,x),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,x],scope:{1:"keyword",3:"title.class"}}]},X={relevance:0,match:p.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...a,...s]}},K={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,x,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[O],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Y(W){return p.concat("(?!",W.join("|"),")")}const L={match:p.concat(/\b/,Y([...o,"super","import"].map(W=>`${W}\\s*\\(`)),x,p.lookahead(/\s*\(/)),className:"title.function",relevance:0},G={begin:p.concat(/\./,p.lookahead(p.concat(x,/(?![0-9A-Za-z$_(])/))),end:x,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,x,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},O]},Q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+m.UNDERSCORE_IDENT_RE+")\\s*=>",J={match:[/const|var|let/,/\s+/,x,/\s*/,/=\s*/,/(async\s*)?/,p.lookahead(Q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[O]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:w,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:X},illegal:/#(?![$_A-z])/,contains:[m.SHEBANG({label:"shebang",binary:"node",relevance:5}),K,m.APOS_STRING_MODE,m.QUOTE_STRING_MODE,U,B,Z,D,V,{match:/\$\d+/},I,X,{scope:"attr",match:x+p.lookahead(":"),relevance:0},J,{begin:"("+m.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[V,m.REGEXP_MODE,{className:"function",begin:Q,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:m.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:w,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:_.begin,end:_.end},{match:N},{begin:S.begin,"on:begin":S.isTrulyOpeningTag,end:S.end}],subLanguage:"xml",contains:[{begin:S.begin,end:S.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+m.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[O,m.inherit(m.TITLE_MODE,{begin:x,className:"title.function"})]},{match:/\.\.\./,relevance:0},G,{match:"\\$"+x,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[O]},L,j,H,q,{match:/\$[(.]/}]}}function h(m){const p=m.regex,y=f(m),x=e,_=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],N={begin:[/namespace/,/\s+/,m.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},S={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:_},contains:[y.exports.CLASS_REFERENCE]},w={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},k=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],E={$pattern:e,keyword:t.concat(k),literal:r,built_in:d.concat(_),"variable.language":c},M={className:"meta",begin:"@"+x},I=(Z,D,z)=>{const V=Z.contains.findIndex(P=>P.label===D);if(V===-1)throw new Error("can not find mode to replace");Z.contains.splice(V,1,z)};Object.assign(y.keywords,E),y.exports.PARAMS_CONTAINS.push(M);const R=y.contains.find(Z=>Z.scope==="attr"),U=Object.assign({},R,{match:p.concat(x,p.lookahead(/\s*\?:/))});y.exports.PARAMS_CONTAINS.push([y.exports.CLASS_REFERENCE,R,U]),y.contains=y.contains.concat([M,N,S,U]),I(y,"shebang",m.SHEBANG()),I(y,"use_strict",w);const B=y.contains.find(Z=>Z.label==="func.def");return B.relevance=0,Object.assign(y,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),y}return fm=h,fm}var hm,Dv;function ND(){if(Dv)return hm;Dv=1;function e(t){const r=t.regex,a={className:"string",begin:/"(""|[^/n])"C\b/},s={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,c=/\d{4}-\d{1,2}-\d{1,2}/,d=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:r.concat(/# */,r.either(c,o),/ *#/)},{begin:r.concat(/# */,f,/ *#/)},{begin:r.concat(/# */,d,/ *#/)},{begin:r.concat(/# */,r.either(c,o),/ +/,r.either(d,f),/ *#/)}]},m={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},p={className:"label",begin:/^\w+:/},y=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),x=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[a,s,h,m,p,y,x,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[x]}]}}return hm=e,hm}var mm,jv;function SD(){if(jv)return mm;jv=1;function e(t){t.regex;const r=t.COMMENT(/\(;/,/;\)/);r.contains.push("self");const a=t.COMMENT(/;;/,/$/),s=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},c={className:"variable",begin:/\$[\w_]+/},d={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},m={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:s},contains:[a,r,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},c,d,o,t.QUOTE_STRING_MODE,h,m,f]}}return mm=e,mm}var pm,Lv;function kD(){if(Lv)return pm;Lv=1;var e=P4();return e.registerLanguage("xml",F4()),e.registerLanguage("bash",G4()),e.registerLanguage("c",V4()),e.registerLanguage("cpp",Y4()),e.registerLanguage("csharp",X4()),e.registerLanguage("css",K4()),e.registerLanguage("markdown",Z4()),e.registerLanguage("diff",Q4()),e.registerLanguage("ruby",W4()),e.registerLanguage("go",J4()),e.registerLanguage("graphql",eD()),e.registerLanguage("ini",tD()),e.registerLanguage("java",nD()),e.registerLanguage("javascript",rD()),e.registerLanguage("json",iD()),e.registerLanguage("kotlin",aD()),e.registerLanguage("less",sD()),e.registerLanguage("lua",lD()),e.registerLanguage("makefile",oD()),e.registerLanguage("perl",cD()),e.registerLanguage("objectivec",uD()),e.registerLanguage("php",dD()),e.registerLanguage("php-template",fD()),e.registerLanguage("plaintext",hD()),e.registerLanguage("python",mD()),e.registerLanguage("python-repl",pD()),e.registerLanguage("r",gD()),e.registerLanguage("rust",bD()),e.registerLanguage("scss",xD()),e.registerLanguage("shell",yD()),e.registerLanguage("sql",vD()),e.registerLanguage("swift",_D()),e.registerLanguage("yaml",wD()),e.registerLanguage("typescript",ED()),e.registerLanguage("vbnet",ND()),e.registerLanguage("wasm",SD()),e.HighlightJS=e,e.default=e,pm=e,pm}var CD=kD();const En=Co(CD);function TD(e){const t=e.regex,r="HTTP/([32]|1\\.[01])",a=/[A-Za-z][A-Za-z0-9-]*/,s={className:"attribute",begin:t.concat("^",a,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},o=[s,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+r+" \\d{3})",end:/$/,contains:[{className:"meta",begin:r},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:o}},{begin:"(?=^[A-Z]+ (.*?) "+r+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:r},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:o}},e.inherit(s,{relevance:0})]}}function AD(e){const t=e.regex,r={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{\w+\}/},{begin:t.concat(/[$@]/,e.UNDERSCORE_IDENT_RE)}]},s={endsWithParent:!0,keywords:{$pattern:/[a-z_]{2,}|\/dev\/poll/,literal:["on","off","yes","no","true","false","none","blocked","debug","info","notice","warn","error","crit","select","break","last","permanent","redirect","kqueue","rtsig","epoll","poll","/dev/poll"]},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[r]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:"\\s\\^",end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|\\{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]?\\b",relevance:0},r]};return{name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{beginKeywords:"upstream location",end:/;|\{/,contains:s.contains,keywords:{section:"upstream location"}},{className:"section",begin:t.concat(e.UNDERSCORE_IDENT_RE+t.lookahead(/\s+\{/)),relevance:0},{begin:t.lookahead(e.UNDERSCORE_IDENT_RE+"\\s"),end:";|\\{",contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:s}],relevance:0}],illegal:"[^\\s\\}\\{]"}}function MD(e){const t={className:"number",begin:/[$%]\d+/},r={className:"number",begin:/\b\d+/},a={className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/},s={className:"number",begin:/:\d{1,5}/};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/,contains:[a,s,e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{_:["order","deny","allow","setenv","rewriterule","rewriteengine","rewritecond","documentroot","sethandler","errordocument","loadmodule","options","header","listen","serverroot","servername"]},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{scope:"punctuation",match:/\\\n/},{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable",begin:/[\$%]\{/,end:/\}/,contains:["self",t]},a,r,e.QUOTE_STRING_MODE]}}],illegal:/\S/}}function OD(e){return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:["from","maintainer","expose","env","arg","user","onbuild","stopsignal"],contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"{vp(o),s(!0),setTimeout(()=>s(!1),2e3)};return g.jsxs("div",{className:"group/code relative rounded-md border border-[#2a2a2a] my-4 text-[#ddd] overflow-hidden",children:[x?g.jsxs("div",{className:"flex items-stretch",children:[g.jsxs("span",{className:"relative flex items-center text-[13px] text-[#999] font-mono px-4 py-2 border-r border-[#2a2a2a]",children:[x,g.jsx("span",{className:"absolute top-0 inset-x-0 h-0.5 bg-white/60 rounded-full"})]}),g.jsx("div",{className:"flex-1 border-b border-[#2a2a2a]"}),g.jsx("button",{onClick:S,className:"px-3 py-2 text-[#555] hover:text-white transition-colors border-b border-[#2a2a2a]","aria-label":"Copy code",children:a?g.jsx(Gs,{className:"w-3.5 h-3.5 text-emerald-400"}):g.jsx(mo,{className:"w-3.5 h-3.5"})})]}):g.jsx("button",{onClick:S,className:"absolute top-2 right-2 z-10 p-1 rounded text-[#444] hover:text-white opacity-0 group-hover/code:opacity-100 transition-opacity","aria-label":"Copy code",children:a?g.jsx(Gs,{className:"w-3.5 h-3.5 text-emerald-400"}):g.jsx(mo,{className:"w-3.5 h-3.5"})}),g.jsx("div",{className:"overflow-auto max-h-[400px]",children:g.jsx("table",{className:"w-full border-collapse font-mono text-[12px] leading-[22px] [font-variant-ligatures:none]",children:g.jsx("tbody",{children:N.map((E,M)=>g.jsxs("tr",{children:[g.jsx("td",{className:"select-none w-[1px] whitespace-nowrap px-4 text-right text-[#555] align-top text-[12px] leading-[22px] border-r border-[#2a2a2a]",children:y+M}),g.jsx("td",{className:"pl-4 pr-4 whitespace-pre",dangerouslySetInnerHTML:{__html:E||` -`}})]},M))})})})]})}function Pp(){return e=>{const t=r=>{var a;if(r.type==="element"&&r.tagName==="pre"&&r.children){const s=r.children.find(o=>o.type==="element"&&o.tagName==="code");(a=s==null?void 0:s.data)!=null&&a.meta&&(s.properties=s.properties||{},s.properties.metastring=s.data.meta)}r.children&&r.children.forEach(s=>t(s))};t(e)}}const Fp={code:iE,pre:({children:e})=>g.jsx(g.Fragment,{children:e})};function oa({title:e,content:t,action:r}){return g.jsxs("section",{children:[(e||r)&&g.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3",children:[e?g.jsx("h2",{className:"text-xl font-semibold text-white",children:e}):g.jsx("span",{}),r]}),g.jsx("div",{className:"prose-markdown",children:g.jsx(Bp,{remarkPlugins:[qp],rehypePlugins:[Pp],components:Fp,children:t})})]})}class RD{diff(t,r,a={}){let s;typeof a=="function"?(s=a,a={}):"callback"in a&&(s=a.callback);const o=this.castInput(t,a),c=this.castInput(r,a),d=this.removeEmpty(this.tokenize(o,a)),f=this.removeEmpty(this.tokenize(c,a));return this.diffWithOptionsObj(d,f,a,s)}diffWithOptionsObj(t,r,a,s){var o;const c=k=>{if(k=this.postProcess(k,a),s){setTimeout(function(){s(k)},0);return}else return k},d=r.length,f=t.length;let h=1,m=d+f;a.maxEditLength!=null&&(m=Math.min(m,a.maxEditLength));const p=(o=a.timeout)!==null&&o!==void 0?o:1/0,y=Date.now()+p,x=[{oldPos:-1,lastComponent:void 0}];let _=this.extractCommon(x[0],r,t,0,a);if(x[0].oldPos+1>=f&&_+1>=d)return c(this.buildValues(x[0].lastComponent,r,t));let N=-1/0,S=1/0;const w=()=>{for(let k=Math.max(N,-h);k<=Math.min(S,h);k+=2){let E;const M=x[k-1],I=x[k+1];M&&(x[k-1]=void 0);let R=!1;if(I){const B=I.oldPos-k;R=I&&0<=B&&B=f&&_+1>=d)return c(this.buildValues(E.lastComponent,r,t))||!0;x[k]=E,E.oldPos+1>=f&&(S=Math.min(S,k-1)),_+1>=d&&(N=Math.max(N,k+1))}h++};if(s)(function k(){setTimeout(function(){if(h>m||Date.now()>y)return s(void 0);w()||k()},0)})();else for(;h<=m&&Date.now()<=y;){const k=w();if(k)return k}}addToPath(t,r,a,s,o){const c=t.lastComponent;return c&&!o.oneChangePerToken&&c.added===r&&c.removed===a?{oldPos:t.oldPos+s,lastComponent:{count:c.count+1,added:r,removed:a,previousComponent:c.previousComponent}}:{oldPos:t.oldPos+s,lastComponent:{count:1,added:r,removed:a,previousComponent:c}}}extractCommon(t,r,a,s,o){const c=r.length,d=a.length;let f=t.oldPos,h=f-s,m=0;for(;h+1y.length?_:y}),m.value=this.join(p)}else m.value=this.join(r.slice(f,f+m.count));f+=m.count,m.added||(h+=m.count)}}return s}}class DD extends RD{constructor(){super(...arguments),this.tokenize=zD}equals(t,r,a){return a.ignoreWhitespace?((!a.newlineIsToken||!t.includes(` +`}})]},M))})})})]})}function Pp(){return e=>{const t=r=>{var a;if(r.type==="element"&&r.tagName==="pre"&&r.children){const s=r.children.find(o=>o.type==="element"&&o.tagName==="code");(a=s==null?void 0:s.data)!=null&&a.meta&&(s.properties=s.properties||{},s.properties.metastring=s.data.meta)}r.children&&r.children.forEach(s=>t(s))};t(e)}}const Fp={code:iE,pre:({children:e})=>g.jsx(g.Fragment,{children:e})};function oa({title:e,content:t,action:r}){return g.jsxs("section",{children:[(e||r)&&g.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3",children:[e?g.jsx("h2",{className:"text-xl font-semibold text-white",children:e}):g.jsx("span",{}),r]}),g.jsx("div",{className:"prose-markdown",children:g.jsx(Bp,{remarkPlugins:[qp],rehypePlugins:[Pp],components:Fp,children:t})})]})}class DD{diff(t,r,a={}){let s;typeof a=="function"?(s=a,a={}):"callback"in a&&(s=a.callback);const o=this.castInput(t,a),c=this.castInput(r,a),d=this.removeEmpty(this.tokenize(o,a)),f=this.removeEmpty(this.tokenize(c,a));return this.diffWithOptionsObj(d,f,a,s)}diffWithOptionsObj(t,r,a,s){var o;const c=k=>{if(k=this.postProcess(k,a),s){setTimeout(function(){s(k)},0);return}else return k},d=r.length,f=t.length;let h=1,m=d+f;a.maxEditLength!=null&&(m=Math.min(m,a.maxEditLength));const p=(o=a.timeout)!==null&&o!==void 0?o:1/0,y=Date.now()+p,x=[{oldPos:-1,lastComponent:void 0}];let _=this.extractCommon(x[0],r,t,0,a);if(x[0].oldPos+1>=f&&_+1>=d)return c(this.buildValues(x[0].lastComponent,r,t));let N=-1/0,S=1/0;const w=()=>{for(let k=Math.max(N,-h);k<=Math.min(S,h);k+=2){let E;const M=x[k-1],I=x[k+1];M&&(x[k-1]=void 0);let R=!1;if(I){const B=I.oldPos-k;R=I&&0<=B&&B=f&&_+1>=d)return c(this.buildValues(E.lastComponent,r,t))||!0;x[k]=E,E.oldPos+1>=f&&(S=Math.min(S,k-1)),_+1>=d&&(N=Math.max(N,k+1))}h++};if(s)(function k(){setTimeout(function(){if(h>m||Date.now()>y)return s(void 0);w()||k()},0)})();else for(;h<=m&&Date.now()<=y;){const k=w();if(k)return k}}addToPath(t,r,a,s,o){const c=t.lastComponent;return c&&!o.oneChangePerToken&&c.added===r&&c.removed===a?{oldPos:t.oldPos+s,lastComponent:{count:c.count+1,added:r,removed:a,previousComponent:c.previousComponent}}:{oldPos:t.oldPos+s,lastComponent:{count:1,added:r,removed:a,previousComponent:c}}}extractCommon(t,r,a,s,o){const c=r.length,d=a.length;let f=t.oldPos,h=f-s,m=0;for(;h+1y.length?_:y}),m.value=this.join(p)}else m.value=this.join(r.slice(f,f+m.count));f+=m.count,m.added||(h+=m.count)}}return s}}class jD extends DD{constructor(){super(...arguments),this.tokenize=ID}equals(t,r,a){return a.ignoreWhitespace?((!a.newlineIsToken||!t.includes(` `))&&(t=t.trim()),(!a.newlineIsToken||!r.includes(` `))&&(r=r.trim())):a.ignoreNewlineAtEof&&!a.newlineIsToken&&(t.endsWith(` `)&&(t=t.slice(0,-1)),r.endsWith(` -`)&&(r=r.slice(0,-1))),super.equals(t,r,a)}}const jD=new DD;function LD(e,t,r){return jD.diff(e,t,r)}function zD(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,` -`));const r=[],a=e.split(/(\n|\r\n)/);a[a.length-1]||a.pop();for(let s=0;sN.value.replace(/\n$/,"").split(` +`)&&(r=r.slice(0,-1))),super.equals(t,r,a)}}const LD=new jD;function zD(e,t,r){return LD.diff(e,t,r)}function ID(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,` +`));const r=[],a=e.split(/(\n|\r\n)/);a[a.length-1]||a.pop();for(let s=0;sN.value.replace(/\n$/,"").split(` `).map(S=>{const w=S===""?` -`:h!=="text"?ID(S,h):S.replace(/&/g,"&").replace(//g,">");let k="",E="";return N.removed?k=String(p++):(N.added||(k=String(p++)),E=String(y++)),{highlighted:w,added:!!N.added,removed:!!N.removed,leftNo:k,rightNo:E}})),_=()=>{vp(s),d(!0),setTimeout(()=>d(!1),2e3),o==null||o()};return g.jsxs("div",{className:"rounded-md border border-[#2a2a2a] overflow-hidden",children:[g.jsxs("div",{className:"flex items-stretch",children:[g.jsxs("span",{className:"relative flex items-center text-[13px] text-[#999] font-mono px-4 py-2 border-r border-[#2a2a2a] break-all",children:[e,":",f,g.jsx("span",{className:"absolute top-0 inset-x-0 h-0.5 bg-white/60 rounded-full"})]}),g.jsx("div",{className:"flex-1 border-b border-[#2a2a2a]"}),g.jsx("button",{onClick:_,className:"px-3 py-2 text-[#555] hover:text-white transition-colors flex-shrink-0 border-b border-[#2a2a2a]","aria-label":"Copy fixed code",children:c?g.jsx(Gs,{className:"w-3.5 h-3.5 text-emerald-400"}):g.jsx(mo,{className:"w-3.5 h-3.5"})})]}),g.jsx("div",{className:"overflow-auto max-h-[400px]",children:g.jsx("table",{className:"w-full border-collapse font-mono text-[12px] leading-[22px] [font-variant-ligatures:none]",children:g.jsx("tbody",{children:x.map((N,S)=>g.jsxs("tr",{className:N.added?"bg-blue-500/[0.12]":N.removed?"bg-red-500/[0.12]":"",children:[g.jsx("td",{className:"select-none w-[1px] whitespace-nowrap pl-4 pr-1.5 text-right text-[#555] align-top text-[12px] leading-[22px]",children:N.leftNo}),g.jsx("td",{className:"select-none w-[1px] whitespace-nowrap pl-1.5 pr-4 text-right text-[#555] align-top text-[12px] leading-[22px] border-r border-[#2a2a2a]",children:N.rightNo}),g.jsx("td",{className:"pl-4 pr-4 whitespace-pre",dangerouslySetInnerHTML:{__html:N.highlighted}})]},S))})})})]})}function UD({description:e,scriptCode:t,onCopy:r}){const[a,s]=ee.useState(!1);if(!e&&!t)return null;const o=()=>{t&&(vp(t),s(!0),setTimeout(()=>s(!1),2e3),r==null||r())};return g.jsxs("section",{children:[g.jsx("h2",{className:"text-xl font-semibold text-white mb-3",children:"Proof of Concept"}),g.jsxs("div",{className:"space-y-4",children:[e&&g.jsx("div",{className:"prose-markdown",children:g.jsx(Bp,{remarkPlugins:[qp],rehypePlugins:[Pp],components:Fp,children:e})}),t&&g.jsxs("div",{className:"group/poc relative rounded-md border border-[#2a2a2a] overflow-hidden",children:[g.jsxs("div",{className:"flex items-stretch",children:[g.jsxs("span",{className:"relative flex items-center text-[13px] text-[#999] font-mono px-4 py-2 border-r border-[#2a2a2a]",children:["PoC Script",g.jsx("span",{className:"absolute top-0 inset-x-0 h-0.5 bg-white/60 rounded-full"})]}),g.jsx("div",{className:"flex-1 border-b border-[#2a2a2a]"}),g.jsx("button",{onClick:o,className:"px-3 py-2 text-[#555] hover:text-white transition-colors flex-shrink-0 border-b border-[#2a2a2a]","aria-label":"Copy PoC code",children:a?g.jsx(Gs,{className:"w-3.5 h-3.5 text-emerald-400"}):g.jsx(mo,{className:"w-3.5 h-3.5"})})]}),g.jsx("div",{className:"overflow-auto max-h-[400px] px-4 py-3",children:g.jsx("pre",{className:"font-mono text-[12px] leading-[22px] whitespace-pre [font-variant-ligatures:none]",children:g.jsx("code",{dangerouslySetInnerHTML:{__html:Gn.highlight(t,{language:"python"}).value}})})})]})]})]})}function aE(e){const t=e.match(/(?:https?:\/\/)?(?:www\.)?github\.com\/([^\s/]+\/[^\s/]+)/);if(t){const s=t[1].replace(/\.git$/,"");return{display:s,href:`https://github.com/${s}`,provider:"github"}}const r=e.match(/(?:https?:\/\/)?(?:www\.)?gitlab\.com\/([^\s/]+\/[^\s/]+)/);if(r){const s=r[1].replace(/\.git$/,"");return{display:s,href:`https://gitlab.com/${s}`,provider:"gitlab"}}const a=e.match(/(?:https?:\/\/)?(?:www\.)?bitbucket\.org\/([^\s/]+\/[^\s/]+)/);if(a){const s=a[1].replace(/\.git$/,"");return{display:s,href:`https://bitbucket.org/${s}`,provider:"bitbucket"}}return/^https?:\/\//i.test(e)?{display:e.replace(/^https?:\/\/(www\.)?/,""),href:e,provider:null}:/^[a-zA-Z0-9][\w.-]*\.[a-zA-Z]{2,}/.test(e)?{display:e,href:`https://${e}`,provider:null}:{display:e,href:null,provider:null}}function bo(e,t){return e?aE(e).display.replace(/\/$/,""):t||"Untitled pentest"}function HD({className:e}){return g.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:e,"aria-hidden":"true",children:g.jsx("path",{d:"M2.65 3a.72.72 0 0 0-.72.83l2.86 17.39a.98.98 0 0 0 .96.82h13.72a.72.72 0 0 0 .72-.6l2.86-17.4A.72.72 0 0 0 22.3 3H2.65Zm12.1 12.53H9.3L8.06 8.9h7.8l-1.11 6.63Z"})})}function $D({provider:e,className:t}){const r=t??"w-4 h-4";return e==="gitlab"?g.jsx(_T,{className:`${r} text-orange-400`}):e==="bitbucket"?g.jsx(HD,{className:`${r} text-blue-400`}):g.jsx(yT,{className:`${r} text-white`})}const qD={attack_vector:{N:"Remotely exploitable",A:"Adjacent network",L:"Local access required",P:"Physical access required"},attack_complexity:{L:"Easy to exploit",H:"Requires specific conditions"},privileges_required:{N:"No authentication needed",L:"Low privileges needed",H:"High privileges needed"},user_interaction:{N:"No user action required",R:"Requires user action",P:"Passive user role",A:"Active user role"},scope:{U:"Impact stays contained",C:"Can spread to other systems"},confidentiality:{N:"No data exposure",L:"Partial data exposure",H:"Full data exposure"},integrity:{N:"No data modification",L:"Limited modification",H:"Full data modification"},availability:{N:"No service disruption",L:"Limited disruption",H:"Full service disruption"}},PD={attack_vector:{N:"high",A:"medium",L:"low",P:"low"},attack_complexity:{L:"high",H:"low"},privileges_required:{N:"high",L:"medium",H:"low"},user_interaction:{N:"high",R:"low",P:"medium",A:"low"},scope:{C:"high",U:"low"},confidentiality:{H:"high",L:"medium",N:"low"},integrity:{H:"high",L:"medium",N:"low"},availability:{H:"high",L:"medium",N:"low"}},FD={high:"bg-red-500/15 text-red-400 border-red-500/25",medium:"bg-yellow-500/15 text-yellow-400 border-yellow-500/25",low:"bg-[#222] text-[#666] border-[#333]"},GD=[{label:"Exploitability",keys:["attack_vector","attack_complexity","privileges_required","user_interaction"]},{label:"Impact",keys:["scope","confidentiality","integrity","availability"]}];function VD(e,t,r,a,s){const o=e.replace(/\.git$/,"").replace(/\/+$/,""),c=a.split("/").map(encodeURIComponent).join("/"),d=r.split("/").map(encodeURIComponent).join("/");return t==="github"?`${o}/blob/${d}/${c}#L${s}`:t==="gitlab"?`${o}/-/blob/${d}/${c}#L${s}`:null}function YD({vulnerability:e,statusSlot:t,slackThreadUrl:r}){var R;const{severity:a,cvss:s,cve:o,cwe:c,fix_effort:d,created_at:f,target:h,endpoint:m,method:p,code_locations:y,cvss_breakdown:x,location_meta:_}=e,[N,S]=ee.useState(!0),w=y==null?void 0:y.filter(U=>U.fix_before&&U.fix_after),k=w&&w.length>0,E=h?aE(h):null,M=!!(h||m||p||k),I=x&&Object.values(x).some(U=>U!=null);return g.jsxs("aside",{className:"lg:sticky lg:top-6 lg:max-h-[calc(100vh-3rem)] lg:overflow-y-auto",children:[g.jsx("div",{className:"pb-4",children:g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Severity"}),g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("div",{className:`w-2 h-2 rounded-full ${yp(a)}`,"aria-hidden":"true"}),g.jsx("span",{className:"text-sm font-medium capitalize text-white",children:a})]})]}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"CVSS Score"}),g.jsx("span",{className:"text-sm font-semibold tabular-nums text-white",children:s!==null?s:"N/A"})]}),o&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"CVE"}),g.jsx("span",{className:"text-sm text-white font-mono",children:o})]}),c&&c.length>0&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"CWE"}),g.jsx("span",{className:"text-xs text-white font-mono truncate max-w-[80%] text-right",title:c.join(" · "),children:c.join(" · ")})]}),d&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Fix Effort"}),g.jsx("span",{className:`inline-flex items-center px-2 py-0.5 text-[11px] font-medium rounded-full border ${((R=_C[d])==null?void 0:R.color)??"text-[#666]"}`,children:d.charAt(0).toUpperCase()+d.slice(1)})]}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Discovered"}),g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(R_,{className:"w-3 h-3 text-[#444]","aria-hidden":"true"}),g.jsx("span",{className:"text-sm text-white",children:Hm(f)})]})]}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Status"}),t]})]})}),M&&g.jsxs("div",{className:"border-t border-[#191919] pt-4 pb-4",children:[g.jsx("p",{className:"text-xs font-medium text-[#aaa] mb-2.5",children:"Asset"}),g.jsxs("div",{className:"space-y-2.5",children:[h&&E&&g.jsxs("div",{className:"flex items-center gap-1.5",children:[E.provider?g.jsx("span",{className:"flex-shrink-0 [&_svg]:w-3.5 [&_svg]:h-3.5","aria-hidden":"true",children:g.jsx($D,{provider:E.provider})}):g.jsx(j_,{className:"w-3.5 h-3.5 text-[#555] flex-shrink-0","aria-hidden":"true"}),E.href?g.jsx("a",{href:E.href,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-white hover:text-[#ccc] break-words min-w-0 transition-colors",children:E.display}):g.jsx("span",{className:"text-sm text-white break-words min-w-0",children:E.display})]}),m&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Endpoint"}),g.jsx("span",{className:"text-xs text-white font-mono truncate max-w-[75%] text-right",children:m})]}),p&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Method"}),g.jsx("span",{className:"text-xs text-white font-mono",children:p})]}),k&&g.jsxs("div",{children:[g.jsx("span",{className:"text-xs text-[#aaa] mb-1.5 block",children:"Locations"}),g.jsx("div",{className:"space-y-0.5",children:w.map((U,B)=>{const Z=`${U.file}:${U.start_line}`,D=_?VD(_.repo_url,_.provider,_.branch,U.file,U.start_line):null;return D?g.jsx("a",{href:D,target:"_blank",rel:"noopener noreferrer",className:"text-[13px] text-[#888] hover:text-white font-mono break-all transition-colors block",children:Z},`loc-${B}`):g.jsx("span",{className:"text-[13px] text-[#888] font-mono break-all block",children:Z},`loc-${B}`)})})]})]})]}),I&&g.jsxs("div",{className:"border-t border-[#191919] pt-4",children:[g.jsxs("button",{onClick:()=>S(!N),className:"flex items-center justify-between w-full mb-2.5 group","aria-expanded":N,children:[g.jsx("span",{className:"text-xs font-medium text-[#aaa]",children:"Risk Assessment"}),g.jsx(ho,{className:`w-3.5 h-3.5 text-[#555] group-hover:text-white transition-transform ${N?"":"-rotate-90"}`,"aria-hidden":"true"})]}),g.jsx("div",{className:`space-y-3 ${N?"":"hidden"}`,children:GD.map(U=>{const B=U.keys.filter(Z=>x[Z]!=null);return B.length===0?null:g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[g.jsx("p",{className:"text-[10px] uppercase tracking-wider text-[#444] font-medium",children:U.label}),g.jsx("p",{className:"text-[10px] uppercase tracking-wider text-[#444] font-medium mr-2",children:"Risk"})]}),g.jsx("div",{className:"space-y-1",children:B.map(Z=>{var P,C;const D=x[Z],z=D?((P=PD[Z])==null?void 0:P[D])??"low":"low",V=D?((C=qD[Z])==null?void 0:C[D])??D:"N/A";return g.jsxs("div",{className:"flex items-center justify-between py-0.5",children:[g.jsx("span",{className:"text-[12px] text-[#aaa]",children:V}),g.jsx("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded border ${FD[z]}`,children:z})]},Z)})})]},U.label)})})]})]})}function zv(e){return e?Math.floor((Date.now()-new Date(e).getTime())/1e3)<604800?` ${Hm(e)}`:` on ${Hm(e)}`:""}const XD={open:null,in_progress:{icon:R_,label:"Marked as In Progress",iconColor:"text-blue-400"},snoozed:{icon:Lk,label:"Snoozed",iconColor:"text-purple-400"},fixed:{icon:O_,label:"Marked as Fixed",iconColor:"text-emerald-400"},ignored:{icon:T_,label:"Marked as Ignored",iconColor:"text-[#888]"}},KD=[{label:"Auto-fix & open a PR",slug:"autofix",icon:Bm,requiresCode:!0},{label:"Sync to Jira / Linear",slug:"integrations",icon:pT}];function ZD({vulnerability:e}){const t=vC[e.status],r=e.code_locations&&e.code_locations.length>0,a=r||e.remediation_steps,s=!!(e.evidence||e.assumptions||e.poc_description||e.poc_script_code),[o,c]=ee.useState("fix"),f=[{id:"fix",label:"Fix",show:!!a},{id:"reproduction",label:"Reproduction",show:s}].filter(h=>h.show);return g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"mb-2",children:[e.display_number&&g.jsx("span",{className:"text-xs font-mono text-[#555] block mb-1",children:yA(e.display_number)}),g.jsx("h1",{className:"text-2xl font-semibold text-white",children:e.title})]}),g.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[g.jsx("span",{className:`inline-flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded-full border ${t.color}`,children:t.label}),g.jsxs("div",{className:`inline-flex items-center gap-1.5 px-3 py-1 text-sm font-semibold rounded-full border ${I_[e.severity]}`,title:Zc(e)?`Adjusted from ${e.original_severity}`:void 0,children:[g.jsx("div",{className:`w-2 h-2 rounded-full ${yp(e.severity)}`}),g.jsxs("span",{className:"capitalize",children:[e.severity,!Zc(e)&&e.cvss?` ${e.cvss}`:""]}),Zc(e)&&g.jsx(Vs,{className:"w-3 h-3 opacity-70","aria-hidden":"true"})]}),e.cve&&g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-[#333]",children:"·"}),g.jsx("span",{className:"text-sm text-[#666] font-mono",children:e.cve})]})]})]}),g.jsx("div",{className:"flex flex-shrink-0 flex-wrap items-center gap-2",children:KD.filter(h=>!h.requiresCode||r).map(h=>{const m=h.icon;return g.jsxs("a",{href:fa($u,h.slug),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr(h.slug,"finding_detail"),className:"inline-flex items-center gap-1.5 rounded-lg bg-white px-3 py-1.5 text-xs font-semibold text-black transition-opacity hover:opacity-90",children:[g.jsx(m,{className:"h-3.5 w-3.5","aria-hidden":"true"}),h.label]},h.slug)})})]}),e.status!=="open"&&(()=>{const h=XD[e.status];if(!h)return null;const m=h.icon;return g.jsxs("div",{className:"rounded-lg px-4 py-3.5 flex gap-3",style:{border:"1px solid rgba(255,255,255,0.08)"},children:[g.jsx(m,{className:`w-5 h-5 flex-shrink-0 mt-0.5 ${h.iconColor}`,"aria-hidden":"true"}),g.jsxs("div",{className:"min-w-0",children:[g.jsxs("p",{className:"text-sm font-semibold text-white",children:[h.label,zv(e.status_changed_at)]}),e.status_note&&g.jsxs("p",{className:"text-sm text-[#666] italic mt-1",children:["“",e.status_note,"”"]})]})]})})(),Zc(e)&&g.jsxs("div",{className:"rounded-lg px-4 py-3.5 flex gap-3",style:{border:"1px solid rgba(255,255,255,0.08)"},children:[g.jsx(Vs,{className:"w-5 h-5 flex-shrink-0 mt-0.5 text-orange-400","aria-hidden":"true"}),g.jsxs("div",{className:"min-w-0",children:[g.jsxs("p",{className:"text-sm font-semibold text-white",children:["Severity changed manually from"," ",g.jsx("span",{className:"capitalize",children:e.original_severity}),e.cvss!=null?` (${e.cvss})`:""," to"," ",g.jsx("span",{className:"capitalize",children:e.severity}),zv(e.severity_changed_at)]}),e.severity_override_reason&&g.jsxs("p",{className:"text-sm text-[#666] italic mt-1",children:["“",e.severity_override_reason,"”"]})]})]}),g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_340px] gap-8",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsxs("div",{className:"space-y-8",children:[g.jsx(oa,{title:"TL;DR",content:e.description}),e.impact&&g.jsx(oa,{title:"Impact",content:e.impact}),e.technical_analysis&&g.jsx(oa,{title:"Technical Details",content:e.technical_analysis})]}),f.length>0&&g.jsxs("div",{className:"mt-10",children:[g.jsx("div",{className:"border-b border-[#2a2a2a]",children:g.jsx("nav",{className:"flex gap-6","aria-label":"Tabs",children:f.map(h=>g.jsxs("button",{onClick:()=>c(h.id),className:`relative min-w-[80px] text-center pb-3 text-[16px] font-semibold transition-colors ${o===h.id?"text-white":"text-[#666] hover:text-white"}`,"aria-current":o===h.id?"page":void 0,children:[h.label,o===h.id&&g.jsx("span",{className:"absolute bottom-0 inset-x-0 h-0.5 bg-white rounded-full"})]},h.id))})}),a&&g.jsxs("div",{className:`pt-6 space-y-6 ${o==="fix"?"animate-tab-in":"hidden"}`,children:[e.remediation_steps&&g.jsx(oa,{title:"How do I fix it?",content:e.remediation_steps}),r&&e.code_locations.filter(h=>h.fix_before&&h.fix_after).map((h,m)=>g.jsx(BD,{file:h.file,startLine:h.start_line,endLine:h.end_line,before:h.fix_before,after:h.fix_after},`fix-${m}`))]}),s&&g.jsxs("div",{className:`pt-6 space-y-8 ${o==="reproduction"?"animate-tab-in":"hidden"}`,children:[e.assumptions&&g.jsx(oa,{title:"Assumptions",content:e.assumptions}),e.evidence&&g.jsx(oa,{title:"Evidence",content:e.evidence}),g.jsx(UD,{description:e.poc_description,scriptCode:e.poc_script_code})]})]})]}),g.jsx("div",{className:"lg:border-l lg:border-[#2a2a2a] lg:pl-6",children:g.jsx(YD,{vulnerability:e,statusSlot:g.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded-full border ${t.color}`,children:[g.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${t.dotColor}`}),t.label]})})})]})]})}const Iv=[{key:"critical",label:"critical",dotClass:"bg-red-500",textClass:"text-red-500"},{key:"high",label:"high",dotClass:"bg-orange-500",textClass:"text-orange-500"},{key:"medium",label:"medium",dotClass:"bg-yellow-500",textClass:"text-yellow-500"},{key:"low",label:"low",dotClass:"bg-blue-500",textClass:"text-blue-500"}];function QD({findings:e,className:t,unit:r="issues",trailing:a}){return e.total<=0?null:g.jsxs("div",{className:Mr("space-y-3",t),children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-x-8 gap-y-3",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-2xl font-semibold text-white tabular-nums",children:e.total}),g.jsx("span",{className:"text-sm text-[#666]",children:r})]}),g.jsx("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2",children:Iv.map(({key:s,label:o,dotClass:c,textClass:d})=>{const f=e[s];return f<=0?null:g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("div",{className:Mr("w-2 h-2 rounded-full",c),"aria-hidden":"true"}),g.jsx("span",{className:Mr("text-sm tabular-nums",d),children:f}),g.jsx("span",{className:"text-xs text-[#555]",children:o})]},s)})}),a?g.jsx("div",{className:"flex items-center gap-2",children:a}):null]}),g.jsx("div",{className:"h-1.5 rounded-full bg-[#222] overflow-hidden flex",children:Iv.map(({key:s,dotClass:o})=>{const c=e[s];return c<=0?null:g.jsx("div",{className:Mr("h-full",o),style:{width:`${c/e.total*100}%`}},s)})})]})}function ln(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,a;r{}};function Yu(){for(var e=0,t=arguments.length,r={},a;e=0&&(a=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:a}})}pu.prototype=Yu.prototype={constructor:pu,on:function(e,t){var r=this._,a=JD(e+"",r),s,o=-1,c=a.length;if(arguments.length<2){for(;++o0)for(var r=new Array(s),a=0,s,o;a=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Uv.hasOwnProperty(t)?{space:Uv[t],local:e}:e}function tj(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Wm&&t.documentElement.namespaceURI===Wm?t.createElement(e):t.createElementNS(r,e)}}function nj(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function sE(e){var t=Xu(e);return(t.local?nj:tj)(t)}function rj(){}function Gp(e){return e==null?rj:function(){return this.querySelector(e)}}function ij(e){typeof e!="function"&&(e=Gp(e));for(var t=this._groups,r=t.length,a=new Array(r),s=0;s=E&&(E=k+1);!(I=S[E])&&++E<_;);M._next=I||null}}return c=new sr(c,a),c._enter=d,c._exit=f,c}function Nj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Sj(){return new sr(this._exit||this._groups.map(uE),this._parents)}function kj(e,t,r){var a=this.enter(),s=this,o=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?o.remove():r(o),a&&s?a.merge(s).order():s}function Tj(e){for(var t=e.selection?e.selection():e,r=this._groups,a=t._groups,s=r.length,o=a.length,c=Math.min(s,o),d=new Array(s),f=0;f=0;)(c=a[s])&&(o&&c.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(c,o),o=c);return this}function Aj(e){e||(e=Mj);function t(p,y){return p&&y?e(p.__data__,y.__data__):!p-!y}for(var r=this._groups,a=r.length,s=new Array(a),o=0;ot?1:e>=t?0:NaN}function Oj(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Rj(){return Array.from(this)}function Dj(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?Fj:typeof t=="function"?Vj:Gj)(e,t,r??"")):Xs(this.node(),e)}function Xs(e,t){return e.style.getPropertyValue(t)||dE(e).getComputedStyle(e,null).getPropertyValue(t)}function Xj(e){return function(){delete this[e]}}function Kj(e,t){return function(){this[e]=t}}function Zj(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Qj(e,t){return arguments.length>1?this.each((t==null?Xj:typeof t=="function"?Zj:Kj)(e,t)):this.node()[e]}function fE(e){return e.trim().split(/^|\s+/)}function Vp(e){return e.classList||new hE(e)}function hE(e){this._node=e,this._names=fE(e.getAttribute("class")||"")}hE.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function mE(e,t){for(var r=Vp(e),a=-1,s=t.length;++a=0&&(r=t.slice(a+1),t=t.slice(0,a)),{type:t,name:r}})}function SL(e){return function(){var t=this.__on;if(t){for(var r=0,a=-1,s=t.length,o;r()=>e;function Jm(e,{sourceEvent:t,subject:r,target:a,identifier:s,active:o,x:c,y:d,dx:f,dy:h,dispatch:m}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:d,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:m}})}Jm.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function LL(e){return!e.ctrlKey&&!e.button}function zL(){return this.parentNode}function IL(e,t){return t??{x:e.x,y:e.y}}function BL(){return navigator.maxTouchPoints||"ontouchstart"in this}function vE(){var e=LL,t=zL,r=IL,a=BL,s={},o=Yu("start","drag","end"),c=0,d,f,h,m,p=0;function y(M){M.on("mousedown.drag",x).filter(a).on("touchstart.drag",S).on("touchmove.drag",w,jL).on("touchend.drag touchcancel.drag",k).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(M,I){if(!(m||!e.call(this,M,I))){var R=E(this,t.call(this,M,I),M,I,"mouse");R&&(ir(M.view).on("mousemove.drag",_,xo).on("mouseup.drag",N,xo),xE(M.view),gm(M),h=!1,d=M.clientX,f=M.clientY,R("start",M))}}function _(M){if(Ps(M),!h){var I=M.clientX-d,R=M.clientY-f;h=I*I+R*R>p}s.mouse("drag",M)}function N(M){ir(M.view).on("mousemove.drag mouseup.drag",null),yE(M.view,h),Ps(M),s.mouse("end",M)}function S(M,I){if(e.call(this,M,I)){var R=M.changedTouches,U=t.call(this,M,I),B=R.length,Z,D;for(Z=0;Z>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?iu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?iu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=HL.exec(e))?new Fn(t[1],t[2],t[3],1):(t=$L.exec(e))?new Fn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=qL.exec(e))?iu(t[1],t[2],t[3],t[4]):(t=PL.exec(e))?iu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=FL.exec(e))?Vv(t[1],t[2]/100,t[3]/100,1):(t=GL.exec(e))?Vv(t[1],t[2]/100,t[3]/100,t[4]):Hv.hasOwnProperty(e)?Pv(Hv[e]):e==="transparent"?new Fn(NaN,NaN,NaN,0):null}function Pv(e){return new Fn(e>>16&255,e>>8&255,e&255,1)}function iu(e,t,r,a){return a<=0&&(e=t=r=NaN),new Fn(e,t,r,a)}function XL(e){return e instanceof jo||(e=Ga(e)),e?(e=e.rgb(),new Fn(e.r,e.g,e.b,e.opacity)):new Fn}function ep(e,t,r,a){return arguments.length===1?XL(e):new Fn(e,t,r,a??1)}function Fn(e,t,r,a){this.r=+e,this.g=+t,this.b=+r,this.opacity=+a}Yp(Fn,ep,_E(jo,{brighter(e){return e=e==null?ku:Math.pow(ku,e),new Fn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?yo:Math.pow(yo,e),new Fn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fn(qa(this.r),qa(this.g),qa(this.b),Tu(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:Fv,formatHex:Fv,formatHex8:KL,formatRgb:Gv,toString:Gv}));function Fv(){return`#${Ha(this.r)}${Ha(this.g)}${Ha(this.b)}`}function KL(){return`#${Ha(this.r)}${Ha(this.g)}${Ha(this.b)}${Ha((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gv(){const e=Tu(this.opacity);return`${e===1?"rgb(":"rgba("}${qa(this.r)}, ${qa(this.g)}, ${qa(this.b)}${e===1?")":`, ${e})`}`}function Tu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function qa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ha(e){return e=qa(e),(e<16?"0":"")+e.toString(16)}function Vv(e,t,r,a){return a<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ar(e,t,r,a)}function wE(e){if(e instanceof Ar)return new Ar(e.h,e.s,e.l,e.opacity);if(e instanceof jo||(e=Ga(e)),!e)return new Ar;if(e instanceof Ar)return e;e=e.rgb();var t=e.r/255,r=e.g/255,a=e.b/255,s=Math.min(t,r,a),o=Math.max(t,r,a),c=NaN,d=o-s,f=(o+s)/2;return d?(t===o?c=(r-a)/d+(r0&&f<1?0:c,new Ar(c,d,f,e.opacity)}function ZL(e,t,r,a){return arguments.length===1?wE(e):new Ar(e,t,r,a??1)}function Ar(e,t,r,a){this.h=+e,this.s=+t,this.l=+r,this.opacity=+a}Yp(Ar,ZL,_E(jo,{brighter(e){return e=e==null?ku:Math.pow(ku,e),new Ar(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?yo:Math.pow(yo,e),new Ar(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,a=r+(r<.5?r:1-r)*t,s=2*r-a;return new Fn(bm(e>=240?e-240:e+120,s,a),bm(e,s,a),bm(e<120?e+240:e-120,s,a),this.opacity)},clamp(){return new Ar(Yv(this.h),au(this.s),au(this.l),Tu(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=Tu(this.opacity);return`${e===1?"hsl(":"hsla("}${Yv(this.h)}, ${au(this.s)*100}%, ${au(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Yv(e){return e=(e||0)%360,e<0?e+360:e}function au(e){return Math.max(0,Math.min(1,e||0))}function bm(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Xp=e=>()=>e;function QL(e,t){return function(r){return e+r*t}}function WL(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(a){return Math.pow(e+a*t,r)}}function JL(e){return(e=+e)==1?EE:function(t,r){return r-t?WL(t,r,e):Xp(isNaN(t)?r:t)}}function EE(e,t){var r=t-e;return r?QL(e,r):Xp(isNaN(e)?t:e)}const Cu=(function e(t){var r=JL(t);function a(s,o){var c=r((s=ep(s)).r,(o=ep(o)).r),d=r(s.g,o.g),f=r(s.b,o.b),h=EE(s.opacity,o.opacity);return function(m){return s.r=c(m),s.g=d(m),s.b=f(m),s.opacity=h(m),s+""}}return a.gamma=e,a})(1);function e6(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,a=t.slice(),s;return function(o){for(s=0;sr&&(o=t.slice(r,o),d[c]?d[c]+=o:d[++c]=o),(a=a[0])===(s=s[0])?d[c]?d[c]+=s:d[++c]=s:(d[++c]=null,f.push({i:c,x:Vr(a,s)})),r=xm.lastIndex;return r180?m+=360:m-h>180&&(h+=360),y.push({i:p.push(s(p)+"rotate(",null,a)-2,x:Vr(h,m)})):m&&p.push(s(p)+"rotate("+m+a)}function d(h,m,p,y){h!==m?y.push({i:p.push(s(p)+"skewX(",null,a)-2,x:Vr(h,m)}):m&&p.push(s(p)+"skewX("+m+a)}function f(h,m,p,y,x,_){if(h!==p||m!==y){var N=x.push(s(x)+"scale(",null,",",null,")");_.push({i:N-4,x:Vr(h,p)},{i:N-2,x:Vr(m,y)})}else(p!==1||y!==1)&&x.push(s(x)+"scale("+p+","+y+")")}return function(h,m){var p=[],y=[];return h=e(h),m=e(m),o(h.translateX,h.translateY,m.translateX,m.translateY,p,y),c(h.rotate,m.rotate,p,y),d(h.skewX,m.skewX,p,y),f(h.scaleX,h.scaleY,m.scaleX,m.scaleY,p,y),h=m=null,function(x){for(var _=-1,N=y.length,S;++_=0&&e._call.call(void 0,t),e=e._next;--Ks}function Zv(){Va=(Mu=_o.now())+Ku,Ks=ao=0;try{p6()}finally{Ks=0,b6(),Va=0}}function g6(){var e=_o.now(),t=e-Mu;t>TE&&(Ku-=t,Mu=e)}function b6(){for(var e,t=Au,r,a=1/0;t;)t._call?(a>t._time&&(a=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Au=r);so=e,rp(a)}function rp(e){if(!Ks){ao&&(ao=clearTimeout(ao));var t=e-Va;t>24?(e<1/0&&(ao=setTimeout(Zv,e-_o.now()-Ku)),eo&&(eo=clearInterval(eo))):(eo||(Mu=_o.now(),eo=setInterval(g6,TE)),Ks=1,CE(Zv))}}function Qv(e,t,r){var a=new Ou;return t=t==null?0:+t,a.restart(s=>{a.stop(),e(s+t)},t,r),a}var x6=Yu("start","end","cancel","interrupt"),y6=[],ME=0,Wv=1,ip=2,bu=3,Jv=4,ap=5,xu=6;function Zu(e,t,r,a,s,o){var c=e.__transition;if(!c)e.__transition={};else if(r in c)return;v6(e,r,{name:t,index:a,group:s,on:x6,tween:y6,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ME})}function Zp(e,t){var r=Ir(e,t);if(r.state>ME)throw new Error("too late; already scheduled");return r}function Zr(e,t){var r=Ir(e,t);if(r.state>bu)throw new Error("too late; already running");return r}function Ir(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function v6(e,t,r){var a=e.__transition,s;a[t]=r,r.timer=AE(o,0,r.time);function o(h){r.state=Wv,r.timer.restart(c,r.delay,r.time),r.delay<=h&&c(h-r.delay)}function c(h){var m,p,y,x;if(r.state!==Wv)return f();for(m in a)if(x=a[m],x.name===r.name){if(x.state===bu)return Qv(c);x.state===Jv?(x.state=xu,x.timer.stop(),x.on.call("interrupt",e,e.__data__,x.index,x.group),delete a[m]):+mip&&a.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function Z6(e,t,r){var a,s,o=K6(t)?Zp:Zr;return function(){var c=o(this,e),d=c.on;d!==a&&(s=(a=d).copy()).on(t,r),c.on=s}}function Q6(e,t){var r=this._id;return arguments.length<2?Ir(this.node(),r).on.on(e):this.each(Z6(r,e,t))}function W6(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function J6(){return this.on("end.remove",W6(this._id))}function ez(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Gp(e));for(var a=this._groups,s=a.length,o=new Array(s),c=0;c()=>e;function Sz(e,{sourceEvent:t,target:r,transform:a,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:s}})}function vi(e,t,r){this.k=e,this.x=t,this.y=r}vi.prototype={constructor:vi,scale:function(e){return e===1?this:new vi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new vi(this.k,this.x+this.k*e,this.y+this.k*t)},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 Qu=new vi(1,0,0);jE.prototype=vi.prototype;function jE(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Qu;return e.__zoom}function ym(e){e.stopImmediatePropagation()}function to(e){e.preventDefault(),e.stopImmediatePropagation()}function kz(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Tz(){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 e1(){return this.__zoom||Qu}function Cz(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Az(){return navigator.maxTouchPoints||"ontouchstart"in this}function Mz(e,t,r){var a=e.invertX(t[0][0])-r[0][0],s=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],c=e.invertY(t[1][1])-r[1][1];return e.translate(s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s),c>o?(o+c)/2:Math.min(0,o)||Math.max(0,c))}function LE(){var e=kz,t=Tz,r=Mz,a=Cz,s=Az,o=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,f=gu,h=Yu("start","zoom","end"),m,p,y,x=500,_=150,N=0,S=10;function w(C){C.property("__zoom",e1).on("wheel.zoom",B,{passive:!1}).on("mousedown.zoom",Z).on("dblclick.zoom",D).filter(s).on("touchstart.zoom",z).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(C,$,O,H){var X=C.selection?C.selection():C;X.property("__zoom",e1),C!==X?I(C,$,O,H):X.interrupt().each(function(){R(this,arguments).event(H).start().zoom(null,typeof $=="function"?$.apply(this,arguments):$).end()})},w.scaleBy=function(C,$,O,H){w.scaleTo(C,function(){var X=this.__zoom.k,K=typeof $=="function"?$.apply(this,arguments):$;return X*K},O,H)},w.scaleTo=function(C,$,O,H){w.transform(C,function(){var X=t.apply(this,arguments),K=this.__zoom,T=O==null?M(X):typeof O=="function"?O.apply(this,arguments):O,j=K.invert(T),Y=typeof $=="function"?$.apply(this,arguments):$;return r(E(k(K,Y),T,j),X,c)},O,H)},w.translateBy=function(C,$,O,H){w.transform(C,function(){return r(this.__zoom.translate(typeof $=="function"?$.apply(this,arguments):$,typeof O=="function"?O.apply(this,arguments):O),t.apply(this,arguments),c)},null,H)},w.translateTo=function(C,$,O,H,X){w.transform(C,function(){var K=t.apply(this,arguments),T=this.__zoom,j=H==null?M(K):typeof H=="function"?H.apply(this,arguments):H;return r(Qu.translate(j[0],j[1]).scale(T.k).translate(typeof $=="function"?-$.apply(this,arguments):-$,typeof O=="function"?-O.apply(this,arguments):-O),K,c)},H,X)};function k(C,$){return $=Math.max(o[0],Math.min(o[1],$)),$===C.k?C:new vi($,C.x,C.y)}function E(C,$,O){var H=$[0]-O[0]*C.k,X=$[1]-O[1]*C.k;return H===C.x&&X===C.y?C:new vi(C.k,H,X)}function M(C){return[(+C[0][0]+ +C[1][0])/2,(+C[0][1]+ +C[1][1])/2]}function I(C,$,O,H){C.on("start.zoom",function(){R(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(H).end()}).tween("zoom",function(){var X=this,K=arguments,T=R(X,K).event(H),j=t.apply(X,K),Y=O==null?M(j):typeof O=="function"?O.apply(X,K):O,L=Math.max(j[1][0]-j[0][0],j[1][1]-j[0][1]),G=X.__zoom,q=typeof $=="function"?$.apply(X,K):$,Q=f(G.invert(Y).concat(L/G.k),q.invert(Y).concat(L/q.k));return function(J){if(J===1)J=q;else{var W=Q(J),te=L/W[2];J=new vi(te,Y[0]-W[0]*te,Y[1]-W[1]*te)}T.zoom(null,J)}})}function R(C,$,O){return!O&&C.__zooming||new U(C,$)}function U(C,$){this.that=C,this.args=$,this.active=0,this.sourceEvent=null,this.extent=t.apply(C,$),this.taps=0}U.prototype={event:function(C){return C&&(this.sourceEvent=C),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,$){return this.mouse&&C!=="mouse"&&(this.mouse[1]=$.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=$.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=$.invert(this.touch1[0])),this.that.__zoom=$,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){var $=ir(this.that).datum();h.call(C,this.that,new Sz(C,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:h}),$)}};function B(C,...$){if(!e.apply(this,arguments))return;var O=R(this,$).event(C),H=this.__zoom,X=Math.max(o[0],Math.min(o[1],H.k*Math.pow(2,a.apply(this,arguments)))),K=Tr(C);if(O.wheel)(O.mouse[0][0]!==K[0]||O.mouse[0][1]!==K[1])&&(O.mouse[1]=H.invert(O.mouse[0]=K)),clearTimeout(O.wheel);else{if(H.k===X)return;O.mouse=[K,H.invert(K)],yu(this),O.start()}to(C),O.wheel=setTimeout(T,_),O.zoom("mouse",r(E(k(H,X),O.mouse[0],O.mouse[1]),O.extent,c));function T(){O.wheel=null,O.end()}}function Z(C,...$){if(y||!e.apply(this,arguments))return;var O=C.currentTarget,H=R(this,$,!0).event(C),X=ir(C.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",L,!0),K=Tr(C,O),T=C.clientX,j=C.clientY;xE(C.view),ym(C),H.mouse=[K,this.__zoom.invert(K)],yu(this),H.start();function Y(G){if(to(G),!H.moved){var q=G.clientX-T,Q=G.clientY-j;H.moved=q*q+Q*Q>N}H.event(G).zoom("mouse",r(E(H.that.__zoom,H.mouse[0]=Tr(G,O),H.mouse[1]),H.extent,c))}function L(G){X.on("mousemove.zoom mouseup.zoom",null),yE(G.view,H.moved),to(G),H.event(G).end()}}function D(C,...$){if(e.apply(this,arguments)){var O=this.__zoom,H=Tr(C.changedTouches?C.changedTouches[0]:C,this),X=O.invert(H),K=O.k*(C.shiftKey?.5:2),T=r(E(k(O,K),H,X),t.apply(this,$),c);to(C),d>0?ir(this).transition().duration(d).call(I,T,H,C):ir(this).call(w.transform,T,H,C)}}function z(C,...$){if(e.apply(this,arguments)){var O=C.touches,H=O.length,X=R(this,$,C.changedTouches.length===H).event(C),K,T,j,Y;for(ym(C),T=0;T`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:t,sourceHandle:r,targetHandle:a})=>`Couldn't create edge for ${e} handle id: "${e==="source"?r:a}", edge id: ${t}.`,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.`},wo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],zE=["Enter"," ","Escape"],IE={"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:t,y:r})=>`Moved selected node ${e}. New position, x: ${t}, y: ${r}`,"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 Zs;(function(e){e.Strict="strict",e.Loose="loose"})(Zs||(Zs={}));var Pa;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Pa||(Pa={}));var Eo;(function(e){e.Partial="partial",e.Full="full"})(Eo||(Eo={}));const BE={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ca;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ca||(ca={}));var Ru;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Ru||(Ru={}));var ze;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ze||(ze={}));const t1={[ze.Left]:ze.Right,[ze.Right]:ze.Left,[ze.Top]:ze.Bottom,[ze.Bottom]:ze.Top};function UE(e){return e===null?null:e?"valid":"invalid"}const HE=e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,Oz=e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Wp=e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Lo=(e,t=[0,0])=>{const{width:r,height:a}=Qr(e),s=e.origin??t,o=r*s[0],c=a*s[1];return{x:e.position.x-o,y:e.position.y-c}},Rz=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((a,s)=>{const o=typeof s=="string";let c=!t.nodeLookup&&!o?s:void 0;t.nodeLookup&&(c=o?t.nodeLookup.get(s):Wp(s)?s:t.nodeLookup.get(s.id));const d=c?Du(c,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Wu(a,d)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Ju(r)},zo=(e,t={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},a=!1;return e.forEach(s=>{(t.filter===void 0||t.filter(s))&&(r=Wu(r,Du(s)),a=!0)}),a?Ju(r):{x:0,y:0,width:0,height:0}},Jp=(e,t,[r,a,s]=[0,0,1],o=!1,c=!1)=>{const d=(t.x-r)/s,f=(t.y-a)/s,h=t.width/s,m=t.height/s,p=[];for(const y of e.values()){const{measured:x,selectable:_=!0,hidden:N=!1}=y;if(c&&!_||N)continue;const S=x.width??y.width??y.initialWidth??0,w=x.height??y.height??y.initialHeight??0,{x:k,y:E}=y.internals.positionAbsolute,M=FE(d,f,h,m,k,E,S,w),I=S*w,R=o&&M>0;(!y.internals.handleBounds||R||M>=I||y.dragging)&&p.push(y)}return p},Dz=(e,t)=>{const r=new Set;return e.forEach(a=>{r.add(a.id)}),t.filter(a=>r.has(a.source)||r.has(a.target))};function jz(e,t){const r=new Map,a=t!=null&&t.nodes?new Set(t.nodes.map(s=>s.id)):null;return e.forEach(s=>{let o;if(t!=null&&t.includeHiddenNodes){const{width:c,height:d}=Qr(s);o=c>0&&d>0}else o=!!(s.measured.width&&s.measured.height&&!s.hidden);o&&(!a||a.has(s.id))&&r.set(s.id,s)}),r}async function Lz({nodes:e,width:t,height:r,panZoom:a,minZoom:s,maxZoom:o},c){if(e.size===0)return!0;const d=jz(e,c),f=zo(d),h=tg(f,t,r,(c==null?void 0:c.minZoom)??s,(c==null?void 0:c.maxZoom)??o,(c==null?void 0:c.padding)??.1);return await a.setViewport(h,{duration:c==null?void 0:c.duration,ease:c==null?void 0:c.ease,interpolate:c==null?void 0:c.interpolate}),!0}function $E({nodeId:e,nextPosition:t,nodeLookup:r,nodeOrigin:a=[0,0],nodeExtent:s,onError:o}){const c=r.get(e),d=c.parentId?r.get(c.parentId):void 0,{x:f,y:h}=d?d.internals.positionAbsolute:{x:0,y:0},m=c.origin??a;let p=c.extent||s;if(c.extent==="parent"&&!c.expandParent)if(!d)o==null||o("005",Lr.error005());else{const x=d.measured.width,_=d.measured.height;x&&_&&(p=[[f,h],[f+x,h+_]])}else d&&Xa(c.extent)&&(p=[[c.extent[0][0]+f,c.extent[0][1]+h],[c.extent[1][0]+f,c.extent[1][1]+h]]);const y=Xa(p)?Ya(t,p,c.measured):t;return(c.measured.width===void 0||c.measured.height===void 0)&&(o==null||o("015",Lr.error015())),{position:{x:y.x-f+(c.measured.width??0)*m[0],y:y.y-h+(c.measured.height??0)*m[1]},positionAbsolute:y}}async function zz({nodesToRemove:e=[],edgesToRemove:t=[],nodes:r,edges:a,onBeforeDelete:s}){const o=new Set(e.map(y=>y.id)),c=[];for(const y of r){if(y.deletable===!1)continue;const x=o.has(y.id),_=!x&&y.parentId&&c.find(N=>N.id===y.parentId);(x||_)&&c.push(y)}const d=new Set(t.map(y=>y.id)),f=a.filter(y=>y.deletable!==!1),m=Dz(c,f);for(const y of f)d.has(y.id)&&!m.find(_=>_.id===y.id)&&m.push(y);if(!s)return{edges:m,nodes:c};const p=await s({nodes:c,edges:m});return typeof p=="boolean"?p?{edges:m,nodes:c}:{edges:[],nodes:[]}:p}const Qs=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),Ya=(e={x:0,y:0},t,r)=>({x:Qs(e.x,t[0][0],t[1][0]-((r==null?void 0:r.width)??0)),y:Qs(e.y,t[0][1],t[1][1]-((r==null?void 0:r.height)??0))});function qE(e,t,r){const{width:a,height:s}=Qr(r),{x:o,y:c}=r.internals.positionAbsolute;return Ya(e,[[o,c],[o+a,c+s]],t)}const n1=(e,t,r)=>er?-Qs(Math.abs(e-r),1,t)/t:0,eg=(e,t,r=15,a=40)=>{const s=n1(e.x,a,t.width-a)*r,o=n1(e.y,a,t.height-a)*r;return[s,o]},Wu=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),sp=({x:e,y:t,width:r,height:a})=>({x:e,y:t,x2:e+r,y2:t+a}),Ju=({x:e,y:t,x2:r,y2:a})=>({x:e,y:t,width:r-e,height:a-t}),No=(e,t=[0,0])=>{var s,o;const{x:r,y:a}=Wp(e)?e.internals.positionAbsolute:Lo(e,t);return{x:r,y:a,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},Du=(e,t=[0,0])=>{var s,o;const{x:r,y:a}=Wp(e)?e.internals.positionAbsolute:Lo(e,t);return{x:r,y:a,x2:r+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:a+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},PE=(e,t)=>Ju(Wu(sp(e),sp(t))),FE=(e,t,r,a,s,o,c,d)=>{const f=Math.max(0,Math.min(e+r,s+c)-Math.max(e,s)),h=Math.max(0,Math.min(t+a,o+d)-Math.max(t,o));return Math.ceil(f*h)},ju=(e,t)=>FE(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),r1=e=>Or(e.width)&&Or(e.height)&&Or(e.x)&&Or(e.y),Or=e=>!isNaN(e)&&isFinite(e),GE=(e,t)=>(r,a)=>{},Io=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Bo=({x:e,y:t},[r,a,s],o=!1,c=[1,1])=>{const d={x:(e-r)/s,y:(t-a)/s};return o?Io(d,c):d},Ws=({x:e,y:t},[r,a,s])=>({x:e*s+r,y:t*s+a});function Ls(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(r)}if(typeof e=="string"&&e.endsWith("%")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(t*r*.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 Iz(e,t,r){if(typeof e=="string"||typeof e=="number"){const a=Ls(e,r),s=Ls(e,t);return{top:a,right:s,bottom:a,left:s,x:s*2,y:a*2}}if(typeof e=="object"){const a=Ls(e.top??e.y??0,r),s=Ls(e.bottom??e.y??0,r),o=Ls(e.left??e.x??0,t),c=Ls(e.right??e.x??0,t);return{top:a,right:c,bottom:s,left:o,x:o+c,y:a+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Bz(e,t,r,a,s,o){const{x:c,y:d}=Ws(e,[t,r,a]),{x:f,y:h}=Ws({x:e.x+e.width,y:e.y+e.height},[t,r,a]),m=s-f,p=o-h;return{left:Math.floor(c),top:Math.floor(d),right:Math.floor(m),bottom:Math.floor(p)}}const tg=(e,t,r,a,s,o)=>{const c=Iz(o,t,r),d=(t-c.x)/e.width,f=(r-c.y)/e.height,h=Math.min(d,f),m=Qs(h,a,s),p=e.x+e.width/2,y=e.y+e.height/2,x=t/2-p*m,_=r/2-y*m,N=Bz(e,x,_,m,t,r),S={left:Math.min(N.left-c.left,0),top:Math.min(N.top-c.top,0),right:Math.min(N.right-c.right,0),bottom:Math.min(N.bottom-c.bottom,0)};return{x:x-S.left+S.right,y:_-S.top+S.bottom,zoom:m}},So=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Xa(e){return e!=null&&e!=="parent"}function Qr(e){var t,r;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight??0}}function VE(e){var t,r;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight)!==void 0}function YE(e,t={width:0,height:0},r,a,s){const o={...e},c=a.get(r);if(c){const d=c.origin||s;o.x+=c.internals.positionAbsolute.x-(t.width??0)*d[0],o.y+=c.internals.positionAbsolute.y-(t.height??0)*d[1]}return o}function i1(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}function Uz(){let e,t;return{promise:new Promise((a,s)=>{e=a,t=s}),resolve:e,reject:t}}function Hz(e){return{...IE,...e||{}}}function fo(e,{snapGrid:t=[0,0],snapToGrid:r=!1,transform:a,containerBounds:s}){const{x:o,y:c}=Rr(e),d=Bo({x:o-((s==null?void 0:s.left)??0),y:c-((s==null?void 0:s.top)??0)},a),{x:f,y:h}=r?Io(d,t):d;return{xSnapped:f,ySnapped:h,...d}}const ng=e=>({width:e.offsetWidth,height:e.offsetHeight}),XE=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},$z=["INPUT","SELECT","TEXTAREA"];function KE(e){var a,s;const t=((s=(a=e.composedPath)==null?void 0:a.call(e))==null?void 0:s[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:$z.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const ZE=e=>"clientX"in e,Rr=(e,t)=>{var o,c;const r=ZE(e),a=r?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,s=r?e.clientY:(c=e.touches)==null?void 0:c[0].clientY;return{x:a-((t==null?void 0:t.left)??0),y:s-((t==null?void 0:t.top)??0)}},a1=(e,t,r,a,s)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(c=>{const d=c.getBoundingClientRect();return{id:c.getAttribute("data-handleid"),type:e,nodeId:s,position:c.getAttribute("data-handlepos"),x:(d.left-r.left)/a,y:(d.top-r.top)/a,...ng(c)}})};function QE({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:s,sourceControlY:o,targetControlX:c,targetControlY:d}){const f=e*.125+s*.375+c*.375+r*.125,h=t*.125+o*.375+d*.375+a*.125,m=Math.abs(f-e),p=Math.abs(h-t);return[f,h,m,p]}function ou(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function s1({pos:e,x1:t,y1:r,x2:a,y2:s,c:o}){switch(e){case ze.Left:return[t-ou(t-a,o),r];case ze.Right:return[t+ou(a-t,o),r];case ze.Top:return[t,r-ou(r-s,o)];case ze.Bottom:return[t,r+ou(s-r,o)]}}function WE({sourceX:e,sourceY:t,sourcePosition:r=ze.Bottom,targetX:a,targetY:s,targetPosition:o=ze.Top,curvature:c=.25}){const[d,f]=s1({pos:r,x1:e,y1:t,x2:a,y2:s,c}),[h,m]=s1({pos:o,x1:a,y1:s,x2:e,y2:t,c}),[p,y,x,_]=QE({sourceX:e,sourceY:t,targetX:a,targetY:s,sourceControlX:d,sourceControlY:f,targetControlX:h,targetControlY:m});return[`M${e},${t} C${d},${f} ${h},${m} ${a},${s}`,p,y,x,_]}function JE({sourceX:e,sourceY:t,targetX:r,targetY:a}){const s=Math.abs(r-e)/2,o=r0}const Fz=({source:e,sourceHandle:t,target:r,targetHandle:a})=>`xy-edge__${e}${t||""}-${r}${a||""}`,Gz=(e,t)=>t.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),Vz=(e,t,r={})=>{var o;if(!e.source||!e.target)return(o=r.onError)==null||o.call(r,"006",Lr.error006()),t;const a=r.getEdgeId||Fz;let s;return HE(e)?s={...e}:s={...e,id:a(e)},Gz(s,t)?t:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,t.concat(s))};function eN({sourceX:e,sourceY:t,targetX:r,targetY:a}){const[s,o,c,d]=JE({sourceX:e,sourceY:t,targetX:r,targetY:a});return[`M ${e},${t}L ${r},${a}`,s,o,c,d]}const l1={[ze.Left]:{x:-1,y:0},[ze.Right]:{x:1,y:0},[ze.Top]:{x:0,y:-1},[ze.Bottom]:{x:0,y:1}},Yz=({source:e,sourcePosition:t=ze.Bottom,target:r})=>t===ze.Left||t===ze.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Xz({source:e,sourcePosition:t=ze.Bottom,target:r,targetPosition:a=ze.Top,center:s,offset:o,stepPosition:c}){const d=l1[t],f=l1[a],h={x:e.x+d.x*o,y:e.y+d.y*o},m={x:r.x+f.x*o,y:r.y+f.y*o},p=Yz({source:h,sourcePosition:t,target:m}),y=p.x!==0?"x":"y",x=p[y];let _=[],N,S;const w={x:0,y:0},k={x:0,y:0},[,,E,M]=JE({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(d[y]*f[y]===-1){y==="x"?(N=s.x??h.x+(m.x-h.x)*c,S=s.y??(h.y+m.y)/2):(N=s.x??(h.x+m.x)/2,S=s.y??h.y+(m.y-h.y)*c);const B=[{x:N,y:h.y},{x:N,y:m.y}],Z=[{x:h.x,y:S},{x:m.x,y:S}];d[y]===x?_=y==="x"?B:Z:_=y==="x"?Z:B}else{const B=[{x:h.x,y:m.y}],Z=[{x:m.x,y:h.y}];if(y==="x"?_=d.x===x?Z:B:_=d.y===x?B:Z,t===a){const C=Math.abs(e[y]-r[y]);if(C<=o){const $=Math.min(o-1,o-C);d[y]===x?w[y]=(h[y]>e[y]?-1:1)*$:k[y]=(m[y]>r[y]?-1:1)*$}}if(t!==a){const C=y==="x"?"y":"x",$=d[y]===f[C],O=h[C]>m[C],H=h[C]=P?(N=(D.x+z.x)/2,S=_[0].y):(N=_[0].x,S=(D.y+z.y)/2)}const I={x:h.x+w.x,y:h.y+w.y},R={x:m.x+k.x,y:m.y+k.y};return[[e,...I.x!==_[0].x||I.y!==_[0].y?[I]:[],..._,...R.x!==_[_.length-1].x||R.y!==_[_.length-1].y?[R]:[],r],N,S,E,M]}function Kz(e,t,r,a){const s=Math.min(o1(e,t)/2,o1(t,r)/2,a),{x:o,y:c}=t;if(e.x===o&&o===r.x||e.y===c&&c===r.y)return`L${o} ${c}`;if(e.y===c){const h=e.xr.id===t):e[0])||null}function op(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(a=>`${a}=${e[a]}`).join("&")}`:""}function Qz(e,{id:t,defaultColor:r,defaultMarkerStart:a,defaultMarkerEnd:s}){const o=new Set;return e.reduce((c,d)=>([d.markerStart||a,d.markerEnd||s].forEach(f=>{if(f&&typeof f=="object"){const h=op(f,t);o.has(h)||(c.push({id:h,color:f.color||r,...f}),o.add(h))}}),c),[]).sort((c,d)=>c.id.localeCompare(d.id))}const tN=1e3,Wz=10,rg={nodeOrigin:[0,0],nodeExtent:wo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Jz={...rg,checkEquality:!0};function ig(e,t){const r={...e};for(const a in t)t[a]!==void 0&&(r[a]=t[a]);return r}function eI(e,t,r){const a=ig(rg,r);for(const s of e.values())if(s.parentId)sg(s,e,t,a);else{const o=Lo(s,a.nodeOrigin),c=Xa(s.extent)?s.extent:a.nodeExtent,d=Ya(o,c,Qr(s));s.internals.positionAbsolute=d}}function tI(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const r=[],a=[];for(const s of e.handles){const o={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"?r.push(o):s.type==="target"&&a.push(o)}return{source:r,target:a}}function ag(e){return e==="manual"}function cp(e,t,r,a={}){var m,p;const s=ig(Jz,a),o={i:0},c=new Map(t),d=s!=null&&s.elevateNodesOnSelect&&!ag(s.zIndexMode)?tN:0;let f=e.length>0,h=!1;t.clear(),r.clear();for(const y of e){let x=c.get(y.id);if(s.checkEquality&&y===(x==null?void 0:x.internals.userNode))t.set(y.id,x);else{const _=Lo(y,s.nodeOrigin),N=Xa(y.extent)?y.extent:s.nodeExtent,S=Ya(_,N,Qr(y));x={...s.defaults,...y,measured:{width:(m=y.measured)==null?void 0:m.width,height:(p=y.measured)==null?void 0:p.height},internals:{positionAbsolute:S,handleBounds:tI(y,x),z:nN(y,d,s.zIndexMode),userNode:y}},t.set(y.id,x)}(x.measured===void 0||x.measured.width===void 0||x.measured.height===void 0)&&!x.hidden&&(f=!1),y.parentId&&sg(x,t,r,a,o),h||(h=y.selected??!1)}return{nodesInitialized:f,hasSelectedNodes:h}}function nI(e,t){if(!e.parentId)return;const r=t.get(e.parentId);r?r.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function sg(e,t,r,a,s){const{elevateNodesOnSelect:o,nodeOrigin:c,nodeExtent:d,zIndexMode:f}=ig(rg,a),h=e.parentId,m=t.get(h);if(!m){console.warn(`Parent node ${h} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}nI(e,r),s&&!m.parentId&&m.internals.rootParentIndex===void 0&&f==="auto"&&(m.internals.rootParentIndex=++s.i,m.internals.z=m.internals.z+s.i*Wz),s&&m.internals.rootParentIndex!==void 0&&(s.i=m.internals.rootParentIndex);const p=o&&!ag(f)?tN:0,{x:y,y:x,z:_}=rI(e,m,c,d,p,f),{positionAbsolute:N}=e.internals,S=y!==N.x||x!==N.y;(S||_!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:y,y:x}:N,z:_}})}function nN(e,t,r){const a=Or(e.zIndex)?e.zIndex:0;return ag(r)?a:a+(e.selected?t:0)}function rI(e,t,r,a,s,o){const{x:c,y:d}=t.internals.positionAbsolute,f=Qr(e),h=Lo(e,r),m=Xa(e.extent)?Ya(h,e.extent,f):h;let p=Ya({x:c+m.x,y:d+m.y},a,f);e.extent==="parent"&&(p=qE(p,f,t));const y=nN(e,s,o),x=t.internals.z??0;return{x:p.x,y:p.y,z:x>=y?x+1:y}}function lg(e,t,r,a=[0,0]){var c;const s=[],o=new Map;for(const d of e){const f=t.get(d.parentId);if(!f)continue;const h=((c=o.get(d.parentId))==null?void 0:c.expandedRect)??No(f),m=PE(h,d.rect);o.set(d.parentId,{expandedRect:m,parent:f})}return o.size>0&&o.forEach(({expandedRect:d,parent:f},h)=>{var E;const m=f.internals.positionAbsolute,p=Qr(f),y=f.origin??a,x=d.x0||_>0||w||k)&&(s.push({id:h,type:"position",position:{x:f.position.x-x+w,y:f.position.y-_+k}}),(E=r.get(h))==null||E.forEach(M=>{e.some(I=>I.id===M.id)||s.push({id:M.id,type:"position",position:{x:M.position.x+x,y:M.position.y+_}})})),(p.width0){const x=lg(y,t,r,s);h.push(...x)}return{changes:h,updatedInternals:f}}async function aI({delta:e,panZoom:t,transform:r,translateExtent:a,width:s,height:o}){if(!t||!e.x&&!e.y)return!1;const c=await t.setViewportConstrained({x:r[0]+e.x,y:r[1]+e.y,zoom:r[2]},[[0,0],[s,o]],a);return!!c&&(c.x!==r[0]||c.y!==r[1]||c.k!==r[2])}function f1(e,t,r,a,s,o){let c=s;const d=a.get(c)||new Map;a.set(c,d.set(r,t)),c=`${s}-${e}`;const f=a.get(c)||new Map;if(a.set(c,f.set(r,t)),o){c=`${s}-${e}-${o}`;const h=a.get(c)||new Map;a.set(c,h.set(r,t))}}function rN(e,t,r){e.clear(),t.clear();for(const a of r){const{source:s,target:o,sourceHandle:c=null,targetHandle:d=null}=a,f={edgeId:a.id,source:s,target:o,sourceHandle:c,targetHandle:d},h=`${s}-${c}--${o}-${d}`,m=`${o}-${d}--${s}-${c}`;f1("source",f,m,e,s,c),f1("target",f,h,e,o,d),t.set(a.id,a)}}function iN(e,t){if(!e.parentId)return!1;const r=t.get(e.parentId);return r?r.selected?!0:iN(r,t):!1}function h1(e,t,r){var s;let a=e;do{if((s=a==null?void 0:a.matches)!=null&&s.call(a,t))return!0;if(a===r)return!1;a=a==null?void 0:a.parentElement}while(a);return!1}function sI(e,t,r,a){const s=new Map;for(const[o,c]of e)if((c.selected||c.id===a)&&(!c.parentId||!iN(c,e))&&(c.draggable||t&&typeof c.draggable>"u")){const d=e.get(o);d&&s.set(o,{id:o,position:d.position||{x:0,y:0},distance:{x:r.x-d.internals.positionAbsolute.x,y:r.y-d.internals.positionAbsolute.y},extent:d.extent,parentId:d.parentId,origin:d.origin,expandParent:d.expandParent,internals:{positionAbsolute:d.internals.positionAbsolute||{x:0,y:0}},measured:{width:d.measured.width??0,height:d.measured.height??0}})}return s}function vm({nodeId:e,dragItems:t,nodeLookup:r,dragging:a=!0}){var c,d,f;const s=[];for(const[h,m]of t){const p=(c=r.get(h))==null?void 0:c.internals.userNode;p&&s.push({...p,position:m.position,dragging:a})}if(!e)return[s[0],s];const o=(d=r.get(e))==null?void 0:d.internals.userNode;return[o?{...o,position:((f=t.get(e))==null?void 0:f.position)||o.position,dragging:a}:s[0],s]}function lI({dragItems:e,snapGrid:t,x:r,y:a}){const s=e.values().next().value;if(!s)return null;const o={x:r-s.distance.x,y:a-s.distance.y},c=Io(o,t);return{x:c.x-o.x,y:c.y-o.y}}function oI({onNodeMouseDown:e,getStoreItems:t,onDragStart:r,onDrag:a,onDragStop:s}){let o={x:null,y:null},c=0,d=new Map,f=!1,h={x:0,y:0},m=null,p=!1,y=null,x=!1,_=!1,N=null;function S({noDragClassName:k,handleSelector:E,domNode:M,isSelectable:I,nodeId:R,nodeClickDistance:U=0}){y=ir(M);function B({x:V,y:P}){const{nodeLookup:C,nodeExtent:$,snapGrid:O,snapToGrid:H,nodeOrigin:X,onNodeDrag:K,onSelectionDrag:T,onError:j,updateNodePositions:Y}=t();o={x:V,y:P};let L=!1;const G=d.size>1,q=G&&$?sp(zo(d)):null,Q=G&&H?lI({dragItems:d,snapGrid:O,x:V,y:P}):null;for(const[J,W]of d){if(!C.has(J))continue;let te={x:V-W.distance.x,y:P-W.distance.y};H&&(te=Q?{x:Math.round(te.x+Q.x),y:Math.round(te.y+Q.y)}:Io(te,O));let ce=null;if(G&&$&&!W.extent&&q){const{positionAbsolute:we}=W.internals,Ne=we.x-q.x+$[0][0],je=we.x+W.measured.width-q.x2+$[1][0],$e=we.y-q.y+$[0][1],st=we.y+W.measured.height-q.y2+$[1][1];ce=[[Ne,$e],[je,st]]}const{position:fe,positionAbsolute:be}=$E({nodeId:J,nextPosition:te,nodeLookup:C,nodeExtent:ce||$,nodeOrigin:X,onError:j});L=L||W.position.x!==fe.x||W.position.y!==fe.y,W.position=fe,W.internals.positionAbsolute=be}if(_=_||L,!!L&&(Y(d,!0),N&&(a||K||!R&&T))){const[J,W]=vm({nodeId:R,dragItems:d,nodeLookup:C});a==null||a(N,d,J,W),K==null||K(N,J,W),R||T==null||T(N,W)}}async function Z(){if(!m)return;const{transform:V,panBy:P,autoPanSpeed:C,autoPanOnNodeDrag:$}=t();if(!$){f=!1,cancelAnimationFrame(c);return}const[O,H]=eg(h,m,C);(O!==0||H!==0)&&(o.x=(o.x??0)-O/V[2],o.y=(o.y??0)-H/V[2],await P({x:O,y:H})&&B(o)),c=requestAnimationFrame(Z)}function D(V){var G;const{nodeLookup:P,multiSelectionActive:C,nodesDraggable:$,transform:O,snapGrid:H,snapToGrid:X,selectNodesOnDrag:K,onNodeDragStart:T,onSelectionDragStart:j,unselectNodesAndEdges:Y}=t();p=!0,(!K||!I)&&!C&&R&&((G=P.get(R))!=null&&G.selected||Y()),I&&K&&R&&(e==null||e(R));const L=fo(V.sourceEvent,{transform:O,snapGrid:H,snapToGrid:X,containerBounds:m});if(o=L,d=sI(P,$,L,R),d.size>0&&(r||T||!R&&j)){const[q,Q]=vm({nodeId:R,dragItems:d,nodeLookup:P});r==null||r(V.sourceEvent,d,q,Q),T==null||T(V.sourceEvent,q,Q),R||j==null||j(V.sourceEvent,Q)}}const z=vE().clickDistance(U).on("start",V=>{const{domNode:P,nodeDragThreshold:C,transform:$,snapGrid:O,snapToGrid:H}=t();m=(P==null?void 0:P.getBoundingClientRect())||null,x=!1,_=!1,N=V.sourceEvent,C===0&&D(V),o=fo(V.sourceEvent,{transform:$,snapGrid:O,snapToGrid:H,containerBounds:m}),h=Rr(V.sourceEvent,m)}).on("drag",V=>{const{autoPanOnNodeDrag:P,transform:C,snapGrid:$,snapToGrid:O,nodeDragThreshold:H,nodeLookup:X}=t(),K=fo(V.sourceEvent,{transform:C,snapGrid:$,snapToGrid:O,containerBounds:m});if(N=V.sourceEvent,(V.sourceEvent.type==="touchmove"&&V.sourceEvent.touches.length>1||R&&!X.has(R))&&(x=!0),!x){if(!f&&P&&p&&(f=!0,Z()),!p){const T=Rr(V.sourceEvent,m),j=T.x-h.x,Y=T.y-h.y;Math.sqrt(j*j+Y*Y)>H&&D(V)}(o.x!==K.xSnapped||o.y!==K.ySnapped)&&d&&p&&(h=Rr(V.sourceEvent,m),B(K))}}).on("end",V=>{if(!p||x){x&&d.size>0&&t().updateNodePositions(d,!1);return}if(f=!1,p=!1,cancelAnimationFrame(c),d.size>0){const{nodeLookup:P,updateNodePositions:C,onNodeDragStop:$,onSelectionDragStop:O}=t();if(_&&(C(d,!1),_=!1),s||$||!R&&O){const[H,X]=vm({nodeId:R,dragItems:d,nodeLookup:P,dragging:!1});s==null||s(V.sourceEvent,d,H,X),$==null||$(V.sourceEvent,H,X),R||O==null||O(V.sourceEvent,X)}}}).filter(V=>{const P=V.target;return!V.button&&(!k||!h1(P,`.${k}`,M))&&(!E||h1(P,E,M))});y.call(z)}function w(){y==null||y.on(".drag",null)}return{update:S,destroy:w}}function cI(e,t,r){const a=[],s={x:e.x-r,y:e.y-r,width:r*2,height:r*2};for(const o of t.values())ju(s,No(o))>0&&a.push(o);return a}const uI=250;function dI(e,t,r,a){var d,f;let s=[],o=1/0;const c=cI(e,r,t+uI);for(const h of c){const m=[...((d=h.internals.handleBounds)==null?void 0:d.source)??[],...((f=h.internals.handleBounds)==null?void 0:f.target)??[]];for(const p of m){if(a.nodeId===p.nodeId&&a.type===p.type&&a.id===p.id)continue;const{x:y,y:x}=Ka(h,p,p.position,!0),_=Math.sqrt(Math.pow(y-e.x,2)+Math.pow(x-e.y,2));_>t||(_1){const h=a.type==="source"?"target":"source";return s.find(m=>m.type===h)??s[0]}return s[0]}function aN(e,t,r,a,s,o=!1){var h,m,p;const c=a.get(e);if(!c)return null;const d=s==="strict"?(h=c.internals.handleBounds)==null?void 0:h[t]:[...((m=c.internals.handleBounds)==null?void 0:m.source)??[],...((p=c.internals.handleBounds)==null?void 0:p.target)??[]],f=(r?d==null?void 0:d.find(y=>y.id===r):d==null?void 0:d[0])??null;return f&&o?{...f,...Ka(c,f,f.position,!0)}:f}function sN(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function fI(e,t){let r=null;return t?r=!0:e&&!t&&(r=!1),r}const lN=()=>!0;function hI(e,{connectionMode:t,connectionRadius:r,handleId:a,nodeId:s,edgeUpdaterType:o,isTarget:c,domNode:d,nodeLookup:f,lib:h,autoPanOnConnect:m,flowId:p,panBy:y,cancelConnection:x,onConnectStart:_,onConnect:N,onConnectEnd:S,isValidConnection:w=lN,onReconnectEnd:k,updateConnection:E,getTransform:M,getFromHandle:I,autoPanSpeed:R,dragThreshold:U=1,handleDomNode:B}){const Z=XE(e.target);let D=0,z;const{x:V,y:P}=Rr(e),C=sN(o,B),$=d==null?void 0:d.getBoundingClientRect();let O=!1;if(!$||!C)return;const H=aN(s,C,a,f,t);if(!H)return;let X=Rr(e,$),K=!1,T=null,j=!1,Y=null;function L(){if(!m||!$)return;const[fe,be]=eg(X,$,R);y({x:fe,y:be}),D=requestAnimationFrame(L)}const G={...H,nodeId:s,type:C,position:H.position},q=f.get(s);let J={inProgress:!0,isValid:null,from:Ka(q,G,ze.Left,!0),fromHandle:G,fromPosition:G.position,fromNode:q,to:X,toHandle:null,toPosition:t1[G.position],toNode:null,pointer:X};function W(){O=!0,E(J),_==null||_(e,{nodeId:s,handleId:a,handleType:C})}U===0&&W();function te(fe){if(!O){const{x:st,y:Rt}=Rr(fe),Yt=st-V,Pt=Rt-P;if(!(Yt*Yt+Pt*Pt>U*U))return;W()}if(!I()||!G){ce(fe);return}const be=M();X=Rr(fe,$),z=dI(Bo(X,be,!1,[1,1]),r,f,G),K||(L(),K=!0);const we=oN(fe,{handle:z,connectionMode:t,fromNodeId:s,fromHandleId:a,fromType:c?"target":"source",isValidConnection:w,doc:Z,lib:h,flowId:p,nodeLookup:f});Y=we.handleDomNode,T=we.connection,j=fI(!!z,we.isValid);const Ne=f.get(s),je=Ne?Ka(Ne,G,ze.Left,!0):J.from,$e={...J,from:je,isValid:j,to:we.toHandle&&j?Ws({x:we.toHandle.x,y:we.toHandle.y},be):X,toHandle:we.toHandle,toPosition:j&&we.toHandle?we.toHandle.position:t1[G.position],toNode:we.toHandle?f.get(we.toHandle.nodeId):null,pointer:X};E($e),J=$e}function ce(fe){if(!("touches"in fe&&fe.touches.length>0)){if(O){(z||Y)&&T&&j&&(N==null||N(T));const{inProgress:be,...we}=J,Ne={...we,toPosition:J.toHandle?J.toPosition:null};S==null||S(fe,Ne),o&&(k==null||k(fe,Ne))}x(),cancelAnimationFrame(D),K=!1,j=!1,T=null,Y=null,Z.removeEventListener("mousemove",te),Z.removeEventListener("mouseup",ce),Z.removeEventListener("touchmove",te),Z.removeEventListener("touchend",ce)}}Z.addEventListener("mousemove",te),Z.addEventListener("mouseup",ce),Z.addEventListener("touchmove",te),Z.addEventListener("touchend",ce)}function oN(e,{handle:t,connectionMode:r,fromNodeId:a,fromHandleId:s,fromType:o,doc:c,lib:d,flowId:f,isValidConnection:h=lN,nodeLookup:m}){const p=o==="target",y=t?c.querySelector(`.${d}-flow__handle[data-id="${f}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x,y:_}=Rr(e),N=c.elementFromPoint(x,_),S=N!=null&&N.classList.contains(`${d}-flow__handle`)?N:y,w={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const k=sN(void 0,S),E=S.getAttribute("data-nodeid"),M=S.getAttribute("data-handleid"),I=S.classList.contains("connectable"),R=S.classList.contains("connectableend");if(!E||!k)return w;const U={source:p?E:a,sourceHandle:p?M:s,target:p?a:E,targetHandle:p?s:M};w.connection=U;const Z=I&&R&&(r===Zs.Strict?p&&k==="source"||!p&&k==="target":E!==a||M!==s);w.isValid=Z&&h(U),w.toHandle=aN(E,k,M,m,r,!0)}return w}const up={onPointerDown:hI,isValid:oN};function mI({domNode:e,panZoom:t,getTransform:r,getViewScale:a}){const s=ir(e);function o({translateExtent:d,width:f,height:h,zoomStep:m=1,pannable:p=!0,zoomable:y=!0,inversePan:x=!1}){const _=E=>{if(E.sourceEvent.type!=="wheel"||!t)return;const M=r(),I=E.sourceEvent.ctrlKey&&So()?10:1,R=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*m,U=M[2]*Math.pow(2,R*I);t.scaleTo(U)};let N=[0,0];const S=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(N=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},w=E=>{const M=r();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!t)return;const I=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],R=[I[0]-N[0],I[1]-N[1]];N=I;const U=a()*Math.max(M[2],Math.log(M[2]))*(x?-1:1),B={x:M[0]-R[0]*U,y:M[1]-R[1]*U},Z=[[0,0],[f,h]];t.setViewportConstrained({x:B.x,y:B.y,zoom:M[2]},Z,d)},k=LE().on("start",S).on("zoom",p?w:null).on("zoom.wheel",y?_:null);s.call(k,{})}function c(){s.on("zoom",null)}return{update:o,destroy:c,pointer:Tr}}const ed=e=>({x:e.x,y:e.y,zoom:e.k}),_m=({x:e,y:t,zoom:r})=>Qu.translate(e,t).scale(r),Us=(e,t)=>e.target.closest(`.${t}`),cN=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),pI=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,wm=(e,t=0,r=pI,a=()=>{})=>{const s=typeof t=="number"&&t>0;return s||a(),s?e.transition().duration(t).ease(r).on("end",a):e},uN=e=>{const t=e.ctrlKey&&So()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function gI({zoomPanValues:e,noWheelClassName:t,d3Selection:r,d3Zoom:a,panOnScrollMode:s,panOnScrollSpeed:o,zoomOnPinch:c,onPanZoomStart:d,onPanZoom:f,onPanZoomEnd:h}){return m=>{if(Us(m,t))return m.ctrlKey&&m.preventDefault(),!1;m.preventDefault(),m.stopImmediatePropagation();const p=r.property("__zoom").k||1;if(m.ctrlKey&&c){const S=Tr(m),w=uN(m),k=p*Math.pow(2,w);a.scaleTo(r,k,S,m);return}const y=m.deltaMode===1?20:1;let x=s===Pa.Vertical?0:m.deltaX*y,_=s===Pa.Horizontal?0:m.deltaY*y;!So()&&m.shiftKey&&s!==Pa.Vertical&&(x=m.deltaY*y,_=0),a.translateBy(r,-(x/p)*o,-(_/p)*o,{internal:!0});const N=ed(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?f==null||f(m,N):(e.isPanScrolling=!0,d==null||d(m,N)),e.panScrollTimeout=setTimeout(()=>{h==null||h(m,N),e.isPanScrolling=!1},150)}}function bI({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:r}){return function(a,s){const o=a.type==="wheel",c=!t&&o&&!a.ctrlKey,d=Us(a,e);if(a.ctrlKey&&o&&d&&a.preventDefault(),c||d)return null;a.preventDefault(),r.call(this,a,s)}}function xI({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:r}){return a=>{var o,c,d;if((o=a.sourceEvent)!=null&&o.internal)return;const s=ed(a.transform);e.mouseButton=((c=a.sourceEvent)==null?void 0:c.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((d=a.sourceEvent)==null?void 0:d.type)==="mousedown"&&t(!0),r&&(r==null||r(a.sourceEvent,s))}}function yI({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:r,onTransformChange:a,onPanZoom:s}){return o=>{var c,d;e.usedRightMouseButton=!!(r&&cN(t,e.mouseButton??0)),(c=o.sourceEvent)!=null&&c.sync||a([o.transform.x,o.transform.y,o.transform.k]),s&&!((d=o.sourceEvent)!=null&&d.internal)&&(s==null||s(o.sourceEvent,ed(o.transform)))}}function vI({zoomPanValues:e,panOnDrag:t,panOnScroll:r,onDraggingChange:a,onPanZoomEnd:s,onPaneContextMenu:o}){return c=>{var d;if(!((d=c.sourceEvent)!=null&&d.internal)&&(e.isZoomingOrPanning=!1,o&&cN(t,e.mouseButton??0)&&!e.usedRightMouseButton&&c.sourceEvent&&o(c.sourceEvent),e.usedRightMouseButton=!1,a(!1),s)){const f=ed(c.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(c.sourceEvent,f)},r?150:0)}}}function _I({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:r,panOnDrag:a,panOnScroll:s,zoomOnDoubleClick:o,userSelectionActive:c,noWheelClassName:d,noPanClassName:f,lib:h,connectionInProgress:m}){return p=>{var S;const y=e||t,x=r&&p.ctrlKey,_=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(Us(p,`${h}-flow__node`)||Us(p,`${h}-flow__edge`)))return!0;if(!a&&!y&&!s&&!o&&!r||c||m&&!_||Us(p,d)&&_||Us(p,f)&&(!_||s&&_&&!e)||!r&&p.ctrlKey&&_)return!1;if(!r&&p.type==="touchstart"&&((S=p.touches)==null?void 0:S.length)>1)return p.preventDefault(),!1;if(!y&&!s&&!x&&_||!a&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(a)&&!a.includes(p.button)&&p.type==="mousedown")return!1;const N=Array.isArray(a)&&a.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||_)&&N}}function wI({domNode:e,minZoom:t,maxZoom:r,translateExtent:a,viewport:s,onPanZoom:o,onPanZoomStart:c,onPanZoomEnd:d,onDraggingChange:f}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},m=e.getBoundingClientRect();let p=[[0,0],[m.width,m.height]];const y=typeof ResizeObserver<"u"?new ResizeObserver(P=>{const C=P[0];C&&(p=[[0,0],[C.contentRect.width,C.contentRect.height]])}):null;y==null||y.observe(e);const x=LE().extent(()=>p).scaleExtent([t,r]).translateExtent(a),_=ir(e).call(x);M({x:s.x,y:s.y,zoom:Qs(s.zoom,t,r)},[[0,0],[m.width,m.height]],a);const N=_.on("wheel.zoom"),S=_.on("dblclick.zoom");x.wheelDelta(uN);async function w(P,C){return _?new Promise($=>{x==null||x.interpolate((C==null?void 0:C.interpolate)==="linear"?uo:gu).transform(wm(_,C==null?void 0:C.duration,C==null?void 0:C.ease,()=>$(!0)),P)}):!1}function k({noWheelClassName:P,noPanClassName:C,onPaneContextMenu:$,userSelectionActive:O,panOnScroll:H,panOnDrag:X,panOnScrollMode:K,panOnScrollSpeed:T,preventScrolling:j,zoomOnPinch:Y,zoomOnScroll:L,zoomOnDoubleClick:G,zoomActivationKeyPressed:q,lib:Q,onTransformChange:J,connectionInProgress:W,paneClickDistance:te,selectionOnDrag:ce}){O&&!h.isZoomingOrPanning&&E();const fe=H&&!q&&!O;x.clickDistance(ce?1/0:!Or(te)||te<0?0:te);const be=fe?gI({zoomPanValues:h,noWheelClassName:P,d3Selection:_,d3Zoom:x,panOnScrollMode:K,panOnScrollSpeed:T,zoomOnPinch:Y,onPanZoomStart:c,onPanZoom:o,onPanZoomEnd:d}):bI({noWheelClassName:P,preventScrolling:j,d3ZoomHandler:N});_.on("wheel.zoom",be,{passive:!1});const we=xI({zoomPanValues:h,onDraggingChange:f,onPanZoomStart:c});x.on("start",we);const Ne=yI({zoomPanValues:h,panOnDrag:X,onPaneContextMenu:!!$,onPanZoom:o,onTransformChange:J});x.on("zoom",Ne);const je=vI({zoomPanValues:h,panOnDrag:X,panOnScroll:H,onPaneContextMenu:$,onPanZoomEnd:d,onDraggingChange:f});x.on("end",je);const $e=_I({zoomActivationKeyPressed:q,panOnDrag:X,zoomOnScroll:L,panOnScroll:H,zoomOnDoubleClick:G,zoomOnPinch:Y,userSelectionActive:O,noPanClassName:C,noWheelClassName:P,lib:Q,connectionInProgress:W});x.filter($e),G?_.on("dblclick.zoom",S):_.on("dblclick.zoom",null)}function E(){x.on("zoom",null)}async function M(P,C,$){const O=_m(P),H=x==null?void 0:x.constrain()(O,C,$);return H&&await w(H),H}async function I(P,C){const $=_m(P);return await w($,C),$}function R(P){if(_){const C=_m(P),$=_.property("__zoom");($.k!==P.zoom||$.x!==P.x||$.y!==P.y)&&(x==null||x.transform(_,C,null,{sync:!0}))}}function U(){const P=_?jE(_.node()):{x:0,y:0,k:1};return{x:P.x,y:P.y,zoom:P.k}}async function B(P,C){return _?new Promise($=>{x==null||x.interpolate((C==null?void 0:C.interpolate)==="linear"?uo:gu).scaleTo(wm(_,C==null?void 0:C.duration,C==null?void 0:C.ease,()=>$(!0)),P)}):!1}async function Z(P,C){return _?new Promise($=>{x==null||x.interpolate((C==null?void 0:C.interpolate)==="linear"?uo:gu).scaleBy(wm(_,C==null?void 0:C.duration,C==null?void 0:C.ease,()=>$(!0)),P)}):!1}function D(P){x==null||x.scaleExtent(P)}function z(P){x==null||x.translateExtent(P)}function V(P){const C=!Or(P)||P<0?0:P;x==null||x.clickDistance(C)}return{update:k,destroy:E,setViewport:I,setViewportConstrained:M,getViewport:U,scaleTo:B,scaleBy:Z,setScaleExtent:D,setTranslateExtent:z,syncViewport:R,setClickDistance:V}}var Js;(function(e){e.Line="line",e.Handle="handle"})(Js||(Js={}));function EI({width:e,prevWidth:t,height:r,prevHeight:a,affectsX:s,affectsY:o}){const c=e-t,d=r-a,f=[c>0?1:c<0?-1:0,d>0?1:d<0?-1:0];return c&&s&&(f[0]=f[0]*-1),d&&o&&(f[1]=f[1]*-1),f}function m1(e){const t=e.includes("right")||e.includes("left"),r=e.includes("bottom")||e.includes("top"),a=e.includes("left"),s=e.includes("top");return{isHorizontal:t,isVertical:r,affectsX:a,affectsY:s}}function aa(e,t){return Math.max(0,t-e)}function sa(e,t){return Math.max(0,e-t)}function cu(e,t,r){return Math.max(0,t-e,e-r)}function p1(e,t){return e?!t:t}function NI(e,t,r,a,s,o,c,d){let{affectsX:f,affectsY:h}=t;const{isHorizontal:m,isVertical:p}=t,y=m&&p,{xSnapped:x,ySnapped:_}=r,{minWidth:N,maxWidth:S,minHeight:w,maxHeight:k}=a,{x:E,y:M,width:I,height:R,aspectRatio:U}=e;let B=Math.floor(m?x-e.pointerX:0),Z=Math.floor(p?_-e.pointerY:0);const D=I+(f?-B:B),z=R+(h?-Z:Z),V=-o[0]*I,P=-o[1]*R;let C=cu(D,N,S),$=cu(z,w,k);if(c){let X=0,K=0;f&&B<0?X=aa(E+B+V,c[0][0]):!f&&B>0&&(X=sa(E+D+V,c[1][0])),h&&Z<0?K=aa(M+Z+P,c[0][1]):!h&&Z>0&&(K=sa(M+z+P,c[1][1])),C=Math.max(C,X),$=Math.max($,K)}if(d){let X=0,K=0;f&&B>0?X=sa(E+B,d[0][0]):!f&&B<0&&(X=aa(E+D,d[1][0])),h&&Z>0?K=sa(M+Z,d[0][1]):!h&&Z<0&&(K=aa(M+z,d[1][1])),C=Math.max(C,X),$=Math.max($,K)}if(s){if(m){const X=cu(D/U,w,k)*U;if(C=Math.max(C,X),c){let K=0;!f&&!h||f&&!h&&y?K=sa(M+P+D/U,c[1][1])*U:K=aa(M+P+(f?B:-B)/U,c[0][1])*U,C=Math.max(C,K)}if(d){let K=0;!f&&!h||f&&!h&&y?K=aa(M+D/U,d[1][1])*U:K=sa(M+(f?B:-B)/U,d[0][1])*U,C=Math.max(C,K)}}if(p){const X=cu(z*U,N,S)/U;if($=Math.max($,X),c){let K=0;!f&&!h||h&&!f&&y?K=sa(E+z*U+V,c[1][0])/U:K=aa(E+(h?Z:-Z)*U+V,c[0][0])/U,$=Math.max($,K)}if(d){let K=0;!f&&!h||h&&!f&&y?K=aa(E+z*U,d[1][0])/U:K=sa(E+(h?Z:-Z)*U,d[0][0])/U,$=Math.max($,K)}}}Z=Z+(Z<0?$:-$),B=B+(B<0?C:-C),s&&(y?D>z*U?Z=(p1(f,h)?-B:B)/U:B=(p1(f,h)?-Z:Z)*U:m?(Z=B/U,h=f):(B=Z*U,f=h));const O=f?E+B:E,H=h?M+Z:M;return{width:I+(f?-B:B),height:R+(h?-Z:Z),x:o[0]*B*(f?-1:1)+O,y:o[1]*Z*(h?-1:1)+H}}const dN={width:0,height:0,x:0,y:0},SI={...dN,pointerX:0,pointerY:0,aspectRatio:1};function kI(e,t,r){const a=t.position.x+e.position.x,s=t.position.y+e.position.y,o=e.measured.width??0,c=e.measured.height??0,d=r[0]*o,f=r[1]*c;return[[a-d,s-f],[a+o-d,s+c-f]]}function TI({domNode:e,nodeId:t,getStoreItems:r,onChange:a,onEnd:s}){const o=ir(e);let c={controlDirection:m1("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function d({controlPosition:h,boundaries:m,keepAspectRatio:p,resizeDirection:y,onResizeStart:x,onResize:_,onResizeEnd:N,shouldResize:S}){let w={...dN},k={...SI};c={boundaries:m,resizeDirection:y,keepAspectRatio:p,controlDirection:m1(h)};let E,M=null,I=[],R,U,B,Z=!1;const D=vE().on("start",z=>{const{nodeLookup:V,transform:P,snapGrid:C,snapToGrid:$,nodeOrigin:O,paneDomNode:H}=r();if(E=V.get(t),!E)return;M=(H==null?void 0:H.getBoundingClientRect())??null;const{xSnapped:X,ySnapped:K}=fo(z.sourceEvent,{transform:P,snapGrid:C,snapToGrid:$,containerBounds:M});w={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},k={...w,pointerX:X,pointerY:K,aspectRatio:w.width/w.height},R=void 0,U=Xa(E.extent)?E.extent:void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(R=V.get(E.parentId)),R&&E.extent==="parent"&&(U=[[0,0],[R.measured.width,R.measured.height]]),I=[],B=void 0;for(const[T,j]of V)if(j.parentId===t&&(I.push({id:T,position:{...j.position},extent:j.extent}),j.extent==="parent"||j.expandParent)){const Y=kI(j,E,j.origin??O);B?B=[[Math.min(Y[0][0],B[0][0]),Math.min(Y[0][1],B[0][1])],[Math.max(Y[1][0],B[1][0]),Math.max(Y[1][1],B[1][1])]]:B=Y}x==null||x(z,{...w})}).on("drag",z=>{const{transform:V,snapGrid:P,snapToGrid:C,nodeOrigin:$}=r(),O=fo(z.sourceEvent,{transform:V,snapGrid:P,snapToGrid:C,containerBounds:M}),H=[];if(!E)return;const{x:X,y:K,width:T,height:j}=w,Y={},L=E.origin??$,{width:G,height:q,x:Q,y:J}=NI(k,c.controlDirection,O,c.boundaries,c.keepAspectRatio,L,U,B),W=G!==T,te=q!==j,ce=Q!==X&&W,fe=J!==K&&te;if(!ce&&!fe&&!W&&!te)return;if((ce||fe||L[0]===1||L[1]===1)&&(Y.x=ce?Q:w.x,Y.y=fe?J:w.y,w.x=Y.x,w.y=Y.y,I.length>0)){const je=Q-X,$e=J-K;for(const st of I)st.position={x:st.position.x-je+L[0]*(G-T),y:st.position.y-$e+L[1]*(q-j)},H.push(st)}if((W||te)&&(Y.width=W&&(!c.resizeDirection||c.resizeDirection==="horizontal")?G:w.width,Y.height=te&&(!c.resizeDirection||c.resizeDirection==="vertical")?q:w.height,w.width=Y.width,w.height=Y.height),R&&E.expandParent){const je=L[0]*(Y.width??0);Y.x&&Y.x{Z&&(N==null||N(z,{...w}),s==null||s({...w}),Z=!1)});o.call(D)}function f(){o.on(".drag",null)}return{update:d,destroy:f}}var Em={exports:{}},Nm={},Sm={exports:{}},km={};/** +`:h!=="text"?BD(S,h):S.replace(/&/g,"&").replace(//g,">");let k="",E="";return N.removed?k=String(p++):(N.added||(k=String(p++)),E=String(y++)),{highlighted:w,added:!!N.added,removed:!!N.removed,leftNo:k,rightNo:E}})),_=()=>{vp(s),d(!0),setTimeout(()=>d(!1),2e3),o==null||o()};return g.jsxs("div",{className:"rounded-md border border-[#2a2a2a] overflow-hidden",children:[g.jsxs("div",{className:"flex items-stretch",children:[g.jsxs("span",{className:"relative flex items-center text-[13px] text-[#999] font-mono px-4 py-2 border-r border-[#2a2a2a] break-all",children:[e,":",f,g.jsx("span",{className:"absolute top-0 inset-x-0 h-0.5 bg-white/60 rounded-full"})]}),g.jsx("div",{className:"flex-1 border-b border-[#2a2a2a]"}),g.jsx("button",{onClick:_,className:"px-3 py-2 text-[#555] hover:text-white transition-colors flex-shrink-0 border-b border-[#2a2a2a]","aria-label":"Copy fixed code",children:c?g.jsx(Gs,{className:"w-3.5 h-3.5 text-emerald-400"}):g.jsx(mo,{className:"w-3.5 h-3.5"})})]}),g.jsx("div",{className:"overflow-auto max-h-[400px]",children:g.jsx("table",{className:"w-full border-collapse font-mono text-[12px] leading-[22px] [font-variant-ligatures:none]",children:g.jsx("tbody",{children:x.map((N,S)=>g.jsxs("tr",{className:N.added?"bg-blue-500/[0.12]":N.removed?"bg-red-500/[0.12]":"",children:[g.jsx("td",{className:"select-none w-[1px] whitespace-nowrap pl-4 pr-1.5 text-right text-[#555] align-top text-[12px] leading-[22px]",children:N.leftNo}),g.jsx("td",{className:"select-none w-[1px] whitespace-nowrap pl-1.5 pr-4 text-right text-[#555] align-top text-[12px] leading-[22px] border-r border-[#2a2a2a]",children:N.rightNo}),g.jsx("td",{className:"pl-4 pr-4 whitespace-pre",dangerouslySetInnerHTML:{__html:N.highlighted}})]},S))})})})]})}const HD=/^```([^\n`]*)\n([\s\S]*?)\n?```$/;function aE(e){if(!e)return{code:""};const t=HD.exec(e.trim());if(!t)return{code:e};const r=t[1].trim();return{language:(r?r.split(/\s+/)[0]:void 0)||void 0,code:t[2]}}function $D({description:e,scriptCode:t,onCopy:r}){const[a,s]=ee.useState(!1);if(!e&&!t)return null;const{language:o,code:c}=aE(t),d=(()=>{try{return o&&En.getLanguage(o)?En.highlight(c,{language:o}).value:En.highlightAuto(c).value}catch{return En.highlightAuto(c).value}})(),f=()=>{c&&(vp(c),s(!0),setTimeout(()=>s(!1),2e3),r==null||r())};return g.jsxs("section",{children:[g.jsx("h2",{className:"text-xl font-semibold text-white mb-3",children:"Proof of Concept"}),g.jsxs("div",{className:"space-y-4",children:[e&&g.jsx("div",{className:"prose-markdown",children:g.jsx(Bp,{remarkPlugins:[qp],rehypePlugins:[Pp],components:Fp,children:e})}),c&&g.jsxs("div",{className:"group/poc relative rounded-md border border-[#2a2a2a] overflow-hidden",children:[g.jsxs("div",{className:"flex items-stretch",children:[g.jsxs("span",{className:"relative flex items-center text-[13px] text-[#999] font-mono px-4 py-2 border-r border-[#2a2a2a]",children:["PoC Script",g.jsx("span",{className:"absolute top-0 inset-x-0 h-0.5 bg-white/60 rounded-full"})]}),g.jsx("div",{className:"flex-1 border-b border-[#2a2a2a]"}),g.jsx("button",{onClick:f,className:"px-3 py-2 text-[#555] hover:text-white transition-colors flex-shrink-0 border-b border-[#2a2a2a]","aria-label":"Copy PoC code",children:a?g.jsx(Gs,{className:"w-3.5 h-3.5 text-emerald-400"}):g.jsx(mo,{className:"w-3.5 h-3.5"})})]}),g.jsx("div",{className:"overflow-auto max-h-[400px] px-4 py-3",children:g.jsx("pre",{className:"font-mono text-[12px] leading-[22px] whitespace-pre [font-variant-ligatures:none]",children:g.jsx("code",{dangerouslySetInnerHTML:{__html:d}})})})]})]})]})}function sE(e){const t=e.match(/(?:https?:\/\/)?(?:www\.)?github\.com\/([^\s/]+\/[^\s/]+)/);if(t){const s=t[1].replace(/\.git$/,"");return{display:s,href:`https://github.com/${s}`,provider:"github"}}const r=e.match(/(?:https?:\/\/)?(?:www\.)?gitlab\.com\/([^\s/]+\/[^\s/]+)/);if(r){const s=r[1].replace(/\.git$/,"");return{display:s,href:`https://gitlab.com/${s}`,provider:"gitlab"}}const a=e.match(/(?:https?:\/\/)?(?:www\.)?bitbucket\.org\/([^\s/]+\/[^\s/]+)/);if(a){const s=a[1].replace(/\.git$/,"");return{display:s,href:`https://bitbucket.org/${s}`,provider:"bitbucket"}}return/^https?:\/\//i.test(e)?{display:e.replace(/^https?:\/\/(www\.)?/,""),href:e,provider:null}:/^[a-zA-Z0-9][\w.-]*\.[a-zA-Z]{2,}/.test(e)?{display:e,href:`https://${e}`,provider:null}:{display:e,href:null,provider:null}}function bo(e,t){return e?sE(e).display.replace(/\/$/,""):t||"Untitled pentest"}function qD({className:e}){return g.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:e,"aria-hidden":"true",children:g.jsx("path",{d:"M2.65 3a.72.72 0 0 0-.72.83l2.86 17.39a.98.98 0 0 0 .96.82h13.72a.72.72 0 0 0 .72-.6l2.86-17.4A.72.72 0 0 0 22.3 3H2.65Zm12.1 12.53H9.3L8.06 8.9h7.8l-1.11 6.63Z"})})}function PD({provider:e,className:t}){const r=t??"w-4 h-4";return e==="gitlab"?g.jsx(wC,{className:`${r} text-orange-400`}):e==="bitbucket"?g.jsx(qD,{className:`${r} text-blue-400`}):g.jsx(vC,{className:`${r} text-white`})}const FD={attack_vector:{N:"Remotely exploitable",A:"Adjacent network",L:"Local access required",P:"Physical access required"},attack_complexity:{L:"Easy to exploit",H:"Requires specific conditions"},privileges_required:{N:"No authentication needed",L:"Low privileges needed",H:"High privileges needed"},user_interaction:{N:"No user action required",R:"Requires user action",P:"Passive user role",A:"Active user role"},scope:{U:"Impact stays contained",C:"Can spread to other systems"},confidentiality:{N:"No data exposure",L:"Partial data exposure",H:"Full data exposure"},integrity:{N:"No data modification",L:"Limited modification",H:"Full data modification"},availability:{N:"No service disruption",L:"Limited disruption",H:"Full service disruption"}},GD={attack_vector:{N:"high",A:"medium",L:"low",P:"low"},attack_complexity:{L:"high",H:"low"},privileges_required:{N:"high",L:"medium",H:"low"},user_interaction:{N:"high",R:"low",P:"medium",A:"low"},scope:{C:"high",U:"low"},confidentiality:{H:"high",L:"medium",N:"low"},integrity:{H:"high",L:"medium",N:"low"},availability:{H:"high",L:"medium",N:"low"}},VD={high:"bg-red-500/15 text-red-400 border-red-500/25",medium:"bg-yellow-500/15 text-yellow-400 border-yellow-500/25",low:"bg-[#222] text-[#666] border-[#333]"},YD=[{label:"Exploitability",keys:["attack_vector","attack_complexity","privileges_required","user_interaction"]},{label:"Impact",keys:["scope","confidentiality","integrity","availability"]}];function XD(e,t,r,a,s){const o=e.replace(/\.git$/,"").replace(/\/+$/,""),c=a.split("/").map(encodeURIComponent).join("/"),d=r.split("/").map(encodeURIComponent).join("/");return t==="github"?`${o}/blob/${d}/${c}#L${s}`:t==="gitlab"?`${o}/-/blob/${d}/${c}#L${s}`:null}function KD({vulnerability:e,statusSlot:t,slackThreadUrl:r}){var R;const{severity:a,cvss:s,cve:o,cwe:c,fix_effort:d,created_at:f,target:h,endpoint:m,method:p,code_locations:y,cvss_breakdown:x,location_meta:_}=e,[N,S]=ee.useState(!0),w=y==null?void 0:y.filter(U=>U.fix_before&&U.fix_after),k=w&&w.length>0,E=h?sE(h):null,M=!!(h||m||p||k),I=x&&Object.values(x).some(U=>U!=null);return g.jsxs("aside",{className:"lg:sticky lg:top-6 lg:max-h-[calc(100vh-3rem)] lg:overflow-y-auto",children:[g.jsx("div",{className:"pb-4",children:g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Severity"}),g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("div",{className:`w-2 h-2 rounded-full ${yp(a)}`,"aria-hidden":"true"}),g.jsx("span",{className:"text-sm font-medium capitalize text-white",children:a})]})]}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"CVSS Score"}),g.jsx("span",{className:"text-sm font-semibold tabular-nums text-white",children:s!==null?s:"N/A"})]}),o&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"CVE"}),g.jsx("span",{className:"text-sm text-white font-mono",children:o})]}),c&&c.length>0&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"CWE"}),g.jsx("span",{className:"text-xs text-white font-mono truncate max-w-[80%] text-right",title:c.join(" · "),children:c.join(" · ")})]}),d&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Fix Effort"}),g.jsx("span",{className:`inline-flex items-center px-2 py-0.5 text-[11px] font-medium rounded-full border ${((R=wT[d])==null?void 0:R.color)??"text-[#666]"}`,children:d.charAt(0).toUpperCase()+d.slice(1)})]}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Discovered"}),g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(R_,{className:"w-3 h-3 text-[#444]","aria-hidden":"true"}),g.jsx("span",{className:"text-sm text-white",children:Hm(f)})]})]}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Status"}),t]})]})}),M&&g.jsxs("div",{className:"border-t border-[#191919] pt-4 pb-4",children:[g.jsx("p",{className:"text-xs font-medium text-[#aaa] mb-2.5",children:"Asset"}),g.jsxs("div",{className:"space-y-2.5",children:[h&&E&&g.jsxs("div",{className:"flex items-center gap-1.5",children:[E.provider?g.jsx("span",{className:"flex-shrink-0 [&_svg]:w-3.5 [&_svg]:h-3.5","aria-hidden":"true",children:g.jsx(PD,{provider:E.provider})}):g.jsx(j_,{className:"w-3.5 h-3.5 text-[#555] flex-shrink-0","aria-hidden":"true"}),E.href?g.jsx("a",{href:E.href,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-white hover:text-[#ccc] break-words min-w-0 transition-colors",children:E.display}):g.jsx("span",{className:"text-sm text-white break-words min-w-0",children:E.display})]}),m&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Endpoint"}),g.jsx("span",{className:"text-xs text-white font-mono truncate max-w-[75%] text-right",children:m})]}),p&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Method"}),g.jsx("span",{className:"text-xs text-white font-mono",children:p})]}),k&&g.jsxs("div",{children:[g.jsx("span",{className:"text-xs text-[#aaa] mb-1.5 block",children:"Locations"}),g.jsx("div",{className:"space-y-0.5",children:w.map((U,B)=>{const Z=`${U.file}:${U.start_line}`,D=_?XD(_.repo_url,_.provider,_.branch,U.file,U.start_line):null;return D?g.jsx("a",{href:D,target:"_blank",rel:"noopener noreferrer",className:"text-[13px] text-[#888] hover:text-white font-mono break-all transition-colors block",children:Z},`loc-${B}`):g.jsx("span",{className:"text-[13px] text-[#888] font-mono break-all block",children:Z},`loc-${B}`)})})]})]})]}),I&&g.jsxs("div",{className:"border-t border-[#191919] pt-4",children:[g.jsxs("button",{onClick:()=>S(!N),className:"flex items-center justify-between w-full mb-2.5 group","aria-expanded":N,children:[g.jsx("span",{className:"text-xs font-medium text-[#aaa]",children:"Risk Assessment"}),g.jsx(ho,{className:`w-3.5 h-3.5 text-[#555] group-hover:text-white transition-transform ${N?"":"-rotate-90"}`,"aria-hidden":"true"})]}),g.jsx("div",{className:`space-y-3 ${N?"":"hidden"}`,children:YD.map(U=>{const B=U.keys.filter(Z=>x[Z]!=null);return B.length===0?null:g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[g.jsx("p",{className:"text-[10px] uppercase tracking-wider text-[#444] font-medium",children:U.label}),g.jsx("p",{className:"text-[10px] uppercase tracking-wider text-[#444] font-medium mr-2",children:"Risk"})]}),g.jsx("div",{className:"space-y-1",children:B.map(Z=>{var P,T;const D=x[Z],z=D?((P=GD[Z])==null?void 0:P[D])??"low":"low",V=D?((T=FD[Z])==null?void 0:T[D])??D:"N/A";return g.jsxs("div",{className:"flex items-center justify-between py-0.5",children:[g.jsx("span",{className:"text-[12px] text-[#aaa]",children:V}),g.jsx("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded border ${VD[z]}`,children:z})]},Z)})})]},U.label)})})]})]})}function zv(e){return e?Math.floor((Date.now()-new Date(e).getTime())/1e3)<604800?` ${Hm(e)}`:` on ${Hm(e)}`:""}const ZD={open:null,in_progress:{icon:R_,label:"Marked as In Progress",iconColor:"text-blue-400"},snoozed:{icon:zk,label:"Snoozed",iconColor:"text-purple-400"},fixed:{icon:O_,label:"Marked as Fixed",iconColor:"text-emerald-400"},ignored:{icon:C_,label:"Marked as Ignored",iconColor:"text-[#888]"}},QD=[{label:"Auto-fix & open a PR",slug:"autofix",icon:Bm,requiresCode:!0},{label:"Sync to Jira / Linear",slug:"integrations",icon:gC}];function WD({vulnerability:e}){const t=_T[e.status],r=e.code_locations&&e.code_locations.length>0,a=r||e.remediation_steps,s=!!(e.evidence||e.assumptions||e.poc_description||e.poc_script_code),[o,c]=ee.useState("fix"),f=[{id:"fix",label:"Fix",show:!!a},{id:"reproduction",label:"Reproduction",show:s}].filter(h=>h.show);return g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"mb-2",children:[e.display_number&&g.jsx("span",{className:"text-xs font-mono text-[#555] block mb-1",children:vA(e.display_number)}),g.jsx("h1",{className:"text-2xl font-semibold text-white",children:e.title})]}),g.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[g.jsx("span",{className:`inline-flex items-center gap-1.5 px-3 py-1 text-sm font-medium rounded-full border ${t.color}`,children:t.label}),g.jsxs("div",{className:`inline-flex items-center gap-1.5 px-3 py-1 text-sm font-semibold rounded-full border ${I_[e.severity]}`,title:Zc(e)?`Adjusted from ${e.original_severity}`:void 0,children:[g.jsx("div",{className:`w-2 h-2 rounded-full ${yp(e.severity)}`}),g.jsxs("span",{className:"capitalize",children:[e.severity,!Zc(e)&&e.cvss?` ${e.cvss}`:""]}),Zc(e)&&g.jsx(Vs,{className:"w-3 h-3 opacity-70","aria-hidden":"true"})]}),e.cve&&g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-[#333]",children:"·"}),g.jsx("span",{className:"text-sm text-[#666] font-mono",children:e.cve})]})]})]}),g.jsx("div",{className:"flex flex-shrink-0 flex-wrap items-center gap-2",children:QD.filter(h=>!h.requiresCode||r).map(h=>{const m=h.icon;return g.jsxs("a",{href:fa($u,h.slug),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr(h.slug,"finding_detail"),className:"inline-flex items-center gap-1.5 rounded-lg bg-white px-3 py-1.5 text-xs font-semibold text-black transition-opacity hover:opacity-90",children:[g.jsx(m,{className:"h-3.5 w-3.5","aria-hidden":"true"}),h.label]},h.slug)})})]}),e.status!=="open"&&(()=>{const h=ZD[e.status];if(!h)return null;const m=h.icon;return g.jsxs("div",{className:"rounded-lg px-4 py-3.5 flex gap-3",style:{border:"1px solid rgba(255,255,255,0.08)"},children:[g.jsx(m,{className:`w-5 h-5 flex-shrink-0 mt-0.5 ${h.iconColor}`,"aria-hidden":"true"}),g.jsxs("div",{className:"min-w-0",children:[g.jsxs("p",{className:"text-sm font-semibold text-white",children:[h.label,zv(e.status_changed_at)]}),e.status_note&&g.jsxs("p",{className:"text-sm text-[#666] italic mt-1",children:["“",e.status_note,"”"]})]})]})})(),Zc(e)&&g.jsxs("div",{className:"rounded-lg px-4 py-3.5 flex gap-3",style:{border:"1px solid rgba(255,255,255,0.08)"},children:[g.jsx(Vs,{className:"w-5 h-5 flex-shrink-0 mt-0.5 text-orange-400","aria-hidden":"true"}),g.jsxs("div",{className:"min-w-0",children:[g.jsxs("p",{className:"text-sm font-semibold text-white",children:["Severity changed manually from"," ",g.jsx("span",{className:"capitalize",children:e.original_severity}),e.cvss!=null?` (${e.cvss})`:""," to"," ",g.jsx("span",{className:"capitalize",children:e.severity}),zv(e.severity_changed_at)]}),e.severity_override_reason&&g.jsxs("p",{className:"text-sm text-[#666] italic mt-1",children:["“",e.severity_override_reason,"”"]})]})]}),g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_340px] gap-8",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsxs("div",{className:"space-y-8",children:[g.jsx(oa,{title:"TL;DR",content:e.description}),e.impact&&g.jsx(oa,{title:"Impact",content:e.impact}),e.technical_analysis&&g.jsx(oa,{title:"Technical Details",content:e.technical_analysis})]}),f.length>0&&g.jsxs("div",{className:"mt-10",children:[g.jsx("div",{className:"border-b border-[#2a2a2a]",children:g.jsx("nav",{className:"flex gap-6","aria-label":"Tabs",children:f.map(h=>g.jsxs("button",{onClick:()=>c(h.id),className:`relative min-w-[80px] text-center pb-3 text-[16px] font-semibold transition-colors ${o===h.id?"text-white":"text-[#666] hover:text-white"}`,"aria-current":o===h.id?"page":void 0,children:[h.label,o===h.id&&g.jsx("span",{className:"absolute bottom-0 inset-x-0 h-0.5 bg-white rounded-full"})]},h.id))})}),a&&g.jsxs("div",{className:`pt-6 space-y-6 ${o==="fix"?"animate-tab-in":"hidden"}`,children:[e.remediation_steps&&g.jsx(oa,{title:"How do I fix it?",content:e.remediation_steps}),r&&e.code_locations.filter(h=>h.fix_before&&h.fix_after).map((h,m)=>g.jsx(UD,{file:h.file,startLine:h.start_line,endLine:h.end_line,before:h.fix_before,after:h.fix_after},`fix-${m}`))]}),s&&g.jsxs("div",{className:`pt-6 space-y-8 ${o==="reproduction"?"animate-tab-in":"hidden"}`,children:[e.assumptions&&g.jsx(oa,{title:"Assumptions",content:e.assumptions}),e.evidence&&g.jsx(oa,{title:"Evidence",content:e.evidence}),g.jsx($D,{description:e.poc_description,scriptCode:e.poc_script_code})]})]})]}),g.jsx("div",{className:"lg:border-l lg:border-[#2a2a2a] lg:pl-6",children:g.jsx(KD,{vulnerability:e,statusSlot:g.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded-full border ${t.color}`,children:[g.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${t.dotColor}`}),t.label]})})})]})]})}const Iv=[{key:"critical",label:"critical",dotClass:"bg-red-500",textClass:"text-red-500"},{key:"high",label:"high",dotClass:"bg-orange-500",textClass:"text-orange-500"},{key:"medium",label:"medium",dotClass:"bg-yellow-500",textClass:"text-yellow-500"},{key:"low",label:"low",dotClass:"bg-blue-500",textClass:"text-blue-500"}];function JD({findings:e,className:t,unit:r="issues",trailing:a}){return e.total<=0?null:g.jsxs("div",{className:Mr("space-y-3",t),children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-x-8 gap-y-3",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-2xl font-semibold text-white tabular-nums",children:e.total}),g.jsx("span",{className:"text-sm text-[#666]",children:r})]}),g.jsx("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2",children:Iv.map(({key:s,label:o,dotClass:c,textClass:d})=>{const f=e[s];return f<=0?null:g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("div",{className:Mr("w-2 h-2 rounded-full",c),"aria-hidden":"true"}),g.jsx("span",{className:Mr("text-sm tabular-nums",d),children:f}),g.jsx("span",{className:"text-xs text-[#555]",children:o})]},s)})}),a?g.jsx("div",{className:"flex items-center gap-2",children:a}):null]}),g.jsx("div",{className:"h-1.5 rounded-full bg-[#222] overflow-hidden flex",children:Iv.map(({key:s,dotClass:o})=>{const c=e[s];return c<=0?null:g.jsx("div",{className:Mr("h-full",o),style:{width:`${c/e.total*100}%`}},s)})})]})}function ln(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,a;r{}};function Yu(){for(var e=0,t=arguments.length,r={},a;e=0&&(a=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:a}})}pu.prototype=Yu.prototype={constructor:pu,on:function(e,t){var r=this._,a=tj(e+"",r),s,o=-1,c=a.length;if(arguments.length<2){for(;++o0)for(var r=new Array(s),a=0,s,o;a=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Uv.hasOwnProperty(t)?{space:Uv[t],local:e}:e}function rj(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Wm&&t.documentElement.namespaceURI===Wm?t.createElement(e):t.createElementNS(r,e)}}function ij(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function lE(e){var t=Xu(e);return(t.local?ij:rj)(t)}function aj(){}function Gp(e){return e==null?aj:function(){return this.querySelector(e)}}function sj(e){typeof e!="function"&&(e=Gp(e));for(var t=this._groups,r=t.length,a=new Array(r),s=0;s=E&&(E=k+1);!(I=S[E])&&++E<_;);M._next=I||null}}return c=new sr(c,a),c._enter=d,c._exit=f,c}function kj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Cj(){return new sr(this._exit||this._groups.map(dE),this._parents)}function Tj(e,t,r){var a=this.enter(),s=this,o=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?o.remove():r(o),a&&s?a.merge(s).order():s}function Aj(e){for(var t=e.selection?e.selection():e,r=this._groups,a=t._groups,s=r.length,o=a.length,c=Math.min(s,o),d=new Array(s),f=0;f=0;)(c=a[s])&&(o&&c.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(c,o),o=c);return this}function Oj(e){e||(e=Rj);function t(p,y){return p&&y?e(p.__data__,y.__data__):!p-!y}for(var r=this._groups,a=r.length,s=new Array(a),o=0;ot?1:e>=t?0:NaN}function Dj(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function jj(){return Array.from(this)}function Lj(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?Vj:typeof t=="function"?Xj:Yj)(e,t,r??"")):Xs(this.node(),e)}function Xs(e,t){return e.style.getPropertyValue(t)||fE(e).getComputedStyle(e,null).getPropertyValue(t)}function Zj(e){return function(){delete this[e]}}function Qj(e,t){return function(){this[e]=t}}function Wj(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Jj(e,t){return arguments.length>1?this.each((t==null?Zj:typeof t=="function"?Wj:Qj)(e,t)):this.node()[e]}function hE(e){return e.trim().split(/^|\s+/)}function Vp(e){return e.classList||new mE(e)}function mE(e){this._node=e,this._names=hE(e.getAttribute("class")||"")}mE.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function pE(e,t){for(var r=Vp(e),a=-1,s=t.length;++a=0&&(r=t.slice(a+1),t=t.slice(0,a)),{type:t,name:r}})}function CL(e){return function(){var t=this.__on;if(t){for(var r=0,a=-1,s=t.length,o;r()=>e;function Jm(e,{sourceEvent:t,subject:r,target:a,identifier:s,active:o,x:c,y:d,dx:f,dy:h,dispatch:m}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:d,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:m}})}Jm.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function IL(e){return!e.ctrlKey&&!e.button}function BL(){return this.parentNode}function UL(e,t){return t??{x:e.x,y:e.y}}function HL(){return navigator.maxTouchPoints||"ontouchstart"in this}function _E(){var e=IL,t=BL,r=UL,a=HL,s={},o=Yu("start","drag","end"),c=0,d,f,h,m,p=0;function y(M){M.on("mousedown.drag",x).filter(a).on("touchstart.drag",S).on("touchmove.drag",w,zL).on("touchend.drag touchcancel.drag",k).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(M,I){if(!(m||!e.call(this,M,I))){var R=E(this,t.call(this,M,I),M,I,"mouse");R&&(ir(M.view).on("mousemove.drag",_,xo).on("mouseup.drag",N,xo),yE(M.view),gm(M),h=!1,d=M.clientX,f=M.clientY,R("start",M))}}function _(M){if(Ps(M),!h){var I=M.clientX-d,R=M.clientY-f;h=I*I+R*R>p}s.mouse("drag",M)}function N(M){ir(M.view).on("mousemove.drag mouseup.drag",null),vE(M.view,h),Ps(M),s.mouse("end",M)}function S(M,I){if(e.call(this,M,I)){var R=M.changedTouches,U=t.call(this,M,I),B=R.length,Z,D;for(Z=0;Z>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?iu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?iu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=qL.exec(e))?new Gn(t[1],t[2],t[3],1):(t=PL.exec(e))?new Gn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=FL.exec(e))?iu(t[1],t[2],t[3],t[4]):(t=GL.exec(e))?iu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=VL.exec(e))?Vv(t[1],t[2]/100,t[3]/100,1):(t=YL.exec(e))?Vv(t[1],t[2]/100,t[3]/100,t[4]):Hv.hasOwnProperty(e)?Pv(Hv[e]):e==="transparent"?new Gn(NaN,NaN,NaN,0):null}function Pv(e){return new Gn(e>>16&255,e>>8&255,e&255,1)}function iu(e,t,r,a){return a<=0&&(e=t=r=NaN),new Gn(e,t,r,a)}function ZL(e){return e instanceof jo||(e=Ga(e)),e?(e=e.rgb(),new Gn(e.r,e.g,e.b,e.opacity)):new Gn}function ep(e,t,r,a){return arguments.length===1?ZL(e):new Gn(e,t,r,a??1)}function Gn(e,t,r,a){this.r=+e,this.g=+t,this.b=+r,this.opacity=+a}Yp(Gn,ep,wE(jo,{brighter(e){return e=e==null?ku:Math.pow(ku,e),new Gn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?yo:Math.pow(yo,e),new Gn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Gn(qa(this.r),qa(this.g),qa(this.b),Cu(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:Fv,formatHex:Fv,formatHex8:QL,formatRgb:Gv,toString:Gv}));function Fv(){return`#${Ha(this.r)}${Ha(this.g)}${Ha(this.b)}`}function QL(){return`#${Ha(this.r)}${Ha(this.g)}${Ha(this.b)}${Ha((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gv(){const e=Cu(this.opacity);return`${e===1?"rgb(":"rgba("}${qa(this.r)}, ${qa(this.g)}, ${qa(this.b)}${e===1?")":`, ${e})`}`}function Cu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function qa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ha(e){return e=qa(e),(e<16?"0":"")+e.toString(16)}function Vv(e,t,r,a){return a<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ar(e,t,r,a)}function EE(e){if(e instanceof Ar)return new Ar(e.h,e.s,e.l,e.opacity);if(e instanceof jo||(e=Ga(e)),!e)return new Ar;if(e instanceof Ar)return e;e=e.rgb();var t=e.r/255,r=e.g/255,a=e.b/255,s=Math.min(t,r,a),o=Math.max(t,r,a),c=NaN,d=o-s,f=(o+s)/2;return d?(t===o?c=(r-a)/d+(r0&&f<1?0:c,new Ar(c,d,f,e.opacity)}function WL(e,t,r,a){return arguments.length===1?EE(e):new Ar(e,t,r,a??1)}function Ar(e,t,r,a){this.h=+e,this.s=+t,this.l=+r,this.opacity=+a}Yp(Ar,WL,wE(jo,{brighter(e){return e=e==null?ku:Math.pow(ku,e),new Ar(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?yo:Math.pow(yo,e),new Ar(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,a=r+(r<.5?r:1-r)*t,s=2*r-a;return new Gn(bm(e>=240?e-240:e+120,s,a),bm(e,s,a),bm(e<120?e+240:e-120,s,a),this.opacity)},clamp(){return new Ar(Yv(this.h),au(this.s),au(this.l),Cu(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=Cu(this.opacity);return`${e===1?"hsl(":"hsla("}${Yv(this.h)}, ${au(this.s)*100}%, ${au(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Yv(e){return e=(e||0)%360,e<0?e+360:e}function au(e){return Math.max(0,Math.min(1,e||0))}function bm(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Xp=e=>()=>e;function JL(e,t){return function(r){return e+r*t}}function e6(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(a){return Math.pow(e+a*t,r)}}function t6(e){return(e=+e)==1?NE:function(t,r){return r-t?e6(t,r,e):Xp(isNaN(t)?r:t)}}function NE(e,t){var r=t-e;return r?JL(e,r):Xp(isNaN(e)?t:e)}const Tu=(function e(t){var r=t6(t);function a(s,o){var c=r((s=ep(s)).r,(o=ep(o)).r),d=r(s.g,o.g),f=r(s.b,o.b),h=NE(s.opacity,o.opacity);return function(m){return s.r=c(m),s.g=d(m),s.b=f(m),s.opacity=h(m),s+""}}return a.gamma=e,a})(1);function n6(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,a=t.slice(),s;return function(o){for(s=0;sr&&(o=t.slice(r,o),d[c]?d[c]+=o:d[++c]=o),(a=a[0])===(s=s[0])?d[c]?d[c]+=s:d[++c]=s:(d[++c]=null,f.push({i:c,x:Vr(a,s)})),r=xm.lastIndex;return r180?m+=360:m-h>180&&(h+=360),y.push({i:p.push(s(p)+"rotate(",null,a)-2,x:Vr(h,m)})):m&&p.push(s(p)+"rotate("+m+a)}function d(h,m,p,y){h!==m?y.push({i:p.push(s(p)+"skewX(",null,a)-2,x:Vr(h,m)}):m&&p.push(s(p)+"skewX("+m+a)}function f(h,m,p,y,x,_){if(h!==p||m!==y){var N=x.push(s(x)+"scale(",null,",",null,")");_.push({i:N-4,x:Vr(h,p)},{i:N-2,x:Vr(m,y)})}else(p!==1||y!==1)&&x.push(s(x)+"scale("+p+","+y+")")}return function(h,m){var p=[],y=[];return h=e(h),m=e(m),o(h.translateX,h.translateY,m.translateX,m.translateY,p,y),c(h.rotate,m.rotate,p,y),d(h.skewX,m.skewX,p,y),f(h.scaleX,h.scaleY,m.scaleX,m.scaleY,p,y),h=m=null,function(x){for(var _=-1,N=y.length,S;++_=0&&e._call.call(void 0,t),e=e._next;--Ks}function Zv(){Va=(Mu=_o.now())+Ku,Ks=ao=0;try{b6()}finally{Ks=0,y6(),Va=0}}function x6(){var e=_o.now(),t=e-Mu;t>TE&&(Ku-=t,Mu=e)}function y6(){for(var e,t=Au,r,a=1/0;t;)t._call?(a>t._time&&(a=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Au=r);so=e,rp(a)}function rp(e){if(!Ks){ao&&(ao=clearTimeout(ao));var t=e-Va;t>24?(e<1/0&&(ao=setTimeout(Zv,e-_o.now()-Ku)),eo&&(eo=clearInterval(eo))):(eo||(Mu=_o.now(),eo=setInterval(x6,TE)),Ks=1,AE(Zv))}}function Qv(e,t,r){var a=new Ou;return t=t==null?0:+t,a.restart(s=>{a.stop(),e(s+t)},t,r),a}var v6=Yu("start","end","cancel","interrupt"),_6=[],OE=0,Wv=1,ip=2,bu=3,Jv=4,ap=5,xu=6;function Zu(e,t,r,a,s,o){var c=e.__transition;if(!c)e.__transition={};else if(r in c)return;w6(e,r,{name:t,index:a,group:s,on:v6,tween:_6,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:OE})}function Zp(e,t){var r=Ir(e,t);if(r.state>OE)throw new Error("too late; already scheduled");return r}function Zr(e,t){var r=Ir(e,t);if(r.state>bu)throw new Error("too late; already running");return r}function Ir(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function w6(e,t,r){var a=e.__transition,s;a[t]=r,r.timer=ME(o,0,r.time);function o(h){r.state=Wv,r.timer.restart(c,r.delay,r.time),r.delay<=h&&c(h-r.delay)}function c(h){var m,p,y,x;if(r.state!==Wv)return f();for(m in a)if(x=a[m],x.name===r.name){if(x.state===bu)return Qv(c);x.state===Jv?(x.state=xu,x.timer.stop(),x.on.call("interrupt",e,e.__data__,x.index,x.group),delete a[m]):+mip&&a.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function W6(e,t,r){var a,s,o=Q6(t)?Zp:Zr;return function(){var c=o(this,e),d=c.on;d!==a&&(s=(a=d).copy()).on(t,r),c.on=s}}function J6(e,t){var r=this._id;return arguments.length<2?Ir(this.node(),r).on.on(e):this.each(W6(r,e,t))}function ez(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function tz(){return this.on("end.remove",ez(this._id))}function nz(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Gp(e));for(var a=this._groups,s=a.length,o=new Array(s),c=0;c()=>e;function Cz(e,{sourceEvent:t,target:r,transform:a,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:s}})}function vi(e,t,r){this.k=e,this.x=t,this.y=r}vi.prototype={constructor:vi,scale:function(e){return e===1?this:new vi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new vi(this.k,this.x+this.k*e,this.y+this.k*t)},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 Qu=new vi(1,0,0);LE.prototype=vi.prototype;function LE(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Qu;return e.__zoom}function ym(e){e.stopImmediatePropagation()}function to(e){e.preventDefault(),e.stopImmediatePropagation()}function Tz(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Az(){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 e1(){return this.__zoom||Qu}function Mz(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Oz(){return navigator.maxTouchPoints||"ontouchstart"in this}function Rz(e,t,r){var a=e.invertX(t[0][0])-r[0][0],s=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],c=e.invertY(t[1][1])-r[1][1];return e.translate(s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s),c>o?(o+c)/2:Math.min(0,o)||Math.max(0,c))}function zE(){var e=Tz,t=Az,r=Rz,a=Mz,s=Oz,o=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,f=gu,h=Yu("start","zoom","end"),m,p,y,x=500,_=150,N=0,S=10;function w(T){T.property("__zoom",e1).on("wheel.zoom",B,{passive:!1}).on("mousedown.zoom",Z).on("dblclick.zoom",D).filter(s).on("touchstart.zoom",z).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(T,$,O,H){var X=T.selection?T.selection():T;X.property("__zoom",e1),T!==X?I(T,$,O,H):X.interrupt().each(function(){R(this,arguments).event(H).start().zoom(null,typeof $=="function"?$.apply(this,arguments):$).end()})},w.scaleBy=function(T,$,O,H){w.scaleTo(T,function(){var X=this.__zoom.k,K=typeof $=="function"?$.apply(this,arguments):$;return X*K},O,H)},w.scaleTo=function(T,$,O,H){w.transform(T,function(){var X=t.apply(this,arguments),K=this.__zoom,C=O==null?M(X):typeof O=="function"?O.apply(this,arguments):O,j=K.invert(C),Y=typeof $=="function"?$.apply(this,arguments):$;return r(E(k(K,Y),C,j),X,c)},O,H)},w.translateBy=function(T,$,O,H){w.transform(T,function(){return r(this.__zoom.translate(typeof $=="function"?$.apply(this,arguments):$,typeof O=="function"?O.apply(this,arguments):O),t.apply(this,arguments),c)},null,H)},w.translateTo=function(T,$,O,H,X){w.transform(T,function(){var K=t.apply(this,arguments),C=this.__zoom,j=H==null?M(K):typeof H=="function"?H.apply(this,arguments):H;return r(Qu.translate(j[0],j[1]).scale(C.k).translate(typeof $=="function"?-$.apply(this,arguments):-$,typeof O=="function"?-O.apply(this,arguments):-O),K,c)},H,X)};function k(T,$){return $=Math.max(o[0],Math.min(o[1],$)),$===T.k?T:new vi($,T.x,T.y)}function E(T,$,O){var H=$[0]-O[0]*T.k,X=$[1]-O[1]*T.k;return H===T.x&&X===T.y?T:new vi(T.k,H,X)}function M(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function I(T,$,O,H){T.on("start.zoom",function(){R(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(H).end()}).tween("zoom",function(){var X=this,K=arguments,C=R(X,K).event(H),j=t.apply(X,K),Y=O==null?M(j):typeof O=="function"?O.apply(X,K):O,L=Math.max(j[1][0]-j[0][0],j[1][1]-j[0][1]),G=X.__zoom,q=typeof $=="function"?$.apply(X,K):$,Q=f(G.invert(Y).concat(L/G.k),q.invert(Y).concat(L/q.k));return function(J){if(J===1)J=q;else{var W=Q(J),te=L/W[2];J=new vi(te,Y[0]-W[0]*te,Y[1]-W[1]*te)}C.zoom(null,J)}})}function R(T,$,O){return!O&&T.__zooming||new U(T,$)}function U(T,$){this.that=T,this.args=$,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,$),this.taps=0}U.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,$){return this.mouse&&T!=="mouse"&&(this.mouse[1]=$.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=$.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=$.invert(this.touch1[0])),this.that.__zoom=$,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var $=ir(this.that).datum();h.call(T,this.that,new Cz(T,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:h}),$)}};function B(T,...$){if(!e.apply(this,arguments))return;var O=R(this,$).event(T),H=this.__zoom,X=Math.max(o[0],Math.min(o[1],H.k*Math.pow(2,a.apply(this,arguments)))),K=Cr(T);if(O.wheel)(O.mouse[0][0]!==K[0]||O.mouse[0][1]!==K[1])&&(O.mouse[1]=H.invert(O.mouse[0]=K)),clearTimeout(O.wheel);else{if(H.k===X)return;O.mouse=[K,H.invert(K)],yu(this),O.start()}to(T),O.wheel=setTimeout(C,_),O.zoom("mouse",r(E(k(H,X),O.mouse[0],O.mouse[1]),O.extent,c));function C(){O.wheel=null,O.end()}}function Z(T,...$){if(y||!e.apply(this,arguments))return;var O=T.currentTarget,H=R(this,$,!0).event(T),X=ir(T.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",L,!0),K=Cr(T,O),C=T.clientX,j=T.clientY;yE(T.view),ym(T),H.mouse=[K,this.__zoom.invert(K)],yu(this),H.start();function Y(G){if(to(G),!H.moved){var q=G.clientX-C,Q=G.clientY-j;H.moved=q*q+Q*Q>N}H.event(G).zoom("mouse",r(E(H.that.__zoom,H.mouse[0]=Cr(G,O),H.mouse[1]),H.extent,c))}function L(G){X.on("mousemove.zoom mouseup.zoom",null),vE(G.view,H.moved),to(G),H.event(G).end()}}function D(T,...$){if(e.apply(this,arguments)){var O=this.__zoom,H=Cr(T.changedTouches?T.changedTouches[0]:T,this),X=O.invert(H),K=O.k*(T.shiftKey?.5:2),C=r(E(k(O,K),H,X),t.apply(this,$),c);to(T),d>0?ir(this).transition().duration(d).call(I,C,H,T):ir(this).call(w.transform,C,H,T)}}function z(T,...$){if(e.apply(this,arguments)){var O=T.touches,H=O.length,X=R(this,$,T.changedTouches.length===H).event(T),K,C,j,Y;for(ym(T),C=0;C`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:t,sourceHandle:r,targetHandle:a})=>`Couldn't create edge for ${e} handle id: "${e==="source"?r:a}", edge id: ${t}.`,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.`},wo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],IE=["Enter"," ","Escape"],BE={"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:t,y:r})=>`Moved selected node ${e}. New position, x: ${t}, y: ${r}`,"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 Zs;(function(e){e.Strict="strict",e.Loose="loose"})(Zs||(Zs={}));var Pa;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Pa||(Pa={}));var Eo;(function(e){e.Partial="partial",e.Full="full"})(Eo||(Eo={}));const UE={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ca;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ca||(ca={}));var Ru;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Ru||(Ru={}));var ze;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ze||(ze={}));const t1={[ze.Left]:ze.Right,[ze.Right]:ze.Left,[ze.Top]:ze.Bottom,[ze.Bottom]:ze.Top};function HE(e){return e===null?null:e?"valid":"invalid"}const $E=e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,Dz=e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Wp=e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Lo=(e,t=[0,0])=>{const{width:r,height:a}=Qr(e),s=e.origin??t,o=r*s[0],c=a*s[1];return{x:e.position.x-o,y:e.position.y-c}},jz=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((a,s)=>{const o=typeof s=="string";let c=!t.nodeLookup&&!o?s:void 0;t.nodeLookup&&(c=o?t.nodeLookup.get(s):Wp(s)?s:t.nodeLookup.get(s.id));const d=c?Du(c,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Wu(a,d)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Ju(r)},zo=(e,t={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},a=!1;return e.forEach(s=>{(t.filter===void 0||t.filter(s))&&(r=Wu(r,Du(s)),a=!0)}),a?Ju(r):{x:0,y:0,width:0,height:0}},Jp=(e,t,[r,a,s]=[0,0,1],o=!1,c=!1)=>{const d=(t.x-r)/s,f=(t.y-a)/s,h=t.width/s,m=t.height/s,p=[];for(const y of e.values()){const{measured:x,selectable:_=!0,hidden:N=!1}=y;if(c&&!_||N)continue;const S=x.width??y.width??y.initialWidth??0,w=x.height??y.height??y.initialHeight??0,{x:k,y:E}=y.internals.positionAbsolute,M=GE(d,f,h,m,k,E,S,w),I=S*w,R=o&&M>0;(!y.internals.handleBounds||R||M>=I||y.dragging)&&p.push(y)}return p},Lz=(e,t)=>{const r=new Set;return e.forEach(a=>{r.add(a.id)}),t.filter(a=>r.has(a.source)||r.has(a.target))};function zz(e,t){const r=new Map,a=t!=null&&t.nodes?new Set(t.nodes.map(s=>s.id)):null;return e.forEach(s=>{let o;if(t!=null&&t.includeHiddenNodes){const{width:c,height:d}=Qr(s);o=c>0&&d>0}else o=!!(s.measured.width&&s.measured.height&&!s.hidden);o&&(!a||a.has(s.id))&&r.set(s.id,s)}),r}async function Iz({nodes:e,width:t,height:r,panZoom:a,minZoom:s,maxZoom:o},c){if(e.size===0)return!0;const d=zz(e,c),f=zo(d),h=tg(f,t,r,(c==null?void 0:c.minZoom)??s,(c==null?void 0:c.maxZoom)??o,(c==null?void 0:c.padding)??.1);return await a.setViewport(h,{duration:c==null?void 0:c.duration,ease:c==null?void 0:c.ease,interpolate:c==null?void 0:c.interpolate}),!0}function qE({nodeId:e,nextPosition:t,nodeLookup:r,nodeOrigin:a=[0,0],nodeExtent:s,onError:o}){const c=r.get(e),d=c.parentId?r.get(c.parentId):void 0,{x:f,y:h}=d?d.internals.positionAbsolute:{x:0,y:0},m=c.origin??a;let p=c.extent||s;if(c.extent==="parent"&&!c.expandParent)if(!d)o==null||o("005",Lr.error005());else{const x=d.measured.width,_=d.measured.height;x&&_&&(p=[[f,h],[f+x,h+_]])}else d&&Xa(c.extent)&&(p=[[c.extent[0][0]+f,c.extent[0][1]+h],[c.extent[1][0]+f,c.extent[1][1]+h]]);const y=Xa(p)?Ya(t,p,c.measured):t;return(c.measured.width===void 0||c.measured.height===void 0)&&(o==null||o("015",Lr.error015())),{position:{x:y.x-f+(c.measured.width??0)*m[0],y:y.y-h+(c.measured.height??0)*m[1]},positionAbsolute:y}}async function Bz({nodesToRemove:e=[],edgesToRemove:t=[],nodes:r,edges:a,onBeforeDelete:s}){const o=new Set(e.map(y=>y.id)),c=[];for(const y of r){if(y.deletable===!1)continue;const x=o.has(y.id),_=!x&&y.parentId&&c.find(N=>N.id===y.parentId);(x||_)&&c.push(y)}const d=new Set(t.map(y=>y.id)),f=a.filter(y=>y.deletable!==!1),m=Lz(c,f);for(const y of f)d.has(y.id)&&!m.find(_=>_.id===y.id)&&m.push(y);if(!s)return{edges:m,nodes:c};const p=await s({nodes:c,edges:m});return typeof p=="boolean"?p?{edges:m,nodes:c}:{edges:[],nodes:[]}:p}const Qs=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),Ya=(e={x:0,y:0},t,r)=>({x:Qs(e.x,t[0][0],t[1][0]-((r==null?void 0:r.width)??0)),y:Qs(e.y,t[0][1],t[1][1]-((r==null?void 0:r.height)??0))});function PE(e,t,r){const{width:a,height:s}=Qr(r),{x:o,y:c}=r.internals.positionAbsolute;return Ya(e,[[o,c],[o+a,c+s]],t)}const n1=(e,t,r)=>er?-Qs(Math.abs(e-r),1,t)/t:0,eg=(e,t,r=15,a=40)=>{const s=n1(e.x,a,t.width-a)*r,o=n1(e.y,a,t.height-a)*r;return[s,o]},Wu=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),sp=({x:e,y:t,width:r,height:a})=>({x:e,y:t,x2:e+r,y2:t+a}),Ju=({x:e,y:t,x2:r,y2:a})=>({x:e,y:t,width:r-e,height:a-t}),No=(e,t=[0,0])=>{var s,o;const{x:r,y:a}=Wp(e)?e.internals.positionAbsolute:Lo(e,t);return{x:r,y:a,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},Du=(e,t=[0,0])=>{var s,o;const{x:r,y:a}=Wp(e)?e.internals.positionAbsolute:Lo(e,t);return{x:r,y:a,x2:r+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:a+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},FE=(e,t)=>Ju(Wu(sp(e),sp(t))),GE=(e,t,r,a,s,o,c,d)=>{const f=Math.max(0,Math.min(e+r,s+c)-Math.max(e,s)),h=Math.max(0,Math.min(t+a,o+d)-Math.max(t,o));return Math.ceil(f*h)},ju=(e,t)=>GE(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),r1=e=>Or(e.width)&&Or(e.height)&&Or(e.x)&&Or(e.y),Or=e=>!isNaN(e)&&isFinite(e),VE=(e,t)=>(r,a)=>{},Io=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Bo=({x:e,y:t},[r,a,s],o=!1,c=[1,1])=>{const d={x:(e-r)/s,y:(t-a)/s};return o?Io(d,c):d},Ws=({x:e,y:t},[r,a,s])=>({x:e*s+r,y:t*s+a});function Ls(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(r)}if(typeof e=="string"&&e.endsWith("%")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(t*r*.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 Uz(e,t,r){if(typeof e=="string"||typeof e=="number"){const a=Ls(e,r),s=Ls(e,t);return{top:a,right:s,bottom:a,left:s,x:s*2,y:a*2}}if(typeof e=="object"){const a=Ls(e.top??e.y??0,r),s=Ls(e.bottom??e.y??0,r),o=Ls(e.left??e.x??0,t),c=Ls(e.right??e.x??0,t);return{top:a,right:c,bottom:s,left:o,x:o+c,y:a+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Hz(e,t,r,a,s,o){const{x:c,y:d}=Ws(e,[t,r,a]),{x:f,y:h}=Ws({x:e.x+e.width,y:e.y+e.height},[t,r,a]),m=s-f,p=o-h;return{left:Math.floor(c),top:Math.floor(d),right:Math.floor(m),bottom:Math.floor(p)}}const tg=(e,t,r,a,s,o)=>{const c=Uz(o,t,r),d=(t-c.x)/e.width,f=(r-c.y)/e.height,h=Math.min(d,f),m=Qs(h,a,s),p=e.x+e.width/2,y=e.y+e.height/2,x=t/2-p*m,_=r/2-y*m,N=Hz(e,x,_,m,t,r),S={left:Math.min(N.left-c.left,0),top:Math.min(N.top-c.top,0),right:Math.min(N.right-c.right,0),bottom:Math.min(N.bottom-c.bottom,0)};return{x:x-S.left+S.right,y:_-S.top+S.bottom,zoom:m}},So=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Xa(e){return e!=null&&e!=="parent"}function Qr(e){var t,r;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight??0}}function YE(e){var t,r;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight)!==void 0}function XE(e,t={width:0,height:0},r,a,s){const o={...e},c=a.get(r);if(c){const d=c.origin||s;o.x+=c.internals.positionAbsolute.x-(t.width??0)*d[0],o.y+=c.internals.positionAbsolute.y-(t.height??0)*d[1]}return o}function i1(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}function $z(){let e,t;return{promise:new Promise((a,s)=>{e=a,t=s}),resolve:e,reject:t}}function qz(e){return{...BE,...e||{}}}function fo(e,{snapGrid:t=[0,0],snapToGrid:r=!1,transform:a,containerBounds:s}){const{x:o,y:c}=Rr(e),d=Bo({x:o-((s==null?void 0:s.left)??0),y:c-((s==null?void 0:s.top)??0)},a),{x:f,y:h}=r?Io(d,t):d;return{xSnapped:f,ySnapped:h,...d}}const ng=e=>({width:e.offsetWidth,height:e.offsetHeight}),KE=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},Pz=["INPUT","SELECT","TEXTAREA"];function ZE(e){var a,s;const t=((s=(a=e.composedPath)==null?void 0:a.call(e))==null?void 0:s[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:Pz.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const QE=e=>"clientX"in e,Rr=(e,t)=>{var o,c;const r=QE(e),a=r?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,s=r?e.clientY:(c=e.touches)==null?void 0:c[0].clientY;return{x:a-((t==null?void 0:t.left)??0),y:s-((t==null?void 0:t.top)??0)}},a1=(e,t,r,a,s)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(c=>{const d=c.getBoundingClientRect();return{id:c.getAttribute("data-handleid"),type:e,nodeId:s,position:c.getAttribute("data-handlepos"),x:(d.left-r.left)/a,y:(d.top-r.top)/a,...ng(c)}})};function WE({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:s,sourceControlY:o,targetControlX:c,targetControlY:d}){const f=e*.125+s*.375+c*.375+r*.125,h=t*.125+o*.375+d*.375+a*.125,m=Math.abs(f-e),p=Math.abs(h-t);return[f,h,m,p]}function ou(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function s1({pos:e,x1:t,y1:r,x2:a,y2:s,c:o}){switch(e){case ze.Left:return[t-ou(t-a,o),r];case ze.Right:return[t+ou(a-t,o),r];case ze.Top:return[t,r-ou(r-s,o)];case ze.Bottom:return[t,r+ou(s-r,o)]}}function JE({sourceX:e,sourceY:t,sourcePosition:r=ze.Bottom,targetX:a,targetY:s,targetPosition:o=ze.Top,curvature:c=.25}){const[d,f]=s1({pos:r,x1:e,y1:t,x2:a,y2:s,c}),[h,m]=s1({pos:o,x1:a,y1:s,x2:e,y2:t,c}),[p,y,x,_]=WE({sourceX:e,sourceY:t,targetX:a,targetY:s,sourceControlX:d,sourceControlY:f,targetControlX:h,targetControlY:m});return[`M${e},${t} C${d},${f} ${h},${m} ${a},${s}`,p,y,x,_]}function eN({sourceX:e,sourceY:t,targetX:r,targetY:a}){const s=Math.abs(r-e)/2,o=r0}const Vz=({source:e,sourceHandle:t,target:r,targetHandle:a})=>`xy-edge__${e}${t||""}-${r}${a||""}`,Yz=(e,t)=>t.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),Xz=(e,t,r={})=>{var o;if(!e.source||!e.target)return(o=r.onError)==null||o.call(r,"006",Lr.error006()),t;const a=r.getEdgeId||Vz;let s;return $E(e)?s={...e}:s={...e,id:a(e)},Yz(s,t)?t:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,t.concat(s))};function tN({sourceX:e,sourceY:t,targetX:r,targetY:a}){const[s,o,c,d]=eN({sourceX:e,sourceY:t,targetX:r,targetY:a});return[`M ${e},${t}L ${r},${a}`,s,o,c,d]}const l1={[ze.Left]:{x:-1,y:0},[ze.Right]:{x:1,y:0},[ze.Top]:{x:0,y:-1},[ze.Bottom]:{x:0,y:1}},Kz=({source:e,sourcePosition:t=ze.Bottom,target:r})=>t===ze.Left||t===ze.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Zz({source:e,sourcePosition:t=ze.Bottom,target:r,targetPosition:a=ze.Top,center:s,offset:o,stepPosition:c}){const d=l1[t],f=l1[a],h={x:e.x+d.x*o,y:e.y+d.y*o},m={x:r.x+f.x*o,y:r.y+f.y*o},p=Kz({source:h,sourcePosition:t,target:m}),y=p.x!==0?"x":"y",x=p[y];let _=[],N,S;const w={x:0,y:0},k={x:0,y:0},[,,E,M]=eN({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(d[y]*f[y]===-1){y==="x"?(N=s.x??h.x+(m.x-h.x)*c,S=s.y??(h.y+m.y)/2):(N=s.x??(h.x+m.x)/2,S=s.y??h.y+(m.y-h.y)*c);const B=[{x:N,y:h.y},{x:N,y:m.y}],Z=[{x:h.x,y:S},{x:m.x,y:S}];d[y]===x?_=y==="x"?B:Z:_=y==="x"?Z:B}else{const B=[{x:h.x,y:m.y}],Z=[{x:m.x,y:h.y}];if(y==="x"?_=d.x===x?Z:B:_=d.y===x?B:Z,t===a){const T=Math.abs(e[y]-r[y]);if(T<=o){const $=Math.min(o-1,o-T);d[y]===x?w[y]=(h[y]>e[y]?-1:1)*$:k[y]=(m[y]>r[y]?-1:1)*$}}if(t!==a){const T=y==="x"?"y":"x",$=d[y]===f[T],O=h[T]>m[T],H=h[T]=P?(N=(D.x+z.x)/2,S=_[0].y):(N=_[0].x,S=(D.y+z.y)/2)}const I={x:h.x+w.x,y:h.y+w.y},R={x:m.x+k.x,y:m.y+k.y};return[[e,...I.x!==_[0].x||I.y!==_[0].y?[I]:[],..._,...R.x!==_[_.length-1].x||R.y!==_[_.length-1].y?[R]:[],r],N,S,E,M]}function Qz(e,t,r,a){const s=Math.min(o1(e,t)/2,o1(t,r)/2,a),{x:o,y:c}=t;if(e.x===o&&o===r.x||e.y===c&&c===r.y)return`L${o} ${c}`;if(e.y===c){const h=e.xr.id===t):e[0])||null}function op(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(a=>`${a}=${e[a]}`).join("&")}`:""}function Jz(e,{id:t,defaultColor:r,defaultMarkerStart:a,defaultMarkerEnd:s}){const o=new Set;return e.reduce((c,d)=>([d.markerStart||a,d.markerEnd||s].forEach(f=>{if(f&&typeof f=="object"){const h=op(f,t);o.has(h)||(c.push({id:h,color:f.color||r,...f}),o.add(h))}}),c),[]).sort((c,d)=>c.id.localeCompare(d.id))}const nN=1e3,eI=10,rg={nodeOrigin:[0,0],nodeExtent:wo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},tI={...rg,checkEquality:!0};function ig(e,t){const r={...e};for(const a in t)t[a]!==void 0&&(r[a]=t[a]);return r}function nI(e,t,r){const a=ig(rg,r);for(const s of e.values())if(s.parentId)sg(s,e,t,a);else{const o=Lo(s,a.nodeOrigin),c=Xa(s.extent)?s.extent:a.nodeExtent,d=Ya(o,c,Qr(s));s.internals.positionAbsolute=d}}function rI(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const r=[],a=[];for(const s of e.handles){const o={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"?r.push(o):s.type==="target"&&a.push(o)}return{source:r,target:a}}function ag(e){return e==="manual"}function cp(e,t,r,a={}){var m,p;const s=ig(tI,a),o={i:0},c=new Map(t),d=s!=null&&s.elevateNodesOnSelect&&!ag(s.zIndexMode)?nN:0;let f=e.length>0,h=!1;t.clear(),r.clear();for(const y of e){let x=c.get(y.id);if(s.checkEquality&&y===(x==null?void 0:x.internals.userNode))t.set(y.id,x);else{const _=Lo(y,s.nodeOrigin),N=Xa(y.extent)?y.extent:s.nodeExtent,S=Ya(_,N,Qr(y));x={...s.defaults,...y,measured:{width:(m=y.measured)==null?void 0:m.width,height:(p=y.measured)==null?void 0:p.height},internals:{positionAbsolute:S,handleBounds:rI(y,x),z:rN(y,d,s.zIndexMode),userNode:y}},t.set(y.id,x)}(x.measured===void 0||x.measured.width===void 0||x.measured.height===void 0)&&!x.hidden&&(f=!1),y.parentId&&sg(x,t,r,a,o),h||(h=y.selected??!1)}return{nodesInitialized:f,hasSelectedNodes:h}}function iI(e,t){if(!e.parentId)return;const r=t.get(e.parentId);r?r.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function sg(e,t,r,a,s){const{elevateNodesOnSelect:o,nodeOrigin:c,nodeExtent:d,zIndexMode:f}=ig(rg,a),h=e.parentId,m=t.get(h);if(!m){console.warn(`Parent node ${h} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}iI(e,r),s&&!m.parentId&&m.internals.rootParentIndex===void 0&&f==="auto"&&(m.internals.rootParentIndex=++s.i,m.internals.z=m.internals.z+s.i*eI),s&&m.internals.rootParentIndex!==void 0&&(s.i=m.internals.rootParentIndex);const p=o&&!ag(f)?nN:0,{x:y,y:x,z:_}=aI(e,m,c,d,p,f),{positionAbsolute:N}=e.internals,S=y!==N.x||x!==N.y;(S||_!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:y,y:x}:N,z:_}})}function rN(e,t,r){const a=Or(e.zIndex)?e.zIndex:0;return ag(r)?a:a+(e.selected?t:0)}function aI(e,t,r,a,s,o){const{x:c,y:d}=t.internals.positionAbsolute,f=Qr(e),h=Lo(e,r),m=Xa(e.extent)?Ya(h,e.extent,f):h;let p=Ya({x:c+m.x,y:d+m.y},a,f);e.extent==="parent"&&(p=PE(p,f,t));const y=rN(e,s,o),x=t.internals.z??0;return{x:p.x,y:p.y,z:x>=y?x+1:y}}function lg(e,t,r,a=[0,0]){var c;const s=[],o=new Map;for(const d of e){const f=t.get(d.parentId);if(!f)continue;const h=((c=o.get(d.parentId))==null?void 0:c.expandedRect)??No(f),m=FE(h,d.rect);o.set(d.parentId,{expandedRect:m,parent:f})}return o.size>0&&o.forEach(({expandedRect:d,parent:f},h)=>{var E;const m=f.internals.positionAbsolute,p=Qr(f),y=f.origin??a,x=d.x0||_>0||w||k)&&(s.push({id:h,type:"position",position:{x:f.position.x-x+w,y:f.position.y-_+k}}),(E=r.get(h))==null||E.forEach(M=>{e.some(I=>I.id===M.id)||s.push({id:M.id,type:"position",position:{x:M.position.x+x,y:M.position.y+_}})})),(p.width0){const x=lg(y,t,r,s);h.push(...x)}return{changes:h,updatedInternals:f}}async function lI({delta:e,panZoom:t,transform:r,translateExtent:a,width:s,height:o}){if(!t||!e.x&&!e.y)return!1;const c=await t.setViewportConstrained({x:r[0]+e.x,y:r[1]+e.y,zoom:r[2]},[[0,0],[s,o]],a);return!!c&&(c.x!==r[0]||c.y!==r[1]||c.k!==r[2])}function f1(e,t,r,a,s,o){let c=s;const d=a.get(c)||new Map;a.set(c,d.set(r,t)),c=`${s}-${e}`;const f=a.get(c)||new Map;if(a.set(c,f.set(r,t)),o){c=`${s}-${e}-${o}`;const h=a.get(c)||new Map;a.set(c,h.set(r,t))}}function iN(e,t,r){e.clear(),t.clear();for(const a of r){const{source:s,target:o,sourceHandle:c=null,targetHandle:d=null}=a,f={edgeId:a.id,source:s,target:o,sourceHandle:c,targetHandle:d},h=`${s}-${c}--${o}-${d}`,m=`${o}-${d}--${s}-${c}`;f1("source",f,m,e,s,c),f1("target",f,h,e,o,d),t.set(a.id,a)}}function aN(e,t){if(!e.parentId)return!1;const r=t.get(e.parentId);return r?r.selected?!0:aN(r,t):!1}function h1(e,t,r){var s;let a=e;do{if((s=a==null?void 0:a.matches)!=null&&s.call(a,t))return!0;if(a===r)return!1;a=a==null?void 0:a.parentElement}while(a);return!1}function oI(e,t,r,a){const s=new Map;for(const[o,c]of e)if((c.selected||c.id===a)&&(!c.parentId||!aN(c,e))&&(c.draggable||t&&typeof c.draggable>"u")){const d=e.get(o);d&&s.set(o,{id:o,position:d.position||{x:0,y:0},distance:{x:r.x-d.internals.positionAbsolute.x,y:r.y-d.internals.positionAbsolute.y},extent:d.extent,parentId:d.parentId,origin:d.origin,expandParent:d.expandParent,internals:{positionAbsolute:d.internals.positionAbsolute||{x:0,y:0}},measured:{width:d.measured.width??0,height:d.measured.height??0}})}return s}function vm({nodeId:e,dragItems:t,nodeLookup:r,dragging:a=!0}){var c,d,f;const s=[];for(const[h,m]of t){const p=(c=r.get(h))==null?void 0:c.internals.userNode;p&&s.push({...p,position:m.position,dragging:a})}if(!e)return[s[0],s];const o=(d=r.get(e))==null?void 0:d.internals.userNode;return[o?{...o,position:((f=t.get(e))==null?void 0:f.position)||o.position,dragging:a}:s[0],s]}function cI({dragItems:e,snapGrid:t,x:r,y:a}){const s=e.values().next().value;if(!s)return null;const o={x:r-s.distance.x,y:a-s.distance.y},c=Io(o,t);return{x:c.x-o.x,y:c.y-o.y}}function uI({onNodeMouseDown:e,getStoreItems:t,onDragStart:r,onDrag:a,onDragStop:s}){let o={x:null,y:null},c=0,d=new Map,f=!1,h={x:0,y:0},m=null,p=!1,y=null,x=!1,_=!1,N=null;function S({noDragClassName:k,handleSelector:E,domNode:M,isSelectable:I,nodeId:R,nodeClickDistance:U=0}){y=ir(M);function B({x:V,y:P}){const{nodeLookup:T,nodeExtent:$,snapGrid:O,snapToGrid:H,nodeOrigin:X,onNodeDrag:K,onSelectionDrag:C,onError:j,updateNodePositions:Y}=t();o={x:V,y:P};let L=!1;const G=d.size>1,q=G&&$?sp(zo(d)):null,Q=G&&H?cI({dragItems:d,snapGrid:O,x:V,y:P}):null;for(const[J,W]of d){if(!T.has(J))continue;let te={x:V-W.distance.x,y:P-W.distance.y};H&&(te=Q?{x:Math.round(te.x+Q.x),y:Math.round(te.y+Q.y)}:Io(te,O));let ce=null;if(G&&$&&!W.extent&&q){const{positionAbsolute:we}=W.internals,Ne=we.x-q.x+$[0][0],je=we.x+W.measured.width-q.x2+$[1][0],$e=we.y-q.y+$[0][1],st=we.y+W.measured.height-q.y2+$[1][1];ce=[[Ne,$e],[je,st]]}const{position:fe,positionAbsolute:be}=qE({nodeId:J,nextPosition:te,nodeLookup:T,nodeExtent:ce||$,nodeOrigin:X,onError:j});L=L||W.position.x!==fe.x||W.position.y!==fe.y,W.position=fe,W.internals.positionAbsolute=be}if(_=_||L,!!L&&(Y(d,!0),N&&(a||K||!R&&C))){const[J,W]=vm({nodeId:R,dragItems:d,nodeLookup:T});a==null||a(N,d,J,W),K==null||K(N,J,W),R||C==null||C(N,W)}}async function Z(){if(!m)return;const{transform:V,panBy:P,autoPanSpeed:T,autoPanOnNodeDrag:$}=t();if(!$){f=!1,cancelAnimationFrame(c);return}const[O,H]=eg(h,m,T);(O!==0||H!==0)&&(o.x=(o.x??0)-O/V[2],o.y=(o.y??0)-H/V[2],await P({x:O,y:H})&&B(o)),c=requestAnimationFrame(Z)}function D(V){var G;const{nodeLookup:P,multiSelectionActive:T,nodesDraggable:$,transform:O,snapGrid:H,snapToGrid:X,selectNodesOnDrag:K,onNodeDragStart:C,onSelectionDragStart:j,unselectNodesAndEdges:Y}=t();p=!0,(!K||!I)&&!T&&R&&((G=P.get(R))!=null&&G.selected||Y()),I&&K&&R&&(e==null||e(R));const L=fo(V.sourceEvent,{transform:O,snapGrid:H,snapToGrid:X,containerBounds:m});if(o=L,d=oI(P,$,L,R),d.size>0&&(r||C||!R&&j)){const[q,Q]=vm({nodeId:R,dragItems:d,nodeLookup:P});r==null||r(V.sourceEvent,d,q,Q),C==null||C(V.sourceEvent,q,Q),R||j==null||j(V.sourceEvent,Q)}}const z=_E().clickDistance(U).on("start",V=>{const{domNode:P,nodeDragThreshold:T,transform:$,snapGrid:O,snapToGrid:H}=t();m=(P==null?void 0:P.getBoundingClientRect())||null,x=!1,_=!1,N=V.sourceEvent,T===0&&D(V),o=fo(V.sourceEvent,{transform:$,snapGrid:O,snapToGrid:H,containerBounds:m}),h=Rr(V.sourceEvent,m)}).on("drag",V=>{const{autoPanOnNodeDrag:P,transform:T,snapGrid:$,snapToGrid:O,nodeDragThreshold:H,nodeLookup:X}=t(),K=fo(V.sourceEvent,{transform:T,snapGrid:$,snapToGrid:O,containerBounds:m});if(N=V.sourceEvent,(V.sourceEvent.type==="touchmove"&&V.sourceEvent.touches.length>1||R&&!X.has(R))&&(x=!0),!x){if(!f&&P&&p&&(f=!0,Z()),!p){const C=Rr(V.sourceEvent,m),j=C.x-h.x,Y=C.y-h.y;Math.sqrt(j*j+Y*Y)>H&&D(V)}(o.x!==K.xSnapped||o.y!==K.ySnapped)&&d&&p&&(h=Rr(V.sourceEvent,m),B(K))}}).on("end",V=>{if(!p||x){x&&d.size>0&&t().updateNodePositions(d,!1);return}if(f=!1,p=!1,cancelAnimationFrame(c),d.size>0){const{nodeLookup:P,updateNodePositions:T,onNodeDragStop:$,onSelectionDragStop:O}=t();if(_&&(T(d,!1),_=!1),s||$||!R&&O){const[H,X]=vm({nodeId:R,dragItems:d,nodeLookup:P,dragging:!1});s==null||s(V.sourceEvent,d,H,X),$==null||$(V.sourceEvent,H,X),R||O==null||O(V.sourceEvent,X)}}}).filter(V=>{const P=V.target;return!V.button&&(!k||!h1(P,`.${k}`,M))&&(!E||h1(P,E,M))});y.call(z)}function w(){y==null||y.on(".drag",null)}return{update:S,destroy:w}}function dI(e,t,r){const a=[],s={x:e.x-r,y:e.y-r,width:r*2,height:r*2};for(const o of t.values())ju(s,No(o))>0&&a.push(o);return a}const fI=250;function hI(e,t,r,a){var d,f;let s=[],o=1/0;const c=dI(e,r,t+fI);for(const h of c){const m=[...((d=h.internals.handleBounds)==null?void 0:d.source)??[],...((f=h.internals.handleBounds)==null?void 0:f.target)??[]];for(const p of m){if(a.nodeId===p.nodeId&&a.type===p.type&&a.id===p.id)continue;const{x:y,y:x}=Ka(h,p,p.position,!0),_=Math.sqrt(Math.pow(y-e.x,2)+Math.pow(x-e.y,2));_>t||(_1){const h=a.type==="source"?"target":"source";return s.find(m=>m.type===h)??s[0]}return s[0]}function sN(e,t,r,a,s,o=!1){var h,m,p;const c=a.get(e);if(!c)return null;const d=s==="strict"?(h=c.internals.handleBounds)==null?void 0:h[t]:[...((m=c.internals.handleBounds)==null?void 0:m.source)??[],...((p=c.internals.handleBounds)==null?void 0:p.target)??[]],f=(r?d==null?void 0:d.find(y=>y.id===r):d==null?void 0:d[0])??null;return f&&o?{...f,...Ka(c,f,f.position,!0)}:f}function lN(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function mI(e,t){let r=null;return t?r=!0:e&&!t&&(r=!1),r}const oN=()=>!0;function pI(e,{connectionMode:t,connectionRadius:r,handleId:a,nodeId:s,edgeUpdaterType:o,isTarget:c,domNode:d,nodeLookup:f,lib:h,autoPanOnConnect:m,flowId:p,panBy:y,cancelConnection:x,onConnectStart:_,onConnect:N,onConnectEnd:S,isValidConnection:w=oN,onReconnectEnd:k,updateConnection:E,getTransform:M,getFromHandle:I,autoPanSpeed:R,dragThreshold:U=1,handleDomNode:B}){const Z=KE(e.target);let D=0,z;const{x:V,y:P}=Rr(e),T=lN(o,B),$=d==null?void 0:d.getBoundingClientRect();let O=!1;if(!$||!T)return;const H=sN(s,T,a,f,t);if(!H)return;let X=Rr(e,$),K=!1,C=null,j=!1,Y=null;function L(){if(!m||!$)return;const[fe,be]=eg(X,$,R);y({x:fe,y:be}),D=requestAnimationFrame(L)}const G={...H,nodeId:s,type:T,position:H.position},q=f.get(s);let J={inProgress:!0,isValid:null,from:Ka(q,G,ze.Left,!0),fromHandle:G,fromPosition:G.position,fromNode:q,to:X,toHandle:null,toPosition:t1[G.position],toNode:null,pointer:X};function W(){O=!0,E(J),_==null||_(e,{nodeId:s,handleId:a,handleType:T})}U===0&&W();function te(fe){if(!O){const{x:st,y:Rt}=Rr(fe),Yt=st-V,Pt=Rt-P;if(!(Yt*Yt+Pt*Pt>U*U))return;W()}if(!I()||!G){ce(fe);return}const be=M();X=Rr(fe,$),z=hI(Bo(X,be,!1,[1,1]),r,f,G),K||(L(),K=!0);const we=cN(fe,{handle:z,connectionMode:t,fromNodeId:s,fromHandleId:a,fromType:c?"target":"source",isValidConnection:w,doc:Z,lib:h,flowId:p,nodeLookup:f});Y=we.handleDomNode,C=we.connection,j=mI(!!z,we.isValid);const Ne=f.get(s),je=Ne?Ka(Ne,G,ze.Left,!0):J.from,$e={...J,from:je,isValid:j,to:we.toHandle&&j?Ws({x:we.toHandle.x,y:we.toHandle.y},be):X,toHandle:we.toHandle,toPosition:j&&we.toHandle?we.toHandle.position:t1[G.position],toNode:we.toHandle?f.get(we.toHandle.nodeId):null,pointer:X};E($e),J=$e}function ce(fe){if(!("touches"in fe&&fe.touches.length>0)){if(O){(z||Y)&&C&&j&&(N==null||N(C));const{inProgress:be,...we}=J,Ne={...we,toPosition:J.toHandle?J.toPosition:null};S==null||S(fe,Ne),o&&(k==null||k(fe,Ne))}x(),cancelAnimationFrame(D),K=!1,j=!1,C=null,Y=null,Z.removeEventListener("mousemove",te),Z.removeEventListener("mouseup",ce),Z.removeEventListener("touchmove",te),Z.removeEventListener("touchend",ce)}}Z.addEventListener("mousemove",te),Z.addEventListener("mouseup",ce),Z.addEventListener("touchmove",te),Z.addEventListener("touchend",ce)}function cN(e,{handle:t,connectionMode:r,fromNodeId:a,fromHandleId:s,fromType:o,doc:c,lib:d,flowId:f,isValidConnection:h=oN,nodeLookup:m}){const p=o==="target",y=t?c.querySelector(`.${d}-flow__handle[data-id="${f}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x,y:_}=Rr(e),N=c.elementFromPoint(x,_),S=N!=null&&N.classList.contains(`${d}-flow__handle`)?N:y,w={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const k=lN(void 0,S),E=S.getAttribute("data-nodeid"),M=S.getAttribute("data-handleid"),I=S.classList.contains("connectable"),R=S.classList.contains("connectableend");if(!E||!k)return w;const U={source:p?E:a,sourceHandle:p?M:s,target:p?a:E,targetHandle:p?s:M};w.connection=U;const Z=I&&R&&(r===Zs.Strict?p&&k==="source"||!p&&k==="target":E!==a||M!==s);w.isValid=Z&&h(U),w.toHandle=sN(E,k,M,m,r,!0)}return w}const up={onPointerDown:pI,isValid:cN};function gI({domNode:e,panZoom:t,getTransform:r,getViewScale:a}){const s=ir(e);function o({translateExtent:d,width:f,height:h,zoomStep:m=1,pannable:p=!0,zoomable:y=!0,inversePan:x=!1}){const _=E=>{if(E.sourceEvent.type!=="wheel"||!t)return;const M=r(),I=E.sourceEvent.ctrlKey&&So()?10:1,R=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*m,U=M[2]*Math.pow(2,R*I);t.scaleTo(U)};let N=[0,0];const S=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(N=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},w=E=>{const M=r();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!t)return;const I=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],R=[I[0]-N[0],I[1]-N[1]];N=I;const U=a()*Math.max(M[2],Math.log(M[2]))*(x?-1:1),B={x:M[0]-R[0]*U,y:M[1]-R[1]*U},Z=[[0,0],[f,h]];t.setViewportConstrained({x:B.x,y:B.y,zoom:M[2]},Z,d)},k=zE().on("start",S).on("zoom",p?w:null).on("zoom.wheel",y?_:null);s.call(k,{})}function c(){s.on("zoom",null)}return{update:o,destroy:c,pointer:Cr}}const ed=e=>({x:e.x,y:e.y,zoom:e.k}),_m=({x:e,y:t,zoom:r})=>Qu.translate(e,t).scale(r),Us=(e,t)=>e.target.closest(`.${t}`),uN=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),bI=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,wm=(e,t=0,r=bI,a=()=>{})=>{const s=typeof t=="number"&&t>0;return s||a(),s?e.transition().duration(t).ease(r).on("end",a):e},dN=e=>{const t=e.ctrlKey&&So()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function xI({zoomPanValues:e,noWheelClassName:t,d3Selection:r,d3Zoom:a,panOnScrollMode:s,panOnScrollSpeed:o,zoomOnPinch:c,onPanZoomStart:d,onPanZoom:f,onPanZoomEnd:h}){return m=>{if(Us(m,t))return m.ctrlKey&&m.preventDefault(),!1;m.preventDefault(),m.stopImmediatePropagation();const p=r.property("__zoom").k||1;if(m.ctrlKey&&c){const S=Cr(m),w=dN(m),k=p*Math.pow(2,w);a.scaleTo(r,k,S,m);return}const y=m.deltaMode===1?20:1;let x=s===Pa.Vertical?0:m.deltaX*y,_=s===Pa.Horizontal?0:m.deltaY*y;!So()&&m.shiftKey&&s!==Pa.Vertical&&(x=m.deltaY*y,_=0),a.translateBy(r,-(x/p)*o,-(_/p)*o,{internal:!0});const N=ed(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?f==null||f(m,N):(e.isPanScrolling=!0,d==null||d(m,N)),e.panScrollTimeout=setTimeout(()=>{h==null||h(m,N),e.isPanScrolling=!1},150)}}function yI({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:r}){return function(a,s){const o=a.type==="wheel",c=!t&&o&&!a.ctrlKey,d=Us(a,e);if(a.ctrlKey&&o&&d&&a.preventDefault(),c||d)return null;a.preventDefault(),r.call(this,a,s)}}function vI({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:r}){return a=>{var o,c,d;if((o=a.sourceEvent)!=null&&o.internal)return;const s=ed(a.transform);e.mouseButton=((c=a.sourceEvent)==null?void 0:c.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((d=a.sourceEvent)==null?void 0:d.type)==="mousedown"&&t(!0),r&&(r==null||r(a.sourceEvent,s))}}function _I({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:r,onTransformChange:a,onPanZoom:s}){return o=>{var c,d;e.usedRightMouseButton=!!(r&&uN(t,e.mouseButton??0)),(c=o.sourceEvent)!=null&&c.sync||a([o.transform.x,o.transform.y,o.transform.k]),s&&!((d=o.sourceEvent)!=null&&d.internal)&&(s==null||s(o.sourceEvent,ed(o.transform)))}}function wI({zoomPanValues:e,panOnDrag:t,panOnScroll:r,onDraggingChange:a,onPanZoomEnd:s,onPaneContextMenu:o}){return c=>{var d;if(!((d=c.sourceEvent)!=null&&d.internal)&&(e.isZoomingOrPanning=!1,o&&uN(t,e.mouseButton??0)&&!e.usedRightMouseButton&&c.sourceEvent&&o(c.sourceEvent),e.usedRightMouseButton=!1,a(!1),s)){const f=ed(c.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(c.sourceEvent,f)},r?150:0)}}}function EI({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:r,panOnDrag:a,panOnScroll:s,zoomOnDoubleClick:o,userSelectionActive:c,noWheelClassName:d,noPanClassName:f,lib:h,connectionInProgress:m}){return p=>{var S;const y=e||t,x=r&&p.ctrlKey,_=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(Us(p,`${h}-flow__node`)||Us(p,`${h}-flow__edge`)))return!0;if(!a&&!y&&!s&&!o&&!r||c||m&&!_||Us(p,d)&&_||Us(p,f)&&(!_||s&&_&&!e)||!r&&p.ctrlKey&&_)return!1;if(!r&&p.type==="touchstart"&&((S=p.touches)==null?void 0:S.length)>1)return p.preventDefault(),!1;if(!y&&!s&&!x&&_||!a&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(a)&&!a.includes(p.button)&&p.type==="mousedown")return!1;const N=Array.isArray(a)&&a.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||_)&&N}}function NI({domNode:e,minZoom:t,maxZoom:r,translateExtent:a,viewport:s,onPanZoom:o,onPanZoomStart:c,onPanZoomEnd:d,onDraggingChange:f}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},m=e.getBoundingClientRect();let p=[[0,0],[m.width,m.height]];const y=typeof ResizeObserver<"u"?new ResizeObserver(P=>{const T=P[0];T&&(p=[[0,0],[T.contentRect.width,T.contentRect.height]])}):null;y==null||y.observe(e);const x=zE().extent(()=>p).scaleExtent([t,r]).translateExtent(a),_=ir(e).call(x);M({x:s.x,y:s.y,zoom:Qs(s.zoom,t,r)},[[0,0],[m.width,m.height]],a);const N=_.on("wheel.zoom"),S=_.on("dblclick.zoom");x.wheelDelta(dN);async function w(P,T){return _?new Promise($=>{x==null||x.interpolate((T==null?void 0:T.interpolate)==="linear"?uo:gu).transform(wm(_,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>$(!0)),P)}):!1}function k({noWheelClassName:P,noPanClassName:T,onPaneContextMenu:$,userSelectionActive:O,panOnScroll:H,panOnDrag:X,panOnScrollMode:K,panOnScrollSpeed:C,preventScrolling:j,zoomOnPinch:Y,zoomOnScroll:L,zoomOnDoubleClick:G,zoomActivationKeyPressed:q,lib:Q,onTransformChange:J,connectionInProgress:W,paneClickDistance:te,selectionOnDrag:ce}){O&&!h.isZoomingOrPanning&&E();const fe=H&&!q&&!O;x.clickDistance(ce?1/0:!Or(te)||te<0?0:te);const be=fe?xI({zoomPanValues:h,noWheelClassName:P,d3Selection:_,d3Zoom:x,panOnScrollMode:K,panOnScrollSpeed:C,zoomOnPinch:Y,onPanZoomStart:c,onPanZoom:o,onPanZoomEnd:d}):yI({noWheelClassName:P,preventScrolling:j,d3ZoomHandler:N});_.on("wheel.zoom",be,{passive:!1});const we=vI({zoomPanValues:h,onDraggingChange:f,onPanZoomStart:c});x.on("start",we);const Ne=_I({zoomPanValues:h,panOnDrag:X,onPaneContextMenu:!!$,onPanZoom:o,onTransformChange:J});x.on("zoom",Ne);const je=wI({zoomPanValues:h,panOnDrag:X,panOnScroll:H,onPaneContextMenu:$,onPanZoomEnd:d,onDraggingChange:f});x.on("end",je);const $e=EI({zoomActivationKeyPressed:q,panOnDrag:X,zoomOnScroll:L,panOnScroll:H,zoomOnDoubleClick:G,zoomOnPinch:Y,userSelectionActive:O,noPanClassName:T,noWheelClassName:P,lib:Q,connectionInProgress:W});x.filter($e),G?_.on("dblclick.zoom",S):_.on("dblclick.zoom",null)}function E(){x.on("zoom",null)}async function M(P,T,$){const O=_m(P),H=x==null?void 0:x.constrain()(O,T,$);return H&&await w(H),H}async function I(P,T){const $=_m(P);return await w($,T),$}function R(P){if(_){const T=_m(P),$=_.property("__zoom");($.k!==P.zoom||$.x!==P.x||$.y!==P.y)&&(x==null||x.transform(_,T,null,{sync:!0}))}}function U(){const P=_?LE(_.node()):{x:0,y:0,k:1};return{x:P.x,y:P.y,zoom:P.k}}async function B(P,T){return _?new Promise($=>{x==null||x.interpolate((T==null?void 0:T.interpolate)==="linear"?uo:gu).scaleTo(wm(_,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>$(!0)),P)}):!1}async function Z(P,T){return _?new Promise($=>{x==null||x.interpolate((T==null?void 0:T.interpolate)==="linear"?uo:gu).scaleBy(wm(_,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>$(!0)),P)}):!1}function D(P){x==null||x.scaleExtent(P)}function z(P){x==null||x.translateExtent(P)}function V(P){const T=!Or(P)||P<0?0:P;x==null||x.clickDistance(T)}return{update:k,destroy:E,setViewport:I,setViewportConstrained:M,getViewport:U,scaleTo:B,scaleBy:Z,setScaleExtent:D,setTranslateExtent:z,syncViewport:R,setClickDistance:V}}var Js;(function(e){e.Line="line",e.Handle="handle"})(Js||(Js={}));function SI({width:e,prevWidth:t,height:r,prevHeight:a,affectsX:s,affectsY:o}){const c=e-t,d=r-a,f=[c>0?1:c<0?-1:0,d>0?1:d<0?-1:0];return c&&s&&(f[0]=f[0]*-1),d&&o&&(f[1]=f[1]*-1),f}function m1(e){const t=e.includes("right")||e.includes("left"),r=e.includes("bottom")||e.includes("top"),a=e.includes("left"),s=e.includes("top");return{isHorizontal:t,isVertical:r,affectsX:a,affectsY:s}}function aa(e,t){return Math.max(0,t-e)}function sa(e,t){return Math.max(0,e-t)}function cu(e,t,r){return Math.max(0,t-e,e-r)}function p1(e,t){return e?!t:t}function kI(e,t,r,a,s,o,c,d){let{affectsX:f,affectsY:h}=t;const{isHorizontal:m,isVertical:p}=t,y=m&&p,{xSnapped:x,ySnapped:_}=r,{minWidth:N,maxWidth:S,minHeight:w,maxHeight:k}=a,{x:E,y:M,width:I,height:R,aspectRatio:U}=e;let B=Math.floor(m?x-e.pointerX:0),Z=Math.floor(p?_-e.pointerY:0);const D=I+(f?-B:B),z=R+(h?-Z:Z),V=-o[0]*I,P=-o[1]*R;let T=cu(D,N,S),$=cu(z,w,k);if(c){let X=0,K=0;f&&B<0?X=aa(E+B+V,c[0][0]):!f&&B>0&&(X=sa(E+D+V,c[1][0])),h&&Z<0?K=aa(M+Z+P,c[0][1]):!h&&Z>0&&(K=sa(M+z+P,c[1][1])),T=Math.max(T,X),$=Math.max($,K)}if(d){let X=0,K=0;f&&B>0?X=sa(E+B,d[0][0]):!f&&B<0&&(X=aa(E+D,d[1][0])),h&&Z>0?K=sa(M+Z,d[0][1]):!h&&Z<0&&(K=aa(M+z,d[1][1])),T=Math.max(T,X),$=Math.max($,K)}if(s){if(m){const X=cu(D/U,w,k)*U;if(T=Math.max(T,X),c){let K=0;!f&&!h||f&&!h&&y?K=sa(M+P+D/U,c[1][1])*U:K=aa(M+P+(f?B:-B)/U,c[0][1])*U,T=Math.max(T,K)}if(d){let K=0;!f&&!h||f&&!h&&y?K=aa(M+D/U,d[1][1])*U:K=sa(M+(f?B:-B)/U,d[0][1])*U,T=Math.max(T,K)}}if(p){const X=cu(z*U,N,S)/U;if($=Math.max($,X),c){let K=0;!f&&!h||h&&!f&&y?K=sa(E+z*U+V,c[1][0])/U:K=aa(E+(h?Z:-Z)*U+V,c[0][0])/U,$=Math.max($,K)}if(d){let K=0;!f&&!h||h&&!f&&y?K=aa(E+z*U,d[1][0])/U:K=sa(E+(h?Z:-Z)*U,d[0][0])/U,$=Math.max($,K)}}}Z=Z+(Z<0?$:-$),B=B+(B<0?T:-T),s&&(y?D>z*U?Z=(p1(f,h)?-B:B)/U:B=(p1(f,h)?-Z:Z)*U:m?(Z=B/U,h=f):(B=Z*U,f=h));const O=f?E+B:E,H=h?M+Z:M;return{width:I+(f?-B:B),height:R+(h?-Z:Z),x:o[0]*B*(f?-1:1)+O,y:o[1]*Z*(h?-1:1)+H}}const fN={width:0,height:0,x:0,y:0},CI={...fN,pointerX:0,pointerY:0,aspectRatio:1};function TI(e,t,r){const a=t.position.x+e.position.x,s=t.position.y+e.position.y,o=e.measured.width??0,c=e.measured.height??0,d=r[0]*o,f=r[1]*c;return[[a-d,s-f],[a+o-d,s+c-f]]}function AI({domNode:e,nodeId:t,getStoreItems:r,onChange:a,onEnd:s}){const o=ir(e);let c={controlDirection:m1("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function d({controlPosition:h,boundaries:m,keepAspectRatio:p,resizeDirection:y,onResizeStart:x,onResize:_,onResizeEnd:N,shouldResize:S}){let w={...fN},k={...CI};c={boundaries:m,resizeDirection:y,keepAspectRatio:p,controlDirection:m1(h)};let E,M=null,I=[],R,U,B,Z=!1;const D=_E().on("start",z=>{const{nodeLookup:V,transform:P,snapGrid:T,snapToGrid:$,nodeOrigin:O,paneDomNode:H}=r();if(E=V.get(t),!E)return;M=(H==null?void 0:H.getBoundingClientRect())??null;const{xSnapped:X,ySnapped:K}=fo(z.sourceEvent,{transform:P,snapGrid:T,snapToGrid:$,containerBounds:M});w={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},k={...w,pointerX:X,pointerY:K,aspectRatio:w.width/w.height},R=void 0,U=Xa(E.extent)?E.extent:void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(R=V.get(E.parentId)),R&&E.extent==="parent"&&(U=[[0,0],[R.measured.width,R.measured.height]]),I=[],B=void 0;for(const[C,j]of V)if(j.parentId===t&&(I.push({id:C,position:{...j.position},extent:j.extent}),j.extent==="parent"||j.expandParent)){const Y=TI(j,E,j.origin??O);B?B=[[Math.min(Y[0][0],B[0][0]),Math.min(Y[0][1],B[0][1])],[Math.max(Y[1][0],B[1][0]),Math.max(Y[1][1],B[1][1])]]:B=Y}x==null||x(z,{...w})}).on("drag",z=>{const{transform:V,snapGrid:P,snapToGrid:T,nodeOrigin:$}=r(),O=fo(z.sourceEvent,{transform:V,snapGrid:P,snapToGrid:T,containerBounds:M}),H=[];if(!E)return;const{x:X,y:K,width:C,height:j}=w,Y={},L=E.origin??$,{width:G,height:q,x:Q,y:J}=kI(k,c.controlDirection,O,c.boundaries,c.keepAspectRatio,L,U,B),W=G!==C,te=q!==j,ce=Q!==X&&W,fe=J!==K&&te;if(!ce&&!fe&&!W&&!te)return;if((ce||fe||L[0]===1||L[1]===1)&&(Y.x=ce?Q:w.x,Y.y=fe?J:w.y,w.x=Y.x,w.y=Y.y,I.length>0)){const je=Q-X,$e=J-K;for(const st of I)st.position={x:st.position.x-je+L[0]*(G-C),y:st.position.y-$e+L[1]*(q-j)},H.push(st)}if((W||te)&&(Y.width=W&&(!c.resizeDirection||c.resizeDirection==="horizontal")?G:w.width,Y.height=te&&(!c.resizeDirection||c.resizeDirection==="vertical")?q:w.height,w.width=Y.width,w.height=Y.height),R&&E.expandParent){const je=L[0]*(Y.width??0);Y.x&&Y.x{Z&&(N==null||N(z,{...w}),s==null||s({...w}),Z=!1)});o.call(D)}function f(){o.on(".drag",null)}return{update:d,destroy:f}}var Em={exports:{}},Nm={},Sm={exports:{}},km={};/** * @license React * use-sync-external-store-shim.production.js * @@ -446,7 +446,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Ht=ye,ft=Le),Qe===void * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var g1;function CI(){if(g1)return km;g1=1;var e=Co();function t(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var r=typeof Object.is=="function"?Object.is:t,a=e.useState,s=e.useEffect,o=e.useLayoutEffect,c=e.useDebugValue;function d(p,y){var x=y(),_=a({inst:{value:x,getSnapshot:y}}),N=_[0].inst,S=_[1];return o(function(){N.value=x,N.getSnapshot=y,f(N)&&S({inst:N})},[p,x,y]),s(function(){return f(N)&&S({inst:N}),p(function(){f(N)&&S({inst:N})})},[p]),c(x),x}function f(p){var y=p.getSnapshot;p=p.value;try{var x=y();return!r(p,x)}catch{return!0}}function h(p,y){return y()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return km.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,km}var b1;function AI(){return b1||(b1=1,Sm.exports=CI()),Sm.exports}/** + */var g1;function MI(){if(g1)return km;g1=1;var e=To();function t(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var r=typeof Object.is=="function"?Object.is:t,a=e.useState,s=e.useEffect,o=e.useLayoutEffect,c=e.useDebugValue;function d(p,y){var x=y(),_=a({inst:{value:x,getSnapshot:y}}),N=_[0].inst,S=_[1];return o(function(){N.value=x,N.getSnapshot=y,f(N)&&S({inst:N})},[p,x,y]),s(function(){return f(N)&&S({inst:N}),p(function(){f(N)&&S({inst:N})})},[p]),c(x),x}function f(p){var y=p.getSnapshot;p=p.value;try{var x=y();return!r(p,x)}catch{return!0}}function h(p,y){return y()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return km.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,km}var b1;function OI(){return b1||(b1=1,Sm.exports=MI()),Sm.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * @@ -454,34 +454,34 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Ht=ye,ft=Le),Qe===void * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var x1;function MI(){if(x1)return Nm;x1=1;var e=Co(),t=AI();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var a=typeof Object.is=="function"?Object.is:r,s=t.useSyncExternalStore,o=e.useRef,c=e.useEffect,d=e.useMemo,f=e.useDebugValue;return Nm.useSyncExternalStoreWithSelector=function(h,m,p,y,x){var _=o(null);if(_.current===null){var N={hasValue:!1,value:null};_.current=N}else N=_.current;_=d(function(){function w(R){if(!k){if(k=!0,E=R,R=y(R),x!==void 0&&N.hasValue){var U=N.value;if(x(U,R))return M=U}return M=R}if(U=M,a(E,R))return U;var B=y(R);return x!==void 0&&x(U,B)?(E=R,U):(E=R,M=B)}var k=!1,E,M,I=p===void 0?null:p;return[function(){return w(m())},I===null?void 0:function(){return w(I())}]},[m,p,y,x]);var S=s(h,_[0],_[1]);return c(function(){N.hasValue=!0,N.value=S},[S]),f(S),S},Nm}var y1;function OI(){return y1||(y1=1,Em.exports=MI()),Em.exports}var RI=OI();const DI=To(RI),jI={},v1=e=>{let t;const r=new Set,a=(m,p)=>{const y=typeof m=="function"?m(t):m;if(!Object.is(y,t)){const x=t;t=p??(typeof y!="object"||y===null)?y:Object.assign({},t,y),r.forEach(_=>_(t,x))}},s=()=>t,f={setState:a,getState:s,getInitialState:()=>h,subscribe:m=>(r.add(m),()=>r.delete(m)),destroy:()=>{(jI?"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."),r.clear()}},h=t=e(a,s,f);return f},LI=e=>e?v1(e):v1,{useDebugValue:zI}=ua,{useSyncExternalStoreWithSelector:II}=DI,BI=e=>e;function fN(e,t=BI,r){const a=II(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return zI(a),a}const _1=(e,t)=>{const r=LI(e),a=(s,o=t)=>fN(r,s,o);return Object.assign(a,r),a},UI=(e,t)=>e?_1(e,t):_1;function qt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,s]of e)if(!Object.is(s,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(const a of r)if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1;return!0}N_();const td=ee.createContext(null),HI=td.Provider,hN=Lr.error001("react");function dt(e,t){const r=ee.useContext(td);if(r===null)throw new Error(hN);return fN(r,e,t)}function Lt(){const e=ee.useContext(td);if(e===null)throw new Error(hN);return ee.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const w1={display:"none"},$I={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},mN="react-flow__node-desc",pN="react-flow__edge-desc",qI="react-flow__aria-live",PI=e=>e.ariaLiveMessage,FI=e=>e.ariaLabelConfig;function GI({rfId:e}){const t=dt(PI);return g.jsx("div",{id:`${qI}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:$I,children:t})}function VI({rfId:e,disableKeyboardA11y:t}){const r=dt(FI);return g.jsxs(g.Fragment,{children:[g.jsx("div",{id:`${mN}-${e}`,style:w1,children:t?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),g.jsx("div",{id:`${pN}-${e}`,style:w1,children:r["edge.a11yDescription.default"]}),!t&&g.jsx(GI,{rfId:e})]})}const nd=ee.forwardRef(({position:e="top-left",children:t,className:r,style:a,...s},o)=>{const c=`${e}`.split("-");return g.jsx("div",{className:ln(["react-flow__panel",r,...c]),style:a,ref:o,...s,children:t})});nd.displayName="Panel";const E1="https://reactflow.dev?utm_source=attribution";function YI({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:g.jsx(nd,{position:t,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${E1}`,children:g.jsx("a",{href:E1,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const XI=e=>{const t=[],r=[];for(const[,a]of e.nodeLookup)a.selected&&t.push(a.internals.userNode);for(const[,a]of e.edgeLookup)a.selected&&r.push(a);return{selectedNodes:t,selectedEdges:r}},uu=e=>e.id;function KI(e,t){return qt(e.selectedNodes.map(uu),t.selectedNodes.map(uu))&&qt(e.selectedEdges.map(uu),t.selectedEdges.map(uu))}function ZI({onSelectionChange:e}){const t=Lt(),{selectedNodes:r,selectedEdges:a}=dt(XI,KI);return ee.useEffect(()=>{const s={nodes:r,edges:a};e==null||e(s),t.getState().onSelectionChangeHandlers.forEach(o=>o(s))},[r,a,e]),null}const QI=e=>!!e.onSelectionChangeHandlers;function WI({onSelectionChange:e}){const t=dt(QI);return e||t?g.jsx(ZI,{onSelectionChange:e}):null}const gN=[0,0],JI={x:0,y:0,zoom:1},e8=["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"],N1=[...e8,"rfId"],t8=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}),S1={translateExtent:wo,nodeOrigin:gN,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function n8(e){const{setNodes:t,setEdges:r,setMinZoom:a,setMaxZoom:s,setTranslateExtent:o,setNodeExtent:c,reset:d,setDefaultNodesAndEdges:f}=dt(t8,qt),h=Lt();ee.useEffect(()=>(f(e.defaultNodes,e.defaultEdges),()=>{m.current=S1,d()}),[]);const m=ee.useRef(S1);return ee.useEffect(()=>{for(const p of N1){const y=e[p],x=m.current[p];y!==x&&(typeof e[p]>"u"||(p==="nodes"?t(y):p==="edges"?r(y):p==="minZoom"?a(y):p==="maxZoom"?s(y):p==="translateExtent"?o(y):p==="nodeExtent"?c(y):p==="ariaLabelConfig"?h.setState({ariaLabelConfig:Hz(y)}):p==="fitView"?h.setState({fitViewQueued:y}):p==="fitViewOptions"?h.setState({fitViewOptions:y}):h.setState({[p]:y})))}m.current=e},N1.map(p=>e[p])),null}function k1(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function r8(e){var a;const[t,r]=ee.useState(e==="system"?null:e);return ee.useEffect(()=>{if(e!=="system"){r(e);return}const s=k1(),o=()=>r(s!=null&&s.matches?"dark":"light");return o(),s==null||s.addEventListener("change",o),()=>{s==null||s.removeEventListener("change",o)}},[e]),t!==null?t:(a=k1())!=null&&a.matches?"dark":"light"}const T1=typeof document<"u"?document:null;function ko(e=null,t={target:T1,actInsideInputWithModifier:!0}){const[r,a]=ee.useState(!1),s=ee.useRef(!1),o=ee.useRef(new Set([])),[c,d]=ee.useMemo(()=>{if(e!==null){const h=(Array.isArray(e)?e:[e]).filter(p=>typeof p=="string").map(p=>p.replace("+",` + */var x1;function RI(){if(x1)return Nm;x1=1;var e=To(),t=OI();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var a=typeof Object.is=="function"?Object.is:r,s=t.useSyncExternalStore,o=e.useRef,c=e.useEffect,d=e.useMemo,f=e.useDebugValue;return Nm.useSyncExternalStoreWithSelector=function(h,m,p,y,x){var _=o(null);if(_.current===null){var N={hasValue:!1,value:null};_.current=N}else N=_.current;_=d(function(){function w(R){if(!k){if(k=!0,E=R,R=y(R),x!==void 0&&N.hasValue){var U=N.value;if(x(U,R))return M=U}return M=R}if(U=M,a(E,R))return U;var B=y(R);return x!==void 0&&x(U,B)?(E=R,U):(E=R,M=B)}var k=!1,E,M,I=p===void 0?null:p;return[function(){return w(m())},I===null?void 0:function(){return w(I())}]},[m,p,y,x]);var S=s(h,_[0],_[1]);return c(function(){N.hasValue=!0,N.value=S},[S]),f(S),S},Nm}var y1;function DI(){return y1||(y1=1,Em.exports=RI()),Em.exports}var jI=DI();const LI=Co(jI),zI={},v1=e=>{let t;const r=new Set,a=(m,p)=>{const y=typeof m=="function"?m(t):m;if(!Object.is(y,t)){const x=t;t=p??(typeof y!="object"||y===null)?y:Object.assign({},t,y),r.forEach(_=>_(t,x))}},s=()=>t,f={setState:a,getState:s,getInitialState:()=>h,subscribe:m=>(r.add(m),()=>r.delete(m)),destroy:()=>{(zI?"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."),r.clear()}},h=t=e(a,s,f);return f},II=e=>e?v1(e):v1,{useDebugValue:BI}=ua,{useSyncExternalStoreWithSelector:UI}=LI,HI=e=>e;function hN(e,t=HI,r){const a=UI(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return BI(a),a}const _1=(e,t)=>{const r=II(e),a=(s,o=t)=>hN(r,s,o);return Object.assign(a,r),a},$I=(e,t)=>e?_1(e,t):_1;function qt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,s]of e)if(!Object.is(s,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(const a of r)if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1;return!0}N_();const td=ee.createContext(null),qI=td.Provider,mN=Lr.error001("react");function dt(e,t){const r=ee.useContext(td);if(r===null)throw new Error(mN);return hN(r,e,t)}function Lt(){const e=ee.useContext(td);if(e===null)throw new Error(mN);return ee.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const w1={display:"none"},PI={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},pN="react-flow__node-desc",gN="react-flow__edge-desc",FI="react-flow__aria-live",GI=e=>e.ariaLiveMessage,VI=e=>e.ariaLabelConfig;function YI({rfId:e}){const t=dt(GI);return g.jsx("div",{id:`${FI}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:PI,children:t})}function XI({rfId:e,disableKeyboardA11y:t}){const r=dt(VI);return g.jsxs(g.Fragment,{children:[g.jsx("div",{id:`${pN}-${e}`,style:w1,children:t?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),g.jsx("div",{id:`${gN}-${e}`,style:w1,children:r["edge.a11yDescription.default"]}),!t&&g.jsx(YI,{rfId:e})]})}const nd=ee.forwardRef(({position:e="top-left",children:t,className:r,style:a,...s},o)=>{const c=`${e}`.split("-");return g.jsx("div",{className:ln(["react-flow__panel",r,...c]),style:a,ref:o,...s,children:t})});nd.displayName="Panel";const E1="https://reactflow.dev?utm_source=attribution";function KI({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:g.jsx(nd,{position:t,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${E1}`,children:g.jsx("a",{href:E1,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const ZI=e=>{const t=[],r=[];for(const[,a]of e.nodeLookup)a.selected&&t.push(a.internals.userNode);for(const[,a]of e.edgeLookup)a.selected&&r.push(a);return{selectedNodes:t,selectedEdges:r}},uu=e=>e.id;function QI(e,t){return qt(e.selectedNodes.map(uu),t.selectedNodes.map(uu))&&qt(e.selectedEdges.map(uu),t.selectedEdges.map(uu))}function WI({onSelectionChange:e}){const t=Lt(),{selectedNodes:r,selectedEdges:a}=dt(ZI,QI);return ee.useEffect(()=>{const s={nodes:r,edges:a};e==null||e(s),t.getState().onSelectionChangeHandlers.forEach(o=>o(s))},[r,a,e]),null}const JI=e=>!!e.onSelectionChangeHandlers;function e8({onSelectionChange:e}){const t=dt(JI);return e||t?g.jsx(WI,{onSelectionChange:e}):null}const bN=[0,0],t8={x:0,y:0,zoom:1},n8=["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"],N1=[...n8,"rfId"],r8=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}),S1={translateExtent:wo,nodeOrigin:bN,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function i8(e){const{setNodes:t,setEdges:r,setMinZoom:a,setMaxZoom:s,setTranslateExtent:o,setNodeExtent:c,reset:d,setDefaultNodesAndEdges:f}=dt(r8,qt),h=Lt();ee.useEffect(()=>(f(e.defaultNodes,e.defaultEdges),()=>{m.current=S1,d()}),[]);const m=ee.useRef(S1);return ee.useEffect(()=>{for(const p of N1){const y=e[p],x=m.current[p];y!==x&&(typeof e[p]>"u"||(p==="nodes"?t(y):p==="edges"?r(y):p==="minZoom"?a(y):p==="maxZoom"?s(y):p==="translateExtent"?o(y):p==="nodeExtent"?c(y):p==="ariaLabelConfig"?h.setState({ariaLabelConfig:qz(y)}):p==="fitView"?h.setState({fitViewQueued:y}):p==="fitViewOptions"?h.setState({fitViewOptions:y}):h.setState({[p]:y})))}m.current=e},N1.map(p=>e[p])),null}function k1(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function a8(e){var a;const[t,r]=ee.useState(e==="system"?null:e);return ee.useEffect(()=>{if(e!=="system"){r(e);return}const s=k1(),o=()=>r(s!=null&&s.matches?"dark":"light");return o(),s==null||s.addEventListener("change",o),()=>{s==null||s.removeEventListener("change",o)}},[e]),t!==null?t:(a=k1())!=null&&a.matches?"dark":"light"}const C1=typeof document<"u"?document:null;function ko(e=null,t={target:C1,actInsideInputWithModifier:!0}){const[r,a]=ee.useState(!1),s=ee.useRef(!1),o=ee.useRef(new Set([])),[c,d]=ee.useMemo(()=>{if(e!==null){const h=(Array.isArray(e)?e:[e]).filter(p=>typeof p=="string").map(p=>p.replace("+",` `).replace(` `,` +`).split(` -`)),m=h.reduce((p,y)=>p.concat(...y),[]);return[h,m]}return[[],[]]},[e]);return ee.useEffect(()=>{const f=(t==null?void 0:t.target)??T1,h=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const m=x=>{var S,w;if(s.current=x.ctrlKey||x.metaKey||x.shiftKey||x.altKey,(!s.current||s.current&&!h)&&KE(x))return!1;const N=A1(x.code,d);if(o.current.add(x[N]),C1(c,o.current,!1)){const k=((w=(S=x.composedPath)==null?void 0:S.call(x))==null?void 0:w[0])||x.target,E=(k==null?void 0:k.nodeName)==="BUTTON"||(k==null?void 0:k.nodeName)==="A";t.preventDefault!==!1&&(s.current||!E)&&x.preventDefault(),a(!0)}},p=x=>{const _=A1(x.code,d);C1(c,o.current,!0)?(a(!1),o.current.clear()):o.current.delete(x[_]),x.key==="Meta"&&o.current.clear(),s.current=!1},y=()=>{o.current.clear(),a(!1)};return f==null||f.addEventListener("keydown",m),f==null||f.addEventListener("keyup",p),window.addEventListener("blur",y),window.addEventListener("contextmenu",y),()=>{f==null||f.removeEventListener("keydown",m),f==null||f.removeEventListener("keyup",p),window.removeEventListener("blur",y),window.removeEventListener("contextmenu",y)}}},[e,a]),r}function C1(e,t,r){return e.filter(a=>r||a.length===t.size).some(a=>a.every(s=>t.has(s)))}function A1(e,t){return t.includes(e)?"code":"key"}const i8=()=>{const e=Lt();return ee.useMemo(()=>({zoomIn:async t=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1/1.2,t):!1},zoomTo:async(t,r)=>{const{panZoom:a}=e.getState();return a?a.scaleTo(t,r):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,r)=>{const{transform:[a,s,o],panZoom:c}=e.getState();return c?(await c.setViewport({x:t.x??a,y:t.y??s,zoom:t.zoom??o},r),!0):!1},getViewport:()=>{const[t,r,a]=e.getState().transform;return{x:t,y:r,zoom:a}},setCenter:async(t,r,a)=>e.getState().setCenter(t,r,a),fitBounds:async(t,r)=>{const{width:a,height:s,minZoom:o,maxZoom:c,panZoom:d}=e.getState(),f=tg(t,a,s,o,c,(r==null?void 0:r.padding)??.1);return d?(await d.setViewport(f,{duration:r==null?void 0:r.duration,ease:r==null?void 0:r.ease,interpolate:r==null?void 0:r.interpolate}),!0):!1},screenToFlowPosition:(t,r={})=>{const{transform:a,snapGrid:s,snapToGrid:o,domNode:c}=e.getState();if(!c)return t;const{x:d,y:f}=c.getBoundingClientRect(),h={x:t.x-d,y:t.y-f},m=r.snapGrid??s,p=r.snapToGrid??o;return Bo(h,a,p,m)},flowToScreenPosition:t=>{const{transform:r,domNode:a}=e.getState();if(!a)return t;const{x:s,y:o}=a.getBoundingClientRect(),c=Ws(t,r);return{x:c.x+s,y:c.y+o}}}),[])};function bN(e,t){const r=[],a=new Map,s=[];for(const o of e)if(o.type==="add"){s.push(o);continue}else if(o.type==="remove"||o.type==="replace")a.set(o.id,[o]);else{const c=a.get(o.id);c?c.push(o):a.set(o.id,[o])}for(const o of t){const c=a.get(o.id);if(!c){r.push(o);continue}if(c[0].type==="remove")continue;if(c[0].type==="replace"){r.push({...c[0].item});continue}const d={...o};for(const f of c)a8(f,d);r.push(d)}return s.length&&s.forEach(o=>{o.index!==void 0?r.splice(o.index,0,{...o.item}):r.push({...o.item})}),r}function a8(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function xN(e,t){return bN(e,t)}function yN(e,t){return bN(e,t)}function Ua(e,t){return{id:e,type:"select",selected:t}}function Hs(e,t=new Set,r=!1){const a=[];for(const[s,o]of e){const c=t.has(s);!(o.selected===void 0&&!c)&&o.selected!==c&&(r&&(o.selected=c),a.push(Ua(o.id,c)))}return a}function M1({items:e=[],lookup:t}){var s;const r=[],a=new Map(e.map(o=>[o.id,o]));for(const[o,c]of e.entries()){const d=t.get(c.id),f=((s=d==null?void 0:d.internals)==null?void 0:s.userNode)??d;f!==void 0&&f!==c&&r.push({id:c.id,item:c,type:"replace"}),f===void 0&&r.push({item:c,type:"add",index:o})}for(const[o]of t)a.get(o)===void 0&&r.push({id:o,type:"remove"});return r}function O1(e){return{id:e.id,type:"remove"}}const s8=GE();function l8(e,t,r={}){return Vz(e,t,{...r,onError:r.onError??s8})}const R1=e=>Oz(e),o8=e=>HE(e);function vN(e){return ee.forwardRef(e)}const _N=typeof window<"u"?ee.useLayoutEffect:ee.useEffect;function D1(e){const[t,r]=ee.useState(BigInt(0)),[a]=ee.useState(()=>c8(()=>r(s=>s+BigInt(1))));return _N(()=>{const s=a.get();s.length&&(e(s),a.reset())},[t]),a}function c8(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:r=>{t.push(r),e()}}}const wN=ee.createContext(null);function u8({children:e}){const t=Lt(),r=ee.useCallback(d=>{const{nodes:f=[],setNodes:h,hasDefaultNodes:m,onNodesChange:p,nodeLookup:y,fitViewQueued:x,onNodesChangeMiddlewareMap:_}=t.getState();let N=f;for(const w of d)N=typeof w=="function"?w(N):w;let S=M1({items:N,lookup:y});for(const w of _.values())S=w(S);m&&h(N),S.length>0?p==null||p(S):x&&window.requestAnimationFrame(()=>{const{fitViewQueued:w,nodes:k,setNodes:E}=t.getState();w&&E(k)})},[]),a=D1(r),s=ee.useCallback(d=>{const{edges:f=[],setEdges:h,hasDefaultEdges:m,onEdgesChange:p,edgeLookup:y}=t.getState();let x=f;for(const _ of d)x=typeof _=="function"?_(x):_;m?h(x):p&&p(M1({items:x,lookup:y}))},[]),o=D1(s),c=ee.useMemo(()=>({nodeQueue:a,edgeQueue:o}),[]);return g.jsx(wN.Provider,{value:c,children:e})}function d8(){const e=ee.useContext(wN);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const f8=e=>!!e.panZoom;function Uo(){const e=i8(),t=Lt(),r=d8(),a=dt(f8),s=ee.useMemo(()=>{const o=p=>t.getState().nodeLookup.get(p),c=p=>{r.nodeQueue.push(p)},d=p=>{r.edgeQueue.push(p)},f=p=>{var w,k;const{nodeLookup:y,nodeOrigin:x}=t.getState(),_=R1(p)?p:y.get(p.id),N=_.parentId?YE(_.position,_.measured,_.parentId,y,x):_.position,S={..._,position:N,width:((w=_.measured)==null?void 0:w.width)??_.width,height:((k=_.measured)==null?void 0:k.height)??_.height};return No(S)},h=(p,y,x={replace:!1})=>{c(_=>_.map(N=>{if(N.id===p){const S=typeof y=="function"?y(N):y;return x.replace&&R1(S)?S:{...N,...S}}return N}))},m=(p,y,x={replace:!1})=>{d(_=>_.map(N=>{if(N.id===p){const S=typeof y=="function"?y(N):y;return x.replace&&o8(S)?S:{...N,...S}}return N}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>{var y;return(y=o(p))==null?void 0:y.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:p=[]}=t.getState();return p.map(y=>({...y}))},getEdge:p=>t.getState().edgeLookup.get(p),setNodes:c,setEdges:d,addNodes:p=>{const y=Array.isArray(p)?p:[p];r.nodeQueue.push(x=>[...x,...y])},addEdges:p=>{const y=Array.isArray(p)?p:[p];r.edgeQueue.push(x=>[...x,...y])},toObject:()=>{const{nodes:p=[],edges:y=[],transform:x}=t.getState(),[_,N,S]=x;return{nodes:p.map(w=>({...w})),edges:y.map(w=>({...w})),viewport:{x:_,y:N,zoom:S}}},deleteElements:async({nodes:p=[],edges:y=[]})=>{const{nodes:x,edges:_,onNodesDelete:N,onEdgesDelete:S,triggerNodeChanges:w,triggerEdgeChanges:k,onDelete:E,onBeforeDelete:M}=t.getState(),{nodes:I,edges:R}=await zz({nodesToRemove:p,edgesToRemove:y,nodes:x,edges:_,onBeforeDelete:M}),U=R.length>0,B=I.length>0;if(U){const Z=R.map(O1);S==null||S(R),k(Z)}if(B){const Z=I.map(O1);N==null||N(I),w(Z)}return(B||U)&&(E==null||E({nodes:I,edges:R})),{deletedNodes:I,deletedEdges:R}},getIntersectingNodes:(p,y=!0,x)=>{const _=r1(p),N=_?p:f(p),S=x!==void 0;return N?(x||t.getState().nodes).filter(w=>{const k=t.getState().nodeLookup.get(w.id);if(k&&!_&&(w.id===p.id||!k.internals.positionAbsolute))return!1;const E=No(S?w:k),M=ju(E,N);return y&&M>0||M>=E.width*E.height||M>=N.width*N.height}):[]},isNodeIntersecting:(p,y,x=!0)=>{const N=r1(p)?p:f(p);if(!N)return!1;const S=ju(N,y);return x&&S>0||S>=y.width*y.height||S>=N.width*N.height},updateNode:h,updateNodeData:(p,y,x={replace:!1})=>{h(p,_=>{const N=typeof y=="function"?y(_):y;return x.replace?{..._,data:N}:{..._,data:{..._.data,...N}}},x)},updateEdge:m,updateEdgeData:(p,y,x={replace:!1})=>{m(p,_=>{const N=typeof y=="function"?y(_):y;return x.replace?{..._,data:N}:{..._,data:{..._.data,...N}}},x)},getNodesBounds:p=>{const{nodeLookup:y,nodeOrigin:x}=t.getState();return Rz(p,{nodeLookup:y,nodeOrigin:x})},getHandleConnections:({type:p,id:y,nodeId:x})=>{var _;return Array.from(((_=t.getState().connectionLookup.get(`${x}-${p}${y?`-${y}`:""}`))==null?void 0:_.values())??[])},getNodeConnections:({type:p,handleId:y,nodeId:x})=>{var _;return Array.from(((_=t.getState().connectionLookup.get(`${x}${p?y?`-${p}-${y}`:`-${p}`:""}`))==null?void 0:_.values())??[])},fitView:async p=>{const y=t.getState().fitViewResolver??Uz();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:y}),r.nodeQueue.push(x=>[...x]),y.promise}}},[]);return ee.useMemo(()=>({...s,...e,viewportInitialized:a}),[a])}const j1=e=>e.selected,h8=typeof window<"u"?window:void 0;function m8({deleteKeyCode:e,multiSelectionKeyCode:t}){const r=Lt(),{deleteElements:a}=Uo(),s=ko(e,{actInsideInputWithModifier:!1}),o=ko(t,{target:h8});ee.useEffect(()=>{if(s){const{edges:c,nodes:d}=r.getState();a({nodes:d.filter(j1),edges:c.filter(j1)}),r.setState({nodesSelectionActive:!1})}},[s]),ee.useEffect(()=>{r.setState({multiSelectionActive:o})},[o])}function p8(e){const t=Lt();ee.useEffect(()=>{const r=()=>{var s,o,c,d;if(!e.current||!(((o=(s=e.current).checkVisibility)==null?void 0:o.call(s))??!0))return!1;const a=ng(e.current);(a.height===0||a.width===0)&&((d=(c=t.getState()).onError)==null||d.call(c,"004",Lr.error004())),t.setState({width:a.width||500,height:a.height||500})};if(e.current){r(),window.addEventListener("resize",r);const a=new ResizeObserver(()=>r());return a.observe(e.current),()=>{window.removeEventListener("resize",r),a&&e.current&&a.unobserve(e.current)}}},[])}const rd={position:"absolute",width:"100%",height:"100%",top:0,left:0},g8=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function b8({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:r=!0,panOnScroll:a=!1,panOnScrollSpeed:s=.5,panOnScrollMode:o=Pa.Free,zoomOnDoubleClick:c=!0,panOnDrag:d=!0,defaultViewport:f,translateExtent:h,minZoom:m,maxZoom:p,zoomActivationKeyCode:y,preventScrolling:x=!0,children:_,noWheelClassName:N,noPanClassName:S,onViewportChange:w,isControlledViewport:k,paneClickDistance:E,selectionOnDrag:M}){const I=Lt(),R=ee.useRef(null),{userSelectionActive:U,lib:B,connectionInProgress:Z}=dt(g8,qt),D=ko(y),z=ee.useRef();p8(R);const V=ee.useCallback(P=>{w==null||w({x:P[0],y:P[1],zoom:P[2]}),k||I.setState({transform:P})},[w,k]);return ee.useEffect(()=>{if(R.current){z.current=wI({domNode:R.current,minZoom:m,maxZoom:p,translateExtent:h,viewport:f,onDraggingChange:O=>I.setState(H=>H.paneDragging===O?H:{paneDragging:O}),onPanZoomStart:(O,H)=>{const{onViewportChangeStart:X,onMoveStart:K}=I.getState();K==null||K(O,H),X==null||X(H)},onPanZoom:(O,H)=>{const{onViewportChange:X,onMove:K}=I.getState();K==null||K(O,H),X==null||X(H)},onPanZoomEnd:(O,H)=>{const{onViewportChangeEnd:X,onMoveEnd:K}=I.getState();K==null||K(O,H),X==null||X(H)}});const{x:P,y:C,zoom:$}=z.current.getViewport();return I.setState({panZoom:z.current,transform:[P,C,$],domNode:R.current.closest(".react-flow")}),()=>{var O;(O=z.current)==null||O.destroy()}}},[]),ee.useEffect(()=>{var P;(P=z.current)==null||P.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:r,panOnScroll:a,panOnScrollSpeed:s,panOnScrollMode:o,zoomOnDoubleClick:c,panOnDrag:d,zoomActivationKeyPressed:D,preventScrolling:x,noPanClassName:S,userSelectionActive:U,noWheelClassName:N,lib:B,onTransformChange:V,connectionInProgress:Z,selectionOnDrag:M,paneClickDistance:E})},[e,t,r,a,s,o,c,d,D,x,S,U,N,B,V,Z,M,E]),g.jsx("div",{className:"react-flow__renderer",ref:R,style:rd,children:_})}const x8=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function y8(){const{userSelectionActive:e,userSelectionRect:t}=dt(x8,qt);return e&&t?g.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Tm=(e,t)=>r=>{r.target===t.current&&(e==null||e(r))},v8=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function _8({isSelecting:e,selectionKeyPressed:t,selectionMode:r=Eo.Full,panOnDrag:a,autoPanOnSelection:s,paneClickDistance:o,selectionOnDrag:c,onSelectionStart:d,onSelectionEnd:f,onPaneClick:h,onPaneContextMenu:m,onPaneScroll:p,onPaneMouseEnter:y,onPaneMouseMove:x,onPaneMouseLeave:_,children:N}){const S=ee.useRef(0),w=Lt(),{userSelectionActive:k,elementsSelectable:E,dragging:M,panBy:I,autoPanSpeed:R}=dt(v8,qt),U=E&&(e||k),B=ee.useRef(null),Z=ee.useRef(),D=ee.useRef(new Set),z=ee.useRef(new Set),V=ee.useRef(!1),P=ee.useRef(!1),C=ee.useRef({x:0,y:0}),$=ee.useRef(!1),O=W=>{if(P.current||V.current||w.getState().connection.inProgress){P.current=!1,V.current=!1;return}h==null||h(W),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},H=W=>{if(Array.isArray(a)&&(a!=null&&a.includes(2))){W.preventDefault();return}m==null||m(W)},X=p?W=>p(W):void 0,K=W=>{P.current&&(W.stopPropagation(),P.current=!1)},T=W=>{var st,Rt;const{domNode:te,transform:ce}=w.getState();if(Z.current=te==null?void 0:te.getBoundingClientRect(),!Z.current)return;const fe=W.target===B.current;if(!fe&&!!W.target.closest(".nokey")||!e||!(c&&fe||t)||W.button!==0||!W.isPrimary)return;(Rt=(st=W.target)==null?void 0:st.setPointerCapture)==null||Rt.call(st,W.pointerId),P.current=!1;const{x:Ne,y:je}=Rr(W.nativeEvent,Z.current),$e=Bo({x:Ne,y:je},ce);w.setState({userSelectionRect:{width:0,height:0,startX:$e.x,startY:$e.y,x:Ne,y:je}}),fe||(W.stopPropagation(),W.preventDefault())};function j(W,te){const{userSelectionRect:ce}=w.getState();if(!ce)return;const{transform:fe,nodeLookup:be,edgeLookup:we,connectionLookup:Ne,triggerNodeChanges:je,triggerEdgeChanges:$e,defaultEdgeOptions:st}=w.getState(),Rt={x:ce.startX,y:ce.startY},{x:Yt,y:Pt}=Ws(Rt,fe),Xt={startX:Rt.x,startY:Rt.y,x:WIt.id)),z.current=new Set;const ct=(st==null?void 0:st.selectable)??!0;for(const It of D.current){const ue=Ne.get(It);if(ue)for(const{edgeId:xe}of ue.values()){const Oe=we.get(xe);Oe&&(Oe.selectable??ct)&&z.current.add(xe)}}if(!i1(Yn,D.current)){const It=Hs(be,D.current,!0);je(It)}if(!i1(En,z.current)){const It=Hs(we,z.current);$e(It)}w.setState({userSelectionRect:Xt,userSelectionActive:!0,nodesSelectionActive:!1})}function Y(){if(!s||!Z.current)return;const[W,te]=eg(C.current,Z.current,R);I({x:W,y:te}).then(ce=>{if(!P.current||!ce){S.current=requestAnimationFrame(Y);return}const{x:fe,y:be}=C.current;j(fe,be),S.current=requestAnimationFrame(Y)})}const L=()=>{cancelAnimationFrame(S.current),S.current=0,$.current=!1};ee.useEffect(()=>()=>L(),[]);const G=W=>{const{userSelectionRect:te,transform:ce,resetSelectedElements:fe}=w.getState();if(!Z.current||!te)return;const{x:be,y:we}=Rr(W.nativeEvent,Z.current);C.current={x:be,y:we};const Ne=Ws({x:te.startX,y:te.startY},ce);if(!P.current){const je=t?0:o;if(Math.hypot(be-Ne.x,we-Ne.y)<=je)return;fe(),d==null||d(W)}P.current=!0,$.current||(Y(),$.current=!0),j(be,we)},q=W=>{var te,ce;if(!U){W.target===B.current&&w.getState().connection.inProgress&&(V.current=!0);return}W.button===0&&((ce=(te=W.target)==null?void 0:te.releasePointerCapture)==null||ce.call(te,W.pointerId),!k&&W.target===B.current&&w.getState().userSelectionRect&&(O==null||O(W)),w.setState({userSelectionActive:!1,userSelectionRect:null}),P.current&&(f==null||f(W),w.setState({nodesSelectionActive:D.current.size>0})),L())},Q=W=>{var te,ce;(ce=(te=W.target)==null?void 0:te.releasePointerCapture)==null||ce.call(te,W.pointerId),L()},J=a===!0||Array.isArray(a)&&a.includes(0);return g.jsxs("div",{className:ln(["react-flow__pane",{draggable:J,dragging:M,selection:e}]),onClick:U?void 0:Tm(O,B),onContextMenu:Tm(H,B),onWheel:Tm(X,B),onPointerEnter:U?void 0:y,onPointerMove:U?G:x,onPointerUp:q,onPointerCancel:U?Q:void 0,onPointerDownCapture:U?T:void 0,onClickCapture:U?K:void 0,onPointerLeave:_,ref:B,style:rd,children:[N,g.jsx(y8,{})]})}function dp({id:e,store:t,unselect:r=!1,nodeRef:a}){const{addSelectedNodes:s,unselectNodesAndEdges:o,multiSelectionActive:c,nodeLookup:d,onError:f}=t.getState(),h=d.get(e);if(!h){f==null||f("012",Lr.error012(e));return}t.setState({nodesSelectionActive:!1}),h.selected?(r||h.selected&&c)&&(o({nodes:[h],edges:[]}),requestAnimationFrame(()=>{var m;return(m=a==null?void 0:a.current)==null?void 0:m.blur()})):s([e])}function EN({nodeRef:e,disabled:t=!1,noDragClassName:r,handleSelector:a,nodeId:s,isSelectable:o,nodeClickDistance:c}){const d=Lt(),[f,h]=ee.useState(!1),m=ee.useRef();return ee.useEffect(()=>{if(!t)return m.current=oI({getStoreItems:()=>d.getState(),onNodeMouseDown:p=>{dp({id:p,store:d,nodeRef:e})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}}),()=>{var p;(p=m.current)==null||p.destroy(),m.current=void 0}},[t,d,e]),ee.useEffect(()=>{t||!e.current||!m.current||m.current.update({noDragClassName:r,handleSelector:a,domNode:e.current,isSelectable:o,nodeId:s,nodeClickDistance:c})},[r,a,t,o,e,s,c]),f}const w8=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function NN(){const e=Lt();return ee.useCallback(r=>{const{nodeExtent:a,snapToGrid:s,snapGrid:o,nodesDraggable:c,onError:d,updateNodePositions:f,nodeLookup:h,nodeOrigin:m}=e.getState(),p=new Map,y=w8(c),x=s?o[0]:5,_=s?o[1]:5,N=r.direction.x*x*r.factor,S=r.direction.y*_*r.factor;for(const[,w]of h){if(!y(w))continue;let k={x:w.internals.positionAbsolute.x+N,y:w.internals.positionAbsolute.y+S};s&&(k=Io(k,o));const{position:E,positionAbsolute:M}=$E({nodeId:w.id,nextPosition:k,nodeLookup:h,nodeExtent:a,nodeOrigin:m,onError:d});w.position=E,w.internals.positionAbsolute=M,p.set(w.id,w)}f(p)},[])}const og=ee.createContext(null),E8=og.Provider;og.Consumer;const SN=()=>ee.useContext(og),N8=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),kN=ee.createContext(null);function S8({children:e}){const t=dt(N8,qt);return g.jsx(kN.Provider,{value:t,children:e})}function k8(){const e=ee.useContext(kN);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const T8={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},C8=(e,t,r)=>a=>{const{connectionClickStartHandle:s,connectionMode:o,connection:c}=a,{fromHandle:d,toHandle:f,isValid:h}=c;if(!d&&!s)return T8;const m=(f==null?void 0:f.nodeId)===e&&(f==null?void 0:f.id)===t&&(f==null?void 0:f.type)===r;return{connectingFrom:(d==null?void 0:d.nodeId)===e&&(d==null?void 0:d.id)===t&&(d==null?void 0:d.type)===r,connectingTo:m,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===t&&(s==null?void 0:s.type)===r,isPossibleEndHandle:o===Zs.Strict?(d==null?void 0:d.type)!==r:e!==(d==null?void 0:d.nodeId)||t!==(d==null?void 0:d.id),connectionInProcess:!!d,clickConnectionInProcess:!!s,valid:m&&h}};function A8({type:e="source",position:t=ze.Top,isValidConnection:r,isConnectable:a=!0,isConnectableStart:s=!0,isConnectableEnd:o=!0,id:c,onConnect:d,children:f,className:h,onMouseDown:m,onTouchStart:p,...y},x){var $,O;const _=c||null,N=e==="target",S=Lt(),w=SN(),{connectOnClick:k,noPanClassName:E,rfId:M}=k8(),{connectingFrom:I,connectingTo:R,clickConnecting:U,isPossibleEndHandle:B,connectionInProcess:Z,clickConnectionInProcess:D,valid:z}=dt(C8(w,_,e),qt);w||(O=($=S.getState()).onError)==null||O.call($,"010",Lr.error010());const V=H=>{const{defaultEdgeOptions:X,onConnect:K,hasDefaultEdges:T}=S.getState(),j={...X,...H};if(T){const{edges:Y,setEdges:L,onError:G}=S.getState();L(l8(j,Y,{onError:G}))}K==null||K(j),d==null||d(j)},P=H=>{if(!w)return;const X=ZE(H.nativeEvent);if(s&&(X&&H.button===0||!X)){const K=S.getState();up.onPointerDown(H.nativeEvent,{handleDomNode:H.currentTarget,autoPanOnConnect:K.autoPanOnConnect,connectionMode:K.connectionMode,connectionRadius:K.connectionRadius,domNode:K.domNode,nodeLookup:K.nodeLookup,lib:K.lib,isTarget:N,handleId:_,nodeId:w,flowId:K.rfId,panBy:K.panBy,cancelConnection:K.cancelConnection,onConnectStart:K.onConnectStart,onConnectEnd:(...T)=>{var j,Y;return(Y=(j=S.getState()).onConnectEnd)==null?void 0:Y.call(j,...T)},updateConnection:K.updateConnection,onConnect:V,isValidConnection:r||((...T)=>{var j,Y;return((Y=(j=S.getState()).isValidConnection)==null?void 0:Y.call(j,...T))??!0}),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:K.autoPanSpeed,dragThreshold:K.connectionDragThreshold})}X?m==null||m(H):p==null||p(H)},C=H=>{const{onClickConnectStart:X,onClickConnectEnd:K,connectionClickStartHandle:T,connectionMode:j,isValidConnection:Y,lib:L,rfId:G,nodeLookup:q,connection:Q}=S.getState();if(!w||!T&&!s)return;if(!T){X==null||X(H.nativeEvent,{nodeId:w,handleId:_,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:w,type:e,id:_}});return}const J=XE(H.target),W=r||Y,{connection:te,isValid:ce}=up.isValid(H.nativeEvent,{handle:{nodeId:w,id:_,type:e},connectionMode:j,fromNodeId:T.nodeId,fromHandleId:T.id||null,fromType:T.type,isValidConnection:W,flowId:G,doc:J,lib:L,nodeLookup:q});ce&&te&&V(te);const fe=structuredClone(Q);delete fe.inProgress,fe.toPosition=fe.toHandle?fe.toHandle.position:null,K==null||K(H,fe),S.setState({connectionClickStartHandle:null})};return g.jsx("div",{"data-handleid":_,"data-nodeid":w,"data-handlepos":t,"data-id":`${M}-${w}-${_}-${e}`,className:ln(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,h,{source:!N,target:N,connectable:a,connectablestart:s,connectableend:o,clickconnecting:U,connectingfrom:I,connectingto:R,valid:z,connectionindicator:a&&(!Z||B)&&(Z||D?o:s)}]),onMouseDown:P,onTouchStart:P,onClick:k?C:void 0,ref:x,...y,children:f})}const el=ee.memo(vN(A8));function M8({data:e,isConnectable:t,sourcePosition:r=ze.Bottom}){return g.jsxs(g.Fragment,{children:[e==null?void 0:e.label,g.jsx(el,{type:"source",position:r,isConnectable:t})]})}function O8({data:e,isConnectable:t,targetPosition:r=ze.Top,sourcePosition:a=ze.Bottom}){return g.jsxs(g.Fragment,{children:[g.jsx(el,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label,g.jsx(el,{type:"source",position:a,isConnectable:t})]})}function R8(){return null}function D8({data:e,isConnectable:t,targetPosition:r=ze.Top}){return g.jsxs(g.Fragment,{children:[g.jsx(el,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label]})}const Lu={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},L1={input:M8,default:O8,output:D8,group:R8};function j8(e){var t,r,a,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((r=e.style)==null?void 0:r.height)}:{width:e.width??((a=e.style)==null?void 0:a.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const L8=e=>{const{width:t,height:r,x:a,y:s}=zo(e.nodeLookup,{filter:o=>!!o.selected});return{width:Or(t)?t:null,height:Or(r)?r:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${a}px,${s}px)`}};function z8({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:r}){const a=Lt(),{width:s,height:o,transformString:c,userSelectionActive:d}=dt(L8,qt),f=NN(),h=ee.useRef(null);ee.useEffect(()=>{var x;r||(x=h.current)==null||x.focus({preventScroll:!0})},[r]);const m=!d&&s!==null&&o!==null;if(EN({nodeRef:h,disabled:!m}),!m)return null;const p=e?x=>{const _=a.getState().nodes.filter(N=>N.selected);e(x,_)}:void 0,y=x=>{Object.prototype.hasOwnProperty.call(Lu,x.key)&&(x.preventDefault(),f({direction:Lu[x.key],factor:x.shiftKey?4:1}))};return g.jsx("div",{className:ln(["react-flow__nodesselection","react-flow__container",t]),style:{transform:c},children:g.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:r?void 0:-1,onKeyDown:r?void 0:y,style:{width:s,height:o}})})}const z1=typeof window<"u"?window:void 0,I8=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function TN({children:e,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:a,onPaneMouseLeave:s,onPaneContextMenu:o,onPaneScroll:c,paneClickDistance:d,deleteKeyCode:f,selectionKeyCode:h,selectionOnDrag:m,selectionMode:p,onSelectionStart:y,onSelectionEnd:x,multiSelectionKeyCode:_,panActivationKeyCode:N,zoomActivationKeyCode:S,elementsSelectable:w,zoomOnScroll:k,zoomOnPinch:E,panOnScroll:M,panOnScrollSpeed:I,panOnScrollMode:R,zoomOnDoubleClick:U,panOnDrag:B,autoPanOnSelection:Z,defaultViewport:D,translateExtent:z,minZoom:V,maxZoom:P,preventScrolling:C,onSelectionContextMenu:$,noWheelClassName:O,noPanClassName:H,disableKeyboardA11y:X,onViewportChange:K,isControlledViewport:T}){const{nodesSelectionActive:j,userSelectionActive:Y}=dt(I8,qt),L=ko(h,{target:z1}),G=ko(N,{target:z1}),q=G||B,Q=G||M,J=m&&q!==!0,W=L||Y||J;return m8({deleteKeyCode:f,multiSelectionKeyCode:_}),g.jsx(b8,{onPaneContextMenu:o,elementsSelectable:w,zoomOnScroll:k,zoomOnPinch:E,panOnScroll:Q,panOnScrollSpeed:I,panOnScrollMode:R,zoomOnDoubleClick:U,panOnDrag:!L&&q,defaultViewport:D,translateExtent:z,minZoom:V,maxZoom:P,zoomActivationKeyCode:S,preventScrolling:C,noWheelClassName:O,noPanClassName:H,onViewportChange:K,isControlledViewport:T,paneClickDistance:d,selectionOnDrag:J,children:g.jsxs(_8,{onSelectionStart:y,onSelectionEnd:x,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:a,onPaneMouseLeave:s,onPaneContextMenu:o,onPaneScroll:c,panOnDrag:q,autoPanOnSelection:Z,isSelecting:!!W,selectionMode:p,selectionKeyPressed:L,paneClickDistance:d,selectionOnDrag:J,children:[e,j&&g.jsx(z8,{onSelectionContextMenu:$,noPanClassName:H,disableKeyboardA11y:X})]})})}TN.displayName="FlowRenderer";const B8=ee.memo(TN),U8=e=>t=>e?Jp(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(r=>r.id):Array.from(t.nodeLookup.keys());function H8(e){return dt(ee.useCallback(U8(e),[e]),qt)}const $8=e=>e.updateNodeInternals;function q8(){const e=dt($8),[t]=ee.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const a=new Map;r.forEach(s=>{const o=s.target.getAttribute("data-id");a.set(o,{id:o,nodeElement:s.target,force:!0})}),e(a)}));return ee.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function P8({node:e,nodeType:t,hasDimensions:r,resizeObserver:a}){const s=Lt(),o=ee.useRef(null),c=ee.useRef(null),d=ee.useRef(e.sourcePosition),f=ee.useRef(e.targetPosition),h=ee.useRef(t),m=r&&!!e.internals.handleBounds;return ee.useEffect(()=>{o.current&&!e.hidden&&(!m||c.current!==o.current)&&(c.current&&(a==null||a.unobserve(c.current)),a==null||a.observe(o.current),c.current=o.current)},[m,e.hidden]),ee.useEffect(()=>()=>{c.current&&(a==null||a.unobserve(c.current),c.current=null)},[]),ee.useEffect(()=>{if(o.current){const p=h.current!==t,y=d.current!==e.sourcePosition,x=f.current!==e.targetPosition;(p||y||x)&&(h.current=t,d.current=e.sourcePosition,f.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function F8({id:e,onClick:t,onMouseEnter:r,onMouseMove:a,onMouseLeave:s,onContextMenu:o,onDoubleClick:c,nodesDraggable:d,elementsSelectable:f,nodesConnectable:h,nodesFocusable:m,resizeObserver:p,noDragClassName:y,noPanClassName:x,disableKeyboardA11y:_,rfId:N,nodeTypes:S,nodeClickDistance:w,onError:k}){const{node:E,internals:M,isParent:I}=dt(W=>{const te=W.nodeLookup.get(e),ce=W.parentLookup.has(e);return{node:te,internals:te.internals,isParent:ce}},qt);let R=E.type||"default",U=(S==null?void 0:S[R])||L1[R];U===void 0&&(k==null||k("003",Lr.error003(R)),R="default",U=(S==null?void 0:S.default)||L1.default);const B=!!(E.draggable||d&&typeof E.draggable>"u"),Z=!!(E.selectable||f&&typeof E.selectable>"u"),D=!!(E.connectable||h&&typeof E.connectable>"u"),z=!!(E.focusable||m&&typeof E.focusable>"u"),V=Lt(),P=VE(E),C=P8({node:E,nodeType:R,hasDimensions:P,resizeObserver:p}),$=EN({nodeRef:C,disabled:E.hidden||!B,noDragClassName:y,handleSelector:E.dragHandle,nodeId:e,isSelectable:Z,nodeClickDistance:w}),O=NN();if(E.hidden)return null;const H=Qr(E),X=j8(E),K=Z||B||t||r||a||s,T=r?W=>r(W,{...M.userNode}):void 0,j=a?W=>a(W,{...M.userNode}):void 0,Y=s?W=>s(W,{...M.userNode}):void 0,L=o?W=>o(W,{...M.userNode}):void 0,G=c?W=>c(W,{...M.userNode}):void 0,q=W=>{const{selectNodesOnDrag:te,nodeDragThreshold:ce}=V.getState();Z&&(!te||!B||ce>0)&&dp({id:e,store:V,nodeRef:C}),t&&t(W,{...M.userNode})},Q=W=>{if(!(KE(W.nativeEvent)||_)){if(zE.includes(W.key)&&Z){const te=W.key==="Escape";dp({id:e,store:V,unselect:te,nodeRef:C})}else if(B&&E.selected&&Object.prototype.hasOwnProperty.call(Lu,W.key)){W.preventDefault();const{ariaLabelConfig:te}=V.getState();V.setState({ariaLiveMessage:te["node.a11yDescription.ariaLiveMessage"]({direction:W.key.replace("Arrow","").toLowerCase(),x:~~M.positionAbsolute.x,y:~~M.positionAbsolute.y})}),O({direction:Lu[W.key],factor:W.shiftKey?4:1})}}},J=()=>{var Ne;if(_||!((Ne=C.current)!=null&&Ne.matches(":focus-visible")))return;const{transform:W,width:te,height:ce,autoPanOnNodeFocus:fe,setCenter:be}=V.getState();if(!fe)return;Jp(new Map([[e,E]]),{x:0,y:0,width:te,height:ce},W,!0).length>0||be(E.position.x+H.width/2,E.position.y+H.height/2,{zoom:W[2]})};return g.jsx("div",{className:ln(["react-flow__node",`react-flow__node-${R}`,{[x]:B},E.className,{selected:E.selected,selectable:Z,parent:I,draggable:B,dragging:$}]),ref:C,style:{zIndex:M.z,transform:`translate(${M.positionAbsolute.x}px,${M.positionAbsolute.y}px)`,pointerEvents:K?"all":"none",visibility:P?"visible":"hidden",...E.style,...X},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:T,onMouseMove:j,onMouseLeave:Y,onContextMenu:L,onClick:q,onDoubleClick:G,onKeyDown:z?Q:void 0,tabIndex:z?0:void 0,onFocus:z?J:void 0,role:E.ariaRole??(z?"group":void 0),"aria-roledescription":"node","aria-describedby":_?void 0:`${mN}-${N}`,"aria-label":E.ariaLabel,...E.domAttributes,children:g.jsx(E8,{value:e,children:g.jsx(U,{id:e,data:E.data,type:R,positionAbsoluteX:M.positionAbsolute.x,positionAbsoluteY:M.positionAbsolute.y,selected:E.selected??!1,selectable:Z,draggable:B,deletable:E.deletable??!0,isConnectable:D,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:$,dragHandle:E.dragHandle,zIndex:M.z,parentId:E.parentId,...H})})})}var G8=ee.memo(F8);const V8=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function CN(e){const{nodesConnectable:t,nodesFocusable:r,elementsSelectable:a,onError:s}=dt(V8,qt),o=H8(e.onlyRenderVisibleElements),c=q8();return g.jsx("div",{className:"react-flow__nodes",style:rd,children:o.map(d=>g.jsx(G8,{id:d,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:c,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:r,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:s},d))})}CN.displayName="NodeRenderer";const Y8=ee.memo(CN);function X8(e){return dt(ee.useCallback(r=>{if(!e)return r.edges.map(s=>s.id);const a=[];if(r.width&&r.height)for(const s of r.edges){const o=r.nodeLookup.get(s.source),c=r.nodeLookup.get(s.target);o&&c&&Pz({sourceNode:o,targetNode:c,width:r.width,height:r.height,transform:r.transform})&&a.push(s.id)}return a},[e]),qt)}const K8=({color:e="none",strokeWidth:t=1})=>{const r={strokeWidth:t,...e&&{stroke:e}};return g.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},Z8=({color:e="none",strokeWidth:t=1})=>{const r={strokeWidth:t,...e&&{stroke:e,fill:e}};return g.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},I1={[Ru.Arrow]:K8,[Ru.ArrowClosed]:Z8};function Q8(e){const t=Lt();return ee.useMemo(()=>{var s,o;return Object.prototype.hasOwnProperty.call(I1,e)?I1[e]:((o=(s=t.getState()).onError)==null||o.call(s,"009",Lr.error009(e)),null)},[e])}const W8=({id:e,type:t,color:r,width:a=12.5,height:s=12.5,markerUnits:o="strokeWidth",strokeWidth:c,orient:d="auto-start-reverse"})=>{const f=Q8(t);return f?g.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${a}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:d,refX:"0",refY:"0",children:g.jsx(f,{color:r,strokeWidth:c})}):null},AN=({defaultColor:e,rfId:t})=>{const r=dt(o=>o.edges),a=dt(o=>o.defaultEdgeOptions),s=ee.useMemo(()=>Qz(r,{id:t,defaultColor:e,defaultMarkerStart:a==null?void 0:a.markerStart,defaultMarkerEnd:a==null?void 0:a.markerEnd}),[r,a,t,e]);return s.length?g.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:g.jsx("defs",{children:s.map(o=>g.jsx(W8,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};AN.displayName="MarkerDefinitions";var J8=ee.memo(AN);function MN({x:e,y:t,label:r,labelStyle:a,labelShowBg:s=!0,labelBgStyle:o,labelBgPadding:c=[2,4],labelBgBorderRadius:d=2,children:f,className:h,...m}){const[p,y]=ee.useState({x:1,y:0,width:0,height:0}),x=ln(["react-flow__edge-textwrapper",h]),_=ee.useRef(null);return ee.useEffect(()=>{if(_.current){const N=_.current.getBBox();y({x:N.x,y:N.y,width:N.width,height:N.height})}},[r]),r?g.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:x,visibility:p.width?"visible":"hidden",...m,children:[s&&g.jsx("rect",{width:p.width+2*c[0],x:-c[0],y:-c[1],height:p.height+2*c[1],className:"react-flow__edge-textbg",style:o,rx:d,ry:d}),g.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:_,style:a,children:r}),f]}):null}MN.displayName="EdgeText";const e9=ee.memo(MN);function id({path:e,labelX:t,labelY:r,label:a,labelStyle:s,labelShowBg:o,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,interactionWidth:h=20,...m}){return g.jsxs(g.Fragment,{children:[g.jsx("path",{...m,d:e,fill:"none",className:ln(["react-flow__edge-path",m.className])}),h?g.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}):null,a&&Or(t)&&Or(r)?g.jsx(e9,{x:t,y:r,label:a,labelStyle:s,labelShowBg:o,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f}):null]})}function B1({pos:e,x1:t,y1:r,x2:a,y2:s}){return e===ze.Left||e===ze.Right?[.5*(t+a),r]:[t,.5*(r+s)]}function ON({sourceX:e,sourceY:t,sourcePosition:r=ze.Bottom,targetX:a,targetY:s,targetPosition:o=ze.Top}){const[c,d]=B1({pos:r,x1:e,y1:t,x2:a,y2:s}),[f,h]=B1({pos:o,x1:a,y1:s,x2:e,y2:t}),[m,p,y,x]=QE({sourceX:e,sourceY:t,targetX:a,targetY:s,sourceControlX:c,sourceControlY:d,targetControlX:f,targetControlY:h});return[`M${e},${t} C${c},${d} ${f},${h} ${a},${s}`,m,p,y,x]}function RN(e){return ee.memo(({id:t,sourceX:r,sourceY:a,targetX:s,targetY:o,sourcePosition:c,targetPosition:d,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:_,markerEnd:N,markerStart:S,interactionWidth:w})=>{const[k,E,M]=ON({sourceX:r,sourceY:a,sourcePosition:c,targetX:s,targetY:o,targetPosition:d}),I=e.isInternal?void 0:t;return g.jsx(id,{id:I,path:k,labelX:E,labelY:M,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:_,markerEnd:N,markerStart:S,interactionWidth:w})})}const t9=RN({isInternal:!1}),DN=RN({isInternal:!0});t9.displayName="SimpleBezierEdge";DN.displayName="SimpleBezierEdgeInternal";function jN(e){return ee.memo(({id:t,sourceX:r,sourceY:a,targetX:s,targetY:o,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:p,style:y,sourcePosition:x=ze.Bottom,targetPosition:_=ze.Top,markerEnd:N,markerStart:S,pathOptions:w,interactionWidth:k})=>{const[E,M,I]=lp({sourceX:r,sourceY:a,sourcePosition:x,targetX:s,targetY:o,targetPosition:_,borderRadius:w==null?void 0:w.borderRadius,offset:w==null?void 0:w.offset,stepPosition:w==null?void 0:w.stepPosition}),R=e.isInternal?void 0:t;return g.jsx(id,{id:R,path:E,labelX:M,labelY:I,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:p,style:y,markerEnd:N,markerStart:S,interactionWidth:k})})}const LN=jN({isInternal:!1}),zN=jN({isInternal:!0});LN.displayName="SmoothStepEdge";zN.displayName="SmoothStepEdgeInternal";function IN(e){return ee.memo(({id:t,...r})=>{var s;const a=e.isInternal?void 0:t;return g.jsx(LN,{...r,id:a,pathOptions:ee.useMemo(()=>{var o;return{borderRadius:0,offset:(o=r.pathOptions)==null?void 0:o.offset}},[(s=r.pathOptions)==null?void 0:s.offset])})})}const n9=IN({isInternal:!1}),BN=IN({isInternal:!0});n9.displayName="StepEdge";BN.displayName="StepEdgeInternal";function UN(e){return ee.memo(({id:t,sourceX:r,sourceY:a,targetX:s,targetY:o,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:p,style:y,markerEnd:x,markerStart:_,interactionWidth:N})=>{const[S,w,k]=eN({sourceX:r,sourceY:a,targetX:s,targetY:o}),E=e.isInternal?void 0:t;return g.jsx(id,{id:E,path:S,labelX:w,labelY:k,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:p,style:y,markerEnd:x,markerStart:_,interactionWidth:N})})}const r9=UN({isInternal:!1}),HN=UN({isInternal:!0});r9.displayName="StraightEdge";HN.displayName="StraightEdgeInternal";function $N(e){return ee.memo(({id:t,sourceX:r,sourceY:a,targetX:s,targetY:o,sourcePosition:c=ze.Bottom,targetPosition:d=ze.Top,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:_,markerEnd:N,markerStart:S,pathOptions:w,interactionWidth:k})=>{const[E,M,I]=WE({sourceX:r,sourceY:a,sourcePosition:c,targetX:s,targetY:o,targetPosition:d,curvature:w==null?void 0:w.curvature}),R=e.isInternal?void 0:t;return g.jsx(id,{id:R,path:E,labelX:M,labelY:I,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:_,markerEnd:N,markerStart:S,interactionWidth:k})})}const i9=$N({isInternal:!1}),qN=$N({isInternal:!0});i9.displayName="BezierEdge";qN.displayName="BezierEdgeInternal";const U1={default:qN,straight:HN,step:BN,smoothstep:zN,simplebezier:DN},H1={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},a9=(e,t,r)=>r===ze.Left?e-t:r===ze.Right?e+t:e,s9=(e,t,r)=>r===ze.Top?e-t:r===ze.Bottom?e+t:e,$1="react-flow__edgeupdater";function q1({position:e,centerX:t,centerY:r,radius:a=10,onMouseDown:s,onMouseEnter:o,onMouseOut:c,type:d}){return g.jsx("circle",{onMouseDown:s,onMouseEnter:o,onMouseOut:c,className:ln([$1,`${$1}-${d}`]),cx:a9(t,a,e),cy:s9(r,a,e),r:a,stroke:"transparent",fill:"transparent"})}function l9({isReconnectable:e,reconnectRadius:t,edge:r,sourceX:a,sourceY:s,targetX:o,targetY:c,sourcePosition:d,targetPosition:f,onReconnect:h,onReconnectStart:m,onReconnectEnd:p,setReconnecting:y,setUpdateHover:x}){const _=Lt(),N=(M,I)=>{if(M.button!==0)return;const{autoPanOnConnect:R,domNode:U,connectionMode:B,connectionRadius:Z,lib:D,onConnectStart:z,cancelConnection:V,nodeLookup:P,rfId:C,panBy:$,updateConnection:O}=_.getState(),H=I.type==="target",X=(j,Y)=>{y(!1),p==null||p(j,r,I.type,Y)},K=j=>h==null?void 0:h(r,j),T=(j,Y)=>{y(!0),m==null||m(M,r,I.type),z==null||z(j,Y)};up.onPointerDown(M.nativeEvent,{autoPanOnConnect:R,connectionMode:B,connectionRadius:Z,domNode:U,handleId:I.id,nodeId:I.nodeId,nodeLookup:P,isTarget:H,edgeUpdaterType:I.type,lib:D,flowId:C,cancelConnection:V,panBy:$,isValidConnection:(...j)=>{var Y,L;return((L=(Y=_.getState()).isValidConnection)==null?void 0:L.call(Y,...j))??!0},onConnect:K,onConnectStart:T,onConnectEnd:(...j)=>{var Y,L;return(L=(Y=_.getState()).onConnectEnd)==null?void 0:L.call(Y,...j)},onReconnectEnd:X,updateConnection:O,getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,dragThreshold:_.getState().connectionDragThreshold,handleDomNode:M.currentTarget})},S=M=>N(M,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),w=M=>N(M,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),k=()=>x(!0),E=()=>x(!1);return g.jsxs(g.Fragment,{children:[(e===!0||e==="source")&&g.jsx(q1,{position:d,centerX:a,centerY:s,radius:t,onMouseDown:S,onMouseEnter:k,onMouseOut:E,type:"source"}),(e===!0||e==="target")&&g.jsx(q1,{position:f,centerX:o,centerY:c,radius:t,onMouseDown:w,onMouseEnter:k,onMouseOut:E,type:"target"})]})}function o9({id:e,edgesFocusable:t,edgesReconnectable:r,elementsSelectable:a,onClick:s,onDoubleClick:o,onContextMenu:c,onMouseEnter:d,onMouseMove:f,onMouseLeave:h,reconnectRadius:m,onReconnect:p,onReconnectStart:y,onReconnectEnd:x,rfId:_,edgeTypes:N,noPanClassName:S,onError:w,disableKeyboardA11y:k}){let E=dt(be=>be.edgeLookup.get(e));const M=dt(be=>be.defaultEdgeOptions);E=M?{...M,...E}:E;let I=E.type||"default",R=(N==null?void 0:N[I])||U1[I];R===void 0&&(w==null||w("011",Lr.error011(I)),I="default",R=(N==null?void 0:N.default)||U1.default);const U=!!(E.focusable||t&&typeof E.focusable>"u"),B=typeof p<"u"&&(E.reconnectable||r&&typeof E.reconnectable>"u"),Z=!!(E.selectable||a&&typeof E.selectable>"u"),D=ee.useRef(null),[z,V]=ee.useState(!1),[P,C]=ee.useState(!1),$=Lt(),{zIndex:O=E.zIndex,sourceX:H,sourceY:X,targetX:K,targetY:T,sourcePosition:j,targetPosition:Y}=dt(ee.useCallback(be=>{const we=be.nodeLookup.get(E.source),Ne=be.nodeLookup.get(E.target);if(!we||!Ne)return H1;const je=Zz({id:e,sourceNode:we,targetNode:Ne,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:be.connectionMode,onError:w}),$e=qz({selected:E.selected,zIndex:E.zIndex,sourceNode:we,targetNode:Ne,elevateOnSelect:be.elevateEdgesOnSelect,zIndexMode:be.zIndexMode});return{...je||H1,zIndex:$e}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),qt),L=ee.useMemo(()=>E.markerStart?`url('#${op(E.markerStart,_)}')`:void 0,[E.markerStart,_]),G=ee.useMemo(()=>E.markerEnd?`url('#${op(E.markerEnd,_)}')`:void 0,[E.markerEnd,_]);if(E.hidden||H===null||X===null||K===null||T===null)return null;const q=be=>{var $e;const{addSelectedEdges:we,unselectNodesAndEdges:Ne,multiSelectionActive:je}=$.getState();Z&&($.setState({nodesSelectionActive:!1}),E.selected&&je?(Ne({nodes:[],edges:[E]}),($e=D.current)==null||$e.blur()):we([e])),s&&s(be,E)},Q=o?be=>{o(be,{...E})}:void 0,J=c?be=>{c(be,{...E})}:void 0,W=d?be=>{d(be,{...E})}:void 0,te=f?be=>{f(be,{...E})}:void 0,ce=h?be=>{h(be,{...E})}:void 0,fe=be=>{var we;if(!k&&zE.includes(be.key)&&Z){const{unselectNodesAndEdges:Ne,addSelectedEdges:je}=$.getState();be.key==="Escape"?((we=D.current)==null||we.blur(),Ne({edges:[E]})):je([e])}};return g.jsx("svg",{style:{zIndex:O},children:g.jsxs("g",{className:ln(["react-flow__edge",`react-flow__edge-${I}`,E.className,S,{selected:E.selected,animated:E.animated,inactive:!Z&&!s,updating:z,selectable:Z}]),onClick:q,onDoubleClick:Q,onContextMenu:J,onMouseEnter:W,onMouseMove:te,onMouseLeave:ce,onKeyDown:U?fe:void 0,tabIndex:U?0:void 0,role:E.ariaRole??(U?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":U?`${pN}-${_}`:void 0,ref:D,...E.domAttributes,children:[!P&&g.jsx(R,{id:e,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:Z,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:H,sourceY:X,targetX:K,targetY:T,sourcePosition:j,targetPosition:Y,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:L,markerEnd:G,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),B&&g.jsx(l9,{edge:E,isReconnectable:B,reconnectRadius:m,onReconnect:p,onReconnectStart:y,onReconnectEnd:x,sourceX:H,sourceY:X,targetX:K,targetY:T,sourcePosition:j,targetPosition:Y,setUpdateHover:V,setReconnecting:C})]})})}var c9=ee.memo(o9);const u9=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function PN({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:r,edgeTypes:a,noPanClassName:s,onReconnect:o,onEdgeContextMenu:c,onEdgeMouseEnter:d,onEdgeMouseMove:f,onEdgeMouseLeave:h,onEdgeClick:m,reconnectRadius:p,onEdgeDoubleClick:y,onReconnectStart:x,onReconnectEnd:_,disableKeyboardA11y:N}){const{edgesFocusable:S,edgesReconnectable:w,elementsSelectable:k,onError:E}=dt(u9,qt),M=X8(t);return g.jsxs("div",{className:"react-flow__edges",children:[g.jsx(J8,{defaultColor:e,rfId:r}),M.map(I=>g.jsx(c9,{id:I,edgesFocusable:S,edgesReconnectable:w,elementsSelectable:k,noPanClassName:s,onReconnect:o,onContextMenu:c,onMouseEnter:d,onMouseMove:f,onMouseLeave:h,onClick:m,reconnectRadius:p,onDoubleClick:y,onReconnectStart:x,onReconnectEnd:_,rfId:r,onError:E,edgeTypes:a,disableKeyboardA11y:N},I))]})}PN.displayName="EdgeRenderer";const d9=ee.memo(PN),P1=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function f9({children:e}){const t=Lt(),r=ee.useRef(null),[a]=ee.useState(()=>t.getState().transform);return _N(()=>{let s=null;const o=()=>{const c=t.getState().transform;s&&c[0]===s[0]&&c[1]===s[1]&&c[2]===s[2]||(s=c,r.current&&(r.current.style.transform=P1(c)))};return o(),t.subscribe(o)},[t]),g.jsx("div",{ref:r,className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:P1(a)},children:e})}function h9(e){const t=Uo(),r=ee.useRef(!1);ee.useEffect(()=>{!r.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),r.current=!0)},[e,t.viewportInitialized])}const m9=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function p9(e){const t=dt(m9),r=Lt();return ee.useEffect(()=>{e&&(t==null||t(e),r.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function g9(e){return e.connection.inProgress?{...e.connection,to:Bo(e.connection.to,e.transform)}:{...e.connection}}function b9(e){return g9}function x9(e){const t=b9();return dt(t,qt)}const y9=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function v9({containerStyle:e,style:t,type:r,component:a}){const{nodesConnectable:s,width:o,height:c,isValid:d,inProgress:f}=dt(y9,qt);return!(o&&s&&f)?null:g.jsx("svg",{style:e,width:o,height:c,className:"react-flow__connectionline react-flow__container",children:g.jsx("g",{className:ln(["react-flow__connection",UE(d)]),children:g.jsx(FN,{style:t,type:r,CustomComponent:a,isValid:d})})})}const FN=({style:e,type:t=ca.Bezier,CustomComponent:r,isValid:a})=>{const{inProgress:s,from:o,fromNode:c,fromHandle:d,fromPosition:f,to:h,toNode:m,toHandle:p,toPosition:y,pointer:x}=x9();if(!s)return;if(r)return g.jsx(r,{connectionLineType:t,connectionLineStyle:e,fromNode:c,fromHandle:d,fromX:o.x,fromY:o.y,toX:h.x,toY:h.y,fromPosition:f,toPosition:y,connectionStatus:UE(a),toNode:m,toHandle:p,pointer:x});let _="";const N={sourceX:o.x,sourceY:o.y,sourcePosition:f,targetX:h.x,targetY:h.y,targetPosition:y};switch(t){case ca.Bezier:[_]=WE(N);break;case ca.SimpleBezier:[_]=ON(N);break;case ca.Step:[_]=lp({...N,borderRadius:0});break;case ca.SmoothStep:[_]=lp(N);break;default:[_]=eN(N)}return g.jsx("path",{d:_,fill:"none",className:"react-flow__connection-path",style:e})};FN.displayName="ConnectionLine";const _9={};function F1(e=_9){ee.useRef(e),Lt(),ee.useEffect(()=>{},[e])}function w9(){Lt(),ee.useRef(!1),ee.useEffect(()=>{},[])}function GN({nodeTypes:e,edgeTypes:t,onInit:r,onNodeClick:a,onEdgeClick:s,onNodeDoubleClick:o,onEdgeDoubleClick:c,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:m,onSelectionContextMenu:p,onSelectionStart:y,onSelectionEnd:x,connectionLineType:_,connectionLineStyle:N,connectionLineComponent:S,connectionLineContainerStyle:w,selectionKeyCode:k,selectionOnDrag:E,selectionMode:M,multiSelectionKeyCode:I,panActivationKeyCode:R,zoomActivationKeyCode:U,deleteKeyCode:B,onlyRenderVisibleElements:Z,elementsSelectable:D,defaultViewport:z,translateExtent:V,minZoom:P,maxZoom:C,preventScrolling:$,defaultMarkerColor:O,zoomOnScroll:H,zoomOnPinch:X,panOnScroll:K,panOnScrollSpeed:T,panOnScrollMode:j,zoomOnDoubleClick:Y,panOnDrag:L,autoPanOnSelection:G,onPaneClick:q,onPaneMouseEnter:Q,onPaneMouseMove:J,onPaneMouseLeave:W,onPaneScroll:te,onPaneContextMenu:ce,paneClickDistance:fe,nodeClickDistance:be,onEdgeContextMenu:we,onEdgeMouseEnter:Ne,onEdgeMouseMove:je,onEdgeMouseLeave:$e,reconnectRadius:st,onReconnect:Rt,onReconnectStart:Yt,onReconnectEnd:Pt,noDragClassName:Xt,noWheelClassName:Yn,noPanClassName:En,disableKeyboardA11y:ct,nodeExtent:It,rfId:ue,viewport:xe,onViewportChange:Oe,nodesDraggable:Fe}){return F1(e),F1(t),w9(),h9(r),p9(xe),g.jsx(B8,{onPaneClick:q,onPaneMouseEnter:Q,onPaneMouseMove:J,onPaneMouseLeave:W,onPaneContextMenu:ce,onPaneScroll:te,paneClickDistance:fe,deleteKeyCode:B,selectionKeyCode:k,selectionOnDrag:E,selectionMode:M,onSelectionStart:y,onSelectionEnd:x,multiSelectionKeyCode:I,panActivationKeyCode:R,zoomActivationKeyCode:U,elementsSelectable:D,zoomOnScroll:H,zoomOnPinch:X,zoomOnDoubleClick:Y,panOnScroll:K,panOnScrollSpeed:T,panOnScrollMode:j,panOnDrag:L,autoPanOnSelection:G,defaultViewport:z,translateExtent:V,minZoom:P,maxZoom:C,onSelectionContextMenu:p,preventScrolling:$,noDragClassName:Xt,noWheelClassName:Yn,noPanClassName:En,disableKeyboardA11y:ct,onViewportChange:Oe,isControlledViewport:!!xe,children:g.jsxs(f9,{children:[g.jsx(d9,{edgeTypes:t,onEdgeClick:s,onEdgeDoubleClick:c,onReconnect:Rt,onReconnectStart:Yt,onReconnectEnd:Pt,onlyRenderVisibleElements:Z,onEdgeContextMenu:we,onEdgeMouseEnter:Ne,onEdgeMouseMove:je,onEdgeMouseLeave:$e,reconnectRadius:st,defaultMarkerColor:O,noPanClassName:En,disableKeyboardA11y:ct,rfId:ue}),g.jsx(v9,{style:N,type:_,component:S,containerStyle:w}),g.jsx("div",{className:"react-flow__edgelabel-renderer"}),g.jsx(Y8,{nodeTypes:e,onNodeClick:a,onNodeDoubleClick:o,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:m,nodeClickDistance:be,onlyRenderVisibleElements:Z,noPanClassName:En,noDragClassName:Xt,disableKeyboardA11y:ct,nodeExtent:It,rfId:ue,nodesDraggable:Fe}),g.jsx("div",{className:"react-flow__viewport-portal"})]})})}GN.displayName="GraphView";const E9=ee.memo(GN),N9=GE(),G1=({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,width:s,height:o,fitView:c,fitViewOptions:d,minZoom:f=.5,maxZoom:h=2,nodeOrigin:m,nodeExtent:p,zIndexMode:y="basic"}={})=>{const x=new Map,_=new Map,N=new Map,S=new Map,w=a??t??[],k=r??e??[],E=m??[0,0],M=p??wo;rN(N,S,w);const{nodesInitialized:I}=cp(k,x,_,{nodeOrigin:E,nodeExtent:M,zIndexMode:y});let R=[0,0,1];if(c&&s&&o){const U=zo(x,{filter:z=>!!((z.width||z.initialWidth)&&(z.height||z.initialHeight))}),{x:B,y:Z,zoom:D}=tg(U,s,o,f,h,(d==null?void 0:d.padding)??.1);R=[B,Z,D]}return{rfId:"1",width:s??0,height:o??0,transform:R,nodes:k,nodesInitialized:I,nodeLookup:x,parentLookup:_,edges:w,edgeLookup:S,connectionLookup:N,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:a!==void 0,panZoom:null,minZoom:f,maxZoom:h,translateExtent:wo,nodeExtent:M,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Zs.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:E,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:c??!1,fitViewOptions:d,fitViewResolver:null,connection:{...BE},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:N9,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:IE,zIndexMode:y,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},S9=({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,width:s,height:o,fitView:c,fitViewOptions:d,minZoom:f,maxZoom:h,nodeOrigin:m,nodeExtent:p,zIndexMode:y})=>UI((x,_)=>{async function N(){const{nodeLookup:S,panZoom:w,fitViewOptions:k,fitViewResolver:E,width:M,height:I,minZoom:R,maxZoom:U}=_();w&&(await Lz({nodes:S,width:M,height:I,panZoom:w,minZoom:R,maxZoom:U},k),E==null||E.resolve(!0),x({fitViewResolver:null}))}return{...G1({nodes:e,edges:t,width:s,height:o,fitView:c,fitViewOptions:d,minZoom:f,maxZoom:h,nodeOrigin:m,nodeExtent:p,defaultNodes:r,defaultEdges:a,zIndexMode:y}),setNodes:S=>{const{nodeLookup:w,parentLookup:k,nodeOrigin:E,elevateNodesOnSelect:M,fitViewQueued:I,zIndexMode:R,nodesSelectionActive:U}=_(),{nodesInitialized:B,hasSelectedNodes:Z}=cp(S,w,k,{nodeOrigin:E,nodeExtent:p,elevateNodesOnSelect:M,checkEquality:!0,zIndexMode:R}),D=U&&Z;I&&B?(N(),x({nodes:S,nodesInitialized:B,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):x({nodes:S,nodesInitialized:B,nodesSelectionActive:D})},setEdges:S=>{const{connectionLookup:w,edgeLookup:k}=_();rN(w,k,S),x({edges:S})},setDefaultNodesAndEdges:(S,w)=>{if(S){const{setNodes:k}=_();k(S),x({hasDefaultNodes:!0})}if(w){const{setEdges:k}=_();k(w),x({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:w,nodeLookup:k,parentLookup:E,domNode:M,nodeOrigin:I,nodeExtent:R,debug:U,fitViewQueued:B,zIndexMode:Z}=_(),{changes:D,updatedInternals:z}=iI(S,k,E,M,I,R,Z);z&&(eI(k,E,{nodeOrigin:I,nodeExtent:R,zIndexMode:Z}),B?(N(),x({fitViewQueued:!1,fitViewOptions:void 0})):x({}),(D==null?void 0:D.length)>0&&(U&&console.log("React Flow: trigger node changes",D),w==null||w(D)))},updateNodePositions:(S,w=!1)=>{const k=[];let E=[];const{nodeLookup:M,triggerNodeChanges:I,connection:R,updateConnection:U,onNodesChangeMiddlewareMap:B}=_();for(const[Z,D]of S){const z=M.get(Z),V=!!(z!=null&&z.expandParent&&(z!=null&&z.parentId)&&(D!=null&&D.position)),P={id:Z,type:"position",position:V?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:w};if(z&&R.inProgress&&R.fromNode.id===z.id){const C=Ka(z,R.fromHandle,ze.Left,!0);U({...R,from:C})}V&&z.parentId&&k.push({id:Z,parentId:z.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),E.push(P)}if(k.length>0){const{parentLookup:Z,nodeOrigin:D}=_(),z=lg(k,M,Z,D);E.push(...z)}for(const Z of B.values())E=Z(E);I(E)},triggerNodeChanges:S=>{const{onNodesChange:w,setNodes:k,nodes:E,hasDefaultNodes:M,debug:I}=_();if(S!=null&&S.length){if(M){const R=xN(S,E);k(R)}I&&console.log("React Flow: trigger node changes",S),w==null||w(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:w,setEdges:k,edges:E,hasDefaultEdges:M,debug:I}=_();if(S!=null&&S.length){if(M){const R=yN(S,E);k(R)}I&&console.log("React Flow: trigger edge changes",S),w==null||w(S)}},addSelectedNodes:S=>{const{multiSelectionActive:w,edgeLookup:k,nodeLookup:E,triggerNodeChanges:M,triggerEdgeChanges:I}=_();if(w){const R=S.map(U=>Ua(U,!0));M(R);return}M(Hs(E,new Set([...S]),!0)),I(Hs(k))},addSelectedEdges:S=>{const{multiSelectionActive:w,edgeLookup:k,nodeLookup:E,triggerNodeChanges:M,triggerEdgeChanges:I}=_();if(w){const R=S.map(U=>Ua(U,!0));I(R);return}I(Hs(k,new Set([...S]))),M(Hs(E,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:w}={})=>{const{edges:k,nodes:E,nodeLookup:M,triggerNodeChanges:I,triggerEdgeChanges:R}=_(),U=S||E,B=w||k,Z=[];for(const z of U){if(!z.selected)continue;const V=M.get(z.id);V&&(V.selected=!1),Z.push(Ua(z.id,!1))}const D=[];for(const z of B)z.selected&&D.push(Ua(z.id,!1));I(Z),R(D)},setMinZoom:S=>{const{panZoom:w,maxZoom:k}=_();w==null||w.setScaleExtent([S,k]),x({minZoom:S})},setMaxZoom:S=>{const{panZoom:w,minZoom:k}=_();w==null||w.setScaleExtent([k,S]),x({maxZoom:S})},setTranslateExtent:S=>{var w;(w=_().panZoom)==null||w.setTranslateExtent(S),x({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:w,triggerNodeChanges:k,triggerEdgeChanges:E,elementsSelectable:M}=_();if(!M)return;const I=w.reduce((U,B)=>B.selected?[...U,Ua(B.id,!1)]:U,[]),R=S.reduce((U,B)=>B.selected?[...U,Ua(B.id,!1)]:U,[]);k(I),E(R)},setNodeExtent:S=>{const{nodes:w,nodeLookup:k,parentLookup:E,nodeOrigin:M,elevateNodesOnSelect:I,nodeExtent:R,zIndexMode:U}=_();S[0][0]===R[0][0]&&S[0][1]===R[0][1]&&S[1][0]===R[1][0]&&S[1][1]===R[1][1]||(cp(w,k,E,{nodeOrigin:M,nodeExtent:S,elevateNodesOnSelect:I,checkEquality:!1,zIndexMode:U}),x({nodeExtent:S}))},panBy:S=>{const{transform:w,width:k,height:E,panZoom:M,translateExtent:I}=_();return aI({delta:S,panZoom:M,transform:w,translateExtent:I,width:k,height:E})},setCenter:async(S,w,k)=>{const{width:E,height:M,maxZoom:I,panZoom:R}=_();if(!R)return!1;const U=typeof(k==null?void 0:k.zoom)<"u"?k.zoom:I;return await R.setViewport({x:E/2-S*U,y:M/2-w*U,zoom:U},{duration:k==null?void 0:k.duration,ease:k==null?void 0:k.ease,interpolate:k==null?void 0:k.interpolate}),!0},cancelConnection:()=>{x({connection:{...BE}})},updateConnection:S=>{x({connection:S})},reset:()=>x({...G1()})}},Object.is);function k9({initialNodes:e,initialEdges:t,defaultNodes:r,defaultEdges:a,initialWidth:s,initialHeight:o,initialMinZoom:c,initialMaxZoom:d,initialFitViewOptions:f,fitView:h,nodeOrigin:m,nodeExtent:p,zIndexMode:y,children:x}){const[_]=ee.useState(()=>S9({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,width:s,height:o,fitView:h,minZoom:c,maxZoom:d,fitViewOptions:f,nodeOrigin:m,nodeExtent:p,zIndexMode:y}));return g.jsx(HI,{value:_,children:g.jsx(u8,{children:g.jsx(S8,{children:x})})})}function T9({children:e,nodes:t,edges:r,defaultNodes:a,defaultEdges:s,width:o,height:c,fitView:d,fitViewOptions:f,minZoom:h,maxZoom:m,nodeOrigin:p,nodeExtent:y,zIndexMode:x}){return ee.useContext(td)?g.jsx(g.Fragment,{children:e}):g.jsx(k9,{initialNodes:t,initialEdges:r,defaultNodes:a,defaultEdges:s,initialWidth:o,initialHeight:c,fitView:d,initialFitViewOptions:f,initialMinZoom:h,initialMaxZoom:m,nodeOrigin:p,nodeExtent:y,zIndexMode:x,children:e})}const C9={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function A9({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,className:s,nodeTypes:o,edgeTypes:c,onNodeClick:d,onEdgeClick:f,onInit:h,onMove:m,onMoveStart:p,onMoveEnd:y,onConnect:x,onConnectStart:_,onConnectEnd:N,onClickConnectStart:S,onClickConnectEnd:w,onNodeMouseEnter:k,onNodeMouseMove:E,onNodeMouseLeave:M,onNodeContextMenu:I,onNodeDoubleClick:R,onNodeDragStart:U,onNodeDrag:B,onNodeDragStop:Z,onNodesDelete:D,onEdgesDelete:z,onDelete:V,onSelectionChange:P,onSelectionDragStart:C,onSelectionDrag:$,onSelectionDragStop:O,onSelectionContextMenu:H,onSelectionStart:X,onSelectionEnd:K,onBeforeDelete:T,connectionMode:j,connectionLineType:Y=ca.Bezier,connectionLineStyle:L,connectionLineComponent:G,connectionLineContainerStyle:q,deleteKeyCode:Q="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:W=!1,selectionMode:te=Eo.Full,panActivationKeyCode:ce="Space",multiSelectionKeyCode:fe=So()?"Meta":"Control",zoomActivationKeyCode:be=So()?"Meta":"Control",snapToGrid:we,snapGrid:Ne,onlyRenderVisibleElements:je=!1,selectNodesOnDrag:$e,nodesDraggable:st,autoPanOnNodeFocus:Rt,nodesConnectable:Yt,nodesFocusable:Pt,nodeOrigin:Xt=gN,edgesFocusable:Yn,edgesReconnectable:En,elementsSelectable:ct=!0,defaultViewport:It=JI,minZoom:ue=.5,maxZoom:xe=2,translateExtent:Oe=wo,preventScrolling:Fe=!0,nodeExtent:Ze,defaultMarkerColor:on="#b1b1b7",zoomOnScroll:Nn=!0,zoomOnPinch:Kt=!0,panOnScroll:At=!1,panOnScrollSpeed:Wt=.5,panOnScrollMode:ut=Pa.Free,zoomOnDoubleClick:zn=!0,panOnDrag:cn=!0,onPaneClick:Ni,onPaneMouseEnter:nt,onPaneMouseMove:Xn,onPaneMouseLeave:Mn,onPaneScroll:hn,onPaneContextMenu:re,paneClickDistance:me=1,nodeClickDistance:Ee=0,children:Pe,onReconnect:St,onReconnectStart:gt,onReconnectEnd:Ae,onEdgeContextMenu:Se,onEdgeDoubleClick:Ue,onEdgeMouseEnter:Bt,onEdgeMouseMove:Mt,onEdgeMouseLeave:xr,reconnectRadius:Si=10,onNodesChange:ki,onEdgesChange:lr,noDragClassName:Ut="nodrag",noWheelClassName:mn="nowheel",noPanClassName:yr="nopan",fitView:Ti,fitViewOptions:pa,connectOnClick:Ci,attributionPosition:Ja,proOptions:Wr,defaultEdgeOptions:ga,elevateNodesOnSelect:bn=!0,elevateEdgesOnSelect:vr=!1,disableKeyboardA11y:_r=!1,autoPanOnConnect:Br,autoPanOnNodeDrag:Ft,autoPanOnSelection:es=!0,autoPanSpeed:Jr,connectionRadius:wr,isValidConnection:ye,onError:Le,style:Qe,id:ft,nodeDragThreshold:Ht,connectionDragThreshold:pn,viewport:On,onViewportChange:Sn,width:_t,height:Rn,colorMode:ts="light",debug:Ai,onScroll:Ur,ariaLabelConfig:Mi,zIndexMode:ns="basic",...kn},ba){const Er=ft||"1",Oi=r8(ts),un=ee.useCallback(xa=>{xa.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ur==null||Ur(xa)},[Ur]);return g.jsx("div",{"data-testid":"rf__wrapper",...kn,onScroll:un,style:{...Qe,...C9},ref:ba,className:ln(["react-flow",s,Oi]),id:ft,role:"application",children:g.jsxs(T9,{nodes:e,edges:t,width:_t,height:Rn,fitView:Ti,fitViewOptions:pa,minZoom:ue,maxZoom:xe,nodeOrigin:Xt,nodeExtent:Ze,zIndexMode:ns,children:[g.jsx(n8,{nodes:e,edges:t,defaultNodes:r,defaultEdges:a,onConnect:x,onConnectStart:_,onConnectEnd:N,onClickConnectStart:S,onClickConnectEnd:w,nodesDraggable:st,autoPanOnNodeFocus:Rt,nodesConnectable:Yt,nodesFocusable:Pt,edgesFocusable:Yn,edgesReconnectable:En,elementsSelectable:ct,elevateNodesOnSelect:bn,elevateEdgesOnSelect:vr,minZoom:ue,maxZoom:xe,nodeExtent:Ze,onNodesChange:ki,onEdgesChange:lr,snapToGrid:we,snapGrid:Ne,connectionMode:j,translateExtent:Oe,connectOnClick:Ci,defaultEdgeOptions:ga,fitView:Ti,fitViewOptions:pa,onNodesDelete:D,onEdgesDelete:z,onDelete:V,onNodeDragStart:U,onNodeDrag:B,onNodeDragStop:Z,onSelectionDrag:$,onSelectionDragStart:C,onSelectionDragStop:O,onMove:m,onMoveStart:p,onMoveEnd:y,noPanClassName:yr,nodeOrigin:Xt,rfId:Er,autoPanOnConnect:Br,autoPanOnNodeDrag:Ft,autoPanSpeed:Jr,onError:Le,connectionRadius:wr,isValidConnection:ye,selectNodesOnDrag:$e,nodeDragThreshold:Ht,connectionDragThreshold:pn,onBeforeDelete:T,debug:Ai,ariaLabelConfig:Mi,zIndexMode:ns}),g.jsx(E9,{onInit:h,onNodeClick:d,onEdgeClick:f,onNodeMouseEnter:k,onNodeMouseMove:E,onNodeMouseLeave:M,onNodeContextMenu:I,onNodeDoubleClick:R,nodeTypes:o,edgeTypes:c,connectionLineType:Y,connectionLineStyle:L,connectionLineComponent:G,connectionLineContainerStyle:q,selectionKeyCode:J,selectionOnDrag:W,selectionMode:te,deleteKeyCode:Q,multiSelectionKeyCode:fe,panActivationKeyCode:ce,zoomActivationKeyCode:be,onlyRenderVisibleElements:je,defaultViewport:It,translateExtent:Oe,minZoom:ue,maxZoom:xe,preventScrolling:Fe,zoomOnScroll:Nn,zoomOnPinch:Kt,zoomOnDoubleClick:zn,panOnScroll:At,panOnScrollSpeed:Wt,panOnScrollMode:ut,panOnDrag:cn,autoPanOnSelection:es,onPaneClick:Ni,onPaneMouseEnter:nt,onPaneMouseMove:Xn,onPaneMouseLeave:Mn,onPaneScroll:hn,onPaneContextMenu:re,paneClickDistance:me,nodeClickDistance:Ee,onSelectionContextMenu:H,onSelectionStart:X,onSelectionEnd:K,onReconnect:St,onReconnectStart:gt,onReconnectEnd:Ae,onEdgeContextMenu:Se,onEdgeDoubleClick:Ue,onEdgeMouseEnter:Bt,onEdgeMouseMove:Mt,onEdgeMouseLeave:xr,reconnectRadius:Si,defaultMarkerColor:on,noDragClassName:Ut,noWheelClassName:mn,noPanClassName:yr,rfId:Er,disableKeyboardA11y:_r,nodeExtent:Ze,viewport:On,onViewportChange:Sn,nodesDraggable:st}),g.jsx(WI,{onSelectionChange:P}),Pe,g.jsx(YI,{proOptions:Wr,position:Ja}),g.jsx(VI,{rfId:Er,disableKeyboardA11y:_r})]})})}var M9=vN(A9);function O9(e){const[t,r]=ee.useState(e),a=ee.useCallback(s=>r(o=>xN(s,o)),[]);return[t,r,a]}function R9(e){const[t,r]=ee.useState(e),a=ee.useCallback(s=>r(o=>yN(s,o)),[]);return[t,r,a]}function D9({dimensions:e,lineWidth:t,variant:r,className:a}){return g.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ln(["react-flow__background-pattern",r,a])})}function j9({radius:e,className:t}){return g.jsx("circle",{cx:e,cy:e,r:e,className:ln(["react-flow__background-pattern","dots",t])})}var da;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(da||(da={}));const L9={[da.Dots]:1,[da.Lines]:1,[da.Cross]:6},z9=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function VN({id:e,variant:t=da.Dots,gap:r=20,size:a,lineWidth:s=1,offset:o=0,color:c,bgColor:d,style:f,className:h,patternClassName:m}){const p=ee.useRef(null),{transform:y,patternId:x}=dt(z9,qt),_=a||L9[t],N=t===da.Dots,S=t===da.Cross,w=Array.isArray(r)?r:[r,r],k=[w[0]*y[2]||1,w[1]*y[2]||1],E=_*y[2],M=Array.isArray(o)?o:[o,o],I=S?[E,E]:k,R=[M[0]*y[2]||1+I[0]/2,M[1]*y[2]||1+I[1]/2],U=`${x}${e||""}`;return g.jsxs("svg",{className:ln(["react-flow__background",h]),style:{...f,...rd,"--xy-background-color-props":d,"--xy-background-pattern-color-props":c},ref:p,"data-testid":"rf__background",children:[g.jsx("pattern",{id:U,x:y[0]%k[0],y:y[1]%k[1],width:k[0],height:k[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${R[0]},-${R[1]})`,children:N?g.jsx(j9,{radius:E/2,className:m}):g.jsx(D9,{dimensions:I,lineWidth:s,variant:t,className:m})}),g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${U})`})]})}VN.displayName="Background";const I9=ee.memo(VN);function B9(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:g.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function U9(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:g.jsx("path",{d:"M0 0h32v4.2H0z"})})}function H9(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:g.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 $9(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:g.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 q9(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:g.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 du({children:e,className:t,...r}){return g.jsx("button",{type:"button",className:ln(["react-flow__controls-button",t]),...r,children:e})}const P9=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function YN({style:e,showZoom:t=!0,showFitView:r=!0,showInteractive:a=!0,fitViewOptions:s,onZoomIn:o,onZoomOut:c,onFitView:d,onInteractiveChange:f,className:h,children:m,position:p="bottom-left",orientation:y="vertical","aria-label":x}){const _=Lt(),{isInteractive:N,minZoomReached:S,maxZoomReached:w,ariaLabelConfig:k}=dt(P9,qt),{zoomIn:E,zoomOut:M,fitView:I}=Uo(),R=()=>{E(),o==null||o()},U=()=>{M(),c==null||c()},B=()=>{I(s),d==null||d()},Z=()=>{_.setState({nodesDraggable:!N,nodesConnectable:!N,elementsSelectable:!N}),f==null||f(!N)},D=y==="horizontal"?"horizontal":"vertical";return g.jsxs(nd,{className:ln(["react-flow__controls",D,h]),position:p,style:e,"data-testid":"rf__controls","aria-label":x??k["controls.ariaLabel"],children:[t&&g.jsxs(g.Fragment,{children:[g.jsx(du,{onClick:R,className:"react-flow__controls-zoomin",title:k["controls.zoomIn.ariaLabel"],"aria-label":k["controls.zoomIn.ariaLabel"],disabled:w,children:g.jsx(B9,{})}),g.jsx(du,{onClick:U,className:"react-flow__controls-zoomout",title:k["controls.zoomOut.ariaLabel"],"aria-label":k["controls.zoomOut.ariaLabel"],disabled:S,children:g.jsx(U9,{})})]}),r&&g.jsx(du,{className:"react-flow__controls-fitview",onClick:B,title:k["controls.fitView.ariaLabel"],"aria-label":k["controls.fitView.ariaLabel"],children:g.jsx(H9,{})}),a&&g.jsx(du,{className:"react-flow__controls-interactive",onClick:Z,title:k["controls.interactive.ariaLabel"],"aria-label":k["controls.interactive.ariaLabel"],children:N?g.jsx(q9,{}):g.jsx($9,{})}),m]})}YN.displayName="Controls";const F9=ee.memo(YN);function G9({id:e,x:t,y:r,width:a,height:s,style:o,color:c,strokeColor:d,strokeWidth:f,className:h,borderRadius:m,shapeRendering:p,selected:y,onClick:x}){const{background:_,backgroundColor:N}=o||{},S=c||_||N;return g.jsx("rect",{className:ln(["react-flow__minimap-node",{selected:y},h]),x:t,y:r,rx:m,ry:m,width:a,height:s,style:{fill:S,stroke:d,strokeWidth:f},shapeRendering:p,onClick:x?w=>x(w,e):void 0})}const V9=ee.memo(G9),Y9=e=>e.nodes.map(t=>t.id),Cm=e=>e instanceof Function?e:()=>e;function X9({nodeStrokeColor:e,nodeColor:t,nodeClassName:r="",nodeBorderRadius:a=5,nodeStrokeWidth:s,nodeComponent:o=V9,onClick:c}){const d=dt(Y9,qt),f=Cm(t),h=Cm(e),m=Cm(r),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return g.jsx(g.Fragment,{children:d.map(y=>g.jsx(Z9,{id:y,nodeColorFunc:f,nodeStrokeColorFunc:h,nodeClassNameFunc:m,nodeBorderRadius:a,nodeStrokeWidth:s,NodeComponent:o,onClick:c,shapeRendering:p},y))})}function K9({id:e,nodeColorFunc:t,nodeStrokeColorFunc:r,nodeClassNameFunc:a,nodeBorderRadius:s,nodeStrokeWidth:o,shapeRendering:c,NodeComponent:d,onClick:f}){const{node:h,x:m,y:p,width:y,height:x}=dt(_=>{const N=_.nodeLookup.get(e);if(!N)return{node:void 0,x:0,y:0,width:0,height:0};const S=N.internals.userNode,{x:w,y:k}=N.internals.positionAbsolute,{width:E,height:M}=Qr(S);return{node:S,x:w,y:k,width:E,height:M}},qt);return!h||h.hidden||!VE(h)?null:g.jsx(d,{x:m,y:p,width:y,height:x,style:h.style,selected:!!h.selected,className:a(h),color:t(h),borderRadius:s,strokeColor:r(h),strokeWidth:o,shapeRendering:c,onClick:f,id:h.id})}const Z9=ee.memo(K9);var Q9=ee.memo(X9);const W9=200,J9=150,eB=e=>!e.hidden,tB=e=>{const t={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:t,boundingRect:e.nodeLookup.size>0?PE(zo(e.nodeLookup,{filter:eB}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},V1=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,nB=(e,t)=>V1(e.viewBB,t.viewBB)&&V1(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,rB="react-flow__minimap-desc";function XN({style:e,className:t,nodeStrokeColor:r,nodeColor:a,nodeClassName:s="",nodeBorderRadius:o=5,nodeStrokeWidth:c,nodeComponent:d,bgColor:f,maskColor:h,maskStrokeColor:m,maskStrokeWidth:p,position:y="bottom-right",onClick:x,onNodeClick:_,pannable:N=!1,zoomable:S=!1,ariaLabel:w,inversePan:k,zoomStep:E=1,offsetScale:M=5}){const I=Lt(),R=ee.useRef(null),{boundingRect:U,viewBB:B,rfId:Z,panZoom:D,translateExtent:z,flowWidth:V,flowHeight:P,ariaLabelConfig:C}=dt(tB,nB),$=(e==null?void 0:e.width)??W9,O=(e==null?void 0:e.height)??J9,H=U.width/$,X=U.height/O,K=Math.max(H,X),T=K*$,j=K*O,Y=M*K,L=U.x-(T-U.width)/2-Y,G=U.y-(j-U.height)/2-Y,q=T+Y*2,Q=j+Y*2,J=`${rB}-${Z}`,W=ee.useRef(0),te=ee.useRef();W.current=K,ee.useEffect(()=>{if(R.current&&D)return te.current=mI({domNode:R.current,panZoom:D,getTransform:()=>I.getState().transform,getViewScale:()=>W.current}),()=>{var we;(we=te.current)==null||we.destroy()}},[D]),ee.useEffect(()=>{var we;(we=te.current)==null||we.update({translateExtent:z,width:V,height:P,inversePan:k,pannable:N,zoomStep:E,zoomable:S})},[N,S,k,E,z,V,P]);const ce=x?we=>{var $e;const[Ne,je]=(($e=te.current)==null?void 0:$e.pointer(we))||[0,0];x(we,{x:Ne,y:je})}:void 0,fe=_?ee.useCallback((we,Ne)=>{const je=I.getState().nodeLookup.get(Ne).internals.userNode;_(we,je)},[]):void 0,be=w??C["minimap.ariaLabel"];return g.jsx(nd,{position:y,style:{...e,"--xy-minimap-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*K:void 0,"--xy-minimap-node-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof c=="number"?c:void 0},className:ln(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:g.jsxs("svg",{width:$,height:O,viewBox:`${L} ${G} ${q} ${Q}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":J,ref:R,onClick:ce,children:[be&&g.jsx("title",{id:J,children:be}),g.jsx(Q9,{onClick:fe,nodeColor:a,nodeStrokeColor:r,nodeBorderRadius:o,nodeClassName:s,nodeStrokeWidth:c,nodeComponent:d}),g.jsx("path",{className:"react-flow__minimap-mask",d:`M${L-Y},${G-Y}h${q+Y*2}v${Q+Y*2}h${-q-Y*2}z - M${B.x},${B.y}h${B.width}v${B.height}h${-B.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}XN.displayName="MiniMap";const iB=ee.memo(XN),aB=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,sB={[Js.Line]:"right",[Js.Handle]:"bottom-right"};function lB({nodeId:e,position:t,variant:r=Js.Handle,className:a,style:s=void 0,children:o,color:c,minWidth:d=10,minHeight:f=10,maxWidth:h=Number.MAX_VALUE,maxHeight:m=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:y,autoScale:x=!0,shouldResize:_,onResizeStart:N,onResize:S,onResizeEnd:w}){const k=SN(),E=typeof e=="string"?e:k,M=Lt(),I=ee.useRef(null),R=r===Js.Handle,U=dt(ee.useCallback(aB(R&&x),[R,x]),qt),B=ee.useRef(null),Z=t??sB[r];ee.useEffect(()=>{if(!(!I.current||!E))return B.current||(B.current=TI({domNode:I.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:z,transform:V,snapGrid:P,snapToGrid:C,nodeOrigin:$,domNode:O}=M.getState();return{nodeLookup:z,transform:V,snapGrid:P,snapToGrid:C,nodeOrigin:$,paneDomNode:O}},onChange:(z,V)=>{const{triggerNodeChanges:P,nodeLookup:C,parentLookup:$,nodeOrigin:O}=M.getState(),H=[],X={x:z.x,y:z.y},K=C.get(E);if(K&&K.expandParent&&K.parentId){const T=K.origin??O,j=z.width??K.measured.width??0,Y=z.height??K.measured.height??0,L={id:K.id,parentId:K.parentId,rect:{width:j,height:Y,...YE({x:z.x??K.position.x,y:z.y??K.position.y},{width:j,height:Y},K.parentId,C,T)}},G=lg([L],C,$,O);H.push(...G),X.x=z.x?Math.max(T[0]*j,z.x):void 0,X.y=z.y?Math.max(T[1]*Y,z.y):void 0}if(X.x!==void 0&&X.y!==void 0){const T={id:E,type:"position",position:{...X}};H.push(T)}if(z.width!==void 0&&z.height!==void 0){const j={id:E,type:"dimensions",resizing:!0,setAttributes:y?y==="horizontal"?"width":"height":!0,dimensions:{width:z.width,height:z.height}};H.push(j)}for(const T of V){const j={...T,type:"position"};H.push(j)}P(H)},onEnd:({width:z,height:V})=>{const P={id:E,type:"dimensions",resizing:!1,dimensions:{width:z,height:V}};M.getState().triggerNodeChanges([P])}})),B.current.update({controlPosition:Z,boundaries:{minWidth:d,minHeight:f,maxWidth:h,maxHeight:m},keepAspectRatio:p,resizeDirection:y,onResizeStart:N,onResize:S,onResizeEnd:w,shouldResize:_}),()=>{var z;(z=B.current)==null||z.destroy()}},[Z,d,f,h,m,p,N,S,w,_]);const D=Z.split("-");return g.jsx("div",{className:ln(["react-flow__resize-control","nodrag",...D,r,a]),ref:I,style:{...s,scale:U,...c&&{[R?"backgroundColor":"borderColor"]:c}},children:o})}ee.memo(lB);var vt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zr=vt((e,t)=>{var r=Object.defineProperty,a=(P,C,$)=>C in P?r(P,C,{enumerable:!0,configurable:!0,writable:!0,value:$}):P[C]=$,s=(P,C)=>()=>(C||P((C={exports:{}}).exports,C),C.exports),o=(P,C,$)=>a(P,typeof C!="symbol"?C+"":C,$),c=s((P,C)=>{var $="\0",O="\0",H="",X=class{constructor(G){o(this,"_isDirected",!0),o(this,"_isMultigraph",!1),o(this,"_isCompound",!1),o(this,"_label"),o(this,"_defaultNodeLabelFn",()=>{}),o(this,"_defaultEdgeLabelFn",()=>{}),o(this,"_nodes",{}),o(this,"_in",{}),o(this,"_preds",{}),o(this,"_out",{}),o(this,"_sucs",{}),o(this,"_edgeObjs",{}),o(this,"_edgeLabels",{}),o(this,"_nodeCount",0),o(this,"_edgeCount",0),o(this,"_parent"),o(this,"_children"),G&&(this._isDirected=Object.hasOwn(G,"directed")?G.directed:!0,this._isMultigraph=Object.hasOwn(G,"multigraph")?G.multigraph:!1,this._isCompound=Object.hasOwn(G,"compound")?G.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[O]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(G){return this._label=G,this}graph(){return this._label}setDefaultNodeLabel(G){return this._defaultNodeLabelFn=G,typeof G!="function"&&(this._defaultNodeLabelFn=()=>G),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var G=this;return this.nodes().filter(q=>Object.keys(G._in[q]).length===0)}sinks(){var G=this;return this.nodes().filter(q=>Object.keys(G._out[q]).length===0)}setNodes(G,q){var Q=arguments,J=this;return G.forEach(function(W){Q.length>1?J.setNode(W,q):J.setNode(W)}),this}setNode(G,q){return Object.hasOwn(this._nodes,G)?(arguments.length>1&&(this._nodes[G]=q),this):(this._nodes[G]=arguments.length>1?q:this._defaultNodeLabelFn(G),this._isCompound&&(this._parent[G]=O,this._children[G]={},this._children[O][G]=!0),this._in[G]={},this._preds[G]={},this._out[G]={},this._sucs[G]={},++this._nodeCount,this)}node(G){return this._nodes[G]}hasNode(G){return Object.hasOwn(this._nodes,G)}removeNode(G){var q=this;if(Object.hasOwn(this._nodes,G)){var Q=J=>q.removeEdge(q._edgeObjs[J]);delete this._nodes[G],this._isCompound&&(this._removeFromParentsChildList(G),delete this._parent[G],this.children(G).forEach(function(J){q.setParent(J)}),delete this._children[G]),Object.keys(this._in[G]).forEach(Q),delete this._in[G],delete this._preds[G],Object.keys(this._out[G]).forEach(Q),delete this._out[G],delete this._sucs[G],--this._nodeCount}return this}setParent(G,q){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(q===void 0)q=O;else{q+="";for(var Q=q;Q!==void 0;Q=this.parent(Q))if(Q===G)throw new Error("Setting "+q+" as parent of "+G+" would create a cycle");this.setNode(q)}return this.setNode(G),this._removeFromParentsChildList(G),this._parent[G]=q,this._children[q][G]=!0,this}_removeFromParentsChildList(G){delete this._children[this._parent[G]][G]}parent(G){if(this._isCompound){var q=this._parent[G];if(q!==O)return q}}children(G=O){if(this._isCompound){var q=this._children[G];if(q)return Object.keys(q)}else{if(G===O)return this.nodes();if(this.hasNode(G))return[]}}predecessors(G){var q=this._preds[G];if(q)return Object.keys(q)}successors(G){var q=this._sucs[G];if(q)return Object.keys(q)}neighbors(G){var q=this.predecessors(G);if(q){let J=new Set(q);for(var Q of this.successors(G))J.add(Q);return Array.from(J.values())}}isLeaf(G){var q;return this.isDirected()?q=this.successors(G):q=this.neighbors(G),q.length===0}filterNodes(G){var q=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});q.setGraph(this.graph());var Q=this;Object.entries(this._nodes).forEach(function([te,ce]){G(te)&&q.setNode(te,ce)}),Object.values(this._edgeObjs).forEach(function(te){q.hasNode(te.v)&&q.hasNode(te.w)&&q.setEdge(te,Q.edge(te))});var J={};function W(te){var ce=Q.parent(te);return ce===void 0||q.hasNode(ce)?(J[te]=ce,ce):ce in J?J[ce]:W(ce)}return this._isCompound&&q.nodes().forEach(te=>q.setParent(te,W(te))),q}setDefaultEdgeLabel(G){return this._defaultEdgeLabelFn=G,typeof G!="function"&&(this._defaultEdgeLabelFn=()=>G),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(G,q){var Q=this,J=arguments;return G.reduce(function(W,te){return J.length>1?Q.setEdge(W,te,q):Q.setEdge(W,te),te}),this}setEdge(){var G,q,Q,J,W=!1,te=arguments[0];typeof te=="object"&&te!==null&&"v"in te?(G=te.v,q=te.w,Q=te.name,arguments.length===2&&(J=arguments[1],W=!0)):(G=te,q=arguments[1],Q=arguments[3],arguments.length>2&&(J=arguments[2],W=!0)),G=""+G,q=""+q,Q!==void 0&&(Q=""+Q);var ce=j(this._isDirected,G,q,Q);if(Object.hasOwn(this._edgeLabels,ce))return W&&(this._edgeLabels[ce]=J),this;if(Q!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(G),this.setNode(q),this._edgeLabels[ce]=W?J:this._defaultEdgeLabelFn(G,q,Q);var fe=Y(this._isDirected,G,q,Q);return G=fe.v,q=fe.w,Object.freeze(fe),this._edgeObjs[ce]=fe,K(this._preds[q],G),K(this._sucs[G],q),this._in[q][ce]=fe,this._out[G][ce]=fe,this._edgeCount++,this}edge(G,q,Q){var J=arguments.length===1?L(this._isDirected,arguments[0]):j(this._isDirected,G,q,Q);return this._edgeLabels[J]}edgeAsObj(){let G=this.edge(...arguments);return typeof G!="object"?{label:G}:G}hasEdge(G,q,Q){var J=arguments.length===1?L(this._isDirected,arguments[0]):j(this._isDirected,G,q,Q);return Object.hasOwn(this._edgeLabels,J)}removeEdge(G,q,Q){var J=arguments.length===1?L(this._isDirected,arguments[0]):j(this._isDirected,G,q,Q),W=this._edgeObjs[J];return W&&(G=W.v,q=W.w,delete this._edgeLabels[J],delete this._edgeObjs[J],T(this._preds[q],G),T(this._sucs[G],q),delete this._in[q][J],delete this._out[G][J],this._edgeCount--),this}inEdges(G,q){return this.isDirected()?this.filterEdges(this._in[G],G,q):this.nodeEdges(G,q)}outEdges(G,q){return this.isDirected()?this.filterEdges(this._out[G],G,q):this.nodeEdges(G,q)}nodeEdges(G,q){if(G in this._nodes)return this.filterEdges({...this._in[G],...this._out[G]},G,q)}filterEdges(G,q,Q){if(G){var J=Object.values(G);return Q?J.filter(function(W){return W.v===q&&W.w===Q||W.v===Q&&W.w===q}):J}}};function K(G,q){G[q]?G[q]++:G[q]=1}function T(G,q){--G[q]||delete G[q]}function j(G,q,Q,J){var W=""+q,te=""+Q;if(!G&&W>te){var ce=W;W=te,te=ce}return W+H+te+H+(J===void 0?$:J)}function Y(G,q,Q,J){var W=""+q,te=""+Q;if(!G&&W>te){var ce=W;W=te,te=ce}var fe={v:W,w:te};return J&&(fe.name=J),fe}function L(G,q){return j(G,q.v,q.w,q.name)}C.exports=X}),d=s((P,C)=>{C.exports="3.0.2"}),f=s((P,C)=>{C.exports={Graph:c(),version:d()}}),h=s((P,C)=>{var $=c();C.exports={write:O,read:K};function O(T){var j={options:{directed:T.isDirected(),multigraph:T.isMultigraph(),compound:T.isCompound()},nodes:H(T),edges:X(T)};return T.graph()!==void 0&&(j.value=structuredClone(T.graph())),j}function H(T){return T.nodes().map(function(j){var Y=T.node(j),L=T.parent(j),G={v:j};return Y!==void 0&&(G.value=Y),L!==void 0&&(G.parent=L),G})}function X(T){return T.edges().map(function(j){var Y=T.edge(j),L={v:j.v,w:j.w};return j.name!==void 0&&(L.name=j.name),Y!==void 0&&(L.value=Y),L})}function K(T){var j=new $(T.options).setGraph(T.value);return T.nodes.forEach(function(Y){j.setNode(Y.v,Y.value),Y.parent&&j.setParent(Y.v,Y.parent)}),T.edges.forEach(function(Y){j.setEdge({v:Y.v,w:Y.w,name:Y.name},Y.value)}),j}}),m=s((P,C)=>{C.exports=O;var $=()=>1;function O(X,K,T,j){return H(X,String(K),T||$,j||function(Y){return X.outEdges(Y)})}function H(X,K,T,j){var Y={},L=!0,G=0,q=X.nodes(),Q=function(ce){var fe=T(ce);Y[ce.v].distance+fe{C.exports=$;function $(O){var H={},X=[],K;function T(j){Object.hasOwn(H,j)||(H[j]=!0,K.push(j),O.successors(j).forEach(T),O.predecessors(j).forEach(T))}return O.nodes().forEach(function(j){K=[],T(j),K.length&&X.push(K)}),X}}),y=s((P,C)=>{var $=class{constructor(){o(this,"_arr",[]),o(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(O){return O.key})}has(O){return Object.hasOwn(this._keyIndices,O)}priority(O){var H=this._keyIndices[O];if(H!==void 0)return this._arr[H].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(O,H){var X=this._keyIndices;if(O=String(O),!Object.hasOwn(X,O)){var K=this._arr,T=K.length;return X[O]=T,K.push({key:O,priority:H}),this._decrease(T),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var O=this._arr.pop();return delete this._keyIndices[O.key],this._heapify(0),O.key}decrease(O,H){var X=this._keyIndices[O];if(H>this._arr[X].priority)throw new Error("New priority is greater than current priority. Key: "+O+" Old: "+this._arr[X].priority+" New: "+H);this._arr[X].priority=H,this._decrease(X)}_heapify(O){var H=this._arr,X=2*O,K=X+1,T=O;X>1,!(H[K].priority{var $=y();C.exports=H;var O=()=>1;function H(K,T,j,Y){var L=function(G){return K.outEdges(G)};return X(K,String(T),j||O,Y||L)}function X(K,T,j,Y){var L={},G=new $,q,Q,J=function(W){var te=W.v!==q?W.v:W.w,ce=L[te],fe=j(W),be=Q.distance+fe;if(fe<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+W+" Weight: "+fe);be0&&(q=G.removeMin(),Q=L[q],Q.distance!==Number.POSITIVE_INFINITY);)Y(q).forEach(J);return L}}),_=s((P,C)=>{var $=x();C.exports=O;function O(H,X,K){return H.nodes().reduce(function(T,j){return T[j]=$(H,j,X,K),T},{})}}),N=s((P,C)=>{C.exports=$;function $(H,X,K){if(H[X].predecessor!==void 0)throw new Error("Invalid source vertex");if(H[K].predecessor===void 0&&K!==X)throw new Error("Invalid destination vertex");return{weight:H[K].distance,path:O(H,X,K)}}function O(H,X,K){for(var T=[],j=K;j!==X;)T.push(j),j=H[j].predecessor;return T.push(X),T.reverse()}}),S=s((P,C)=>{C.exports=$;function $(O){var H=0,X=[],K={},T=[];function j(Y){var L=K[Y]={onStack:!0,lowlink:H,index:H++};if(X.push(Y),O.successors(Y).forEach(function(Q){Object.hasOwn(K,Q)?K[Q].onStack&&(L.lowlink=Math.min(L.lowlink,K[Q].index)):(j(Q),L.lowlink=Math.min(L.lowlink,K[Q].lowlink))}),L.lowlink===L.index){var G=[],q;do q=X.pop(),K[q].onStack=!1,G.push(q);while(Y!==q);T.push(G)}}return O.nodes().forEach(function(Y){Object.hasOwn(K,Y)||j(Y)}),T}}),w=s((P,C)=>{var $=S();C.exports=O;function O(H){return $(H).filter(function(X){return X.length>1||X.length===1&&H.hasEdge(X[0],X[0])})}}),k=s((P,C)=>{C.exports=O;var $=()=>1;function O(X,K,T){return H(X,K||$,T||function(j){return X.outEdges(j)})}function H(X,K,T){var j={},Y=X.nodes();return Y.forEach(function(L){j[L]={},j[L][L]={distance:0},Y.forEach(function(G){L!==G&&(j[L][G]={distance:Number.POSITIVE_INFINITY})}),T(L).forEach(function(G){var q=G.v===L?G.w:G.v,Q=K(G);j[L][q]={distance:Q,predecessor:L}})}),Y.forEach(function(L){var G=j[L];Y.forEach(function(q){var Q=j[q];Y.forEach(function(J){var W=Q[L],te=G[J],ce=Q[J],fe=W.distance+te.distance;fe{function $(H){var X={},K={},T=[];function j(Y){if(Object.hasOwn(K,Y))throw new O;Object.hasOwn(X,Y)||(K[Y]=!0,X[Y]=!0,H.predecessors(Y).forEach(j),delete K[Y],T.push(Y))}if(H.sinks().forEach(j),Object.keys(X).length!==H.nodeCount())throw new O;return T}var O=class extends Error{constructor(){super(...arguments)}};C.exports=$,$.CycleException=O}),M=s((P,C)=>{var $=E();C.exports=O;function O(H){try{$(H)}catch(X){if(X instanceof $.CycleException)return!1;throw X}return!0}}),I=s((P,C)=>{C.exports=$;function $(H,X,K,T,j){Array.isArray(X)||(X=[X]);var Y=(H.isDirected()?H.successors:H.neighbors).bind(H),L={};return X.forEach(function(G){if(!H.hasNode(G))throw new Error("Graph does not have node: "+G);j=O(H,G,K==="post",L,Y,T,j)}),j}function O(H,X,K,T,j,Y,L){return Object.hasOwn(T,X)||(T[X]=!0,K||(L=Y(L,X)),j(X).forEach(function(G){L=O(H,G,K,T,j,Y,L)}),K&&(L=Y(L,X))),L}}),R=s((P,C)=>{var $=I();C.exports=O;function O(H,X,K){return $(H,X,K,function(T,j){return T.push(j),T},[])}}),U=s((P,C)=>{var $=R();C.exports=O;function O(H,X){return $(H,X,"post")}}),B=s((P,C)=>{var $=R();C.exports=O;function O(H,X){return $(H,X,"pre")}}),Z=s((P,C)=>{var $=c(),O=y();C.exports=H;function H(X,K){var T=new $,j={},Y=new O,L;function G(Q){var J=Q.v===L?Q.w:Q.v,W=Y.priority(J);if(W!==void 0){var te=K(Q);te0;){if(L=Y.removeMin(),Object.hasOwn(j,L))T.setEdge(L,j[L]);else{if(q)throw new Error("Input graph is not connected: "+X);q=!0}X.nodeEdges(L).forEach(G)}return T}}),D=s((P,C)=>{var $=x(),O=m();C.exports=H;function H(K,T,j,Y){return X(K,T,j,Y||function(L){return K.outEdges(L)})}function X(K,T,j,Y){if(j===void 0)return $(K,T,j,Y);for(var L=!1,G=K.nodes(),q=0;q{C.exports={bellmanFord:m(),components:p(),dijkstra:x(),dijkstraAll:_(),extractPath:N(),findCycles:w(),floydWarshall:k(),isAcyclic:M(),postorder:U(),preorder:B(),prim:Z(),shortestPaths:D(),reduce:I(),tarjan:S(),topsort:E()}}),V=f();t.exports={Graph:V.Graph,json:h(),alg:z(),version:V.version}}),oB=vt((e,t)=>{var r=class{constructor(){let o={};o._next=o._prev=o,this._sentinel=o}dequeue(){let o=this._sentinel,c=o._prev;if(c!==o)return a(c),c}enqueue(o){let c=this._sentinel;o._prev&&o._next&&a(o),o._next=c._next,c._next._prev=o,c._next=o,o._prev=c}toString(){let o=[],c=this._sentinel,d=c._prev;for(;d!==c;)o.push(JSON.stringify(d,s)),d=d._prev;return"["+o.join(", ")+"]"}};function a(o){o._prev._next=o._next,o._next._prev=o._prev,delete o._next,delete o._prev}function s(o,c){if(o!=="_next"&&o!=="_prev")return c}t.exports=r}),cB=vt((e,t)=>{var r=zr().Graph,a=oB();t.exports=o;var s=()=>1;function o(p,y){if(p.nodeCount()<=1)return[];let x=f(p,y||s);return c(x.graph,x.buckets,x.zeroIdx).flatMap(_=>p.outEdges(_.v,_.w))}function c(p,y,x){let _=[],N=y[y.length-1],S=y[0],w;for(;p.nodeCount();){for(;w=S.dequeue();)d(p,y,x,w);for(;w=N.dequeue();)d(p,y,x,w);if(p.nodeCount()){for(let k=y.length-2;k>0;--k)if(w=y[k].dequeue(),w){_=_.concat(d(p,y,x,w,!0));break}}}return _}function d(p,y,x,_,N){let S=N?[]:void 0;return p.inEdges(_.v).forEach(w=>{let k=p.edge(w),E=p.node(w.v);N&&S.push({v:w.v,w:w.w}),E.out-=k,h(y,x,E)}),p.outEdges(_.v).forEach(w=>{let k=p.edge(w),E=w.w,M=p.node(E);M.in-=k,h(y,x,M)}),p.removeNode(_.v),S}function f(p,y){let x=new r,_=0,N=0;p.nodes().forEach(k=>{x.setNode(k,{v:k,in:0,out:0})}),p.edges().forEach(k=>{let E=x.edge(k.v,k.w)||0,M=y(k),I=E+M;x.setEdge(k.v,k.w,I),N=Math.max(N,x.node(k.v).out+=M),_=Math.max(_,x.node(k.w).in+=M)});let S=m(N+_+3).map(()=>new a),w=_+1;return x.nodes().forEach(k=>{h(S,w,x.node(k))}),{graph:x,buckets:S,zeroIdx:w}}function h(p,y,x){x.out?x.in?p[x.out-x.in+y].enqueue(x):p[p.length-1].enqueue(x):p[0].enqueue(x)}function m(p){let y=[];for(let x=0;x{var r=zr().Graph;t.exports={addBorderNode:y,addDummyNode:a,applyWithChunking:N,asNonCompoundGraph:o,buildLayerMatrix:h,intersectRect:f,mapValues:B,maxRank:S,normalizeRanks:m,notime:E,partition:w,pick:U,predecessorWeights:d,range:R,removeEmptyRanks:p,simplify:s,successorWeights:c,time:k,uniqueId:I,zipObject:Z};function a(D,z,V,P){for(var C=P;D.hasNode(C);)C=I(P);return V.dummy=z,D.setNode(C,V),C}function s(D){let z=new r().setGraph(D.graph());return D.nodes().forEach(V=>z.setNode(V,D.node(V))),D.edges().forEach(V=>{let P=z.edge(V.v,V.w)||{weight:0,minlen:1},C=D.edge(V);z.setEdge(V.v,V.w,{weight:P.weight+C.weight,minlen:Math.max(P.minlen,C.minlen)})}),z}function o(D){let z=new r({multigraph:D.isMultigraph()}).setGraph(D.graph());return D.nodes().forEach(V=>{D.children(V).length||z.setNode(V,D.node(V))}),D.edges().forEach(V=>{z.setEdge(V,D.edge(V))}),z}function c(D){let z=D.nodes().map(V=>{let P={};return D.outEdges(V).forEach(C=>{P[C.w]=(P[C.w]||0)+D.edge(C).weight}),P});return Z(D.nodes(),z)}function d(D){let z=D.nodes().map(V=>{let P={};return D.inEdges(V).forEach(C=>{P[C.v]=(P[C.v]||0)+D.edge(C).weight}),P});return Z(D.nodes(),z)}function f(D,z){let V=D.x,P=D.y,C=z.x-V,$=z.y-P,O=D.width/2,H=D.height/2;if(!C&&!$)throw new Error("Not possible to find intersection inside of the rectangle");let X,K;return Math.abs($)*O>Math.abs(C)*H?($<0&&(H=-H),X=H*C/$,K=H):(C<0&&(O=-O),X=O,K=O*$/C),{x:V+X,y:P+K}}function h(D){let z=R(S(D)+1).map(()=>[]);return D.nodes().forEach(V=>{let P=D.node(V),C=P.rank;C!==void 0&&(z[C][P.order]=V)}),z}function m(D){let z=D.nodes().map(P=>{let C=D.node(P).rank;return C===void 0?Number.MAX_VALUE:C}),V=N(Math.min,z);D.nodes().forEach(P=>{let C=D.node(P);Object.hasOwn(C,"rank")&&(C.rank-=V)})}function p(D){let z=D.nodes().map(O=>D.node(O).rank).filter(O=>O!==void 0),V=N(Math.min,z),P=[];D.nodes().forEach(O=>{let H=D.node(O).rank-V;P[H]||(P[H]=[]),P[H].push(O)});let C=0,$=D.graph().nodeRankFactor;Array.from(P).forEach((O,H)=>{O===void 0&&H%$!==0?--C:O!==void 0&&C&&O.forEach(X=>D.node(X).rank+=C)})}function y(D,z,V,P){let C={width:0,height:0};return arguments.length>=4&&(C.rank=V,C.order=P),a(D,"border",C,z)}function x(D,z=_){let V=[];for(let P=0;P_){let V=x(z);return D.apply(null,V.map(P=>D.apply(null,P)))}else return D.apply(null,z)}function S(D){let z=D.nodes().map(V=>{let P=D.node(V).rank;return P===void 0?Number.MIN_VALUE:P});return N(Math.max,z)}function w(D,z){let V={lhs:[],rhs:[]};return D.forEach(P=>{z(P)?V.lhs.push(P):V.rhs.push(P)}),V}function k(D,z){let V=Date.now();try{return z()}finally{console.log(D+" time: "+(Date.now()-V)+"ms")}}function E(D,z){return z()}var M=0;function I(D){var z=++M;return D+(""+z)}function R(D,z,V=1){z==null&&(z=D,D=0);let P=$=>$z<$);let C=[];for(let $=D;P($);$+=V)C.push($);return C}function U(D,z){let V={};for(let P of z)D[P]!==void 0&&(V[P]=D[P]);return V}function B(D,z){let V=z;return typeof z=="string"&&(V=P=>P[z]),Object.entries(D).reduce((P,[C,$])=>(P[C]=V($,C),P),{})}function Z(D,z){return D.reduce((V,P,C)=>(V[P]=z[C],V),{})}}),uB=vt((e,t)=>{var r=cB(),a=sn().uniqueId;t.exports={run:s,undo:c};function s(d){(d.graph().acyclicer==="greedy"?r(d,f(d)):o(d)).forEach(h=>{let m=d.edge(h);d.removeEdge(h),m.forwardName=h.name,m.reversed=!0,d.setEdge(h.w,h.v,m,a("rev"))});function f(h){return m=>h.edge(m).weight}}function o(d){let f=[],h={},m={};function p(y){Object.hasOwn(m,y)||(m[y]=!0,h[y]=!0,d.outEdges(y).forEach(x=>{Object.hasOwn(h,x.w)?f.push(x):p(x.w)}),delete h[y])}return d.nodes().forEach(p),f}function c(d){d.edges().forEach(f=>{let h=d.edge(f);if(h.reversed){d.removeEdge(f);let m=h.forwardName;delete h.reversed,delete h.forwardName,d.setEdge(f.w,f.v,h,m)}})}}),dB=vt((e,t)=>{var r=sn();t.exports={run:a,undo:o};function a(c){c.graph().dummyChains=[],c.edges().forEach(d=>s(c,d))}function s(c,d){let f=d.v,h=c.node(f).rank,m=d.w,p=c.node(m).rank,y=d.name,x=c.edge(d),_=x.labelRank;if(p===h+1)return;c.removeEdge(d);let N,S,w;for(w=0,++h;h{let f=c.node(d),h=f.edgeLabel,m;for(c.setEdge(f.edgeObj,h);f.dummy;)m=c.successors(d)[0],c.removeNode(d),h.points.push({x:f.x,y:f.y}),f.dummy==="edge-label"&&(h.x=f.x,h.y=f.y,h.width=f.width,h.height=f.height),d=m,f=c.node(d)})}}),zu=vt((e,t)=>{var{applyWithChunking:r}=sn();t.exports={longestPath:a,slack:s};function a(o){var c={};function d(f){var h=o.node(f);if(Object.hasOwn(c,f))return h.rank;c[f]=!0;let m=o.outEdges(f).map(y=>y==null?Number.POSITIVE_INFINITY:d(y.w)-o.edge(y).minlen);var p=r(Math.min,m);return p===Number.POSITIVE_INFINITY&&(p=0),h.rank=p}o.sources().forEach(d)}function s(o,c){return o.node(c.w).rank-o.node(c.v).rank-o.edge(c).minlen}}),KN=vt((e,t)=>{var r=zr().Graph,a=zu().slack;t.exports=s;function s(f){var h=new r({directed:!1}),m=f.nodes()[0],p=f.nodeCount();h.setNode(m,{});for(var y,x;o(h,f){var x=y.v,_=p===x?y.w:x;!f.hasNode(_)&&!a(h,y)&&(f.setNode(_,{}),f.setEdge(p,_,{}),m(_))})}return f.nodes().forEach(m),f.nodeCount()}function c(f,h){return h.edges().reduce((m,p)=>{let y=Number.POSITIVE_INFINITY;return f.hasNode(p.v)!==f.hasNode(p.w)&&(y=a(h,p)),yh.node(p).rank+=m)}}),fB=vt((e,t)=>{var r=KN(),a=zu().slack,s=zu().longestPath,o=zr().alg.preorder,c=zr().alg.postorder,d=sn().simplify;t.exports=f,f.initLowLimValues=y,f.initCutValues=h,f.calcCutValue=p,f.leaveEdge=_,f.enterEdge=N,f.exchangeEdges=S;function f(M){M=d(M),s(M);var I=r(M);y(I),h(I,M);for(var R,U;R=_(I);)U=N(I,M,R),S(I,M,R,U)}function h(M,I){var R=c(M,M.nodes());R=R.slice(0,R.length-1),R.forEach(U=>m(M,I,U))}function m(M,I,R){var U=M.node(R),B=U.parent;M.edge(R,B).cutvalue=p(M,I,R)}function p(M,I,R){var U=M.node(R),B=U.parent,Z=!0,D=I.edge(R,B),z=0;return D||(Z=!1,D=I.edge(B,R)),z=D.weight,I.nodeEdges(R).forEach(V=>{var P=V.v===R,C=P?V.w:V.v;if(C!==B){var $=P===Z,O=I.edge(V).weight;if(z+=$?O:-O,k(M,R,C)){var H=M.edge(R,C).cutvalue;z+=$?-H:H}}}),z}function y(M,I){arguments.length<2&&(I=M.nodes()[0]),x(M,{},1,I)}function x(M,I,R,U,B){var Z=R,D=M.node(U);return I[U]=!0,M.neighbors(U).forEach(z=>{Object.hasOwn(I,z)||(R=x(M,I,R,z,U))}),D.low=Z,D.lim=R++,B?D.parent=B:delete D.parent,R}function _(M){return M.edges().find(I=>M.edge(I).cutvalue<0)}function N(M,I,R){var U=R.v,B=R.w;I.hasEdge(U,B)||(U=R.w,B=R.v);var Z=M.node(U),D=M.node(B),z=Z,V=!1;Z.lim>D.lim&&(z=D,V=!0);var P=I.edges().filter(C=>V===E(M,M.node(C.v),z)&&V!==E(M,M.node(C.w),z));return P.reduce((C,$)=>a(I,$)!I.node(B).parent),U=o(M,R);U=U.slice(1),U.forEach(B=>{var Z=M.node(B).parent,D=I.edge(B,Z),z=!1;D||(D=I.edge(Z,B),z=!0),I.node(B).rank=I.node(Z).rank+(z?D.minlen:-D.minlen)})}function k(M,I,R){return M.hasEdge(I,R)}function E(M,I,R){return R.low<=I.lim&&I.lim<=R.lim}}),hB=vt((e,t)=>{var r=zu(),a=r.longestPath,s=KN(),o=fB();t.exports=c;function c(m){var p=m.graph().ranker;if(p instanceof Function)return p(m);switch(m.graph().ranker){case"network-simplex":h(m);break;case"tight-tree":f(m);break;case"longest-path":d(m);break;case"none":break;default:h(m)}}var d=a;function f(m){a(m),s(m)}function h(m){o(m)}}),mB=vt((e,t)=>{t.exports=r;function r(o){let c=s(o);o.graph().dummyChains.forEach(d=>{let f=o.node(d),h=f.edgeObj,m=a(o,c,h.v,h.w),p=m.path,y=m.lca,x=0,_=p[x],N=!0;for(;d!==h.w;){if(f=o.node(d),N){for(;(_=p[x])!==y&&o.node(_).maxRankp||y>c[x].lim));for(_=x,x=f;(x=o.parent(x))!==_;)m.push(x);return{path:h.concat(m.reverse()),lca:_}}function s(o){let c={},d=0;function f(h){let m=d;o.children(h).forEach(f),c[h]={low:m,lim:d++}}return o.children().forEach(f),c}}),pB=vt((e,t)=>{var r=sn();t.exports={run:a,cleanup:d};function a(f){let h=r.addDummyNode(f,"root",{},"_root"),m=o(f),p=Object.values(m),y=r.applyWithChunking(Math.max,p)-1,x=2*y+1;f.graph().nestingRoot=h,f.edges().forEach(N=>f.edge(N).minlen*=x);let _=c(f)+1;f.children().forEach(N=>s(f,h,x,_,y,m,N)),f.graph().nodeRankFactor=x}function s(f,h,m,p,y,x,_){let N=f.children(_);if(!N.length){_!==h&&f.setEdge(h,_,{weight:0,minlen:m});return}let S=r.addBorderNode(f,"_bt"),w=r.addBorderNode(f,"_bb"),k=f.node(_);f.setParent(S,_),k.borderTop=S,f.setParent(w,_),k.borderBottom=w,N.forEach(E=>{s(f,h,m,p,y,x,E);let M=f.node(E),I=M.borderTop?M.borderTop:E,R=M.borderBottom?M.borderBottom:E,U=M.borderTop?p:2*p,B=I!==R?1:y-x[_]+1;f.setEdge(S,I,{weight:U,minlen:B,nestingEdge:!0}),f.setEdge(R,w,{weight:U,minlen:B,nestingEdge:!0})}),f.parent(_)||f.setEdge(h,S,{weight:0,minlen:y+x[_]})}function o(f){var h={};function m(p,y){var x=f.children(p);x&&x.length&&x.forEach(_=>m(_,y+1)),h[p]=y}return f.children().forEach(p=>m(p,1)),h}function c(f){return f.edges().reduce((h,m)=>h+f.edge(m).weight,0)}function d(f){var h=f.graph();f.removeNode(h.nestingRoot),delete h.nestingRoot,f.edges().forEach(m=>{var p=f.edge(m);p.nestingEdge&&f.removeEdge(m)})}}),gB=vt((e,t)=>{var r=sn();t.exports=a;function a(o){function c(d){let f=o.children(d),h=o.node(d);if(f.length&&f.forEach(c),Object.hasOwn(h,"minRank")){h.borderLeft=[],h.borderRight=[];for(let m=h.minRank,p=h.maxRank+1;m{t.exports={adjust:r,undo:a};function r(m){let p=m.graph().rankdir.toLowerCase();(p==="lr"||p==="rl")&&s(m)}function a(m){let p=m.graph().rankdir.toLowerCase();(p==="bt"||p==="rl")&&c(m),(p==="lr"||p==="rl")&&(f(m),s(m))}function s(m){m.nodes().forEach(p=>o(m.node(p))),m.edges().forEach(p=>o(m.edge(p)))}function o(m){let p=m.width;m.width=m.height,m.height=p}function c(m){m.nodes().forEach(p=>d(m.node(p))),m.edges().forEach(p=>{let y=m.edge(p);y.points.forEach(d),Object.hasOwn(y,"y")&&d(y)})}function d(m){m.y=-m.y}function f(m){m.nodes().forEach(p=>h(m.node(p))),m.edges().forEach(p=>{let y=m.edge(p);y.points.forEach(h),Object.hasOwn(y,"x")&&h(y)})}function h(m){let p=m.x;m.x=m.y,m.y=p}}),xB=vt((e,t)=>{var r=sn();t.exports=a;function a(s){let o={},c=s.nodes().filter(p=>!s.children(p).length),d=c.map(p=>s.node(p).rank),f=r.applyWithChunking(Math.max,d),h=r.range(f+1).map(()=>[]);function m(p){if(o[p])return;o[p]=!0;let y=s.node(p);h[y.rank].push(p),s.successors(p).forEach(m)}return c.sort((p,y)=>s.node(p).rank-s.node(y).rank).forEach(m),h}}),yB=vt((e,t)=>{var r=sn().zipObject;t.exports=a;function a(o,c){let d=0;for(let f=1;fN)),h=c.flatMap(_=>o.outEdges(_).map(N=>({pos:f[N.w],weight:o.edge(N).weight})).sort((N,S)=>N.pos-S.pos)),m=1;for(;m{let N=_.pos+m;y[N]+=_.weight;let S=0;for(;N>0;)N%2&&(S+=y[N+1]),N=N-1>>1,y[N]+=_.weight;x+=_.weight*S}),x}}),vB=vt((e,t)=>{t.exports=r;function r(a,s=[]){return s.map(o=>{let c=a.inEdges(o);if(c.length){let d=c.reduce((f,h)=>{let m=a.edge(h),p=a.node(h.v);return{sum:f.sum+m.weight*p.order,weight:f.weight+m.weight}},{sum:0,weight:0});return{v:o,barycenter:d.sum/d.weight,weight:d.weight}}else return{v:o}})}}),_B=vt((e,t)=>{var r=sn();t.exports=a;function a(c,d){let f={};c.forEach((m,p)=>{let y=f[m.v]={indegree:0,in:[],out:[],vs:[m.v],i:p};m.barycenter!==void 0&&(y.barycenter=m.barycenter,y.weight=m.weight)}),d.edges().forEach(m=>{let p=f[m.v],y=f[m.w];p!==void 0&&y!==void 0&&(y.indegree++,p.out.push(f[m.w]))});let h=Object.values(f).filter(m=>!m.indegree);return s(h)}function s(c){let d=[];function f(m){return p=>{p.merged||(p.barycenter===void 0||m.barycenter===void 0||p.barycenter>=m.barycenter)&&o(m,p)}}function h(m){return p=>{p.in.push(m),--p.indegree===0&&c.push(p)}}for(;c.length;){let m=c.pop();d.push(m),m.in.reverse().forEach(f(m)),m.out.forEach(h(m))}return d.filter(m=>!m.merged).map(m=>r.pick(m,["vs","i","barycenter","weight"]))}function o(c,d){let f=0,h=0;c.weight&&(f+=c.barycenter*c.weight,h+=c.weight),d.weight&&(f+=d.barycenter*d.weight,h+=d.weight),c.vs=d.vs.concat(c.vs),c.barycenter=f/h,c.weight=h,c.i=Math.min(d.i,c.i),d.merged=!0}}),wB=vt((e,t)=>{var r=sn();t.exports=a;function a(c,d){let f=r.partition(c,S=>Object.hasOwn(S,"barycenter")),h=f.lhs,m=f.rhs.sort((S,w)=>w.i-S.i),p=[],y=0,x=0,_=0;h.sort(o(!!d)),_=s(p,m,_),h.forEach(S=>{_+=S.vs.length,p.push(S.vs),y+=S.barycenter*S.weight,x+=S.weight,_=s(p,m,_)});let N={vs:p.flat(!0)};return x&&(N.barycenter=y/x,N.weight=x),N}function s(c,d,f){let h;for(;d.length&&(h=d[d.length-1]).i<=f;)d.pop(),c.push(h.vs),f++;return f}function o(c){return(d,f)=>d.barycenterf.barycenter?1:c?f.i-d.i:d.i-f.i}}),EB=vt((e,t)=>{var r=vB(),a=_B(),s=wB();t.exports=o;function o(f,h,m,p){let y=f.children(h),x=f.node(h),_=x?x.borderLeft:void 0,N=x?x.borderRight:void 0,S={};_&&(y=y.filter(M=>M!==_&&M!==N));let w=r(f,y);w.forEach(M=>{if(f.children(M.v).length){let I=o(f,M.v,m,p);S[M.v]=I,Object.hasOwn(I,"barycenter")&&d(M,I)}});let k=a(w,m);c(k,S);let E=s(k,p);if(_&&(E.vs=[_,E.vs,N].flat(!0),f.predecessors(_).length)){let M=f.node(f.predecessors(_)[0]),I=f.node(f.predecessors(N)[0]);Object.hasOwn(E,"barycenter")||(E.barycenter=0,E.weight=0),E.barycenter=(E.barycenter*E.weight+M.order+I.order)/(E.weight+2),E.weight+=2}return E}function c(f,h){f.forEach(m=>{m.vs=m.vs.flatMap(p=>h[p]?h[p].vs:p)})}function d(f,h){f.barycenter!==void 0?(f.barycenter=(f.barycenter*f.weight+h.barycenter*h.weight)/(f.weight+h.weight),f.weight+=h.weight):(f.barycenter=h.barycenter,f.weight=h.weight)}}),NB=vt((e,t)=>{var r=zr().Graph,a=sn();t.exports=s;function s(c,d,f,h){h||(h=c.nodes());let m=o(c),p=new r({compound:!0}).setGraph({root:m}).setDefaultNodeLabel(y=>c.node(y));return h.forEach(y=>{let x=c.node(y),_=c.parent(y);(x.rank===d||x.minRank<=d&&d<=x.maxRank)&&(p.setNode(y),p.setParent(y,_||m),c[f](y).forEach(N=>{let S=N.v===y?N.w:N.v,w=p.edge(S,y),k=w!==void 0?w.weight:0;p.setEdge(S,y,{weight:c.edge(N).weight+k})}),Object.hasOwn(x,"minRank")&&p.setNode(y,{borderLeft:x.borderLeft[d],borderRight:x.borderRight[d]}))}),p}function o(c){for(var d;c.hasNode(d=a.uniqueId("_root")););return d}}),SB=vt((e,t)=>{t.exports=r;function r(a,s,o){let c={},d;o.forEach(f=>{let h=a.parent(f),m,p;for(;h;){if(m=a.parent(h),m?(p=c[m],c[m]=h):(p=d,d=h),p&&p!==h){s.setEdge(p,h);return}h=m}})}}),kB=vt((e,t)=>{var r=xB(),a=yB(),s=EB(),o=NB(),c=SB(),d=zr().Graph,f=sn();t.exports=h;function h(x,_={}){if(typeof _.customOrder=="function"){_.customOrder(x,h);return}let N=f.maxRank(x),S=m(x,f.range(1,N+1),"inEdges"),w=m(x,f.range(N-1,-1,-1),"outEdges"),k=r(x);if(y(x,k),_.disableOptimalOrderHeuristic)return;let E=Number.POSITIVE_INFINITY,M,I=_.constraints||[];for(let R=0,U=0;U<4;++R,++U){p(R%2?S:w,R%4>=2,I),k=f.buildLayerMatrix(x);let B=a(x,k);B{S.has(k)||S.set(k,[]),S.get(k).push(E)};for(let k of x.nodes()){let E=x.node(k);if(typeof E.rank=="number"&&w(E.rank,k),typeof E.minRank=="number"&&typeof E.maxRank=="number")for(let M=E.minRank;M<=E.maxRank;M++)M!==E.rank&&w(M,k)}return _.map(function(k){return o(x,k,N,S.get(k)||[])})}function p(x,_,N){let S=new d;x.forEach(function(w){N.forEach(M=>S.setEdge(M.left,M.right));let k=w.graph().root,E=s(w,k,S,_);E.vs.forEach((M,I)=>w.node(M).order=I),c(w,S,E.vs)})}function y(x,_){Object.values(_).forEach(N=>N.forEach((S,w)=>x.node(S).order=w))}}),TB=vt((e,t)=>{var r=zr().Graph,a=sn();t.exports={positionX:N,findType1Conflicts:s,findType2Conflicts:o,addConflict:d,hasConflict:f,verticalAlignment:h,horizontalCompaction:m,alignCoordinates:x,findSmallestWidthAlignment:y,balance:_};function s(k,E){let M={};function I(R,U){let B=0,Z=0,D=R.length,z=U[U.length-1];return U.forEach((V,P)=>{let C=c(k,V),$=C?k.node(C).order:D;(C||V===z)&&(U.slice(Z,P+1).forEach(O=>{k.predecessors(O).forEach(H=>{let X=k.node(H),K=X.order;(K{V=U[P],k.node(V).dummy&&k.predecessors(V).forEach(C=>{let $=k.node(C);$.dummy&&($.orderz)&&d(M,C,V)})})}function R(U,B){let Z=-1,D,z=0;return B.forEach((V,P)=>{if(k.node(V).dummy==="border"){let C=k.predecessors(V);C.length&&(D=k.node(C[0]).order,I(B,z,P,Z,D),z=P,Z=D)}I(B,z,B.length,D,U.length)}),B}return E.length&&E.reduce(R),M}function c(k,E){if(k.node(E).dummy)return k.predecessors(E).find(M=>k.node(M).dummy)}function d(k,E,M){if(E>M){let R=E;E=M,M=R}let I=k[E];I||(k[E]=I={}),I[M]=!0}function f(k,E,M){if(E>M){let I=E;E=M,M=I}return!!k[E]&&Object.hasOwn(k[E],M)}function h(k,E,M,I){let R={},U={},B={};return E.forEach(Z=>{Z.forEach((D,z)=>{R[D]=D,U[D]=D,B[D]=z})}),E.forEach(Z=>{let D=-1;Z.forEach(z=>{let V=I(z);if(V.length){V=V.sort((C,$)=>B[C]-B[$]);let P=(V.length-1)/2;for(let C=Math.floor(P),$=Math.ceil(P);C<=$;++C){let O=V[C];U[z]===z&&DMath.max(C,U[$.v]+B.edge($)),0)}function V(P){let C=B.outEdges(P).reduce((O,H)=>Math.min(O,U[H.w]-B.edge(H)),Number.POSITIVE_INFINITY),$=k.node(P);C!==Number.POSITIVE_INFINITY&&$.borderType!==Z&&(U[P]=Math.max(U[P],C))}return D(z,B.predecessors.bind(B)),D(V,B.successors.bind(B)),Object.keys(I).forEach(P=>U[P]=U[M[P]]),U}function p(k,E,M,I){let R=new r,U=k.graph(),B=S(U.nodesep,U.edgesep,I);return E.forEach(Z=>{let D;Z.forEach(z=>{let V=M[z];if(R.setNode(V),D){var P=M[D],C=R.edge(P,V);R.setEdge(P,V,Math.max(B(k,z,D),C||0))}D=z})}),R}function y(k,E){return Object.values(E).reduce((M,I)=>{let R=Number.NEGATIVE_INFINITY,U=Number.POSITIVE_INFINITY;Object.entries(I).forEach(([Z,D])=>{let z=w(k,Z)/2;R=Math.max(D+z,R),U=Math.min(D-z,U)});let B=R-U;return B{["l","r"].forEach(B=>{let Z=U+B,D=k[Z];if(D===E)return;let z=Object.values(D),V=I-a.applyWithChunking(Math.min,z);B!=="l"&&(V=R-a.applyWithChunking(Math.max,z)),V&&(k[Z]=a.mapValues(D,P=>P+V))})})}function _(k,E){return a.mapValues(k.ul,(M,I)=>{if(E)return k[E.toLowerCase()][I];{let R=Object.values(k).map(U=>U[I]).sort((U,B)=>U-B);return(R[1]+R[2])/2}})}function N(k){let E=a.buildLayerMatrix(k),M=Object.assign(s(k,E),o(k,E)),I={},R;["u","d"].forEach(B=>{R=B==="u"?E:Object.values(E).reverse(),["l","r"].forEach(Z=>{Z==="r"&&(R=R.map(P=>Object.values(P).reverse()));let D=(B==="u"?k.predecessors:k.successors).bind(k),z=h(k,R,M,D),V=m(k,R,z.root,z.align,Z==="r");Z==="r"&&(V=a.mapValues(V,P=>-P)),I[B+Z]=V})});let U=y(k,I);return x(I,U),_(I,k.graph().align)}function S(k,E,M){return(I,R,U)=>{let B=I.node(R),Z=I.node(U),D=0,z;if(D+=B.width/2,Object.hasOwn(B,"labelpos"))switch(B.labelpos.toLowerCase()){case"l":z=-B.width/2;break;case"r":z=B.width/2;break}if(z&&(D+=M?z:-z),z=0,D+=(B.dummy?E:k)/2,D+=(Z.dummy?E:k)/2,D+=Z.width/2,Object.hasOwn(Z,"labelpos"))switch(Z.labelpos.toLowerCase()){case"l":z=Z.width/2;break;case"r":z=-Z.width/2;break}return z&&(D+=M?z:-z),z=0,D}}function w(k,E){return k.node(E).width}}),CB=vt((e,t)=>{var r=sn(),a=TB().positionX;t.exports=s;function s(c){c=r.asNonCompoundGraph(c),o(c),Object.entries(a(c)).forEach(([d,f])=>c.node(d).x=f)}function o(c){let d=r.buildLayerMatrix(c),f=c.graph().ranksep,h=c.graph().rankalign,m=0;d.forEach(p=>{let y=p.reduce((x,_)=>{let N=c.node(_).height;return x>N?x:N},0);p.forEach(x=>{let _=c.node(x);h==="top"?_.y=m+_.height/2:h==="bottom"?_.y=m+y-_.height/2:_.y=m+y/2}),m+=y+f})}}),AB=vt((e,t)=>{var r=uB(),a=dB(),s=hB(),o=sn().normalizeRanks,c=mB(),d=sn().removeEmptyRanks,f=pB(),h=gB(),m=bB(),p=kB(),y=CB(),x=sn(),_=zr().Graph;t.exports=N;function N(q,Q={}){let J=Q.debugTiming?x.time:x.notime;return J("layout",()=>{let W=J(" buildLayoutGraph",()=>D(q));return J(" runLayout",()=>S(W,J,Q)),J(" updateInputGraph",()=>w(q,W)),W})}function S(q,Q,J){Q(" makeSpaceForEdgeLabels",()=>z(q)),Q(" removeSelfEdges",()=>T(q)),Q(" acyclic",()=>r.run(q)),Q(" nestingGraph.run",()=>f.run(q)),Q(" rank",()=>s(x.asNonCompoundGraph(q))),Q(" injectEdgeLabelProxies",()=>V(q)),Q(" removeEmptyRanks",()=>d(q)),Q(" nestingGraph.cleanup",()=>f.cleanup(q)),Q(" normalizeRanks",()=>o(q)),Q(" assignRankMinMax",()=>P(q)),Q(" removeEdgeLabelProxies",()=>C(q)),Q(" normalize.run",()=>a.run(q)),Q(" parentDummyChains",()=>c(q)),Q(" addBorderSegments",()=>h(q)),Q(" order",()=>p(q,J)),Q(" insertSelfEdges",()=>j(q)),Q(" adjustCoordinateSystem",()=>m.adjust(q)),Q(" position",()=>y(q)),Q(" positionSelfEdges",()=>Y(q)),Q(" removeBorderNodes",()=>K(q)),Q(" normalize.undo",()=>a.undo(q)),Q(" fixupEdgeLabelCoords",()=>H(q)),Q(" undoCoordinateSystem",()=>m.undo(q)),Q(" translateGraph",()=>$(q)),Q(" assignNodeIntersects",()=>O(q)),Q(" reversePoints",()=>X(q)),Q(" acyclic.undo",()=>r.undo(q))}function w(q,Q){q.nodes().forEach(J=>{let W=q.node(J),te=Q.node(J);W&&(W.x=te.x,W.y=te.y,W.order=te.order,W.rank=te.rank,Q.children(J).length&&(W.width=te.width,W.height=te.height))}),q.edges().forEach(J=>{let W=q.edge(J),te=Q.edge(J);W.points=te.points,Object.hasOwn(te,"x")&&(W.x=te.x,W.y=te.y)}),q.graph().width=Q.graph().width,q.graph().height=Q.graph().height}var k=["nodesep","edgesep","ranksep","marginx","marginy"],E={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},M=["acyclicer","ranker","rankdir","align","rankalign"],I=["width","height","rank"],R={width:0,height:0},U=["minlen","weight","width","height","labeloffset"],B={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Z=["labelpos"];function D(q){let Q=new _({multigraph:!0,compound:!0}),J=G(q.graph());return Q.setGraph(Object.assign({},E,L(J,k),x.pick(J,M))),q.nodes().forEach(W=>{let te=G(q.node(W)),ce=L(te,I);Object.keys(R).forEach(fe=>{ce[fe]===void 0&&(ce[fe]=R[fe])}),Q.setNode(W,ce),Q.setParent(W,q.parent(W))}),q.edges().forEach(W=>{let te=G(q.edge(W));Q.setEdge(W,Object.assign({},B,L(te,U),x.pick(te,Z)))}),Q}function z(q){let Q=q.graph();Q.ranksep/=2,q.edges().forEach(J=>{let W=q.edge(J);W.minlen*=2,W.labelpos.toLowerCase()!=="c"&&(Q.rankdir==="TB"||Q.rankdir==="BT"?W.width+=W.labeloffset:W.height+=W.labeloffset)})}function V(q){q.edges().forEach(Q=>{let J=q.edge(Q);if(J.width&&J.height){let W=q.node(Q.v),te={rank:(q.node(Q.w).rank-W.rank)/2+W.rank,e:Q};x.addDummyNode(q,"edge-proxy",te,"_ep")}})}function P(q){let Q=0;q.nodes().forEach(J=>{let W=q.node(J);W.borderTop&&(W.minRank=q.node(W.borderTop).rank,W.maxRank=q.node(W.borderBottom).rank,Q=Math.max(Q,W.maxRank))}),q.graph().maxRank=Q}function C(q){q.nodes().forEach(Q=>{let J=q.node(Q);J.dummy==="edge-proxy"&&(q.edge(J.e).labelRank=J.rank,q.removeNode(Q))})}function $(q){let Q=Number.POSITIVE_INFINITY,J=0,W=Number.POSITIVE_INFINITY,te=0,ce=q.graph(),fe=ce.marginx||0,be=ce.marginy||0;function we(Ne){let je=Ne.x,$e=Ne.y,st=Ne.width,Rt=Ne.height;Q=Math.min(Q,je-st/2),J=Math.max(J,je+st/2),W=Math.min(W,$e-Rt/2),te=Math.max(te,$e+Rt/2)}q.nodes().forEach(Ne=>we(q.node(Ne))),q.edges().forEach(Ne=>{let je=q.edge(Ne);Object.hasOwn(je,"x")&&we(je)}),Q-=fe,W-=be,q.nodes().forEach(Ne=>{let je=q.node(Ne);je.x-=Q,je.y-=W}),q.edges().forEach(Ne=>{let je=q.edge(Ne);je.points.forEach($e=>{$e.x-=Q,$e.y-=W}),Object.hasOwn(je,"x")&&(je.x-=Q),Object.hasOwn(je,"y")&&(je.y-=W)}),ce.width=J-Q+fe,ce.height=te-W+be}function O(q){q.edges().forEach(Q=>{let J=q.edge(Q),W=q.node(Q.v),te=q.node(Q.w),ce,fe;J.points?(ce=J.points[0],fe=J.points[J.points.length-1]):(J.points=[],ce=te,fe=W),J.points.unshift(x.intersectRect(W,ce)),J.points.push(x.intersectRect(te,fe))})}function H(q){q.edges().forEach(Q=>{let J=q.edge(Q);if(Object.hasOwn(J,"x"))switch((J.labelpos==="l"||J.labelpos==="r")&&(J.width-=J.labeloffset),J.labelpos){case"l":J.x-=J.width/2+J.labeloffset;break;case"r":J.x+=J.width/2+J.labeloffset;break}})}function X(q){q.edges().forEach(Q=>{let J=q.edge(Q);J.reversed&&J.points.reverse()})}function K(q){q.nodes().forEach(Q=>{if(q.children(Q).length){let J=q.node(Q),W=q.node(J.borderTop),te=q.node(J.borderBottom),ce=q.node(J.borderLeft[J.borderLeft.length-1]),fe=q.node(J.borderRight[J.borderRight.length-1]);J.width=Math.abs(fe.x-ce.x),J.height=Math.abs(te.y-W.y),J.x=ce.x+J.width/2,J.y=W.y+J.height/2}}),q.nodes().forEach(Q=>{q.node(Q).dummy==="border"&&q.removeNode(Q)})}function T(q){q.edges().forEach(Q=>{if(Q.v===Q.w){var J=q.node(Q.v);J.selfEdges||(J.selfEdges=[]),J.selfEdges.push({e:Q,label:q.edge(Q)}),q.removeEdge(Q)}})}function j(q){var Q=x.buildLayerMatrix(q);Q.forEach(J=>{var W=0;J.forEach((te,ce)=>{var fe=q.node(te);fe.order=ce+W,(fe.selfEdges||[]).forEach(be=>{x.addDummyNode(q,"selfedge",{width:be.label.width,height:be.label.height,rank:fe.rank,order:ce+ ++W,e:be.e,label:be.label},"_se")}),delete fe.selfEdges})})}function Y(q){q.nodes().forEach(Q=>{var J=q.node(Q);if(J.dummy==="selfedge"){var W=q.node(J.e.v),te=W.x+W.width/2,ce=W.y,fe=J.x-te,be=W.height/2;q.setEdge(J.e,J.label),q.removeNode(Q),J.label.points=[{x:te+2*fe/3,y:ce-be},{x:te+5*fe/6,y:ce-be},{x:te+fe,y:ce},{x:te+5*fe/6,y:ce+be},{x:te+2*fe/3,y:ce+be}],J.label.x=J.x,J.label.y=J.y}})}function L(q,Q){return x.mapValues(x.pick(q,Q),Number)}function G(q){var Q={};return q&&Object.entries(q).forEach(([J,W])=>{typeof J=="string"&&(J=J.toLowerCase()),Q[J]=W}),Q}}),MB=vt((e,t)=>{var r=sn(),a=zr().Graph;t.exports={debugOrdering:s};function s(o){let c=r.buildLayerMatrix(o),d=new a({compound:!0,multigraph:!0}).setGraph({});return o.nodes().forEach(f=>{d.setNode(f,{label:f}),d.setParent(f,"layer"+o.node(f).rank)}),o.edges().forEach(f=>d.setEdge(f.v,f.w,{},f.name)),c.forEach((f,h)=>{let m="layer"+h;d.setNode(m,{rank:"same"}),f.reduce((p,y)=>(d.setEdge(p,y,{style:"invis"}),y))}),d}}),OB=vt((e,t)=>{t.exports="2.0.4"}),RB=vt((e,t)=>{t.exports={graphlib:zr(),layout:AB(),debug:MB(),util:{time:sn().time,notime:sn().notime},version:OB()}});const Y1=RB();/*! For license information please see dagre.esm.js.LEGAL.txt */const X1={running:"bg-blue-500",completed:"bg-emerald-500",failed:"bg-red-500",error:"bg-red-500"};function DB({data:e,selected:t}){const r=e;return g.jsxs("div",{className:`w-[260px] rounded-lg border px-4 py-3 transition-colors ${r.isSelected||t?"border-white/30 bg-[#0a0a0a]":"border-[#222] bg-black hover:border-[#333]"}`,children:[g.jsx(el,{type:"target",position:ze.Top,isConnectable:!1,className:`!w-1.5 !h-1.5 !border-0 ${r.parentId?"!bg-[#444]":"!bg-transparent"}`}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("span",{className:"relative flex h-2 w-2 shrink-0",children:[g.jsx("span",{className:`absolute inline-flex h-full w-full rounded-full opacity-75 ${X1[r.status]??"bg-gray-500"} ${r.status==="running"?"animate-ping":""}`}),g.jsx("span",{className:`relative inline-flex h-2 w-2 rounded-full ${X1[r.status]??"bg-gray-500"}`})]}),g.jsx("span",{className:"text-sm font-semibold text-white leading-snug line-clamp-3",children:r.name})]}),g.jsx(el,{type:"source",position:ze.Bottom,isConnectable:!1,className:`!w-1.5 !h-1.5 !border-0 ${r.children&&r.children.length>0?"!bg-[#444]":"!bg-transparent"}`})]})}const jB=ee.memo(DB);function no({w:e=24}){return g.jsxs("div",{className:"w-[180px] h-[72px] rounded-lg border border-[#222] bg-[#0a0a0a] px-3 py-2 shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[g.jsx("div",{className:"w-2 h-2 rounded-full bg-[#2a2a2a]"}),g.jsx("div",{className:"h-3 rounded bg-[#252525]",style:{width:`${e*4}px`}})]}),g.jsx("div",{className:"h-2 w-28 rounded bg-[#1e1e1e] mb-1.5"}),g.jsxs("div",{className:"flex gap-3",children:[g.jsx("div",{className:"h-2 w-8 rounded bg-[#1e1e1e]"}),g.jsx("div",{className:"h-2 w-8 rounded bg-[#1e1e1e]"})]})]})}function zs(){return g.jsx("div",{className:"w-px h-6 bg-[#2a2a2a]"})}function K1({count:e}){return g.jsx("div",{className:"relative flex justify-center",children:g.jsx("div",{className:"absolute top-0 h-px bg-[#2a2a2a]",style:{width:`${(e-1)*220}px`}})})}function LB(){return g.jsx("div",{className:"h-full bg-black overflow-hidden",children:g.jsxs("div",{className:"flex flex-col items-center pt-10 animate-pulse",children:[g.jsx(no,{w:20}),g.jsx(zs,{}),g.jsx(K1,{count:3}),g.jsx("div",{className:"flex gap-10",children:[18,22,16].map((e,t)=>g.jsxs("div",{className:"flex flex-col items-center",children:[g.jsx(zs,{}),g.jsx(no,{w:e})]},t))}),g.jsxs("div",{className:"flex gap-10 w-full justify-center",children:[g.jsxs("div",{className:"flex flex-col items-center",children:[g.jsx(zs,{}),g.jsx(K1,{count:2}),g.jsx("div",{className:"flex gap-10",children:[14,20].map((e,t)=>g.jsxs("div",{className:"flex flex-col items-center",children:[g.jsx(zs,{}),g.jsx(no,{w:e})]},t))})]}),g.jsxs("div",{className:"flex flex-col items-center",children:[g.jsx(zs,{}),g.jsx(no,{w:18}),g.jsx(zs,{}),g.jsx(no,{w:12})]}),g.jsx("div",{className:"w-[180px]"})]})]})})}const fp=260,hp=80,zB={agentNode:jB};function IB(e,t){const r=new Y1.graphlib.Graph;r.setDefaultEdgeLabel(()=>({})),r.setGraph({rankdir:"TB",nodesep:60,ranksep:80});const a=[],s=[];for(const[o,c]of e)if(r.setNode(o,{width:fp,height:hp}),a.push({id:o,type:"agentNode",position:{x:0,y:0},data:{...c,isSelected:o===t}}),c.parentId&&e.has(c.parentId)){const d=`${c.parentId}->${o}`;r.setEdge(c.parentId,o),s.push({id:d,source:c.parentId,target:o,style:{stroke:"#2a2a2a",strokeWidth:1.5}})}Y1.layout(r);for(const o of a){const c=r.node(o.id);c&&(o.position={x:c.x-fp/2,y:c.y-hp/2})}return{nodes:a,edges:s}}const Am=300;function BB({nodes:e}){const{setCenter:t}=Uo(),r=ee.useRef(!1);return ee.useEffect(()=>{if(e.length>0&&!r.current){const s=e.find(d=>!d.data.parentId)??e[0];r.current=!0;const o=s.position.x+fp/2,c=s.position.y+hp/2;setTimeout(()=>t(o,c,{zoom:.85,duration:400}),60)}},[e,t]),null}function UB(){const{zoomIn:e,zoomOut:t,fitView:r}=Uo();return g.jsx(F9,{position:"bottom-right",showZoom:!1,showFitView:!1,showInteractive:!1,className:"!bg-transparent !border-none !shadow-none",children:g.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-[#222]",children:[g.jsx("button",{onClick:()=>e({duration:Am}),className:"flex items-center justify-center w-7 h-7 bg-[#111] text-white hover:bg-[#2a2a2a] transition-colors",title:"Zoom in",children:g.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"w-3.5 h-3.5",children:g.jsx("path",{d:"M12 5v14M5 12h14"})})}),g.jsx("button",{onClick:()=>t({duration:Am}),className:"flex items-center justify-center w-7 h-7 bg-[#111] text-white hover:bg-[#2a2a2a] border-y border-[#222] transition-colors",title:"Zoom out",children:g.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"w-3.5 h-3.5",children:g.jsx("path",{d:"M5 12h14"})})}),g.jsx("button",{onClick:()=>r({padding:.3,duration:Am}),className:"flex items-center justify-center w-7 h-7 bg-[#111] text-white hover:bg-[#2a2a2a] transition-colors",title:"Fit view",children:g.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"w-3.5 h-3.5",children:g.jsx("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]})})}function HB({agents:e,selectedAgentId:t,onSelectAgent:r,eventsLoaded:a,eventsEmpty:s,scanCompleted:o}){const[c,d,f]=O9([]),[h,m,p]=R9([]);ee.useEffect(()=>{if(e.size===0)return;const{nodes:S,edges:w}=IB(e,t);d(S),m(w)},[e.size,d,m]),ee.useEffect(()=>{e.size!==0&&d(S=>S.map(w=>{const k=e.get(w.id);return k?{...w,data:{...k,isSelected:w.id===t}}:w}))},[e,t,d]);const y=ee.useRef(!1),x=ee.useCallback((S,w)=>{y.current=!0,r(w.id)},[r]),_=ee.useCallback(()=>{if(y.current){y.current=!1;return}r(null)},[r]);if(e.size===0&&a&&s)return g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center px-4",children:[g.jsx("div",{className:"w-10 h-10 mb-3 rounded-full bg-[#111] flex items-center justify-center",children:o?g.jsx("svg",{className:"w-5 h-5 text-[#444]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25a2.25 2.25 0 0 1-2.25-2.25v-2.25Z"})}):g.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 animate-pulse"})}),g.jsx("p",{className:"text-sm text-[#555]",children:o?"Agent trace data is not available for this pentest":"Waiting for agent data…"})]});const N=e.size>0;return g.jsxs("div",{className:"relative h-full",children:[g.jsx("div",{className:`absolute inset-0 z-10 transition-opacity duration-500 ${N?"opacity-0 pointer-events-none":"opacity-100"}`,children:g.jsx(LB,{})}),g.jsx("div",{className:`h-full transition-opacity duration-500 ${N?"opacity-100":"opacity-0"}`,children:g.jsxs(M9,{nodes:c,edges:h,onNodesChange:f,onEdgesChange:p,onNodeClick:x,onPaneClick:_,nodeTypes:zB,nodesConnectable:!1,edgesFocusable:!1,edgesReconnectable:!1,minZoom:.15,maxZoom:1.5,proOptions:{hideAttribution:!0},className:"bg-black",children:[g.jsx(I9,{color:"#111",gap:20}),g.jsx(BB,{nodes:c}),g.jsx(UB,{}),g.jsx(iB,{position:"bottom-left",nodeColor:S=>{var k;const w=(k=S.data)==null?void 0:k.status;return w==="running"?"#3b82f6":w==="completed"?"#10b981":w==="failed"||w==="error"?"#ef4444":"#555"},maskColor:"rgba(0,0,0,0.8)",style:{width:80,height:50},className:"!bg-[#0a0a0a] !border-[#222]"})]})})]})}function $s({text:e,className:t=""}){return g.jsx("div",{className:`prose-markdown ${t}`,children:g.jsx(Bp,{remarkPlugins:[qp],rehypePlugins:[Pp],components:Fp,children:e})})}const Z1=6,Q1=20;function Ln({text:e,maxLines:t=20}){const[r,a]=ee.useState(!1),o=e.trimEnd().split(` +`)),m=h.reduce((p,y)=>p.concat(...y),[]);return[h,m]}return[[],[]]},[e]);return ee.useEffect(()=>{const f=(t==null?void 0:t.target)??C1,h=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const m=x=>{var S,w;if(s.current=x.ctrlKey||x.metaKey||x.shiftKey||x.altKey,(!s.current||s.current&&!h)&&ZE(x))return!1;const N=A1(x.code,d);if(o.current.add(x[N]),T1(c,o.current,!1)){const k=((w=(S=x.composedPath)==null?void 0:S.call(x))==null?void 0:w[0])||x.target,E=(k==null?void 0:k.nodeName)==="BUTTON"||(k==null?void 0:k.nodeName)==="A";t.preventDefault!==!1&&(s.current||!E)&&x.preventDefault(),a(!0)}},p=x=>{const _=A1(x.code,d);T1(c,o.current,!0)?(a(!1),o.current.clear()):o.current.delete(x[_]),x.key==="Meta"&&o.current.clear(),s.current=!1},y=()=>{o.current.clear(),a(!1)};return f==null||f.addEventListener("keydown",m),f==null||f.addEventListener("keyup",p),window.addEventListener("blur",y),window.addEventListener("contextmenu",y),()=>{f==null||f.removeEventListener("keydown",m),f==null||f.removeEventListener("keyup",p),window.removeEventListener("blur",y),window.removeEventListener("contextmenu",y)}}},[e,a]),r}function T1(e,t,r){return e.filter(a=>r||a.length===t.size).some(a=>a.every(s=>t.has(s)))}function A1(e,t){return t.includes(e)?"code":"key"}const s8=()=>{const e=Lt();return ee.useMemo(()=>({zoomIn:async t=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1/1.2,t):!1},zoomTo:async(t,r)=>{const{panZoom:a}=e.getState();return a?a.scaleTo(t,r):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,r)=>{const{transform:[a,s,o],panZoom:c}=e.getState();return c?(await c.setViewport({x:t.x??a,y:t.y??s,zoom:t.zoom??o},r),!0):!1},getViewport:()=>{const[t,r,a]=e.getState().transform;return{x:t,y:r,zoom:a}},setCenter:async(t,r,a)=>e.getState().setCenter(t,r,a),fitBounds:async(t,r)=>{const{width:a,height:s,minZoom:o,maxZoom:c,panZoom:d}=e.getState(),f=tg(t,a,s,o,c,(r==null?void 0:r.padding)??.1);return d?(await d.setViewport(f,{duration:r==null?void 0:r.duration,ease:r==null?void 0:r.ease,interpolate:r==null?void 0:r.interpolate}),!0):!1},screenToFlowPosition:(t,r={})=>{const{transform:a,snapGrid:s,snapToGrid:o,domNode:c}=e.getState();if(!c)return t;const{x:d,y:f}=c.getBoundingClientRect(),h={x:t.x-d,y:t.y-f},m=r.snapGrid??s,p=r.snapToGrid??o;return Bo(h,a,p,m)},flowToScreenPosition:t=>{const{transform:r,domNode:a}=e.getState();if(!a)return t;const{x:s,y:o}=a.getBoundingClientRect(),c=Ws(t,r);return{x:c.x+s,y:c.y+o}}}),[])};function xN(e,t){const r=[],a=new Map,s=[];for(const o of e)if(o.type==="add"){s.push(o);continue}else if(o.type==="remove"||o.type==="replace")a.set(o.id,[o]);else{const c=a.get(o.id);c?c.push(o):a.set(o.id,[o])}for(const o of t){const c=a.get(o.id);if(!c){r.push(o);continue}if(c[0].type==="remove")continue;if(c[0].type==="replace"){r.push({...c[0].item});continue}const d={...o};for(const f of c)l8(f,d);r.push(d)}return s.length&&s.forEach(o=>{o.index!==void 0?r.splice(o.index,0,{...o.item}):r.push({...o.item})}),r}function l8(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function yN(e,t){return xN(e,t)}function vN(e,t){return xN(e,t)}function Ua(e,t){return{id:e,type:"select",selected:t}}function Hs(e,t=new Set,r=!1){const a=[];for(const[s,o]of e){const c=t.has(s);!(o.selected===void 0&&!c)&&o.selected!==c&&(r&&(o.selected=c),a.push(Ua(o.id,c)))}return a}function M1({items:e=[],lookup:t}){var s;const r=[],a=new Map(e.map(o=>[o.id,o]));for(const[o,c]of e.entries()){const d=t.get(c.id),f=((s=d==null?void 0:d.internals)==null?void 0:s.userNode)??d;f!==void 0&&f!==c&&r.push({id:c.id,item:c,type:"replace"}),f===void 0&&r.push({item:c,type:"add",index:o})}for(const[o]of t)a.get(o)===void 0&&r.push({id:o,type:"remove"});return r}function O1(e){return{id:e.id,type:"remove"}}const o8=VE();function c8(e,t,r={}){return Xz(e,t,{...r,onError:r.onError??o8})}const R1=e=>Dz(e),u8=e=>$E(e);function _N(e){return ee.forwardRef(e)}const wN=typeof window<"u"?ee.useLayoutEffect:ee.useEffect;function D1(e){const[t,r]=ee.useState(BigInt(0)),[a]=ee.useState(()=>d8(()=>r(s=>s+BigInt(1))));return wN(()=>{const s=a.get();s.length&&(e(s),a.reset())},[t]),a}function d8(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:r=>{t.push(r),e()}}}const EN=ee.createContext(null);function f8({children:e}){const t=Lt(),r=ee.useCallback(d=>{const{nodes:f=[],setNodes:h,hasDefaultNodes:m,onNodesChange:p,nodeLookup:y,fitViewQueued:x,onNodesChangeMiddlewareMap:_}=t.getState();let N=f;for(const w of d)N=typeof w=="function"?w(N):w;let S=M1({items:N,lookup:y});for(const w of _.values())S=w(S);m&&h(N),S.length>0?p==null||p(S):x&&window.requestAnimationFrame(()=>{const{fitViewQueued:w,nodes:k,setNodes:E}=t.getState();w&&E(k)})},[]),a=D1(r),s=ee.useCallback(d=>{const{edges:f=[],setEdges:h,hasDefaultEdges:m,onEdgesChange:p,edgeLookup:y}=t.getState();let x=f;for(const _ of d)x=typeof _=="function"?_(x):_;m?h(x):p&&p(M1({items:x,lookup:y}))},[]),o=D1(s),c=ee.useMemo(()=>({nodeQueue:a,edgeQueue:o}),[]);return g.jsx(EN.Provider,{value:c,children:e})}function h8(){const e=ee.useContext(EN);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const m8=e=>!!e.panZoom;function Uo(){const e=s8(),t=Lt(),r=h8(),a=dt(m8),s=ee.useMemo(()=>{const o=p=>t.getState().nodeLookup.get(p),c=p=>{r.nodeQueue.push(p)},d=p=>{r.edgeQueue.push(p)},f=p=>{var w,k;const{nodeLookup:y,nodeOrigin:x}=t.getState(),_=R1(p)?p:y.get(p.id),N=_.parentId?XE(_.position,_.measured,_.parentId,y,x):_.position,S={..._,position:N,width:((w=_.measured)==null?void 0:w.width)??_.width,height:((k=_.measured)==null?void 0:k.height)??_.height};return No(S)},h=(p,y,x={replace:!1})=>{c(_=>_.map(N=>{if(N.id===p){const S=typeof y=="function"?y(N):y;return x.replace&&R1(S)?S:{...N,...S}}return N}))},m=(p,y,x={replace:!1})=>{d(_=>_.map(N=>{if(N.id===p){const S=typeof y=="function"?y(N):y;return x.replace&&u8(S)?S:{...N,...S}}return N}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>{var y;return(y=o(p))==null?void 0:y.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:p=[]}=t.getState();return p.map(y=>({...y}))},getEdge:p=>t.getState().edgeLookup.get(p),setNodes:c,setEdges:d,addNodes:p=>{const y=Array.isArray(p)?p:[p];r.nodeQueue.push(x=>[...x,...y])},addEdges:p=>{const y=Array.isArray(p)?p:[p];r.edgeQueue.push(x=>[...x,...y])},toObject:()=>{const{nodes:p=[],edges:y=[],transform:x}=t.getState(),[_,N,S]=x;return{nodes:p.map(w=>({...w})),edges:y.map(w=>({...w})),viewport:{x:_,y:N,zoom:S}}},deleteElements:async({nodes:p=[],edges:y=[]})=>{const{nodes:x,edges:_,onNodesDelete:N,onEdgesDelete:S,triggerNodeChanges:w,triggerEdgeChanges:k,onDelete:E,onBeforeDelete:M}=t.getState(),{nodes:I,edges:R}=await Bz({nodesToRemove:p,edgesToRemove:y,nodes:x,edges:_,onBeforeDelete:M}),U=R.length>0,B=I.length>0;if(U){const Z=R.map(O1);S==null||S(R),k(Z)}if(B){const Z=I.map(O1);N==null||N(I),w(Z)}return(B||U)&&(E==null||E({nodes:I,edges:R})),{deletedNodes:I,deletedEdges:R}},getIntersectingNodes:(p,y=!0,x)=>{const _=r1(p),N=_?p:f(p),S=x!==void 0;return N?(x||t.getState().nodes).filter(w=>{const k=t.getState().nodeLookup.get(w.id);if(k&&!_&&(w.id===p.id||!k.internals.positionAbsolute))return!1;const E=No(S?w:k),M=ju(E,N);return y&&M>0||M>=E.width*E.height||M>=N.width*N.height}):[]},isNodeIntersecting:(p,y,x=!0)=>{const N=r1(p)?p:f(p);if(!N)return!1;const S=ju(N,y);return x&&S>0||S>=y.width*y.height||S>=N.width*N.height},updateNode:h,updateNodeData:(p,y,x={replace:!1})=>{h(p,_=>{const N=typeof y=="function"?y(_):y;return x.replace?{..._,data:N}:{..._,data:{..._.data,...N}}},x)},updateEdge:m,updateEdgeData:(p,y,x={replace:!1})=>{m(p,_=>{const N=typeof y=="function"?y(_):y;return x.replace?{..._,data:N}:{..._,data:{..._.data,...N}}},x)},getNodesBounds:p=>{const{nodeLookup:y,nodeOrigin:x}=t.getState();return jz(p,{nodeLookup:y,nodeOrigin:x})},getHandleConnections:({type:p,id:y,nodeId:x})=>{var _;return Array.from(((_=t.getState().connectionLookup.get(`${x}-${p}${y?`-${y}`:""}`))==null?void 0:_.values())??[])},getNodeConnections:({type:p,handleId:y,nodeId:x})=>{var _;return Array.from(((_=t.getState().connectionLookup.get(`${x}${p?y?`-${p}-${y}`:`-${p}`:""}`))==null?void 0:_.values())??[])},fitView:async p=>{const y=t.getState().fitViewResolver??$z();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:y}),r.nodeQueue.push(x=>[...x]),y.promise}}},[]);return ee.useMemo(()=>({...s,...e,viewportInitialized:a}),[a])}const j1=e=>e.selected,p8=typeof window<"u"?window:void 0;function g8({deleteKeyCode:e,multiSelectionKeyCode:t}){const r=Lt(),{deleteElements:a}=Uo(),s=ko(e,{actInsideInputWithModifier:!1}),o=ko(t,{target:p8});ee.useEffect(()=>{if(s){const{edges:c,nodes:d}=r.getState();a({nodes:d.filter(j1),edges:c.filter(j1)}),r.setState({nodesSelectionActive:!1})}},[s]),ee.useEffect(()=>{r.setState({multiSelectionActive:o})},[o])}function b8(e){const t=Lt();ee.useEffect(()=>{const r=()=>{var s,o,c,d;if(!e.current||!(((o=(s=e.current).checkVisibility)==null?void 0:o.call(s))??!0))return!1;const a=ng(e.current);(a.height===0||a.width===0)&&((d=(c=t.getState()).onError)==null||d.call(c,"004",Lr.error004())),t.setState({width:a.width||500,height:a.height||500})};if(e.current){r(),window.addEventListener("resize",r);const a=new ResizeObserver(()=>r());return a.observe(e.current),()=>{window.removeEventListener("resize",r),a&&e.current&&a.unobserve(e.current)}}},[])}const rd={position:"absolute",width:"100%",height:"100%",top:0,left:0},x8=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function y8({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:r=!0,panOnScroll:a=!1,panOnScrollSpeed:s=.5,panOnScrollMode:o=Pa.Free,zoomOnDoubleClick:c=!0,panOnDrag:d=!0,defaultViewport:f,translateExtent:h,minZoom:m,maxZoom:p,zoomActivationKeyCode:y,preventScrolling:x=!0,children:_,noWheelClassName:N,noPanClassName:S,onViewportChange:w,isControlledViewport:k,paneClickDistance:E,selectionOnDrag:M}){const I=Lt(),R=ee.useRef(null),{userSelectionActive:U,lib:B,connectionInProgress:Z}=dt(x8,qt),D=ko(y),z=ee.useRef();b8(R);const V=ee.useCallback(P=>{w==null||w({x:P[0],y:P[1],zoom:P[2]}),k||I.setState({transform:P})},[w,k]);return ee.useEffect(()=>{if(R.current){z.current=NI({domNode:R.current,minZoom:m,maxZoom:p,translateExtent:h,viewport:f,onDraggingChange:O=>I.setState(H=>H.paneDragging===O?H:{paneDragging:O}),onPanZoomStart:(O,H)=>{const{onViewportChangeStart:X,onMoveStart:K}=I.getState();K==null||K(O,H),X==null||X(H)},onPanZoom:(O,H)=>{const{onViewportChange:X,onMove:K}=I.getState();K==null||K(O,H),X==null||X(H)},onPanZoomEnd:(O,H)=>{const{onViewportChangeEnd:X,onMoveEnd:K}=I.getState();K==null||K(O,H),X==null||X(H)}});const{x:P,y:T,zoom:$}=z.current.getViewport();return I.setState({panZoom:z.current,transform:[P,T,$],domNode:R.current.closest(".react-flow")}),()=>{var O;(O=z.current)==null||O.destroy()}}},[]),ee.useEffect(()=>{var P;(P=z.current)==null||P.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:r,panOnScroll:a,panOnScrollSpeed:s,panOnScrollMode:o,zoomOnDoubleClick:c,panOnDrag:d,zoomActivationKeyPressed:D,preventScrolling:x,noPanClassName:S,userSelectionActive:U,noWheelClassName:N,lib:B,onTransformChange:V,connectionInProgress:Z,selectionOnDrag:M,paneClickDistance:E})},[e,t,r,a,s,o,c,d,D,x,S,U,N,B,V,Z,M,E]),g.jsx("div",{className:"react-flow__renderer",ref:R,style:rd,children:_})}const v8=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function _8(){const{userSelectionActive:e,userSelectionRect:t}=dt(v8,qt);return e&&t?g.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Cm=(e,t)=>r=>{r.target===t.current&&(e==null||e(r))},w8=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function E8({isSelecting:e,selectionKeyPressed:t,selectionMode:r=Eo.Full,panOnDrag:a,autoPanOnSelection:s,paneClickDistance:o,selectionOnDrag:c,onSelectionStart:d,onSelectionEnd:f,onPaneClick:h,onPaneContextMenu:m,onPaneScroll:p,onPaneMouseEnter:y,onPaneMouseMove:x,onPaneMouseLeave:_,children:N}){const S=ee.useRef(0),w=Lt(),{userSelectionActive:k,elementsSelectable:E,dragging:M,panBy:I,autoPanSpeed:R}=dt(w8,qt),U=E&&(e||k),B=ee.useRef(null),Z=ee.useRef(),D=ee.useRef(new Set),z=ee.useRef(new Set),V=ee.useRef(!1),P=ee.useRef(!1),T=ee.useRef({x:0,y:0}),$=ee.useRef(!1),O=W=>{if(P.current||V.current||w.getState().connection.inProgress){P.current=!1,V.current=!1;return}h==null||h(W),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},H=W=>{if(Array.isArray(a)&&(a!=null&&a.includes(2))){W.preventDefault();return}m==null||m(W)},X=p?W=>p(W):void 0,K=W=>{P.current&&(W.stopPropagation(),P.current=!1)},C=W=>{var st,Rt;const{domNode:te,transform:ce}=w.getState();if(Z.current=te==null?void 0:te.getBoundingClientRect(),!Z.current)return;const fe=W.target===B.current;if(!fe&&!!W.target.closest(".nokey")||!e||!(c&&fe||t)||W.button!==0||!W.isPrimary)return;(Rt=(st=W.target)==null?void 0:st.setPointerCapture)==null||Rt.call(st,W.pointerId),P.current=!1;const{x:Ne,y:je}=Rr(W.nativeEvent,Z.current),$e=Bo({x:Ne,y:je},ce);w.setState({userSelectionRect:{width:0,height:0,startX:$e.x,startY:$e.y,x:Ne,y:je}}),fe||(W.stopPropagation(),W.preventDefault())};function j(W,te){const{userSelectionRect:ce}=w.getState();if(!ce)return;const{transform:fe,nodeLookup:be,edgeLookup:we,connectionLookup:Ne,triggerNodeChanges:je,triggerEdgeChanges:$e,defaultEdgeOptions:st}=w.getState(),Rt={x:ce.startX,y:ce.startY},{x:Yt,y:Pt}=Ws(Rt,fe),Xt={startX:Rt.x,startY:Rt.y,x:WIt.id)),z.current=new Set;const ct=(st==null?void 0:st.selectable)??!0;for(const It of D.current){const ue=Ne.get(It);if(ue)for(const{edgeId:xe}of ue.values()){const Oe=we.get(xe);Oe&&(Oe.selectable??ct)&&z.current.add(xe)}}if(!i1(Yn,D.current)){const It=Hs(be,D.current,!0);je(It)}if(!i1(Nn,z.current)){const It=Hs(we,z.current);$e(It)}w.setState({userSelectionRect:Xt,userSelectionActive:!0,nodesSelectionActive:!1})}function Y(){if(!s||!Z.current)return;const[W,te]=eg(T.current,Z.current,R);I({x:W,y:te}).then(ce=>{if(!P.current||!ce){S.current=requestAnimationFrame(Y);return}const{x:fe,y:be}=T.current;j(fe,be),S.current=requestAnimationFrame(Y)})}const L=()=>{cancelAnimationFrame(S.current),S.current=0,$.current=!1};ee.useEffect(()=>()=>L(),[]);const G=W=>{const{userSelectionRect:te,transform:ce,resetSelectedElements:fe}=w.getState();if(!Z.current||!te)return;const{x:be,y:we}=Rr(W.nativeEvent,Z.current);T.current={x:be,y:we};const Ne=Ws({x:te.startX,y:te.startY},ce);if(!P.current){const je=t?0:o;if(Math.hypot(be-Ne.x,we-Ne.y)<=je)return;fe(),d==null||d(W)}P.current=!0,$.current||(Y(),$.current=!0),j(be,we)},q=W=>{var te,ce;if(!U){W.target===B.current&&w.getState().connection.inProgress&&(V.current=!0);return}W.button===0&&((ce=(te=W.target)==null?void 0:te.releasePointerCapture)==null||ce.call(te,W.pointerId),!k&&W.target===B.current&&w.getState().userSelectionRect&&(O==null||O(W)),w.setState({userSelectionActive:!1,userSelectionRect:null}),P.current&&(f==null||f(W),w.setState({nodesSelectionActive:D.current.size>0})),L())},Q=W=>{var te,ce;(ce=(te=W.target)==null?void 0:te.releasePointerCapture)==null||ce.call(te,W.pointerId),L()},J=a===!0||Array.isArray(a)&&a.includes(0);return g.jsxs("div",{className:ln(["react-flow__pane",{draggable:J,dragging:M,selection:e}]),onClick:U?void 0:Cm(O,B),onContextMenu:Cm(H,B),onWheel:Cm(X,B),onPointerEnter:U?void 0:y,onPointerMove:U?G:x,onPointerUp:q,onPointerCancel:U?Q:void 0,onPointerDownCapture:U?C:void 0,onClickCapture:U?K:void 0,onPointerLeave:_,ref:B,style:rd,children:[N,g.jsx(_8,{})]})}function dp({id:e,store:t,unselect:r=!1,nodeRef:a}){const{addSelectedNodes:s,unselectNodesAndEdges:o,multiSelectionActive:c,nodeLookup:d,onError:f}=t.getState(),h=d.get(e);if(!h){f==null||f("012",Lr.error012(e));return}t.setState({nodesSelectionActive:!1}),h.selected?(r||h.selected&&c)&&(o({nodes:[h],edges:[]}),requestAnimationFrame(()=>{var m;return(m=a==null?void 0:a.current)==null?void 0:m.blur()})):s([e])}function NN({nodeRef:e,disabled:t=!1,noDragClassName:r,handleSelector:a,nodeId:s,isSelectable:o,nodeClickDistance:c}){const d=Lt(),[f,h]=ee.useState(!1),m=ee.useRef();return ee.useEffect(()=>{if(!t)return m.current=uI({getStoreItems:()=>d.getState(),onNodeMouseDown:p=>{dp({id:p,store:d,nodeRef:e})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}}),()=>{var p;(p=m.current)==null||p.destroy(),m.current=void 0}},[t,d,e]),ee.useEffect(()=>{t||!e.current||!m.current||m.current.update({noDragClassName:r,handleSelector:a,domNode:e.current,isSelectable:o,nodeId:s,nodeClickDistance:c})},[r,a,t,o,e,s,c]),f}const N8=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function SN(){const e=Lt();return ee.useCallback(r=>{const{nodeExtent:a,snapToGrid:s,snapGrid:o,nodesDraggable:c,onError:d,updateNodePositions:f,nodeLookup:h,nodeOrigin:m}=e.getState(),p=new Map,y=N8(c),x=s?o[0]:5,_=s?o[1]:5,N=r.direction.x*x*r.factor,S=r.direction.y*_*r.factor;for(const[,w]of h){if(!y(w))continue;let k={x:w.internals.positionAbsolute.x+N,y:w.internals.positionAbsolute.y+S};s&&(k=Io(k,o));const{position:E,positionAbsolute:M}=qE({nodeId:w.id,nextPosition:k,nodeLookup:h,nodeExtent:a,nodeOrigin:m,onError:d});w.position=E,w.internals.positionAbsolute=M,p.set(w.id,w)}f(p)},[])}const og=ee.createContext(null),S8=og.Provider;og.Consumer;const kN=()=>ee.useContext(og),k8=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),CN=ee.createContext(null);function C8({children:e}){const t=dt(k8,qt);return g.jsx(CN.Provider,{value:t,children:e})}function T8(){const e=ee.useContext(CN);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const A8={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},M8=(e,t,r)=>a=>{const{connectionClickStartHandle:s,connectionMode:o,connection:c}=a,{fromHandle:d,toHandle:f,isValid:h}=c;if(!d&&!s)return A8;const m=(f==null?void 0:f.nodeId)===e&&(f==null?void 0:f.id)===t&&(f==null?void 0:f.type)===r;return{connectingFrom:(d==null?void 0:d.nodeId)===e&&(d==null?void 0:d.id)===t&&(d==null?void 0:d.type)===r,connectingTo:m,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===t&&(s==null?void 0:s.type)===r,isPossibleEndHandle:o===Zs.Strict?(d==null?void 0:d.type)!==r:e!==(d==null?void 0:d.nodeId)||t!==(d==null?void 0:d.id),connectionInProcess:!!d,clickConnectionInProcess:!!s,valid:m&&h}};function O8({type:e="source",position:t=ze.Top,isValidConnection:r,isConnectable:a=!0,isConnectableStart:s=!0,isConnectableEnd:o=!0,id:c,onConnect:d,children:f,className:h,onMouseDown:m,onTouchStart:p,...y},x){var $,O;const _=c||null,N=e==="target",S=Lt(),w=kN(),{connectOnClick:k,noPanClassName:E,rfId:M}=T8(),{connectingFrom:I,connectingTo:R,clickConnecting:U,isPossibleEndHandle:B,connectionInProcess:Z,clickConnectionInProcess:D,valid:z}=dt(M8(w,_,e),qt);w||(O=($=S.getState()).onError)==null||O.call($,"010",Lr.error010());const V=H=>{const{defaultEdgeOptions:X,onConnect:K,hasDefaultEdges:C}=S.getState(),j={...X,...H};if(C){const{edges:Y,setEdges:L,onError:G}=S.getState();L(c8(j,Y,{onError:G}))}K==null||K(j),d==null||d(j)},P=H=>{if(!w)return;const X=QE(H.nativeEvent);if(s&&(X&&H.button===0||!X)){const K=S.getState();up.onPointerDown(H.nativeEvent,{handleDomNode:H.currentTarget,autoPanOnConnect:K.autoPanOnConnect,connectionMode:K.connectionMode,connectionRadius:K.connectionRadius,domNode:K.domNode,nodeLookup:K.nodeLookup,lib:K.lib,isTarget:N,handleId:_,nodeId:w,flowId:K.rfId,panBy:K.panBy,cancelConnection:K.cancelConnection,onConnectStart:K.onConnectStart,onConnectEnd:(...C)=>{var j,Y;return(Y=(j=S.getState()).onConnectEnd)==null?void 0:Y.call(j,...C)},updateConnection:K.updateConnection,onConnect:V,isValidConnection:r||((...C)=>{var j,Y;return((Y=(j=S.getState()).isValidConnection)==null?void 0:Y.call(j,...C))??!0}),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:K.autoPanSpeed,dragThreshold:K.connectionDragThreshold})}X?m==null||m(H):p==null||p(H)},T=H=>{const{onClickConnectStart:X,onClickConnectEnd:K,connectionClickStartHandle:C,connectionMode:j,isValidConnection:Y,lib:L,rfId:G,nodeLookup:q,connection:Q}=S.getState();if(!w||!C&&!s)return;if(!C){X==null||X(H.nativeEvent,{nodeId:w,handleId:_,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:w,type:e,id:_}});return}const J=KE(H.target),W=r||Y,{connection:te,isValid:ce}=up.isValid(H.nativeEvent,{handle:{nodeId:w,id:_,type:e},connectionMode:j,fromNodeId:C.nodeId,fromHandleId:C.id||null,fromType:C.type,isValidConnection:W,flowId:G,doc:J,lib:L,nodeLookup:q});ce&&te&&V(te);const fe=structuredClone(Q);delete fe.inProgress,fe.toPosition=fe.toHandle?fe.toHandle.position:null,K==null||K(H,fe),S.setState({connectionClickStartHandle:null})};return g.jsx("div",{"data-handleid":_,"data-nodeid":w,"data-handlepos":t,"data-id":`${M}-${w}-${_}-${e}`,className:ln(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,h,{source:!N,target:N,connectable:a,connectablestart:s,connectableend:o,clickconnecting:U,connectingfrom:I,connectingto:R,valid:z,connectionindicator:a&&(!Z||B)&&(Z||D?o:s)}]),onMouseDown:P,onTouchStart:P,onClick:k?T:void 0,ref:x,...y,children:f})}const el=ee.memo(_N(O8));function R8({data:e,isConnectable:t,sourcePosition:r=ze.Bottom}){return g.jsxs(g.Fragment,{children:[e==null?void 0:e.label,g.jsx(el,{type:"source",position:r,isConnectable:t})]})}function D8({data:e,isConnectable:t,targetPosition:r=ze.Top,sourcePosition:a=ze.Bottom}){return g.jsxs(g.Fragment,{children:[g.jsx(el,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label,g.jsx(el,{type:"source",position:a,isConnectable:t})]})}function j8(){return null}function L8({data:e,isConnectable:t,targetPosition:r=ze.Top}){return g.jsxs(g.Fragment,{children:[g.jsx(el,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label]})}const Lu={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},L1={input:R8,default:D8,output:L8,group:j8};function z8(e){var t,r,a,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((r=e.style)==null?void 0:r.height)}:{width:e.width??((a=e.style)==null?void 0:a.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const I8=e=>{const{width:t,height:r,x:a,y:s}=zo(e.nodeLookup,{filter:o=>!!o.selected});return{width:Or(t)?t:null,height:Or(r)?r:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${a}px,${s}px)`}};function B8({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:r}){const a=Lt(),{width:s,height:o,transformString:c,userSelectionActive:d}=dt(I8,qt),f=SN(),h=ee.useRef(null);ee.useEffect(()=>{var x;r||(x=h.current)==null||x.focus({preventScroll:!0})},[r]);const m=!d&&s!==null&&o!==null;if(NN({nodeRef:h,disabled:!m}),!m)return null;const p=e?x=>{const _=a.getState().nodes.filter(N=>N.selected);e(x,_)}:void 0,y=x=>{Object.prototype.hasOwnProperty.call(Lu,x.key)&&(x.preventDefault(),f({direction:Lu[x.key],factor:x.shiftKey?4:1}))};return g.jsx("div",{className:ln(["react-flow__nodesselection","react-flow__container",t]),style:{transform:c},children:g.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:r?void 0:-1,onKeyDown:r?void 0:y,style:{width:s,height:o}})})}const z1=typeof window<"u"?window:void 0,U8=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function TN({children:e,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:a,onPaneMouseLeave:s,onPaneContextMenu:o,onPaneScroll:c,paneClickDistance:d,deleteKeyCode:f,selectionKeyCode:h,selectionOnDrag:m,selectionMode:p,onSelectionStart:y,onSelectionEnd:x,multiSelectionKeyCode:_,panActivationKeyCode:N,zoomActivationKeyCode:S,elementsSelectable:w,zoomOnScroll:k,zoomOnPinch:E,panOnScroll:M,panOnScrollSpeed:I,panOnScrollMode:R,zoomOnDoubleClick:U,panOnDrag:B,autoPanOnSelection:Z,defaultViewport:D,translateExtent:z,minZoom:V,maxZoom:P,preventScrolling:T,onSelectionContextMenu:$,noWheelClassName:O,noPanClassName:H,disableKeyboardA11y:X,onViewportChange:K,isControlledViewport:C}){const{nodesSelectionActive:j,userSelectionActive:Y}=dt(U8,qt),L=ko(h,{target:z1}),G=ko(N,{target:z1}),q=G||B,Q=G||M,J=m&&q!==!0,W=L||Y||J;return g8({deleteKeyCode:f,multiSelectionKeyCode:_}),g.jsx(y8,{onPaneContextMenu:o,elementsSelectable:w,zoomOnScroll:k,zoomOnPinch:E,panOnScroll:Q,panOnScrollSpeed:I,panOnScrollMode:R,zoomOnDoubleClick:U,panOnDrag:!L&&q,defaultViewport:D,translateExtent:z,minZoom:V,maxZoom:P,zoomActivationKeyCode:S,preventScrolling:T,noWheelClassName:O,noPanClassName:H,onViewportChange:K,isControlledViewport:C,paneClickDistance:d,selectionOnDrag:J,children:g.jsxs(E8,{onSelectionStart:y,onSelectionEnd:x,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:a,onPaneMouseLeave:s,onPaneContextMenu:o,onPaneScroll:c,panOnDrag:q,autoPanOnSelection:Z,isSelecting:!!W,selectionMode:p,selectionKeyPressed:L,paneClickDistance:d,selectionOnDrag:J,children:[e,j&&g.jsx(B8,{onSelectionContextMenu:$,noPanClassName:H,disableKeyboardA11y:X})]})})}TN.displayName="FlowRenderer";const H8=ee.memo(TN),$8=e=>t=>e?Jp(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(r=>r.id):Array.from(t.nodeLookup.keys());function q8(e){return dt(ee.useCallback($8(e),[e]),qt)}const P8=e=>e.updateNodeInternals;function F8(){const e=dt(P8),[t]=ee.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const a=new Map;r.forEach(s=>{const o=s.target.getAttribute("data-id");a.set(o,{id:o,nodeElement:s.target,force:!0})}),e(a)}));return ee.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function G8({node:e,nodeType:t,hasDimensions:r,resizeObserver:a}){const s=Lt(),o=ee.useRef(null),c=ee.useRef(null),d=ee.useRef(e.sourcePosition),f=ee.useRef(e.targetPosition),h=ee.useRef(t),m=r&&!!e.internals.handleBounds;return ee.useEffect(()=>{o.current&&!e.hidden&&(!m||c.current!==o.current)&&(c.current&&(a==null||a.unobserve(c.current)),a==null||a.observe(o.current),c.current=o.current)},[m,e.hidden]),ee.useEffect(()=>()=>{c.current&&(a==null||a.unobserve(c.current),c.current=null)},[]),ee.useEffect(()=>{if(o.current){const p=h.current!==t,y=d.current!==e.sourcePosition,x=f.current!==e.targetPosition;(p||y||x)&&(h.current=t,d.current=e.sourcePosition,f.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function V8({id:e,onClick:t,onMouseEnter:r,onMouseMove:a,onMouseLeave:s,onContextMenu:o,onDoubleClick:c,nodesDraggable:d,elementsSelectable:f,nodesConnectable:h,nodesFocusable:m,resizeObserver:p,noDragClassName:y,noPanClassName:x,disableKeyboardA11y:_,rfId:N,nodeTypes:S,nodeClickDistance:w,onError:k}){const{node:E,internals:M,isParent:I}=dt(W=>{const te=W.nodeLookup.get(e),ce=W.parentLookup.has(e);return{node:te,internals:te.internals,isParent:ce}},qt);let R=E.type||"default",U=(S==null?void 0:S[R])||L1[R];U===void 0&&(k==null||k("003",Lr.error003(R)),R="default",U=(S==null?void 0:S.default)||L1.default);const B=!!(E.draggable||d&&typeof E.draggable>"u"),Z=!!(E.selectable||f&&typeof E.selectable>"u"),D=!!(E.connectable||h&&typeof E.connectable>"u"),z=!!(E.focusable||m&&typeof E.focusable>"u"),V=Lt(),P=YE(E),T=G8({node:E,nodeType:R,hasDimensions:P,resizeObserver:p}),$=NN({nodeRef:T,disabled:E.hidden||!B,noDragClassName:y,handleSelector:E.dragHandle,nodeId:e,isSelectable:Z,nodeClickDistance:w}),O=SN();if(E.hidden)return null;const H=Qr(E),X=z8(E),K=Z||B||t||r||a||s,C=r?W=>r(W,{...M.userNode}):void 0,j=a?W=>a(W,{...M.userNode}):void 0,Y=s?W=>s(W,{...M.userNode}):void 0,L=o?W=>o(W,{...M.userNode}):void 0,G=c?W=>c(W,{...M.userNode}):void 0,q=W=>{const{selectNodesOnDrag:te,nodeDragThreshold:ce}=V.getState();Z&&(!te||!B||ce>0)&&dp({id:e,store:V,nodeRef:T}),t&&t(W,{...M.userNode})},Q=W=>{if(!(ZE(W.nativeEvent)||_)){if(IE.includes(W.key)&&Z){const te=W.key==="Escape";dp({id:e,store:V,unselect:te,nodeRef:T})}else if(B&&E.selected&&Object.prototype.hasOwnProperty.call(Lu,W.key)){W.preventDefault();const{ariaLabelConfig:te}=V.getState();V.setState({ariaLiveMessage:te["node.a11yDescription.ariaLiveMessage"]({direction:W.key.replace("Arrow","").toLowerCase(),x:~~M.positionAbsolute.x,y:~~M.positionAbsolute.y})}),O({direction:Lu[W.key],factor:W.shiftKey?4:1})}}},J=()=>{var Ne;if(_||!((Ne=T.current)!=null&&Ne.matches(":focus-visible")))return;const{transform:W,width:te,height:ce,autoPanOnNodeFocus:fe,setCenter:be}=V.getState();if(!fe)return;Jp(new Map([[e,E]]),{x:0,y:0,width:te,height:ce},W,!0).length>0||be(E.position.x+H.width/2,E.position.y+H.height/2,{zoom:W[2]})};return g.jsx("div",{className:ln(["react-flow__node",`react-flow__node-${R}`,{[x]:B},E.className,{selected:E.selected,selectable:Z,parent:I,draggable:B,dragging:$}]),ref:T,style:{zIndex:M.z,transform:`translate(${M.positionAbsolute.x}px,${M.positionAbsolute.y}px)`,pointerEvents:K?"all":"none",visibility:P?"visible":"hidden",...E.style,...X},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:C,onMouseMove:j,onMouseLeave:Y,onContextMenu:L,onClick:q,onDoubleClick:G,onKeyDown:z?Q:void 0,tabIndex:z?0:void 0,onFocus:z?J:void 0,role:E.ariaRole??(z?"group":void 0),"aria-roledescription":"node","aria-describedby":_?void 0:`${pN}-${N}`,"aria-label":E.ariaLabel,...E.domAttributes,children:g.jsx(S8,{value:e,children:g.jsx(U,{id:e,data:E.data,type:R,positionAbsoluteX:M.positionAbsolute.x,positionAbsoluteY:M.positionAbsolute.y,selected:E.selected??!1,selectable:Z,draggable:B,deletable:E.deletable??!0,isConnectable:D,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:$,dragHandle:E.dragHandle,zIndex:M.z,parentId:E.parentId,...H})})})}var Y8=ee.memo(V8);const X8=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function AN(e){const{nodesConnectable:t,nodesFocusable:r,elementsSelectable:a,onError:s}=dt(X8,qt),o=q8(e.onlyRenderVisibleElements),c=F8();return g.jsx("div",{className:"react-flow__nodes",style:rd,children:o.map(d=>g.jsx(Y8,{id:d,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:c,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:r,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:s},d))})}AN.displayName="NodeRenderer";const K8=ee.memo(AN);function Z8(e){return dt(ee.useCallback(r=>{if(!e)return r.edges.map(s=>s.id);const a=[];if(r.width&&r.height)for(const s of r.edges){const o=r.nodeLookup.get(s.source),c=r.nodeLookup.get(s.target);o&&c&&Gz({sourceNode:o,targetNode:c,width:r.width,height:r.height,transform:r.transform})&&a.push(s.id)}return a},[e]),qt)}const Q8=({color:e="none",strokeWidth:t=1})=>{const r={strokeWidth:t,...e&&{stroke:e}};return g.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},W8=({color:e="none",strokeWidth:t=1})=>{const r={strokeWidth:t,...e&&{stroke:e,fill:e}};return g.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},I1={[Ru.Arrow]:Q8,[Ru.ArrowClosed]:W8};function J8(e){const t=Lt();return ee.useMemo(()=>{var s,o;return Object.prototype.hasOwnProperty.call(I1,e)?I1[e]:((o=(s=t.getState()).onError)==null||o.call(s,"009",Lr.error009(e)),null)},[e])}const e9=({id:e,type:t,color:r,width:a=12.5,height:s=12.5,markerUnits:o="strokeWidth",strokeWidth:c,orient:d="auto-start-reverse"})=>{const f=J8(t);return f?g.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${a}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:d,refX:"0",refY:"0",children:g.jsx(f,{color:r,strokeWidth:c})}):null},MN=({defaultColor:e,rfId:t})=>{const r=dt(o=>o.edges),a=dt(o=>o.defaultEdgeOptions),s=ee.useMemo(()=>Jz(r,{id:t,defaultColor:e,defaultMarkerStart:a==null?void 0:a.markerStart,defaultMarkerEnd:a==null?void 0:a.markerEnd}),[r,a,t,e]);return s.length?g.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:g.jsx("defs",{children:s.map(o=>g.jsx(e9,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};MN.displayName="MarkerDefinitions";var t9=ee.memo(MN);function ON({x:e,y:t,label:r,labelStyle:a,labelShowBg:s=!0,labelBgStyle:o,labelBgPadding:c=[2,4],labelBgBorderRadius:d=2,children:f,className:h,...m}){const[p,y]=ee.useState({x:1,y:0,width:0,height:0}),x=ln(["react-flow__edge-textwrapper",h]),_=ee.useRef(null);return ee.useEffect(()=>{if(_.current){const N=_.current.getBBox();y({x:N.x,y:N.y,width:N.width,height:N.height})}},[r]),r?g.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:x,visibility:p.width?"visible":"hidden",...m,children:[s&&g.jsx("rect",{width:p.width+2*c[0],x:-c[0],y:-c[1],height:p.height+2*c[1],className:"react-flow__edge-textbg",style:o,rx:d,ry:d}),g.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:_,style:a,children:r}),f]}):null}ON.displayName="EdgeText";const n9=ee.memo(ON);function id({path:e,labelX:t,labelY:r,label:a,labelStyle:s,labelShowBg:o,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,interactionWidth:h=20,...m}){return g.jsxs(g.Fragment,{children:[g.jsx("path",{...m,d:e,fill:"none",className:ln(["react-flow__edge-path",m.className])}),h?g.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}):null,a&&Or(t)&&Or(r)?g.jsx(n9,{x:t,y:r,label:a,labelStyle:s,labelShowBg:o,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f}):null]})}function B1({pos:e,x1:t,y1:r,x2:a,y2:s}){return e===ze.Left||e===ze.Right?[.5*(t+a),r]:[t,.5*(r+s)]}function RN({sourceX:e,sourceY:t,sourcePosition:r=ze.Bottom,targetX:a,targetY:s,targetPosition:o=ze.Top}){const[c,d]=B1({pos:r,x1:e,y1:t,x2:a,y2:s}),[f,h]=B1({pos:o,x1:a,y1:s,x2:e,y2:t}),[m,p,y,x]=WE({sourceX:e,sourceY:t,targetX:a,targetY:s,sourceControlX:c,sourceControlY:d,targetControlX:f,targetControlY:h});return[`M${e},${t} C${c},${d} ${f},${h} ${a},${s}`,m,p,y,x]}function DN(e){return ee.memo(({id:t,sourceX:r,sourceY:a,targetX:s,targetY:o,sourcePosition:c,targetPosition:d,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:_,markerEnd:N,markerStart:S,interactionWidth:w})=>{const[k,E,M]=RN({sourceX:r,sourceY:a,sourcePosition:c,targetX:s,targetY:o,targetPosition:d}),I=e.isInternal?void 0:t;return g.jsx(id,{id:I,path:k,labelX:E,labelY:M,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:_,markerEnd:N,markerStart:S,interactionWidth:w})})}const r9=DN({isInternal:!1}),jN=DN({isInternal:!0});r9.displayName="SimpleBezierEdge";jN.displayName="SimpleBezierEdgeInternal";function LN(e){return ee.memo(({id:t,sourceX:r,sourceY:a,targetX:s,targetY:o,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:p,style:y,sourcePosition:x=ze.Bottom,targetPosition:_=ze.Top,markerEnd:N,markerStart:S,pathOptions:w,interactionWidth:k})=>{const[E,M,I]=lp({sourceX:r,sourceY:a,sourcePosition:x,targetX:s,targetY:o,targetPosition:_,borderRadius:w==null?void 0:w.borderRadius,offset:w==null?void 0:w.offset,stepPosition:w==null?void 0:w.stepPosition}),R=e.isInternal?void 0:t;return g.jsx(id,{id:R,path:E,labelX:M,labelY:I,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:p,style:y,markerEnd:N,markerStart:S,interactionWidth:k})})}const zN=LN({isInternal:!1}),IN=LN({isInternal:!0});zN.displayName="SmoothStepEdge";IN.displayName="SmoothStepEdgeInternal";function BN(e){return ee.memo(({id:t,...r})=>{var s;const a=e.isInternal?void 0:t;return g.jsx(zN,{...r,id:a,pathOptions:ee.useMemo(()=>{var o;return{borderRadius:0,offset:(o=r.pathOptions)==null?void 0:o.offset}},[(s=r.pathOptions)==null?void 0:s.offset])})})}const i9=BN({isInternal:!1}),UN=BN({isInternal:!0});i9.displayName="StepEdge";UN.displayName="StepEdgeInternal";function HN(e){return ee.memo(({id:t,sourceX:r,sourceY:a,targetX:s,targetY:o,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:p,style:y,markerEnd:x,markerStart:_,interactionWidth:N})=>{const[S,w,k]=tN({sourceX:r,sourceY:a,targetX:s,targetY:o}),E=e.isInternal?void 0:t;return g.jsx(id,{id:E,path:S,labelX:w,labelY:k,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:p,style:y,markerEnd:x,markerStart:_,interactionWidth:N})})}const a9=HN({isInternal:!1}),$N=HN({isInternal:!0});a9.displayName="StraightEdge";$N.displayName="StraightEdgeInternal";function qN(e){return ee.memo(({id:t,sourceX:r,sourceY:a,targetX:s,targetY:o,sourcePosition:c=ze.Bottom,targetPosition:d=ze.Top,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:_,markerEnd:N,markerStart:S,pathOptions:w,interactionWidth:k})=>{const[E,M,I]=JE({sourceX:r,sourceY:a,sourcePosition:c,targetX:s,targetY:o,targetPosition:d,curvature:w==null?void 0:w.curvature}),R=e.isInternal?void 0:t;return g.jsx(id,{id:R,path:E,labelX:M,labelY:I,label:f,labelStyle:h,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:_,markerEnd:N,markerStart:S,interactionWidth:k})})}const s9=qN({isInternal:!1}),PN=qN({isInternal:!0});s9.displayName="BezierEdge";PN.displayName="BezierEdgeInternal";const U1={default:PN,straight:$N,step:UN,smoothstep:IN,simplebezier:jN},H1={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},l9=(e,t,r)=>r===ze.Left?e-t:r===ze.Right?e+t:e,o9=(e,t,r)=>r===ze.Top?e-t:r===ze.Bottom?e+t:e,$1="react-flow__edgeupdater";function q1({position:e,centerX:t,centerY:r,radius:a=10,onMouseDown:s,onMouseEnter:o,onMouseOut:c,type:d}){return g.jsx("circle",{onMouseDown:s,onMouseEnter:o,onMouseOut:c,className:ln([$1,`${$1}-${d}`]),cx:l9(t,a,e),cy:o9(r,a,e),r:a,stroke:"transparent",fill:"transparent"})}function c9({isReconnectable:e,reconnectRadius:t,edge:r,sourceX:a,sourceY:s,targetX:o,targetY:c,sourcePosition:d,targetPosition:f,onReconnect:h,onReconnectStart:m,onReconnectEnd:p,setReconnecting:y,setUpdateHover:x}){const _=Lt(),N=(M,I)=>{if(M.button!==0)return;const{autoPanOnConnect:R,domNode:U,connectionMode:B,connectionRadius:Z,lib:D,onConnectStart:z,cancelConnection:V,nodeLookup:P,rfId:T,panBy:$,updateConnection:O}=_.getState(),H=I.type==="target",X=(j,Y)=>{y(!1),p==null||p(j,r,I.type,Y)},K=j=>h==null?void 0:h(r,j),C=(j,Y)=>{y(!0),m==null||m(M,r,I.type),z==null||z(j,Y)};up.onPointerDown(M.nativeEvent,{autoPanOnConnect:R,connectionMode:B,connectionRadius:Z,domNode:U,handleId:I.id,nodeId:I.nodeId,nodeLookup:P,isTarget:H,edgeUpdaterType:I.type,lib:D,flowId:T,cancelConnection:V,panBy:$,isValidConnection:(...j)=>{var Y,L;return((L=(Y=_.getState()).isValidConnection)==null?void 0:L.call(Y,...j))??!0},onConnect:K,onConnectStart:C,onConnectEnd:(...j)=>{var Y,L;return(L=(Y=_.getState()).onConnectEnd)==null?void 0:L.call(Y,...j)},onReconnectEnd:X,updateConnection:O,getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,dragThreshold:_.getState().connectionDragThreshold,handleDomNode:M.currentTarget})},S=M=>N(M,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),w=M=>N(M,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),k=()=>x(!0),E=()=>x(!1);return g.jsxs(g.Fragment,{children:[(e===!0||e==="source")&&g.jsx(q1,{position:d,centerX:a,centerY:s,radius:t,onMouseDown:S,onMouseEnter:k,onMouseOut:E,type:"source"}),(e===!0||e==="target")&&g.jsx(q1,{position:f,centerX:o,centerY:c,radius:t,onMouseDown:w,onMouseEnter:k,onMouseOut:E,type:"target"})]})}function u9({id:e,edgesFocusable:t,edgesReconnectable:r,elementsSelectable:a,onClick:s,onDoubleClick:o,onContextMenu:c,onMouseEnter:d,onMouseMove:f,onMouseLeave:h,reconnectRadius:m,onReconnect:p,onReconnectStart:y,onReconnectEnd:x,rfId:_,edgeTypes:N,noPanClassName:S,onError:w,disableKeyboardA11y:k}){let E=dt(be=>be.edgeLookup.get(e));const M=dt(be=>be.defaultEdgeOptions);E=M?{...M,...E}:E;let I=E.type||"default",R=(N==null?void 0:N[I])||U1[I];R===void 0&&(w==null||w("011",Lr.error011(I)),I="default",R=(N==null?void 0:N.default)||U1.default);const U=!!(E.focusable||t&&typeof E.focusable>"u"),B=typeof p<"u"&&(E.reconnectable||r&&typeof E.reconnectable>"u"),Z=!!(E.selectable||a&&typeof E.selectable>"u"),D=ee.useRef(null),[z,V]=ee.useState(!1),[P,T]=ee.useState(!1),$=Lt(),{zIndex:O=E.zIndex,sourceX:H,sourceY:X,targetX:K,targetY:C,sourcePosition:j,targetPosition:Y}=dt(ee.useCallback(be=>{const we=be.nodeLookup.get(E.source),Ne=be.nodeLookup.get(E.target);if(!we||!Ne)return H1;const je=Wz({id:e,sourceNode:we,targetNode:Ne,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:be.connectionMode,onError:w}),$e=Fz({selected:E.selected,zIndex:E.zIndex,sourceNode:we,targetNode:Ne,elevateOnSelect:be.elevateEdgesOnSelect,zIndexMode:be.zIndexMode});return{...je||H1,zIndex:$e}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),qt),L=ee.useMemo(()=>E.markerStart?`url('#${op(E.markerStart,_)}')`:void 0,[E.markerStart,_]),G=ee.useMemo(()=>E.markerEnd?`url('#${op(E.markerEnd,_)}')`:void 0,[E.markerEnd,_]);if(E.hidden||H===null||X===null||K===null||C===null)return null;const q=be=>{var $e;const{addSelectedEdges:we,unselectNodesAndEdges:Ne,multiSelectionActive:je}=$.getState();Z&&($.setState({nodesSelectionActive:!1}),E.selected&&je?(Ne({nodes:[],edges:[E]}),($e=D.current)==null||$e.blur()):we([e])),s&&s(be,E)},Q=o?be=>{o(be,{...E})}:void 0,J=c?be=>{c(be,{...E})}:void 0,W=d?be=>{d(be,{...E})}:void 0,te=f?be=>{f(be,{...E})}:void 0,ce=h?be=>{h(be,{...E})}:void 0,fe=be=>{var we;if(!k&&IE.includes(be.key)&&Z){const{unselectNodesAndEdges:Ne,addSelectedEdges:je}=$.getState();be.key==="Escape"?((we=D.current)==null||we.blur(),Ne({edges:[E]})):je([e])}};return g.jsx("svg",{style:{zIndex:O},children:g.jsxs("g",{className:ln(["react-flow__edge",`react-flow__edge-${I}`,E.className,S,{selected:E.selected,animated:E.animated,inactive:!Z&&!s,updating:z,selectable:Z}]),onClick:q,onDoubleClick:Q,onContextMenu:J,onMouseEnter:W,onMouseMove:te,onMouseLeave:ce,onKeyDown:U?fe:void 0,tabIndex:U?0:void 0,role:E.ariaRole??(U?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":U?`${gN}-${_}`:void 0,ref:D,...E.domAttributes,children:[!P&&g.jsx(R,{id:e,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:Z,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:H,sourceY:X,targetX:K,targetY:C,sourcePosition:j,targetPosition:Y,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:L,markerEnd:G,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),B&&g.jsx(c9,{edge:E,isReconnectable:B,reconnectRadius:m,onReconnect:p,onReconnectStart:y,onReconnectEnd:x,sourceX:H,sourceY:X,targetX:K,targetY:C,sourcePosition:j,targetPosition:Y,setUpdateHover:V,setReconnecting:T})]})})}var d9=ee.memo(u9);const f9=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function FN({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:r,edgeTypes:a,noPanClassName:s,onReconnect:o,onEdgeContextMenu:c,onEdgeMouseEnter:d,onEdgeMouseMove:f,onEdgeMouseLeave:h,onEdgeClick:m,reconnectRadius:p,onEdgeDoubleClick:y,onReconnectStart:x,onReconnectEnd:_,disableKeyboardA11y:N}){const{edgesFocusable:S,edgesReconnectable:w,elementsSelectable:k,onError:E}=dt(f9,qt),M=Z8(t);return g.jsxs("div",{className:"react-flow__edges",children:[g.jsx(t9,{defaultColor:e,rfId:r}),M.map(I=>g.jsx(d9,{id:I,edgesFocusable:S,edgesReconnectable:w,elementsSelectable:k,noPanClassName:s,onReconnect:o,onContextMenu:c,onMouseEnter:d,onMouseMove:f,onMouseLeave:h,onClick:m,reconnectRadius:p,onDoubleClick:y,onReconnectStart:x,onReconnectEnd:_,rfId:r,onError:E,edgeTypes:a,disableKeyboardA11y:N},I))]})}FN.displayName="EdgeRenderer";const h9=ee.memo(FN),P1=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function m9({children:e}){const t=Lt(),r=ee.useRef(null),[a]=ee.useState(()=>t.getState().transform);return wN(()=>{let s=null;const o=()=>{const c=t.getState().transform;s&&c[0]===s[0]&&c[1]===s[1]&&c[2]===s[2]||(s=c,r.current&&(r.current.style.transform=P1(c)))};return o(),t.subscribe(o)},[t]),g.jsx("div",{ref:r,className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:P1(a)},children:e})}function p9(e){const t=Uo(),r=ee.useRef(!1);ee.useEffect(()=>{!r.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),r.current=!0)},[e,t.viewportInitialized])}const g9=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function b9(e){const t=dt(g9),r=Lt();return ee.useEffect(()=>{e&&(t==null||t(e),r.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function x9(e){return e.connection.inProgress?{...e.connection,to:Bo(e.connection.to,e.transform)}:{...e.connection}}function y9(e){return x9}function v9(e){const t=y9();return dt(t,qt)}const _9=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function w9({containerStyle:e,style:t,type:r,component:a}){const{nodesConnectable:s,width:o,height:c,isValid:d,inProgress:f}=dt(_9,qt);return!(o&&s&&f)?null:g.jsx("svg",{style:e,width:o,height:c,className:"react-flow__connectionline react-flow__container",children:g.jsx("g",{className:ln(["react-flow__connection",HE(d)]),children:g.jsx(GN,{style:t,type:r,CustomComponent:a,isValid:d})})})}const GN=({style:e,type:t=ca.Bezier,CustomComponent:r,isValid:a})=>{const{inProgress:s,from:o,fromNode:c,fromHandle:d,fromPosition:f,to:h,toNode:m,toHandle:p,toPosition:y,pointer:x}=v9();if(!s)return;if(r)return g.jsx(r,{connectionLineType:t,connectionLineStyle:e,fromNode:c,fromHandle:d,fromX:o.x,fromY:o.y,toX:h.x,toY:h.y,fromPosition:f,toPosition:y,connectionStatus:HE(a),toNode:m,toHandle:p,pointer:x});let _="";const N={sourceX:o.x,sourceY:o.y,sourcePosition:f,targetX:h.x,targetY:h.y,targetPosition:y};switch(t){case ca.Bezier:[_]=JE(N);break;case ca.SimpleBezier:[_]=RN(N);break;case ca.Step:[_]=lp({...N,borderRadius:0});break;case ca.SmoothStep:[_]=lp(N);break;default:[_]=tN(N)}return g.jsx("path",{d:_,fill:"none",className:"react-flow__connection-path",style:e})};GN.displayName="ConnectionLine";const E9={};function F1(e=E9){ee.useRef(e),Lt(),ee.useEffect(()=>{},[e])}function N9(){Lt(),ee.useRef(!1),ee.useEffect(()=>{},[])}function VN({nodeTypes:e,edgeTypes:t,onInit:r,onNodeClick:a,onEdgeClick:s,onNodeDoubleClick:o,onEdgeDoubleClick:c,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:m,onSelectionContextMenu:p,onSelectionStart:y,onSelectionEnd:x,connectionLineType:_,connectionLineStyle:N,connectionLineComponent:S,connectionLineContainerStyle:w,selectionKeyCode:k,selectionOnDrag:E,selectionMode:M,multiSelectionKeyCode:I,panActivationKeyCode:R,zoomActivationKeyCode:U,deleteKeyCode:B,onlyRenderVisibleElements:Z,elementsSelectable:D,defaultViewport:z,translateExtent:V,minZoom:P,maxZoom:T,preventScrolling:$,defaultMarkerColor:O,zoomOnScroll:H,zoomOnPinch:X,panOnScroll:K,panOnScrollSpeed:C,panOnScrollMode:j,zoomOnDoubleClick:Y,panOnDrag:L,autoPanOnSelection:G,onPaneClick:q,onPaneMouseEnter:Q,onPaneMouseMove:J,onPaneMouseLeave:W,onPaneScroll:te,onPaneContextMenu:ce,paneClickDistance:fe,nodeClickDistance:be,onEdgeContextMenu:we,onEdgeMouseEnter:Ne,onEdgeMouseMove:je,onEdgeMouseLeave:$e,reconnectRadius:st,onReconnect:Rt,onReconnectStart:Yt,onReconnectEnd:Pt,noDragClassName:Xt,noWheelClassName:Yn,noPanClassName:Nn,disableKeyboardA11y:ct,nodeExtent:It,rfId:ue,viewport:xe,onViewportChange:Oe,nodesDraggable:Fe}){return F1(e),F1(t),N9(),p9(r),b9(xe),g.jsx(H8,{onPaneClick:q,onPaneMouseEnter:Q,onPaneMouseMove:J,onPaneMouseLeave:W,onPaneContextMenu:ce,onPaneScroll:te,paneClickDistance:fe,deleteKeyCode:B,selectionKeyCode:k,selectionOnDrag:E,selectionMode:M,onSelectionStart:y,onSelectionEnd:x,multiSelectionKeyCode:I,panActivationKeyCode:R,zoomActivationKeyCode:U,elementsSelectable:D,zoomOnScroll:H,zoomOnPinch:X,zoomOnDoubleClick:Y,panOnScroll:K,panOnScrollSpeed:C,panOnScrollMode:j,panOnDrag:L,autoPanOnSelection:G,defaultViewport:z,translateExtent:V,minZoom:P,maxZoom:T,onSelectionContextMenu:p,preventScrolling:$,noDragClassName:Xt,noWheelClassName:Yn,noPanClassName:Nn,disableKeyboardA11y:ct,onViewportChange:Oe,isControlledViewport:!!xe,children:g.jsxs(m9,{children:[g.jsx(h9,{edgeTypes:t,onEdgeClick:s,onEdgeDoubleClick:c,onReconnect:Rt,onReconnectStart:Yt,onReconnectEnd:Pt,onlyRenderVisibleElements:Z,onEdgeContextMenu:we,onEdgeMouseEnter:Ne,onEdgeMouseMove:je,onEdgeMouseLeave:$e,reconnectRadius:st,defaultMarkerColor:O,noPanClassName:Nn,disableKeyboardA11y:ct,rfId:ue}),g.jsx(w9,{style:N,type:_,component:S,containerStyle:w}),g.jsx("div",{className:"react-flow__edgelabel-renderer"}),g.jsx(K8,{nodeTypes:e,onNodeClick:a,onNodeDoubleClick:o,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:m,nodeClickDistance:be,onlyRenderVisibleElements:Z,noPanClassName:Nn,noDragClassName:Xt,disableKeyboardA11y:ct,nodeExtent:It,rfId:ue,nodesDraggable:Fe}),g.jsx("div",{className:"react-flow__viewport-portal"})]})})}VN.displayName="GraphView";const S9=ee.memo(VN),k9=VE(),G1=({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,width:s,height:o,fitView:c,fitViewOptions:d,minZoom:f=.5,maxZoom:h=2,nodeOrigin:m,nodeExtent:p,zIndexMode:y="basic"}={})=>{const x=new Map,_=new Map,N=new Map,S=new Map,w=a??t??[],k=r??e??[],E=m??[0,0],M=p??wo;iN(N,S,w);const{nodesInitialized:I}=cp(k,x,_,{nodeOrigin:E,nodeExtent:M,zIndexMode:y});let R=[0,0,1];if(c&&s&&o){const U=zo(x,{filter:z=>!!((z.width||z.initialWidth)&&(z.height||z.initialHeight))}),{x:B,y:Z,zoom:D}=tg(U,s,o,f,h,(d==null?void 0:d.padding)??.1);R=[B,Z,D]}return{rfId:"1",width:s??0,height:o??0,transform:R,nodes:k,nodesInitialized:I,nodeLookup:x,parentLookup:_,edges:w,edgeLookup:S,connectionLookup:N,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:a!==void 0,panZoom:null,minZoom:f,maxZoom:h,translateExtent:wo,nodeExtent:M,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Zs.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:E,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:c??!1,fitViewOptions:d,fitViewResolver:null,connection:{...UE},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:k9,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:BE,zIndexMode:y,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},C9=({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,width:s,height:o,fitView:c,fitViewOptions:d,minZoom:f,maxZoom:h,nodeOrigin:m,nodeExtent:p,zIndexMode:y})=>$I((x,_)=>{async function N(){const{nodeLookup:S,panZoom:w,fitViewOptions:k,fitViewResolver:E,width:M,height:I,minZoom:R,maxZoom:U}=_();w&&(await Iz({nodes:S,width:M,height:I,panZoom:w,minZoom:R,maxZoom:U},k),E==null||E.resolve(!0),x({fitViewResolver:null}))}return{...G1({nodes:e,edges:t,width:s,height:o,fitView:c,fitViewOptions:d,minZoom:f,maxZoom:h,nodeOrigin:m,nodeExtent:p,defaultNodes:r,defaultEdges:a,zIndexMode:y}),setNodes:S=>{const{nodeLookup:w,parentLookup:k,nodeOrigin:E,elevateNodesOnSelect:M,fitViewQueued:I,zIndexMode:R,nodesSelectionActive:U}=_(),{nodesInitialized:B,hasSelectedNodes:Z}=cp(S,w,k,{nodeOrigin:E,nodeExtent:p,elevateNodesOnSelect:M,checkEquality:!0,zIndexMode:R}),D=U&&Z;I&&B?(N(),x({nodes:S,nodesInitialized:B,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):x({nodes:S,nodesInitialized:B,nodesSelectionActive:D})},setEdges:S=>{const{connectionLookup:w,edgeLookup:k}=_();iN(w,k,S),x({edges:S})},setDefaultNodesAndEdges:(S,w)=>{if(S){const{setNodes:k}=_();k(S),x({hasDefaultNodes:!0})}if(w){const{setEdges:k}=_();k(w),x({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:w,nodeLookup:k,parentLookup:E,domNode:M,nodeOrigin:I,nodeExtent:R,debug:U,fitViewQueued:B,zIndexMode:Z}=_(),{changes:D,updatedInternals:z}=sI(S,k,E,M,I,R,Z);z&&(nI(k,E,{nodeOrigin:I,nodeExtent:R,zIndexMode:Z}),B?(N(),x({fitViewQueued:!1,fitViewOptions:void 0})):x({}),(D==null?void 0:D.length)>0&&(U&&console.log("React Flow: trigger node changes",D),w==null||w(D)))},updateNodePositions:(S,w=!1)=>{const k=[];let E=[];const{nodeLookup:M,triggerNodeChanges:I,connection:R,updateConnection:U,onNodesChangeMiddlewareMap:B}=_();for(const[Z,D]of S){const z=M.get(Z),V=!!(z!=null&&z.expandParent&&(z!=null&&z.parentId)&&(D!=null&&D.position)),P={id:Z,type:"position",position:V?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:w};if(z&&R.inProgress&&R.fromNode.id===z.id){const T=Ka(z,R.fromHandle,ze.Left,!0);U({...R,from:T})}V&&z.parentId&&k.push({id:Z,parentId:z.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),E.push(P)}if(k.length>0){const{parentLookup:Z,nodeOrigin:D}=_(),z=lg(k,M,Z,D);E.push(...z)}for(const Z of B.values())E=Z(E);I(E)},triggerNodeChanges:S=>{const{onNodesChange:w,setNodes:k,nodes:E,hasDefaultNodes:M,debug:I}=_();if(S!=null&&S.length){if(M){const R=yN(S,E);k(R)}I&&console.log("React Flow: trigger node changes",S),w==null||w(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:w,setEdges:k,edges:E,hasDefaultEdges:M,debug:I}=_();if(S!=null&&S.length){if(M){const R=vN(S,E);k(R)}I&&console.log("React Flow: trigger edge changes",S),w==null||w(S)}},addSelectedNodes:S=>{const{multiSelectionActive:w,edgeLookup:k,nodeLookup:E,triggerNodeChanges:M,triggerEdgeChanges:I}=_();if(w){const R=S.map(U=>Ua(U,!0));M(R);return}M(Hs(E,new Set([...S]),!0)),I(Hs(k))},addSelectedEdges:S=>{const{multiSelectionActive:w,edgeLookup:k,nodeLookup:E,triggerNodeChanges:M,triggerEdgeChanges:I}=_();if(w){const R=S.map(U=>Ua(U,!0));I(R);return}I(Hs(k,new Set([...S]))),M(Hs(E,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:w}={})=>{const{edges:k,nodes:E,nodeLookup:M,triggerNodeChanges:I,triggerEdgeChanges:R}=_(),U=S||E,B=w||k,Z=[];for(const z of U){if(!z.selected)continue;const V=M.get(z.id);V&&(V.selected=!1),Z.push(Ua(z.id,!1))}const D=[];for(const z of B)z.selected&&D.push(Ua(z.id,!1));I(Z),R(D)},setMinZoom:S=>{const{panZoom:w,maxZoom:k}=_();w==null||w.setScaleExtent([S,k]),x({minZoom:S})},setMaxZoom:S=>{const{panZoom:w,minZoom:k}=_();w==null||w.setScaleExtent([k,S]),x({maxZoom:S})},setTranslateExtent:S=>{var w;(w=_().panZoom)==null||w.setTranslateExtent(S),x({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:w,triggerNodeChanges:k,triggerEdgeChanges:E,elementsSelectable:M}=_();if(!M)return;const I=w.reduce((U,B)=>B.selected?[...U,Ua(B.id,!1)]:U,[]),R=S.reduce((U,B)=>B.selected?[...U,Ua(B.id,!1)]:U,[]);k(I),E(R)},setNodeExtent:S=>{const{nodes:w,nodeLookup:k,parentLookup:E,nodeOrigin:M,elevateNodesOnSelect:I,nodeExtent:R,zIndexMode:U}=_();S[0][0]===R[0][0]&&S[0][1]===R[0][1]&&S[1][0]===R[1][0]&&S[1][1]===R[1][1]||(cp(w,k,E,{nodeOrigin:M,nodeExtent:S,elevateNodesOnSelect:I,checkEquality:!1,zIndexMode:U}),x({nodeExtent:S}))},panBy:S=>{const{transform:w,width:k,height:E,panZoom:M,translateExtent:I}=_();return lI({delta:S,panZoom:M,transform:w,translateExtent:I,width:k,height:E})},setCenter:async(S,w,k)=>{const{width:E,height:M,maxZoom:I,panZoom:R}=_();if(!R)return!1;const U=typeof(k==null?void 0:k.zoom)<"u"?k.zoom:I;return await R.setViewport({x:E/2-S*U,y:M/2-w*U,zoom:U},{duration:k==null?void 0:k.duration,ease:k==null?void 0:k.ease,interpolate:k==null?void 0:k.interpolate}),!0},cancelConnection:()=>{x({connection:{...UE}})},updateConnection:S=>{x({connection:S})},reset:()=>x({...G1()})}},Object.is);function T9({initialNodes:e,initialEdges:t,defaultNodes:r,defaultEdges:a,initialWidth:s,initialHeight:o,initialMinZoom:c,initialMaxZoom:d,initialFitViewOptions:f,fitView:h,nodeOrigin:m,nodeExtent:p,zIndexMode:y,children:x}){const[_]=ee.useState(()=>C9({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,width:s,height:o,fitView:h,minZoom:c,maxZoom:d,fitViewOptions:f,nodeOrigin:m,nodeExtent:p,zIndexMode:y}));return g.jsx(qI,{value:_,children:g.jsx(f8,{children:g.jsx(C8,{children:x})})})}function A9({children:e,nodes:t,edges:r,defaultNodes:a,defaultEdges:s,width:o,height:c,fitView:d,fitViewOptions:f,minZoom:h,maxZoom:m,nodeOrigin:p,nodeExtent:y,zIndexMode:x}){return ee.useContext(td)?g.jsx(g.Fragment,{children:e}):g.jsx(T9,{initialNodes:t,initialEdges:r,defaultNodes:a,defaultEdges:s,initialWidth:o,initialHeight:c,fitView:d,initialFitViewOptions:f,initialMinZoom:h,initialMaxZoom:m,nodeOrigin:p,nodeExtent:y,zIndexMode:x,children:e})}const M9={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function O9({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,className:s,nodeTypes:o,edgeTypes:c,onNodeClick:d,onEdgeClick:f,onInit:h,onMove:m,onMoveStart:p,onMoveEnd:y,onConnect:x,onConnectStart:_,onConnectEnd:N,onClickConnectStart:S,onClickConnectEnd:w,onNodeMouseEnter:k,onNodeMouseMove:E,onNodeMouseLeave:M,onNodeContextMenu:I,onNodeDoubleClick:R,onNodeDragStart:U,onNodeDrag:B,onNodeDragStop:Z,onNodesDelete:D,onEdgesDelete:z,onDelete:V,onSelectionChange:P,onSelectionDragStart:T,onSelectionDrag:$,onSelectionDragStop:O,onSelectionContextMenu:H,onSelectionStart:X,onSelectionEnd:K,onBeforeDelete:C,connectionMode:j,connectionLineType:Y=ca.Bezier,connectionLineStyle:L,connectionLineComponent:G,connectionLineContainerStyle:q,deleteKeyCode:Q="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:W=!1,selectionMode:te=Eo.Full,panActivationKeyCode:ce="Space",multiSelectionKeyCode:fe=So()?"Meta":"Control",zoomActivationKeyCode:be=So()?"Meta":"Control",snapToGrid:we,snapGrid:Ne,onlyRenderVisibleElements:je=!1,selectNodesOnDrag:$e,nodesDraggable:st,autoPanOnNodeFocus:Rt,nodesConnectable:Yt,nodesFocusable:Pt,nodeOrigin:Xt=bN,edgesFocusable:Yn,edgesReconnectable:Nn,elementsSelectable:ct=!0,defaultViewport:It=t8,minZoom:ue=.5,maxZoom:xe=2,translateExtent:Oe=wo,preventScrolling:Fe=!0,nodeExtent:Ze,defaultMarkerColor:on="#b1b1b7",zoomOnScroll:Sn=!0,zoomOnPinch:Kt=!0,panOnScroll:At=!1,panOnScrollSpeed:Wt=.5,panOnScrollMode:ut=Pa.Free,zoomOnDoubleClick:In=!0,panOnDrag:cn=!0,onPaneClick:Ni,onPaneMouseEnter:nt,onPaneMouseMove:Xn,onPaneMouseLeave:On,onPaneScroll:hn,onPaneContextMenu:re,paneClickDistance:me=1,nodeClickDistance:Ee=0,children:Pe,onReconnect:St,onReconnectStart:gt,onReconnectEnd:Ae,onEdgeContextMenu:Se,onEdgeDoubleClick:Ue,onEdgeMouseEnter:Bt,onEdgeMouseMove:Mt,onEdgeMouseLeave:xr,reconnectRadius:Si=10,onNodesChange:ki,onEdgesChange:lr,noDragClassName:Ut="nodrag",noWheelClassName:mn="nowheel",noPanClassName:yr="nopan",fitView:Ci,fitViewOptions:pa,connectOnClick:Ti,attributionPosition:Ja,proOptions:Wr,defaultEdgeOptions:ga,elevateNodesOnSelect:bn=!0,elevateEdgesOnSelect:vr=!1,disableKeyboardA11y:_r=!1,autoPanOnConnect:Br,autoPanOnNodeDrag:Ft,autoPanOnSelection:es=!0,autoPanSpeed:Jr,connectionRadius:wr,isValidConnection:ye,onError:Le,style:Qe,id:ft,nodeDragThreshold:Ht,connectionDragThreshold:pn,viewport:Rn,onViewportChange:kn,width:_t,height:Dn,colorMode:ts="light",debug:Ai,onScroll:Ur,ariaLabelConfig:Mi,zIndexMode:ns="basic",...Cn},ba){const Er=ft||"1",Oi=a8(ts),un=ee.useCallback(xa=>{xa.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ur==null||Ur(xa)},[Ur]);return g.jsx("div",{"data-testid":"rf__wrapper",...Cn,onScroll:un,style:{...Qe,...M9},ref:ba,className:ln(["react-flow",s,Oi]),id:ft,role:"application",children:g.jsxs(A9,{nodes:e,edges:t,width:_t,height:Dn,fitView:Ci,fitViewOptions:pa,minZoom:ue,maxZoom:xe,nodeOrigin:Xt,nodeExtent:Ze,zIndexMode:ns,children:[g.jsx(i8,{nodes:e,edges:t,defaultNodes:r,defaultEdges:a,onConnect:x,onConnectStart:_,onConnectEnd:N,onClickConnectStart:S,onClickConnectEnd:w,nodesDraggable:st,autoPanOnNodeFocus:Rt,nodesConnectable:Yt,nodesFocusable:Pt,edgesFocusable:Yn,edgesReconnectable:Nn,elementsSelectable:ct,elevateNodesOnSelect:bn,elevateEdgesOnSelect:vr,minZoom:ue,maxZoom:xe,nodeExtent:Ze,onNodesChange:ki,onEdgesChange:lr,snapToGrid:we,snapGrid:Ne,connectionMode:j,translateExtent:Oe,connectOnClick:Ti,defaultEdgeOptions:ga,fitView:Ci,fitViewOptions:pa,onNodesDelete:D,onEdgesDelete:z,onDelete:V,onNodeDragStart:U,onNodeDrag:B,onNodeDragStop:Z,onSelectionDrag:$,onSelectionDragStart:T,onSelectionDragStop:O,onMove:m,onMoveStart:p,onMoveEnd:y,noPanClassName:yr,nodeOrigin:Xt,rfId:Er,autoPanOnConnect:Br,autoPanOnNodeDrag:Ft,autoPanSpeed:Jr,onError:Le,connectionRadius:wr,isValidConnection:ye,selectNodesOnDrag:$e,nodeDragThreshold:Ht,connectionDragThreshold:pn,onBeforeDelete:C,debug:Ai,ariaLabelConfig:Mi,zIndexMode:ns}),g.jsx(S9,{onInit:h,onNodeClick:d,onEdgeClick:f,onNodeMouseEnter:k,onNodeMouseMove:E,onNodeMouseLeave:M,onNodeContextMenu:I,onNodeDoubleClick:R,nodeTypes:o,edgeTypes:c,connectionLineType:Y,connectionLineStyle:L,connectionLineComponent:G,connectionLineContainerStyle:q,selectionKeyCode:J,selectionOnDrag:W,selectionMode:te,deleteKeyCode:Q,multiSelectionKeyCode:fe,panActivationKeyCode:ce,zoomActivationKeyCode:be,onlyRenderVisibleElements:je,defaultViewport:It,translateExtent:Oe,minZoom:ue,maxZoom:xe,preventScrolling:Fe,zoomOnScroll:Sn,zoomOnPinch:Kt,zoomOnDoubleClick:In,panOnScroll:At,panOnScrollSpeed:Wt,panOnScrollMode:ut,panOnDrag:cn,autoPanOnSelection:es,onPaneClick:Ni,onPaneMouseEnter:nt,onPaneMouseMove:Xn,onPaneMouseLeave:On,onPaneScroll:hn,onPaneContextMenu:re,paneClickDistance:me,nodeClickDistance:Ee,onSelectionContextMenu:H,onSelectionStart:X,onSelectionEnd:K,onReconnect:St,onReconnectStart:gt,onReconnectEnd:Ae,onEdgeContextMenu:Se,onEdgeDoubleClick:Ue,onEdgeMouseEnter:Bt,onEdgeMouseMove:Mt,onEdgeMouseLeave:xr,reconnectRadius:Si,defaultMarkerColor:on,noDragClassName:Ut,noWheelClassName:mn,noPanClassName:yr,rfId:Er,disableKeyboardA11y:_r,nodeExtent:Ze,viewport:Rn,onViewportChange:kn,nodesDraggable:st}),g.jsx(e8,{onSelectionChange:P}),Pe,g.jsx(KI,{proOptions:Wr,position:Ja}),g.jsx(XI,{rfId:Er,disableKeyboardA11y:_r})]})})}var R9=_N(O9);function D9(e){const[t,r]=ee.useState(e),a=ee.useCallback(s=>r(o=>yN(s,o)),[]);return[t,r,a]}function j9(e){const[t,r]=ee.useState(e),a=ee.useCallback(s=>r(o=>vN(s,o)),[]);return[t,r,a]}function L9({dimensions:e,lineWidth:t,variant:r,className:a}){return g.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ln(["react-flow__background-pattern",r,a])})}function z9({radius:e,className:t}){return g.jsx("circle",{cx:e,cy:e,r:e,className:ln(["react-flow__background-pattern","dots",t])})}var da;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(da||(da={}));const I9={[da.Dots]:1,[da.Lines]:1,[da.Cross]:6},B9=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function YN({id:e,variant:t=da.Dots,gap:r=20,size:a,lineWidth:s=1,offset:o=0,color:c,bgColor:d,style:f,className:h,patternClassName:m}){const p=ee.useRef(null),{transform:y,patternId:x}=dt(B9,qt),_=a||I9[t],N=t===da.Dots,S=t===da.Cross,w=Array.isArray(r)?r:[r,r],k=[w[0]*y[2]||1,w[1]*y[2]||1],E=_*y[2],M=Array.isArray(o)?o:[o,o],I=S?[E,E]:k,R=[M[0]*y[2]||1+I[0]/2,M[1]*y[2]||1+I[1]/2],U=`${x}${e||""}`;return g.jsxs("svg",{className:ln(["react-flow__background",h]),style:{...f,...rd,"--xy-background-color-props":d,"--xy-background-pattern-color-props":c},ref:p,"data-testid":"rf__background",children:[g.jsx("pattern",{id:U,x:y[0]%k[0],y:y[1]%k[1],width:k[0],height:k[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${R[0]},-${R[1]})`,children:N?g.jsx(z9,{radius:E/2,className:m}):g.jsx(L9,{dimensions:I,lineWidth:s,variant:t,className:m})}),g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${U})`})]})}YN.displayName="Background";const U9=ee.memo(YN);function H9(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:g.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function $9(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:g.jsx("path",{d:"M0 0h32v4.2H0z"})})}function q9(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:g.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 P9(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:g.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 F9(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:g.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 du({children:e,className:t,...r}){return g.jsx("button",{type:"button",className:ln(["react-flow__controls-button",t]),...r,children:e})}const G9=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function XN({style:e,showZoom:t=!0,showFitView:r=!0,showInteractive:a=!0,fitViewOptions:s,onZoomIn:o,onZoomOut:c,onFitView:d,onInteractiveChange:f,className:h,children:m,position:p="bottom-left",orientation:y="vertical","aria-label":x}){const _=Lt(),{isInteractive:N,minZoomReached:S,maxZoomReached:w,ariaLabelConfig:k}=dt(G9,qt),{zoomIn:E,zoomOut:M,fitView:I}=Uo(),R=()=>{E(),o==null||o()},U=()=>{M(),c==null||c()},B=()=>{I(s),d==null||d()},Z=()=>{_.setState({nodesDraggable:!N,nodesConnectable:!N,elementsSelectable:!N}),f==null||f(!N)},D=y==="horizontal"?"horizontal":"vertical";return g.jsxs(nd,{className:ln(["react-flow__controls",D,h]),position:p,style:e,"data-testid":"rf__controls","aria-label":x??k["controls.ariaLabel"],children:[t&&g.jsxs(g.Fragment,{children:[g.jsx(du,{onClick:R,className:"react-flow__controls-zoomin",title:k["controls.zoomIn.ariaLabel"],"aria-label":k["controls.zoomIn.ariaLabel"],disabled:w,children:g.jsx(H9,{})}),g.jsx(du,{onClick:U,className:"react-flow__controls-zoomout",title:k["controls.zoomOut.ariaLabel"],"aria-label":k["controls.zoomOut.ariaLabel"],disabled:S,children:g.jsx($9,{})})]}),r&&g.jsx(du,{className:"react-flow__controls-fitview",onClick:B,title:k["controls.fitView.ariaLabel"],"aria-label":k["controls.fitView.ariaLabel"],children:g.jsx(q9,{})}),a&&g.jsx(du,{className:"react-flow__controls-interactive",onClick:Z,title:k["controls.interactive.ariaLabel"],"aria-label":k["controls.interactive.ariaLabel"],children:N?g.jsx(F9,{}):g.jsx(P9,{})}),m]})}XN.displayName="Controls";const V9=ee.memo(XN);function Y9({id:e,x:t,y:r,width:a,height:s,style:o,color:c,strokeColor:d,strokeWidth:f,className:h,borderRadius:m,shapeRendering:p,selected:y,onClick:x}){const{background:_,backgroundColor:N}=o||{},S=c||_||N;return g.jsx("rect",{className:ln(["react-flow__minimap-node",{selected:y},h]),x:t,y:r,rx:m,ry:m,width:a,height:s,style:{fill:S,stroke:d,strokeWidth:f},shapeRendering:p,onClick:x?w=>x(w,e):void 0})}const X9=ee.memo(Y9),K9=e=>e.nodes.map(t=>t.id),Tm=e=>e instanceof Function?e:()=>e;function Z9({nodeStrokeColor:e,nodeColor:t,nodeClassName:r="",nodeBorderRadius:a=5,nodeStrokeWidth:s,nodeComponent:o=X9,onClick:c}){const d=dt(K9,qt),f=Tm(t),h=Tm(e),m=Tm(r),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return g.jsx(g.Fragment,{children:d.map(y=>g.jsx(W9,{id:y,nodeColorFunc:f,nodeStrokeColorFunc:h,nodeClassNameFunc:m,nodeBorderRadius:a,nodeStrokeWidth:s,NodeComponent:o,onClick:c,shapeRendering:p},y))})}function Q9({id:e,nodeColorFunc:t,nodeStrokeColorFunc:r,nodeClassNameFunc:a,nodeBorderRadius:s,nodeStrokeWidth:o,shapeRendering:c,NodeComponent:d,onClick:f}){const{node:h,x:m,y:p,width:y,height:x}=dt(_=>{const N=_.nodeLookup.get(e);if(!N)return{node:void 0,x:0,y:0,width:0,height:0};const S=N.internals.userNode,{x:w,y:k}=N.internals.positionAbsolute,{width:E,height:M}=Qr(S);return{node:S,x:w,y:k,width:E,height:M}},qt);return!h||h.hidden||!YE(h)?null:g.jsx(d,{x:m,y:p,width:y,height:x,style:h.style,selected:!!h.selected,className:a(h),color:t(h),borderRadius:s,strokeColor:r(h),strokeWidth:o,shapeRendering:c,onClick:f,id:h.id})}const W9=ee.memo(Q9);var J9=ee.memo(Z9);const eB=200,tB=150,nB=e=>!e.hidden,rB=e=>{const t={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:t,boundingRect:e.nodeLookup.size>0?FE(zo(e.nodeLookup,{filter:nB}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},V1=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,iB=(e,t)=>V1(e.viewBB,t.viewBB)&&V1(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,aB="react-flow__minimap-desc";function KN({style:e,className:t,nodeStrokeColor:r,nodeColor:a,nodeClassName:s="",nodeBorderRadius:o=5,nodeStrokeWidth:c,nodeComponent:d,bgColor:f,maskColor:h,maskStrokeColor:m,maskStrokeWidth:p,position:y="bottom-right",onClick:x,onNodeClick:_,pannable:N=!1,zoomable:S=!1,ariaLabel:w,inversePan:k,zoomStep:E=1,offsetScale:M=5}){const I=Lt(),R=ee.useRef(null),{boundingRect:U,viewBB:B,rfId:Z,panZoom:D,translateExtent:z,flowWidth:V,flowHeight:P,ariaLabelConfig:T}=dt(rB,iB),$=(e==null?void 0:e.width)??eB,O=(e==null?void 0:e.height)??tB,H=U.width/$,X=U.height/O,K=Math.max(H,X),C=K*$,j=K*O,Y=M*K,L=U.x-(C-U.width)/2-Y,G=U.y-(j-U.height)/2-Y,q=C+Y*2,Q=j+Y*2,J=`${aB}-${Z}`,W=ee.useRef(0),te=ee.useRef();W.current=K,ee.useEffect(()=>{if(R.current&&D)return te.current=gI({domNode:R.current,panZoom:D,getTransform:()=>I.getState().transform,getViewScale:()=>W.current}),()=>{var we;(we=te.current)==null||we.destroy()}},[D]),ee.useEffect(()=>{var we;(we=te.current)==null||we.update({translateExtent:z,width:V,height:P,inversePan:k,pannable:N,zoomStep:E,zoomable:S})},[N,S,k,E,z,V,P]);const ce=x?we=>{var $e;const[Ne,je]=(($e=te.current)==null?void 0:$e.pointer(we))||[0,0];x(we,{x:Ne,y:je})}:void 0,fe=_?ee.useCallback((we,Ne)=>{const je=I.getState().nodeLookup.get(Ne).internals.userNode;_(we,je)},[]):void 0,be=w??T["minimap.ariaLabel"];return g.jsx(nd,{position:y,style:{...e,"--xy-minimap-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*K:void 0,"--xy-minimap-node-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof c=="number"?c:void 0},className:ln(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:g.jsxs("svg",{width:$,height:O,viewBox:`${L} ${G} ${q} ${Q}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":J,ref:R,onClick:ce,children:[be&&g.jsx("title",{id:J,children:be}),g.jsx(J9,{onClick:fe,nodeColor:a,nodeStrokeColor:r,nodeBorderRadius:o,nodeClassName:s,nodeStrokeWidth:c,nodeComponent:d}),g.jsx("path",{className:"react-flow__minimap-mask",d:`M${L-Y},${G-Y}h${q+Y*2}v${Q+Y*2}h${-q-Y*2}z + M${B.x},${B.y}h${B.width}v${B.height}h${-B.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}KN.displayName="MiniMap";const sB=ee.memo(KN),lB=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,oB={[Js.Line]:"right",[Js.Handle]:"bottom-right"};function cB({nodeId:e,position:t,variant:r=Js.Handle,className:a,style:s=void 0,children:o,color:c,minWidth:d=10,minHeight:f=10,maxWidth:h=Number.MAX_VALUE,maxHeight:m=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:y,autoScale:x=!0,shouldResize:_,onResizeStart:N,onResize:S,onResizeEnd:w}){const k=kN(),E=typeof e=="string"?e:k,M=Lt(),I=ee.useRef(null),R=r===Js.Handle,U=dt(ee.useCallback(lB(R&&x),[R,x]),qt),B=ee.useRef(null),Z=t??oB[r];ee.useEffect(()=>{if(!(!I.current||!E))return B.current||(B.current=AI({domNode:I.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:z,transform:V,snapGrid:P,snapToGrid:T,nodeOrigin:$,domNode:O}=M.getState();return{nodeLookup:z,transform:V,snapGrid:P,snapToGrid:T,nodeOrigin:$,paneDomNode:O}},onChange:(z,V)=>{const{triggerNodeChanges:P,nodeLookup:T,parentLookup:$,nodeOrigin:O}=M.getState(),H=[],X={x:z.x,y:z.y},K=T.get(E);if(K&&K.expandParent&&K.parentId){const C=K.origin??O,j=z.width??K.measured.width??0,Y=z.height??K.measured.height??0,L={id:K.id,parentId:K.parentId,rect:{width:j,height:Y,...XE({x:z.x??K.position.x,y:z.y??K.position.y},{width:j,height:Y},K.parentId,T,C)}},G=lg([L],T,$,O);H.push(...G),X.x=z.x?Math.max(C[0]*j,z.x):void 0,X.y=z.y?Math.max(C[1]*Y,z.y):void 0}if(X.x!==void 0&&X.y!==void 0){const C={id:E,type:"position",position:{...X}};H.push(C)}if(z.width!==void 0&&z.height!==void 0){const j={id:E,type:"dimensions",resizing:!0,setAttributes:y?y==="horizontal"?"width":"height":!0,dimensions:{width:z.width,height:z.height}};H.push(j)}for(const C of V){const j={...C,type:"position"};H.push(j)}P(H)},onEnd:({width:z,height:V})=>{const P={id:E,type:"dimensions",resizing:!1,dimensions:{width:z,height:V}};M.getState().triggerNodeChanges([P])}})),B.current.update({controlPosition:Z,boundaries:{minWidth:d,minHeight:f,maxWidth:h,maxHeight:m},keepAspectRatio:p,resizeDirection:y,onResizeStart:N,onResize:S,onResizeEnd:w,shouldResize:_}),()=>{var z;(z=B.current)==null||z.destroy()}},[Z,d,f,h,m,p,N,S,w,_]);const D=Z.split("-");return g.jsx("div",{className:ln(["react-flow__resize-control","nodrag",...D,r,a]),ref:I,style:{...s,scale:U,...c&&{[R?"backgroundColor":"borderColor"]:c}},children:o})}ee.memo(cB);var vt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zr=vt((e,t)=>{var r=Object.defineProperty,a=(P,T,$)=>T in P?r(P,T,{enumerable:!0,configurable:!0,writable:!0,value:$}):P[T]=$,s=(P,T)=>()=>(T||P((T={exports:{}}).exports,T),T.exports),o=(P,T,$)=>a(P,typeof T!="symbol"?T+"":T,$),c=s((P,T)=>{var $="\0",O="\0",H="",X=class{constructor(G){o(this,"_isDirected",!0),o(this,"_isMultigraph",!1),o(this,"_isCompound",!1),o(this,"_label"),o(this,"_defaultNodeLabelFn",()=>{}),o(this,"_defaultEdgeLabelFn",()=>{}),o(this,"_nodes",{}),o(this,"_in",{}),o(this,"_preds",{}),o(this,"_out",{}),o(this,"_sucs",{}),o(this,"_edgeObjs",{}),o(this,"_edgeLabels",{}),o(this,"_nodeCount",0),o(this,"_edgeCount",0),o(this,"_parent"),o(this,"_children"),G&&(this._isDirected=Object.hasOwn(G,"directed")?G.directed:!0,this._isMultigraph=Object.hasOwn(G,"multigraph")?G.multigraph:!1,this._isCompound=Object.hasOwn(G,"compound")?G.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[O]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(G){return this._label=G,this}graph(){return this._label}setDefaultNodeLabel(G){return this._defaultNodeLabelFn=G,typeof G!="function"&&(this._defaultNodeLabelFn=()=>G),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var G=this;return this.nodes().filter(q=>Object.keys(G._in[q]).length===0)}sinks(){var G=this;return this.nodes().filter(q=>Object.keys(G._out[q]).length===0)}setNodes(G,q){var Q=arguments,J=this;return G.forEach(function(W){Q.length>1?J.setNode(W,q):J.setNode(W)}),this}setNode(G,q){return Object.hasOwn(this._nodes,G)?(arguments.length>1&&(this._nodes[G]=q),this):(this._nodes[G]=arguments.length>1?q:this._defaultNodeLabelFn(G),this._isCompound&&(this._parent[G]=O,this._children[G]={},this._children[O][G]=!0),this._in[G]={},this._preds[G]={},this._out[G]={},this._sucs[G]={},++this._nodeCount,this)}node(G){return this._nodes[G]}hasNode(G){return Object.hasOwn(this._nodes,G)}removeNode(G){var q=this;if(Object.hasOwn(this._nodes,G)){var Q=J=>q.removeEdge(q._edgeObjs[J]);delete this._nodes[G],this._isCompound&&(this._removeFromParentsChildList(G),delete this._parent[G],this.children(G).forEach(function(J){q.setParent(J)}),delete this._children[G]),Object.keys(this._in[G]).forEach(Q),delete this._in[G],delete this._preds[G],Object.keys(this._out[G]).forEach(Q),delete this._out[G],delete this._sucs[G],--this._nodeCount}return this}setParent(G,q){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(q===void 0)q=O;else{q+="";for(var Q=q;Q!==void 0;Q=this.parent(Q))if(Q===G)throw new Error("Setting "+q+" as parent of "+G+" would create a cycle");this.setNode(q)}return this.setNode(G),this._removeFromParentsChildList(G),this._parent[G]=q,this._children[q][G]=!0,this}_removeFromParentsChildList(G){delete this._children[this._parent[G]][G]}parent(G){if(this._isCompound){var q=this._parent[G];if(q!==O)return q}}children(G=O){if(this._isCompound){var q=this._children[G];if(q)return Object.keys(q)}else{if(G===O)return this.nodes();if(this.hasNode(G))return[]}}predecessors(G){var q=this._preds[G];if(q)return Object.keys(q)}successors(G){var q=this._sucs[G];if(q)return Object.keys(q)}neighbors(G){var q=this.predecessors(G);if(q){let J=new Set(q);for(var Q of this.successors(G))J.add(Q);return Array.from(J.values())}}isLeaf(G){var q;return this.isDirected()?q=this.successors(G):q=this.neighbors(G),q.length===0}filterNodes(G){var q=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});q.setGraph(this.graph());var Q=this;Object.entries(this._nodes).forEach(function([te,ce]){G(te)&&q.setNode(te,ce)}),Object.values(this._edgeObjs).forEach(function(te){q.hasNode(te.v)&&q.hasNode(te.w)&&q.setEdge(te,Q.edge(te))});var J={};function W(te){var ce=Q.parent(te);return ce===void 0||q.hasNode(ce)?(J[te]=ce,ce):ce in J?J[ce]:W(ce)}return this._isCompound&&q.nodes().forEach(te=>q.setParent(te,W(te))),q}setDefaultEdgeLabel(G){return this._defaultEdgeLabelFn=G,typeof G!="function"&&(this._defaultEdgeLabelFn=()=>G),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(G,q){var Q=this,J=arguments;return G.reduce(function(W,te){return J.length>1?Q.setEdge(W,te,q):Q.setEdge(W,te),te}),this}setEdge(){var G,q,Q,J,W=!1,te=arguments[0];typeof te=="object"&&te!==null&&"v"in te?(G=te.v,q=te.w,Q=te.name,arguments.length===2&&(J=arguments[1],W=!0)):(G=te,q=arguments[1],Q=arguments[3],arguments.length>2&&(J=arguments[2],W=!0)),G=""+G,q=""+q,Q!==void 0&&(Q=""+Q);var ce=j(this._isDirected,G,q,Q);if(Object.hasOwn(this._edgeLabels,ce))return W&&(this._edgeLabels[ce]=J),this;if(Q!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(G),this.setNode(q),this._edgeLabels[ce]=W?J:this._defaultEdgeLabelFn(G,q,Q);var fe=Y(this._isDirected,G,q,Q);return G=fe.v,q=fe.w,Object.freeze(fe),this._edgeObjs[ce]=fe,K(this._preds[q],G),K(this._sucs[G],q),this._in[q][ce]=fe,this._out[G][ce]=fe,this._edgeCount++,this}edge(G,q,Q){var J=arguments.length===1?L(this._isDirected,arguments[0]):j(this._isDirected,G,q,Q);return this._edgeLabels[J]}edgeAsObj(){let G=this.edge(...arguments);return typeof G!="object"?{label:G}:G}hasEdge(G,q,Q){var J=arguments.length===1?L(this._isDirected,arguments[0]):j(this._isDirected,G,q,Q);return Object.hasOwn(this._edgeLabels,J)}removeEdge(G,q,Q){var J=arguments.length===1?L(this._isDirected,arguments[0]):j(this._isDirected,G,q,Q),W=this._edgeObjs[J];return W&&(G=W.v,q=W.w,delete this._edgeLabels[J],delete this._edgeObjs[J],C(this._preds[q],G),C(this._sucs[G],q),delete this._in[q][J],delete this._out[G][J],this._edgeCount--),this}inEdges(G,q){return this.isDirected()?this.filterEdges(this._in[G],G,q):this.nodeEdges(G,q)}outEdges(G,q){return this.isDirected()?this.filterEdges(this._out[G],G,q):this.nodeEdges(G,q)}nodeEdges(G,q){if(G in this._nodes)return this.filterEdges({...this._in[G],...this._out[G]},G,q)}filterEdges(G,q,Q){if(G){var J=Object.values(G);return Q?J.filter(function(W){return W.v===q&&W.w===Q||W.v===Q&&W.w===q}):J}}};function K(G,q){G[q]?G[q]++:G[q]=1}function C(G,q){--G[q]||delete G[q]}function j(G,q,Q,J){var W=""+q,te=""+Q;if(!G&&W>te){var ce=W;W=te,te=ce}return W+H+te+H+(J===void 0?$:J)}function Y(G,q,Q,J){var W=""+q,te=""+Q;if(!G&&W>te){var ce=W;W=te,te=ce}var fe={v:W,w:te};return J&&(fe.name=J),fe}function L(G,q){return j(G,q.v,q.w,q.name)}T.exports=X}),d=s((P,T)=>{T.exports="3.0.2"}),f=s((P,T)=>{T.exports={Graph:c(),version:d()}}),h=s((P,T)=>{var $=c();T.exports={write:O,read:K};function O(C){var j={options:{directed:C.isDirected(),multigraph:C.isMultigraph(),compound:C.isCompound()},nodes:H(C),edges:X(C)};return C.graph()!==void 0&&(j.value=structuredClone(C.graph())),j}function H(C){return C.nodes().map(function(j){var Y=C.node(j),L=C.parent(j),G={v:j};return Y!==void 0&&(G.value=Y),L!==void 0&&(G.parent=L),G})}function X(C){return C.edges().map(function(j){var Y=C.edge(j),L={v:j.v,w:j.w};return j.name!==void 0&&(L.name=j.name),Y!==void 0&&(L.value=Y),L})}function K(C){var j=new $(C.options).setGraph(C.value);return C.nodes.forEach(function(Y){j.setNode(Y.v,Y.value),Y.parent&&j.setParent(Y.v,Y.parent)}),C.edges.forEach(function(Y){j.setEdge({v:Y.v,w:Y.w,name:Y.name},Y.value)}),j}}),m=s((P,T)=>{T.exports=O;var $=()=>1;function O(X,K,C,j){return H(X,String(K),C||$,j||function(Y){return X.outEdges(Y)})}function H(X,K,C,j){var Y={},L=!0,G=0,q=X.nodes(),Q=function(ce){var fe=C(ce);Y[ce.v].distance+fe{T.exports=$;function $(O){var H={},X=[],K;function C(j){Object.hasOwn(H,j)||(H[j]=!0,K.push(j),O.successors(j).forEach(C),O.predecessors(j).forEach(C))}return O.nodes().forEach(function(j){K=[],C(j),K.length&&X.push(K)}),X}}),y=s((P,T)=>{var $=class{constructor(){o(this,"_arr",[]),o(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(O){return O.key})}has(O){return Object.hasOwn(this._keyIndices,O)}priority(O){var H=this._keyIndices[O];if(H!==void 0)return this._arr[H].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(O,H){var X=this._keyIndices;if(O=String(O),!Object.hasOwn(X,O)){var K=this._arr,C=K.length;return X[O]=C,K.push({key:O,priority:H}),this._decrease(C),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var O=this._arr.pop();return delete this._keyIndices[O.key],this._heapify(0),O.key}decrease(O,H){var X=this._keyIndices[O];if(H>this._arr[X].priority)throw new Error("New priority is greater than current priority. Key: "+O+" Old: "+this._arr[X].priority+" New: "+H);this._arr[X].priority=H,this._decrease(X)}_heapify(O){var H=this._arr,X=2*O,K=X+1,C=O;X>1,!(H[K].priority{var $=y();T.exports=H;var O=()=>1;function H(K,C,j,Y){var L=function(G){return K.outEdges(G)};return X(K,String(C),j||O,Y||L)}function X(K,C,j,Y){var L={},G=new $,q,Q,J=function(W){var te=W.v!==q?W.v:W.w,ce=L[te],fe=j(W),be=Q.distance+fe;if(fe<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+W+" Weight: "+fe);be0&&(q=G.removeMin(),Q=L[q],Q.distance!==Number.POSITIVE_INFINITY);)Y(q).forEach(J);return L}}),_=s((P,T)=>{var $=x();T.exports=O;function O(H,X,K){return H.nodes().reduce(function(C,j){return C[j]=$(H,j,X,K),C},{})}}),N=s((P,T)=>{T.exports=$;function $(H,X,K){if(H[X].predecessor!==void 0)throw new Error("Invalid source vertex");if(H[K].predecessor===void 0&&K!==X)throw new Error("Invalid destination vertex");return{weight:H[K].distance,path:O(H,X,K)}}function O(H,X,K){for(var C=[],j=K;j!==X;)C.push(j),j=H[j].predecessor;return C.push(X),C.reverse()}}),S=s((P,T)=>{T.exports=$;function $(O){var H=0,X=[],K={},C=[];function j(Y){var L=K[Y]={onStack:!0,lowlink:H,index:H++};if(X.push(Y),O.successors(Y).forEach(function(Q){Object.hasOwn(K,Q)?K[Q].onStack&&(L.lowlink=Math.min(L.lowlink,K[Q].index)):(j(Q),L.lowlink=Math.min(L.lowlink,K[Q].lowlink))}),L.lowlink===L.index){var G=[],q;do q=X.pop(),K[q].onStack=!1,G.push(q);while(Y!==q);C.push(G)}}return O.nodes().forEach(function(Y){Object.hasOwn(K,Y)||j(Y)}),C}}),w=s((P,T)=>{var $=S();T.exports=O;function O(H){return $(H).filter(function(X){return X.length>1||X.length===1&&H.hasEdge(X[0],X[0])})}}),k=s((P,T)=>{T.exports=O;var $=()=>1;function O(X,K,C){return H(X,K||$,C||function(j){return X.outEdges(j)})}function H(X,K,C){var j={},Y=X.nodes();return Y.forEach(function(L){j[L]={},j[L][L]={distance:0},Y.forEach(function(G){L!==G&&(j[L][G]={distance:Number.POSITIVE_INFINITY})}),C(L).forEach(function(G){var q=G.v===L?G.w:G.v,Q=K(G);j[L][q]={distance:Q,predecessor:L}})}),Y.forEach(function(L){var G=j[L];Y.forEach(function(q){var Q=j[q];Y.forEach(function(J){var W=Q[L],te=G[J],ce=Q[J],fe=W.distance+te.distance;fe{function $(H){var X={},K={},C=[];function j(Y){if(Object.hasOwn(K,Y))throw new O;Object.hasOwn(X,Y)||(K[Y]=!0,X[Y]=!0,H.predecessors(Y).forEach(j),delete K[Y],C.push(Y))}if(H.sinks().forEach(j),Object.keys(X).length!==H.nodeCount())throw new O;return C}var O=class extends Error{constructor(){super(...arguments)}};T.exports=$,$.CycleException=O}),M=s((P,T)=>{var $=E();T.exports=O;function O(H){try{$(H)}catch(X){if(X instanceof $.CycleException)return!1;throw X}return!0}}),I=s((P,T)=>{T.exports=$;function $(H,X,K,C,j){Array.isArray(X)||(X=[X]);var Y=(H.isDirected()?H.successors:H.neighbors).bind(H),L={};return X.forEach(function(G){if(!H.hasNode(G))throw new Error("Graph does not have node: "+G);j=O(H,G,K==="post",L,Y,C,j)}),j}function O(H,X,K,C,j,Y,L){return Object.hasOwn(C,X)||(C[X]=!0,K||(L=Y(L,X)),j(X).forEach(function(G){L=O(H,G,K,C,j,Y,L)}),K&&(L=Y(L,X))),L}}),R=s((P,T)=>{var $=I();T.exports=O;function O(H,X,K){return $(H,X,K,function(C,j){return C.push(j),C},[])}}),U=s((P,T)=>{var $=R();T.exports=O;function O(H,X){return $(H,X,"post")}}),B=s((P,T)=>{var $=R();T.exports=O;function O(H,X){return $(H,X,"pre")}}),Z=s((P,T)=>{var $=c(),O=y();T.exports=H;function H(X,K){var C=new $,j={},Y=new O,L;function G(Q){var J=Q.v===L?Q.w:Q.v,W=Y.priority(J);if(W!==void 0){var te=K(Q);te0;){if(L=Y.removeMin(),Object.hasOwn(j,L))C.setEdge(L,j[L]);else{if(q)throw new Error("Input graph is not connected: "+X);q=!0}X.nodeEdges(L).forEach(G)}return C}}),D=s((P,T)=>{var $=x(),O=m();T.exports=H;function H(K,C,j,Y){return X(K,C,j,Y||function(L){return K.outEdges(L)})}function X(K,C,j,Y){if(j===void 0)return $(K,C,j,Y);for(var L=!1,G=K.nodes(),q=0;q{T.exports={bellmanFord:m(),components:p(),dijkstra:x(),dijkstraAll:_(),extractPath:N(),findCycles:w(),floydWarshall:k(),isAcyclic:M(),postorder:U(),preorder:B(),prim:Z(),shortestPaths:D(),reduce:I(),tarjan:S(),topsort:E()}}),V=f();t.exports={Graph:V.Graph,json:h(),alg:z(),version:V.version}}),uB=vt((e,t)=>{var r=class{constructor(){let o={};o._next=o._prev=o,this._sentinel=o}dequeue(){let o=this._sentinel,c=o._prev;if(c!==o)return a(c),c}enqueue(o){let c=this._sentinel;o._prev&&o._next&&a(o),o._next=c._next,c._next._prev=o,c._next=o,o._prev=c}toString(){let o=[],c=this._sentinel,d=c._prev;for(;d!==c;)o.push(JSON.stringify(d,s)),d=d._prev;return"["+o.join(", ")+"]"}};function a(o){o._prev._next=o._next,o._next._prev=o._prev,delete o._next,delete o._prev}function s(o,c){if(o!=="_next"&&o!=="_prev")return c}t.exports=r}),dB=vt((e,t)=>{var r=zr().Graph,a=uB();t.exports=o;var s=()=>1;function o(p,y){if(p.nodeCount()<=1)return[];let x=f(p,y||s);return c(x.graph,x.buckets,x.zeroIdx).flatMap(_=>p.outEdges(_.v,_.w))}function c(p,y,x){let _=[],N=y[y.length-1],S=y[0],w;for(;p.nodeCount();){for(;w=S.dequeue();)d(p,y,x,w);for(;w=N.dequeue();)d(p,y,x,w);if(p.nodeCount()){for(let k=y.length-2;k>0;--k)if(w=y[k].dequeue(),w){_=_.concat(d(p,y,x,w,!0));break}}}return _}function d(p,y,x,_,N){let S=N?[]:void 0;return p.inEdges(_.v).forEach(w=>{let k=p.edge(w),E=p.node(w.v);N&&S.push({v:w.v,w:w.w}),E.out-=k,h(y,x,E)}),p.outEdges(_.v).forEach(w=>{let k=p.edge(w),E=w.w,M=p.node(E);M.in-=k,h(y,x,M)}),p.removeNode(_.v),S}function f(p,y){let x=new r,_=0,N=0;p.nodes().forEach(k=>{x.setNode(k,{v:k,in:0,out:0})}),p.edges().forEach(k=>{let E=x.edge(k.v,k.w)||0,M=y(k),I=E+M;x.setEdge(k.v,k.w,I),N=Math.max(N,x.node(k.v).out+=M),_=Math.max(_,x.node(k.w).in+=M)});let S=m(N+_+3).map(()=>new a),w=_+1;return x.nodes().forEach(k=>{h(S,w,x.node(k))}),{graph:x,buckets:S,zeroIdx:w}}function h(p,y,x){x.out?x.in?p[x.out-x.in+y].enqueue(x):p[p.length-1].enqueue(x):p[0].enqueue(x)}function m(p){let y=[];for(let x=0;x{var r=zr().Graph;t.exports={addBorderNode:y,addDummyNode:a,applyWithChunking:N,asNonCompoundGraph:o,buildLayerMatrix:h,intersectRect:f,mapValues:B,maxRank:S,normalizeRanks:m,notime:E,partition:w,pick:U,predecessorWeights:d,range:R,removeEmptyRanks:p,simplify:s,successorWeights:c,time:k,uniqueId:I,zipObject:Z};function a(D,z,V,P){for(var T=P;D.hasNode(T);)T=I(P);return V.dummy=z,D.setNode(T,V),T}function s(D){let z=new r().setGraph(D.graph());return D.nodes().forEach(V=>z.setNode(V,D.node(V))),D.edges().forEach(V=>{let P=z.edge(V.v,V.w)||{weight:0,minlen:1},T=D.edge(V);z.setEdge(V.v,V.w,{weight:P.weight+T.weight,minlen:Math.max(P.minlen,T.minlen)})}),z}function o(D){let z=new r({multigraph:D.isMultigraph()}).setGraph(D.graph());return D.nodes().forEach(V=>{D.children(V).length||z.setNode(V,D.node(V))}),D.edges().forEach(V=>{z.setEdge(V,D.edge(V))}),z}function c(D){let z=D.nodes().map(V=>{let P={};return D.outEdges(V).forEach(T=>{P[T.w]=(P[T.w]||0)+D.edge(T).weight}),P});return Z(D.nodes(),z)}function d(D){let z=D.nodes().map(V=>{let P={};return D.inEdges(V).forEach(T=>{P[T.v]=(P[T.v]||0)+D.edge(T).weight}),P});return Z(D.nodes(),z)}function f(D,z){let V=D.x,P=D.y,T=z.x-V,$=z.y-P,O=D.width/2,H=D.height/2;if(!T&&!$)throw new Error("Not possible to find intersection inside of the rectangle");let X,K;return Math.abs($)*O>Math.abs(T)*H?($<0&&(H=-H),X=H*T/$,K=H):(T<0&&(O=-O),X=O,K=O*$/T),{x:V+X,y:P+K}}function h(D){let z=R(S(D)+1).map(()=>[]);return D.nodes().forEach(V=>{let P=D.node(V),T=P.rank;T!==void 0&&(z[T][P.order]=V)}),z}function m(D){let z=D.nodes().map(P=>{let T=D.node(P).rank;return T===void 0?Number.MAX_VALUE:T}),V=N(Math.min,z);D.nodes().forEach(P=>{let T=D.node(P);Object.hasOwn(T,"rank")&&(T.rank-=V)})}function p(D){let z=D.nodes().map(O=>D.node(O).rank).filter(O=>O!==void 0),V=N(Math.min,z),P=[];D.nodes().forEach(O=>{let H=D.node(O).rank-V;P[H]||(P[H]=[]),P[H].push(O)});let T=0,$=D.graph().nodeRankFactor;Array.from(P).forEach((O,H)=>{O===void 0&&H%$!==0?--T:O!==void 0&&T&&O.forEach(X=>D.node(X).rank+=T)})}function y(D,z,V,P){let T={width:0,height:0};return arguments.length>=4&&(T.rank=V,T.order=P),a(D,"border",T,z)}function x(D,z=_){let V=[];for(let P=0;P_){let V=x(z);return D.apply(null,V.map(P=>D.apply(null,P)))}else return D.apply(null,z)}function S(D){let z=D.nodes().map(V=>{let P=D.node(V).rank;return P===void 0?Number.MIN_VALUE:P});return N(Math.max,z)}function w(D,z){let V={lhs:[],rhs:[]};return D.forEach(P=>{z(P)?V.lhs.push(P):V.rhs.push(P)}),V}function k(D,z){let V=Date.now();try{return z()}finally{console.log(D+" time: "+(Date.now()-V)+"ms")}}function E(D,z){return z()}var M=0;function I(D){var z=++M;return D+(""+z)}function R(D,z,V=1){z==null&&(z=D,D=0);let P=$=>$z<$);let T=[];for(let $=D;P($);$+=V)T.push($);return T}function U(D,z){let V={};for(let P of z)D[P]!==void 0&&(V[P]=D[P]);return V}function B(D,z){let V=z;return typeof z=="string"&&(V=P=>P[z]),Object.entries(D).reduce((P,[T,$])=>(P[T]=V($,T),P),{})}function Z(D,z){return D.reduce((V,P,T)=>(V[P]=z[T],V),{})}}),fB=vt((e,t)=>{var r=dB(),a=sn().uniqueId;t.exports={run:s,undo:c};function s(d){(d.graph().acyclicer==="greedy"?r(d,f(d)):o(d)).forEach(h=>{let m=d.edge(h);d.removeEdge(h),m.forwardName=h.name,m.reversed=!0,d.setEdge(h.w,h.v,m,a("rev"))});function f(h){return m=>h.edge(m).weight}}function o(d){let f=[],h={},m={};function p(y){Object.hasOwn(m,y)||(m[y]=!0,h[y]=!0,d.outEdges(y).forEach(x=>{Object.hasOwn(h,x.w)?f.push(x):p(x.w)}),delete h[y])}return d.nodes().forEach(p),f}function c(d){d.edges().forEach(f=>{let h=d.edge(f);if(h.reversed){d.removeEdge(f);let m=h.forwardName;delete h.reversed,delete h.forwardName,d.setEdge(f.w,f.v,h,m)}})}}),hB=vt((e,t)=>{var r=sn();t.exports={run:a,undo:o};function a(c){c.graph().dummyChains=[],c.edges().forEach(d=>s(c,d))}function s(c,d){let f=d.v,h=c.node(f).rank,m=d.w,p=c.node(m).rank,y=d.name,x=c.edge(d),_=x.labelRank;if(p===h+1)return;c.removeEdge(d);let N,S,w;for(w=0,++h;h{let f=c.node(d),h=f.edgeLabel,m;for(c.setEdge(f.edgeObj,h);f.dummy;)m=c.successors(d)[0],c.removeNode(d),h.points.push({x:f.x,y:f.y}),f.dummy==="edge-label"&&(h.x=f.x,h.y=f.y,h.width=f.width,h.height=f.height),d=m,f=c.node(d)})}}),zu=vt((e,t)=>{var{applyWithChunking:r}=sn();t.exports={longestPath:a,slack:s};function a(o){var c={};function d(f){var h=o.node(f);if(Object.hasOwn(c,f))return h.rank;c[f]=!0;let m=o.outEdges(f).map(y=>y==null?Number.POSITIVE_INFINITY:d(y.w)-o.edge(y).minlen);var p=r(Math.min,m);return p===Number.POSITIVE_INFINITY&&(p=0),h.rank=p}o.sources().forEach(d)}function s(o,c){return o.node(c.w).rank-o.node(c.v).rank-o.edge(c).minlen}}),ZN=vt((e,t)=>{var r=zr().Graph,a=zu().slack;t.exports=s;function s(f){var h=new r({directed:!1}),m=f.nodes()[0],p=f.nodeCount();h.setNode(m,{});for(var y,x;o(h,f){var x=y.v,_=p===x?y.w:x;!f.hasNode(_)&&!a(h,y)&&(f.setNode(_,{}),f.setEdge(p,_,{}),m(_))})}return f.nodes().forEach(m),f.nodeCount()}function c(f,h){return h.edges().reduce((m,p)=>{let y=Number.POSITIVE_INFINITY;return f.hasNode(p.v)!==f.hasNode(p.w)&&(y=a(h,p)),yh.node(p).rank+=m)}}),mB=vt((e,t)=>{var r=ZN(),a=zu().slack,s=zu().longestPath,o=zr().alg.preorder,c=zr().alg.postorder,d=sn().simplify;t.exports=f,f.initLowLimValues=y,f.initCutValues=h,f.calcCutValue=p,f.leaveEdge=_,f.enterEdge=N,f.exchangeEdges=S;function f(M){M=d(M),s(M);var I=r(M);y(I),h(I,M);for(var R,U;R=_(I);)U=N(I,M,R),S(I,M,R,U)}function h(M,I){var R=c(M,M.nodes());R=R.slice(0,R.length-1),R.forEach(U=>m(M,I,U))}function m(M,I,R){var U=M.node(R),B=U.parent;M.edge(R,B).cutvalue=p(M,I,R)}function p(M,I,R){var U=M.node(R),B=U.parent,Z=!0,D=I.edge(R,B),z=0;return D||(Z=!1,D=I.edge(B,R)),z=D.weight,I.nodeEdges(R).forEach(V=>{var P=V.v===R,T=P?V.w:V.v;if(T!==B){var $=P===Z,O=I.edge(V).weight;if(z+=$?O:-O,k(M,R,T)){var H=M.edge(R,T).cutvalue;z+=$?-H:H}}}),z}function y(M,I){arguments.length<2&&(I=M.nodes()[0]),x(M,{},1,I)}function x(M,I,R,U,B){var Z=R,D=M.node(U);return I[U]=!0,M.neighbors(U).forEach(z=>{Object.hasOwn(I,z)||(R=x(M,I,R,z,U))}),D.low=Z,D.lim=R++,B?D.parent=B:delete D.parent,R}function _(M){return M.edges().find(I=>M.edge(I).cutvalue<0)}function N(M,I,R){var U=R.v,B=R.w;I.hasEdge(U,B)||(U=R.w,B=R.v);var Z=M.node(U),D=M.node(B),z=Z,V=!1;Z.lim>D.lim&&(z=D,V=!0);var P=I.edges().filter(T=>V===E(M,M.node(T.v),z)&&V!==E(M,M.node(T.w),z));return P.reduce((T,$)=>a(I,$)!I.node(B).parent),U=o(M,R);U=U.slice(1),U.forEach(B=>{var Z=M.node(B).parent,D=I.edge(B,Z),z=!1;D||(D=I.edge(Z,B),z=!0),I.node(B).rank=I.node(Z).rank+(z?D.minlen:-D.minlen)})}function k(M,I,R){return M.hasEdge(I,R)}function E(M,I,R){return R.low<=I.lim&&I.lim<=R.lim}}),pB=vt((e,t)=>{var r=zu(),a=r.longestPath,s=ZN(),o=mB();t.exports=c;function c(m){var p=m.graph().ranker;if(p instanceof Function)return p(m);switch(m.graph().ranker){case"network-simplex":h(m);break;case"tight-tree":f(m);break;case"longest-path":d(m);break;case"none":break;default:h(m)}}var d=a;function f(m){a(m),s(m)}function h(m){o(m)}}),gB=vt((e,t)=>{t.exports=r;function r(o){let c=s(o);o.graph().dummyChains.forEach(d=>{let f=o.node(d),h=f.edgeObj,m=a(o,c,h.v,h.w),p=m.path,y=m.lca,x=0,_=p[x],N=!0;for(;d!==h.w;){if(f=o.node(d),N){for(;(_=p[x])!==y&&o.node(_).maxRankp||y>c[x].lim));for(_=x,x=f;(x=o.parent(x))!==_;)m.push(x);return{path:h.concat(m.reverse()),lca:_}}function s(o){let c={},d=0;function f(h){let m=d;o.children(h).forEach(f),c[h]={low:m,lim:d++}}return o.children().forEach(f),c}}),bB=vt((e,t)=>{var r=sn();t.exports={run:a,cleanup:d};function a(f){let h=r.addDummyNode(f,"root",{},"_root"),m=o(f),p=Object.values(m),y=r.applyWithChunking(Math.max,p)-1,x=2*y+1;f.graph().nestingRoot=h,f.edges().forEach(N=>f.edge(N).minlen*=x);let _=c(f)+1;f.children().forEach(N=>s(f,h,x,_,y,m,N)),f.graph().nodeRankFactor=x}function s(f,h,m,p,y,x,_){let N=f.children(_);if(!N.length){_!==h&&f.setEdge(h,_,{weight:0,minlen:m});return}let S=r.addBorderNode(f,"_bt"),w=r.addBorderNode(f,"_bb"),k=f.node(_);f.setParent(S,_),k.borderTop=S,f.setParent(w,_),k.borderBottom=w,N.forEach(E=>{s(f,h,m,p,y,x,E);let M=f.node(E),I=M.borderTop?M.borderTop:E,R=M.borderBottom?M.borderBottom:E,U=M.borderTop?p:2*p,B=I!==R?1:y-x[_]+1;f.setEdge(S,I,{weight:U,minlen:B,nestingEdge:!0}),f.setEdge(R,w,{weight:U,minlen:B,nestingEdge:!0})}),f.parent(_)||f.setEdge(h,S,{weight:0,minlen:y+x[_]})}function o(f){var h={};function m(p,y){var x=f.children(p);x&&x.length&&x.forEach(_=>m(_,y+1)),h[p]=y}return f.children().forEach(p=>m(p,1)),h}function c(f){return f.edges().reduce((h,m)=>h+f.edge(m).weight,0)}function d(f){var h=f.graph();f.removeNode(h.nestingRoot),delete h.nestingRoot,f.edges().forEach(m=>{var p=f.edge(m);p.nestingEdge&&f.removeEdge(m)})}}),xB=vt((e,t)=>{var r=sn();t.exports=a;function a(o){function c(d){let f=o.children(d),h=o.node(d);if(f.length&&f.forEach(c),Object.hasOwn(h,"minRank")){h.borderLeft=[],h.borderRight=[];for(let m=h.minRank,p=h.maxRank+1;m{t.exports={adjust:r,undo:a};function r(m){let p=m.graph().rankdir.toLowerCase();(p==="lr"||p==="rl")&&s(m)}function a(m){let p=m.graph().rankdir.toLowerCase();(p==="bt"||p==="rl")&&c(m),(p==="lr"||p==="rl")&&(f(m),s(m))}function s(m){m.nodes().forEach(p=>o(m.node(p))),m.edges().forEach(p=>o(m.edge(p)))}function o(m){let p=m.width;m.width=m.height,m.height=p}function c(m){m.nodes().forEach(p=>d(m.node(p))),m.edges().forEach(p=>{let y=m.edge(p);y.points.forEach(d),Object.hasOwn(y,"y")&&d(y)})}function d(m){m.y=-m.y}function f(m){m.nodes().forEach(p=>h(m.node(p))),m.edges().forEach(p=>{let y=m.edge(p);y.points.forEach(h),Object.hasOwn(y,"x")&&h(y)})}function h(m){let p=m.x;m.x=m.y,m.y=p}}),vB=vt((e,t)=>{var r=sn();t.exports=a;function a(s){let o={},c=s.nodes().filter(p=>!s.children(p).length),d=c.map(p=>s.node(p).rank),f=r.applyWithChunking(Math.max,d),h=r.range(f+1).map(()=>[]);function m(p){if(o[p])return;o[p]=!0;let y=s.node(p);h[y.rank].push(p),s.successors(p).forEach(m)}return c.sort((p,y)=>s.node(p).rank-s.node(y).rank).forEach(m),h}}),_B=vt((e,t)=>{var r=sn().zipObject;t.exports=a;function a(o,c){let d=0;for(let f=1;fN)),h=c.flatMap(_=>o.outEdges(_).map(N=>({pos:f[N.w],weight:o.edge(N).weight})).sort((N,S)=>N.pos-S.pos)),m=1;for(;m{let N=_.pos+m;y[N]+=_.weight;let S=0;for(;N>0;)N%2&&(S+=y[N+1]),N=N-1>>1,y[N]+=_.weight;x+=_.weight*S}),x}}),wB=vt((e,t)=>{t.exports=r;function r(a,s=[]){return s.map(o=>{let c=a.inEdges(o);if(c.length){let d=c.reduce((f,h)=>{let m=a.edge(h),p=a.node(h.v);return{sum:f.sum+m.weight*p.order,weight:f.weight+m.weight}},{sum:0,weight:0});return{v:o,barycenter:d.sum/d.weight,weight:d.weight}}else return{v:o}})}}),EB=vt((e,t)=>{var r=sn();t.exports=a;function a(c,d){let f={};c.forEach((m,p)=>{let y=f[m.v]={indegree:0,in:[],out:[],vs:[m.v],i:p};m.barycenter!==void 0&&(y.barycenter=m.barycenter,y.weight=m.weight)}),d.edges().forEach(m=>{let p=f[m.v],y=f[m.w];p!==void 0&&y!==void 0&&(y.indegree++,p.out.push(f[m.w]))});let h=Object.values(f).filter(m=>!m.indegree);return s(h)}function s(c){let d=[];function f(m){return p=>{p.merged||(p.barycenter===void 0||m.barycenter===void 0||p.barycenter>=m.barycenter)&&o(m,p)}}function h(m){return p=>{p.in.push(m),--p.indegree===0&&c.push(p)}}for(;c.length;){let m=c.pop();d.push(m),m.in.reverse().forEach(f(m)),m.out.forEach(h(m))}return d.filter(m=>!m.merged).map(m=>r.pick(m,["vs","i","barycenter","weight"]))}function o(c,d){let f=0,h=0;c.weight&&(f+=c.barycenter*c.weight,h+=c.weight),d.weight&&(f+=d.barycenter*d.weight,h+=d.weight),c.vs=d.vs.concat(c.vs),c.barycenter=f/h,c.weight=h,c.i=Math.min(d.i,c.i),d.merged=!0}}),NB=vt((e,t)=>{var r=sn();t.exports=a;function a(c,d){let f=r.partition(c,S=>Object.hasOwn(S,"barycenter")),h=f.lhs,m=f.rhs.sort((S,w)=>w.i-S.i),p=[],y=0,x=0,_=0;h.sort(o(!!d)),_=s(p,m,_),h.forEach(S=>{_+=S.vs.length,p.push(S.vs),y+=S.barycenter*S.weight,x+=S.weight,_=s(p,m,_)});let N={vs:p.flat(!0)};return x&&(N.barycenter=y/x,N.weight=x),N}function s(c,d,f){let h;for(;d.length&&(h=d[d.length-1]).i<=f;)d.pop(),c.push(h.vs),f++;return f}function o(c){return(d,f)=>d.barycenterf.barycenter?1:c?f.i-d.i:d.i-f.i}}),SB=vt((e,t)=>{var r=wB(),a=EB(),s=NB();t.exports=o;function o(f,h,m,p){let y=f.children(h),x=f.node(h),_=x?x.borderLeft:void 0,N=x?x.borderRight:void 0,S={};_&&(y=y.filter(M=>M!==_&&M!==N));let w=r(f,y);w.forEach(M=>{if(f.children(M.v).length){let I=o(f,M.v,m,p);S[M.v]=I,Object.hasOwn(I,"barycenter")&&d(M,I)}});let k=a(w,m);c(k,S);let E=s(k,p);if(_&&(E.vs=[_,E.vs,N].flat(!0),f.predecessors(_).length)){let M=f.node(f.predecessors(_)[0]),I=f.node(f.predecessors(N)[0]);Object.hasOwn(E,"barycenter")||(E.barycenter=0,E.weight=0),E.barycenter=(E.barycenter*E.weight+M.order+I.order)/(E.weight+2),E.weight+=2}return E}function c(f,h){f.forEach(m=>{m.vs=m.vs.flatMap(p=>h[p]?h[p].vs:p)})}function d(f,h){f.barycenter!==void 0?(f.barycenter=(f.barycenter*f.weight+h.barycenter*h.weight)/(f.weight+h.weight),f.weight+=h.weight):(f.barycenter=h.barycenter,f.weight=h.weight)}}),kB=vt((e,t)=>{var r=zr().Graph,a=sn();t.exports=s;function s(c,d,f,h){h||(h=c.nodes());let m=o(c),p=new r({compound:!0}).setGraph({root:m}).setDefaultNodeLabel(y=>c.node(y));return h.forEach(y=>{let x=c.node(y),_=c.parent(y);(x.rank===d||x.minRank<=d&&d<=x.maxRank)&&(p.setNode(y),p.setParent(y,_||m),c[f](y).forEach(N=>{let S=N.v===y?N.w:N.v,w=p.edge(S,y),k=w!==void 0?w.weight:0;p.setEdge(S,y,{weight:c.edge(N).weight+k})}),Object.hasOwn(x,"minRank")&&p.setNode(y,{borderLeft:x.borderLeft[d],borderRight:x.borderRight[d]}))}),p}function o(c){for(var d;c.hasNode(d=a.uniqueId("_root")););return d}}),CB=vt((e,t)=>{t.exports=r;function r(a,s,o){let c={},d;o.forEach(f=>{let h=a.parent(f),m,p;for(;h;){if(m=a.parent(h),m?(p=c[m],c[m]=h):(p=d,d=h),p&&p!==h){s.setEdge(p,h);return}h=m}})}}),TB=vt((e,t)=>{var r=vB(),a=_B(),s=SB(),o=kB(),c=CB(),d=zr().Graph,f=sn();t.exports=h;function h(x,_={}){if(typeof _.customOrder=="function"){_.customOrder(x,h);return}let N=f.maxRank(x),S=m(x,f.range(1,N+1),"inEdges"),w=m(x,f.range(N-1,-1,-1),"outEdges"),k=r(x);if(y(x,k),_.disableOptimalOrderHeuristic)return;let E=Number.POSITIVE_INFINITY,M,I=_.constraints||[];for(let R=0,U=0;U<4;++R,++U){p(R%2?S:w,R%4>=2,I),k=f.buildLayerMatrix(x);let B=a(x,k);B{S.has(k)||S.set(k,[]),S.get(k).push(E)};for(let k of x.nodes()){let E=x.node(k);if(typeof E.rank=="number"&&w(E.rank,k),typeof E.minRank=="number"&&typeof E.maxRank=="number")for(let M=E.minRank;M<=E.maxRank;M++)M!==E.rank&&w(M,k)}return _.map(function(k){return o(x,k,N,S.get(k)||[])})}function p(x,_,N){let S=new d;x.forEach(function(w){N.forEach(M=>S.setEdge(M.left,M.right));let k=w.graph().root,E=s(w,k,S,_);E.vs.forEach((M,I)=>w.node(M).order=I),c(w,S,E.vs)})}function y(x,_){Object.values(_).forEach(N=>N.forEach((S,w)=>x.node(S).order=w))}}),AB=vt((e,t)=>{var r=zr().Graph,a=sn();t.exports={positionX:N,findType1Conflicts:s,findType2Conflicts:o,addConflict:d,hasConflict:f,verticalAlignment:h,horizontalCompaction:m,alignCoordinates:x,findSmallestWidthAlignment:y,balance:_};function s(k,E){let M={};function I(R,U){let B=0,Z=0,D=R.length,z=U[U.length-1];return U.forEach((V,P)=>{let T=c(k,V),$=T?k.node(T).order:D;(T||V===z)&&(U.slice(Z,P+1).forEach(O=>{k.predecessors(O).forEach(H=>{let X=k.node(H),K=X.order;(K{V=U[P],k.node(V).dummy&&k.predecessors(V).forEach(T=>{let $=k.node(T);$.dummy&&($.orderz)&&d(M,T,V)})})}function R(U,B){let Z=-1,D,z=0;return B.forEach((V,P)=>{if(k.node(V).dummy==="border"){let T=k.predecessors(V);T.length&&(D=k.node(T[0]).order,I(B,z,P,Z,D),z=P,Z=D)}I(B,z,B.length,D,U.length)}),B}return E.length&&E.reduce(R),M}function c(k,E){if(k.node(E).dummy)return k.predecessors(E).find(M=>k.node(M).dummy)}function d(k,E,M){if(E>M){let R=E;E=M,M=R}let I=k[E];I||(k[E]=I={}),I[M]=!0}function f(k,E,M){if(E>M){let I=E;E=M,M=I}return!!k[E]&&Object.hasOwn(k[E],M)}function h(k,E,M,I){let R={},U={},B={};return E.forEach(Z=>{Z.forEach((D,z)=>{R[D]=D,U[D]=D,B[D]=z})}),E.forEach(Z=>{let D=-1;Z.forEach(z=>{let V=I(z);if(V.length){V=V.sort((T,$)=>B[T]-B[$]);let P=(V.length-1)/2;for(let T=Math.floor(P),$=Math.ceil(P);T<=$;++T){let O=V[T];U[z]===z&&DMath.max(T,U[$.v]+B.edge($)),0)}function V(P){let T=B.outEdges(P).reduce((O,H)=>Math.min(O,U[H.w]-B.edge(H)),Number.POSITIVE_INFINITY),$=k.node(P);T!==Number.POSITIVE_INFINITY&&$.borderType!==Z&&(U[P]=Math.max(U[P],T))}return D(z,B.predecessors.bind(B)),D(V,B.successors.bind(B)),Object.keys(I).forEach(P=>U[P]=U[M[P]]),U}function p(k,E,M,I){let R=new r,U=k.graph(),B=S(U.nodesep,U.edgesep,I);return E.forEach(Z=>{let D;Z.forEach(z=>{let V=M[z];if(R.setNode(V),D){var P=M[D],T=R.edge(P,V);R.setEdge(P,V,Math.max(B(k,z,D),T||0))}D=z})}),R}function y(k,E){return Object.values(E).reduce((M,I)=>{let R=Number.NEGATIVE_INFINITY,U=Number.POSITIVE_INFINITY;Object.entries(I).forEach(([Z,D])=>{let z=w(k,Z)/2;R=Math.max(D+z,R),U=Math.min(D-z,U)});let B=R-U;return B{["l","r"].forEach(B=>{let Z=U+B,D=k[Z];if(D===E)return;let z=Object.values(D),V=I-a.applyWithChunking(Math.min,z);B!=="l"&&(V=R-a.applyWithChunking(Math.max,z)),V&&(k[Z]=a.mapValues(D,P=>P+V))})})}function _(k,E){return a.mapValues(k.ul,(M,I)=>{if(E)return k[E.toLowerCase()][I];{let R=Object.values(k).map(U=>U[I]).sort((U,B)=>U-B);return(R[1]+R[2])/2}})}function N(k){let E=a.buildLayerMatrix(k),M=Object.assign(s(k,E),o(k,E)),I={},R;["u","d"].forEach(B=>{R=B==="u"?E:Object.values(E).reverse(),["l","r"].forEach(Z=>{Z==="r"&&(R=R.map(P=>Object.values(P).reverse()));let D=(B==="u"?k.predecessors:k.successors).bind(k),z=h(k,R,M,D),V=m(k,R,z.root,z.align,Z==="r");Z==="r"&&(V=a.mapValues(V,P=>-P)),I[B+Z]=V})});let U=y(k,I);return x(I,U),_(I,k.graph().align)}function S(k,E,M){return(I,R,U)=>{let B=I.node(R),Z=I.node(U),D=0,z;if(D+=B.width/2,Object.hasOwn(B,"labelpos"))switch(B.labelpos.toLowerCase()){case"l":z=-B.width/2;break;case"r":z=B.width/2;break}if(z&&(D+=M?z:-z),z=0,D+=(B.dummy?E:k)/2,D+=(Z.dummy?E:k)/2,D+=Z.width/2,Object.hasOwn(Z,"labelpos"))switch(Z.labelpos.toLowerCase()){case"l":z=Z.width/2;break;case"r":z=-Z.width/2;break}return z&&(D+=M?z:-z),z=0,D}}function w(k,E){return k.node(E).width}}),MB=vt((e,t)=>{var r=sn(),a=AB().positionX;t.exports=s;function s(c){c=r.asNonCompoundGraph(c),o(c),Object.entries(a(c)).forEach(([d,f])=>c.node(d).x=f)}function o(c){let d=r.buildLayerMatrix(c),f=c.graph().ranksep,h=c.graph().rankalign,m=0;d.forEach(p=>{let y=p.reduce((x,_)=>{let N=c.node(_).height;return x>N?x:N},0);p.forEach(x=>{let _=c.node(x);h==="top"?_.y=m+_.height/2:h==="bottom"?_.y=m+y-_.height/2:_.y=m+y/2}),m+=y+f})}}),OB=vt((e,t)=>{var r=fB(),a=hB(),s=pB(),o=sn().normalizeRanks,c=gB(),d=sn().removeEmptyRanks,f=bB(),h=xB(),m=yB(),p=TB(),y=MB(),x=sn(),_=zr().Graph;t.exports=N;function N(q,Q={}){let J=Q.debugTiming?x.time:x.notime;return J("layout",()=>{let W=J(" buildLayoutGraph",()=>D(q));return J(" runLayout",()=>S(W,J,Q)),J(" updateInputGraph",()=>w(q,W)),W})}function S(q,Q,J){Q(" makeSpaceForEdgeLabels",()=>z(q)),Q(" removeSelfEdges",()=>C(q)),Q(" acyclic",()=>r.run(q)),Q(" nestingGraph.run",()=>f.run(q)),Q(" rank",()=>s(x.asNonCompoundGraph(q))),Q(" injectEdgeLabelProxies",()=>V(q)),Q(" removeEmptyRanks",()=>d(q)),Q(" nestingGraph.cleanup",()=>f.cleanup(q)),Q(" normalizeRanks",()=>o(q)),Q(" assignRankMinMax",()=>P(q)),Q(" removeEdgeLabelProxies",()=>T(q)),Q(" normalize.run",()=>a.run(q)),Q(" parentDummyChains",()=>c(q)),Q(" addBorderSegments",()=>h(q)),Q(" order",()=>p(q,J)),Q(" insertSelfEdges",()=>j(q)),Q(" adjustCoordinateSystem",()=>m.adjust(q)),Q(" position",()=>y(q)),Q(" positionSelfEdges",()=>Y(q)),Q(" removeBorderNodes",()=>K(q)),Q(" normalize.undo",()=>a.undo(q)),Q(" fixupEdgeLabelCoords",()=>H(q)),Q(" undoCoordinateSystem",()=>m.undo(q)),Q(" translateGraph",()=>$(q)),Q(" assignNodeIntersects",()=>O(q)),Q(" reversePoints",()=>X(q)),Q(" acyclic.undo",()=>r.undo(q))}function w(q,Q){q.nodes().forEach(J=>{let W=q.node(J),te=Q.node(J);W&&(W.x=te.x,W.y=te.y,W.order=te.order,W.rank=te.rank,Q.children(J).length&&(W.width=te.width,W.height=te.height))}),q.edges().forEach(J=>{let W=q.edge(J),te=Q.edge(J);W.points=te.points,Object.hasOwn(te,"x")&&(W.x=te.x,W.y=te.y)}),q.graph().width=Q.graph().width,q.graph().height=Q.graph().height}var k=["nodesep","edgesep","ranksep","marginx","marginy"],E={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},M=["acyclicer","ranker","rankdir","align","rankalign"],I=["width","height","rank"],R={width:0,height:0},U=["minlen","weight","width","height","labeloffset"],B={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Z=["labelpos"];function D(q){let Q=new _({multigraph:!0,compound:!0}),J=G(q.graph());return Q.setGraph(Object.assign({},E,L(J,k),x.pick(J,M))),q.nodes().forEach(W=>{let te=G(q.node(W)),ce=L(te,I);Object.keys(R).forEach(fe=>{ce[fe]===void 0&&(ce[fe]=R[fe])}),Q.setNode(W,ce),Q.setParent(W,q.parent(W))}),q.edges().forEach(W=>{let te=G(q.edge(W));Q.setEdge(W,Object.assign({},B,L(te,U),x.pick(te,Z)))}),Q}function z(q){let Q=q.graph();Q.ranksep/=2,q.edges().forEach(J=>{let W=q.edge(J);W.minlen*=2,W.labelpos.toLowerCase()!=="c"&&(Q.rankdir==="TB"||Q.rankdir==="BT"?W.width+=W.labeloffset:W.height+=W.labeloffset)})}function V(q){q.edges().forEach(Q=>{let J=q.edge(Q);if(J.width&&J.height){let W=q.node(Q.v),te={rank:(q.node(Q.w).rank-W.rank)/2+W.rank,e:Q};x.addDummyNode(q,"edge-proxy",te,"_ep")}})}function P(q){let Q=0;q.nodes().forEach(J=>{let W=q.node(J);W.borderTop&&(W.minRank=q.node(W.borderTop).rank,W.maxRank=q.node(W.borderBottom).rank,Q=Math.max(Q,W.maxRank))}),q.graph().maxRank=Q}function T(q){q.nodes().forEach(Q=>{let J=q.node(Q);J.dummy==="edge-proxy"&&(q.edge(J.e).labelRank=J.rank,q.removeNode(Q))})}function $(q){let Q=Number.POSITIVE_INFINITY,J=0,W=Number.POSITIVE_INFINITY,te=0,ce=q.graph(),fe=ce.marginx||0,be=ce.marginy||0;function we(Ne){let je=Ne.x,$e=Ne.y,st=Ne.width,Rt=Ne.height;Q=Math.min(Q,je-st/2),J=Math.max(J,je+st/2),W=Math.min(W,$e-Rt/2),te=Math.max(te,$e+Rt/2)}q.nodes().forEach(Ne=>we(q.node(Ne))),q.edges().forEach(Ne=>{let je=q.edge(Ne);Object.hasOwn(je,"x")&&we(je)}),Q-=fe,W-=be,q.nodes().forEach(Ne=>{let je=q.node(Ne);je.x-=Q,je.y-=W}),q.edges().forEach(Ne=>{let je=q.edge(Ne);je.points.forEach($e=>{$e.x-=Q,$e.y-=W}),Object.hasOwn(je,"x")&&(je.x-=Q),Object.hasOwn(je,"y")&&(je.y-=W)}),ce.width=J-Q+fe,ce.height=te-W+be}function O(q){q.edges().forEach(Q=>{let J=q.edge(Q),W=q.node(Q.v),te=q.node(Q.w),ce,fe;J.points?(ce=J.points[0],fe=J.points[J.points.length-1]):(J.points=[],ce=te,fe=W),J.points.unshift(x.intersectRect(W,ce)),J.points.push(x.intersectRect(te,fe))})}function H(q){q.edges().forEach(Q=>{let J=q.edge(Q);if(Object.hasOwn(J,"x"))switch((J.labelpos==="l"||J.labelpos==="r")&&(J.width-=J.labeloffset),J.labelpos){case"l":J.x-=J.width/2+J.labeloffset;break;case"r":J.x+=J.width/2+J.labeloffset;break}})}function X(q){q.edges().forEach(Q=>{let J=q.edge(Q);J.reversed&&J.points.reverse()})}function K(q){q.nodes().forEach(Q=>{if(q.children(Q).length){let J=q.node(Q),W=q.node(J.borderTop),te=q.node(J.borderBottom),ce=q.node(J.borderLeft[J.borderLeft.length-1]),fe=q.node(J.borderRight[J.borderRight.length-1]);J.width=Math.abs(fe.x-ce.x),J.height=Math.abs(te.y-W.y),J.x=ce.x+J.width/2,J.y=W.y+J.height/2}}),q.nodes().forEach(Q=>{q.node(Q).dummy==="border"&&q.removeNode(Q)})}function C(q){q.edges().forEach(Q=>{if(Q.v===Q.w){var J=q.node(Q.v);J.selfEdges||(J.selfEdges=[]),J.selfEdges.push({e:Q,label:q.edge(Q)}),q.removeEdge(Q)}})}function j(q){var Q=x.buildLayerMatrix(q);Q.forEach(J=>{var W=0;J.forEach((te,ce)=>{var fe=q.node(te);fe.order=ce+W,(fe.selfEdges||[]).forEach(be=>{x.addDummyNode(q,"selfedge",{width:be.label.width,height:be.label.height,rank:fe.rank,order:ce+ ++W,e:be.e,label:be.label},"_se")}),delete fe.selfEdges})})}function Y(q){q.nodes().forEach(Q=>{var J=q.node(Q);if(J.dummy==="selfedge"){var W=q.node(J.e.v),te=W.x+W.width/2,ce=W.y,fe=J.x-te,be=W.height/2;q.setEdge(J.e,J.label),q.removeNode(Q),J.label.points=[{x:te+2*fe/3,y:ce-be},{x:te+5*fe/6,y:ce-be},{x:te+fe,y:ce},{x:te+5*fe/6,y:ce+be},{x:te+2*fe/3,y:ce+be}],J.label.x=J.x,J.label.y=J.y}})}function L(q,Q){return x.mapValues(x.pick(q,Q),Number)}function G(q){var Q={};return q&&Object.entries(q).forEach(([J,W])=>{typeof J=="string"&&(J=J.toLowerCase()),Q[J]=W}),Q}}),RB=vt((e,t)=>{var r=sn(),a=zr().Graph;t.exports={debugOrdering:s};function s(o){let c=r.buildLayerMatrix(o),d=new a({compound:!0,multigraph:!0}).setGraph({});return o.nodes().forEach(f=>{d.setNode(f,{label:f}),d.setParent(f,"layer"+o.node(f).rank)}),o.edges().forEach(f=>d.setEdge(f.v,f.w,{},f.name)),c.forEach((f,h)=>{let m="layer"+h;d.setNode(m,{rank:"same"}),f.reduce((p,y)=>(d.setEdge(p,y,{style:"invis"}),y))}),d}}),DB=vt((e,t)=>{t.exports="2.0.4"}),jB=vt((e,t)=>{t.exports={graphlib:zr(),layout:OB(),debug:RB(),util:{time:sn().time,notime:sn().notime},version:DB()}});const Y1=jB();/*! For license information please see dagre.esm.js.LEGAL.txt */const X1={running:"bg-blue-500",completed:"bg-emerald-500",failed:"bg-red-500",error:"bg-red-500"};function LB({data:e,selected:t}){const r=e;return g.jsxs("div",{className:`w-[260px] rounded-lg border px-4 py-3 transition-colors ${r.isSelected||t?"border-white/30 bg-[#0a0a0a]":"border-[#222] bg-black hover:border-[#333]"}`,children:[g.jsx(el,{type:"target",position:ze.Top,isConnectable:!1,className:`!w-1.5 !h-1.5 !border-0 ${r.parentId?"!bg-[#444]":"!bg-transparent"}`}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("span",{className:"relative flex h-2 w-2 shrink-0",children:[g.jsx("span",{className:`absolute inline-flex h-full w-full rounded-full opacity-75 ${X1[r.status]??"bg-gray-500"} ${r.status==="running"?"animate-ping":""}`}),g.jsx("span",{className:`relative inline-flex h-2 w-2 rounded-full ${X1[r.status]??"bg-gray-500"}`})]}),g.jsx("span",{className:"text-sm font-semibold text-white leading-snug line-clamp-3",children:r.name})]}),g.jsx(el,{type:"source",position:ze.Bottom,isConnectable:!1,className:`!w-1.5 !h-1.5 !border-0 ${r.children&&r.children.length>0?"!bg-[#444]":"!bg-transparent"}`})]})}const zB=ee.memo(LB);function no({w:e=24}){return g.jsxs("div",{className:"w-[180px] h-[72px] rounded-lg border border-[#222] bg-[#0a0a0a] px-3 py-2 shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[g.jsx("div",{className:"w-2 h-2 rounded-full bg-[#2a2a2a]"}),g.jsx("div",{className:"h-3 rounded bg-[#252525]",style:{width:`${e*4}px`}})]}),g.jsx("div",{className:"h-2 w-28 rounded bg-[#1e1e1e] mb-1.5"}),g.jsxs("div",{className:"flex gap-3",children:[g.jsx("div",{className:"h-2 w-8 rounded bg-[#1e1e1e]"}),g.jsx("div",{className:"h-2 w-8 rounded bg-[#1e1e1e]"})]})]})}function zs(){return g.jsx("div",{className:"w-px h-6 bg-[#2a2a2a]"})}function K1({count:e}){return g.jsx("div",{className:"relative flex justify-center",children:g.jsx("div",{className:"absolute top-0 h-px bg-[#2a2a2a]",style:{width:`${(e-1)*220}px`}})})}function IB(){return g.jsx("div",{className:"h-full bg-black overflow-hidden",children:g.jsxs("div",{className:"flex flex-col items-center pt-10 animate-pulse",children:[g.jsx(no,{w:20}),g.jsx(zs,{}),g.jsx(K1,{count:3}),g.jsx("div",{className:"flex gap-10",children:[18,22,16].map((e,t)=>g.jsxs("div",{className:"flex flex-col items-center",children:[g.jsx(zs,{}),g.jsx(no,{w:e})]},t))}),g.jsxs("div",{className:"flex gap-10 w-full justify-center",children:[g.jsxs("div",{className:"flex flex-col items-center",children:[g.jsx(zs,{}),g.jsx(K1,{count:2}),g.jsx("div",{className:"flex gap-10",children:[14,20].map((e,t)=>g.jsxs("div",{className:"flex flex-col items-center",children:[g.jsx(zs,{}),g.jsx(no,{w:e})]},t))})]}),g.jsxs("div",{className:"flex flex-col items-center",children:[g.jsx(zs,{}),g.jsx(no,{w:18}),g.jsx(zs,{}),g.jsx(no,{w:12})]}),g.jsx("div",{className:"w-[180px]"})]})]})})}const fp=260,hp=80,BB={agentNode:zB};function UB(e,t){const r=new Y1.graphlib.Graph;r.setDefaultEdgeLabel(()=>({})),r.setGraph({rankdir:"TB",nodesep:60,ranksep:80});const a=[],s=[];for(const[o,c]of e)if(r.setNode(o,{width:fp,height:hp}),a.push({id:o,type:"agentNode",position:{x:0,y:0},data:{...c,isSelected:o===t}}),c.parentId&&e.has(c.parentId)){const d=`${c.parentId}->${o}`;r.setEdge(c.parentId,o),s.push({id:d,source:c.parentId,target:o,style:{stroke:"#2a2a2a",strokeWidth:1.5}})}Y1.layout(r);for(const o of a){const c=r.node(o.id);c&&(o.position={x:c.x-fp/2,y:c.y-hp/2})}return{nodes:a,edges:s}}const Am=300;function HB({nodes:e}){const{setCenter:t}=Uo(),r=ee.useRef(!1);return ee.useEffect(()=>{if(e.length>0&&!r.current){const s=e.find(d=>!d.data.parentId)??e[0];r.current=!0;const o=s.position.x+fp/2,c=s.position.y+hp/2;setTimeout(()=>t(o,c,{zoom:.85,duration:400}),60)}},[e,t]),null}function $B(){const{zoomIn:e,zoomOut:t,fitView:r}=Uo();return g.jsx(V9,{position:"bottom-right",showZoom:!1,showFitView:!1,showInteractive:!1,className:"!bg-transparent !border-none !shadow-none",children:g.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-[#222]",children:[g.jsx("button",{onClick:()=>e({duration:Am}),className:"flex items-center justify-center w-7 h-7 bg-[#111] text-white hover:bg-[#2a2a2a] transition-colors",title:"Zoom in",children:g.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"w-3.5 h-3.5",children:g.jsx("path",{d:"M12 5v14M5 12h14"})})}),g.jsx("button",{onClick:()=>t({duration:Am}),className:"flex items-center justify-center w-7 h-7 bg-[#111] text-white hover:bg-[#2a2a2a] border-y border-[#222] transition-colors",title:"Zoom out",children:g.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"w-3.5 h-3.5",children:g.jsx("path",{d:"M5 12h14"})})}),g.jsx("button",{onClick:()=>r({padding:.3,duration:Am}),className:"flex items-center justify-center w-7 h-7 bg-[#111] text-white hover:bg-[#2a2a2a] transition-colors",title:"Fit view",children:g.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"w-3.5 h-3.5",children:g.jsx("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})})]})})}function qB({agents:e,selectedAgentId:t,onSelectAgent:r,eventsLoaded:a,eventsEmpty:s,scanCompleted:o}){const[c,d,f]=D9([]),[h,m,p]=j9([]);ee.useEffect(()=>{if(e.size===0)return;const{nodes:S,edges:w}=UB(e,t);d(S),m(w)},[e.size,d,m]),ee.useEffect(()=>{e.size!==0&&d(S=>S.map(w=>{const k=e.get(w.id);return k?{...w,data:{...k,isSelected:w.id===t}}:w}))},[e,t,d]);const y=ee.useRef(!1),x=ee.useCallback((S,w)=>{y.current=!0,r(w.id)},[r]),_=ee.useCallback(()=>{if(y.current){y.current=!1;return}r(null)},[r]);if(e.size===0&&a&&s)return g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center px-4",children:[g.jsx("div",{className:"w-10 h-10 mb-3 rounded-full bg-[#111] flex items-center justify-center",children:o?g.jsx("svg",{className:"w-5 h-5 text-[#444]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25a2.25 2.25 0 0 1-2.25-2.25v-2.25Z"})}):g.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 animate-pulse"})}),g.jsx("p",{className:"text-sm text-[#555]",children:o?"Agent trace data is not available for this pentest":"Waiting for agent data…"})]});const N=e.size>0;return g.jsxs("div",{className:"relative h-full",children:[g.jsx("div",{className:`absolute inset-0 z-10 transition-opacity duration-500 ${N?"opacity-0 pointer-events-none":"opacity-100"}`,children:g.jsx(IB,{})}),g.jsx("div",{className:`h-full transition-opacity duration-500 ${N?"opacity-100":"opacity-0"}`,children:g.jsxs(R9,{nodes:c,edges:h,onNodesChange:f,onEdgesChange:p,onNodeClick:x,onPaneClick:_,nodeTypes:BB,nodesConnectable:!1,edgesFocusable:!1,edgesReconnectable:!1,minZoom:.15,maxZoom:1.5,proOptions:{hideAttribution:!0},className:"bg-black",children:[g.jsx(U9,{color:"#111",gap:20}),g.jsx(HB,{nodes:c}),g.jsx($B,{}),g.jsx(sB,{position:"bottom-left",nodeColor:S=>{var k;const w=(k=S.data)==null?void 0:k.status;return w==="running"?"#3b82f6":w==="completed"?"#10b981":w==="failed"||w==="error"?"#ef4444":"#555"},maskColor:"rgba(0,0,0,0.8)",style:{width:80,height:50},className:"!bg-[#0a0a0a] !border-[#222]"})]})})]})}function $s({text:e,className:t=""}){return g.jsx("div",{className:`prose-markdown ${t}`,children:g.jsx(Bp,{remarkPlugins:[qp],rehypePlugins:[Pp],components:Fp,children:e})})}const Z1=6,Q1=20;function zn({text:e,maxLines:t=20}){const[r,a]=ee.useState(!1),o=e.trimEnd().split(` `).length>t;return g.jsxs("div",{children:[g.jsx("div",{className:r&&o?"max-h-[1200px] overflow-auto":"",style:!r&&o?{display:"-webkit-box",WebkitLineClamp:t,WebkitBoxOrient:"vertical",overflow:"hidden"}:void 0,children:g.jsx($s,{text:e})}),o&&g.jsx("button",{onClick:()=>a(!r),className:"text-xs text-[#555] hover:text-[#888] mt-1",children:r?"Show less":"Show more"})]})}function wi({children:e,className:t=""}){const[r,a]=ee.useState(!1),o=typeof e=="string"?e.trimEnd().split(` `):null,c=o!==null&&o.length>Z1,d=c&&!r?o.slice(0,Z1).join(` `):e;return g.jsxs("div",{children:[g.jsx("pre",{className:`font-mono text-[13px] leading-relaxed whitespace-pre-wrap break-words mt-1 ${r?"overflow-auto max-h-[1200px]":"overflow-hidden"} ${t}`,children:d}),c&&g.jsx("button",{onClick:()=>a(!r),className:"text-xs text-[#555] hover:text-[#888] mt-0.5",children:r?"Show less":"Show more"})]})}function cg({code:e,language:t,className:r="",collapsible:a=!1}){const[s,o]=ee.useState(!1),c=e.trimEnd().split(` `),d=a&&c.length>Q1,f=d&&!s?c.slice(0,Q1).join(` -`):e;let h;try{h=t?Gn.highlight(f,{language:t,ignoreIllegals:!0}).value:Gn.highlightAuto(f).value}catch{h=Gn.highlightAuto(f).value}return g.jsxs("div",{children:[g.jsx("pre",{className:`font-mono text-[12px] leading-relaxed px-0 py-1 mt-1 whitespace-pre-wrap break-all ${a?s?"overflow-auto max-h-[1200px]":"overflow-hidden":"overflow-auto max-h-[400px]"} ${r}`,children:g.jsx("code",{dangerouslySetInnerHTML:{__html:h}})}),d&&g.jsx("button",{onClick:()=>o(!s),className:"text-xs text-[#555] hover:text-[#888] mt-0.5",children:s?"Show less":"Show more"})]})}const $B=50,W1=200,J1=25,e_=24,qB=[/\n?\[Command still running after [\d.]+s - showing output so far\.?\s*(?:Use C-c to interrupt if needed\.)?\]/g,/^\[Below is the output of the previous command\.\]\n?/gm,/^No command is currently running\. Cannot send input\.$/gm,/^A command is already running\. Use is_input=true to send input to it, or interrupt it first \(e\.g\., with C-c\)\.$/gm],PB=/^Chunk ID: [0-9a-f]+\s*$/,FB=[/^Wall time: [\d.]+ seconds\s*$/,/^Process exited with code -?\d+\s*$/,/^Process running with session ID \d+\s*$/,/^Original token count: \d+\s*$/];function GB(e){const t=[];for(let r=0;rs.test(e[a]));)a++;aW1?e.slice(0,W1-3)+"...":e}function YB(e,t=""){let r=e.replace(/\x1b(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~]|\][^\x07]*\x07)/g,"").replace(/\r/g,"");for(const a of qB)r=r.replace(a,"");if(r.trim()){const a=GB(r.split(` -`)),s=[];for(const o of a)s.length===0&&!o.trim()||/^\[STRIX_\d+\]\$\s*/.test(o)||t&&o.trim()===t.trim()||t&&new RegExp(`^[\\$#>]\\s*${VB(t.trim())}\\s*$`).test(o)||s.push(o);for(;s.length>0&&/^\[STRIX_\d+\]\$\s*/.test(s[s.length-1]);)s.pop();r=s.join(` -`)}return r.trim()}function XB(e){const t=e.split(` -`);if(t.length<=$B)return t.map(Mm).join(` +`):e;let h;try{h=t?En.highlight(f,{language:t,ignoreIllegals:!0}).value:En.highlightAuto(f).value}catch{h=En.highlightAuto(f).value}return g.jsxs("div",{children:[g.jsx("pre",{className:`font-mono text-[12px] leading-relaxed px-0 py-1 mt-1 whitespace-pre-wrap break-all ${a?s?"overflow-auto max-h-[1200px]":"overflow-hidden":"overflow-auto max-h-[400px]"} ${r}`,children:g.jsx("code",{dangerouslySetInnerHTML:{__html:h}})}),d&&g.jsx("button",{onClick:()=>o(!s),className:"text-xs text-[#555] hover:text-[#888] mt-0.5",children:s?"Show less":"Show more"})]})}const PB=50,W1=200,J1=25,e_=24,FB=[/\n?\[Command still running after [\d.]+s - showing output so far\.?\s*(?:Use C-c to interrupt if needed\.)?\]/g,/^\[Below is the output of the previous command\.\]\n?/gm,/^No command is currently running\. Cannot send input\.$/gm,/^A command is already running\. Use is_input=true to send input to it, or interrupt it first \(e\.g\., with C-c\)\.$/gm],GB=/^Chunk ID: [0-9a-f]+\s*$/,VB=[/^Wall time: [\d.]+ seconds\s*$/,/^Process exited with code -?\d+\s*$/,/^Process running with session ID \d+\s*$/,/^Original token count: \d+\s*$/];function YB(e){const t=[];for(let r=0;rs.test(e[a]));)a++;aW1?e.slice(0,W1-3)+"...":e}function KB(e,t=""){let r=e.replace(/\x1b(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~]|\][^\x07]*\x07)/g,"").replace(/\r/g,"");for(const a of FB)r=r.replace(a,"");if(r.trim()){const a=YB(r.split(` +`)),s=[];for(const o of a)s.length===0&&!o.trim()||/^\[STRIX_\d+\]\$\s*/.test(o)||t&&o.trim()===t.trim()||t&&new RegExp(`^[\\$#>]\\s*${XB(t.trim())}\\s*$`).test(o)||s.push(o);for(;s.length>0&&/^\[STRIX_\d+\]\$\s*/.test(s[s.length-1]);)s.pop();r=s.join(` +`)}return r.trim()}function ZB(e){const t=e.split(` +`);if(t.length<=PB)return t.map(Mm).join(` `);const r=t.length-J1-e_;return[...t.slice(0,J1).map(Mm),`... ${r} lines truncated ...`,...t.slice(-e_).map(Mm)].join(` -`)}function KB({toolName:e,args:t,result:r}){const a=e==="write_stdin",s=a?t.chars??t.input??"":t.command??t.cmd??"",o=r;let c=null,d=null,f=null;if(o&&typeof o=="object"){c=typeof o.content=="string"?o.content:null,d=typeof o.error=="string"?o.error:null,f=typeof o.exit_code=="number"?o.exit_code:null;const m=typeof o.status=="string"?o.status:"";(m==="running"||m==="command still running")&&(c=null)}else typeof o=="string"&&(c=o);const h=c?XB(YB(c,s)):null;return g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/80 font-semibold text-sm",children:a?"Terminal input":"Terminal"}),s&&g.jsx(cg,{code:s,language:"bash",collapsible:!0}),d&&g.jsx(wi,{className:"text-red-400/70",children:d}),h&&g.jsx(wi,{className:"text-[#666]",children:h}),f!=null&&f!==0&&g.jsxs("div",{className:"font-mono text-[13px] text-red-400/70 mt-0.5",children:["exit code ",f]})]})}const t_={back:"going back in browser history",forward:"going forward in browser history",scroll_down:"scrolling down",scroll_up:"scrolling up",refresh:"refreshing",close_tab:"closing tab",switch_tab:"switching tab",list_tabs:"listing tabs",view_source:"viewing page source",get_console_logs:"getting console logs",screenshot:"taking screenshot",wait:"waiting...",close:"closing"},n_={click:"clicking",double_click:"double clicking",hover:"hovering"};function Om({prefix:e,url:t,suffix:r}){return g.jsxs("span",{className:"text-[#888] text-[13px]",children:[e,t&&g.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-cyan-400/80 hover:underline",children:t}),r]})}function ZB(e){const t=e.action??"",r=e.url??void 0;if(t in t_)return t_[t];if(t==="launch")return r?g.jsx(Om,{prefix:"launching ",url:r}):"launching";if(t==="goto"||t==="navigate")return g.jsx(Om,{prefix:"navigating to ",url:r});if(t==="new_tab")return g.jsx(Om,{prefix:"opening tab ",url:r});if(t in n_)return n_[t];if(t==="type")return`typing "${(e.text??"").slice(0,40)}"`;if(t==="press_key"||t==="key_press")return`pressing key ${e.key??""}`;if(t==="save_pdf"||t==="save_as_pdf"){const a=e.file_path??"";return`saving PDF${a?` to ${a}`:""}`}return t==="execute_js"?"executing javascript":t||"browser action"}function QB({args:e}){const r=(e.action??"")==="execute_js"?e.js_code??e.code??"":"",a=ZB(e);return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[g.jsx("span",{className:"text-blue-400/80 font-semibold text-sm shrink-0",children:"Browser"}),g.jsx("span",{className:"min-w-0 truncate text-[#888] text-[13px]",children:a})]}),r&&g.jsx(cg,{code:r,language:"javascript",collapsible:!0})]})}function ug(e){return e.length>60?"..."+e.slice(-57):e}const fu=30;function WB({toolName:e,args:t}){const r=t.path??t.file_path??"",a=t.command??"",s=t.old_str??"",o=t.new_str??"",c=t.regex??"";let d;e==="list_files"?d="list":e==="search_files"?d="search":a==="view"?d="view":a==="create"?d="create":a==="str_replace"?d="edit":a==="undo_edit"?d="undo":a==="insert"?d="insert":d="file";const f=r?ug(r):"",h=c?` /${c}/`:"",m=s?s.split(` +`)}function QB({toolName:e,args:t,result:r}){const a=e==="write_stdin",s=a?t.chars??t.input??"":t.command??t.cmd??"",o=r;let c=null,d=null,f=null;if(o&&typeof o=="object"){c=typeof o.content=="string"?o.content:null,d=typeof o.error=="string"?o.error:null,f=typeof o.exit_code=="number"?o.exit_code:null;const m=typeof o.status=="string"?o.status:"";(m==="running"||m==="command still running")&&(c=null)}else typeof o=="string"&&(c=o);const h=c?ZB(KB(c,s)):null;return g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/80 font-semibold text-sm",children:a?"Terminal input":"Terminal"}),s&&g.jsx(cg,{code:s,language:"bash",collapsible:!0}),d&&g.jsx(wi,{className:"text-red-400/70",children:d}),h&&g.jsx(wi,{className:"text-[#666]",children:h}),f!=null&&f!==0&&g.jsxs("div",{className:"font-mono text-[13px] text-red-400/70 mt-0.5",children:["exit code ",f]})]})}const t_={back:"going back in browser history",forward:"going forward in browser history",scroll_down:"scrolling down",scroll_up:"scrolling up",refresh:"refreshing",close_tab:"closing tab",switch_tab:"switching tab",list_tabs:"listing tabs",view_source:"viewing page source",get_console_logs:"getting console logs",screenshot:"taking screenshot",wait:"waiting...",close:"closing"},n_={click:"clicking",double_click:"double clicking",hover:"hovering"};function Om({prefix:e,url:t,suffix:r}){return g.jsxs("span",{className:"text-[#888] text-[13px]",children:[e,t&&g.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-cyan-400/80 hover:underline",children:t}),r]})}function WB(e){const t=e.action??"",r=e.url??void 0;if(t in t_)return t_[t];if(t==="launch")return r?g.jsx(Om,{prefix:"launching ",url:r}):"launching";if(t==="goto"||t==="navigate")return g.jsx(Om,{prefix:"navigating to ",url:r});if(t==="new_tab")return g.jsx(Om,{prefix:"opening tab ",url:r});if(t in n_)return n_[t];if(t==="type")return`typing "${(e.text??"").slice(0,40)}"`;if(t==="press_key"||t==="key_press")return`pressing key ${e.key??""}`;if(t==="save_pdf"||t==="save_as_pdf"){const a=e.file_path??"";return`saving PDF${a?` to ${a}`:""}`}return t==="execute_js"?"executing javascript":t||"browser action"}function JB({args:e}){const r=(e.action??"")==="execute_js"?e.js_code??e.code??"":"",a=WB(e);return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[g.jsx("span",{className:"text-blue-400/80 font-semibold text-sm shrink-0",children:"Browser"}),g.jsx("span",{className:"min-w-0 truncate text-[#888] text-[13px]",children:a})]}),r&&g.jsx(cg,{code:r,language:"javascript",collapsible:!0})]})}function ug(e){return e.length>60?"..."+e.slice(-57):e}const fu=30;function e7({toolName:e,args:t}){const r=t.path??t.file_path??"",a=t.command??"",s=t.old_str??"",o=t.new_str??"",c=t.regex??"";let d;e==="list_files"?d="list":e==="search_files"?d="search":a==="view"?d="view":a==="create"?d="create":a==="str_replace"?d="edit":a==="undo_edit"?d="undo":a==="insert"?d="insert":d="file";const f=r?ug(r):"",h=c?` /${c}/`:"",m=s?s.split(` `):[],p=o?o.split(` -`):[],y=m.length+p.length,x=y>fu,_=x?Math.round(fu*(m.length/y)):m.length,N=x?fu-_:p.length;return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-baseline gap-2",children:[g.jsx("span",{className:"text-sky-400/80 font-semibold text-sm shrink-0",children:d}),f&&g.jsx("span",{className:"text-[#888] font-mono text-[13px] break-all",children:f})]}),h&&g.jsx("div",{className:"text-purple-400/60 font-mono text-[13px] break-all mt-0.5",children:h}),(s||o)&&g.jsxs("div",{className:"font-mono text-[13px] leading-relaxed mt-1.5",children:[m.slice(0,_).map((S,w)=>g.jsxs("div",{className:"text-red-400/60",children:[g.jsx("span",{className:"select-none text-red-400/30 mr-1",children:"-"}),S]},`o${w}`)),p.slice(0,N).map((S,w)=>g.jsxs("div",{className:"text-emerald-400/60",children:[g.jsx("span",{className:"select-none text-emerald-400/30 mr-1",children:"+"}),S]},`n${w}`)),x&&g.jsxs("div",{className:"text-[#444] mt-0.5",children:["... ",y-fu," more lines"]})]})]})}const hu=30,JB="*** Begin Patch",e7="*** End Patch",r_="*** Add File: ",i_="*** Update File: ",a_="*** Delete File: ",t7={add:"create",update:"edit",delete:"delete"};function n7(e){const t=e.patch;return typeof t=="string"?t:t&&typeof t=="object"&&typeof t.patch=="string"?t.patch:typeof e.input=="string"?e.input:""}function r7(e){const t=[];let r=null;const a=()=>{r&&t.push(r),r=null};for(const s of e.split(` -`))if(!(s===JB||s===e7))if(s.startsWith(r_))a(),r={kind:"add",path:s.slice(r_.length).trim(),oldLines:[],newLines:[]};else if(s.startsWith(i_))a(),r={kind:"update",path:s.slice(i_.length).trim(),oldLines:[],newLines:[]};else if(s.startsWith(a_))a(),r={kind:"delete",path:s.slice(a_.length).trim(),oldLines:[],newLines:[]};else if((r==null?void 0:r.kind)==="update"){if(s.startsWith("@@"))continue;s.startsWith("-")&&!s.startsWith("---")?r.oldLines.push(s.slice(1)):s.startsWith("+")&&!s.startsWith("+++")&&r.newLines.push(s.slice(1))}else(r==null?void 0:r.kind)==="add"&&(s.startsWith("+")?r.newLines.push(s.slice(1)):s.trim()&&r.newLines.push(s));return a(),t}function i7({op:e}){const t=t7[e.kind]??"file",r=e.oldLines.length+e.newLines.length,a=r>hu,s=a&&r>0?Math.round(hu*(e.oldLines.length/r)):e.oldLines.length,o=a?hu-s:e.newLines.length;return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-baseline gap-2",children:[g.jsx("span",{className:"text-sky-400/80 font-semibold text-sm shrink-0",children:t}),e.path&&g.jsx("span",{className:"text-[#888] font-mono text-[13px] break-all",children:ug(e.path)})]}),(e.oldLines.length>0||e.newLines.length>0)&&g.jsxs("div",{className:"font-mono text-[13px] leading-relaxed mt-1.5",children:[e.oldLines.slice(0,s).map((c,d)=>g.jsxs("div",{className:"text-red-400/60",children:[g.jsx("span",{className:"select-none text-red-400/30 mr-1",children:"-"}),c]},`o${d}`)),e.newLines.slice(0,o).map((c,d)=>g.jsxs("div",{className:"text-emerald-400/60",children:[g.jsx("span",{className:"select-none text-emerald-400/30 mr-1",children:"+"}),c]},`n${d}`)),a&&g.jsxs("div",{className:"text-[#444] mt-0.5",children:["... ",r-hu," more lines"]})]})]})}function a7({args:e,result:t,status:r}){const a=r7(n7(e));return a.length===0?g.jsxs("div",{children:[g.jsx("span",{className:"text-sky-400/80 font-semibold text-sm",children:"patch"}),r==="failed"&&typeof t=="string"&&t.trim()&&g.jsx("div",{className:"text-red-400/70 text-[13px] mt-1",children:t.trim()})]}):g.jsxs("div",{className:"space-y-2",children:[a.map((s,o)=>g.jsx(i7,{op:s},o)),r==="failed"&&typeof t=="string"&&t.trim()&&g.jsx("div",{className:"text-red-400/70 text-[13px]",children:t.trim()})]})}function s7({args:e,result:t}){const r=(e.path??"").trim(),a=t;let s=null;if(typeof a=="string"){const o=a.trim();o&&!o.toLowerCase().startsWith("data:image/")&&!o.startsWith("{")&&(s=o)}return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-baseline gap-2",children:[g.jsx("span",{className:"text-sky-400/80 font-semibold text-sm shrink-0",children:"view image"}),r&&g.jsx("span",{className:"text-[#888] font-mono text-[13px] break-all",children:ug(r)})]}),s&&g.jsx("div",{className:"text-red-400/70 text-[13px] mt-1",children:s})]})}const l7={critical:"text-red-400",high:"text-orange-400",medium:"text-yellow-400",low:"text-blue-400",info:"text-cyan-400"};function o7({args:e,result:t}){const r=e.title??"",a=e.description??"",s=e.impact??"",o=e.target??"",c=e.endpoint??"",d=e.method??"",f=e.technical_analysis??"",h=e.poc_description??"",m=e.poc_script_code??"",p=e.remediation_steps??"",y=e.cve??"",x=e.cwe??"",_=t,N=(_&&typeof _=="object"?_.severity:null)??e.severity??"medium",S=String(N).toLowerCase(),w=(_&&typeof _=="object"?_.cvss_score:null)??e.cvss??null,k=l7[S]??"text-yellow-400";return g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[g.jsx("span",{className:`font-semibold text-sm ${k}`,children:S.toUpperCase()}),w!=null&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["CVSS ",w]}),y&&g.jsx("span",{className:"text-[#888] font-mono text-[13px]",children:y}),x&&g.jsx("span",{className:"text-[#888] font-mono text-[13px]",children:x})]}),r&&g.jsx("div",{className:"text-[15px] text-white/80 font-semibold",children:r}),(o||c)&&g.jsxs("div",{className:"text-[13px] text-[#888] font-mono",children:[o,c?` ${d} ${c}`:""]}),a&&g.jsx(Ln,{text:a,maxLines:20}),s&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Impact"}),g.jsx("div",{className:"mt-1",children:g.jsx(Ln,{text:s,maxLines:15})})]}),f&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Technical Analysis"}),g.jsx("div",{className:"mt-1",children:g.jsx(Ln,{text:f,maxLines:20})})]}),(h||m)&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Proof of Concept"}),h&&g.jsx("div",{className:"mt-1",children:g.jsx($s,{text:h})}),m&&g.jsx(iE,{children:m})]}),p&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Remediation"}),g.jsx("div",{className:"mt-1",children:g.jsx(Ln,{text:p,maxLines:15})})]})]})}const ZN=200,QN={GET:"text-emerald-400/80",POST:"text-blue-400/80",PUT:"text-yellow-400/80",PATCH:"text-orange-400/80",DELETE:"text-red-400/80"};function dg(e){return e<300?"text-emerald-400/80":e<400?"text-yellow-400/80":e<500?"text-orange-400/80":"text-red-400/80"}function Xr(e,t=80){return e.length>t?e.slice(0,t-3)+"...":e}function mp(e,t=150){return Xr(e.replace(/\n/g," ").replace(/\r/g,"").replace(/\t/g," "),t)}function pp(e,t){const r=e.split(` -`),a=r.slice(0,t).map(s=>Xr(s,ZN-5)).join(` +`):[],y=m.length+p.length,x=y>fu,_=x?Math.round(fu*(m.length/y)):m.length,N=x?fu-_:p.length;return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-baseline gap-2",children:[g.jsx("span",{className:"text-sky-400/80 font-semibold text-sm shrink-0",children:d}),f&&g.jsx("span",{className:"text-[#888] font-mono text-[13px] break-all",children:f})]}),h&&g.jsx("div",{className:"text-purple-400/60 font-mono text-[13px] break-all mt-0.5",children:h}),(s||o)&&g.jsxs("div",{className:"font-mono text-[13px] leading-relaxed mt-1.5",children:[m.slice(0,_).map((S,w)=>g.jsxs("div",{className:"text-red-400/60",children:[g.jsx("span",{className:"select-none text-red-400/30 mr-1",children:"-"}),S]},`o${w}`)),p.slice(0,N).map((S,w)=>g.jsxs("div",{className:"text-emerald-400/60",children:[g.jsx("span",{className:"select-none text-emerald-400/30 mr-1",children:"+"}),S]},`n${w}`)),x&&g.jsxs("div",{className:"text-[#444] mt-0.5",children:["... ",y-fu," more lines"]})]})]})}const hu=30,t7="*** Begin Patch",n7="*** End Patch",r_="*** Add File: ",i_="*** Update File: ",a_="*** Delete File: ",r7={add:"create",update:"edit",delete:"delete"};function i7(e){const t=e.patch;return typeof t=="string"?t:t&&typeof t=="object"&&typeof t.patch=="string"?t.patch:typeof e.input=="string"?e.input:""}function a7(e){const t=[];let r=null;const a=()=>{r&&t.push(r),r=null};for(const s of e.split(` +`))if(!(s===t7||s===n7))if(s.startsWith(r_))a(),r={kind:"add",path:s.slice(r_.length).trim(),oldLines:[],newLines:[]};else if(s.startsWith(i_))a(),r={kind:"update",path:s.slice(i_.length).trim(),oldLines:[],newLines:[]};else if(s.startsWith(a_))a(),r={kind:"delete",path:s.slice(a_.length).trim(),oldLines:[],newLines:[]};else if((r==null?void 0:r.kind)==="update"){if(s.startsWith("@@"))continue;s.startsWith("-")&&!s.startsWith("---")?r.oldLines.push(s.slice(1)):s.startsWith("+")&&!s.startsWith("+++")&&r.newLines.push(s.slice(1))}else(r==null?void 0:r.kind)==="add"&&(s.startsWith("+")?r.newLines.push(s.slice(1)):s.trim()&&r.newLines.push(s));return a(),t}function s7({op:e}){const t=r7[e.kind]??"file",r=e.oldLines.length+e.newLines.length,a=r>hu,s=a&&r>0?Math.round(hu*(e.oldLines.length/r)):e.oldLines.length,o=a?hu-s:e.newLines.length;return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-baseline gap-2",children:[g.jsx("span",{className:"text-sky-400/80 font-semibold text-sm shrink-0",children:t}),e.path&&g.jsx("span",{className:"text-[#888] font-mono text-[13px] break-all",children:ug(e.path)})]}),(e.oldLines.length>0||e.newLines.length>0)&&g.jsxs("div",{className:"font-mono text-[13px] leading-relaxed mt-1.5",children:[e.oldLines.slice(0,s).map((c,d)=>g.jsxs("div",{className:"text-red-400/60",children:[g.jsx("span",{className:"select-none text-red-400/30 mr-1",children:"-"}),c]},`o${d}`)),e.newLines.slice(0,o).map((c,d)=>g.jsxs("div",{className:"text-emerald-400/60",children:[g.jsx("span",{className:"select-none text-emerald-400/30 mr-1",children:"+"}),c]},`n${d}`)),a&&g.jsxs("div",{className:"text-[#444] mt-0.5",children:["... ",r-hu," more lines"]})]})]})}function l7({args:e,result:t,status:r}){const a=a7(i7(e));return a.length===0?g.jsxs("div",{children:[g.jsx("span",{className:"text-sky-400/80 font-semibold text-sm",children:"patch"}),r==="failed"&&typeof t=="string"&&t.trim()&&g.jsx("div",{className:"text-red-400/70 text-[13px] mt-1",children:t.trim()})]}):g.jsxs("div",{className:"space-y-2",children:[a.map((s,o)=>g.jsx(s7,{op:s},o)),r==="failed"&&typeof t=="string"&&t.trim()&&g.jsx("div",{className:"text-red-400/70 text-[13px]",children:t.trim()})]})}function o7({args:e,result:t}){const r=(e.path??"").trim(),a=t;let s=null;if(typeof a=="string"){const o=a.trim();o&&!o.toLowerCase().startsWith("data:image/")&&!o.startsWith("{")&&(s=o)}return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-baseline gap-2",children:[g.jsx("span",{className:"text-sky-400/80 font-semibold text-sm shrink-0",children:"view image"}),r&&g.jsx("span",{className:"text-[#888] font-mono text-[13px] break-all",children:ug(r)})]}),s&&g.jsx("div",{className:"text-red-400/70 text-[13px] mt-1",children:s})]})}const c7={critical:"text-red-400",high:"text-orange-400",medium:"text-yellow-400",low:"text-blue-400",info:"text-cyan-400"};function u7({args:e,result:t}){const r=e.title??"",a=e.description??"",s=e.impact??"",o=e.target??"",c=e.endpoint??"",d=e.method??"",f=e.technical_analysis??"",h=e.poc_description??"",{language:m,code:p}=aE(e.poc_script_code??""),y=e.remediation_steps??"",x=e.cve??"",_=e.cwe??"",N=t,S=(N&&typeof N=="object"?N.severity:null)??e.severity??"medium",w=String(S).toLowerCase(),k=(N&&typeof N=="object"?N.cvss_score:null)??e.cvss??null,E=c7[w]??"text-yellow-400";return g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[g.jsx("span",{className:`font-semibold text-sm ${E}`,children:w.toUpperCase()}),k!=null&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["CVSS ",k]}),x&&g.jsx("span",{className:"text-[#888] font-mono text-[13px]",children:x}),_&&g.jsx("span",{className:"text-[#888] font-mono text-[13px]",children:_})]}),r&&g.jsx("div",{className:"text-[15px] text-white/80 font-semibold",children:r}),(o||c)&&g.jsxs("div",{className:"text-[13px] text-[#888] font-mono",children:[o,c?` ${d} ${c}`:""]}),a&&g.jsx(zn,{text:a,maxLines:20}),s&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Impact"}),g.jsx("div",{className:"mt-1",children:g.jsx(zn,{text:s,maxLines:15})})]}),f&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Technical Analysis"}),g.jsx("div",{className:"mt-1",children:g.jsx(zn,{text:f,maxLines:20})})]}),(h||p)&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Proof of Concept"}),h&&g.jsx("div",{className:"mt-1",children:g.jsx($s,{text:h})}),p&&g.jsx(iE,{className:m?`language-${m}`:void 0,children:p})]}),y&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Remediation"}),g.jsx("div",{className:"mt-1",children:g.jsx(zn,{text:y,maxLines:15})})]})]})}const QN=200,WN={GET:"text-emerald-400/80",POST:"text-blue-400/80",PUT:"text-yellow-400/80",PATCH:"text-orange-400/80",DELETE:"text-red-400/80"};function dg(e){return e<300?"text-emerald-400/80":e<400?"text-yellow-400/80":e<500?"text-orange-400/80":"text-red-400/80"}function Xr(e,t=80){return e.length>t?e.slice(0,t-3)+"...":e}function mp(e,t=150){return Xr(e.replace(/\n/g," ").replace(/\r/g,"").replace(/\t/g," "),t)}function pp(e,t){const r=e.split(` +`),a=r.slice(0,t).map(s=>Xr(s,QN-5)).join(` `);return r.length>t?a+` -...`:a}function c7({args:e,result:t}){const r=e.httpql_filter??"",a=t,s=a?a.requests:null,o=Array.isArray(s)?s:[];return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:"listing requests"}),r&&g.jsx("span",{className:"text-[#888] text-[13px]",children:Xr(r,150)})]}),o.length>0&&g.jsxs("div",{className:"mt-1.5 font-mono text-[13px] space-y-0.5",children:[o.slice(0,20).map((c,d)=>{const f=(c.method??"GET").toUpperCase(),h=c.host??"",m=c.path??"",p=c.response,y=(p==null?void 0:p.statusCode)??null;return g.jsxs("div",{className:"flex gap-2",children:[g.jsx("span",{className:`w-10 shrink-0 font-bold ${QN[f]??"text-[#888]"}`,children:f}),g.jsx("span",{className:"text-[#777] truncate",children:Xr(h+m,180)}),y!=null&&g.jsx("span",{className:`ml-auto shrink-0 ${dg(y)}`,children:y})]},d)}),o.length>20&&g.jsxs("div",{className:"text-[#555]",children:["... +",o.length-20," more"]})]})]})}function u7({args:e,result:t}){const r=e.request_id,a=e.part??"request",s=e.search_pattern??"",o=t,c=o?o.matches:null,d=Array.isArray(c)?c:[],f=o?o.content??null:null,h=o?!!o.has_more:!1;return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("span",{className:"text-purple-400/80 font-semibold text-sm",children:[s?"searching":"viewing"," ",a]}),r!=null&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["#",r]}),s&&g.jsxs("span",{className:"text-[#666] font-mono text-[13px]",children:["/",Xr(s,100),"/"]})]}),d.length>0&&g.jsxs("div",{className:"mt-1.5 font-mono text-[13px] space-y-1",children:[d.slice(0,5).map((m,p)=>{const y=(m.before??"").replace(/\n/g," ").replace(/\r/g,"").slice(-100),x=(m.after??"").replace(/\n/g," ").replace(/\r/g,"").slice(0,100);return g.jsxs("div",{children:[y&&g.jsxs("span",{className:"text-[#555]",children:["...",y]}),g.jsx("span",{className:"text-amber-400/80 font-bold",children:m.match}),x&&g.jsxs("span",{className:"text-[#555]",children:[x,"..."]})]},p)}),d.length>5&&g.jsxs("div",{className:"text-[#555]",children:["... +",d.length-5," more matches"]})]}),f&&!d.length&&(()=>{const m=f.split(` -`),p=m.slice(0,15).map(x=>Xr(x,ZN)).join(` +...`:a}function d7({args:e,result:t}){const r=e.httpql_filter??"",a=t,s=a?a.requests:null,o=Array.isArray(s)?s:[];return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:"listing requests"}),r&&g.jsx("span",{className:"text-[#888] text-[13px]",children:Xr(r,150)})]}),o.length>0&&g.jsxs("div",{className:"mt-1.5 font-mono text-[13px] space-y-0.5",children:[o.slice(0,20).map((c,d)=>{const f=(c.method??"GET").toUpperCase(),h=c.host??"",m=c.path??"",p=c.response,y=(p==null?void 0:p.statusCode)??null;return g.jsxs("div",{className:"flex gap-2",children:[g.jsx("span",{className:`w-10 shrink-0 font-bold ${WN[f]??"text-[#888]"}`,children:f}),g.jsx("span",{className:"text-[#777] truncate",children:Xr(h+m,180)}),y!=null&&g.jsx("span",{className:`ml-auto shrink-0 ${dg(y)}`,children:y})]},d)}),o.length>20&&g.jsxs("div",{className:"text-[#555]",children:["... +",o.length-20," more"]})]})]})}function f7({args:e,result:t}){const r=e.request_id,a=e.part??"request",s=e.search_pattern??"",o=t,c=o?o.matches:null,d=Array.isArray(c)?c:[],f=o?o.content??null:null,h=o?!!o.has_more:!1;return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("span",{className:"text-purple-400/80 font-semibold text-sm",children:[s?"searching":"viewing"," ",a]}),r!=null&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["#",r]}),s&&g.jsxs("span",{className:"text-[#666] font-mono text-[13px]",children:["/",Xr(s,100),"/"]})]}),d.length>0&&g.jsxs("div",{className:"mt-1.5 font-mono text-[13px] space-y-1",children:[d.slice(0,5).map((m,p)=>{const y=(m.before??"").replace(/\n/g," ").replace(/\r/g,"").slice(-100),x=(m.after??"").replace(/\n/g," ").replace(/\r/g,"").slice(0,100);return g.jsxs("div",{children:[y&&g.jsxs("span",{className:"text-[#555]",children:["...",y]}),g.jsx("span",{className:"text-amber-400/80 font-bold",children:m.match}),x&&g.jsxs("span",{className:"text-[#555]",children:[x,"..."]})]},p)}),d.length>5&&g.jsxs("div",{className:"text-[#555]",children:["... +",d.length-5," more matches"]})]}),f&&!d.length&&(()=>{const m=f.split(` +`),p=m.slice(0,15).map(x=>Xr(x,QN)).join(` `),y=h||m.length>15;return g.jsx(wi,{className:"text-[#666]",children:p+(y?` -... more content available`:"")})})()]})}function d7({args:e,result:t}){const r=(e.method??"GET").toUpperCase(),a=e.url??"",s=e.headers,o=e.body,c=typeof o=="string"?o:"",d=t,f=d?d.error??null:null,h=d?d.status_code??null:null,m=d?d.response_time_ms??null:null,p=d?d.body:null,y=typeof p=="string"?p:null;return g.jsxs("div",{children:[g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:"request"}),g.jsxs("div",{className:"mt-1.5 font-mono text-[13px] space-y-0.5",children:[g.jsxs("div",{children:[g.jsx("span",{className:"text-[#555] select-none mr-1",children:">>"}),g.jsx("span",{className:`font-bold ${QN[r]??"text-[#888]"}`,children:r}),g.jsx("span",{className:"text-[#888] ml-1 break-all",children:Xr(a,180)})]}),s&&typeof s=="object"&&Object.entries(s).slice(0,5).map(([x,_])=>g.jsxs("div",{className:"text-[#555] pl-5",children:[x,": ",mp(String(_),150)]},x))]}),c&&g.jsx(wi,{className:"text-[#888]",children:pp(c,4)}),f&&g.jsx("div",{className:"text-red-400/70 text-[13px] mt-1.5",children:mp(f,150)}),h!=null&&g.jsxs("div",{className:"font-mono text-[13px] mt-1.5",children:[g.jsx("span",{className:"text-[#555] select-none mr-1",children:"<<"}),g.jsx("span",{className:`font-bold ${dg(h)}`,children:h}),m!=null&&g.jsxs("span",{className:"text-[#555] ml-2",children:[m,"ms"]})]}),y&&g.jsx(wi,{className:"text-[#666]",children:pp(y,6)})]})}function f7({args:e,result:t}){const r=e.request_id,a=e.modifications,s=t,o=s?s.status_code??null:null,c=s?s.response_time_ms??null:null,d=s?s.body:null,f=typeof d=="string"?d:null;return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:"repeating request"}),r!=null&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["#",r]})]}),a&&typeof a=="object"&&Object.keys(a).length>0&&g.jsx("div",{className:"mt-1.5 font-mono text-[13px] space-y-0.5",children:Object.entries(a).slice(0,5).map(([h,m])=>g.jsxs("div",{children:[g.jsxs("span",{className:"text-orange-400/60",children:[h,":"]})," ",g.jsx("span",{className:"text-[#777]",children:mp(typeof m=="string"?m:JSON.stringify(m),150)})]},h))}),o!=null&&g.jsxs("div",{className:"font-mono text-[13px] mt-1.5",children:[g.jsx("span",{className:"text-[#555] select-none mr-1",children:"<<"}),g.jsx("span",{className:`font-bold ${dg(o)}`,children:o}),c!=null&&g.jsxs("span",{className:"text-[#555] ml-2",children:[c,"ms"]})]}),f&&g.jsx(wi,{className:"text-[#666]",children:pp(f,5)})]})}const h7={get:"getting",list:"listing",create:"creating",update:"updating",delete:"deleting"};function m7({args:e}){const t=e.action??"",r=e.scope_name??"",a=h7[t]??(t||"managing");return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("span",{className:"text-purple-400/80 font-semibold text-sm",children:[a," proxy scope"]}),r&&g.jsx("span",{className:"text-[#888] text-[13px]",children:Xr(r,50)})]})}function p7({args:e}){const t=e.parent_id;return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:"listing sitemap"}),t&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["under #",Xr(String(t),20)]})]})}function g7({args:e}){const t=e.entry_id;return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:"viewing sitemap entry"}),t&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["#",Xr(String(t),20)]})]})}function b7(e){switch(e.toolName){case"list_requests":return g.jsx(c7,{...e});case"view_request":return g.jsx(u7,{...e});case"send_request":return g.jsx(d7,{...e});case"repeat_request":return g.jsx(f7,{...e});case"scope_rules":return g.jsx(m7,{...e});case"list_sitemap":return g.jsx(p7,{...e});case"view_sitemap_entry":return g.jsx(g7,{...e});default:return g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:e.toolName.replace(/_/g," ")})}}function x7({args:e}){const t=e.thought??e.content??"";return t?g.jsxs("div",{children:[g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:"Agent is thinking"}),g.jsx("div",{className:"mt-1.5 italic text-[#888]",children:g.jsx(Ln,{text:t,maxLines:20})})]}):null}function y7({toolName:e,args:t}){if(e==="create_agent"){const r=t.name??t.agent_name??"",a=t.task??"";return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-cyan-400/80 font-semibold text-sm",children:"spawning"}),r&&g.jsx("span",{className:"text-cyan-400 font-semibold text-sm",children:r})]}),a&&g.jsx("div",{className:"mt-1.5",children:g.jsx(Ln,{text:a,maxLines:15})})]})}if(e==="agent_finish"){const r=t.result_summary??"",a=t.success,s=t.findings,o=Array.isArray(s)?s:void 0;return g.jsxs("div",{children:[g.jsx("span",{className:`font-semibold text-sm ${a===!1?"text-red-400/80":"text-emerald-400/80"}`,children:a===!1?"Agent failed":"Agent completed"}),r&&g.jsx("div",{className:"mt-1.5",children:g.jsx(Ln,{text:r,maxLines:20})}),o&&o.length>0&&g.jsx("div",{className:"mt-1.5 space-y-0.5",children:o.map((c,d)=>g.jsxs("div",{className:"text-[13px] text-[#888]",children:[g.jsx("span",{className:"text-red-400/50 mr-1",children:"•"}),typeof c=="string"?c:JSON.stringify(c)]},d))})]})}if(e==="send_message_to_agent"){const r=t.message??"",a=t.target_agent_id??t.agent_id??"";return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-cyan-400/80 font-semibold text-sm",children:"message"}),a&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["to ",a.slice(0,16)]})]}),r&&g.jsx("div",{className:"mt-1.5",children:g.jsx(Ln,{text:r,maxLines:20})})]})}if(e==="wait_for_message"){const r=t.reason??"";return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-cyan-400/80 font-semibold text-sm",children:"waiting"}),r&&g.jsx("span",{className:"text-[#888] text-[13px] truncate",children:r})]})}if(e==="stop_agent"){const r=t.target_agent_id??"",a=t.cascade!==!1,s=t.reason??"";return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[g.jsx("span",{className:"text-red-400/80 font-semibold text-sm",children:"stopping"}),r&&g.jsx("span",{className:"text-[#888] text-[13px]",children:r.slice(0,16)}),a&&g.jsx("span",{className:"text-[#555] text-[13px] italic",children:"+ descendants"})]}),s&&g.jsx("div",{className:"mt-1.5 text-[#888] text-[13px]",children:s})]})}return e==="view_agent_graph"?g.jsx("span",{className:"text-cyan-400/80 font-semibold text-sm",children:"viewing agents graph"}):g.jsx("span",{className:"text-cyan-400/80 font-semibold text-sm",children:e.replace(/_/g," ")})}function v7({args:e,result:t}){const r=e.query??e.search_query??"",a=t,s=a?a.content??null:null,o=a&&!a.success?a.message??null:null;return g.jsxs("div",{children:[g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"Searching the web"}),r&&g.jsx("div",{className:"text-[#888] text-[13px] mt-0.5",children:r}),o&&g.jsx("div",{className:"text-red-400/70 text-[13px] mt-1.5",children:o}),s&&g.jsx("div",{className:"mt-2",children:g.jsx(Ln,{text:s,maxLines:15})})]})}const _7=50,s_=200,l_=25,o_=24,w7=/\x1b(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~]|\][^\x07]*\x07)/g,E7=/\.\.\. \[(stdout|stderr|result|output|error) truncated at \d+k? chars\]/g;function N7(e){return e.replace(w7,"")}function Rm(e){const t=N7(e);return t.length>s_?t.slice(0,s_-3)+"...":t}function S7(e){return e.replace(E7,"").trim()}function k7(e){const t=e.split(` -`);if(t.length<=_7)return t.map(Rm).join(` +... more content available`:"")})})()]})}function h7({args:e,result:t}){const r=(e.method??"GET").toUpperCase(),a=e.url??"",s=e.headers,o=e.body,c=typeof o=="string"?o:"",d=t,f=d?d.error??null:null,h=d?d.status_code??null:null,m=d?d.response_time_ms??null:null,p=d?d.body:null,y=typeof p=="string"?p:null;return g.jsxs("div",{children:[g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:"request"}),g.jsxs("div",{className:"mt-1.5 font-mono text-[13px] space-y-0.5",children:[g.jsxs("div",{children:[g.jsx("span",{className:"text-[#555] select-none mr-1",children:">>"}),g.jsx("span",{className:`font-bold ${WN[r]??"text-[#888]"}`,children:r}),g.jsx("span",{className:"text-[#888] ml-1 break-all",children:Xr(a,180)})]}),s&&typeof s=="object"&&Object.entries(s).slice(0,5).map(([x,_])=>g.jsxs("div",{className:"text-[#555] pl-5",children:[x,": ",mp(String(_),150)]},x))]}),c&&g.jsx(wi,{className:"text-[#888]",children:pp(c,4)}),f&&g.jsx("div",{className:"text-red-400/70 text-[13px] mt-1.5",children:mp(f,150)}),h!=null&&g.jsxs("div",{className:"font-mono text-[13px] mt-1.5",children:[g.jsx("span",{className:"text-[#555] select-none mr-1",children:"<<"}),g.jsx("span",{className:`font-bold ${dg(h)}`,children:h}),m!=null&&g.jsxs("span",{className:"text-[#555] ml-2",children:[m,"ms"]})]}),y&&g.jsx(wi,{className:"text-[#666]",children:pp(y,6)})]})}function m7({args:e,result:t}){const r=e.request_id,a=e.modifications,s=t,o=s?s.status_code??null:null,c=s?s.response_time_ms??null:null,d=s?s.body:null,f=typeof d=="string"?d:null;return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:"repeating request"}),r!=null&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["#",r]})]}),a&&typeof a=="object"&&Object.keys(a).length>0&&g.jsx("div",{className:"mt-1.5 font-mono text-[13px] space-y-0.5",children:Object.entries(a).slice(0,5).map(([h,m])=>g.jsxs("div",{children:[g.jsxs("span",{className:"text-orange-400/60",children:[h,":"]})," ",g.jsx("span",{className:"text-[#777]",children:mp(typeof m=="string"?m:JSON.stringify(m),150)})]},h))}),o!=null&&g.jsxs("div",{className:"font-mono text-[13px] mt-1.5",children:[g.jsx("span",{className:"text-[#555] select-none mr-1",children:"<<"}),g.jsx("span",{className:`font-bold ${dg(o)}`,children:o}),c!=null&&g.jsxs("span",{className:"text-[#555] ml-2",children:[c,"ms"]})]}),f&&g.jsx(wi,{className:"text-[#666]",children:pp(f,5)})]})}const p7={get:"getting",list:"listing",create:"creating",update:"updating",delete:"deleting"};function g7({args:e}){const t=e.action??"",r=e.scope_name??"",a=p7[t]??(t||"managing");return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("span",{className:"text-purple-400/80 font-semibold text-sm",children:[a," proxy scope"]}),r&&g.jsx("span",{className:"text-[#888] text-[13px]",children:Xr(r,50)})]})}function b7({args:e}){const t=e.parent_id;return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:"listing sitemap"}),t&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["under #",Xr(String(t),20)]})]})}function x7({args:e}){const t=e.entry_id;return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:"viewing sitemap entry"}),t&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["#",Xr(String(t),20)]})]})}function y7(e){switch(e.toolName){case"list_requests":return g.jsx(d7,{...e});case"view_request":return g.jsx(f7,{...e});case"send_request":return g.jsx(h7,{...e});case"repeat_request":return g.jsx(m7,{...e});case"scope_rules":return g.jsx(g7,{...e});case"list_sitemap":return g.jsx(b7,{...e});case"view_sitemap_entry":return g.jsx(x7,{...e});default:return g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:e.toolName.replace(/_/g," ")})}}function v7({args:e}){const t=e.thought??e.content??"";return t?g.jsxs("div",{children:[g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:"Agent is thinking"}),g.jsx("div",{className:"mt-1.5 italic text-[#888]",children:g.jsx(zn,{text:t,maxLines:20})})]}):null}function _7({toolName:e,args:t}){if(e==="create_agent"){const r=t.name??t.agent_name??"",a=t.task??"";return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-cyan-400/80 font-semibold text-sm",children:"spawning"}),r&&g.jsx("span",{className:"text-cyan-400 font-semibold text-sm",children:r})]}),a&&g.jsx("div",{className:"mt-1.5",children:g.jsx(zn,{text:a,maxLines:15})})]})}if(e==="agent_finish"){const r=t.result_summary??"",a=t.success,s=t.findings,o=Array.isArray(s)?s:void 0;return g.jsxs("div",{children:[g.jsx("span",{className:`font-semibold text-sm ${a===!1?"text-red-400/80":"text-emerald-400/80"}`,children:a===!1?"Agent failed":"Agent completed"}),r&&g.jsx("div",{className:"mt-1.5",children:g.jsx(zn,{text:r,maxLines:20})}),o&&o.length>0&&g.jsx("div",{className:"mt-1.5 space-y-0.5",children:o.map((c,d)=>g.jsxs("div",{className:"text-[13px] text-[#888]",children:[g.jsx("span",{className:"text-red-400/50 mr-1",children:"•"}),typeof c=="string"?c:JSON.stringify(c)]},d))})]})}if(e==="send_message_to_agent"){const r=t.message??"",a=t.target_agent_id??t.agent_id??"";return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-cyan-400/80 font-semibold text-sm",children:"message"}),a&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["to ",a.slice(0,16)]})]}),r&&g.jsx("div",{className:"mt-1.5",children:g.jsx(zn,{text:r,maxLines:20})})]})}if(e==="wait_for_message"){const r=t.reason??"";return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-cyan-400/80 font-semibold text-sm",children:"waiting"}),r&&g.jsx("span",{className:"text-[#888] text-[13px] truncate",children:r})]})}if(e==="stop_agent"){const r=t.target_agent_id??"",a=t.cascade!==!1,s=t.reason??"";return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[g.jsx("span",{className:"text-red-400/80 font-semibold text-sm",children:"stopping"}),r&&g.jsx("span",{className:"text-[#888] text-[13px]",children:r.slice(0,16)}),a&&g.jsx("span",{className:"text-[#555] text-[13px] italic",children:"+ descendants"})]}),s&&g.jsx("div",{className:"mt-1.5 text-[#888] text-[13px]",children:s})]})}return e==="view_agent_graph"?g.jsx("span",{className:"text-cyan-400/80 font-semibold text-sm",children:"viewing agents graph"}):g.jsx("span",{className:"text-cyan-400/80 font-semibold text-sm",children:e.replace(/_/g," ")})}function w7({args:e,result:t}){const r=e.query??e.search_query??"",a=t,s=a?a.content??null:null,o=a&&!a.success?a.message??null:null;return g.jsxs("div",{children:[g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"Searching the web"}),r&&g.jsx("div",{className:"text-[#888] text-[13px] mt-0.5",children:r}),o&&g.jsx("div",{className:"text-red-400/70 text-[13px] mt-1.5",children:o}),s&&g.jsx("div",{className:"mt-2",children:g.jsx(zn,{text:s,maxLines:15})})]})}const E7=50,s_=200,l_=25,o_=24,N7=/\x1b(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~]|\][^\x07]*\x07)/g,S7=/\.\.\. \[(stdout|stderr|result|output|error) truncated at \d+k? chars\]/g;function k7(e){return e.replace(N7,"")}function Rm(e){const t=k7(e);return t.length>s_?t.slice(0,s_-3)+"...":t}function C7(e){return e.replace(S7,"").trim()}function T7(e){const t=e.split(` +`);if(t.length<=E7)return t.map(Rm).join(` `);const r=t.length-l_-o_;return[...t.slice(0,l_).map(Rm),`... ${r} lines truncated ...`,...t.slice(-o_).map(Rm)].join(` -`)}function T7({args:e,result:t}){const r=e.action??"",a=e.code??e.script??"",s=t;let o=null;s&&typeof s=="object"?o=typeof s.stdout=="string"?s.stdout:null:typeof s=="string"&&(o=s);const c=r==="new_session"?"new session":r==="close"?"close session":r==="list_sessions"?"list sessions":null,d=o?k7(S7(o)):null;return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-yellow-400/80 font-semibold text-sm",children:"Python"}),c&&g.jsx("span",{className:"text-[#888] text-[13px]",children:c})]}),a&&g.jsx(cg,{code:a,language:"python",collapsible:!0}),d&&g.jsx(wi,{className:"text-[#666]",children:d})]})}function C7({args:e}){const t=e.targets,a=(Array.isArray(t)?t:[]).map(s=>typeof s=="object"&&s?s.original??null:null).filter(Boolean);return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-emerald-400/80 font-semibold text-sm",children:"Starting penetration test"}),a.length===1&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["on ",a[0]]})]}),a.length>1&&g.jsx("div",{className:"mt-1.5 space-y-0.5",children:a.map((s,o)=>g.jsxs("div",{className:"text-[13px] text-[#888]",children:[g.jsx("span",{className:"text-[#555] mr-1",children:"•"}),s]},o))})]})}function A7({args:e}){const t=e.name??"Unknown Agent",r=e.task??"";return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-[#888] text-[13px]",children:"subagent"}),g.jsx("span",{className:"text-purple-400 font-semibold text-sm",children:t})]}),r&&g.jsx("div",{className:"mt-1.5",children:g.jsx(Ln,{text:r,maxLines:15})})]})}function M7(e){return e.toolName==="subagent_start_info"?g.jsx(A7,{...e}):g.jsx(C7,{...e})}function O7({args:e}){const t=e.executive_summary??"",r=e.methodology??"",a=e.technical_analysis??"",s=e.recommendations??"";return g.jsxs("div",{className:"space-y-3",children:[g.jsx("span",{className:"text-emerald-400/80 font-semibold text-sm",children:"Penetration test completed"}),t&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Executive Summary"}),g.jsx("div",{className:"mt-1",children:g.jsx(Ln,{text:t,maxLines:25})})]}),r&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Methodology"}),g.jsx("div",{className:"mt-1",children:g.jsx(Ln,{text:r,maxLines:25})})]}),a&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Technical Analysis"}),g.jsx("div",{className:"mt-1",children:g.jsx(Ln,{text:a,maxLines:25})})]}),s&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Recommendations"}),g.jsx("div",{className:"mt-1",children:g.jsx(Ln,{text:s,maxLines:25})})]}),!t&&!r&&!a&&!s&&g.jsx("div",{className:"text-[#555] text-xs",children:"Generating final report..."})]})}function R7({toolName:e,args:t,result:r}){if(e==="create_note"){const a=t.title??"",s=t.content??"",o=t.category??"general";return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"note"}),g.jsxs("span",{className:"text-[#555] text-[13px]",children:["(",o,")"]})]}),a&&g.jsx("div",{className:"mt-1.5 text-[#999] text-[13px]",children:a}),s&&g.jsx("div",{className:"mt-1",children:g.jsx($s,{text:s})})]})}if(e==="delete_note")return g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"note removed"});if(e==="update_note"){const a=t.title??"",s=t.content??"";return g.jsxs("div",{children:[g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"note updated"}),a&&g.jsx("div",{className:"mt-1.5 text-[#999] text-[13px]",children:a}),s&&g.jsx("div",{className:"mt-1",children:g.jsx($s,{text:s})})]})}if(e==="get_note"){const a=r,s=a&&typeof a=="object"&&a.success?a.note:void 0;return g.jsxs("div",{children:[g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"note read"}),s&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"mt-1.5 text-[#999] text-[13px]",children:[s.title??"(untitled)",g.jsxs("span",{className:"text-[#555] ml-1",children:["(",s.category??"general",")"]})]}),s.content&&g.jsx("div",{className:"mt-1",children:g.jsx($s,{text:s.content})})]})]})}if(e==="list_notes"){const a=r;let s=[];if(a&&typeof a=="object"&&a.success){const o=a.notes;s=Array.isArray(o)?o:[]}return g.jsxs("div",{children:[g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"notes"}),s.length>0?g.jsx("div",{className:"mt-1.5 space-y-0.5",children:s.map((o,c)=>g.jsxs("div",{className:"text-[13px]",children:[g.jsx("span",{className:"text-[#555] mr-1",children:"-"}),g.jsx("span",{className:"text-[#999]",children:o.title??"(untitled)"}),g.jsxs("span",{className:"text-[#555] ml-1",children:["(",o.category??"general",")"]}),o.content&&g.jsx("div",{className:"ml-3",children:g.jsx($s,{text:o.content})})]},c))}):g.jsx("div",{className:"mt-1 text-[#555] text-xs",children:"No notes"})]})}return g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"note"})}const D7={create_todo:{label:"Task added",Icon:qT},list_todos:{label:"Plan",Icon:$k},update_todo:{label:"Task updated",Icon:BT},mark_todo_done:{label:"Task completed",Icon:M_},mark_todo_pending:{label:"Task reopened",Icon:ZT},delete_todo:{label:"Task removed",Icon:cC}};function j7({status:e}){return e==="done"?g.jsx(M_,{className:"w-3.5 h-3.5 text-emerald-400/70 shrink-0"}):e==="in_progress"?g.jsx(Jk,{className:"w-3.5 h-3.5 text-purple-400/70 shrink-0 animate-pulse"}):g.jsx(tT,{className:"w-3.5 h-3.5 text-[#444] shrink-0"})}function L7({todos:e,highlightId:t}){return g.jsx("div",{className:"space-y-0",children:e.map((r,a)=>{const s=r.status??"pending",o=t&&r.id===t;return g.jsxs("div",{className:`flex items-start gap-2.5 py-1.5 px-2 -mx-2 rounded-md transition-colors ${o?"bg-purple-500/[0.08]":""}`,children:[g.jsx("div",{className:"mt-[1px]",children:g.jsx(j7,{status:s})}),g.jsx("span",{className:`text-[13px] leading-snug ${s==="done"?"text-[#555] line-through":s==="in_progress"?"text-[#bbb]":"text-[#999]"}`,children:r.title??"(untitled)"})]},r.id??a)})})}function z7({toolName:e,args:t,result:r}){const a=D7[e]??{label:"Plan",Icon:VT},s=a.Icon,o=r;if(typeof o=="string"&&o.trim())return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(s,{className:"w-3.5 h-3.5 text-purple-400/60"}),g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:a.label})]}),g.jsx("div",{className:"mt-1.5 text-[#888] text-[13px]",children:o.trim()})]});let c=[],d=null,f;if(o&&typeof o=="object"){if(d=o.error??null,o.success){const m=o.todos;c=Array.isArray(m)?m:[]}f=o.id??t.todo_id??void 0}const h=e!=="list_todos"?f:void 0;return c.length===0&&!d?g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(s,{className:"w-3.5 h-3.5 text-purple-400/60"}),g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:a.label})]}):g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[g.jsx(s,{className:"w-3.5 h-3.5 text-purple-400/60"}),g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:a.label})]}),d&&g.jsx("div",{className:"text-red-400/70 text-[13px] mb-2",children:d}),c.length>0&&g.jsx("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.015] px-3 py-2",children:g.jsx(L7,{todos:c,highlightId:h})})]})}function c_(e){if(e==null)return null;if(typeof e=="string")return e.trim()?e:null;if(typeof e=="object"){const t=e;if(typeof t.__raw=="string")return t.__raw;if(Object.keys(t).length===0)return null;try{return JSON.stringify(e,null,2)}catch{return String(e)}}return String(e)}function WN({toolName:e,args:t,result:r}){const a=c_(t),s=c_(r);return g.jsxs("div",{children:[g.jsx("span",{className:"text-[#888] font-semibold text-sm",children:e.replace(/_/g," ")}),a&&g.jsx(wi,{className:"text-[#777]",children:a}),s&&g.jsx(wi,{className:"text-[#666]",children:s})]})}function I7({args:e}){const t=e.skills,r=(Array.isArray(t)?t:String(t??"").split(",")).map(a=>String(a).trim()).filter(Boolean);return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-emerald-400/80 font-semibold text-sm",children:"Loading skill"}),r.length>0&&g.jsx("span",{className:"text-[#888] text-[13px]",children:r.join(", ")})]})}const ad={terminal:{renderer:KB,icon:z_,color:"text-emerald-400"},python:{renderer:T7,icon:iT,color:"text-yellow-400"},browser:{renderer:QB,icon:j_,color:"text-blue-400"},filesystem:{renderer:WB,icon:fT,color:"text-sky-400"},proxy:{renderer:b7,icon:k_,color:"text-purple-400",match:/request|sitemap|scope/},reporting:{renderer:o7,icon:eC,color:"text-red-400"},thinking:{renderer:x7,icon:C_,color:"text-purple-400"},agents:{renderer:y7,icon:Ao,color:"text-cyan-400",match:/agent/},search:{renderer:v7,icon:WT,color:"text-amber-400"},lifecycle:{renderer:M7,icon:D_,color:"text-emerald-400"},notes:{renderer:R7,icon:sC,color:"text-amber-400",match:/note/},skills:{renderer:I7,icon:Bm,color:"text-emerald-400"},todos:{renderer:z7,icon:AT,color:"text-purple-400",match:/todo/},telemetry:{renderer:WN,icon:Bm,color:"text-[#555]"}},B7={terminal:["exec_command","write_stdin","terminal_execute"],python:["python_action"],browser:["browser_action"],filesystem:["apply_patch","view_image","str_replace_editor","list_files","search_files"],proxy:["list_requests","view_request","repeat_request","list_sitemap","view_sitemap_entry","scope_rules","send_request"],reporting:["create_vulnerability_report"],thinking:["think"],agents:["create_agent","agent_finish","send_message_to_agent","wait_for_message","view_agent_graph","stop_agent"],search:["web_search"],lifecycle:["scan_start_info","subagent_start_info","finish_scan"],notes:["create_note","delete_note","update_note","list_notes","get_note"],skills:["load_skill"],todos:["create_todo","list_todos","update_todo","mark_todo_done","mark_todo_pending","delete_todo"],telemetry:["sandbox_error_details","llm_error_details"]},U7=Object.fromEntries(Object.entries(B7).flatMap(([e,t])=>t.map(r=>[r,e]))),H7={finish_scan:O7,apply_patch:a7,view_image:s7},$7={agent_finish:{icon:D_,color:"text-cyan-400"},send_message_to_agent:{icon:ny,color:"text-cyan-400"},wait_for_message:{icon:ny,color:"text-cyan-400"},view_agent_graph:{icon:uT,color:"text-cyan-400"},stop_agent:{icon:T_,color:"text-red-400"},scan_start_info:{icon:lT,color:"text-emerald-400"},subagent_start_info:{icon:Ao,color:"text-purple-400"},view_image:{icon:ST,color:"text-sky-400"}},q7=ad.telemetry;function JN(e){var r;const t=U7[e];if(t)return t;for(const[a,s]of Object.entries(ad))if((r=s.match)!=null&&r.test(e))return a;return null}function P7(e){const t=H7[e];if(t)return t;const r=JN(e);return r?ad[r].renderer:WN}function F7(e){const t=$7[e];if(t)return t;const r=JN(e),a=r?ad[r]:q7;return{icon:a.icon,color:a.color}}const G7=30;function V7({role:e,content:t}){const r=e==="user"||e==="human";return g.jsxs("div",{children:[g.jsx("span",{className:`font-semibold text-sm ${r?"text-blue-400/80":"text-purple-400/80"}`,children:r?"User":"Thinking"}),g.jsx("div",{className:"mt-1.5 italic text-[#888]",children:g.jsx(Ln,{text:t,maxLines:G7})})]})}class Y7 extends ee.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?g.jsx("span",{className:"text-[#555] font-semibold text-sm",children:this.props.toolName.replace(/_/g," ")}):this.props.children}}function X7(e){const t=P7(e.toolName);return g.jsx(Y7,{toolName:e.toolName,children:g.jsx(t,{...e})})}function eS(e){if(e==null||typeof e!="string")return e;const t=e.trim();if(!t)return e;try{return JSON.parse(t)}catch{}try{const r=t.replace(/\bNone\b/g,"null").replace(/\bTrue\b/g,"true").replace(/\bFalse\b/g,"false").replace(/'/g,'"');return JSON.parse(r)}catch{return{__raw:e}}}function tS(e){const t=eS(e);return t&&typeof t=="object"&&!Array.isArray(t)?t:t==null?{}:{__raw:typeof t=="string"?t:JSON.stringify(t)}}function u_(e){const t=/(\d+)$/.exec(e);return t?parseInt(t[1],10):0}function fg(e){var r;const t=(r=e.data)==null?void 0:r.role;return e.type==="chat"&&(t==="user"||t==="human")}function K7(e){var t;return fg(e)&&String(((t=e.data)==null?void 0:t.content)??"").startsWith("[Message from ")}function Z7(e){const t=new Set;let r=!1;for(const a of e)if(fg(a)){if(K7(a)){t.add(a.id);continue}r||(r=!0,t.add(a.id))}return t}const Q7={completed:"text-emerald-400 border-emerald-500/30 bg-emerald-500/10",running:"text-blue-400 border-blue-500/30 bg-blue-500/10",waiting:"text-yellow-400 border-yellow-500/30 bg-yellow-500/10",stopped:"text-[#aaa] border-[#333] bg-[#1a1a1a]",crashed:"text-red-400 border-red-500/30 bg-red-500/10",failed:"text-red-400 border-red-500/30 bg-red-500/10"};function W7(e){return e==="completed"?"completed":e==="running"?"running":e==="failed"||e==="crashed"?"failed":e}function J7(e,t){var d;const r=new Map;for(const f of e)if(f.parent_id){const h=r.get(f.parent_id)??[];h.push(f.id),r.set(f.parent_id,h)}const a=new Map,s=new Map,o=new Map;for(const f of t)if(f.type==="tool"){if(a.set(f.agent_id,(a.get(f.agent_id)??0)+1),((d=f.data)==null?void 0:d.tool_name)==="create_agent"){const h=tS(f.data.args),m=h.name??h.agent_name??"",p=h.task??"";m&&p&&o.set(m,p)}}else fg(f)||s.set(f.agent_id,(s.get(f.agent_id)??0)+1);const c=new Map;for(const f of e)c.set(f.id,{id:f.id,name:f.name,task:o.get(f.name)??"",status:W7(f.status),parentId:f.parent_id,children:r.get(f.id)??[],createdAt:f.created_at,toolCount:a.get(f.id)??0,messageCount:s.get(f.id)??0});return c}function eU({agent:e,events:t,showHeader:r=!0}){const a=ee.useMemo(()=>{const c=t.filter(f=>f.agent_id===e.id).sort((f,h)=>u_(f.id)-u_(h.id)),d=Z7(c);return c.filter(f=>!d.has(f.id))},[t,e.id]),s=a.filter(c=>c.type==="tool").length,o=a.length-s;return g.jsxs("div",{children:[r&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[g.jsx("span",{className:"text-base font-semibold text-white truncate",children:e.name}),g.jsx("span",{className:`flex-shrink-0 text-xs font-medium capitalize px-2 py-0.5 rounded-full border ${Q7[e.status]??"text-[#aaa] border-[#333] bg-[#1a1a1a]"}`,children:e.status}),g.jsx("span",{className:"font-mono text-xs text-[#555]",children:e.id})]}),g.jsxs("p",{className:"text-xs text-[#666] mb-4",children:[o," message",o===1?"":"s"," · ",s," tool call",s===1?"":"s"]})]}),a.length===0?g.jsx("p",{className:"text-sm text-[#666]",children:"No recorded activity for this agent."}):g.jsx("div",{className:"py-1",children:a.map((c,d)=>{var N,S,w,k,E,M;const f=d===a.length-1,h=c.type==="tool",m=h?String(((N=c.data)==null?void 0:N.tool_name)??"tool"):"",p=h?"":String(((S=c.data)==null?void 0:S.role)??"assistant");let y,x;if(h){const I=F7(m);y=I.icon,x=I.color}else{const I=p==="user"||p==="human";y=I?Ao:C_,x=I?"text-blue-400":"text-purple-400"}const _=h?String(((w=c.data)==null?void 0:w.status)??"completed"):"completed";return g.jsxs("div",{className:"flex gap-3",children:[g.jsxs("div",{className:"flex flex-col items-center shrink-0",children:[g.jsx("div",{className:`w-[30px] h-[30px] rounded-full bg-black border flex items-center justify-center shrink-0 ${h&&_==="running"?"border-blue-500/40 animate-pulse":h&&_==="failed"?"border-red-500/30":"border-[#222]"}`,children:g.jsx(y,{className:`w-3.5 h-3.5 ${x}`})}),!f&&g.jsx("div",{className:"w-px flex-1 bg-[#1a1a1a] mt-1"})]}),g.jsx("div",{className:"flex-1 min-w-0 pt-[5px] pb-6",children:h?g.jsx(X7,{toolName:m,args:tS((k=c.data)==null?void 0:k.args),result:eS((E=c.data)==null?void 0:E.result)??null,status:_}):g.jsx(V7,{role:p,content:String(((M=c.data)==null?void 0:M.content)??"")})})]},c.id)})})]})}class Iu extends Error{constructor(t){super(t),this.name="RunParseError"}}const tU=["critical","high","medium","low"];function nU(e){const t=String(e??"").toLowerCase().trim();return tU.includes(t)?t:"low"}function rU(e){if(typeof e=="string"&&e.trim()){const t=e.trim().replace(" UTC","Z").replace(" ","T"),r=new Date(t);if(!Number.isNaN(r.getTime()))return r.toISOString();const a=new Date(e);if(!Number.isNaN(a.getTime()))return a.toISOString()}return new Date().toISOString()}function Ot(e){return typeof e=="string"&&e.length>0?e:null}function iU(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function nS(e,t){try{return JSON.parse(e)}catch{throw new Iu(`${t} isn't valid JSON. Make sure you selected a Strix run directory.`)}}function aU(e){const t=nS(e,"run.json");if(!t||typeof t!="object"||Array.isArray(t))throw new Iu("run.json is not an object.");const r=t,a=[],s=r.targets_info;if(Array.isArray(s)){for(const x of s)if(x&&typeof x=="object"){const _=x.original;typeof _=="string"&&_&&a.push(_)}}const o=Ot(r.start_time),c=Ot(r.end_time);let d=null;if(o&&c){const x=new Date(o).getTime(),_=new Date(c).getTime();!Number.isNaN(x)&&!Number.isNaN(_)&&_>=x&&(d=Math.round((_-x)/1e3))}let f=null,h=null,m=null,p=null;const y=r.scan_results;if(y&&typeof y=="object"){const x=y;f=Ot(x.executive_summary),h=Ot(x.technical_analysis),m=Ot(x.methodology),p=Ot(x.recommendations)}return{runId:Ot(r.run_id),runName:Ot(r.run_name),targets:a,scanMode:Ot(r.scan_mode),status:Ot(r.status),startTime:o,endTime:c,durationSeconds:d,executiveSummary:f,technicalAnalysis:h,methodology:m,recommendations:p}}function sU(){return{pr_review_id:null,cve:null,cvss:null,potential_risk_saving:null,risk_saving_description:null,impact:null,endpoint:null,method:null,target:null,technical_analysis:null,poc_description:null,poc_script_code:null,code_diff:null,code_file:null,code_before:null,code_after:null,cwe:null,code_locations:null,remediation_steps:null,fix_pr_body:null,evidence:null,assumptions:null,fix_effort:null,cvss_breakdown:null,status_changed_at:null,status_changed_by:null,status_note:null,snoozed_until:null,reopened_at:null,reopened_by:null,original_severity:null,severity_changed_at:null,severity_changed_by:null,severity_override_reason:null,retest_of_vulnerability_id:null}}function lU(e,t,r){const a=e.cwe,s=typeof a=="string"&&a.trim()?[a.trim()]:Array.isArray(a)?a.filter(c=>typeof c=="string"&&c):null;return{...sU(),id:Ot(e.id)??`vuln-${t+1}`,scan_id:r,title:Ot(e.title)??"Untitled finding",description:Ot(e.description)??"",severity:nU(e.severity),status:"open",created_at:rU(e.timestamp),cve:Ot(e.cve),cvss:iU(e.cvss),impact:Ot(e.impact),endpoint:Ot(e.endpoint),method:Ot(e.method),target:Ot(e.target),technical_analysis:Ot(e.technical_analysis),poc_description:Ot(e.poc_description),poc_script_code:Ot(e.poc_script_code),cwe:s,code_locations:Array.isArray(e.code_locations)?e.code_locations:null,remediation_steps:Ot(e.remediation_steps),fix_pr_body:Ot(e.fix_pr_body),evidence:Ot(e.evidence),assumptions:Ot(e.assumptions),fix_effort:Ot(e.fix_effort)??null,cvss_breakdown:e.cvss_breakdown??null}}function oU(e,t=null){const r=nS(e,"vulnerabilities.json");if(!Array.isArray(r))throw new Iu("vulnerabilities.json is not a JSON array.");return r.map((a,s)=>{if(!a||typeof a!="object")throw new Iu(`vulnerabilities.json entry #${s+1} is not an object.`);return lU(a,s,t)})}function cU(e){const t={critical:0,high:0,medium:0,low:0};for(const r of e)t[r.severity]+=1;return t}async function Wa(e){const t=await fetch(e,{cache:"no-store"});if(!t.ok)throw new Error(`${e} responded ${t.status}`);return t.json()}function sd(e){return e?`?run=${encodeURIComponent(e)}`:""}async function rS(e){const t=await Wa("/api/run"+sd(e)),r=aU(JSON.stringify(t)),a=t.finished===!0;return{summary:r,raw:t,finished:a}}async function iS(e,t){const r=await Wa("/api/vulnerabilities"+sd(t));return oU(JSON.stringify(r),e)}async function uU(e){const t=await Wa("/api/report"+sd(e));return(t==null?void 0:t.markdown)??null}async function aS(e){const t=await Wa("/api/transcript"+sd(e));return{agents:Array.isArray(t==null?void 0:t.agents)?t.agents:[],events:Array.isArray(t==null?void 0:t.events)?t.events:[]}}async function d_(e){const{summary:t,raw:r,finished:a}=await rS(e),[s,o,c]=await Promise.all([iS(t.runId,e).catch(()=>[]),uU(e).catch(()=>null),aS(e).catch(()=>({agents:[],events:[]}))]);return{summary:t,raw:r,finished:a,vulnerabilities:s,reportMarkdown:o,transcript:c}}async function rl(e,t){const r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),cache:"no-store"});let a={};try{const s=await r.json();s&&typeof s=="object"&&(a=s)}catch{}return{ok:r.ok,status:r.status,data:a}}async function dU(){const e=await Wa("/api/runs");return{locked:(e==null?void 0:e.locked)??!0,count:typeof(e==null?void 0:e.count)=="number"?e.count:0,runs:Array.isArray(e==null?void 0:e.runs)?e.runs:[]}}async function fU(){const e=await Wa("/api/capabilities");return{can_steer:(e==null?void 0:e.can_steer)===!0}}async function hU(e,t){const{ok:r,data:a}=await rl("/api/agents/steer",{agent_id:e,message:t});return r&&a.ok===!0?{ok:!0}:{ok:!1,error:String(a.error??"unavailable")}}async function mU(e,t){const{ok:r,data:a}=await rl("/api/feedback",{message:e,email:t});return r&&a.ok===!0?{ok:!0}:{ok:!1,error:String(a.error??"unavailable")}}async function pU(){const e=await Wa("/api/auth/status");return{verified:(e==null?void 0:e.verified)===!0,email:(e==null?void 0:e.email)??null}}async function sS(e){const{ok:t,data:r}=await rl("/api/auth/otp/start",{email:e});return t&&r.ok===!0?{ok:!0}:{ok:!1,error:String(r.error??"unavailable")}}async function lS(e,t){const{ok:r,data:a}=await rl("/api/auth/otp/verify",{email:e,code:t});return r&&a.verified===!0?{verified:!0,email:String(a.email??e)}:{verified:!1,error:String(a.error??"invalid_code")}}async function gU(){await rl("/api/auth/forget",{})}async function bU(e){const{ok:t,data:r}=await rl("/api/report/send",e?{run:e}:{});return t&&r.ok===!0?{ok:!0,password:String(r.password??""),filename:String(r.filename??"strix-report.pdf")}:{ok:!1,error:String(r.error??"unavailable")}}const Is="__root__";function oS({agents:e,fixedAgentId:t,className:r}){const a=ee.useRef(null),[s,o]=ee.useState(!1),[c,d]=ee.useState(!1),[f,h]=ee.useState(""),[m,p]=ee.useState(!1),[y,x]=ee.useState(null),_=t!=null,N=ee.useMemo(()=>e.find(z=>!z.parent_id)??e[0]??null,[e]),S=ee.useMemo(()=>e.filter(z=>z.parent_id&&z.status==="running"),[e]),[w,k]=ee.useState(Is),[E,M]=ee.useState(!1);ee.useEffect(()=>{w!==Is&&!S.some(z=>z.id===w)&&k(Is)},[w,S]);const{targetId:I,targetName:R}=ee.useMemo(()=>{if(_){const V=e.find(P=>P.id===t)??null;return{targetId:t??null,targetName:(V==null?void 0:V.name)??"this agent"}}if(w===Is)return{targetId:(N==null?void 0:N.id)??null,targetName:"Root agent"};const z=e.find(V=>V.id===w)??null;return{targetId:(z==null?void 0:z.id)??(N==null?void 0:N.id)??null,targetName:(z==null?void 0:z.name)??"Root agent"}},[e,t,_,N,w]),U=f.trim().length===0;ee.useLayoutEffect(()=>{const z=a.current;z&&(z.style.height="auto",z.style.height=`${z.scrollHeight}px`)},[f]);const B=ee.useCallback(()=>{o(!0),requestAnimationFrame(()=>{var z;return(z=a.current)==null?void 0:z.focus()})},[]),Z=ee.useCallback(()=>{o(!1),d(!1),M(!1)},[]),D=ee.useCallback(async()=>{if(m)return;const z=f.trim();if(!z||!I)return;p(!0),x(null);const V=R,P=await hU(I,z);p(!1),P.ok?(h(""),x(`Sent to ${V}`),Cr("agent_steered")):P.error==="not_delivered"?x("Could not reach that agent (it may have finished)."):x("Could not send that message. Try again.")},[m,f,I,R]);return s?g.jsxs("div",{className:Mr("mt-4 rounded-2xl border border-white/[0.08] bg-[#050505] overflow-hidden transition-colors duration-300",c?"border-white/[0.18]":"hover:border-white/[0.12]",r),children:[g.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-white/[0.06] px-5 py-3",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Im,{className:"h-4 w-4 text-[#666]"}),g.jsx("p",{className:"text-sm font-medium text-white",children:"Live prompt"})]}),g.jsx("p",{className:"mt-0.5 text-xs text-[#777]",children:"Connected"})]}),g.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[_?g.jsxs("div",{className:"rounded-full border border-white/[0.08] bg-white/[0.03] px-3 py-1 text-xs text-[#aaa]",children:["Target: ",g.jsx("span",{className:"text-white",children:R})]}):g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Target:"}),g.jsxs("div",{className:"relative",children:[g.jsxs("button",{type:"button",onClick:()=>M(z=>!z),onBlur:()=>requestAnimationFrame(()=>M(!1)),className:"inline-flex h-7 items-center gap-1 rounded-full border border-white/[0.08] bg-white/[0.03] px-3 text-xs text-white transition-colors hover:border-white/[0.16] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-haspopup":"listbox","aria-expanded":E,children:[g.jsx("span",{className:"max-w-[140px] truncate",children:R}),g.jsx(ho,{className:"h-3.5 w-3.5 text-[#999]"})]}),E&&g.jsxs("div",{className:"absolute right-0 z-10 mt-1 min-w-[160px] overflow-hidden rounded-lg border border-[#333] bg-[#0a0a0a] py-1 shadow-xl",role:"listbox",children:[g.jsx(f_,{label:"Root agent",active:w===Is,onSelect:()=>{k(Is),M(!1)}}),S.map(z=>g.jsx(f_,{label:z.name,active:w===z.id,onSelect:()=>{k(z.id),M(!1)}},z.id))]})]})]}),g.jsx("button",{type:"button",onClick:Z,className:"inline-flex h-7 w-7 items-center justify-center rounded-full text-[#777] transition-colors hover:bg-white/[0.06] hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Collapse live prompt composer",children:g.jsx(ho,{className:"h-4 w-4"})})]})]}),g.jsx("div",{className:"px-5 pt-4 pb-3",children:g.jsx("textarea",{ref:a,rows:1,value:f,onChange:z=>h(z.target.value),onFocus:()=>d(!0),onBlur:()=>d(!1),onKeyDown:z=>{z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),D())},placeholder:"Send a live prompt to the running pentest…",maxLength:4e3,disabled:m,className:"block w-full resize-none border-0 bg-transparent p-0 text-[15px] leading-6 text-white placeholder:text-[#444] focus:outline-none disabled:opacity-60 max-h-[160px] overflow-y-auto"})}),g.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 pb-4",children:[g.jsx("div",{className:"text-xs text-[#666]",children:y??"Press Enter to send."}),g.jsxs("button",{type:"button",onClick:z=>{z.stopPropagation(),D()},disabled:m||U,className:Mr("inline-flex h-10 min-w-[112px] items-center justify-center gap-2 rounded-full px-4 text-sm font-medium transition-colors",m||U?"bg-white/[0.08] text-[#666]":"bg-white text-black hover:bg-neutral-200"),children:[m?g.jsx(qs,{className:"h-4 w-4 animate-spin"}):g.jsx(Rk,{className:"h-4 w-4",strokeWidth:2.5}),g.jsx("span",{children:"Send prompt"})]})]})]}):g.jsxs("button",{type:"button",onClick:B,className:Mr("mt-4 flex w-full items-center justify-between gap-3 rounded-2xl border border-white/[0.08] bg-[#050505] px-5 py-3 text-left transition-colors duration-300 hover:border-white/[0.12] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20",r),"aria-expanded":!1,"aria-label":"Expand live prompt composer",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[g.jsx(Im,{className:"h-4 w-4 shrink-0 text-[#666]"}),g.jsx("span",{className:"truncate text-sm font-medium text-white",children:"Guide the agent"})]}),g.jsx(A_,{className:"h-4 w-4 shrink-0 text-[#777]"})]})}function f_({label:e,active:t,onSelect:r}){return g.jsx("button",{type:"button",role:"option","aria-selected":t,onMouseDown:a=>{a.preventDefault(),r()},className:Mr("block w-full truncate px-3 py-1.5 text-left text-xs transition-colors hover:bg-white/[0.06]",t?"text-white":"text-[#aaa]"),children:e})}const xU={completed:"bg-emerald-400",running:"bg-blue-400",waiting:"bg-yellow-400",stopped:"bg-[#888]",crashed:"bg-red-400",failed:"bg-red-400"},yU=80;function vU({open:e,agent:t,events:r,steerable:a,onClose:s}){const o=ee.useRef(null),c=ee.useRef(!1),[d,f]=ee.useState(e),[h,m]=ee.useState(e?"open":"closed"),[p,y]=ee.useState(!1),x=ee.useRef(t);ee.useEffect(()=>{t&&(x.current=t)},[t]);const _=t??x.current;ee.useEffect(()=>{if(e){f(!0),m("open");return}m("closed");const S=setTimeout(()=>f(!1),140);return()=>clearTimeout(S)},[e]),ee.useEffect(()=>{if(!d){y(!1);return}const S=requestAnimationFrame(()=>y(!0));return()=>cancelAnimationFrame(S)},[d]);const N=ee.useCallback(()=>{const S=o.current;S&&(c.current=S.scrollHeight-S.scrollTop-S.clientHeight{const S=o.current;!S||!c.current||requestAnimationFrame(()=>{S.scrollTo({top:S.scrollHeight,behavior:"smooth"})})},[r]),ee.useEffect(()=>{if(!d)return;const S=k=>{k.key==="Escape"&&s()};document.addEventListener("keydown",S);const w=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",S),document.body.style.overflow=w}},[d,s]),!d||!_?null:g.jsx("div",{"data-state":h,className:"agent-modal fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4 sm:p-8",onClick:s,role:"dialog","aria-modal":"true","aria-label":`Agent ${_.name}`,children:g.jsxs("div",{className:"relative flex h-[60vh] w-[calc(100vw-4rem)] max-w-6xl flex-col overflow-hidden rounded-xl border border-[#222] bg-[#0a0a0a] shadow-2xl",onClick:S=>S.stopPropagation(),children:[g.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-[#222] px-5 py-3.5",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[g.jsx("span",{className:`h-2 w-2 flex-shrink-0 rounded-full ${xU[_.status]??"bg-[#888]"}`}),g.jsx("span",{className:"truncate text-sm font-semibold text-white",children:_.name}),g.jsx("span",{className:"flex-shrink-0 font-mono text-xs text-[#555]",children:_.id})]}),g.jsx("button",{type:"button",onClick:s,"aria-label":"Close",className:"flex-shrink-0 rounded-md p-1 text-[#888] transition-colors hover:bg-[#1a1a1a] hover:text-white",children:g.jsx(xp,{className:"h-4 w-4"})})]}),g.jsx("div",{ref:o,onScroll:N,className:"flex-1 overflow-y-auto p-5",children:p&&g.jsx(eU,{agent:_,events:r,showHeader:!1})}),a&&g.jsx("div",{className:"border-t border-[#222] px-5 py-3",children:g.jsx(oS,{agents:[_],fixedAgentId:_.id,className:"mt-0"})})]})})}var cS={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},h_=ua.createContext&&ua.createContext(cS),_U=["attr","size","title"];function wU(e,t){if(e==null)return{};var r,a,s=EU(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;aua.createElement(t.tag,Uu({key:r},t.attr),uS(t.child)))}function hg(e){return t=>ua.createElement(TU,Bu({attr:Uu({},e.attr)},t),uS(e.child))}function TU(e){var t=r=>{var a=e.attr,s=e.size,o=e.title,c=wU(e,_U),d=s||r.size||"1em",f;return r.className&&(f=r.className),e.className&&(f=(f?f+" ":"")+e.className),ua.createElement("svg",Bu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,a,c,{className:f,style:Uu(Uu({color:e.color||r.color},r.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),o&&ua.createElement("title",null,o),e.children)};return h_!==void 0?ua.createElement(h_.Consumer,null,r=>t(r)):t(cS)}function CU(e){return hg({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"5",cy:"6",r:"3"},child:[]},{tag:"path",attr:{d:"M5 9v12"},child:[]},{tag:"circle",attr:{cx:"19",cy:"18",r:"3"},child:[]},{tag:"path",attr:{d:"m15 9-3-3 3-3"},child:[]},{tag:"path",attr:{d:"M12 6h5a2 2 0 0 1 2 2v7"},child:[]}]})(e)}function AU(e){return hg({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.95703C15 4.58711 14.8563 4.24054 14.5949 3.97992L12.0096 1.39234C11.4879 0.86922 10.5788 0.86922 10.0571 1.39234L8 3.45119V3.32321C8 2.55068 7.37187 1.922 6.6 1.922H2.4C1.62813 1.922 1 2.55068 1 3.32321V13.5988C1 14.3713 1.62813 15 2.4 15H12.6667C13.4385 15 14.0667 14.3713 14.0667 13.5988V9.39514C14.0667 8.62261 13.4385 7.99393 12.6667 7.99393H12.5379L14.5949 5.93508C14.8553 5.67445 15 5.32602 15 4.95703ZM2.4 2.85521H6.6C6.85667 2.85521 7.06667 3.06446 7.06667 3.32228V7.99299H1.93333V3.32228C1.93333 3.06446 2.14333 2.85521 2.4 2.85521ZM1.93333 13.5979V8.92714H7.06667V14.0649H2.4C2.14333 14.0649 1.93333 13.8547 1.93333 13.5979ZM13.1333 9.39421V13.5979C13.1333 13.8547 12.9233 14.0649 12.6667 14.0649H8V8.92714H12.6667C12.9233 8.92714 13.1333 9.13638 13.1333 9.39421ZM8 7.99299V6.46287L9.5288 7.99299H8ZM13.9351 5.2737L11.3488 7.86221C11.1789 8.03223 10.8859 8.03223 10.716 7.86221L8.12973 5.2737C8.0448 5.18963 7.99813 5.07753 7.99813 4.95796C7.99813 4.83839 8.0448 4.7263 8.12973 4.64129L10.716 2.05278C10.8009 1.96777 10.9129 1.92106 11.0324 1.92106C11.1519 1.92106 11.2639 1.96777 11.3488 2.05278L13.9351 4.64129C14.02 4.72536 14.0667 4.83746 14.0667 4.95703C14.0667 5.0766 14.02 5.1887 13.9351 5.2737Z"},child:[]}]})(e)}function dS(e){return hg({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M431 320.6c-1-3.6 1.2-8.6 3.3-12.2a34 34 0 0 1 2.1-3.1A162 162 0 0 0 464 215c.3-92.2-77.5-167-173.7-167-83.9 0-153.9 57.1-170.3 132.9a160.7 160.7 0 0 0-3.7 34.2c0 92.3 74.8 169.1 171 169.1 15.3 0 35.9-4.6 47.2-7.7s22.5-7.2 25.4-8.3a26.4 26.4 0 0 1 9.3-1.7 26 26 0 0 1 10.1 2l56.7 20.1a13.5 13.5 0 0 0 3.9 1 8 8 0 0 0 8-8 13 13 0 0 0-.5-2.7z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M66.46 232a146.23 146.23 0 0 0 6.39 152.67c2.31 3.49 3.61 6.19 3.21 8s-11.93 61.87-11.93 61.87a8 8 0 0 0 2.71 7.68A8.17 8.17 0 0 0 72 464a7.3 7.3 0 0 0 2.91-.6l56.21-22a15.7 15.7 0 0 1 12 .2c18.94 7.38 39.88 12 60.83 12A159.2 159.2 0 0 0 284 432.11"},child:[]}]})(e)}const MU=[{icon:bT,label:"PR security reviews"},{icon:rC,label:"Attack surface monitoring"},{icon:yC,label:"Real-time threat intelligence"},{icon:Uk,label:"Scheduled pentesting"},{icon:pC,label:"One-click autofix"},{icon:HT,label:"Jira, Linear & Slack integrations"}];function OU({open:e,onClose:t,description:r,source:a="sidebar"}){const[s,o]=ee.useState(e),[c,d]=ee.useState(e?"open":"closed");return ee.useEffect(()=>{if(e){o(!0),d("open");return}d("closed");const f=setTimeout(()=>o(!1),200);return()=>clearTimeout(f)},[e]),ee.useEffect(()=>{if(!s)return;const f=m=>{m.key==="Escape"&&t()};document.addEventListener("keydown",f);const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",f),document.body.style.overflow=h}},[s,t]),s?g.jsx("div",{"data-state":c,className:"dialog-overlay fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4",onClick:t,role:"dialog","aria-modal":"true","aria-label":"Upgrade your plan",children:g.jsxs("div",{"data-state":c,className:"dialog-panel relative w-full max-w-md rounded-2xl border border-[#222] bg-black p-6 shadow-lg sm:rounded-lg",onClick:f=>f.stopPropagation(),children:[g.jsx("button",{type:"button",onClick:t,"aria-label":"Close",className:"absolute right-4 top-4 rounded-md p-1 text-[#888] transition-colors hover:bg-[#1a1a1a] hover:text-white",children:g.jsx(xp,{className:"h-4 w-4"})}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-lg text-white",children:"Available in Strix Cloud"}),r&&g.jsx("p",{className:"mt-2 text-base leading-relaxed text-[#e5e5e5]",children:r})]}),g.jsxs("div",{className:"space-y-4 pt-4",children:[g.jsxs("div",{className:"rounded-xl border border-[#333] bg-[#0a0a0a] p-4 sm:rounded-lg",children:[g.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[g.jsx(Im,{className:"h-4 w-4 text-blue-400"}),g.jsx("span",{className:"text-sm font-medium text-white",children:"Strix Cloud also includes"})]}),g.jsx("ul",{className:"space-y-2 text-sm text-[#888]",children:MU.map(f=>g.jsxs("li",{className:"flex items-center gap-2",children:[g.jsx(f.icon,{className:"h-3.5 w-3.5 text-[#555]"}),f.label]},f.label))})]}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("a",{href:fa($u,"upgrade_try_free"),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr("upgrade_try_free",a),className:"flex h-10 w-full items-center justify-center gap-2 rounded-lg bg-white px-4 text-sm font-semibold text-black transition-colors hover:bg-neutral-200",children:["Open Strix Cloud",g.jsx(ty,{className:"h-3.5 w-3.5"})]}),g.jsxs("a",{href:fa(NC,"upgrade_view_plans"),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr("upgrade_view_plans",a),className:"flex h-9 w-full items-center justify-center gap-1.5 rounded-lg border border-[#333] px-4 text-sm font-medium text-[#888] transition-colors hover:border-[#555] hover:text-white",children:["Learn more",g.jsx(ty,{className:"h-3 w-3"})]})]})]})]})}):null}const Dm=160,jm=260,ro=400,RU=140,p_="strix_viewer_sidebar_width",g_="strix_viewer_sidebar_collapsed";function DU(e,t){try{const r=localStorage.getItem(e),a=r?parseInt(r,10):NaN;return Number.isFinite(a)?a:t}catch{return t}}function jU({view:e,onSelectView:t,issuesCount:r,agentCount:a,runCount:s,finished:o,verified:c,email:d,onOpenEmail:f,onOpenHistory:h,onForget:m}){var z;const[p,y]=ee.useState(()=>{const V=DU(p_,jm);return Math.min(ro,Math.max(Dm,V))}),[x,_]=ee.useState(()=>{try{return localStorage.getItem(g_)==="1"}catch{return!1}}),[N,S]=ee.useState(!1),[w,k]=ee.useState(!1),[E,M]=ee.useState(null),I=ee.useRef(null),R=(V,P)=>{Dr(V,"sidebar"),M(P)},U=ee.useCallback(V=>{y(V);try{localStorage.setItem(p_,String(V))}catch{}},[]),B=ee.useCallback(V=>{_(V);try{localStorage.setItem(g_,V?"1":"0")}catch{}},[]),Z=ee.useCallback(()=>{B(!1),U(jm)},[B,U]),D=ee.useCallback(V=>{V.preventDefault(),S(!0)},[]);return ee.useEffect(()=>{if(!N||x)return;const V=C=>{const $=C.clientX;$>=Dm&&$<=ro?y($):$>ro&&y(ro)},P=C=>{const $=C.clientX;${window.removeEventListener("mousemove",V),window.removeEventListener("mouseup",P)}},[N,x,B,U]),ee.useEffect(()=>{if(!w)return;const V=P=>{I.current&&!I.current.contains(P.target)&&k(!1)};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[w]),g.jsxs(g.Fragment,{children:[x&&g.jsx("div",{className:"fixed left-0 top-0 z-40 hidden h-full w-4 cursor-pointer transition-colors hover:bg-[rgba(255,255,255,0.08)] lg:block",onClick:Z,title:"Expand sidebar"}),g.jsxs("aside",{className:Mr("sticky top-0 z-20 hidden h-screen flex-shrink-0 flex-col overflow-hidden border-r border-[rgba(255,255,255,0.08)] bg-black lg:flex",!N&&"transition-[width] duration-200 ease-out"),style:{width:x?0:p},children:[g.jsx("header",{className:"relative flex flex-col gap-1 pt-1 min-w-[160px]",children:g.jsx("div",{className:"flex flex-row py-1 px-2",children:g.jsxs("div",{className:"flex h-10 w-full flex-row items-center",children:[g.jsxs("a",{href:fa("https://app.strix.ai","logo"),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr("logo","sidebar"),className:"flex flex-1 flex-row items-center gap-2 rounded-md py-2 pl-2.5 pr-1 min-w-0 transition-colors hover:bg-[rgba(255,255,255,0.06)]",title:"Open Strix Cloud",children:[g.jsx("span",{className:"flex flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-emerald-400 to-cyan-500",style:{width:20,height:20},children:g.jsx("span",{className:"text-[10px] font-semibold text-white",children:"S"})}),g.jsxs("span",{className:"flex flex-1 flex-row items-center gap-2 min-w-0",children:[g.jsx("span",{className:"truncate min-w-0 text-[14px] font-medium text-[#ededed]",children:"Strix"}),g.jsx("span",{className:"flex h-5 flex-shrink-0 items-center rounded px-2 text-[11px] font-medium text-[#888] bg-[rgba(255,255,255,0.08)]",children:"Local"})]})]}),g.jsx("a",{href:fa("https://app.strix.ai","logo"),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr("logo","sidebar"),className:"flex flex-none items-center rounded-md px-1.5 py-2 transition-colors hover:bg-[rgba(255,255,255,0.06)]","aria-label":"Open Strix Cloud",children:g.jsx(Xk,{className:"h-4 w-4 text-[#666]"})})]})})}),g.jsx("nav",{className:"relative min-w-[160px] flex-1 overflow-y-auto overflow-x-clip scrollbar-thin pb-10 pt-2",children:g.jsxs("div",{className:"relative flex flex-col gap-px px-2",children:[g.jsx(yi,{icon:g.jsx(LU,{}),label:"Pentest Overview",active:e==="overview",onClick:()=>t("overview")}),g.jsx(yi,{icon:g.jsx(dC,{className:"h-4 w-4"}),label:"Issues",count:r>0?r:void 0,active:e==="issues",onClick:()=>t("issues")}),a>0&&g.jsx(yi,{icon:g.jsx(Ao,{className:"h-4 w-4"}),label:"Agents",count:a,active:e==="agents",onClick:()=>t("agents")}),g.jsx(yi,{icon:g.jsx(Vs,{className:"h-4 w-4"}),label:"Past runs",count:s>0?s:void 0,active:e==="history",onClick:h}),o&&g.jsx(yi,{icon:g.jsx(bp,{className:"h-4 w-4"}),label:"Export report",active:e==="email",onClick:f}),g.jsx(yi,{icon:g.jsx(dS,{className:"h-4 w-4"}),label:"Feedback & support",active:e==="feedback",onClick:()=>t("feedback")}),g.jsx("hr",{className:"mx-0 my-1 h-px w-full border-0 bg-[rgba(255,255,255,0.08)]"}),g.jsx(yi,{icon:g.jsx(CU,{className:"h-4 w-4"}),label:"PR Security Reviews",active:!1,onClick:()=>R("pr_reviews","Strix reviews every pull request and flags exploitable changes before they merge.")}),g.jsx(yi,{icon:g.jsx(AU,{className:"h-4 w-4"}),label:"Integrations",active:!1,onClick:()=>R("integrations","Sync findings to Jira, Linear, and Slack so fixes happen where your team already works.")}),g.jsx(yi,{icon:g.jsx(hC,{className:"h-4 w-4"}),label:"Members",active:!1,onClick:()=>R("members","Invite your team, set roles, and share findings and run history across your org.")})]})}),g.jsx("section",{className:"flex min-w-[160px] flex-col gap-0.5",ref:I,children:g.jsxs("div",{className:"relative p-2",children:[c&&d?g.jsxs("button",{onClick:()=>k(V=>!V),className:"relative flex w-full cursor-pointer items-center gap-2 rounded-md bg-transparent px-2.5 py-2 transition-colors hover:bg-[rgba(255,255,255,0.06)]",children:[g.jsx("span",{className:"flex flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-emerald-400 to-cyan-500",style:{width:20,height:20},children:g.jsx("span",{className:"text-[9px] font-semibold text-white",children:((z=d[0])==null?void 0:z.toUpperCase())||"U"})}),g.jsxs("span",{className:"flex min-w-0 flex-1 flex-col text-left",children:[g.jsx("span",{className:"truncate text-[13px] font-medium text-[#ededed]",children:d}),g.jsx("span",{className:"truncate text-[11px] text-[#555]",children:"Linked to this machine"})]})]}):g.jsxs("div",{className:"flex items-center gap-2 rounded-md px-2.5 py-2",children:[g.jsx("span",{className:"flex flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-emerald-400 to-cyan-500",style:{width:20,height:20},children:g.jsx("span",{className:"text-[9px] font-semibold text-white",children:"S"})}),g.jsx("span",{className:"flex min-w-0 flex-1 flex-col text-left",children:g.jsx("span",{className:"truncate text-[13px] font-medium text-[#ededed]",children:"Local viewer"})})]}),w&&c&&d&&g.jsxs("div",{className:"absolute bottom-full left-2 right-2 z-50 mb-1 overflow-hidden rounded-lg border border-[#333] bg-black shadow-xl",children:[g.jsxs("div",{className:"border-b border-[#333] px-3 py-2",children:[g.jsx("p",{className:"truncate text-[13px] font-medium text-white",children:"Linked email"}),g.jsx("p",{className:"truncate text-[11px] text-[#666]",children:d})]}),g.jsxs("button",{onClick:()=>{k(!1),m()},className:"flex w-full items-center gap-2 px-3 py-2 text-[13px] text-[#888] transition-colors hover:bg-[rgba(255,255,255,0.06)] hover:text-red-400",children:[g.jsx(jT,{className:"h-4 w-4"}),"Forget this email"]})]})]})}),g.jsx("div",{className:"group absolute right-0 top-0 z-30 h-full w-1 cursor-col-resize",onMouseDown:D,children:g.jsx("div",{className:Mr("absolute right-0 top-0 h-full w-px bg-[rgba(255,255,255,0.08)] transition-all duration-100",N?"w-0.5 bg-[rgba(255,255,255,0.3)]":"group-hover:bg-[rgba(255,255,255,0.2)]")})})]}),N&&g.jsx("div",{className:"fixed inset-0 z-10 cursor-col-resize"}),g.jsx(OU,{open:E!==null,description:E??"",source:"sidebar",onClose:()=>M(null)})]})}function yi({icon:e,label:t,active:r,onClick:a,count:s}){return g.jsxs("button",{onClick:a,className:Mr("group flex h-9 w-full origin-left flex-row items-center rounded-md transition-colors",r?"bg-[rgba(255,255,255,0.12)] text-white":"text-[#888] hover:bg-[rgba(255,255,255,0.06)] hover:text-[#ededed]"),children:[g.jsx("div",{className:"grid flex-none place-content-center",style:{width:36,height:36},children:e}),g.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-[14px] font-medium",children:t}),s!=null&&g.jsx("span",{className:"mr-2 flex-none rounded-full border border-white/10 px-2 py-0.5 text-[10px] tabular-nums leading-none text-[#777]",children:s})]})}function LU(){return g.jsx("svg",{style:{width:16,height:16,color:"currentcolor"},viewBox:"0 0 16 16",fill:"currentColor",children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 5.5V2.5H5.5V5.5H2.5ZM1 2C1 1.44772 1.44772 1 2 1H6C6.55228 1 7 1.44772 7 2V6C7 6.55228 6.55228 7 6 7H2C1.44772 7 1 6.55228 1 6V2ZM2.5 13.5V10.5H5.5V13.5H2.5ZM1 10C1 9.44772 1.44772 9 2 9H6C6.55228 9 7 9.44772 7 10V14C7 14.5523 6.55228 15 6 15H2C1.44772 15 1 14.5523 1 14V10ZM10.5 2.5V5.5H13.5V2.5H10.5ZM10 1C9.44772 1 9 1.44772 9 2V6C9 6.55228 9.44772 7 10 7H14C14.5523 7 15 6.55228 15 6V2C15 1.44772 14.5523 1 14 1H10ZM10.5 13.5V10.5H13.5V13.5H10.5ZM9 10C9 9.44772 9.44772 9 10 9H14C14.5523 9 15 9.44772 15 10V14C15 14.5523 14.5523 15 14 15H10C9.44772 15 9 14.5523 9 14V10Z"})})}const b_={work_email_required:"Please use your work email, not a personal one.",rate_limited:"Too many requests. Wait a minute and try again.",invalid_email:"That email does not look right. Check it and try again.",unavailable:"The email service is unavailable right now. Try again shortly."},zU=new Set(["gmail.com","googlemail.com","yahoo.com","ymail.com","outlook.com","hotmail.com","live.com","icloud.com","me.com","aol.com","proton.me","protonmail.com","gmx.com","mail.com"]);function IU({onVerified:e}){const[t,r]=ee.useState("email"),[a,s]=ee.useState(""),[o,c]=ee.useState(""),[d,f]=ee.useState(!1),[h,m]=ee.useState(null),[p,y]=ee.useState(null),x=async()=>{const N=a.trim();if(!N){m("Enter your email to continue.");return}const S=N.slice(N.lastIndexOf("@")+1).toLowerCase();if(zU.has(S)){Cr("work_email_required"),m(b_.work_email_required);return}f(!0),m(null);const w=await sS(N);f(!1),w.ok?(Cr("email_submitted",{purpose:"verify"}),y(`We sent a 6-digit code to ${N}.`),r("code")):(w.error==="work_email_required"&&Cr("work_email_required"),m(b_[w.error]??"Could not send a code. Try again."))},_=async()=>{const N=o.trim();if(N.length<4){m("Enter the 6-digit code from your email.");return}f(!0),m(null);const S=await lS(a.trim(),N);if(f(!1),!S.verified){m("That code did not match. Check it and try again.");return}Cr("email_verified",{purpose:"verify"}),e()};return g.jsxs("div",{className:"mx-auto mt-5 max-w-sm text-left",children:[h&&g.jsxs("div",{className:"mb-3 flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/5 px-3 py-2",children:[g.jsx(Hu,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-red-400","aria-hidden":"true"}),g.jsx("p",{className:"text-xs text-red-300",children:h})]}),p&&!h&&g.jsx("p",{className:"mb-3 text-xs text-[#888]",children:p}),t==="email"?g.jsxs("form",{className:"space-y-3",onSubmit:N=>{N.preventDefault(),x()},children:[g.jsxs("label",{className:"block",children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"Your work email"}),g.jsx("input",{type:"email",autoFocus:!0,value:a,onChange:N=>s(N.target.value),placeholder:"you@company.com",className:"w-full rounded-lg bg-black px-3 py-2.5 text-sm text-white outline-none transition-colors focus:border-[#444]",style:{border:"1px solid #2a2a2a"}}),g.jsx("span",{className:"mt-1.5 block text-[11px] text-[#666]",children:"Use your work email."})]}),g.jsxs("button",{type:"submit",disabled:d,className:"flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-white px-4 py-2.5 text-sm font-semibold text-black transition-opacity hover:opacity-90 disabled:opacity-60",children:[d&&g.jsx(qs,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),"Send me a code"]})]}):g.jsxs("form",{className:"space-y-3",onSubmit:N=>{N.preventDefault(),_()},children:[g.jsxs("label",{className:"block",children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"6-digit code"}),g.jsx("input",{inputMode:"numeric",autoFocus:!0,value:o,onChange:N=>c(N.target.value.replace(/\D/g,"").slice(0,6)),placeholder:"123456",className:"w-full rounded-lg bg-black px-3 py-2.5 text-center text-lg font-mono tracking-[0.4em] text-white outline-none transition-colors focus:border-[#444]",style:{border:"1px solid #2a2a2a"}})]}),g.jsxs("button",{type:"submit",disabled:d,className:"flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-white px-4 py-2.5 text-sm font-semibold text-black transition-opacity hover:opacity-90 disabled:opacity-60",children:[d&&g.jsx(qs,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),"Verify"]}),g.jsx("button",{type:"button",onClick:()=>{r("email"),m(null),y(null)},className:"w-full cursor-pointer text-center text-xs text-[#666] transition-colors hover:text-[#aaa]",children:"Use a different email"})]})]})}const BU=[{key:"critical",dot:"bg-red-500",text:"text-red-500"},{key:"high",dot:"bg-orange-500",text:"text-orange-500"},{key:"medium",dot:"bg-yellow-500",text:"text-yellow-500"},{key:"low",dot:"bg-blue-500",text:"text-blue-500"}];function UU({counts:e}){const t=BU.filter(r=>e[r.key]>0);return t.length===0?g.jsx("span",{className:"text-xs text-[#555]",children:"No findings"}):g.jsx("div",{className:"flex items-center gap-3",children:t.map(r=>g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:`h-2 w-2 rounded-full ${r.dot}`,"aria-hidden":"true"}),g.jsx("span",{className:`text-xs tabular-nums ${r.text}`,children:e[r.key]})]},r.key))})}function HU(e){if(!e)return null;const t=e.trim().replace(" UTC","Z").replace(" ","T"),r=new Date(t);return Number.isNaN(r.getTime())?null:r.toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function x_(e){if(!e)return null;const t=e.trim().replace(" UTC","Z").replace(" ","T"),r=new Date(t);if(Number.isNaN(r.getTime()))return null;const a=Date.now()-r.getTime(),s=Math.floor(a/6e4);if(s<1)return"just now";if(s<60)return`${s}m ago`;const o=Math.floor(s/60);if(o<24)return`${o}h ago`;const c=Math.floor(o/24);return c<7?`${c}d ago`:HU(e)}function $U({runs:e,activeRun:t,onSelectRun:r,onVerified:a}){const s=(e==null?void 0:e.count)??0,[o,c]=ee.useState(!1);return!e||e.locked?g.jsxs("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-8 text-center",children:[g.jsx("div",{className:"mx-auto mb-4 flex h-11 w-11 items-center justify-center rounded-xl",style:{border:"1px solid #2a2a2a",background:"rgba(255,255,255,0.04)"},children:g.jsx(Vs,{className:"h-5 w-5 text-[#888]","aria-hidden":"true"})}),g.jsx("h2",{className:"text-base font-semibold text-white",children:"Browse every run on this machine"}),g.jsxs("p",{className:"mx-auto mt-1.5 max-w-md text-sm text-[#888]",children:["You have ",s," past ",s===1?"run":"runs"," on this machine."]}),o?g.jsxs(g.Fragment,{children:[g.jsx("p",{className:"mx-auto mt-3 max-w-sm text-xs text-[#666]",children:"Verify your email with a one-time code to unlock the full history."}),g.jsx(IU,{onVerified:a})]}):g.jsx("button",{onClick:()=>{Dr("history_unlock","past_runs"),c(!0)},className:"mt-4 cursor-pointer rounded-lg bg-white px-4 py-2 text-sm font-semibold text-black transition-opacity hover:opacity-90",children:"View runs"}),g.jsxs("p",{className:"mt-4 flex items-center justify-center gap-1.5 text-xs text-[#555]",children:[g.jsx(z_,{className:"h-3.5 w-3.5","aria-hidden":"true"}),"Or open one from the CLI with"," ",g.jsx("code",{className:"font-mono text-[#888]",children:"strix view "})]})]}):e.runs.length===0?g.jsx("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-8 text-center text-sm text-[#888]",children:"No past runs found on this machine yet."}):g.jsx("div",{className:"space-y-2",children:e.runs.map(d=>{const f=d.name===t,h=x_(d.start_time)??x_(d.end_time),m=bo(d.target,d.name);return g.jsxs("button",{onClick:()=>r(d.name),className:`animate-card-in group flex w-full cursor-pointer items-center gap-4 rounded-lg border px-4 py-3 text-left transition-colors ${f?"border-[#444] bg-[rgba(255,255,255,0.04)]":"border-[#222] bg-[rgba(255,255,255,0.02)] hover:border-[#444]"}`,children:[g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"truncate text-sm font-medium text-white",children:m}),f&&g.jsx("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-emerald-400",style:{border:"1px solid rgba(16,185,129,0.3)"},children:"Active"})]}),g.jsxs("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-[#666]",children:[d.scan_mode&&g.jsx("span",{className:"capitalize",children:d.scan_mode}),d.scan_mode&&(h||d.status)&&g.jsx("span",{className:"text-[#333]",children:"·"}),h&&g.jsx("span",{children:h}),h&&d.status&&g.jsx("span",{className:"text-[#333]",children:"·"}),d.status&&g.jsx("span",{className:"capitalize",children:d.status})]})]}),g.jsx(UU,{counts:d.severity_counts}),g.jsx(Gk,{className:"h-4 w-4 flex-shrink-0 text-[#555] transition-colors group-hover:text-[#aaa]","aria-hidden":"true"})]},d.name)})})}const y_={work_email_required:"Please use your work email, not a personal one.",rate_limited:"Too many requests. Wait a minute and try again.",invalid_email:"That email does not look right. Check it and try again.",unavailable:"The email service is unavailable right now. Try again shortly."},qU={forbidden:"This email was unsubscribed from Strix, so we cannot send to it.",too_large:"This report is too large to email. Try a smaller run.",unavailable:"The email service is unavailable right now. Try again shortly."},PU=new Set(["gmail.com","googlemail.com","yahoo.com","ymail.com","outlook.com","hotmail.com","live.com","icloud.com","me.com","aol.com","proton.me","protonmail.com","gmx.com","mail.com"]);function FU({activeRun:e,auth:t,purpose:r,skipDisclosure:a=!1,onAuthChanged:s,onExit:o}){const c=(t==null?void 0:t.verified)===!0,d=r==="verify",[f,h]=ee.useState(()=>d?"email":a?c?"sending":"email":"disclosure"),[m,p]=ee.useState((t==null?void 0:t.email)??""),[y,x]=ee.useState(""),[_,N]=ee.useState(!1),[S,w]=ee.useState(null),[k,E]=ee.useState(null),[M,I]=ee.useState(""),[R,U]=ee.useState(""),[B,Z]=ee.useState(!1),[D,z]=ee.useState(""),V=ee.useRef(!1),P=async()=>{h("sending"),w(null);const K=await bU(e);if(K.ok){Cr("report_sent"),I(K.password),U(K.filename),h("password");return}if(K.error==="reverify"||K.error==="unverified"){E("Your verification expired. Enter your email to verify again."),h("email");return}w(qU[K.error]??"Could not send the report. Try again."),h("disclosure")},C=()=>{w(null),E(null),c?P():h("email")};ee.useEffect(()=>{!d&&a&&c&&!V.current&&(V.current=!0,P())},[]);const $=async()=>{const K=m.trim();if(!K){w("Enter your email to continue.");return}const T=K.slice(K.lastIndexOf("@")+1).toLowerCase();if(PU.has(T)){Cr("work_email_required"),w(y_.work_email_required);return}N(!0),w(null);const j=await sS(K);N(!1),j.ok?(Cr("email_submitted",{purpose:r}),E(`We sent a 6-digit code to ${K}.`),h("code")):(j.error==="work_email_required"&&Cr("work_email_required"),w(y_[j.error]??"Could not send a code. Try again."))},O=async()=>{const K=y.trim();if(K.length<4){w("Enter the 6-digit code from your email.");return}N(!0),w(null);const T=await lS(m.trim(),K);if(N(!1),!T.verified){w("That code did not match. Check it and try again.");return}Cr("email_verified",{purpose:r}),z(T.email),s(),d?o("history"):P()},H=async()=>{try{await navigator.clipboard.writeText(M),Z(!0),setTimeout(()=>Z(!1),1500)}catch{}},X=D||(t==null?void 0:t.email)||m.trim();return g.jsxs("div",{className:"mx-auto max-w-xl space-y-4",children:[g.jsxs("button",{onClick:()=>o(d?"history":"overview"),className:"cursor-pointer inline-flex items-center gap-1.5 text-sm text-[#888] transition-colors hover:text-white",children:[g.jsx(gp,{className:"h-4 w-4"}),d?"Back to past runs":"Back to results"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(bp,{className:"h-5 w-5 text-[#888]","aria-hidden":"true"}),g.jsx("h1",{className:"text-2xl font-semibold text-white",children:d?"Verify your email":"Export report to PDF"})]}),g.jsxs("div",{className:"w-full rounded-2xl bg-[rgba(255,255,255,0.02)] p-6",style:{border:"1px solid #2a2a2a"},children:[g.jsx("p",{className:"mb-4 text-xs text-[#666]",children:d?"We send a one-time code to confirm it is you.":"Verified by a one-time code sent to your email"}),S&&g.jsxs("div",{className:"mb-4 flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/5 px-3 py-2",children:[g.jsx(Hu,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-red-400","aria-hidden":"true"}),g.jsx("p",{className:"text-xs text-red-300",children:S})]}),k&&!S&&f!=="password"&&g.jsx("p",{className:"mb-4 text-xs text-[#888]",children:k}),f==="disclosure"&&g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2.5 rounded-lg p-3.5",style:{border:"1px solid #222",background:"rgba(255,255,255,0.02)"},children:[g.jsxs("div",{className:"flex items-start gap-2.5",children:[g.jsx(L_,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-emerald-400","aria-hidden":"true"}),g.jsxs("p",{className:"text-xs leading-relaxed text-[#aaa]",children:["We email an ",g.jsx("span",{className:"text-white",children:"encrypted PDF"}),". Nothing else leaves your machine."]})]}),g.jsxs("div",{className:"flex items-start gap-2.5",children:[g.jsx(RT,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-[#888]","aria-hidden":"true"}),g.jsx("p",{className:"text-xs leading-relaxed text-[#aaa]",children:"Only you hold the password; Strix can't read it."})]})]}),g.jsx("button",{onClick:C,className:"w-full cursor-pointer rounded-lg bg-white px-4 py-2.5 text-sm font-semibold text-black transition-opacity hover:opacity-90",children:"Export report"}),c&&(t==null?void 0:t.email)&&g.jsxs("p",{className:"text-center text-xs text-[#666]",children:["Sending to ",t.email]})]}),f==="email"&&g.jsxs("form",{className:"space-y-4",onSubmit:K=>{K.preventDefault(),$()},children:[g.jsxs("label",{className:"block",children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"Your work email"}),g.jsx("input",{type:"email",autoFocus:!0,value:m,onChange:K=>p(K.target.value),placeholder:"you@company.com",className:"w-full rounded-lg bg-black px-3 py-2.5 text-sm text-white outline-none transition-colors focus:border-[#444]",style:{border:"1px solid #2a2a2a"}})]}),g.jsxs("button",{type:"submit",disabled:_,className:"flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-white px-4 py-2.5 text-sm font-semibold text-black transition-opacity hover:opacity-90 disabled:opacity-60",children:[_&&g.jsx(qs,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),"Send me a code"]})]}),f==="code"&&g.jsxs("form",{className:"space-y-4",onSubmit:K=>{K.preventDefault(),O()},children:[g.jsxs("label",{className:"block",children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"6-digit code"}),g.jsx("input",{inputMode:"numeric",autoFocus:!0,value:y,onChange:K=>x(K.target.value.replace(/\D/g,"").slice(0,6)),placeholder:"123456",className:"w-full rounded-lg bg-black px-3 py-2.5 text-center text-lg font-mono tracking-[0.4em] text-white outline-none transition-colors focus:border-[#444]",style:{border:"1px solid #2a2a2a"}})]}),g.jsxs("button",{type:"submit",disabled:_,className:"flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-white px-4 py-2.5 text-sm font-semibold text-black transition-opacity hover:opacity-90 disabled:opacity-60",children:[_&&g.jsx(qs,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),d?"Verify":"Verify and send"]}),g.jsx("button",{type:"button",onClick:()=>{h("email"),w(null),E(null)},className:"w-full cursor-pointer text-center text-xs text-[#666] transition-colors hover:text-[#aaa]",children:"Use a different email"})]}),f==="sending"&&g.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[g.jsx(qs,{className:"h-6 w-6 animate-spin text-white","aria-hidden":"true"}),g.jsx("p",{className:"text-sm text-[#aaa]",children:"Generating and encrypting locally..."})]}),f==="password"&&g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2.5",children:[g.jsx(Gs,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-emerald-400","aria-hidden":"true"}),g.jsxs("p",{className:"text-xs text-emerald-200",children:["Sent to ",X,". Open the attached PDF with this password."]})]}),g.jsxs("div",{children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"Your one-time password"}),g.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-black p-3",style:{border:"1px solid #2a2a2a"},children:[g.jsx("code",{className:"flex-1 break-all font-mono text-base text-white",children:M}),g.jsxs("button",{onClick:H,className:"flex cursor-pointer items-center gap-1 rounded-md px-2 py-1 text-xs text-[#aaa] transition-colors hover:bg-[rgba(255,255,255,0.06)] hover:text-white",style:{border:"1px solid #2a2a2a"},children:[B?g.jsx(Gs,{className:"h-3.5 w-3.5"}):g.jsx(mo,{className:"h-3.5 w-3.5"}),B?"Copied":"Copy"]})]}),g.jsxs("p",{className:"mt-2 text-xs text-[#666]",children:["Save this now. Strix never stores it, so we cannot show it again. File:"," ",g.jsx("span",{className:"font-mono text-[#888]",children:R})]})]}),g.jsx("button",{onClick:()=>o("overview"),className:"w-full cursor-pointer rounded-lg px-4 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-[rgba(255,255,255,0.06)]",style:{border:"1px solid #2a2a2a"},children:"Done"})]})]})]})}function la(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function io(e){return Array.isArray(e)?e:[]}function nr(e){return typeof e=="string"&&e.trim()?e:null}function Ia(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function GU(e){return e.replace(/_/g," ")}function v_(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function VU(e){if(e==null||e<0)return"n/a";const t=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60;return t?`${t}h ${r}m ${a}s`:r?`${r}m ${a}s`:`${a}s`}function wn({label:e,children:t}){return g.jsxs("div",{className:"grid grid-cols-[7rem_1fr] gap-3 items-baseline",children:[g.jsx("dt",{className:"text-[11px] uppercase tracking-wide text-[#666]",children:e}),g.jsx("dd",{className:"min-w-0 break-words text-sm text-[#ddd]",children:t})]})}function YU({raw:e,durationSeconds:t}){const[r,a]=ee.useState(!0),s=io(e.targets_info).map(P=>{const C=la(P),$=nr(C.original)??nr(la(C.details).target_url)??"unknown target",O=nr(C.type);return{display:$,type:O?GU(O):null}}),o=nr(e.instruction),c=v_(nr(e.scan_mode)),d=nr(e.scope_mode),f=la(e.diff_scope),h=f.active===!0,m=nr(f.mode),p=nr(e.diff_base),y=e.non_interactive===!0,x=io(e.local_sources).map(P=>{if(typeof P=="string")return P;const C=la(P);return nr(C.source_path)??nr(C.target_path)??""}).filter(Boolean),_=v_(nr(e.status));let N=d??"auto";h&&(N+=` (diff${m?`: ${m}`:""}${p?` vs ${p}`:""})`);const S=la(e.llm_usage),w=Object.keys(S).length>0,k=io(S.agents).map(la),E=Array.from(new Set(k.map(P=>nr(P.model)).filter(P=>!!P))),M=Ia(S.requests),I=Ia(S.input_tokens),R=Ia(la(io(S.input_tokens_details)[0]).cached_tokens),U=Ia(S.output_tokens),B=Ia(la(io(S.output_tokens_details)[0]).reasoning_tokens),Z=Ia(S.total_tokens),D=Ia(S.cost),z=nr(e.auth_mode)==="subscription",V=(P,C)=>g.jsxs("span",{className:"text-[#666]",children:[" (",Ds(P)," ",C,")"]});return g.jsxs("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5",children:[g.jsxs("button",{type:"button",onClick:()=>a(P=>!P),"aria-expanded":r,className:"flex w-full cursor-pointer items-center gap-2 text-left",children:[g.jsx(TT,{className:"h-4 w-4 text-[#888]","aria-hidden":"true"}),g.jsx("h2",{className:"text-sm font-semibold text-white",children:"Run details"}),r?g.jsx(A_,{className:"ml-auto h-4 w-4 text-[#666]","aria-hidden":"true"}):g.jsx(ho,{className:"ml-auto h-4 w-4 text-[#666]","aria-hidden":"true"})]}),r&&g.jsxs("div",{className:"mt-4 grid grid-cols-1 gap-x-8 gap-y-6 md:grid-cols-2",children:[g.jsxs("section",{children:[g.jsx("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wide text-[#555]",children:"Configuration"}),g.jsxs("dl",{className:"space-y-2.5",children:[s.length>0&&g.jsx(wn,{label:"Targets",children:g.jsx("div",{className:"space-y-1",children:s.map((P,C)=>g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx("span",{className:"font-mono text-[#ddd]",children:P.display}),P.type&&g.jsx("span",{className:"rounded-full border border-[#2a2a2a] px-1.5 py-0.5 text-[10px] text-[#888]",children:P.type})]},C))})}),g.jsx(wn,{label:"Instruction",children:o?g.jsx("span",{className:"whitespace-pre-wrap",children:o}):g.jsx("span",{className:"text-[#666]",children:"None"})}),c&&g.jsx(wn,{label:"Pentest mode",children:c}),g.jsx(wn,{label:"Scope",children:N}),g.jsx(wn,{label:"Mode",children:y?"Non-interactive":"Interactive"}),x.length>0&&g.jsx(wn,{label:"Local sources",children:g.jsx("div",{className:"space-y-0.5 font-mono text-[#ddd]",children:x.map((P,C)=>g.jsx("div",{children:P},C))})}),_&&g.jsx(wn,{label:"Status",children:_})]})]}),g.jsxs("section",{children:[g.jsx("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wide text-[#555]",children:"Usage & cost"}),w?g.jsxs("dl",{className:"space-y-2.5 tabular-nums",children:[g.jsx(wn,{label:"Model",children:E.length?E.join(", "):"n/a"}),z&&g.jsx(wn,{label:"Provider",children:g.jsx("span",{className:"inline-flex items-center gap-1.5",children:g.jsx("span",{className:"rounded-full border border-[#22c55e]/40 bg-[#22c55e]/10 px-2 py-0.5 text-[11px] text-[#22c55e]",children:"ChatGPT subscription"})})}),g.jsx(wn,{label:"Run time",children:VU(t)}),M!=null&&g.jsx(wn,{label:"Requests",children:Ds(M)}),I!=null&&g.jsxs(wn,{label:"Input tokens",children:[Ds(I),R!=null&&V(R,"cached")]}),U!=null&&g.jsxs(wn,{label:"Output tokens",children:[Ds(U),B!=null&&V(B,"reasoning")]}),Z!=null&&g.jsx(wn,{label:"Total tokens",children:Ds(Z)}),z?g.jsxs(wn,{label:"Cost",children:[g.jsx("span",{className:"text-[#22c55e]",children:"$0.00"}),g.jsx("span",{className:"text-[#666]",children:" (subscription)"})]}):D!=null&&g.jsxs(wn,{label:"Cost",children:["$",D.toFixed(2)]}),k.length>0&&g.jsx(wn,{label:"Agents",children:Ds(k.length)})]}):g.jsx("p",{className:"text-sm text-[#666]",children:"Not available yet."})]})]})]})}const __="strix_viewer_trust_dismissed";function XU({message:e}){const[t,r]=ee.useState(()=>{try{return localStorage.getItem(__)==="1"}catch{return!1}});if(t)return null;const a=()=>{try{localStorage.setItem(__,"1")}catch{}r(!0)};return g.jsx("div",{className:"fixed bottom-3 left-3 z-[60] max-w-xs rounded-lg bg-[#0a0a0a] p-3 shadow-2xl",style:{border:"1px solid #2a2a2a"},role:"status",children:g.jsxs("div",{className:"flex gap-2.5",children:[g.jsx(L_,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-emerald-400","aria-hidden":"true"}),g.jsx("p",{className:"text-xs leading-relaxed text-[#aaa]",children:e}),g.jsx("button",{onClick:a,"aria-label":"Dismiss",className:"-mr-0.5 -mt-0.5 flex-shrink-0 cursor-pointer rounded p-0.5 text-[#666] transition-colors hover:text-white",children:g.jsx(xp,{className:"h-3.5 w-3.5"})})]})})}const KU=5e3,w_={invalid_email:"That email doesn't look right.",invalid_message:"Please write a little more.",unavailable:"Couldn't send that just now. Try again."};function ZU({defaultEmail:e,onExit:t}){const[r,a]=ee.useState(""),[s,o]=ee.useState(e??""),[c,d]=ee.useState("form"),[f,h]=ee.useState(null),m=r.trim().length>0&&s.trim().length>0&&c!=="sending",p=async()=>{if(!m)return;d("sending"),h(null);const y=await mU(r.trim(),s.trim());if(y.ok){d("sent");return}d("form"),h(w_[y.error]??w_.unavailable)};return g.jsxs("div",{className:"mx-auto max-w-xl space-y-4",children:[g.jsxs("button",{onClick:()=>t("overview"),className:"cursor-pointer inline-flex items-center gap-1.5 text-sm text-[#888] transition-colors hover:text-white",children:[g.jsx(gp,{className:"h-4 w-4"}),"Back to results"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(dS,{className:"h-5 w-5 text-[#888]","aria-hidden":"true"}),g.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Feedback & support"})]}),g.jsx("div",{className:"w-full rounded-2xl bg-[rgba(255,255,255,0.02)] p-6",style:{border:"1px solid #2a2a2a"},children:c==="sent"?g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx(O_,{className:"mt-0.5 h-5 w-5 flex-shrink-0 text-emerald-400","aria-hidden":"true"}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("p",{className:"text-sm font-semibold text-white",children:"Thanks, we got it."}),g.jsx("p",{className:"mt-1 text-xs text-[#888]",children:"We read every message. If it needs a reply, we'll reach out to the email you gave."}),g.jsx("button",{onClick:()=>{a(""),d("form")},className:"mt-4 cursor-pointer text-xs text-[#888] transition-colors hover:text-white",children:"Send more feedback"})]})]}):g.jsxs(g.Fragment,{children:[g.jsx("p",{className:"mb-4 text-xs text-[#666]",children:"Bugs, feature requests, or anything else. Tell us what's on your mind."}),f&&g.jsxs("div",{className:"mb-4 flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/5 px-3 py-2",children:[g.jsx(Hu,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-red-400","aria-hidden":"true"}),g.jsx("p",{className:"text-xs text-red-300",children:f})]}),g.jsxs("label",{className:"block",children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"Your feedback"}),g.jsx("textarea",{autoFocus:!0,value:r,maxLength:KU,onChange:y=>a(y.target.value),rows:5,placeholder:"What's working, what's not, what you'd love to see…",className:"w-full resize-y rounded-lg border border-[#2a2a2a] bg-black px-3 py-2.5 text-sm text-white outline-none transition-colors focus:border-white/50 focus:ring-2 focus:ring-white/10"})]}),g.jsxs("label",{className:"mt-4 block",children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"Your work email"}),g.jsx("input",{type:"email",value:s,onChange:y=>o(y.target.value),placeholder:"you@company.com",className:"w-full rounded-lg border border-[#2a2a2a] bg-black px-3 py-2.5 text-sm text-white outline-none transition-colors focus:border-white/50 focus:ring-2 focus:ring-white/10"})]}),g.jsx("button",{onClick:()=>void p(),disabled:!m,className:"mt-4 flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-white px-4 py-2.5 text-sm font-semibold text-black transition-opacity hover:opacity-90 disabled:opacity-60",children:c==="sending"?"Sending…":"Send feedback"})]})})]})}function QU({text:e,children:t,className:r=""}){const[a,s]=ee.useState(!1);return g.jsxs("span",{className:`relative inline-flex ${r}`,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onFocus:()=>s(!0),onBlur:()=>s(!1),children:[t,a&&g.jsx("span",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 z-50 mb-2 w-max max-w-[240px] -translate-x-1/2 rounded-md px-2.5 py-1.5 text-xs text-[#ddd] shadow-lg",style:{border:"1px solid #2a2a2a",background:"#0a0a0a"},children:e})]})}function fS({label:e,desc:t,slug:r,icon:a,surface:s}){return g.jsx(QU,{text:t,children:g.jsxs("a",{href:fa($u,r),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr(r,s),className:"group inline-flex items-center gap-2 rounded-lg border border-[#222] bg-[rgba(255,255,255,0.02)] px-3 py-2 text-sm text-[#aaa] transition-colors hover:border-[#444] hover:text-white",children:[g.jsx(a,{className:"h-4 w-4 text-[#888] transition-colors group-hover:text-white","aria-hidden":"true"}),g.jsx("span",{children:e})]})})}const WU="Your findings stay on your machine. They're rendered here locally in your browser and never uploaded or stored by Strix.",E_=["critical","high","medium","low"],JU=500;function eH(){const[e,t]=ee.useState(null),[r,a]=ee.useState(null),[s,o]=ee.useState(null),[c,d]=ee.useState(null),[f,h]=ee.useState("overview"),[m,p]=ee.useState(null),[y,x]=ee.useState(null),[_,N]=ee.useState("report"),[S,w]=ee.useState(!1),[k,E]=ee.useState(!1),M=ee.useCallback(async()=>{try{p(await pU())}catch{}},[]),I=ee.useCallback(async()=>{try{x(await dU())}catch{}},[]);ee.useEffect(()=>{M(),I(),fU().then(T=>E(T.can_steer)).catch(()=>{})},[M,I]);const R=ee.useRef(!1);ee.useEffect(()=>{let T=!1,j;R.current=!1;const Y=()=>{j=setTimeout(L,JU)},L=async()=>{if(!T)try{const{summary:G,raw:q,finished:Q}=await rS(e);if(T)return;if(Q&&!R.current){R.current=!0;const te=await d_(e);T||a(te);return}const[J,W]=await Promise.all([aS(e).catch(()=>({agents:[],events:[]})),iS(G.runId,e).catch(()=>[])]);if(T)return;a(te=>({summary:G,raw:q,finished:Q,transcript:J,vulnerabilities:W,reportMarkdown:(te==null?void 0:te.reportMarkdown)??null})),Y()}catch(G){if(T)return;o(G instanceof Error?G.message:"Could not load run data."),Y()}};return(async()=>{try{const G=await d_(e);if(T)return;a(G),G.finished?R.current=!0:Y()}catch(G){if(T)return;o(G instanceof Error?G.message:"Could not load run data."),Y()}})(),()=>{T=!0,j&&clearTimeout(j)}},[e]);const U=ee.useMemo(()=>r?cU(r.vulnerabilities):null,[r]),B=(r==null?void 0:r.vulnerabilities.find(T=>T.id===c))??null,Z=(r==null?void 0:r.transcript.agents.length)??0,D=(m==null?void 0:m.verified)===!0,z=ee.useRef(!1);ee.useEffect(()=>{z.current=!1},[e]),ee.useEffect(()=>{z.current||!r||(r.finished?(z.current=!0,h("overview")):Z>0&&(z.current=!0,h("agents")))},[r,Z]);const V=ee.useCallback(T=>{z.current=!0,h(T)},[]),P=ee.useCallback(T=>{t(T),d(null),a(null),o(null),z.current=!1},[]),C=ee.useCallback((T,j)=>{Dr("email_report",j),N("report"),w(T),V("email")},[V]),$=ee.useCallback(()=>C(!1,"sidebar"),[C]),O=ee.useCallback(()=>C(!0,"overview"),[C]),H=ee.useCallback(()=>{I(),V("history")},[I,V]),X=ee.useCallback(async()=>{await M(),await I()},[M,I]),K=ee.useCallback(async()=>{await gU(),await M(),await I()},[M,I]);return g.jsxs("div",{className:"min-h-screen bg-black text-white flex",children:[g.jsx(jU,{view:f,onSelectView:T=>{d(null),T==="history"?H():V(T)},issuesCount:(r==null?void 0:r.vulnerabilities.length)??0,agentCount:Z,runCount:(y==null?void 0:y.count)??0,finished:(r==null?void 0:r.finished)??!1,verified:D,email:(m==null?void 0:m.email)??null,onOpenEmail:$,onOpenHistory:H,onForget:()=>void K()}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("div",{className:"border-b border-[#222]",children:g.jsxs("div",{className:"max-w-[88rem] mx-auto px-3 sm:px-6 py-4 flex items-center gap-1.5",children:[g.jsxs("a",{href:fa("https://app.strix.ai","logo"),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr("logo","topbar"),className:"flex items-center gap-1.5 opacity-90 transition-opacity hover:opacity-100 lg:hidden",title:"Open Strix Cloud",children:[g.jsx("img",{src:"./logo.png",alt:"Strix",className:"w-10 h-8 object-cover"}),g.jsx("div",{className:"text-base text-white font-medium tracking-tight",children:"Strix"})]}),r&&g.jsx(nH,{finished:r.finished}),g.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[D&&y&&!y.locked&&y.runs.length>0&&g.jsx(tH,{runs:y,activeRun:e,launchedName:bo((r==null?void 0:r.summary.targets[0])??null,(r==null?void 0:r.summary.runName)??(r==null?void 0:r.summary.runId)??"Current run"),onSelect:P}),g.jsxs("a",{href:fa($u,"run_in_cloud"),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr("run_in_cloud","topbar"),className:"inline-flex items-center gap-1 rounded-lg bg-white px-3 py-1.5 text-xs font-semibold text-black transition-opacity hover:opacity-90",children:["Run in the cloud",g.jsx(k_,{className:"w-3 h-3","aria-hidden":"true"})]})]})]})}),g.jsxs("div",{className:"max-w-[88rem] mx-auto px-3 sm:px-6 py-8 sm:py-12 space-y-6",children:[s&&!r&&f!=="history"&&f!=="email"&&g.jsxs("div",{className:"rounded-lg px-4 py-3 flex gap-3 items-start border border-red-500/30 bg-red-500/5",children:[g.jsx(Hu,{className:"w-5 h-5 flex-shrink-0 mt-0.5 text-red-400","aria-hidden":"true"}),g.jsx("p",{className:"text-sm text-red-300",children:s})]}),g.jsx("div",{className:"animate-page-in space-y-6",children:f==="email"?g.jsx(FU,{activeRun:e,auth:m,purpose:_,skipDisclosure:S,onAuthChanged:()=>{M(),I()},onExit:T=>h(T==="history"?"history":"overview")}):f==="feedback"?g.jsx(ZU,{defaultEmail:(m==null?void 0:m.email)??null,onExit:T=>h(T)}):f==="history"?g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Vs,{className:"w-5 h-5 text-[#888]","aria-hidden":"true"}),g.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Past runs"})]}),g.jsx($U,{runs:y,activeRun:e,onSelectRun:P,onVerified:()=>void X()})]}):!r&&!s?g.jsxs("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-10 text-center",children:[g.jsx("div",{className:"w-6 h-6 mx-auto mb-3 rounded-full border-2 border-[#333] border-t-white animate-spin"}),g.jsx("p",{className:"text-sm text-[#888]",children:"Loading run data…"})]}):r&&U?g.jsxs(g.Fragment,{children:[g.jsx(iH,{summary:r.summary}),g.jsxs("div",{className:"flex gap-5 border-b border-[#2a2a2a] lg:hidden",children:[g.jsx(zm,{active:f==="overview",onClick:()=>V("overview"),children:"Pentest Overview"}),g.jsxs(zm,{active:f==="issues",onClick:()=>V("issues"),children:["Issues",r.vulnerabilities.length>0?` (${r.vulnerabilities.length})`:""]}),Z>0&&g.jsxs(zm,{active:f==="agents",onClick:()=>V("agents"),children:["Agents (",Z,")"]})]}),f==="overview"?g.jsx(cH,{summary:r.summary,counts:U,total:r.vulnerabilities.length,reportMarkdown:r.reportMarkdown,raw:r.raw,finished:r.finished,onOpenEmail:O}):f==="agents"&&Z>0?g.jsx(uH,{run:r,canSteer:k}):B?g.jsxs("div",{className:"space-y-4",children:[g.jsxs("button",{onClick:()=>d(null),className:"cursor-pointer inline-flex items-center gap-1.5 text-sm text-[#888] hover:text-white transition-colors",children:[g.jsx(gp,{className:"w-4 h-4"})," Back to all findings"]}),g.jsx(ZD,{vulnerability:B})]}):g.jsx(aH,{vulnerabilities:r.vulnerabilities,finished:r.finished,onSelect:T=>d(T)})]}):null},`${e??"launched"}:${f}:${c??""}`)]})]}),g.jsx(XU,{message:WU})]})}function tH({runs:e,activeRun:t,launchedName:r,onSelect:a}){const[s,o]=ee.useState(!1),c=e.runs.find(f=>f.name===t),d=c?bo(c.target,c.name):r;return g.jsxs("div",{className:"relative",children:[g.jsxs("button",{onClick:()=>o(f=>!f),onBlur:()=>setTimeout(()=>o(!1),150),"aria-label":"Switch pentest",className:"flex items-center gap-2 rounded-lg border border-[#3a3a3a] bg-[rgba(255,255,255,0.05)] px-3 py-2 text-sm text-white transition-colors hover:border-[#555] hover:bg-[rgba(255,255,255,0.09)]",children:[g.jsx(Vs,{className:"h-4 w-4 flex-shrink-0 text-[#888]","aria-hidden":"true"}),g.jsx("span",{className:"flex-shrink-0 text-[#888]",children:"Pentest"}),g.jsx("span",{className:"max-w-[260px] truncate font-medium",children:d}),g.jsx(ho,{className:"h-4 w-4 flex-shrink-0 text-[#aaa]","aria-hidden":"true"})]}),s&&g.jsxs("div",{className:"absolute right-0 z-50 mt-2 max-h-96 w-96 overflow-y-auto rounded-xl py-1.5 shadow-2xl",style:{border:"1px solid #3a3a3a",background:"#0a0a0a"},children:[g.jsx("div",{className:"border-b border-[#222] px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-[#666]",children:"Switch pentest"}),e.runs.map(f=>{const h=f.name===t;return g.jsxs("button",{onMouseDown:()=>a(f.name),className:`flex w-full items-center gap-2 px-3 py-2.5 text-left text-sm transition-colors hover:bg-[rgba(255,255,255,0.06)] ${h?"bg-[rgba(255,255,255,0.04)] text-white":"text-[#aaa]"}`,children:[g.jsxs("span",{className:"min-w-0 flex-1",children:[g.jsx("span",{className:"block truncate font-medium",children:bo(f.target,f.name)}),f.target&&g.jsx("span",{className:"block truncate font-mono text-xs text-[#666]",children:f.target})]}),h&&g.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-emerald-400"})]},f.name)})]})]})}function nH({finished:e}){return e?g.jsxs("span",{className:"ml-3 inline-flex items-center gap-1.5 text-xs text-[#888]",children:[g.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#555]"}),"Complete"]}):g.jsxs("span",{className:"ml-3 inline-flex items-center gap-1.5 text-xs text-emerald-400",children:[g.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[g.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75 animate-ping"}),g.jsx("span",{className:"relative inline-flex h-1.5 w-1.5 rounded-full bg-emerald-400"})]}),"Live"]})}function rH(e){if(e==null)return null;if(e<60)return`${e}s`;const t=Math.floor(e/60);return t<60?`${t}m`:`${Math.floor(t/60)}h ${t%60}m`}function iH({summary:e}){const t=rH(e.durationSeconds);return g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-semibold text-white",children:bo(e.targets[0]??null,e.runName??e.runId??"Pentest results")}),g.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-[#888]",children:[e.targets.length>0&&g.jsx("span",{className:"font-mono text-[#aaa]",children:e.targets.join(", ")}),e.scanMode&&g.jsx(Lm,{label:e.scanMode}),t&&g.jsx(Lm,{label:t}),e.status&&g.jsx(Lm,{label:e.status})]})]})}function Lm({label:e}){return g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-[#333]",children:"·"}),g.jsx("span",{className:"capitalize",children:e})]})}function aH({vulnerabilities:e,finished:t,onSelect:r}){const a=[...e].sort((s,o)=>E_.indexOf(s.severity)-E_.indexOf(o.severity));return a.length===0?g.jsxs("div",{className:"space-y-4",children:[g.jsx("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-8 text-center text-sm text-[#888]",children:t?"No findings in this run.":"No findings yet. The pentest is still running…"}),t&&g.jsxs("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5",children:[g.jsx("p",{className:"text-sm font-medium text-white",children:"Stay ahead of new exposures"}),g.jsx("p",{className:"mt-0.5 mb-3 text-xs text-[#666]",children:"Attack surface monitoring catches new exposures for your org over time."}),g.jsx(fS,{label:"Attack surface monitoring",desc:"Continuous coverage for your whole org.",slug:"asm",surface:"empty_state",icon:FT})]})]}):g.jsx("div",{className:"space-y-2",children:a.map(s=>g.jsxs("button",{onClick:()=>r(s.id),className:"animate-card-in cursor-pointer w-full text-left rounded-lg border border-[#222] hover:border-[#444] bg-[rgba(255,255,255,0.02)] px-4 py-3 transition-colors flex items-center gap-3",children:[g.jsx("span",{className:`w-2.5 h-2.5 rounded-full flex-shrink-0 ${yp(s.severity)}`,"aria-hidden":"true"}),g.jsxs("span",{className:"flex-1 min-w-0",children:[g.jsx("span",{className:"block text-sm font-medium text-white truncate",children:s.title}),s.target&&g.jsx("span",{className:"block text-xs text-[#666] font-mono truncate",children:s.target})]}),g.jsx("span",{className:`text-xs font-semibold px-2 py-0.5 rounded-full border capitalize ${I_[s.severity]}`,children:s.severity})]},s.id))})}function sH(e){return e.replace(/^\s*#{1,6}[ \t]+.*(?:\r?\n)+/,"").trimStart()}function lH(e){const t=[];let r=null;for(const a of e.split(` +`)}function A7({args:e,result:t}){const r=e.action??"",a=e.code??e.script??"",s=t;let o=null;s&&typeof s=="object"?o=typeof s.stdout=="string"?s.stdout:null:typeof s=="string"&&(o=s);const c=r==="new_session"?"new session":r==="close"?"close session":r==="list_sessions"?"list sessions":null,d=o?T7(C7(o)):null;return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-yellow-400/80 font-semibold text-sm",children:"Python"}),c&&g.jsx("span",{className:"text-[#888] text-[13px]",children:c})]}),a&&g.jsx(cg,{code:a,language:"python",collapsible:!0}),d&&g.jsx(wi,{className:"text-[#666]",children:d})]})}function M7({args:e}){const t=e.targets,a=(Array.isArray(t)?t:[]).map(s=>typeof s=="object"&&s?s.original??null:null).filter(Boolean);return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-emerald-400/80 font-semibold text-sm",children:"Starting penetration test"}),a.length===1&&g.jsxs("span",{className:"text-[#888] text-[13px]",children:["on ",a[0]]})]}),a.length>1&&g.jsx("div",{className:"mt-1.5 space-y-0.5",children:a.map((s,o)=>g.jsxs("div",{className:"text-[13px] text-[#888]",children:[g.jsx("span",{className:"text-[#555] mr-1",children:"•"}),s]},o))})]})}function O7({args:e}){const t=e.name??"Unknown Agent",r=e.task??"";return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-[#888] text-[13px]",children:"subagent"}),g.jsx("span",{className:"text-purple-400 font-semibold text-sm",children:t})]}),r&&g.jsx("div",{className:"mt-1.5",children:g.jsx(zn,{text:r,maxLines:15})})]})}function R7(e){return e.toolName==="subagent_start_info"?g.jsx(O7,{...e}):g.jsx(M7,{...e})}function D7({args:e}){const t=e.executive_summary??"",r=e.methodology??"",a=e.technical_analysis??"",s=e.recommendations??"";return g.jsxs("div",{className:"space-y-3",children:[g.jsx("span",{className:"text-emerald-400/80 font-semibold text-sm",children:"Penetration test completed"}),t&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Executive Summary"}),g.jsx("div",{className:"mt-1",children:g.jsx(zn,{text:t,maxLines:25})})]}),r&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Methodology"}),g.jsx("div",{className:"mt-1",children:g.jsx(zn,{text:r,maxLines:25})})]}),a&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Technical Analysis"}),g.jsx("div",{className:"mt-1",children:g.jsx(zn,{text:a,maxLines:25})})]}),s&&g.jsxs("div",{children:[g.jsx("span",{className:"text-emerald-400/60 text-sm font-semibold",children:"Recommendations"}),g.jsx("div",{className:"mt-1",children:g.jsx(zn,{text:s,maxLines:25})})]}),!t&&!r&&!a&&!s&&g.jsx("div",{className:"text-[#555] text-xs",children:"Generating final report..."})]})}function j7({toolName:e,args:t,result:r}){if(e==="create_note"){const a=t.title??"",s=t.content??"",o=t.category??"general";return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"note"}),g.jsxs("span",{className:"text-[#555] text-[13px]",children:["(",o,")"]})]}),a&&g.jsx("div",{className:"mt-1.5 text-[#999] text-[13px]",children:a}),s&&g.jsx("div",{className:"mt-1",children:g.jsx($s,{text:s})})]})}if(e==="delete_note")return g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"note removed"});if(e==="update_note"){const a=t.title??"",s=t.content??"";return g.jsxs("div",{children:[g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"note updated"}),a&&g.jsx("div",{className:"mt-1.5 text-[#999] text-[13px]",children:a}),s&&g.jsx("div",{className:"mt-1",children:g.jsx($s,{text:s})})]})}if(e==="get_note"){const a=r,s=a&&typeof a=="object"&&a.success?a.note:void 0;return g.jsxs("div",{children:[g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"note read"}),s&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"mt-1.5 text-[#999] text-[13px]",children:[s.title??"(untitled)",g.jsxs("span",{className:"text-[#555] ml-1",children:["(",s.category??"general",")"]})]}),s.content&&g.jsx("div",{className:"mt-1",children:g.jsx($s,{text:s.content})})]})]})}if(e==="list_notes"){const a=r;let s=[];if(a&&typeof a=="object"&&a.success){const o=a.notes;s=Array.isArray(o)?o:[]}return g.jsxs("div",{children:[g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"notes"}),s.length>0?g.jsx("div",{className:"mt-1.5 space-y-0.5",children:s.map((o,c)=>g.jsxs("div",{className:"text-[13px]",children:[g.jsx("span",{className:"text-[#555] mr-1",children:"-"}),g.jsx("span",{className:"text-[#999]",children:o.title??"(untitled)"}),g.jsxs("span",{className:"text-[#555] ml-1",children:["(",o.category??"general",")"]}),o.content&&g.jsx("div",{className:"ml-3",children:g.jsx($s,{text:o.content})})]},c))}):g.jsx("div",{className:"mt-1 text-[#555] text-xs",children:"No notes"})]})}return g.jsx("span",{className:"text-amber-400/80 font-semibold text-sm",children:"note"})}const L7={create_todo:{label:"Task added",Icon:PC},list_todos:{label:"Plan",Icon:qk},update_todo:{label:"Task updated",Icon:UC},mark_todo_done:{label:"Task completed",Icon:M_},mark_todo_pending:{label:"Task reopened",Icon:QC},delete_todo:{label:"Task removed",Icon:uT}};function z7({status:e}){return e==="done"?g.jsx(M_,{className:"w-3.5 h-3.5 text-emerald-400/70 shrink-0"}):e==="in_progress"?g.jsx(eC,{className:"w-3.5 h-3.5 text-purple-400/70 shrink-0 animate-pulse"}):g.jsx(nC,{className:"w-3.5 h-3.5 text-[#444] shrink-0"})}function I7({todos:e,highlightId:t}){return g.jsx("div",{className:"space-y-0",children:e.map((r,a)=>{const s=r.status??"pending",o=t&&r.id===t;return g.jsxs("div",{className:`flex items-start gap-2.5 py-1.5 px-2 -mx-2 rounded-md transition-colors ${o?"bg-purple-500/[0.08]":""}`,children:[g.jsx("div",{className:"mt-[1px]",children:g.jsx(z7,{status:s})}),g.jsx("span",{className:`text-[13px] leading-snug ${s==="done"?"text-[#555] line-through":s==="in_progress"?"text-[#bbb]":"text-[#999]"}`,children:r.title??"(untitled)"})]},r.id??a)})})}function B7({toolName:e,args:t,result:r}){const a=L7[e]??{label:"Plan",Icon:YC},s=a.Icon,o=r;if(typeof o=="string"&&o.trim())return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(s,{className:"w-3.5 h-3.5 text-purple-400/60"}),g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:a.label})]}),g.jsx("div",{className:"mt-1.5 text-[#888] text-[13px]",children:o.trim()})]});let c=[],d=null,f;if(o&&typeof o=="object"){if(d=o.error??null,o.success){const m=o.todos;c=Array.isArray(m)?m:[]}f=o.id??t.todo_id??void 0}const h=e!=="list_todos"?f:void 0;return c.length===0&&!d?g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(s,{className:"w-3.5 h-3.5 text-purple-400/60"}),g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:a.label})]}):g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[g.jsx(s,{className:"w-3.5 h-3.5 text-purple-400/60"}),g.jsx("span",{className:"text-purple-400/80 font-semibold text-sm",children:a.label})]}),d&&g.jsx("div",{className:"text-red-400/70 text-[13px] mb-2",children:d}),c.length>0&&g.jsx("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.015] px-3 py-2",children:g.jsx(I7,{todos:c,highlightId:h})})]})}function c_(e){if(e==null)return null;if(typeof e=="string")return e.trim()?e:null;if(typeof e=="object"){const t=e;if(typeof t.__raw=="string")return t.__raw;if(Object.keys(t).length===0)return null;try{return JSON.stringify(e,null,2)}catch{return String(e)}}return String(e)}function JN({toolName:e,args:t,result:r}){const a=c_(t),s=c_(r);return g.jsxs("div",{children:[g.jsx("span",{className:"text-[#888] font-semibold text-sm",children:e.replace(/_/g," ")}),a&&g.jsx(wi,{className:"text-[#777]",children:a}),s&&g.jsx(wi,{className:"text-[#666]",children:s})]})}function U7({args:e}){const t=e.skills,r=(Array.isArray(t)?t:String(t??"").split(",")).map(a=>String(a).trim()).filter(Boolean);return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-emerald-400/80 font-semibold text-sm",children:"Loading skill"}),r.length>0&&g.jsx("span",{className:"text-[#888] text-[13px]",children:r.join(", ")})]})}const ad={terminal:{renderer:QB,icon:z_,color:"text-emerald-400"},python:{renderer:A7,icon:aC,color:"text-yellow-400"},browser:{renderer:JB,icon:j_,color:"text-blue-400"},filesystem:{renderer:e7,icon:hC,color:"text-sky-400"},proxy:{renderer:y7,icon:k_,color:"text-purple-400",match:/request|sitemap|scope/},reporting:{renderer:u7,icon:tT,color:"text-red-400"},thinking:{renderer:v7,icon:T_,color:"text-purple-400"},agents:{renderer:_7,icon:Ao,color:"text-cyan-400",match:/agent/},search:{renderer:w7,icon:JC,color:"text-amber-400"},lifecycle:{renderer:R7,icon:D_,color:"text-emerald-400"},notes:{renderer:j7,icon:lT,color:"text-amber-400",match:/note/},skills:{renderer:U7,icon:Bm,color:"text-emerald-400"},todos:{renderer:B7,icon:MC,color:"text-purple-400",match:/todo/},telemetry:{renderer:JN,icon:Bm,color:"text-[#555]"}},H7={terminal:["exec_command","write_stdin","terminal_execute"],python:["python_action"],browser:["browser_action"],filesystem:["apply_patch","view_image","str_replace_editor","list_files","search_files"],proxy:["list_requests","view_request","repeat_request","list_sitemap","view_sitemap_entry","scope_rules","send_request"],reporting:["create_vulnerability_report"],thinking:["think"],agents:["create_agent","agent_finish","send_message_to_agent","wait_for_message","view_agent_graph","stop_agent"],search:["web_search"],lifecycle:["scan_start_info","subagent_start_info","finish_scan"],notes:["create_note","delete_note","update_note","list_notes","get_note"],skills:["load_skill"],todos:["create_todo","list_todos","update_todo","mark_todo_done","mark_todo_pending","delete_todo"],telemetry:["sandbox_error_details","llm_error_details"]},$7=Object.fromEntries(Object.entries(H7).flatMap(([e,t])=>t.map(r=>[r,e]))),q7={finish_scan:D7,apply_patch:l7,view_image:o7},P7={agent_finish:{icon:D_,color:"text-cyan-400"},send_message_to_agent:{icon:ny,color:"text-cyan-400"},wait_for_message:{icon:ny,color:"text-cyan-400"},view_agent_graph:{icon:dC,color:"text-cyan-400"},stop_agent:{icon:C_,color:"text-red-400"},scan_start_info:{icon:oC,color:"text-emerald-400"},subagent_start_info:{icon:Ao,color:"text-purple-400"},view_image:{icon:kC,color:"text-sky-400"}},F7=ad.telemetry;function eS(e){var r;const t=$7[e];if(t)return t;for(const[a,s]of Object.entries(ad))if((r=s.match)!=null&&r.test(e))return a;return null}function G7(e){const t=q7[e];if(t)return t;const r=eS(e);return r?ad[r].renderer:JN}function V7(e){const t=P7[e];if(t)return t;const r=eS(e),a=r?ad[r]:F7;return{icon:a.icon,color:a.color}}const Y7=30;function X7({role:e,content:t}){const r=e==="user"||e==="human";return g.jsxs("div",{children:[g.jsx("span",{className:`font-semibold text-sm ${r?"text-blue-400/80":"text-purple-400/80"}`,children:r?"User":"Thinking"}),g.jsx("div",{className:"mt-1.5 italic text-[#888]",children:g.jsx(zn,{text:t,maxLines:Y7})})]})}class K7 extends ee.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?g.jsx("span",{className:"text-[#555] font-semibold text-sm",children:this.props.toolName.replace(/_/g," ")}):this.props.children}}function Z7(e){const t=G7(e.toolName);return g.jsx(K7,{toolName:e.toolName,children:g.jsx(t,{...e})})}function tS(e){if(e==null||typeof e!="string")return e;const t=e.trim();if(!t)return e;try{return JSON.parse(t)}catch{}try{const r=t.replace(/\bNone\b/g,"null").replace(/\bTrue\b/g,"true").replace(/\bFalse\b/g,"false").replace(/'/g,'"');return JSON.parse(r)}catch{return{__raw:e}}}function nS(e){const t=tS(e);return t&&typeof t=="object"&&!Array.isArray(t)?t:t==null?{}:{__raw:typeof t=="string"?t:JSON.stringify(t)}}function u_(e){const t=/(\d+)$/.exec(e);return t?parseInt(t[1],10):0}function fg(e){var r;const t=(r=e.data)==null?void 0:r.role;return e.type==="chat"&&(t==="user"||t==="human")}function Q7(e){var t;return fg(e)&&String(((t=e.data)==null?void 0:t.content)??"").startsWith("[Message from ")}function W7(e){const t=new Set;let r=!1;for(const a of e)if(fg(a)){if(Q7(a)){t.add(a.id);continue}r||(r=!0,t.add(a.id))}return t}const J7={completed:"text-emerald-400 border-emerald-500/30 bg-emerald-500/10",running:"text-blue-400 border-blue-500/30 bg-blue-500/10",waiting:"text-yellow-400 border-yellow-500/30 bg-yellow-500/10",stopped:"text-[#aaa] border-[#333] bg-[#1a1a1a]",crashed:"text-red-400 border-red-500/30 bg-red-500/10",failed:"text-red-400 border-red-500/30 bg-red-500/10"};function eU(e){return e==="completed"?"completed":e==="running"?"running":e==="failed"||e==="crashed"?"failed":e}function tU(e,t){var d;const r=new Map;for(const f of e)if(f.parent_id){const h=r.get(f.parent_id)??[];h.push(f.id),r.set(f.parent_id,h)}const a=new Map,s=new Map,o=new Map;for(const f of t)if(f.type==="tool"){if(a.set(f.agent_id,(a.get(f.agent_id)??0)+1),((d=f.data)==null?void 0:d.tool_name)==="create_agent"){const h=nS(f.data.args),m=h.name??h.agent_name??"",p=h.task??"";m&&p&&o.set(m,p)}}else fg(f)||s.set(f.agent_id,(s.get(f.agent_id)??0)+1);const c=new Map;for(const f of e)c.set(f.id,{id:f.id,name:f.name,task:o.get(f.name)??"",status:eU(f.status),parentId:f.parent_id,children:r.get(f.id)??[],createdAt:f.created_at,toolCount:a.get(f.id)??0,messageCount:s.get(f.id)??0});return c}function nU({agent:e,events:t,showHeader:r=!0}){const a=ee.useMemo(()=>{const c=t.filter(f=>f.agent_id===e.id).sort((f,h)=>u_(f.id)-u_(h.id)),d=W7(c);return c.filter(f=>!d.has(f.id))},[t,e.id]),s=a.filter(c=>c.type==="tool").length,o=a.length-s;return g.jsxs("div",{children:[r&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[g.jsx("span",{className:"text-base font-semibold text-white truncate",children:e.name}),g.jsx("span",{className:`flex-shrink-0 text-xs font-medium capitalize px-2 py-0.5 rounded-full border ${J7[e.status]??"text-[#aaa] border-[#333] bg-[#1a1a1a]"}`,children:e.status}),g.jsx("span",{className:"font-mono text-xs text-[#555]",children:e.id})]}),g.jsxs("p",{className:"text-xs text-[#666] mb-4",children:[o," message",o===1?"":"s"," · ",s," tool call",s===1?"":"s"]})]}),a.length===0?g.jsx("p",{className:"text-sm text-[#666]",children:"No recorded activity for this agent."}):g.jsx("div",{className:"py-1",children:a.map((c,d)=>{var N,S,w,k,E,M;const f=d===a.length-1,h=c.type==="tool",m=h?String(((N=c.data)==null?void 0:N.tool_name)??"tool"):"",p=h?"":String(((S=c.data)==null?void 0:S.role)??"assistant");let y,x;if(h){const I=V7(m);y=I.icon,x=I.color}else{const I=p==="user"||p==="human";y=I?Ao:T_,x=I?"text-blue-400":"text-purple-400"}const _=h?String(((w=c.data)==null?void 0:w.status)??"completed"):"completed";return g.jsxs("div",{className:"flex gap-3",children:[g.jsxs("div",{className:"flex flex-col items-center shrink-0",children:[g.jsx("div",{className:`w-[30px] h-[30px] rounded-full bg-black border flex items-center justify-center shrink-0 ${h&&_==="running"?"border-blue-500/40 animate-pulse":h&&_==="failed"?"border-red-500/30":"border-[#222]"}`,children:g.jsx(y,{className:`w-3.5 h-3.5 ${x}`})}),!f&&g.jsx("div",{className:"w-px flex-1 bg-[#1a1a1a] mt-1"})]}),g.jsx("div",{className:"flex-1 min-w-0 pt-[5px] pb-6",children:h?g.jsx(Z7,{toolName:m,args:nS((k=c.data)==null?void 0:k.args),result:tS((E=c.data)==null?void 0:E.result)??null,status:_}):g.jsx(X7,{role:p,content:String(((M=c.data)==null?void 0:M.content)??"")})})]},c.id)})})]})}class Iu extends Error{constructor(t){super(t),this.name="RunParseError"}}const rU=["critical","high","medium","low"];function iU(e){const t=String(e??"").toLowerCase().trim();return rU.includes(t)?t:"low"}function aU(e){if(typeof e=="string"&&e.trim()){const t=e.trim().replace(" UTC","Z").replace(" ","T"),r=new Date(t);if(!Number.isNaN(r.getTime()))return r.toISOString();const a=new Date(e);if(!Number.isNaN(a.getTime()))return a.toISOString()}return new Date().toISOString()}function Ot(e){return typeof e=="string"&&e.length>0?e:null}function sU(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function rS(e,t){try{return JSON.parse(e)}catch{throw new Iu(`${t} isn't valid JSON. Make sure you selected a Strix run directory.`)}}function lU(e){const t=rS(e,"run.json");if(!t||typeof t!="object"||Array.isArray(t))throw new Iu("run.json is not an object.");const r=t,a=[],s=r.targets_info;if(Array.isArray(s)){for(const x of s)if(x&&typeof x=="object"){const _=x.original;typeof _=="string"&&_&&a.push(_)}}const o=Ot(r.start_time),c=Ot(r.end_time);let d=null;if(o&&c){const x=new Date(o).getTime(),_=new Date(c).getTime();!Number.isNaN(x)&&!Number.isNaN(_)&&_>=x&&(d=Math.round((_-x)/1e3))}let f=null,h=null,m=null,p=null;const y=r.scan_results;if(y&&typeof y=="object"){const x=y;f=Ot(x.executive_summary),h=Ot(x.technical_analysis),m=Ot(x.methodology),p=Ot(x.recommendations)}return{runId:Ot(r.run_id),runName:Ot(r.run_name),targets:a,scanMode:Ot(r.scan_mode),status:Ot(r.status),startTime:o,endTime:c,durationSeconds:d,executiveSummary:f,technicalAnalysis:h,methodology:m,recommendations:p}}function oU(){return{pr_review_id:null,cve:null,cvss:null,potential_risk_saving:null,risk_saving_description:null,impact:null,endpoint:null,method:null,target:null,technical_analysis:null,poc_description:null,poc_script_code:null,code_diff:null,code_file:null,code_before:null,code_after:null,cwe:null,code_locations:null,remediation_steps:null,fix_pr_body:null,evidence:null,assumptions:null,fix_effort:null,cvss_breakdown:null,status_changed_at:null,status_changed_by:null,status_note:null,snoozed_until:null,reopened_at:null,reopened_by:null,original_severity:null,severity_changed_at:null,severity_changed_by:null,severity_override_reason:null,retest_of_vulnerability_id:null}}function cU(e,t,r){const a=e.cwe,s=typeof a=="string"&&a.trim()?[a.trim()]:Array.isArray(a)?a.filter(c=>typeof c=="string"&&c):null;return{...oU(),id:Ot(e.id)??`vuln-${t+1}`,scan_id:r,title:Ot(e.title)??"Untitled finding",description:Ot(e.description)??"",severity:iU(e.severity),status:"open",created_at:aU(e.timestamp),cve:Ot(e.cve),cvss:sU(e.cvss),impact:Ot(e.impact),endpoint:Ot(e.endpoint),method:Ot(e.method),target:Ot(e.target),technical_analysis:Ot(e.technical_analysis),poc_description:Ot(e.poc_description),poc_script_code:Ot(e.poc_script_code),cwe:s,code_locations:Array.isArray(e.code_locations)?e.code_locations:null,remediation_steps:Ot(e.remediation_steps),fix_pr_body:Ot(e.fix_pr_body),evidence:Ot(e.evidence),assumptions:Ot(e.assumptions),fix_effort:Ot(e.fix_effort)??null,cvss_breakdown:e.cvss_breakdown??null}}function uU(e,t=null){const r=rS(e,"vulnerabilities.json");if(!Array.isArray(r))throw new Iu("vulnerabilities.json is not a JSON array.");return r.map((a,s)=>{if(!a||typeof a!="object")throw new Iu(`vulnerabilities.json entry #${s+1} is not an object.`);return cU(a,s,t)})}function dU(e){const t={critical:0,high:0,medium:0,low:0};for(const r of e)t[r.severity]+=1;return t}async function Wa(e){const t=await fetch(e,{cache:"no-store"});if(!t.ok)throw new Error(`${e} responded ${t.status}`);return t.json()}function sd(e){return e?`?run=${encodeURIComponent(e)}`:""}async function iS(e){const t=await Wa("/api/run"+sd(e)),r=lU(JSON.stringify(t)),a=t.finished===!0;return{summary:r,raw:t,finished:a}}async function aS(e,t){const r=await Wa("/api/vulnerabilities"+sd(t));return uU(JSON.stringify(r),e)}async function fU(e){const t=await Wa("/api/report"+sd(e));return(t==null?void 0:t.markdown)??null}async function sS(e){const t=await Wa("/api/transcript"+sd(e));return{agents:Array.isArray(t==null?void 0:t.agents)?t.agents:[],events:Array.isArray(t==null?void 0:t.events)?t.events:[]}}async function d_(e){const{summary:t,raw:r,finished:a}=await iS(e),[s,o,c]=await Promise.all([aS(t.runId,e).catch(()=>[]),fU(e).catch(()=>null),sS(e).catch(()=>({agents:[],events:[]}))]);return{summary:t,raw:r,finished:a,vulnerabilities:s,reportMarkdown:o,transcript:c}}async function rl(e,t){const r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),cache:"no-store"});let a={};try{const s=await r.json();s&&typeof s=="object"&&(a=s)}catch{}return{ok:r.ok,status:r.status,data:a}}async function hU(){const e=await Wa("/api/runs");return{locked:(e==null?void 0:e.locked)??!0,count:typeof(e==null?void 0:e.count)=="number"?e.count:0,runs:Array.isArray(e==null?void 0:e.runs)?e.runs:[]}}async function mU(){const e=await Wa("/api/capabilities");return{can_steer:(e==null?void 0:e.can_steer)===!0}}async function pU(e,t){const{ok:r,data:a}=await rl("/api/agents/steer",{agent_id:e,message:t});return r&&a.ok===!0?{ok:!0}:{ok:!1,error:String(a.error??"unavailable")}}async function gU(e,t){const{ok:r,data:a}=await rl("/api/feedback",{message:e,email:t});return r&&a.ok===!0?{ok:!0}:{ok:!1,error:String(a.error??"unavailable")}}async function bU(){const e=await Wa("/api/auth/status");return{verified:(e==null?void 0:e.verified)===!0,email:(e==null?void 0:e.email)??null}}async function lS(e){const{ok:t,data:r}=await rl("/api/auth/otp/start",{email:e});return t&&r.ok===!0?{ok:!0}:{ok:!1,error:String(r.error??"unavailable")}}async function oS(e,t){const{ok:r,data:a}=await rl("/api/auth/otp/verify",{email:e,code:t});return r&&a.verified===!0?{verified:!0,email:String(a.email??e)}:{verified:!1,error:String(a.error??"invalid_code")}}async function xU(){await rl("/api/auth/forget",{})}async function yU(e){const{ok:t,data:r}=await rl("/api/report/send",e?{run:e}:{});return t&&r.ok===!0?{ok:!0,password:String(r.password??""),filename:String(r.filename??"strix-report.pdf")}:{ok:!1,error:String(r.error??"unavailable")}}const Is="__root__";function cS({agents:e,fixedAgentId:t,className:r}){const a=ee.useRef(null),[s,o]=ee.useState(!1),[c,d]=ee.useState(!1),[f,h]=ee.useState(""),[m,p]=ee.useState(!1),[y,x]=ee.useState(null),_=t!=null,N=ee.useMemo(()=>e.find(z=>!z.parent_id)??e[0]??null,[e]),S=ee.useMemo(()=>e.filter(z=>z.parent_id&&z.status==="running"),[e]),[w,k]=ee.useState(Is),[E,M]=ee.useState(!1);ee.useEffect(()=>{w!==Is&&!S.some(z=>z.id===w)&&k(Is)},[w,S]);const{targetId:I,targetName:R}=ee.useMemo(()=>{if(_){const V=e.find(P=>P.id===t)??null;return{targetId:t??null,targetName:(V==null?void 0:V.name)??"this agent"}}if(w===Is)return{targetId:(N==null?void 0:N.id)??null,targetName:"Root agent"};const z=e.find(V=>V.id===w)??null;return{targetId:(z==null?void 0:z.id)??(N==null?void 0:N.id)??null,targetName:(z==null?void 0:z.name)??"Root agent"}},[e,t,_,N,w]),U=f.trim().length===0;ee.useLayoutEffect(()=>{const z=a.current;z&&(z.style.height="auto",z.style.height=`${z.scrollHeight}px`)},[f]);const B=ee.useCallback(()=>{o(!0),requestAnimationFrame(()=>{var z;return(z=a.current)==null?void 0:z.focus()})},[]),Z=ee.useCallback(()=>{o(!1),d(!1),M(!1)},[]),D=ee.useCallback(async()=>{if(m)return;const z=f.trim();if(!z||!I)return;p(!0),x(null);const V=R,P=await pU(I,z);p(!1),P.ok?(h(""),x(`Sent to ${V}`),Tr("agent_steered")):P.error==="not_delivered"?x("Could not reach that agent (it may have finished)."):x("Could not send that message. Try again.")},[m,f,I,R]);return s?g.jsxs("div",{className:Mr("mt-4 rounded-2xl border border-white/[0.08] bg-[#050505] overflow-hidden transition-colors duration-300",c?"border-white/[0.18]":"hover:border-white/[0.12]",r),children:[g.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-white/[0.06] px-5 py-3",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Im,{className:"h-4 w-4 text-[#666]"}),g.jsx("p",{className:"text-sm font-medium text-white",children:"Live prompt"})]}),g.jsx("p",{className:"mt-0.5 text-xs text-[#777]",children:"Connected"})]}),g.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[_?g.jsxs("div",{className:"rounded-full border border-white/[0.08] bg-white/[0.03] px-3 py-1 text-xs text-[#aaa]",children:["Target: ",g.jsx("span",{className:"text-white",children:R})]}):g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"text-xs text-[#aaa]",children:"Target:"}),g.jsxs("div",{className:"relative",children:[g.jsxs("button",{type:"button",onClick:()=>M(z=>!z),onBlur:()=>requestAnimationFrame(()=>M(!1)),className:"inline-flex h-7 items-center gap-1 rounded-full border border-white/[0.08] bg-white/[0.03] px-3 text-xs text-white transition-colors hover:border-white/[0.16] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-haspopup":"listbox","aria-expanded":E,children:[g.jsx("span",{className:"max-w-[140px] truncate",children:R}),g.jsx(ho,{className:"h-3.5 w-3.5 text-[#999]"})]}),E&&g.jsxs("div",{className:"absolute right-0 z-10 mt-1 min-w-[160px] overflow-hidden rounded-lg border border-[#333] bg-[#0a0a0a] py-1 shadow-xl",role:"listbox",children:[g.jsx(f_,{label:"Root agent",active:w===Is,onSelect:()=>{k(Is),M(!1)}}),S.map(z=>g.jsx(f_,{label:z.name,active:w===z.id,onSelect:()=>{k(z.id),M(!1)}},z.id))]})]})]}),g.jsx("button",{type:"button",onClick:Z,className:"inline-flex h-7 w-7 items-center justify-center rounded-full text-[#777] transition-colors hover:bg-white/[0.06] hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Collapse live prompt composer",children:g.jsx(ho,{className:"h-4 w-4"})})]})]}),g.jsx("div",{className:"px-5 pt-4 pb-3",children:g.jsx("textarea",{ref:a,rows:1,value:f,onChange:z=>h(z.target.value),onFocus:()=>d(!0),onBlur:()=>d(!1),onKeyDown:z=>{z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),D())},placeholder:"Send a live prompt to the running pentest…",maxLength:4e3,disabled:m,className:"block w-full resize-none border-0 bg-transparent p-0 text-[15px] leading-6 text-white placeholder:text-[#444] focus:outline-none disabled:opacity-60 max-h-[160px] overflow-y-auto"})}),g.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 pb-4",children:[g.jsx("div",{className:"text-xs text-[#666]",children:y??"Press Enter to send."}),g.jsxs("button",{type:"button",onClick:z=>{z.stopPropagation(),D()},disabled:m||U,className:Mr("inline-flex h-10 min-w-[112px] items-center justify-center gap-2 rounded-full px-4 text-sm font-medium transition-colors",m||U?"bg-white/[0.08] text-[#666]":"bg-white text-black hover:bg-neutral-200"),children:[m?g.jsx(qs,{className:"h-4 w-4 animate-spin"}):g.jsx(Dk,{className:"h-4 w-4",strokeWidth:2.5}),g.jsx("span",{children:"Send prompt"})]})]})]}):g.jsxs("button",{type:"button",onClick:B,className:Mr("mt-4 flex w-full items-center justify-between gap-3 rounded-2xl border border-white/[0.08] bg-[#050505] px-5 py-3 text-left transition-colors duration-300 hover:border-white/[0.12] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20",r),"aria-expanded":!1,"aria-label":"Expand live prompt composer",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[g.jsx(Im,{className:"h-4 w-4 shrink-0 text-[#666]"}),g.jsx("span",{className:"truncate text-sm font-medium text-white",children:"Guide the agent"})]}),g.jsx(A_,{className:"h-4 w-4 shrink-0 text-[#777]"})]})}function f_({label:e,active:t,onSelect:r}){return g.jsx("button",{type:"button",role:"option","aria-selected":t,onMouseDown:a=>{a.preventDefault(),r()},className:Mr("block w-full truncate px-3 py-1.5 text-left text-xs transition-colors hover:bg-white/[0.06]",t?"text-white":"text-[#aaa]"),children:e})}const vU={completed:"bg-emerald-400",running:"bg-blue-400",waiting:"bg-yellow-400",stopped:"bg-[#888]",crashed:"bg-red-400",failed:"bg-red-400"},_U=80;function wU({open:e,agent:t,events:r,steerable:a,onClose:s}){const o=ee.useRef(null),c=ee.useRef(!1),[d,f]=ee.useState(e),[h,m]=ee.useState(e?"open":"closed"),[p,y]=ee.useState(!1),x=ee.useRef(t);ee.useEffect(()=>{t&&(x.current=t)},[t]);const _=t??x.current;ee.useEffect(()=>{if(e){f(!0),m("open");return}m("closed");const S=setTimeout(()=>f(!1),140);return()=>clearTimeout(S)},[e]),ee.useEffect(()=>{if(!d){y(!1);return}const S=requestAnimationFrame(()=>y(!0));return()=>cancelAnimationFrame(S)},[d]);const N=ee.useCallback(()=>{const S=o.current;S&&(c.current=S.scrollHeight-S.scrollTop-S.clientHeight<_U)},[]);return ee.useEffect(()=>{const S=o.current;!S||!c.current||requestAnimationFrame(()=>{S.scrollTo({top:S.scrollHeight,behavior:"smooth"})})},[r]),ee.useEffect(()=>{if(!d)return;const S=k=>{k.key==="Escape"&&s()};document.addEventListener("keydown",S);const w=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",S),document.body.style.overflow=w}},[d,s]),!d||!_?null:g.jsx("div",{"data-state":h,className:"agent-modal fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4 sm:p-8",onClick:s,role:"dialog","aria-modal":"true","aria-label":`Agent ${_.name}`,children:g.jsxs("div",{className:"relative flex h-[60vh] w-[calc(100vw-4rem)] max-w-6xl flex-col overflow-hidden rounded-xl border border-[#222] bg-[#0a0a0a] shadow-2xl",onClick:S=>S.stopPropagation(),children:[g.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-[#222] px-5 py-3.5",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[g.jsx("span",{className:`h-2 w-2 flex-shrink-0 rounded-full ${vU[_.status]??"bg-[#888]"}`}),g.jsx("span",{className:"truncate text-sm font-semibold text-white",children:_.name}),g.jsx("span",{className:"flex-shrink-0 font-mono text-xs text-[#555]",children:_.id})]}),g.jsx("button",{type:"button",onClick:s,"aria-label":"Close",className:"flex-shrink-0 rounded-md p-1 text-[#888] transition-colors hover:bg-[#1a1a1a] hover:text-white",children:g.jsx(xp,{className:"h-4 w-4"})})]}),g.jsx("div",{ref:o,onScroll:N,className:"flex-1 overflow-y-auto p-5",children:p&&g.jsx(nU,{agent:_,events:r,showHeader:!1})}),a&&g.jsx("div",{className:"border-t border-[#222] px-5 py-3",children:g.jsx(cS,{agents:[_],fixedAgentId:_.id,className:"mt-0"})})]})})}var uS={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},h_=ua.createContext&&ua.createContext(uS),EU=["attr","size","title"];function NU(e,t){if(e==null)return{};var r,a,s=SU(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;aua.createElement(t.tag,Uu({key:r},t.attr),dS(t.child)))}function hg(e){return t=>ua.createElement(AU,Bu({attr:Uu({},e.attr)},t),dS(e.child))}function AU(e){var t=r=>{var a=e.attr,s=e.size,o=e.title,c=NU(e,EU),d=s||r.size||"1em",f;return r.className&&(f=r.className),e.className&&(f=(f?f+" ":"")+e.className),ua.createElement("svg",Bu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,a,c,{className:f,style:Uu(Uu({color:e.color||r.color},r.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),o&&ua.createElement("title",null,o),e.children)};return h_!==void 0?ua.createElement(h_.Consumer,null,r=>t(r)):t(uS)}function MU(e){return hg({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"5",cy:"6",r:"3"},child:[]},{tag:"path",attr:{d:"M5 9v12"},child:[]},{tag:"circle",attr:{cx:"19",cy:"18",r:"3"},child:[]},{tag:"path",attr:{d:"m15 9-3-3 3-3"},child:[]},{tag:"path",attr:{d:"M12 6h5a2 2 0 0 1 2 2v7"},child:[]}]})(e)}function OU(e){return hg({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.95703C15 4.58711 14.8563 4.24054 14.5949 3.97992L12.0096 1.39234C11.4879 0.86922 10.5788 0.86922 10.0571 1.39234L8 3.45119V3.32321C8 2.55068 7.37187 1.922 6.6 1.922H2.4C1.62813 1.922 1 2.55068 1 3.32321V13.5988C1 14.3713 1.62813 15 2.4 15H12.6667C13.4385 15 14.0667 14.3713 14.0667 13.5988V9.39514C14.0667 8.62261 13.4385 7.99393 12.6667 7.99393H12.5379L14.5949 5.93508C14.8553 5.67445 15 5.32602 15 4.95703ZM2.4 2.85521H6.6C6.85667 2.85521 7.06667 3.06446 7.06667 3.32228V7.99299H1.93333V3.32228C1.93333 3.06446 2.14333 2.85521 2.4 2.85521ZM1.93333 13.5979V8.92714H7.06667V14.0649H2.4C2.14333 14.0649 1.93333 13.8547 1.93333 13.5979ZM13.1333 9.39421V13.5979C13.1333 13.8547 12.9233 14.0649 12.6667 14.0649H8V8.92714H12.6667C12.9233 8.92714 13.1333 9.13638 13.1333 9.39421ZM8 7.99299V6.46287L9.5288 7.99299H8ZM13.9351 5.2737L11.3488 7.86221C11.1789 8.03223 10.8859 8.03223 10.716 7.86221L8.12973 5.2737C8.0448 5.18963 7.99813 5.07753 7.99813 4.95796C7.99813 4.83839 8.0448 4.7263 8.12973 4.64129L10.716 2.05278C10.8009 1.96777 10.9129 1.92106 11.0324 1.92106C11.1519 1.92106 11.2639 1.96777 11.3488 2.05278L13.9351 4.64129C14.02 4.72536 14.0667 4.83746 14.0667 4.95703C14.0667 5.0766 14.02 5.1887 13.9351 5.2737Z"},child:[]}]})(e)}function fS(e){return hg({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M431 320.6c-1-3.6 1.2-8.6 3.3-12.2a34 34 0 0 1 2.1-3.1A162 162 0 0 0 464 215c.3-92.2-77.5-167-173.7-167-83.9 0-153.9 57.1-170.3 132.9a160.7 160.7 0 0 0-3.7 34.2c0 92.3 74.8 169.1 171 169.1 15.3 0 35.9-4.6 47.2-7.7s22.5-7.2 25.4-8.3a26.4 26.4 0 0 1 9.3-1.7 26 26 0 0 1 10.1 2l56.7 20.1a13.5 13.5 0 0 0 3.9 1 8 8 0 0 0 8-8 13 13 0 0 0-.5-2.7z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M66.46 232a146.23 146.23 0 0 0 6.39 152.67c2.31 3.49 3.61 6.19 3.21 8s-11.93 61.87-11.93 61.87a8 8 0 0 0 2.71 7.68A8.17 8.17 0 0 0 72 464a7.3 7.3 0 0 0 2.91-.6l56.21-22a15.7 15.7 0 0 1 12 .2c18.94 7.38 39.88 12 60.83 12A159.2 159.2 0 0 0 284 432.11"},child:[]}]})(e)}const RU=[{icon:xC,label:"PR security reviews"},{icon:iT,label:"Attack surface monitoring"},{icon:vT,label:"Real-time threat intelligence"},{icon:Hk,label:"Scheduled pentesting"},{icon:gT,label:"One-click autofix"},{icon:$C,label:"Jira, Linear & Slack integrations"}];function DU({open:e,onClose:t,description:r,source:a="sidebar"}){const[s,o]=ee.useState(e),[c,d]=ee.useState(e?"open":"closed");return ee.useEffect(()=>{if(e){o(!0),d("open");return}d("closed");const f=setTimeout(()=>o(!1),200);return()=>clearTimeout(f)},[e]),ee.useEffect(()=>{if(!s)return;const f=m=>{m.key==="Escape"&&t()};document.addEventListener("keydown",f);const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",f),document.body.style.overflow=h}},[s,t]),s?g.jsx("div",{"data-state":c,className:"dialog-overlay fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4",onClick:t,role:"dialog","aria-modal":"true","aria-label":"Upgrade your plan",children:g.jsxs("div",{"data-state":c,className:"dialog-panel relative w-full max-w-md rounded-2xl border border-[#222] bg-black p-6 shadow-lg sm:rounded-lg",onClick:f=>f.stopPropagation(),children:[g.jsx("button",{type:"button",onClick:t,"aria-label":"Close",className:"absolute right-4 top-4 rounded-md p-1 text-[#888] transition-colors hover:bg-[#1a1a1a] hover:text-white",children:g.jsx(xp,{className:"h-4 w-4"})}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-lg text-white",children:"Available in Strix Cloud"}),r&&g.jsx("p",{className:"mt-2 text-base leading-relaxed text-[#e5e5e5]",children:r})]}),g.jsxs("div",{className:"space-y-4 pt-4",children:[g.jsxs("div",{className:"rounded-xl border border-[#333] bg-[#0a0a0a] p-4 sm:rounded-lg",children:[g.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[g.jsx(Im,{className:"h-4 w-4 text-blue-400"}),g.jsx("span",{className:"text-sm font-medium text-white",children:"Strix Cloud also includes"})]}),g.jsx("ul",{className:"space-y-2 text-sm text-[#888]",children:RU.map(f=>g.jsxs("li",{className:"flex items-center gap-2",children:[g.jsx(f.icon,{className:"h-3.5 w-3.5 text-[#555]"}),f.label]},f.label))})]}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("a",{href:fa($u,"upgrade_try_free"),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr("upgrade_try_free",a),className:"flex h-10 w-full items-center justify-center gap-2 rounded-lg bg-white px-4 text-sm font-semibold text-black transition-colors hover:bg-neutral-200",children:["Open Strix Cloud",g.jsx(ty,{className:"h-3.5 w-3.5"})]}),g.jsxs("a",{href:fa(ST,"upgrade_view_plans"),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr("upgrade_view_plans",a),className:"flex h-9 w-full items-center justify-center gap-1.5 rounded-lg border border-[#333] px-4 text-sm font-medium text-[#888] transition-colors hover:border-[#555] hover:text-white",children:["Learn more",g.jsx(ty,{className:"h-3 w-3"})]})]})]})]})}):null}const Dm=160,jm=260,ro=400,jU=140,p_="strix_viewer_sidebar_width",g_="strix_viewer_sidebar_collapsed";function LU(e,t){try{const r=localStorage.getItem(e),a=r?parseInt(r,10):NaN;return Number.isFinite(a)?a:t}catch{return t}}function zU({view:e,onSelectView:t,issuesCount:r,agentCount:a,runCount:s,finished:o,verified:c,email:d,onOpenEmail:f,onOpenHistory:h,onForget:m}){var z;const[p,y]=ee.useState(()=>{const V=LU(p_,jm);return Math.min(ro,Math.max(Dm,V))}),[x,_]=ee.useState(()=>{try{return localStorage.getItem(g_)==="1"}catch{return!1}}),[N,S]=ee.useState(!1),[w,k]=ee.useState(!1),[E,M]=ee.useState(null),I=ee.useRef(null),R=(V,P)=>{Dr(V,"sidebar"),M(P)},U=ee.useCallback(V=>{y(V);try{localStorage.setItem(p_,String(V))}catch{}},[]),B=ee.useCallback(V=>{_(V);try{localStorage.setItem(g_,V?"1":"0")}catch{}},[]),Z=ee.useCallback(()=>{B(!1),U(jm)},[B,U]),D=ee.useCallback(V=>{V.preventDefault(),S(!0)},[]);return ee.useEffect(()=>{if(!N||x)return;const V=T=>{const $=T.clientX;$>=Dm&&$<=ro?y($):$>ro&&y(ro)},P=T=>{const $=T.clientX;${window.removeEventListener("mousemove",V),window.removeEventListener("mouseup",P)}},[N,x,B,U]),ee.useEffect(()=>{if(!w)return;const V=P=>{I.current&&!I.current.contains(P.target)&&k(!1)};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[w]),g.jsxs(g.Fragment,{children:[x&&g.jsx("div",{className:"fixed left-0 top-0 z-40 hidden h-full w-4 cursor-pointer transition-colors hover:bg-[rgba(255,255,255,0.08)] lg:block",onClick:Z,title:"Expand sidebar"}),g.jsxs("aside",{className:Mr("sticky top-0 z-20 hidden h-screen flex-shrink-0 flex-col overflow-hidden border-r border-[rgba(255,255,255,0.08)] bg-black lg:flex",!N&&"transition-[width] duration-200 ease-out"),style:{width:x?0:p},children:[g.jsx("header",{className:"relative flex flex-col gap-1 pt-1 min-w-[160px]",children:g.jsx("div",{className:"flex flex-row py-1 px-2",children:g.jsxs("div",{className:"flex h-10 w-full flex-row items-center",children:[g.jsxs("a",{href:fa("https://app.strix.ai","logo"),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr("logo","sidebar"),className:"flex flex-1 flex-row items-center gap-2 rounded-md py-2 pl-2.5 pr-1 min-w-0 transition-colors hover:bg-[rgba(255,255,255,0.06)]",title:"Open Strix Cloud",children:[g.jsx("span",{className:"flex flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-emerald-400 to-cyan-500",style:{width:20,height:20},children:g.jsx("span",{className:"text-[10px] font-semibold text-white",children:"S"})}),g.jsxs("span",{className:"flex flex-1 flex-row items-center gap-2 min-w-0",children:[g.jsx("span",{className:"truncate min-w-0 text-[14px] font-medium text-[#ededed]",children:"Strix"}),g.jsx("span",{className:"flex h-5 flex-shrink-0 items-center rounded px-2 text-[11px] font-medium text-[#888] bg-[rgba(255,255,255,0.08)]",children:"Local"})]})]}),g.jsx("a",{href:fa("https://app.strix.ai","logo"),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr("logo","sidebar"),className:"flex flex-none items-center rounded-md px-1.5 py-2 transition-colors hover:bg-[rgba(255,255,255,0.06)]","aria-label":"Open Strix Cloud",children:g.jsx(Kk,{className:"h-4 w-4 text-[#666]"})})]})})}),g.jsx("nav",{className:"relative min-w-[160px] flex-1 overflow-y-auto overflow-x-clip scrollbar-thin pb-10 pt-2",children:g.jsxs("div",{className:"relative flex flex-col gap-px px-2",children:[g.jsx(yi,{icon:g.jsx(IU,{}),label:"Pentest Overview",active:e==="overview",onClick:()=>t("overview")}),g.jsx(yi,{icon:g.jsx(fT,{className:"h-4 w-4"}),label:"Issues",count:r>0?r:void 0,active:e==="issues",onClick:()=>t("issues")}),a>0&&g.jsx(yi,{icon:g.jsx(Ao,{className:"h-4 w-4"}),label:"Agents",count:a,active:e==="agents",onClick:()=>t("agents")}),g.jsx(yi,{icon:g.jsx(Vs,{className:"h-4 w-4"}),label:"Past runs",count:s>0?s:void 0,active:e==="history",onClick:h}),o&&g.jsx(yi,{icon:g.jsx(bp,{className:"h-4 w-4"}),label:"Export report",active:e==="email",onClick:f}),g.jsx(yi,{icon:g.jsx(fS,{className:"h-4 w-4"}),label:"Feedback & support",active:e==="feedback",onClick:()=>t("feedback")}),g.jsx("hr",{className:"mx-0 my-1 h-px w-full border-0 bg-[rgba(255,255,255,0.08)]"}),g.jsx(yi,{icon:g.jsx(MU,{className:"h-4 w-4"}),label:"PR Security Reviews",active:!1,onClick:()=>R("pr_reviews","Strix reviews every pull request and flags exploitable changes before they merge.")}),g.jsx(yi,{icon:g.jsx(OU,{className:"h-4 w-4"}),label:"Integrations",active:!1,onClick:()=>R("integrations","Sync findings to Jira, Linear, and Slack so fixes happen where your team already works.")}),g.jsx(yi,{icon:g.jsx(mT,{className:"h-4 w-4"}),label:"Members",active:!1,onClick:()=>R("members","Invite your team, set roles, and share findings and run history across your org.")})]})}),g.jsx("section",{className:"flex min-w-[160px] flex-col gap-0.5",ref:I,children:g.jsxs("div",{className:"relative p-2",children:[c&&d?g.jsxs("button",{onClick:()=>k(V=>!V),className:"relative flex w-full cursor-pointer items-center gap-2 rounded-md bg-transparent px-2.5 py-2 transition-colors hover:bg-[rgba(255,255,255,0.06)]",children:[g.jsx("span",{className:"flex flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-emerald-400 to-cyan-500",style:{width:20,height:20},children:g.jsx("span",{className:"text-[9px] font-semibold text-white",children:((z=d[0])==null?void 0:z.toUpperCase())||"U"})}),g.jsxs("span",{className:"flex min-w-0 flex-1 flex-col text-left",children:[g.jsx("span",{className:"truncate text-[13px] font-medium text-[#ededed]",children:d}),g.jsx("span",{className:"truncate text-[11px] text-[#555]",children:"Linked to this machine"})]})]}):g.jsxs("div",{className:"flex items-center gap-2 rounded-md px-2.5 py-2",children:[g.jsx("span",{className:"flex flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-emerald-400 to-cyan-500",style:{width:20,height:20},children:g.jsx("span",{className:"text-[9px] font-semibold text-white",children:"S"})}),g.jsx("span",{className:"flex min-w-0 flex-1 flex-col text-left",children:g.jsx("span",{className:"truncate text-[13px] font-medium text-[#ededed]",children:"Local viewer"})})]}),w&&c&&d&&g.jsxs("div",{className:"absolute bottom-full left-2 right-2 z-50 mb-1 overflow-hidden rounded-lg border border-[#333] bg-black shadow-xl",children:[g.jsxs("div",{className:"border-b border-[#333] px-3 py-2",children:[g.jsx("p",{className:"truncate text-[13px] font-medium text-white",children:"Linked email"}),g.jsx("p",{className:"truncate text-[11px] text-[#666]",children:d})]}),g.jsxs("button",{onClick:()=>{k(!1),m()},className:"flex w-full items-center gap-2 px-3 py-2 text-[13px] text-[#888] transition-colors hover:bg-[rgba(255,255,255,0.06)] hover:text-red-400",children:[g.jsx(LC,{className:"h-4 w-4"}),"Forget this email"]})]})]})}),g.jsx("div",{className:"group absolute right-0 top-0 z-30 h-full w-1 cursor-col-resize",onMouseDown:D,children:g.jsx("div",{className:Mr("absolute right-0 top-0 h-full w-px bg-[rgba(255,255,255,0.08)] transition-all duration-100",N?"w-0.5 bg-[rgba(255,255,255,0.3)]":"group-hover:bg-[rgba(255,255,255,0.2)]")})})]}),N&&g.jsx("div",{className:"fixed inset-0 z-10 cursor-col-resize"}),g.jsx(DU,{open:E!==null,description:E??"",source:"sidebar",onClose:()=>M(null)})]})}function yi({icon:e,label:t,active:r,onClick:a,count:s}){return g.jsxs("button",{onClick:a,className:Mr("group flex h-9 w-full origin-left flex-row items-center rounded-md transition-colors",r?"bg-[rgba(255,255,255,0.12)] text-white":"text-[#888] hover:bg-[rgba(255,255,255,0.06)] hover:text-[#ededed]"),children:[g.jsx("div",{className:"grid flex-none place-content-center",style:{width:36,height:36},children:e}),g.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-[14px] font-medium",children:t}),s!=null&&g.jsx("span",{className:"mr-2 flex-none rounded-full border border-white/10 px-2 py-0.5 text-[10px] tabular-nums leading-none text-[#777]",children:s})]})}function IU(){return g.jsx("svg",{style:{width:16,height:16,color:"currentcolor"},viewBox:"0 0 16 16",fill:"currentColor",children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 5.5V2.5H5.5V5.5H2.5ZM1 2C1 1.44772 1.44772 1 2 1H6C6.55228 1 7 1.44772 7 2V6C7 6.55228 6.55228 7 6 7H2C1.44772 7 1 6.55228 1 6V2ZM2.5 13.5V10.5H5.5V13.5H2.5ZM1 10C1 9.44772 1.44772 9 2 9H6C6.55228 9 7 9.44772 7 10V14C7 14.5523 6.55228 15 6 15H2C1.44772 15 1 14.5523 1 14V10ZM10.5 2.5V5.5H13.5V2.5H10.5ZM10 1C9.44772 1 9 1.44772 9 2V6C9 6.55228 9.44772 7 10 7H14C14.5523 7 15 6.55228 15 6V2C15 1.44772 14.5523 1 14 1H10ZM10.5 13.5V10.5H13.5V13.5H10.5ZM9 10C9 9.44772 9.44772 9 10 9H14C14.5523 9 15 9.44772 15 10V14C15 14.5523 14.5523 15 14 15H10C9.44772 15 9 14.5523 9 14V10Z"})})}const b_={work_email_required:"Please use your work email, not a personal one.",rate_limited:"Too many requests. Wait a minute and try again.",invalid_email:"That email does not look right. Check it and try again.",unavailable:"The email service is unavailable right now. Try again shortly."},BU=new Set(["gmail.com","googlemail.com","yahoo.com","ymail.com","outlook.com","hotmail.com","live.com","icloud.com","me.com","aol.com","proton.me","protonmail.com","gmx.com","mail.com"]);function UU({onVerified:e}){const[t,r]=ee.useState("email"),[a,s]=ee.useState(""),[o,c]=ee.useState(""),[d,f]=ee.useState(!1),[h,m]=ee.useState(null),[p,y]=ee.useState(null),x=async()=>{const N=a.trim();if(!N){m("Enter your email to continue.");return}const S=N.slice(N.lastIndexOf("@")+1).toLowerCase();if(BU.has(S)){Tr("work_email_required"),m(b_.work_email_required);return}f(!0),m(null);const w=await lS(N);f(!1),w.ok?(Tr("email_submitted",{purpose:"verify"}),y(`We sent a 6-digit code to ${N}.`),r("code")):(w.error==="work_email_required"&&Tr("work_email_required"),m(b_[w.error]??"Could not send a code. Try again."))},_=async()=>{const N=o.trim();if(N.length<4){m("Enter the 6-digit code from your email.");return}f(!0),m(null);const S=await oS(a.trim(),N);if(f(!1),!S.verified){m("That code did not match. Check it and try again.");return}Tr("email_verified",{purpose:"verify"}),e()};return g.jsxs("div",{className:"mx-auto mt-5 max-w-sm text-left",children:[h&&g.jsxs("div",{className:"mb-3 flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/5 px-3 py-2",children:[g.jsx(Hu,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-red-400","aria-hidden":"true"}),g.jsx("p",{className:"text-xs text-red-300",children:h})]}),p&&!h&&g.jsx("p",{className:"mb-3 text-xs text-[#888]",children:p}),t==="email"?g.jsxs("form",{className:"space-y-3",onSubmit:N=>{N.preventDefault(),x()},children:[g.jsxs("label",{className:"block",children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"Your work email"}),g.jsx("input",{type:"email",autoFocus:!0,value:a,onChange:N=>s(N.target.value),placeholder:"you@company.com",className:"w-full rounded-lg bg-black px-3 py-2.5 text-sm text-white outline-none transition-colors focus:border-[#444]",style:{border:"1px solid #2a2a2a"}}),g.jsx("span",{className:"mt-1.5 block text-[11px] text-[#666]",children:"Use your work email."})]}),g.jsxs("button",{type:"submit",disabled:d,className:"flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-white px-4 py-2.5 text-sm font-semibold text-black transition-opacity hover:opacity-90 disabled:opacity-60",children:[d&&g.jsx(qs,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),"Send me a code"]})]}):g.jsxs("form",{className:"space-y-3",onSubmit:N=>{N.preventDefault(),_()},children:[g.jsxs("label",{className:"block",children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"6-digit code"}),g.jsx("input",{inputMode:"numeric",autoFocus:!0,value:o,onChange:N=>c(N.target.value.replace(/\D/g,"").slice(0,6)),placeholder:"123456",className:"w-full rounded-lg bg-black px-3 py-2.5 text-center text-lg font-mono tracking-[0.4em] text-white outline-none transition-colors focus:border-[#444]",style:{border:"1px solid #2a2a2a"}})]}),g.jsxs("button",{type:"submit",disabled:d,className:"flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-white px-4 py-2.5 text-sm font-semibold text-black transition-opacity hover:opacity-90 disabled:opacity-60",children:[d&&g.jsx(qs,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),"Verify"]}),g.jsx("button",{type:"button",onClick:()=>{r("email"),m(null),y(null)},className:"w-full cursor-pointer text-center text-xs text-[#666] transition-colors hover:text-[#aaa]",children:"Use a different email"})]})]})}const HU=[{key:"critical",dot:"bg-red-500",text:"text-red-500"},{key:"high",dot:"bg-orange-500",text:"text-orange-500"},{key:"medium",dot:"bg-yellow-500",text:"text-yellow-500"},{key:"low",dot:"bg-blue-500",text:"text-blue-500"}];function $U({counts:e}){const t=HU.filter(r=>e[r.key]>0);return t.length===0?g.jsx("span",{className:"text-xs text-[#555]",children:"No findings"}):g.jsx("div",{className:"flex items-center gap-3",children:t.map(r=>g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:`h-2 w-2 rounded-full ${r.dot}`,"aria-hidden":"true"}),g.jsx("span",{className:`text-xs tabular-nums ${r.text}`,children:e[r.key]})]},r.key))})}function qU(e){if(!e)return null;const t=e.trim().replace(" UTC","Z").replace(" ","T"),r=new Date(t);return Number.isNaN(r.getTime())?null:r.toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function x_(e){if(!e)return null;const t=e.trim().replace(" UTC","Z").replace(" ","T"),r=new Date(t);if(Number.isNaN(r.getTime()))return null;const a=Date.now()-r.getTime(),s=Math.floor(a/6e4);if(s<1)return"just now";if(s<60)return`${s}m ago`;const o=Math.floor(s/60);if(o<24)return`${o}h ago`;const c=Math.floor(o/24);return c<7?`${c}d ago`:qU(e)}function PU({runs:e,activeRun:t,onSelectRun:r,onVerified:a}){const s=(e==null?void 0:e.count)??0,[o,c]=ee.useState(!1);return!e||e.locked?g.jsxs("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-8 text-center",children:[g.jsx("div",{className:"mx-auto mb-4 flex h-11 w-11 items-center justify-center rounded-xl",style:{border:"1px solid #2a2a2a",background:"rgba(255,255,255,0.04)"},children:g.jsx(Vs,{className:"h-5 w-5 text-[#888]","aria-hidden":"true"})}),g.jsx("h2",{className:"text-base font-semibold text-white",children:"Browse every run on this machine"}),g.jsxs("p",{className:"mx-auto mt-1.5 max-w-md text-sm text-[#888]",children:["You have ",s," past ",s===1?"run":"runs"," on this machine."]}),o?g.jsxs(g.Fragment,{children:[g.jsx("p",{className:"mx-auto mt-3 max-w-sm text-xs text-[#666]",children:"Verify your email with a one-time code to unlock the full history."}),g.jsx(UU,{onVerified:a})]}):g.jsx("button",{onClick:()=>{Dr("history_unlock","past_runs"),c(!0)},className:"mt-4 cursor-pointer rounded-lg bg-white px-4 py-2 text-sm font-semibold text-black transition-opacity hover:opacity-90",children:"View runs"}),g.jsxs("p",{className:"mt-4 flex items-center justify-center gap-1.5 text-xs text-[#555]",children:[g.jsx(z_,{className:"h-3.5 w-3.5","aria-hidden":"true"}),"Or open one from the CLI with"," ",g.jsx("code",{className:"font-mono text-[#888]",children:"strix view "})]})]}):e.runs.length===0?g.jsx("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-8 text-center text-sm text-[#888]",children:"No past runs found on this machine yet."}):g.jsx("div",{className:"space-y-2",children:e.runs.map(d=>{const f=d.name===t,h=x_(d.start_time)??x_(d.end_time),m=bo(d.target,d.name);return g.jsxs("button",{onClick:()=>r(d.name),className:`animate-card-in group flex w-full cursor-pointer items-center gap-4 rounded-lg border px-4 py-3 text-left transition-colors ${f?"border-[#444] bg-[rgba(255,255,255,0.04)]":"border-[#222] bg-[rgba(255,255,255,0.02)] hover:border-[#444]"}`,children:[g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"truncate text-sm font-medium text-white",children:m}),f&&g.jsx("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-emerald-400",style:{border:"1px solid rgba(16,185,129,0.3)"},children:"Active"})]}),g.jsxs("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-[#666]",children:[d.scan_mode&&g.jsx("span",{className:"capitalize",children:d.scan_mode}),d.scan_mode&&(h||d.status)&&g.jsx("span",{className:"text-[#333]",children:"·"}),h&&g.jsx("span",{children:h}),h&&d.status&&g.jsx("span",{className:"text-[#333]",children:"·"}),d.status&&g.jsx("span",{className:"capitalize",children:d.status})]})]}),g.jsx($U,{counts:d.severity_counts}),g.jsx(Vk,{className:"h-4 w-4 flex-shrink-0 text-[#555] transition-colors group-hover:text-[#aaa]","aria-hidden":"true"})]},d.name)})})}const y_={work_email_required:"Please use your work email, not a personal one.",rate_limited:"Too many requests. Wait a minute and try again.",invalid_email:"That email does not look right. Check it and try again.",unavailable:"The email service is unavailable right now. Try again shortly."},FU={forbidden:"This email was unsubscribed from Strix, so we cannot send to it.",too_large:"This report is too large to email. Try a smaller run.",unavailable:"The email service is unavailable right now. Try again shortly."},GU=new Set(["gmail.com","googlemail.com","yahoo.com","ymail.com","outlook.com","hotmail.com","live.com","icloud.com","me.com","aol.com","proton.me","protonmail.com","gmx.com","mail.com"]);function VU({activeRun:e,auth:t,purpose:r,skipDisclosure:a=!1,onAuthChanged:s,onExit:o}){const c=(t==null?void 0:t.verified)===!0,d=r==="verify",[f,h]=ee.useState(()=>d?"email":a?c?"sending":"email":"disclosure"),[m,p]=ee.useState((t==null?void 0:t.email)??""),[y,x]=ee.useState(""),[_,N]=ee.useState(!1),[S,w]=ee.useState(null),[k,E]=ee.useState(null),[M,I]=ee.useState(""),[R,U]=ee.useState(""),[B,Z]=ee.useState(!1),[D,z]=ee.useState(""),V=ee.useRef(!1),P=async()=>{h("sending"),w(null);const K=await yU(e);if(K.ok){Tr("report_sent"),I(K.password),U(K.filename),h("password");return}if(K.error==="reverify"||K.error==="unverified"){E("Your verification expired. Enter your email to verify again."),h("email");return}w(FU[K.error]??"Could not send the report. Try again."),h("disclosure")},T=()=>{w(null),E(null),c?P():h("email")};ee.useEffect(()=>{!d&&a&&c&&!V.current&&(V.current=!0,P())},[]);const $=async()=>{const K=m.trim();if(!K){w("Enter your email to continue.");return}const C=K.slice(K.lastIndexOf("@")+1).toLowerCase();if(GU.has(C)){Tr("work_email_required"),w(y_.work_email_required);return}N(!0),w(null);const j=await lS(K);N(!1),j.ok?(Tr("email_submitted",{purpose:r}),E(`We sent a 6-digit code to ${K}.`),h("code")):(j.error==="work_email_required"&&Tr("work_email_required"),w(y_[j.error]??"Could not send a code. Try again."))},O=async()=>{const K=y.trim();if(K.length<4){w("Enter the 6-digit code from your email.");return}N(!0),w(null);const C=await oS(m.trim(),K);if(N(!1),!C.verified){w("That code did not match. Check it and try again.");return}Tr("email_verified",{purpose:r}),z(C.email),s(),d?o("history"):P()},H=async()=>{try{await navigator.clipboard.writeText(M),Z(!0),setTimeout(()=>Z(!1),1500)}catch{}},X=D||(t==null?void 0:t.email)||m.trim();return g.jsxs("div",{className:"mx-auto max-w-xl space-y-4",children:[g.jsxs("button",{onClick:()=>o(d?"history":"overview"),className:"cursor-pointer inline-flex items-center gap-1.5 text-sm text-[#888] transition-colors hover:text-white",children:[g.jsx(gp,{className:"h-4 w-4"}),d?"Back to past runs":"Back to results"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(bp,{className:"h-5 w-5 text-[#888]","aria-hidden":"true"}),g.jsx("h1",{className:"text-2xl font-semibold text-white",children:d?"Verify your email":"Export report to PDF"})]}),g.jsxs("div",{className:"w-full rounded-2xl bg-[rgba(255,255,255,0.02)] p-6",style:{border:"1px solid #2a2a2a"},children:[g.jsx("p",{className:"mb-4 text-xs text-[#666]",children:d?"We send a one-time code to confirm it is you.":"Verified by a one-time code sent to your email"}),S&&g.jsxs("div",{className:"mb-4 flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/5 px-3 py-2",children:[g.jsx(Hu,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-red-400","aria-hidden":"true"}),g.jsx("p",{className:"text-xs text-red-300",children:S})]}),k&&!S&&f!=="password"&&g.jsx("p",{className:"mb-4 text-xs text-[#888]",children:k}),f==="disclosure"&&g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2.5 rounded-lg p-3.5",style:{border:"1px solid #222",background:"rgba(255,255,255,0.02)"},children:[g.jsxs("div",{className:"flex items-start gap-2.5",children:[g.jsx(L_,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-emerald-400","aria-hidden":"true"}),g.jsxs("p",{className:"text-xs leading-relaxed text-[#aaa]",children:["We email an ",g.jsx("span",{className:"text-white",children:"encrypted PDF"}),". Nothing else leaves your machine."]})]}),g.jsxs("div",{className:"flex items-start gap-2.5",children:[g.jsx(DC,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-[#888]","aria-hidden":"true"}),g.jsx("p",{className:"text-xs leading-relaxed text-[#aaa]",children:"Only you hold the password; Strix can't read it."})]})]}),g.jsx("button",{onClick:T,className:"w-full cursor-pointer rounded-lg bg-white px-4 py-2.5 text-sm font-semibold text-black transition-opacity hover:opacity-90",children:"Export report"}),c&&(t==null?void 0:t.email)&&g.jsxs("p",{className:"text-center text-xs text-[#666]",children:["Sending to ",t.email]})]}),f==="email"&&g.jsxs("form",{className:"space-y-4",onSubmit:K=>{K.preventDefault(),$()},children:[g.jsxs("label",{className:"block",children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"Your work email"}),g.jsx("input",{type:"email",autoFocus:!0,value:m,onChange:K=>p(K.target.value),placeholder:"you@company.com",className:"w-full rounded-lg bg-black px-3 py-2.5 text-sm text-white outline-none transition-colors focus:border-[#444]",style:{border:"1px solid #2a2a2a"}})]}),g.jsxs("button",{type:"submit",disabled:_,className:"flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-white px-4 py-2.5 text-sm font-semibold text-black transition-opacity hover:opacity-90 disabled:opacity-60",children:[_&&g.jsx(qs,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),"Send me a code"]})]}),f==="code"&&g.jsxs("form",{className:"space-y-4",onSubmit:K=>{K.preventDefault(),O()},children:[g.jsxs("label",{className:"block",children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"6-digit code"}),g.jsx("input",{inputMode:"numeric",autoFocus:!0,value:y,onChange:K=>x(K.target.value.replace(/\D/g,"").slice(0,6)),placeholder:"123456",className:"w-full rounded-lg bg-black px-3 py-2.5 text-center text-lg font-mono tracking-[0.4em] text-white outline-none transition-colors focus:border-[#444]",style:{border:"1px solid #2a2a2a"}})]}),g.jsxs("button",{type:"submit",disabled:_,className:"flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-white px-4 py-2.5 text-sm font-semibold text-black transition-opacity hover:opacity-90 disabled:opacity-60",children:[_&&g.jsx(qs,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),d?"Verify":"Verify and send"]}),g.jsx("button",{type:"button",onClick:()=>{h("email"),w(null),E(null)},className:"w-full cursor-pointer text-center text-xs text-[#666] transition-colors hover:text-[#aaa]",children:"Use a different email"})]}),f==="sending"&&g.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[g.jsx(qs,{className:"h-6 w-6 animate-spin text-white","aria-hidden":"true"}),g.jsx("p",{className:"text-sm text-[#aaa]",children:"Generating and encrypting locally..."})]}),f==="password"&&g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2.5",children:[g.jsx(Gs,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-emerald-400","aria-hidden":"true"}),g.jsxs("p",{className:"text-xs text-emerald-200",children:["Sent to ",X,". Open the attached PDF with this password."]})]}),g.jsxs("div",{children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"Your one-time password"}),g.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-black p-3",style:{border:"1px solid #2a2a2a"},children:[g.jsx("code",{className:"flex-1 break-all font-mono text-base text-white",children:M}),g.jsxs("button",{onClick:H,className:"flex cursor-pointer items-center gap-1 rounded-md px-2 py-1 text-xs text-[#aaa] transition-colors hover:bg-[rgba(255,255,255,0.06)] hover:text-white",style:{border:"1px solid #2a2a2a"},children:[B?g.jsx(Gs,{className:"h-3.5 w-3.5"}):g.jsx(mo,{className:"h-3.5 w-3.5"}),B?"Copied":"Copy"]})]}),g.jsxs("p",{className:"mt-2 text-xs text-[#666]",children:["Save this now. Strix never stores it, so we cannot show it again. File:"," ",g.jsx("span",{className:"font-mono text-[#888]",children:R})]})]}),g.jsx("button",{onClick:()=>o("overview"),className:"w-full cursor-pointer rounded-lg px-4 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-[rgba(255,255,255,0.06)]",style:{border:"1px solid #2a2a2a"},children:"Done"})]})]})]})}function la(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function io(e){return Array.isArray(e)?e:[]}function nr(e){return typeof e=="string"&&e.trim()?e:null}function Ia(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function YU(e){return e.replace(/_/g," ")}function v_(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function XU(e){if(e==null||e<0)return"n/a";const t=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60;return t?`${t}h ${r}m ${a}s`:r?`${r}m ${a}s`:`${a}s`}function wn({label:e,children:t}){return g.jsxs("div",{className:"grid grid-cols-[7rem_1fr] gap-3 items-baseline",children:[g.jsx("dt",{className:"text-[11px] uppercase tracking-wide text-[#666]",children:e}),g.jsx("dd",{className:"min-w-0 break-words text-sm text-[#ddd]",children:t})]})}function KU({raw:e,durationSeconds:t}){const[r,a]=ee.useState(!0),s=io(e.targets_info).map(P=>{const T=la(P),$=nr(T.original)??nr(la(T.details).target_url)??"unknown target",O=nr(T.type);return{display:$,type:O?YU(O):null}}),o=nr(e.instruction),c=v_(nr(e.scan_mode)),d=nr(e.scope_mode),f=la(e.diff_scope),h=f.active===!0,m=nr(f.mode),p=nr(e.diff_base),y=e.non_interactive===!0,x=io(e.local_sources).map(P=>{if(typeof P=="string")return P;const T=la(P);return nr(T.source_path)??nr(T.target_path)??""}).filter(Boolean),_=v_(nr(e.status));let N=d??"auto";h&&(N+=` (diff${m?`: ${m}`:""}${p?` vs ${p}`:""})`);const S=la(e.llm_usage),w=Object.keys(S).length>0,k=io(S.agents).map(la),E=Array.from(new Set(k.map(P=>nr(P.model)).filter(P=>!!P))),M=Ia(S.requests),I=Ia(S.input_tokens),R=Ia(la(io(S.input_tokens_details)[0]).cached_tokens),U=Ia(S.output_tokens),B=Ia(la(io(S.output_tokens_details)[0]).reasoning_tokens),Z=Ia(S.total_tokens),D=Ia(S.cost),z=nr(e.auth_mode)==="subscription",V=(P,T)=>g.jsxs("span",{className:"text-[#666]",children:[" (",Ds(P)," ",T,")"]});return g.jsxs("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5",children:[g.jsxs("button",{type:"button",onClick:()=>a(P=>!P),"aria-expanded":r,className:"flex w-full cursor-pointer items-center gap-2 text-left",children:[g.jsx(TC,{className:"h-4 w-4 text-[#888]","aria-hidden":"true"}),g.jsx("h2",{className:"text-sm font-semibold text-white",children:"Run details"}),r?g.jsx(A_,{className:"ml-auto h-4 w-4 text-[#666]","aria-hidden":"true"}):g.jsx(ho,{className:"ml-auto h-4 w-4 text-[#666]","aria-hidden":"true"})]}),r&&g.jsxs("div",{className:"mt-4 grid grid-cols-1 gap-x-8 gap-y-6 md:grid-cols-2",children:[g.jsxs("section",{children:[g.jsx("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wide text-[#555]",children:"Configuration"}),g.jsxs("dl",{className:"space-y-2.5",children:[s.length>0&&g.jsx(wn,{label:"Targets",children:g.jsx("div",{className:"space-y-1",children:s.map((P,T)=>g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx("span",{className:"font-mono text-[#ddd]",children:P.display}),P.type&&g.jsx("span",{className:"rounded-full border border-[#2a2a2a] px-1.5 py-0.5 text-[10px] text-[#888]",children:P.type})]},T))})}),g.jsx(wn,{label:"Instruction",children:o?g.jsx("span",{className:"whitespace-pre-wrap",children:o}):g.jsx("span",{className:"text-[#666]",children:"None"})}),c&&g.jsx(wn,{label:"Pentest mode",children:c}),g.jsx(wn,{label:"Scope",children:N}),g.jsx(wn,{label:"Mode",children:y?"Non-interactive":"Interactive"}),x.length>0&&g.jsx(wn,{label:"Local sources",children:g.jsx("div",{className:"space-y-0.5 font-mono text-[#ddd]",children:x.map((P,T)=>g.jsx("div",{children:P},T))})}),_&&g.jsx(wn,{label:"Status",children:_})]})]}),g.jsxs("section",{children:[g.jsx("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wide text-[#555]",children:"Usage & cost"}),w?g.jsxs("dl",{className:"space-y-2.5 tabular-nums",children:[g.jsx(wn,{label:"Model",children:E.length?E.join(", "):"n/a"}),z&&g.jsx(wn,{label:"Provider",children:g.jsx("span",{className:"inline-flex items-center gap-1.5",children:g.jsx("span",{className:"rounded-full border border-[#22c55e]/40 bg-[#22c55e]/10 px-2 py-0.5 text-[11px] text-[#22c55e]",children:"ChatGPT subscription"})})}),g.jsx(wn,{label:"Run time",children:XU(t)}),M!=null&&g.jsx(wn,{label:"Requests",children:Ds(M)}),I!=null&&g.jsxs(wn,{label:"Input tokens",children:[Ds(I),R!=null&&V(R,"cached")]}),U!=null&&g.jsxs(wn,{label:"Output tokens",children:[Ds(U),B!=null&&V(B,"reasoning")]}),Z!=null&&g.jsx(wn,{label:"Total tokens",children:Ds(Z)}),z?g.jsxs(wn,{label:"Cost",children:[g.jsx("span",{className:"text-[#22c55e]",children:"$0.00"}),g.jsx("span",{className:"text-[#666]",children:" (subscription)"})]}):D!=null&&g.jsxs(wn,{label:"Cost",children:["$",D.toFixed(2)]}),k.length>0&&g.jsx(wn,{label:"Agents",children:Ds(k.length)})]}):g.jsx("p",{className:"text-sm text-[#666]",children:"Not available yet."})]})]})]})}const __="strix_viewer_trust_dismissed";function ZU({message:e}){const[t,r]=ee.useState(()=>{try{return localStorage.getItem(__)==="1"}catch{return!1}});if(t)return null;const a=()=>{try{localStorage.setItem(__,"1")}catch{}r(!0)};return g.jsx("div",{className:"fixed bottom-3 left-3 z-[60] max-w-xs rounded-lg bg-[#0a0a0a] p-3 shadow-2xl",style:{border:"1px solid #2a2a2a"},role:"status",children:g.jsxs("div",{className:"flex gap-2.5",children:[g.jsx(L_,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-emerald-400","aria-hidden":"true"}),g.jsx("p",{className:"text-xs leading-relaxed text-[#aaa]",children:e}),g.jsx("button",{onClick:a,"aria-label":"Dismiss",className:"-mr-0.5 -mt-0.5 flex-shrink-0 cursor-pointer rounded p-0.5 text-[#666] transition-colors hover:text-white",children:g.jsx(xp,{className:"h-3.5 w-3.5"})})]})})}const QU=5e3,w_={invalid_email:"That email doesn't look right.",invalid_message:"Please write a little more.",unavailable:"Couldn't send that just now. Try again."};function WU({defaultEmail:e,onExit:t}){const[r,a]=ee.useState(""),[s,o]=ee.useState(e??""),[c,d]=ee.useState("form"),[f,h]=ee.useState(null),m=r.trim().length>0&&s.trim().length>0&&c!=="sending",p=async()=>{if(!m)return;d("sending"),h(null);const y=await gU(r.trim(),s.trim());if(y.ok){d("sent");return}d("form"),h(w_[y.error]??w_.unavailable)};return g.jsxs("div",{className:"mx-auto max-w-xl space-y-4",children:[g.jsxs("button",{onClick:()=>t("overview"),className:"cursor-pointer inline-flex items-center gap-1.5 text-sm text-[#888] transition-colors hover:text-white",children:[g.jsx(gp,{className:"h-4 w-4"}),"Back to results"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(fS,{className:"h-5 w-5 text-[#888]","aria-hidden":"true"}),g.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Feedback & support"})]}),g.jsx("div",{className:"w-full rounded-2xl bg-[rgba(255,255,255,0.02)] p-6",style:{border:"1px solid #2a2a2a"},children:c==="sent"?g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx(O_,{className:"mt-0.5 h-5 w-5 flex-shrink-0 text-emerald-400","aria-hidden":"true"}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("p",{className:"text-sm font-semibold text-white",children:"Thanks, we got it."}),g.jsx("p",{className:"mt-1 text-xs text-[#888]",children:"We read every message. If it needs a reply, we'll reach out to the email you gave."}),g.jsx("button",{onClick:()=>{a(""),d("form")},className:"mt-4 cursor-pointer text-xs text-[#888] transition-colors hover:text-white",children:"Send more feedback"})]})]}):g.jsxs(g.Fragment,{children:[g.jsx("p",{className:"mb-4 text-xs text-[#666]",children:"Bugs, feature requests, or anything else. Tell us what's on your mind."}),f&&g.jsxs("div",{className:"mb-4 flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/5 px-3 py-2",children:[g.jsx(Hu,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-red-400","aria-hidden":"true"}),g.jsx("p",{className:"text-xs text-red-300",children:f})]}),g.jsxs("label",{className:"block",children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"Your feedback"}),g.jsx("textarea",{autoFocus:!0,value:r,maxLength:QU,onChange:y=>a(y.target.value),rows:5,placeholder:"What's working, what's not, what you'd love to see…",className:"w-full resize-y rounded-lg border border-[#2a2a2a] bg-black px-3 py-2.5 text-sm text-white outline-none transition-colors focus:border-white/50 focus:ring-2 focus:ring-white/10"})]}),g.jsxs("label",{className:"mt-4 block",children:[g.jsx("span",{className:"mb-1.5 block text-xs text-[#888]",children:"Your work email"}),g.jsx("input",{type:"email",value:s,onChange:y=>o(y.target.value),placeholder:"you@company.com",className:"w-full rounded-lg border border-[#2a2a2a] bg-black px-3 py-2.5 text-sm text-white outline-none transition-colors focus:border-white/50 focus:ring-2 focus:ring-white/10"})]}),g.jsx("button",{onClick:()=>void p(),disabled:!m,className:"mt-4 flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-white px-4 py-2.5 text-sm font-semibold text-black transition-opacity hover:opacity-90 disabled:opacity-60",children:c==="sending"?"Sending…":"Send feedback"})]})})]})}function JU({text:e,children:t,className:r=""}){const[a,s]=ee.useState(!1);return g.jsxs("span",{className:`relative inline-flex ${r}`,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onFocus:()=>s(!0),onBlur:()=>s(!1),children:[t,a&&g.jsx("span",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 z-50 mb-2 w-max max-w-[240px] -translate-x-1/2 rounded-md px-2.5 py-1.5 text-xs text-[#ddd] shadow-lg",style:{border:"1px solid #2a2a2a",background:"#0a0a0a"},children:e})]})}function hS({label:e,desc:t,slug:r,icon:a,surface:s}){return g.jsx(JU,{text:t,children:g.jsxs("a",{href:fa($u,r),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr(r,s),className:"group inline-flex items-center gap-2 rounded-lg border border-[#222] bg-[rgba(255,255,255,0.02)] px-3 py-2 text-sm text-[#aaa] transition-colors hover:border-[#444] hover:text-white",children:[g.jsx(a,{className:"h-4 w-4 text-[#888] transition-colors group-hover:text-white","aria-hidden":"true"}),g.jsx("span",{children:e})]})})}const eH="Your findings stay on your machine. They're rendered here locally in your browser and never uploaded or stored by Strix.",E_=["critical","high","medium","low"],tH=500;function nH(){const[e,t]=ee.useState(null),[r,a]=ee.useState(null),[s,o]=ee.useState(null),[c,d]=ee.useState(null),[f,h]=ee.useState("overview"),[m,p]=ee.useState(null),[y,x]=ee.useState(null),[_,N]=ee.useState("report"),[S,w]=ee.useState(!1),[k,E]=ee.useState(!1),M=ee.useCallback(async()=>{try{p(await bU())}catch{}},[]),I=ee.useCallback(async()=>{try{x(await hU())}catch{}},[]);ee.useEffect(()=>{M(),I(),mU().then(C=>E(C.can_steer)).catch(()=>{})},[M,I]);const R=ee.useRef(!1);ee.useEffect(()=>{let C=!1,j;R.current=!1;const Y=()=>{j=setTimeout(L,tH)},L=async()=>{if(!C)try{const{summary:G,raw:q,finished:Q}=await iS(e);if(C)return;if(Q&&!R.current){R.current=!0;const te=await d_(e);C||a(te);return}const[J,W]=await Promise.all([sS(e).catch(()=>({agents:[],events:[]})),aS(G.runId,e).catch(()=>[])]);if(C)return;a(te=>({summary:G,raw:q,finished:Q,transcript:J,vulnerabilities:W,reportMarkdown:(te==null?void 0:te.reportMarkdown)??null})),Y()}catch(G){if(C)return;o(G instanceof Error?G.message:"Could not load run data."),Y()}};return(async()=>{try{const G=await d_(e);if(C)return;a(G),G.finished?R.current=!0:Y()}catch(G){if(C)return;o(G instanceof Error?G.message:"Could not load run data."),Y()}})(),()=>{C=!0,j&&clearTimeout(j)}},[e]);const U=ee.useMemo(()=>r?dU(r.vulnerabilities):null,[r]),B=(r==null?void 0:r.vulnerabilities.find(C=>C.id===c))??null,Z=(r==null?void 0:r.transcript.agents.length)??0,D=(m==null?void 0:m.verified)===!0,z=ee.useRef(!1);ee.useEffect(()=>{z.current=!1},[e]),ee.useEffect(()=>{z.current||!r||(r.finished?(z.current=!0,h("overview")):Z>0&&(z.current=!0,h("agents")))},[r,Z]);const V=ee.useCallback(C=>{z.current=!0,h(C)},[]),P=ee.useCallback(C=>{t(C),d(null),a(null),o(null),z.current=!1},[]),T=ee.useCallback((C,j)=>{Dr("email_report",j),N("report"),w(C),V("email")},[V]),$=ee.useCallback(()=>T(!1,"sidebar"),[T]),O=ee.useCallback(()=>T(!0,"overview"),[T]),H=ee.useCallback(()=>{I(),V("history")},[I,V]),X=ee.useCallback(async()=>{await M(),await I()},[M,I]),K=ee.useCallback(async()=>{await xU(),await M(),await I()},[M,I]);return g.jsxs("div",{className:"min-h-screen bg-black text-white flex",children:[g.jsx(zU,{view:f,onSelectView:C=>{d(null),C==="history"?H():V(C)},issuesCount:(r==null?void 0:r.vulnerabilities.length)??0,agentCount:Z,runCount:(y==null?void 0:y.count)??0,finished:(r==null?void 0:r.finished)??!1,verified:D,email:(m==null?void 0:m.email)??null,onOpenEmail:$,onOpenHistory:H,onForget:()=>void K()}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("div",{className:"border-b border-[#222]",children:g.jsxs("div",{className:"max-w-[88rem] mx-auto px-3 sm:px-6 py-4 flex items-center gap-1.5",children:[g.jsxs("a",{href:fa("https://app.strix.ai","logo"),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr("logo","topbar"),className:"flex items-center gap-1.5 opacity-90 transition-opacity hover:opacity-100 lg:hidden",title:"Open Strix Cloud",children:[g.jsx("img",{src:"./logo.png",alt:"Strix",className:"w-10 h-8 object-cover"}),g.jsx("div",{className:"text-base text-white font-medium tracking-tight",children:"Strix"})]}),r&&g.jsx(iH,{finished:r.finished}),g.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[D&&y&&!y.locked&&y.runs.length>0&&g.jsx(rH,{runs:y,activeRun:e,launchedName:bo((r==null?void 0:r.summary.targets[0])??null,(r==null?void 0:r.summary.runName)??(r==null?void 0:r.summary.runId)??"Current run"),onSelect:P}),g.jsxs("a",{href:fa($u,"run_in_cloud"),target:"_blank",rel:"noopener noreferrer",onClick:()=>Dr("run_in_cloud","topbar"),className:"inline-flex items-center gap-1 rounded-lg bg-white px-3 py-1.5 text-xs font-semibold text-black transition-opacity hover:opacity-90",children:["Run in the cloud",g.jsx(k_,{className:"w-3 h-3","aria-hidden":"true"})]})]})]})}),g.jsxs("div",{className:"max-w-[88rem] mx-auto px-3 sm:px-6 py-8 sm:py-12 space-y-6",children:[s&&!r&&f!=="history"&&f!=="email"&&g.jsxs("div",{className:"rounded-lg px-4 py-3 flex gap-3 items-start border border-red-500/30 bg-red-500/5",children:[g.jsx(Hu,{className:"w-5 h-5 flex-shrink-0 mt-0.5 text-red-400","aria-hidden":"true"}),g.jsx("p",{className:"text-sm text-red-300",children:s})]}),g.jsx("div",{className:"animate-page-in space-y-6",children:f==="email"?g.jsx(VU,{activeRun:e,auth:m,purpose:_,skipDisclosure:S,onAuthChanged:()=>{M(),I()},onExit:C=>h(C==="history"?"history":"overview")}):f==="feedback"?g.jsx(WU,{defaultEmail:(m==null?void 0:m.email)??null,onExit:C=>h(C)}):f==="history"?g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Vs,{className:"w-5 h-5 text-[#888]","aria-hidden":"true"}),g.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Past runs"})]}),g.jsx(PU,{runs:y,activeRun:e,onSelectRun:P,onVerified:()=>void X()})]}):!r&&!s?g.jsxs("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-10 text-center",children:[g.jsx("div",{className:"w-6 h-6 mx-auto mb-3 rounded-full border-2 border-[#333] border-t-white animate-spin"}),g.jsx("p",{className:"text-sm text-[#888]",children:"Loading run data…"})]}):r&&U?g.jsxs(g.Fragment,{children:[g.jsx(sH,{summary:r.summary}),g.jsxs("div",{className:"flex gap-5 border-b border-[#2a2a2a] lg:hidden",children:[g.jsx(zm,{active:f==="overview",onClick:()=>V("overview"),children:"Pentest Overview"}),g.jsxs(zm,{active:f==="issues",onClick:()=>V("issues"),children:["Issues",r.vulnerabilities.length>0?` (${r.vulnerabilities.length})`:""]}),Z>0&&g.jsxs(zm,{active:f==="agents",onClick:()=>V("agents"),children:["Agents (",Z,")"]})]}),f==="overview"?g.jsx(dH,{summary:r.summary,counts:U,total:r.vulnerabilities.length,reportMarkdown:r.reportMarkdown,raw:r.raw,finished:r.finished,onOpenEmail:O}):f==="agents"&&Z>0?g.jsx(fH,{run:r,canSteer:k}):B?g.jsxs("div",{className:"space-y-4",children:[g.jsxs("button",{onClick:()=>d(null),className:"cursor-pointer inline-flex items-center gap-1.5 text-sm text-[#888] hover:text-white transition-colors",children:[g.jsx(gp,{className:"w-4 h-4"})," Back to all findings"]}),g.jsx(WD,{vulnerability:B})]}):g.jsx(lH,{vulnerabilities:r.vulnerabilities,finished:r.finished,onSelect:C=>d(C)})]}):null},`${e??"launched"}:${f}:${c??""}`)]})]}),g.jsx(ZU,{message:eH})]})}function rH({runs:e,activeRun:t,launchedName:r,onSelect:a}){const[s,o]=ee.useState(!1),c=e.runs.find(f=>f.name===t),d=c?bo(c.target,c.name):r;return g.jsxs("div",{className:"relative",children:[g.jsxs("button",{onClick:()=>o(f=>!f),onBlur:()=>setTimeout(()=>o(!1),150),"aria-label":"Switch pentest",className:"flex items-center gap-2 rounded-lg border border-[#3a3a3a] bg-[rgba(255,255,255,0.05)] px-3 py-2 text-sm text-white transition-colors hover:border-[#555] hover:bg-[rgba(255,255,255,0.09)]",children:[g.jsx(Vs,{className:"h-4 w-4 flex-shrink-0 text-[#888]","aria-hidden":"true"}),g.jsx("span",{className:"flex-shrink-0 text-[#888]",children:"Pentest"}),g.jsx("span",{className:"max-w-[260px] truncate font-medium",children:d}),g.jsx(ho,{className:"h-4 w-4 flex-shrink-0 text-[#aaa]","aria-hidden":"true"})]}),s&&g.jsxs("div",{className:"absolute right-0 z-50 mt-2 max-h-96 w-96 overflow-y-auto rounded-xl py-1.5 shadow-2xl",style:{border:"1px solid #3a3a3a",background:"#0a0a0a"},children:[g.jsx("div",{className:"border-b border-[#222] px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-[#666]",children:"Switch pentest"}),e.runs.map(f=>{const h=f.name===t;return g.jsxs("button",{onMouseDown:()=>a(f.name),className:`flex w-full items-center gap-2 px-3 py-2.5 text-left text-sm transition-colors hover:bg-[rgba(255,255,255,0.06)] ${h?"bg-[rgba(255,255,255,0.04)] text-white":"text-[#aaa]"}`,children:[g.jsxs("span",{className:"min-w-0 flex-1",children:[g.jsx("span",{className:"block truncate font-medium",children:bo(f.target,f.name)}),f.target&&g.jsx("span",{className:"block truncate font-mono text-xs text-[#666]",children:f.target})]}),h&&g.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-emerald-400"})]},f.name)})]})]})}function iH({finished:e}){return e?g.jsxs("span",{className:"ml-3 inline-flex items-center gap-1.5 text-xs text-[#888]",children:[g.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#555]"}),"Complete"]}):g.jsxs("span",{className:"ml-3 inline-flex items-center gap-1.5 text-xs text-emerald-400",children:[g.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[g.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75 animate-ping"}),g.jsx("span",{className:"relative inline-flex h-1.5 w-1.5 rounded-full bg-emerald-400"})]}),"Live"]})}function aH(e){if(e==null)return null;if(e<60)return`${e}s`;const t=Math.floor(e/60);return t<60?`${t}m`:`${Math.floor(t/60)}h ${t%60}m`}function sH({summary:e}){const t=aH(e.durationSeconds);return g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-semibold text-white",children:bo(e.targets[0]??null,e.runName??e.runId??"Pentest results")}),g.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-[#888]",children:[e.targets.length>0&&g.jsx("span",{className:"font-mono text-[#aaa]",children:e.targets.join(", ")}),e.scanMode&&g.jsx(Lm,{label:e.scanMode}),t&&g.jsx(Lm,{label:t}),e.status&&g.jsx(Lm,{label:e.status})]})]})}function Lm({label:e}){return g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-[#333]",children:"·"}),g.jsx("span",{className:"capitalize",children:e})]})}function lH({vulnerabilities:e,finished:t,onSelect:r}){const a=[...e].sort((s,o)=>E_.indexOf(s.severity)-E_.indexOf(o.severity));return a.length===0?g.jsxs("div",{className:"space-y-4",children:[g.jsx("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-8 text-center text-sm text-[#888]",children:t?"No findings in this run.":"No findings yet. The pentest is still running…"}),t&&g.jsxs("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5",children:[g.jsx("p",{className:"text-sm font-medium text-white",children:"Stay ahead of new exposures"}),g.jsx("p",{className:"mt-0.5 mb-3 text-xs text-[#666]",children:"Attack surface monitoring catches new exposures for your org over time."}),g.jsx(hS,{label:"Attack surface monitoring",desc:"Continuous coverage for your whole org.",slug:"asm",surface:"empty_state",icon:GC})]})]}):g.jsx("div",{className:"space-y-2",children:a.map(s=>g.jsxs("button",{onClick:()=>r(s.id),className:"animate-card-in cursor-pointer w-full text-left rounded-lg border border-[#222] hover:border-[#444] bg-[rgba(255,255,255,0.02)] px-4 py-3 transition-colors flex items-center gap-3",children:[g.jsx("span",{className:`w-2.5 h-2.5 rounded-full flex-shrink-0 ${yp(s.severity)}`,"aria-hidden":"true"}),g.jsxs("span",{className:"flex-1 min-w-0",children:[g.jsx("span",{className:"block text-sm font-medium text-white truncate",children:s.title}),s.target&&g.jsx("span",{className:"block text-xs text-[#666] font-mono truncate",children:s.target})]}),g.jsx("span",{className:`text-xs font-semibold px-2 py-0.5 rounded-full border capitalize ${I_[s.severity]}`,children:s.severity})]},s.id))})}function oH(e){return e.replace(/^\s*#{1,6}[ \t]+.*(?:\r?\n)+/,"").trimStart()}function cH(e){const t=[];let r=null;for(const a of e.split(` `)){const s=a.match(/^#{1,6}\s+(.*)$/);if(s){const o=s[1].trim().toLowerCase();if(o===r)continue;r=o}else a.trim()!==""&&(r=null);t.push(a)}return t.join(` -`)}function oH({onOpenEmail:e}){return g.jsx("button",{onClick:e,className:"group w-full cursor-pointer rounded-xl border border-emerald-500/25 bg-emerald-500/[0.06] p-4 text-left transition-colors hover:border-emerald-500/40",children:g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-lg",style:{border:"1px solid rgba(16,185,129,0.3)",background:"rgba(16,185,129,0.08)"},children:g.jsx(bp,{className:"h-4 w-4 text-emerald-400","aria-hidden":"true"})}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("p",{className:"text-sm font-semibold text-white",children:"Email an encrypted PDF report of this run"}),g.jsx("p",{className:"mt-0.5 text-xs text-[#888]",children:"Encrypted with a key only you can see, email verified with a one-time code before sending."})]}),g.jsx("span",{className:"flex-shrink-0 rounded-lg bg-white px-3 py-1.5 text-xs font-semibold text-black transition-opacity group-hover:opacity-90",children:"Export report to PDF"})]})})}function cH({summary:e,counts:t,total:r,reportMarkdown:a,raw:s,finished:o,onOpenEmail:c}){const d=[["Executive Summary",e.executiveSummary],["Technical Analysis",e.technicalAnalysis],["Methodology",e.methodology],["Recommendations",e.recommendations]].filter(([,f])=>!!f).map(([f,h])=>({title:f,content:sH(h)}));return g.jsxs("div",{className:"space-y-6",children:[g.jsx("div",{className:"animate-card-in",children:g.jsx(YU,{raw:s,durationSeconds:e.durationSeconds})}),r>0&&g.jsx("div",{className:"animate-card-in rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5",children:g.jsx(QD,{findings:{total:r,...t}})}),o&&g.jsx("div",{className:"animate-card-in",children:g.jsx(oH,{onOpenEmail:c})}),d.length>0?g.jsx("div",{className:"animate-card-in rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5 space-y-8",children:d.map(f=>g.jsx(oa,{title:f.title,content:f.content},f.title))}):a?g.jsx("div",{className:"animate-card-in rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5",children:g.jsx(oa,{content:lH(a)})}):r===0&&g.jsx("p",{className:"text-sm text-[#888]",children:"No summary available for this run yet."})]})}function zm({active:e,onClick:t,children:r}){return g.jsxs("button",{onClick:t,className:`cursor-pointer relative pb-2.5 text-sm font-semibold transition-colors ${e?"text-white":"text-[#666] hover:text-white"}`,children:[r,e&&g.jsx("span",{className:"absolute bottom-0 inset-x-0 h-0.5 bg-white rounded-full"})]})}function uH({run:e,canSteer:t}){const{agents:r,events:a}=e.transcript,s=ee.useMemo(()=>J7(r,a),[r,a]),[o,c]=ee.useState(null),d=o?r.find(h=>h.id===o)??null:null,f=t&&!e.finished;return g.jsxs("div",{className:"space-y-5",children:[g.jsxs("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Ao,{className:"w-4 h-4 text-[#888]","aria-hidden":"true"}),g.jsx("h2",{className:"text-sm font-semibold text-white",children:"Agent graph"}),g.jsxs("span",{className:"text-xs text-[#666]",children:[r.length," agent",r.length===1?"":"s"]})]}),g.jsx("p",{className:"mt-1 mb-4 text-xs text-[#666]",children:"Click an agent to open its full transcript."}),g.jsx("div",{className:"h-[480px] rounded-lg border border-[#1a1a1a] overflow-hidden",children:g.jsx(HB,{agents:s,selectedAgentId:o,onSelectAgent:h=>c(h),eventsLoaded:!0,eventsEmpty:s.size===0,scanCompleted:e.finished})})]}),f&&g.jsx(oS,{agents:r}),g.jsxs("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5",children:[g.jsx("p",{className:"text-sm font-semibold text-white",children:"Run this pentest with more depth"}),g.jsx("p",{className:"mt-0.5 text-xs text-[#666]",children:"Re-run this pentest on managed infra in the cloud."}),g.jsx("div",{className:"mt-3 flex flex-wrap gap-2.5",children:g.jsx(fS,{label:"Re-run in Strix Pro with more depth",desc:"Run this pentest on managed infra with more depth.",slug:"live_scan",surface:"agents",icon:XT})})]}),g.jsx(vU,{open:d!==null,agent:d,events:a,steerable:f,onClose:()=>c(null)})]})}Ek.createRoot(document.getElementById("root")).render(g.jsx(ee.StrictMode,{children:g.jsx(eH,{})})); +`)}function uH({onOpenEmail:e}){return g.jsx("button",{onClick:e,className:"group w-full cursor-pointer rounded-xl border border-emerald-500/25 bg-emerald-500/[0.06] p-4 text-left transition-colors hover:border-emerald-500/40",children:g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-lg",style:{border:"1px solid rgba(16,185,129,0.3)",background:"rgba(16,185,129,0.08)"},children:g.jsx(bp,{className:"h-4 w-4 text-emerald-400","aria-hidden":"true"})}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("p",{className:"text-sm font-semibold text-white",children:"Email an encrypted PDF report of this run"}),g.jsx("p",{className:"mt-0.5 text-xs text-[#888]",children:"Encrypted with a key only you can see, email verified with a one-time code before sending."})]}),g.jsx("span",{className:"flex-shrink-0 rounded-lg bg-white px-3 py-1.5 text-xs font-semibold text-black transition-opacity group-hover:opacity-90",children:"Export report to PDF"})]})})}function dH({summary:e,counts:t,total:r,reportMarkdown:a,raw:s,finished:o,onOpenEmail:c}){const d=[["Executive Summary",e.executiveSummary],["Technical Analysis",e.technicalAnalysis],["Methodology",e.methodology],["Recommendations",e.recommendations]].filter(([,f])=>!!f).map(([f,h])=>({title:f,content:oH(h)}));return g.jsxs("div",{className:"space-y-6",children:[g.jsx("div",{className:"animate-card-in",children:g.jsx(KU,{raw:s,durationSeconds:e.durationSeconds})}),r>0&&g.jsx("div",{className:"animate-card-in rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5",children:g.jsx(JD,{findings:{total:r,...t}})}),o&&g.jsx("div",{className:"animate-card-in",children:g.jsx(uH,{onOpenEmail:c})}),d.length>0?g.jsx("div",{className:"animate-card-in rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5 space-y-8",children:d.map(f=>g.jsx(oa,{title:f.title,content:f.content},f.title))}):a?g.jsx("div",{className:"animate-card-in rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5",children:g.jsx(oa,{content:cH(a)})}):r===0&&g.jsx("p",{className:"text-sm text-[#888]",children:"No summary available for this run yet."})]})}function zm({active:e,onClick:t,children:r}){return g.jsxs("button",{onClick:t,className:`cursor-pointer relative pb-2.5 text-sm font-semibold transition-colors ${e?"text-white":"text-[#666] hover:text-white"}`,children:[r,e&&g.jsx("span",{className:"absolute bottom-0 inset-x-0 h-0.5 bg-white rounded-full"})]})}function fH({run:e,canSteer:t}){const{agents:r,events:a}=e.transcript,s=ee.useMemo(()=>tU(r,a),[r,a]),[o,c]=ee.useState(null),d=o?r.find(h=>h.id===o)??null:null,f=t&&!e.finished;return g.jsxs("div",{className:"space-y-5",children:[g.jsxs("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Ao,{className:"w-4 h-4 text-[#888]","aria-hidden":"true"}),g.jsx("h2",{className:"text-sm font-semibold text-white",children:"Agent graph"}),g.jsxs("span",{className:"text-xs text-[#666]",children:[r.length," agent",r.length===1?"":"s"]})]}),g.jsx("p",{className:"mt-1 mb-4 text-xs text-[#666]",children:"Click an agent to open its full transcript."}),g.jsx("div",{className:"h-[480px] rounded-lg border border-[#1a1a1a] overflow-hidden",children:g.jsx(qB,{agents:s,selectedAgentId:o,onSelectAgent:h=>c(h),eventsLoaded:!0,eventsEmpty:s.size===0,scanCompleted:e.finished})})]}),f&&g.jsx(cS,{agents:r}),g.jsxs("div",{className:"rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-5",children:[g.jsx("p",{className:"text-sm font-semibold text-white",children:"Run this pentest with more depth"}),g.jsx("p",{className:"mt-0.5 text-xs text-[#666]",children:"Re-run this pentest on managed infra in the cloud."}),g.jsx("div",{className:"mt-3 flex flex-wrap gap-2.5",children:g.jsx(hS,{label:"Re-run in Strix Pro with more depth",desc:"Run this pentest on managed infra with more depth.",slug:"live_scan",surface:"agents",icon:KC})})]}),g.jsx(wU,{open:d!==null,agent:d,events:a,steerable:f,onClose:()=>c(null)})]})}Nk.createRoot(document.getElementById("root")).render(g.jsx(ee.StrictMode,{children:g.jsx(nH,{})})); diff --git a/strix/viewer/static/index.html b/strix/viewer/static/index.html index 4c12d49d..25e791d7 100644 --- a/strix/viewer/static/index.html +++ b/strix/viewer/static/index.html @@ -6,7 +6,7 @@ Strix Results - + diff --git a/tests/test_fenced_code.py b/tests/test_fenced_code.py new file mode 100644 index 00000000..a04bd554 --- /dev/null +++ b/tests/test_fenced_code.py @@ -0,0 +1,45 @@ +"""Tests for stripping the markdown code fence off stored code fields.""" + +from __future__ import annotations + +from strix.interface.tui.renderers.fenced import parse_fenced_code +from strix.viewer.report_pdf import _strip_code_fence + + +def test_parse_fenced_code_extracts_language_and_body() -> None: + language, code = parse_fenced_code("```python\nimport requests\nprint(1)\n```") + assert language == "python" + assert code == "import requests\nprint(1)" + + +def test_parse_fenced_code_uses_first_token_of_info_string() -> None: + language, code = parse_fenced_code("```python title=app.py\nx = 1\n```") + assert language == "python" + assert code == "x = 1" + + +def test_parse_fenced_code_handles_non_python_language() -> None: + language, code = parse_fenced_code("```http\nGET / HTTP/1.1\n```") + assert language == "http" + assert code == "GET / HTTP/1.1" + + +def test_parse_fenced_code_passes_through_unfenced() -> None: + language, code = parse_fenced_code("import requests\nprint(1)") + assert language is None + assert code == "import requests\nprint(1)" + + +def test_parse_fenced_code_fence_without_language() -> None: + language, code = parse_fenced_code("```\nplain\n```") + assert language is None + assert code == "plain" + + +def test_strip_code_fence_removes_fence() -> None: + assert _strip_code_fence("```python\nx = 1\n```") == "x = 1" + + +def test_strip_code_fence_passes_through_non_string_and_unfenced() -> None: + assert _strip_code_fence(None) is None + assert _strip_code_fence("x = 1") == "x = 1"