omo-web 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/launcher-settings.js +0 -1
- package/bin/omo-web.js +2 -2
- package/bin/tui.js +43 -24
- package/dist/app.js +43 -38
- package/dist/server.js +1231 -597
- package/package.json +1 -1
- package/public/dag-graph.css +62 -6
- package/public/index.html +11 -15
- package/public/login.css +93 -0
- package/public/login.html +27 -0
- package/public/styles.css +20 -9
- package/public/tool-ledger.css +56 -35
- package/public/workbench.css +116 -78
package/dist/app.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
var Mp=Object.create;var{getPrototypeOf:Dp,defineProperty:wa,getOwnPropertyNames:Lp}=Object;var ac=Object.prototype.hasOwnProperty;function Ip(e){return this[e]}var Np,Bp,Op=(e,t,n)=>{var r=e!=null&&typeof e==="object";if(r){var s=t?Np??=new WeakMap:Bp??=new WeakMap,i=s.get(e);if(i)return i}n=e!=null?Mp(Dp(e)):{};let o=t||!e||!e.__esModule||!ac.call(e,"default")?wa(n,"default",{value:e,enumerable:!0}):n;if(e&&typeof e==="object"||typeof e==="function"){for(let a of Lp(e))if(!ac.call(o,a))wa(o,a,{get:Ip.bind(e,a),enumerable:!0})}if(r)s.set(e,o);return o};var $p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var zp=(e)=>e;function Fp(e,t){this[e]=zp.bind(null,t)}var lc=(e,t)=>{for(var n in t)wa(e,n,{get:t[n],enumerable:!0,configurable:!0,set:Fp.bind(t,n)})};var Mf=$p(function(Hv,Rf){function mf(e){if(e instanceof Map)e.clear=e.delete=e.set=function(){throw Error("map is read-only")};else if(e instanceof Set)e.add=e.clear=e.delete=function(){throw Error("set is read-only")};return Object.freeze(e),Object.getOwnPropertyNames(e).forEach((t)=>{let n=e[t],r=typeof n;if((r==="object"||r==="function")&&!Object.isFrozen(n))mf(n)}),e}class ql{constructor(e){if(e.data===void 0)e.data={};this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function pf(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function mr(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let s in r)n[s]=r[s]}),n}var Pb="</span>",lf=(e)=>!!e.scope,Ub=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,s)=>`${r}${"_".repeat(s+1)}`)].join(" ")}return`${t}${e}`};class gf{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=pf(e)}openNode(e){if(!lf(e))return;let t=Ub(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){if(!lf(e))return;this.buffer+=Pb}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}var cf=(e={})=>{let t={children:[]};return Object.assign(t,e),t};class Hl{constructor(){this.rootNode=cf(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=cf({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop();return}closeAllNodes(){while(this.closeNode());}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){if(typeof t==="string")e.addText(t);else if(t.children)e.openNode(t),t.children.forEach((n)=>this._walk(e,n)),e.closeNode(t);return e}static _collapse(e){if(typeof e==="string")return;if(!e.children)return;if(e.children.every((t)=>typeof t==="string"))e.children=[e.children.join("")];else e.children.forEach((t)=>{Hl._collapse(t)})}}class bf extends Hl{constructor(e){super();this.options=e}addText(e){if(e==="")return;this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;if(t)n.scope=`language:${t}`;this.add(n)}toHTML(){return new gf(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function hi(e){if(!e)return null;if(typeof e==="string")return e;return e.source}function vf(e){return Fr("(?=",e,")")}function Wb(e){return Fr("(?:",e,")*")}function jb(e){return Fr("(?:",e,")?")}function Fr(...e){return e.map((n)=>hi(n)).join("")}function Gb(e){let t=e[e.length-1];if(typeof t==="object"&&t.constructor===Object)return e.splice(e.length-1,1),t;else return{}}function Io(...e){return"("+(Gb(e).capture?"":"?:")+e.map((r)=>hi(r)).join("|")+")"}function yf(e){return new RegExp(e.toString()+"|").exec("").length-1}function Kb(e,t){let n=e&&e.exec(t);return n&&n.index===0}var Vb=new RegExp(Io(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));function Pl(e,{joinWith:t}){let n=0;return e.map((r)=>{n+=1;let s=n,i=hi(r),o="";while(i.length>0){let a=Vb.exec(i);if(!a){o+=i;break}if(o+=i.substring(0,a.index),i=i.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1])o+="\\"+String(Number(a[1])+s);else if(o+=a[0],a[0]==="("||/^\(\?[<']/.test(a[0]))n++}return o}).map((r)=>`(${r})`).join(t)}var Jb=/\b\B/,kf="[a-zA-Z]\\w*",Ul="[a-zA-Z_]\\w*",wf="\\b\\d+(\\.\\d+)?",xf="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ef="\\b(0b[01]+)",Zb="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Yb=(e={})=>{let t=/^#![ ]*\//;if(e.binary)e.begin=Fr(t,/.*\b/,e.binary,/\b.*/);return mr({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{if(n.index!==0)r.ignoreMatch()}},e)},mi={begin:"\\\\[\\s\\S]",relevance:0},Xb={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[mi]},Qb={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[mi]},e3={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/},No=function(e,t,n={}){let r=mr({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let s=Io("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 r.contains.push({begin:Fr(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},t3=No("//","$"),n3=No("/\\*","\\*/"),r3=No("#","$"),s3={scope:"number",begin:wf,relevance:0},i3={scope:"number",begin:xf,relevance:0},o3={scope:"number",begin:Ef,relevance:0},a3={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[mi,{begin:/\[/,end:/\]/,relevance:0,contains:[mi]}]},l3={scope:"title",begin:kf,relevance:0},c3={scope:"title",begin:Ul,relevance:0},u3={begin:"\\.\\s*"+Ul,relevance:0},d3=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{if(n.data._beginMatch!==t[1])n.ignoreMatch()}})},Do=Object.freeze({__proto__:null,APOS_STRING_MODE:Xb,BACKSLASH_ESCAPE:mi,BINARY_NUMBER_MODE:o3,BINARY_NUMBER_RE:Ef,COMMENT:No,C_BLOCK_COMMENT_MODE:n3,C_LINE_COMMENT_MODE:t3,C_NUMBER_MODE:i3,C_NUMBER_RE:xf,END_SAME_AS_BEGIN:d3,HASH_COMMENT_MODE:r3,IDENT_RE:kf,MATCH_NOTHING_RE:Jb,METHOD_GUARD:u3,NUMBER_MODE:s3,NUMBER_RE:wf,PHRASAL_WORDS_MODE:e3,QUOTE_STRING_MODE:Qb,REGEXP_MODE:a3,RE_STARTERS_RE:Zb,SHEBANG:Yb,TITLE_MODE:l3,UNDERSCORE_IDENT_RE:Ul,UNDERSCORE_TITLE_MODE:c3});function f3(e,t){if(e.input[e.index-1]===".")t.ignoreMatch()}function h3(e,t){if(e.className!==void 0)e.scope=e.className,delete e.className}function m3(e,t){if(!t)return;if(!e.beginKeywords)return;if(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=f3,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0)e.relevance=0}function p3(e,t){if(!Array.isArray(e.illegal))return;e.illegal=Io(...e.illegal)}function g3(e,t){if(!e.match)return;if(e.begin||e.end)throw Error("begin & end are not supported with match");e.begin=e.match,delete e.match}function b3(e,t){if(e.relevance===void 0)e.relevance=1}var v3=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach((r)=>{delete e[r]}),e.keywords=n.keywords,e.begin=Fr(n.beforeMatch,vf(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},y3=["of","and","for","in","not","or","if","then","parent","list","value"],k3="keyword";function Af(e,t,n=k3){let r=Object.create(null);if(typeof e==="string")s(n,e.split(" "));else if(Array.isArray(e))s(n,e);else Object.keys(e).forEach(function(i){Object.assign(r,Af(e[i],t,i))});return r;function s(i,o){if(t)o=o.map((a)=>a.toLowerCase());o.forEach(function(a){let l=a.split("|");r[l[0]]=[i,w3(l[0],l[1])]})}}function w3(e,t){if(t)return Number(t);return x3(e)?0:1}function x3(e){return y3.includes(e.toLowerCase())}var uf={},zr=(e)=>{console.error(e)},df=(e,...t)=>{console.log(`WARN: ${e}`,...t)},bs=(e,t)=>{if(uf[`${e}/${t}`])return;console.log(`Deprecated as of ${e}. ${t}`),uf[`${e}/${t}`]=!0},Lo=Error();function Cf(e,t,{key:n}){let r=0,s=e[n],i={},o={};for(let a=1;a<=t.length;a++)o[a+r]=s[a],i[a+r]=!0,r+=yf(t[a-1]);e[n]=o,e[n]._emit=i,e[n]._multi=!0}function E3(e){if(!Array.isArray(e.begin))return;if(e.skip||e.excludeBegin||e.returnBegin)throw zr("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Lo;if(typeof e.beginScope!=="object"||e.beginScope===null)throw zr("beginScope must be object"),Lo;Cf(e,e.begin,{key:"beginScope"}),e.begin=Pl(e.begin,{joinWith:""})}function A3(e){if(!Array.isArray(e.end))return;if(e.skip||e.excludeEnd||e.returnEnd)throw zr("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Lo;if(typeof e.endScope!=="object"||e.endScope===null)throw zr("endScope must be object"),Lo;Cf(e,e.end,{key:"endScope"}),e.end=Pl(e.end,{joinWith:""})}function C3(e){if(e.scope&&typeof e.scope==="object"&&e.scope!==null)e.beginScope=e.scope,delete e.scope}function _3(e){if(C3(e),typeof e.beginScope==="string")e.beginScope={_wrap:e.beginScope};if(typeof e.endScope==="string")e.endScope={_wrap:e.endScope};E3(e),A3(e)}function S3(e){function t(o,a){return new RegExp(hi(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,a){a.position=this.position++,this.matchIndexes[this.matchAt]=a,this.regexes.push([a,o]),this.matchAt+=yf(o)+1}compile(){if(this.regexes.length===0)this.exec=()=>null;let o=this.regexes.map((a)=>a[1]);this.matcherRe=t(Pl(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;let a=this.matcherRe.exec(o);if(!a)return null;let l=a.findIndex((d,h)=>h>0&&d!==void 0),u=this.matchIndexes[l];return a.splice(0,l),Object.assign(a,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];let a=new n;return this.rules.slice(o).forEach(([l,u])=>a.addRule(l,u)),a.compile(),this.multiRegexes[o]=a,a}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,a){if(this.rules.push([o,a]),a.type==="begin")this.count++}exec(o){let a=this.getMatcher(this.regexIndex);a.lastIndex=this.lastIndex;let l=a.exec(o);if(this.resumingScanAtSamePosition())if(l&&l.index===this.lastIndex);else{let u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,l=u.exec(o)}if(l){if(this.regexIndex+=l.position+1,this.regexIndex===this.count)this.considerAll()}return l}}function s(o){let a=new r;if(o.contains.forEach((l)=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd)a.addRule(o.terminatorEnd,{type:"end"});if(o.illegal)a.addRule(o.illegal,{type:"illegal"});return a}function i(o,a){let l=o;if(o.isCompiled)return l;[h3,g3,_3,v3].forEach((d)=>d(o,a)),e.compilerExtensions.forEach((d)=>d(o,a)),o.__beforeBegin=null,[m3,p3,b3].forEach((d)=>d(o,a)),o.isCompiled=!0;let u=null;if(typeof o.keywords==="object"&&o.keywords.$pattern)o.keywords=Object.assign({},o.keywords),u=o.keywords.$pattern,delete o.keywords.$pattern;if(u=u||/\w+/,o.keywords)o.keywords=Af(o.keywords,e.case_insensitive);if(l.keywordPatternRe=t(u,!0),a){if(!o.begin)o.begin=/\B|\b/;if(l.beginRe=t(l.begin),!o.end&&!o.endsWithParent)o.end=/\B|\b/;if(o.end)l.endRe=t(l.end);if(l.terminatorEnd=hi(l.end)||"",o.endsWithParent&&a.terminatorEnd)l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd}if(o.illegal)l.illegalRe=t(o.illegal);if(!o.contains)o.contains=[];if(o.contains=[].concat(...o.contains.map(function(d){return T3(d==="self"?o:d)})),o.contains.forEach(function(d){i(d,l)}),o.starts)i(o.starts,a);return l.matcher=s(l),l}if(!e.compilerExtensions)e.compilerExtensions=[];if(e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=mr(e.classNameAliases||{}),i(e)}function _f(e){if(!e)return!1;return e.endsWithParent||_f(e.starts)}function T3(e){if(e.variants&&!e.cachedVariants)e.cachedVariants=e.variants.map(function(t){return mr(e,{variants:null},t)});if(e.cachedVariants)return e.cachedVariants;if(_f(e))return mr(e,{starts:e.starts?mr(e.starts):null});if(Object.isFrozen(e))return mr(e);return e}var R3="11.12.0";class Sf extends Error{constructor(e,t){super(e);this.name="HTMLInjectionError",this.html=t}}var Fl=pf,ff=mr,hf=Symbol("nomatch"),M3=7,Tf=function(e){let t=Object.create(null),n=Object.create(null),r=[],s=!0,i="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]},a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:bf};function l(z){return a.noHighlightRe.test(z)}function u(z){let j=z.className+" ";j+=z.parentNode?z.parentNode.className:"";let Z=a.languageDetectRe.exec(j);if(Z){let Q=B(Z[1]);if(!Q)df(i.replace("{}",Z[1])),df("Falling back to no-highlight mode for this block.",z);return Q?Z[1]:"no-highlight"}return j.split(/\s+/).find((Q)=>l(Q)||B(Q))}function d(z,j,Z){let Q="",oe="";if(typeof j==="object")Q=z,Z=j.ignoreIllegals,oe=j.language;else bs("10.7.0","highlight(lang, code, ...args) has been deprecated."),bs("10.7.0",`Please use highlight(code, options) instead.
|
|
2
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),
|
|
3
|
-
`;return 1}if(is>1e5&&is>ke.index*3)throw Error("potential infinite loop, way more iterations than matches");return We+=Le,Le.length}let Pe=B(z);if(!Pe)throw zr(i.replace("{}",z)),Error('Unknown language: "'+z+'"');let mt=S3(Pe),Dn="",Te=Q||mt,Mr={},st=new a.__emitter(a);Ae();let We="",ss=0,rn=0,is=0,os=!1;try{if(!Pe.__emitTokens){Te.matcher.considerAll();for(;;){if(is++,os)os=!1;else Te.matcher.considerAll();Te.matcher.lastIndex=rn;let fe=Te.matcher.exec(j);if(!fe)break;let ke=j.substring(rn,fe.index),Le=Ne(ke,fe);rn=fe.index+Le}Ne(j.substring(rn))}else Pe.__emitTokens(j,st);return st.finalize(),Dn=st.toHTML(),{language:z,value:Dn,relevance:ss,illegal:!1,_emitter:st,_top:Te}}catch(fe){if(fe.message&&fe.message.includes("Illegal"))return{language:z,value:Fl(j),illegal:!0,relevance:0,_illegalBy:{message:fe.message,index:rn,context:j.slice(rn-100,rn+100),mode:fe.mode,resultSoFar:Dn},_emitter:st};else if(s)return{language:z,value:Fl(j),illegal:!1,relevance:0,errorRaised:fe,_emitter:st,_top:Te};else throw fe}}function p(z){let j={value:Fl(z),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return j._emitter.addText(z),j}function g(z,j){j=j||a.languages||Object.keys(t);let Z=p(z),Q=j.filter(B).filter(H).map((xe)=>h(xe,z,!1));Q.unshift(Z);let oe=Q.sort((xe,W)=>{if(xe.relevance!==W.relevance)return W.relevance-xe.relevance;if(xe.language&&W.language){if(B(xe.language).supersetOf===W.language)return 1;else if(B(W.language).supersetOf===xe.language)return-1}return 0}),[F,X]=oe,te=F;return te.secondBest=X,te}function b(z,j,Z){let Q=j&&n[j]||Z;z.classList.add("hljs"),z.classList.add(`language-${Q}`)}function x(z){let j=null,Z=u(z);if(l(Z))return;if(ne("before:highlightElement",{el:z,language:Z}),z.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",z);return}if(z.children.length>0){if(!a.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(z);if(a.throwUnescapedHTML)throw new Sf("One of your code blocks includes unescaped HTML.",z.innerHTML)}j=z;let Q=j.textContent,oe=Z?d(Q,{language:Z,ignoreIllegals:!0}):g(Q);if(z.innerHTML=oe.value,z.dataset.highlighted="yes",b(z,Z,oe.language),z.result={language:oe.language,re:oe.relevance,relevance:oe.relevance},oe.secondBest)z.secondBest={language:oe.secondBest.language,relevance:oe.secondBest.relevance};ne("after:highlightElement",{el:z,result:oe,text:Q})}function k(z){a=ff(a,z)}let E=()=>{A(),bs("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function T(){A(),bs("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let _=!1;function A(){function z(){A()}if(document.readyState==="loading"){if(!_)window.addEventListener("DOMContentLoaded",z,!1);_=!0;return}document.querySelectorAll(a.cssSelector).forEach(x)}function D(z,j){let Z=null;try{Z=j(e)}catch(Q){if(zr("Language definition for '{}' could not be registered.".replace("{}",z)),!s)throw Q;else zr(Q);Z=o}if(!Z.name)Z.name=z;if(t[z]=Z,Z.rawDefinition=j.bind(null,e),Z.aliases)O(Z.aliases,{languageName:z})}function R(z){delete t[z];for(let j of Object.keys(n))if(n[j]===z)delete n[j]}function L(){return Object.keys(t)}function B(z){return z=(z||"").toLowerCase(),t[z]||t[n[z]]}function O(z,{languageName:j}){if(typeof z==="string")z=[z];z.forEach((Z)=>{n[Z.toLowerCase()]=j})}function H(z){let j=B(z);return j&&!j.disableAutodetect}function K(z){if(z["before:highlightBlock"]&&!z["before:highlightElement"])z["before:highlightElement"]=(j)=>{z["before:highlightBlock"](Object.assign({block:j.el},j))};if(z["after:highlightBlock"]&&!z["after:highlightElement"])z["after:highlightElement"]=(j)=>{z["after:highlightBlock"](Object.assign({block:j.el},j))}}function G(z){K(z),r.push(z)}function de(z){let j=r.indexOf(z);if(j!==-1)r.splice(j,1)}function ne(z,j){let Z=z;r.forEach(function(Q){if(Q[Z])Q[Z](j)})}function ae(z){return bs("10.7.0","highlightBlock will be removed entirely in v12.0"),bs("10.7.0","Please use highlightElement now."),x(z)}Object.assign(e,{highlight:d,highlightAuto:g,highlightAll:A,highlightElement:x,highlightBlock:ae,configure:k,initHighlighting:E,initHighlightingOnLoad:T,registerLanguage:D,unregisterLanguage:R,listLanguages:L,getLanguage:B,registerAliases:O,autoDetection:H,inherit:ff,addPlugin:G,removePlugin:de}),e.debugMode=function(){s=!1},e.safeMode=function(){s=!0},e.versionString=R3,e.regex={concat:Fr,lookahead:vf,either:Io,optional:jb,anyNumberOfTimes:Wb};for(let z in Do)if(typeof Do[z]==="object")mf(Do[z]);return Object.assign(e,Do),e},vs=Tf({});vs.newInstance=()=>Tf({});Rf.exports=vs;vs.HighlightJS=vs;vs.default=vs});var _a={};lc(_a,{decode:()=>Ps,encode:()=>or,format:()=>as,parse:()=>Us});var Da={};lc(Da,{Any:()=>Sa,Cc:()=>Ta,Cf:()=>r1,P:()=>Ws,S:()=>Ra,Z:()=>Ma});function qp(){if(typeof window>"u")return"zh-CN";try{return window.localStorage.getItem("omo-web-language")==="en"?"en":"zh-CN"}catch{return"zh-CN"}}var me=qp();function c(e,t){return me==="en"?t:e}function cc(e){try{return window.localStorage.setItem("omo-web-language",e),!0}catch{return!1}}function uc(e=document){if(e.documentElement.lang=me,me!=="en")return;for(let t of e.querySelectorAll("[data-en]"))t.textContent=t.getAttribute("data-en");for(let t of["title","aria-label","placeholder","alt"]){let n=`data-en-${t}`;for(let r of e.querySelectorAll(`[${n}]`)){let s=r.getAttribute(n);if(s!==null)r.setAttribute(t,s)}}}function ve(e,t){let n=document.getElementById(e);if(n instanceof t)return n;throw Error(c(`界面控件不存在:${e}`,`Missing interface control: ${e}`))}function y(e,t="",n=""){let r=document.createElement(e);if(t)r.className=t;if(n)r.textContent=n;return r}function Ue(e,t,n=""){let r=y("button",`button ${n}`,e);return r.type="button",r.addEventListener("click",t),r}function re(e,t=""){if(e.textContent!==t)e.textContent=t;e.hidden=!t}function ir(e,t){let n=y("label","field");return n.append(y("span","",e),t),n}function ot(e,t){let n=y("option","",e);return n.value=t,n}function Mt(e,...t){let n=y("details"),r=y("div","fold-body stack stack--tight");return r.append(...t),n.append(y("summary","",e),r),n}function In(e){let t=y("pre");return t.tabIndex=0,t.append(y("code","",e)),t}var Hp=(e)=>e!==null&&typeof e==="object"&&!Array.isArray(e),U=(e)=>Hp(e)?e:{},we=(e)=>Array.isArray(e)?e:[],C=(e)=>typeof e==="string"?e:"",Ce=(e)=>typeof e==="number"&&Number.isFinite(e)?e:void 0,dc=(e)=>typeof e==="string"?e:JSON.stringify(e,null,2)??"",Re=(e)=>e instanceof Error?e.message:c("发生未知错误","An unknown error occurred"),Pp=["image/png","image/jpeg","image/gif","image/webp"],Gi=(e)=>Pp.some((t)=>t===e);function un(e){let t=U(e),n=C(t.id);if(!n)return;return{id:n,name:C(t.name)||c("未命名会话","Untitled session"),cwd:C(t.cwd),updatedAt:Ce(t.updatedAt)??0,archived:t.archived===!0,settled:t.settled===!0,active:t.active===!0,running:t.running===!0}}var xa=(e)=>we(e.sessions).flatMap((t)=>{let n=un(t);return n?[n]:[]});class Be extends Error{status;code;constructor(e,t,n){super(e);this.status=t;this.code=n}}var Ze=(e)=>`/api/sessions/${encodeURIComponent(e)}`,Ki=(e)=>`/api/cli-history/${encodeURIComponent(e)}`,Vi=(e)=>`/api/cli-live/${encodeURIComponent(e)}`,Ea=({kind:e,id:t})=>{switch(e){case"web":return Ze(t);case"history":return Ki(t);case"live":return Vi(t)}};class Aa{token="";async request(e,t,n){let r=t!==void 0,s=await fetch(e,{method:r?"POST":"GET",signal:n,cache:"no-store",...r?{headers:{"Content-Type":"application/json","X-OmO-Token":this.token},body:JSON.stringify(t)}:{}}),i;try{let o=await s.json();i=U(o)}catch(o){if(!(o instanceof SyntaxError))throw o;throw new Be(c(`本机 Web 服务返回了无效响应(HTTP ${s.status})`,`The local Web server returned an invalid response (HTTP ${s.status}).`),s.status,"")}if(!s.ok)throw new Be(C(i.error)||c(`请求失败(HTTP ${s.status})`,`Request failed (HTTP ${s.status}).`),s.status,C(i.code));return i}action(e,t){return this.request(`${Ze(e)}/actions`,t)}cliLiveAction(e,t){return this.request(`${Vi(e)}/actions`,t)}async resumeHistory(e){let t=await this.request(`${Ki(e)}/resume`,{}),n=un(t.session);if(!n?.active)throw new Be(c("没有收到可继续的 Web 会话。请检查会话列表。","No active Web session was returned. Check the session list."),502,"");return n}async handoff(e){let t=await this.request(`${Ze(e)}/handoff`,{}),n=un(t.session),r=C(t.command);if(!n||n.id!==e||U(t.session).active!==!1||!r.trim())throw new Be(c("无法确认会话已释放,未显示启动命令。","Could not confirm that the session was released. The launch command was not shown."),502,"");return{session:n,command:r}}}var Up=new Set(["select","confirm","input","editor","question"]),Hs=(e)=>C(e.id)||C(e.requestId),Ji=(e)=>Boolean(Hs(e)&&Up.has(C(e.method)));function Wp(e,t){let n=[];for(let[s,i]of we(t.questions).entries()){let o=U(i),a=C(o.id);if(!a)continue;let l=y("fieldset","stack stack--tight"),u=(s+1).toLocaleString(me);if(l.append(y("legend","",C(o.header)||c(`问题 ${u}`,`Question ${u}`))),C(o.question))l.append(y("p","plain",C(o.question)));let d=[];for(let p of we(o.options)){let g=U(p),b=C(g.label);if(!b)continue;let x=y("input");x.name=`question-${s}`,x.type=o.multiSelect===!0?"checkbox":"radio",x.value=b;let k=y("label","interaction-option"),E=y("span","break",b);if(C(g.description))E.append(y("small","muted",` · ${C(g.description)}`));k.append(x,E),d.push(x),l.append(k)}let h=y("input");h.type="text",h.maxLength=12000,h.autocomplete="off",l.append(ir(c("自填回答(选填)","Your own answer (optional)"),h)),e.append(l),n.push(()=>{let p=d.filter((b)=>b.checked).map((b)=>b.value),g=h.value.trim();return p.length||g?[a,{selected:p,...g?{text:g}:{}}]:void 0})}let r=y("textarea");return r.rows=2,r.maxLength=12000,e.append(ir(c("补充说明(选填)","Comment (optional)"),r)),e.append(y("p","small muted",c("至少回答一题或填写补充说明。","Answer at least one question or leave a comment."))),()=>{let s=n.flatMap((o)=>{let a=o();return a?[a]:[]}),i=r.value.trim();return s.length||i?{answers:Object.fromEntries(s),...i?{comment:i}:{}}:void 0}}function hc(e,t){let n=e.querySelector("[data-question-metadata]");if(!n)return;let r=[];if(t.waitForAnswer===!0)r.push(c("等待回答","Waiting for your answer"));else if(t.waitForAnswer===!1)r.push(c("异步提问","Not waiting for an answer"));let s=C(t.raisedBy);if(s)r.push(c(`提问人:${s}`,`Asked by: ${s}`));let i=Ce(t.remainingMs);if(i!==void 0){let a=Math.ceil(Math.max(0,i)/1000),l=a.toLocaleString(me);r.push(c(`更新时剩余 ${l} 秒`,`${l} ${a===1?"second":"seconds"} left at last update`))}let o=Ce(t.deadlineAtMs);if(o!==void 0){let a=new Date(o);if(!Number.isNaN(a.getTime())){let l=a.toLocaleString(me);r.push(c(`截止:${l}`,`Deadline: ${l}`))}}n.textContent=r.join(" · "),n.hidden=r.length===0}var fc={Allow:c("允许","Allow"),"Allow once":c("仅允许这次","Allow once"),"Allow always":c("始终允许","Always allow"),"Allow for session":c("本会话始终允许","Allow for this session"),Deny:c("拒绝","Deny"),Block:c("阻止","Block"),"Deny with feedback":c("拒绝并说明原因","Deny with feedback")};function jp(e,t){let n=C(e.method),r=C(e.title),s=Boolean(e.toolCallId)&&n!=="question",i=y("form","request-form"),o=n==="question"?c("待回答问题","Pending question"):s?c("工具批准","Tool approval"):c("等待你的决定","Your response is needed");i.setAttribute("aria-label",o),i.dataset.method=n;let a=y(r?"p":"h2","request-kind",n==="question"?c("Agent 提问","Agent question"):o),l=y("div","request-copy");if(r)l.append(y("h2","plain request-title",r));if(C(e.message))l.append(y("p","plain",C(e.message)));if(n==="question"){let A=y("p","small muted");A.dataset.questionMetadata="",l.append(A)}let u=U(e.remoteOrigin),d=C(u.deviceName)||C(u.deviceId);if(d)l.append(y("p","small muted break",c(`请求设备:${d}`,`Requesting device: ${d}`)));if(s){let A=C(e.toolCallId);l.append(y("p","small muted path",c(`工具调用:${A}`,`Tool call: ${A}`)))}let h=y("div","stack stack--tight request-fields"),p=y("p","notice error small");p.setAttribute("role","alert"),p.hidden=!0;let g=y("div","row request-actions"),b=!1,x=async(A)=>{if(b||i.dataset.offline==="true")return;b=!0,i.setAttribute("aria-busy","true"),re(p);for(let D of g.querySelectorAll("button"))D.disabled=!0;try{await t(Hs(e),A)}catch(D){let R=D instanceof Error?D.message:c("发生未知错误","Unknown error");re(p,c(`未能提交:${R}`,`Could not submit: ${R}`))}finally{b=!1,i.removeAttribute("aria-busy");for(let D of g.querySelectorAll("button"))D.disabled=i.dataset.offline==="true"}},k,E=e.secret===!0||Boolean(e.privateInput);switch(n){case"question":k=Wp(h,e);break;case"confirm":g.append(Ue(c("不批准",s?"Deny":"No"),()=>void x({confirmed:!1})),Ue(c("确认","Confirm"),()=>void x({confirmed:!0})));break;case"select":{let A=y("select"),D=ot(c("请选择,不会自动批准","Choose an option. Nothing is approved automatically."),"");D.disabled=!0,A.append(D);for(let R of we(e.options))if(typeof R==="string"&&R)A.append(ot(Object.hasOwn(fc,R)?fc[R]??R:R,R));A.value="",h.append(ir(c("可选操作","Options"),A)),k=()=>A.value?{value:A.value}:void 0;break}case"input":case"editor":{if(E){h.append(y("p","muted",c("此输入需要在原生客户端中处理。","Respond in the native client.")));break}let A=n==="editor"?y("textarea"):y("input");if(A instanceof HTMLTextAreaElement)A.rows=5,A.value=C(e.prefill);else A.autocomplete="off";A.placeholder=C(e.placeholder),h.append(ir(c("输入内容","Response"),A)),k=()=>({value:A.value});break}}if(!E)g.append(Ue(c("取消请求","Cancel request"),()=>void x({cancelled:!0}),"button--quiet"));if(k){let A=y("button","button",c("提交回答","Submit response"));A.type="submit",g.append(A)}i.addEventListener("submit",(A)=>{if(A.preventDefault(),!k)return;let D=k();if(D)x(D);else re(p,c("请至少填写一项回答或选择一个操作。","Enter a response or choose an option."))});let T=y("div",n==="select"?"request-controls request-controls--choice":"request-controls");T.append(h,g);let _=y("div","request-body");if(_.append(l,T,p),i.append(a,_),n==="question")hc(i,e);return i}class Ca{root;nodes=new Map;constructor(e){this.root=e}get first(){return this.nodes.values().next().value}get firstQuestion(){return[...this.nodes.values()].find((e)=>e.dataset.method==="question")}render(e,t,n){for(let[r,s]of this.nodes)if(!e.has(r))s.remove(),this.nodes.delete(r);for(let[r,s]of e){let i=this.nodes.get(r);if(!i)i=jp(s,n),this.nodes.set(r,i),this.root.append(i);if(s.method==="question")hc(i,s);if(i.dataset.offline=String(!t),i.getAttribute("aria-busy")!=="true")for(let o of i.querySelectorAll("button"))o.disabled=!t}}reset(){this.nodes.clear(),this.root.replaceChildren()}}var mc={};function Gp(e){let t=mc[e];if(t)return t;t=mc[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function Zi(e,t){if(typeof t!=="string")t=Zi.defaultChars;let n=Gp(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let s="";for(let i=0,o=r.length;i<o;i+=3){let a=parseInt(r.slice(i+1,i+3),16);if(a<128){s+=n[a];continue}if((a&224)===192&&i+3<o){let l=parseInt(r.slice(i+4,i+6),16);if((l&192)===128){let u=a<<6&1984|l&63;if(u<128)s+="��";else s+=String.fromCharCode(u);i+=3;continue}}if((a&240)===224&&i+6<o){let l=parseInt(r.slice(i+4,i+6),16),u=parseInt(r.slice(i+7,i+9),16);if((l&192)===128&&(u&192)===128){let d=a<<12&61440|l<<6&4032|u&63;if(d<2048||d>=55296&&d<=57343)s+="���";else s+=String.fromCharCode(d);i+=6;continue}}if((a&248)===240&&i+9<o){let l=parseInt(r.slice(i+4,i+6),16),u=parseInt(r.slice(i+7,i+9),16),d=parseInt(r.slice(i+10,i+12),16);if((l&192)===128&&(u&192)===128&&(d&192)===128){let h=a<<18&1835008|l<<12&258048|u<<6&4032|d&63;if(h<65536||h>1114111)s+="����";else h-=65536,s+=String.fromCharCode(55296+(h>>10),56320+(h&1023));i+=9;continue}}s+="�"}return s})}Zi.defaultChars=";/?:@&=+$,#";Zi.componentChars="";var Ps=Zi;var pc={};function Kp(e){let t=pc[e];if(t)return t;t=pc[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);if(/^[0-9a-z]$/i.test(r))t.push(r);else t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function Yi(e,t,n){if(typeof t!=="string")n=t,t=Yi.defaultChars;if(typeof n>"u")n=!0;let r=Kp(t),s="";for(let i=0,o=e.length;i<o;i++){let a=e.charCodeAt(i);if(n&&a===37&&i+2<o){if(/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))){s+=e.slice(i,i+3),i+=2;continue}}if(a<128){s+=r[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1<o){let l=e.charCodeAt(i+1);if(l>=56320&&l<=57343){s+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[i])}return s}Yi.defaultChars=";/?:@&=+$,-_.!~*'()#";Yi.componentChars="-_.!~*'()";var or=Yi;function as(e){let t="";if(t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1)t+="["+e.hostname+"]";else t+=e.hostname||"";return t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Xi(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var Vp=/^([a-z0-9.+-]+:)/i,Jp=/:[0-9]*$/,Zp=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Yp=["<",">",'"',"`"," ","\r",`
|
|
4
|
-
`,"\t"],Xp=["{","}","|","\\","^","`"].concat(Yp),Qp=["'"].concat(Xp),gc=["%","/","?",";","#"].concat(Qp),bc=["/","?","#"],e1=255,vc=/^[+a-z0-9A-Z_-]{0,63}$/,t1=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,yc={javascript:!0,"javascript:":!0},kc={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function n1(e,t){if(e&&e instanceof Xi)return e;let n=new Xi;return n.parse(e,t),n}Xi.prototype.parse=function(e,t){let n,r,s,i=e;if(i=i.trim(),!t&&e.split("#").length===1){let u=Zp.exec(i);if(u){if(this.pathname=u[1],u[2])this.search=u[2];return this}}let o=Vp.exec(i);if(o)o=o[0],n=o.toLowerCase(),this.protocol=o,i=i.substr(o.length);if(t||o||i.match(/^\/\/[^@\/]+@[^@\/]+/)){if(s=i.substr(0,2)==="//",s&&!(o&&yc[o]))i=i.substr(2),this.slashes=!0}if(!yc[o]&&(s||o&&!kc[o])){let u=-1;for(let b=0;b<bc.length;b++)if(r=i.indexOf(bc[b]),r!==-1&&(u===-1||r<u))u=r;let d,h;if(u===-1)h=i.lastIndexOf("@");else h=i.lastIndexOf("@",u);if(h!==-1)d=i.slice(0,h),i=i.slice(h+1),this.auth=d;u=-1;for(let b=0;b<gc.length;b++)if(r=i.indexOf(gc[b]),r!==-1&&(u===-1||r<u))u=r;if(u===-1)u=i.length;if(i[u-1]===":")u--;let p=i.slice(0,u);i=i.slice(u),this.parseHost(p),this.hostname=this.hostname||"";let g=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!g){let b=this.hostname.split(/\./);for(let x=0,k=b.length;x<k;x++){let E=b[x];if(!E)continue;if(!E.match(vc)){let T="";for(let _=0,A=E.length;_<A;_++)if(E.charCodeAt(_)>127)T+="x";else T+=E[_];if(!T.match(vc)){let _=b.slice(0,x),A=b.slice(x+1),D=E.match(t1);if(D)_.push(D[1]),A.unshift(D[2]);if(A.length)i=A.join(".")+i;this.hostname=_.join(".");break}}}}if(this.hostname.length>e1)this.hostname="";if(g)this.hostname=this.hostname.substr(1,this.hostname.length-2)}let a=i.indexOf("#");if(a!==-1)this.hash=i.substr(a),i=i.slice(0,a);let l=i.indexOf("?");if(l!==-1)this.search=i.substr(l),i=i.slice(0,l);if(i)this.pathname=i;if(kc[n]&&this.hostname&&!this.pathname)this.pathname="";return this};Xi.prototype.parseHost=function(e){let t=Jp.exec(e);if(t){if(t=t[0],t!==":")this.port=t.substr(1);e=e.substr(0,e.length-t.length)}if(e)this.hostname=e};var Us=n1;var Sa=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ta=/[\0-\x1F\x7F-\x9F]/,r1=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Ws=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,Ra=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/,Ma=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var s1=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function i1(e){return e===0||e>=55296&&e<=57343||e>1114111}function wc(e){if(i1(e))return 65533;if(e>=128&&e<=159)return s1[e-128]||e;return e}function xc(e){return e-1>>>0<127||e-160>>>0<55136?String.fromCharCode(e):String.fromCodePoint(wc(e))}var sn=(()=>{let e=new Uint8Array(127),t=0;for(let n=33;n<=126;n++)if(n!==34&&n!==36&&n!==92)e[n]=t++;return e})();function Ec(e,t,n,r,s,i){let a=e.length,l=i*90,u=0,d=()=>{let O=sn[e.charCodeAt(u++)];return O<i?O:O*91-l+sn[e.charCodeAt(u++)]},h=n-r,p=n+s,g=new Int32Array(p);g.fill(-1,r,i),g.fill(-1,i+h,p);let b=new Int32Array(p),x=new Int32Array(p);function k(O,H){let K=0,G=H,de=H+O;while(G<de){let ne=sn[e.charCodeAt(u++)];if(ne<89)K+=ne,g[G++]=K;else if(ne===89){let ae=sn[e.charCodeAt(u++)]+2;while(ae--)g[G++]=++K}else{let ae=sn[e.charCodeAt(u++)];K+=89+(ae<90?ae*91+sn[e.charCodeAt(u++)]:sn[e.charCodeAt(u++)]*8281+sn[e.charCodeAt(u++)]*91+sn[e.charCodeAt(u++)]),g[G++]=K}}}k(r,0),k(h,i);let E=new Int32Array(s*2),T=0,_=0;function A(O,H){for(let K=0;K<O;K++){let G=H+K,de=d(),ne=d();E[_*2]=de,E[_*2+1]=ne,_+=1,b[G]=T;let ae=(g[de]<0?x[de]:1)+(g[ne]<0?x[ne]:1);x[G]=ae,T+=ae}}A(s-i+r,i+h),A(i-r,r);let D=new Uint16Array(T),R=0;for(let O=0;O<_;O++)for(let H=0;H<2;H++){let K=E[O*2+H],G=g[K];if(G<0){let de=b[K],ne=de+x[K];while(de<ne)D[R++]=D[de++]}else D[R++]=G}let L=new Uint16Array(t),B=0;while(u<a){let O=sn[e.charCodeAt(u++)];if(O>=i)O=O*91-l+sn[e.charCodeAt(u++)];let H=g[O];if(H<0){let K=b[O],G=K+x[O];while(K<G)L[B++]=D[K++]}else L[B++]=H}return L}var Ac=Ec("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR~#N~'N~#r~#m#-~#i'?%#'%~#B%##%,%#~#_%#0%~#]732~,w~2+#:&#%&'0%&>%}#>##F+)#%&&#(+_}4&}-%}(&}@&}O7Fdf0@+/v4}&WU##&/0#&'('B#%}.%}'+#%}#%%&#&%#%##+#&#)#6#'#.},%}c%},%#%##%&#&%#&~#>'*-.%##%##%}#%%}%'~#)D1}#%*&~#_%%'(~#S2%'.}#~#=##*'*-%}&'%'##&&~'E%.#&~#M4}%%##&'%#~#O1##%&#'+~#<B%##%%'%+~#;#@%}#&%#&&%#(~#H1}'%'##&&~#?A}&'~#D#%32}'&&&&~#[}'(#%}'~#;C})&}%%#%~#=&%,3}%'(#%%~#^'#&&)#%'~#Y%-~#d-%'~#^%%&#&&&}#~#b~2t*&'~&(~&@~0%~e~3}%*''0})&}+~!9##-}#%-hD*)1fC#%/&/fB#40~!+#)*4~!+~!K'&:~!/*7~!.#~!H~!L':~%x&~!H#~!*~%1~!I#~!+A~#p'~!F~~#-#~,,(~.Z~!V~%;'B'mq-W~!N~%I%#&&#&}#%},%%}'%}+X#%}#&}(%}'%}<%}#%}%%'}'%}:~![)9@~%>~#UA%-%##&~!C%~!-.9:~!1~!-^2/:a~!y,D*J#-5)/4~%23,~#G~!L1~!0X3`~!2+~!!0-~&E~!W~!o,>Y&]~%cZx_&~#O*9#A#'#+I'%#)~!0B*-5A+-((F&*M#)(-7-5+'-3a5Vi~!Y~!?+[)%3),ERHm~!+:D,VG.+)?fB%%*(%)'(#&80%1'8`K8?`+'Z#&O&'H5#*9)A%%5&3))0%39+.*7#()&&*=4@**L)<'_&*+..;(#*+)./&0#3)%')-8(4ixD(&.}%,('aI:,)%,k2231T)I'#/-W7,/'Q#.'Y24+h')37</31&83##&0#),H(?'&?/1##%#&&#%''-%&&&#(&''&#.-'%#%%(,')*'&#&#'##%(%(#%('#&##%%%%('%#%#%%#%#&%##h>w+v<ayvyvcg.uuhKr}g/v|g>u9i[~>g5uI~=RvdwEg;v/g;uk!!TTSx]@RT!U!#!@VBRUU!'UTe-d0c`e&gSdicedFcrdTaqb.kYcAohdYd@a3e+d}dMdtd.aJ#bqcK`dle/e.e'dwdPdodddjbEb}ogd^ofdpduc6j?l%d{drdqc)d7bacOdQ%T#Y)X.sR[yH>6Vyv3[xwLu>vo'!*.[yBacahoj>6Rew3[xqdZa#!a&#^(X-[yG>6Vyu3[xvg3sEr|g.u/Ri9db0T#^(Xa)!-[y;>6Vylg4wKs{JwNZt3@3r=c4Z([xlg;wKt!cpq's@v7A'*a(a+!-a#[y<3Dt?3Dt'>6Vym3[xmg9rxsNJwLZt4~?r?db1T#`-!(Xa,!0[yS>6Vz%NuQs.g4wKtnJwNZtS@3r>c4Z([y%g;wKtrdga8!a(!#&T*Y-Xa#!a0<or[yc3Dtq>6Vz43[y3JwNZtf@3s!Ju}!%Dti:pm3c_%X#tjB5pkd6q!r]u?voC'*-a.a2!0a&a+[yI3DtI3Ds~3DtH>6Vyw3[xx;:s#~<5pKJwNZtE@3r~d`a)!a2T#a.(!+U.X1[yT3Dt`3Dtv>6Vz&3[y&g9rxwzcxstPu.<rAJwLZtT~?r@dZa%!a.&^*Za(/Reu[ya>6Vz23[y1g3sEr}wkg{NuQRg{ci(U#5@b`~,cg#U(2WnH5wugcRh7dX#T(Y,a'Ta!!a,[yZ<]mj>6Vz,3[y+Pv#5ReZKu+=,%!H}7ABwkaS?Rh:BcW(X#<]mrj:ubv/ARekdg%!(!a.*Ta(Y.X1!#sP>Rl*Dt6[y>>6Vyo3Wf*jOvuumvuRgRJuq*!:9<B@bX~3jVv&v@s@5Re[d/rQt{uAvo&a&a*)a2!,0Wf!3Dt0=Bs'>6Re}3[xy~<5s%JwJZt1~Gs)c;&!#2sJkNuXvzq7rxu,Re8dka4!a8(aEZ+a@Y.X1Xa)[yd=Bs(3DtP>6Vz53[y4cX#X&Re:avRe9~<5s&JwJZtQ~Gs*i^rzvdRg+Jv{%!2sbB@bX}kdga,!Za?&^*T1/!a'Dt+[y6>6Vyf3Wf%g/u;s4hGu6?Rh-JvZ,!c%#&RoX54Rivj7uyvf8RgTKvZB%*!2sGh<vu5Rgq<=C::9bb~#dZ#T&Ta6Y.X*Dt>[y93Wf)coZ(T,6VyifluvRgC@95@B@bX~/hFu34cC#T,k/unq8w8Q5RkUklwQuzunq8w8Q5Rk8d/rJu?v8w9)-&!a0a;a&aIWejg3sEr/h1s<DtDJvyZqY5aws3Jvy!&Wei~Hr1:au5@Bag>23E~5c:Z&bX};kKv?w&unuVu5Rjc;>bs)#~@:Rh.=ay<a]C;b`}Vd6s/t{uAvoaxa()!a,a7%-a#a2Dt,[yF2Wo[>6Vyt3[xuNuPRi&NuPwpi#RoWh?vf8Ri%Jv]!%Ri:KvxD!.'2WeAjZu`q9rxu,Re7woeAg-unLq(qA_/*2Wg_g3u5q^9:4E}/jTrxrzv=Wkkd~0UX#^^Xa-a1a5T&a=U1a'*aEa]!a*aPaA-adok[y54Rn>;:p3~Dp5g9rpsFNvZqjg3uJp4~<5p0Pw;5qlJwNZt*@3p1Pw:5p/Ou!5p2JvG'!6Vye=<qnJvh_[xhg3v,Rh3kOwOw-sDuev/Re^dha[a%!%!a+#Ta7)-5TaCaO!aka!a)sf[yb2>Rl!9ARiq5E}Qg=ucRkBE|oJrJ_@Wk~@Wk{JrJ_@Wk|@WkyJrJ_@Wk}@WkzJvO_[y2g-vMRmiKuYC!)&>Ri;>Ri<@3RkNc](X#@9Rk=g5vuRmhKvDB!+'=]meg3u4Rmgd)#Y'Vz3CARmfd`a+!%T'!+#Ta1Ta6TaM-sTDt9[yA9sYd'%Y#s[[xpj:ueunaXRgEjRq,v-vuqdd2'`#6Rev<32@5>:2<E}5xIo9a*X#Y(;5RePJvD_g>vyRgNj8w)v8<wggs:RgXiZt|vjx,hSq3ah!-(~@:Ro/Ou!5RhWj^v(pyw8unRhUdx-UY#^Ua.a3a70!)%UX1TaDa)'omRiRRhE[y:3Dsz=Br,>6Vyj3[xkg6ruwjcqsrPw;5r*Ku]D'Zt-@3r(~?r.i[vwv]dU1a--U#`a4(g/vsRhPOu!5RhLj:rmu9Wo!~@:wdh@g/vsRiTjXuvvNr}:RhBj^v(pyw8unRn]dz1UYa'a+^Y(!aETZalaRY.Ta?a4[yDJw1!#qLsW>6Vyrfzq-pLflpwRe|Js>%!Dt@3Dt&Jvy_[xs~HrnjMuwpsw'RecKu+D#'!t<~Grl~?rjg5u-x,gwp{ah!-(~@:Rg~Ou!5Rh'jXuvvNr}:Rh#cW#X/c;&!#2sLi[v7u7RgpJv)(!iLrxu,Re6j7v@s@5Se[e7d`aW!Za(a`T.a#!a3!&aDa-!9)Dt_=6s+3[x~~DR|h~DS6avhGun5RkZj3w)v-]mkKunB!&*]kb97R|i<ARk<c:Z(6Vy}Juh'!wziMRoS:F|vkLuauJv5vtvQRh1d='T+Y#VyO~DR|jcF#T'7R|g97R|kJv3'!ay<Rj,Jvh&!:ReXcsa6*a+#a#_aIRf9aLRf?c,Z&Rf5Rf7c.Z&Rf;Rf>cQ#%T'p-Rf8Rf=ct#%'(*!,p,Rf4p+Rf6Rf:Rf<d~'Ua%U*^UYa(!a,-!#a4YaTalaEX0a8a<Weo3Dt/3Dsx=Br93Wen~Dr;~<5p<JwNZt2@3p=Pw:5p;Ou!5r3c7&!#:p>3Ds}KvGB)_6Vyk2sM=<r7x'eovA(!hFu1ARf}cV#X&@r5j6rvwQa^Rf3c=Za'wkghJv__g;unRggA53B9=b^}%j6uduo5Jq;!(hIv%2Re`Ou4ARe_e%a#^^^Xa&!a*a2!&a6YaP!*ad!#a:aE/5Rn?[y@>6Vyp;:pE~DrY~<5pBJwNZt8@3pCh=rt3rWPw:5pAJup_[xoNuPpF9c!#'45pD5ARn)d8#X'X*3@rU72s]h>v<<sSjJpqvewOJq/(!hNw'5ReBk0s2u3w/w'5ReE5@Jq.!a+JQ!&WeU23d(#Y&RjG5]jBk!u7w&u0udARjEe#+^^^Ub#!a2/a`Z(agT1!a-a;|@TaG!aS[yV=Re~fow'RguNuPRe?bz#'>RoUWeL>:Cbb|?JwPZtVg6ruRmzJvD'!6Vz(g/vmRh~Jvy_[y(g9voRgyx*cy(#2>Ri2B9b]~9kIw9u7rluJu3Rg]dI#a%UY'@=p%CAx.gQZ&RhwwygtRm{x5g_Z'+ABqR9Woa=Bp&dV#^*Xa'!&@o{g4v]Rk;Jv{!%Rk[wkkiA5RkiwwfUB=x,fUuqC&*!>RfTg8v0RfV~ARfSd;rJsAuAv9wR'ae+/aO!a@aza/a#[yQ@Wg!2Wemg3sEr0JvB_g>uvReWg2v+Re=KupB_+[y!2AbY~-~Hr2AJwD!(h<~El>h<~El?Kun@+_:9b`}Kg-v/Ri3g;vtwyk_9]k_d=&T#*U.6qh@Ab`|K9:H|CJv[!&3Dtex'fDwC%!Rf[9WlMd[(^X,!a%Z06Vz!@WgBg=v~Rgvg,QRe@awd,#Y+jTv|Q~EfWj]uNr|~FRfXdy#Y&^Ua%!aO.!(a)Ua;=!a@aKap!a-,a!Ta]a[rSa]p?[y82sK=Bq~;:p:~<5p8Pw:5p7d'#Y'Wf(;RnRi[u4w&RgJJvG'!6Vyh=<r#ijuuv/sIKuYD'ZtG@3p9~Gr&d2#`(g<vtRgFj`u5w&rqpxRf2CJuY!+:wfnTOu!5Rg}jNs1ucv&RfwJvA!&3@q|BDcC#T,k/unq8w8Q5RkTklwQuzunq8w8Q5Rk9dga#!a'!a=#a0!:+Tb*b@aO.a4!aba8aFJv^}?!VyR~Dr<g;u%Rn.~<5p[x'e`wNZtR@3p]Pw:5pZhNvjBp.woe_g5u-r4JwF!%DtO3:ooc7&!#:p^3DtpLuGw(!+%)Dtk6Vz#2sd=<r8d'#Y([y#<x3gJt`w@!)%}MRiowzikRij=]ilxAf3,U(#B2Rf#g0v-Rm[ck{`U#]giKv3>)!&6Ri154s,KuGB_%@r68r:dJ|t`#X(9<E|u2@H|rx3gJu?w'!+'1Nu7Reg4=H~+9<wxgY95Rm]xLggZ-`(X}U2:Ri4h<uOawRmsJv__5@bb{jbV~3dka#a'a]!,#a+U=a>b6a3b%!/aKa/)!arwve^VyJ;:pR~DpTg3uJpS~<5pOPw;5qmPw:5pNOu!5pQJvG'!6Vyx=<qoJvA!{~Jup!%@qk7Rn/KvyD!}''[xz;>wkh'?Rh,x8gyt`w5D!&),(SgyccRgztJ@3pPB5p#d'(Y#<]mmifubw&RgoJvE&!82s^JvF&!8Rf,ADb]~;x=h'rNu]vK!,%'*0RnORh)4Rh*AqQg-vaRnNg;wHwkh'ba~4cE#Ta*x3gctyw@'!+%RnFRnD<4Rn@hFvK5RnCxWg[#`&a0Ua()`1Rm75Rg[c]%X#qi8Rg^NvdRj>BwzgZauwji7Rm6A4wgg]d1#&(*,.0a#Rm;Rm<Rm=Rm>Rm?Rm@RmARmBe%#^^^Xaea?aC/b+(,!a+a#!a/!>a&Ta<aKbD!2wphBRnk[yPw}hE|.=Br-3Dtm>6Vy~g6urRf.x,hPrNav!%'RnqRo%Ro#Nu;q[Pw;5r+JwNZtM@3r)d'#Y'Weh;xChL#`&RnmRnoKu}>%(!Rne~Bs-;2wjcussJv+'!aYSO}6@B<5?ba~8LrNvj!.%*ROwungw~ng~:9;Ri^>wtnig;wHRnixDh@|(UZ.x1h@|)!#:2<H|*xHn]#-UX'3Ro)z=iT}6ARns=Bwsn_wpnaRncw]aR(#UXa&Ua*a/=]iPd'#Y&Ro'WnXf{QRm2hNvj]nZd`'T~&1`{|`#9b]{}c:'!#Wl{>@=be}]?cl{{U#:5Abb}Jds#^YaF!a*b4a#a3aPa>&Tb!bH!*a_!Eau?/a&RjY<]gj>6Vz*;:pe~DrZg,QRj1JwNZtX@wihspcJvZ&!VyX9WmOJu|!|N2WmHJvh&!]ht~Bpbcn&T(!#RmQ<s7Nu;padH#X'`+WmJ@>RmKCARhnKup=!)&Wf+:RhqNuPpf9c!#'45pd5AwghpARn(Ls@w!%,)!RmP@Wfe<E|IJva!&WmNg8vsRmLd`*.`#Y'Xa!axRn*]hrA8Rhug5s@rXg8u!RmMd8#X'X*3@rV72smdI*#UY&RmICARho~GsgxVgd)Ta'U-Y&Xa!T#RnEWnA@Wffg1uDRi0hFvK5RnBxGnG&#`%owp)@wsf+bX}Ze-*1!a*^^^Ua|!#a.aq&Ya2!a>.a6!a:aO`aJDtL[y`@Wg#>6Vz12@wzoYRoZNuPRi!NuPRhzg=ucRi,@=b`{Yg=ucRi-ACJvB!&Sh[ebSh]ebi`wUuFRm4Jw2_[y0JvB!.<Ju(!&SoG}6Shd}6<Ju(!&SoH}6She}6Kur@._g5vHRieJvx!{L2G{Kx6gd'T#?Rh82Wi5cZ#X(g1w)Rm5dW-Y(Ta#!a)!#aYa=wnfE=su2>>bU{0j9udv:<svj8uQv-7RgHdE%#^'sq9sp=>Bb_{TJv`!&g/r|snj6v(us5d,#Y(56H}[978H}]Jw5!&g1rushJvB!+j;v{u5?zDhd}6}bj;v{u5?zDhe}6}ce*#`(^^^a[aea!=!a6a*aoXb1a.!aAbL!b>,b'aL!aV@Wf|2Wlg3[y/JwNZt^@3piPw:5pgJunZou3@rsJva&!Vy_g<v~Rm#JvG'!6Vz0=<r{Ju{%!:pj@WfsiXuJu3Rm:JvZ&!WfA~Bph@c4Z&Dtwax5rubx(#:awRk1@d,#Y&RfjRfid1#,Y(@Wfp2Wlrg5s@ryKu[@!,'=]ig9wlk?Rk>g5u-rqJvy'!@9RkQcH(T#=>Ri~@<wkj(Wj(KuZB*!&<7rw@9RkRcH(T#=>Ri}@<wkj)Wj)dg(Ta2Xa9X#`-!a*CARhg@@=I}d9x;c~#X%so=<sj>2@@=aybb}XjWv0Q~EfEj3vLv;<d,#Y(56H}`978H}_dgaPaFa'a/!#a3Y0a_a;a|!1(a7-[yE3[xt;:pJNvZrrg3uJrvJwNZt=@3pIh=rt3rxPw:5pGOu!5rpJvG'!6Vys=<rz@c4Z&Dt(ax5rtJvZ!&~BpH@wsfNg-vaRlNci*U#=<wei<F}a5@Jq.!a*JQ!%@qZ23d(#Y&RjH5]jCk!u7w&u0udARjFd/prq=tyvpaEa(a:.!a1aZ(@@=I}:9wpd%=<sX55w_h}@@=I{t=ay<aU@@=I}T=ay<2@@=I})?C9:9au@9Cb]}DP~=x-fAZ(2Wl1=ay<aU@@=I}>5@d##Y+jTv|vV~EfFj]uNpn~FRfGdgaK!Z2&!a8a-Tb({E!acTbM*!a(DtY[yYd'%Y#sl[y*hHvh>Re5x2c{Z}.j4uCvcawRiMd+#X+_x&d!},<5RkX;2Hzw@x,gavfB-!{CcF&T#Roe;RodwWbBg5urRgaKvHC*_6Vz+<4opieuew&Rmq@d]&Y)X,T#X0Rh}<BqP=4qS9:ReMg/ujReNJw0!/<Jui%!bd{kawwnemRelAxUa?a3#*.&UX(Ya+a/RhvRnQ<o}9Wmtd-#Y&RgSRmw9;Rmxay=Rmyg-vaRmuxEhSrNu,v-voC!%(aR.a(a7+1Ro1>Ro5CE{A9b]{@;5x#eO{:g;urRi+KrNA!%(Ro3>Ro79;Ri_Ku@>{;&!x%gX|{KunA_+g5QRj/g3u5Rj#g>uERj%wio/xRhS&!,!#^1U}wba{8>>@=be}qC@:D5ba{7Ku+A&!}x?ba}t>>@=be}se(aA^^^Uat!b0#{pa+awUazbGa#aLb9bgaWac'a5TbS=Br!d1#`%scp_Jvl!#rT>Re0JvX&!VyN=H{Fcm#U&:pY=ReaJv2&!]h0=]nUJvG'!6Vy|=<r%JrM_=]h2@Wlud'#)U'Wf'b]{i=]h/Jvh!&~BpWg=v]RnMx+ny#'Nu;pVwjnu=]nwxJnx,T#`&Reqwjnt=]nvieu9vrRjLLuYwP(#+!th@wih5pX~Gr'g5v/Rh4KunA'!-CARnP@wwiN:Rm_9x'cvw>!|l=<saKvAA!0&3@q}>w^e1bp#&Re2Re3BDx7gH#T|f5H|eKuZ>!%(:qNAH{]Jv6!+3B2B9=b^{X<5<B92:E{ZLvhwA(a;a%!igQuyRmad+#Y}m@3Rh5d8#X'X*:AqUAHzmaxwbh<aXRnVcF}RT#Nw&cj#U(BWnug/vsRntdka)(a3+.Zb7aYYan1!bVa@Xa}[y^@b[{G=H{+hFu73Rj&Pv#5ReQcK%T#sig1v{Rj'Ku+D#'!t]~Grm~?rkKuMB!01d5#`'Vy.ta3Dtu~Hroc8#'{^45s85AwZbP&!#Rn!wghxWn#KvEA!)&2RlA2RlBx:h|#(T,=]j09Wobz>x]z/@awRoTd+#Y(az]hFhCrm4d,#Y+jTv|Q~EfMj]uNr|~FRfOdCa!Xa9_X#@<plJvf!%b`{(9;Rgwc;.!#2x7cw#T|UDb]|T5Ju={(!=@E{&Jv)&!Ab`{'awJvf!~*>>@=be{#KuY>!+&4Ezyi[ugv&RjIdea+T)#UXa&T-T&a!Rh9auRmW=]kLg5vuRn+g3u4Rn-Ow6ARn,hHus5xNk?#UX(U~)/g8v0RkD~AwkkF?Ri.OuNBwkkA?Ri/d|a2`a*^UYa.!aBTZaTa'Xa;!(!2!-a#b2[yC>6Vyq3[xr2Wi?g1rusVh%s?DtF~<5rbJs;%!DtBfswKtCj[uvuSsEu3RgVx3o:u+wN'*Zt;@3rd~Grh~?rfg8w)Lq)qE&-a%!>bI|`jWv0vV~EfCjTv|vV~Ef@j]uNpn~FRfBcK#T']gWNu7x,k7q4ai(0!hHv8<RhmkMu9vrsBuev/RhlCJvB!,g<v{wchh~@:Rhji[vrv{wchi~@:RhkdS&a5UY#Ta!RgPwwiI5BwciI~@:Rh`x'iJvj'!5]iJPu8Bwch]~@:Rhach)U#h3rp]gLh@t|Ax,hTq3ah!-(~@:Ro0Ou!5RhXj^v(pyw8unRhVd|)`,^UYas!a?/a2Z'a^Ta{Tb7Ta(a#!a,Wf&9sZ3DtAadamov=Bqt3[xig8vsRm~>waiL2b`{QJv*_Ouv2qgj<v]v2BqfdR'X*X#Y-@3qr~Gqv~?p6hHv-]glPup5Lq+q?_%*b_{qF{n9b^{rOu4ARhpKvCD!+&~Bqp:5Dbb}nwoiKl&unuTuBv]v+ueunaXRf0=Jvh!0nKufu8v1w&w7q%w&uHrz:Rgnj5w,uxDJq/(!hNw'5ReCk0s2u3w/w'5ReFd>Za&!*UaA=<wkgsRnSJv^!%Refifw3vyRgOKu_B'!,<]gkiiu:w&Rh<=C@a^<B57@2F{[<B5@aW:=3away9A5aW=<B=C@a^<B57@2F{Ie-#`(^^^bCara.b8aza6!/bZ,!adTbnTbOb+aFaS!aAT9@Wf~2Wli3Dtl2@d,#Y&RfnRfmJwJZtN~GqyJva&!VyMg<v~Rm%iXuJu3Rm9Jv[_=]ih9wlkDRkCd1#`(@Wg>2Wls3cH#T(@<Rj*=>Ri|b~'#23s9h<~El.d'#Y&Dtxi^rzvdRl#d*#U%(o|B2s`hJwSaxRmDKv4B&!1:Rmdd5#`'Vx}to~Hq{x'f1v3(!BA5ba|bJv_&!Wfug1v]ReIdO+U/Y#&G}-8wze=Rh{g1v]ReHg/uQRf/by#)ibQwERl/cH#T(@<Rj+=>Ri{cNu+vlax-!(#a0qa9<Rii2;;bU{H;x<i=&X#Rk`<4wwi=C9H~8xAI(Y#<azRi@45wXI<B9;5bb~7dL(X#Xa(+!aL6Vy{g5QqOau:5au2@ay547EzbxOcU(UX-T#Ta#:Cbb|A?wjh/b_|SOw6ARgtihr}u7Rhy<d1#T)X1@@=I|~=ay<2@@=aybb}Sj3vLv;<d,#Y(56H}A978H}@dGpvs@uAu`vcw9*!aFa+ai%(b!aXa8.a?a[ozWey=sU2@G}Nch&U#Rf_WexKu+D#'!t:~Gr`~?r^j]uNr|~FRg*j^psurwJt|RmcKv)@&!)7Rkv~Br[@wxfO:Rl3co#U'6Rezj_q#vIuavjRltwzeyh@vr5JqD0!>aY?C9:9au@9Cb]}9cl#U*5;5<H||jbuus1ucv&Rfvg1v~d/pppzqFr^a--a~!aMat1(hFv;Wiz@@=Izoj5uuv-7Rix~Cw`fk2WlVcZ#X,k)u3vWs@u2]ktg;wEx'fBq(_2Wg/jTv|vV~EfoJv]!15x'hzqG!(P~EfU~CRl_j6v(us5x4i-#T(2WmZ?C2F|d>Kq<aj1!*jTqIsBv=Wl`~Cw`fi2WlWj`v0u*~>RlR=c>Z,k#u3vWs@u2]kr<c1Z+jTqIsBv=Wla~Cw`fm2WlXdmb3!a{(arZa`bkTa%TbQTa-a9+c'!aM!/[yL=Bqug.w'RifhFvyDRj.g>vgwyk^9]k^Jv3_@WfbAARkhJw2_[x|JvB_wkoIRoKwkoJRoLd'(Y#<]gm=<9<H|yd'%_X#skDtb3awwqkgNulRkgdB#^',9:p'hJwSaxRmEBwVb8@4=H|qLu+w50&!)@3qs~?pU>Awwn;;Rn=c:Z'ARn<=<qwKvC@!/&~BqqJv6!&]eVb^z^xRge'/a%+^`#Sge}6<4Rn3=]n0Pw2>Rn8Jw0!&>Rn:>Rn6cY#a7+!a&=<wkaNw~h3z_c5Z{=wjh#=]nLKv^D!&)Vyz=bW|swYb<WetcG#T(2wxa@qVx@gD#Y&b^|V5JwG&!5bb|pg/w&RgD@x=kHs=uAvn!a%%/'+RmSRh694Ro`g-vaRmRhHv-]mlxCcS#`&ba~.5cD#Ta)P~=d,#Y(56H{>978H{Dd_#{2^Y%_+qbbb{6g3sERhsbU{?dfa.,`a(Xa<!aiX#(55RiG54RiHcI#T'WiU3RiVNvdwtfcRlKNvdd,#Y&RlHRlExQgf.1*^T'X#Sgf}6Wn4=]hfPrk>Rn7Jw0!&>Rn5>Rn9Lunw?&a2!,5<oq@@wqfdRlJj5Q~=d,#Y(~ARfcOuN]fdDKw;ay(}i!547E}j?cI#T(@5bV}iCbV}hdv(^^Tb?a40,b##Tbo!a*bR!a<b|a/!aKai!aU[yK=]o^g:v>ReGJwPZtK<7Rh+h<~El,Pv#5ReR@awwxjCg,ulRjDJv6&!]j!z?aQeeg>w=Sh<eeJw;!&axEzOg,Qosc!#*:wkeJ]eJ>x'h-u(!%Ro.w~h.zPdNZ(X,Ya![x{;9ReY;wkgxRiF:x?ap#Y&RmUg<s2Rkod]+UY0TZ'!a&A9sw<=bczLNvuw{gqzNhJwSaxRmCKuLay!#&s_Rf-55b^{uJvZa!!c%#(55Ri654wmiu5RiuawLu,vp!+}^%b_}Y9;wkgxba}o>A9:=b^}zKuh=a''!3awRk3c*'!#aHRk6c+Z&Rk5Rk4Jv)&!awRjSawd9*`#0?C2@EzMj8u<uJ5RmbjQrquJu3x,k>uq@_+=ayb^|W~ARkEOuN]k@7dhzV^X/X&a-#zRzSb`zXcJzTT#2WkVKvDBzW!%FzY9;5bbzWjQrquJu3Jw3%!b`zU=ayb^zQd:#X(T-a!6Vyywxh}=b]{Jg=u1RiAdGp~qHtzv!w(wA+a+a;<!aJaYai'anasb(=azRmV:Cbb{MLq2vb!%')RjuRjrRjtRjqx3jnqCw3!%')Rk(Rk+Rk&Rk)Lq2vb!%')Rj{RjxRjzRjwLq2vb!%')RjsRjpRjfRjex3jcqCw3!%')Rk'Rk*RjkRjl9<CbbzfOu4ARhxLq2vb!%')RjyRjvRjhRjgx=joq*uKvb!%')+-Rk.Rk%Rj~Rk-Rk#Rj}x=jdq*uKvb!%')+-Rk,Rk!Rj|RjmRjjRjidAq&qKs@uAv8Aa.'*-a@a&0!aM@a5[y73Dsy3Ds|3Dt):wxgI2sHJwJZt.~Gqxwsf0ikrzt}Rl0Jvy_[xj~HqzKv_A|D!&WfP8axRoVcf,U#k(v]v+ueunaXRf1Ju}'!g8u#Ri=jQw!sCunLprq>!,')~<5qeGzq9F{W=c##%s5au:5aU3CBE|;d4#X(D!a&6Vygx(b;#(=]ed?C2F{N<capoq2r[a&!aPa9,'Pw;5s:@@=I|,55w_h|@@=IzcP~=x'fCqB_2Wl2>aU@@=I|1OuNBc1Z+jTqIsBv=Wlc~Cw`fl2WlZ~AcTa%!Z+jTqIsBv=Wlb~Cw`fh2WlYk+uNqJsBv=WlSg,u3dca3#UXaMYa)TaB-=cM|7T#<bI}l5@B932:aV2G{BOuNBJq:|M!5Ezt=<B=C@a^<B57@2F{v>cB{/T#=ay<bI{3Jv6!a.6BKq0ah&+!5E}HP~Ef{978BaU@@=Iza<7d#.Y#978BaU@@=IzH~AJq0!(@@=IzG978BaU@@=IzFe,aU*Y&^^^bvJb,b:bFad!a,c2Ta>aL.bo6!a#CbTa'T#Re{2Wlh2@G{yg6t~Ro_NvdRfticuRQRllJv3&!x&c|zs@Jw3!%RflwpfkRlpKuL;%(!Re<@G|C2GzdhIvuBwgjAg-u0RjAKQB%!(GzZ@G|5NuuRl7d='T+Y#Vy[g<v~Rm!==G|>JvA!)@wma=]m1ifuaw&RmnLs@vT'!|/+[y,g:v>ReTJw1!#qX=x!eC{bLu+wT&)ZtZauq_~Graci&U#F|89:r_Lupvq!.)&2RlG8RfaC=x!eF{_h?rpWlmd&'!#X|&]k::xJey#`'T|+<E|&2@H|%dE#(^,g;u.RiEg6vjRiC9xCkA{O|zY#g=ucRmXKs0@!&*@G|m@awRknJuh!,3d(}gY}eJvj!%Rm):Jw3!%Rm+Rm-Ls0w(&!a(a#@b[|6cZ#X'7RkxWgAOu4ARn'dH'U#Y*Vz-Wm'CARm}d]*#a%^a*T'aK!a<9bV{PC=p*Jw4!&SgxcbB5r]idw(wBRmF7xFkt#&`(Rm/Rm8E|!JuY_9:Rl5=wrgr2:bbxd@xXfB(a*#T+!.X0X1Ta/a'T&RlDRfL>RlyARl9b[z[>RfZ:RlL:RfRwlg/ARl;9;RlxKv,A/!%7s69<74=BA5ba{-8Bde#`a<XaKYa1,a'P~=wxfB2bZ}}?C972@@=I}r8@55B9;5bb}G978B2@@=aybb}3j3vLv;<Jw3&!>Rfk=ayb^}4~Ad1#`*@@=aybb{w2@>==<bbz]dx+UY#^UaF!a9!bB'Ya1.!ajXa#%olRhD[y=3Dt#Ov5BrHKuMB%!(Rf^Wep~HrJwkiQjKr|~FRg)Ku+D#'!t5~GrF~?rDdV)UY,Z/_7RkuG{<~BrBg,rlsO:235B@bX}|d?a1!#`(6Vyn5@d##Y+jTv|vV~EfIj]uNpn~FRfH7Lq2vb1!a9-978BaU@@=Iz9978BbU}#~AJq0!(@@=Iz8978BaU@@=Iz7~AJQ|}!978BbU}!JvkaK!AdUa21-U#`a+(g/vsRn~Ou!5RPj:rmu9WhOjXuvvNr}:RhAj^v(pyw8unRn[kPr}p|u7vwv]RiSBd;pppzq@qHQa?(b.!a.a`@.|xa(hFv;Wiyj5uuv-7Riw~Cw`fg2WlU978BbU|wOuNBJqG!(P~EfD~CRlQcZ#X,k)u3vWs@u2]ksg;wEx'f@q1_2Wg.j]uNpn~FRfqJv]!15x'h{qG!(@@=IzK~CRl^j6v(us5x4i,#T(2WmY?C2F{1>Kq<aj1!*jTqIsBv=Wld~Cw`fj2Wl[j`v0u*~>RlT=c>Z,k#u3vWs@u2]kq<c1Z+jTqIsBv=Wle~Cw`fn2Wl]dn1#c(a(b^a2!b/bAT(bj!aDa7bu,a_a{c0!2T0g:v>ReD2@G{42@G{5~DpM~<5rc=Bx6i>{RT#RnI@zCx]y]z:2Jv[!zr5Awyk]9]k]dD(Y+X#6Vz.g=wKtgwhaCwgmTWj2Lu,w%_+/[y-B;b^xeg3u3Rj-2@bX{*KrJ<!+'@Wg(g?QRlC@Jv`!%b[zIwsfII}8JQ_@w|kW|=Jv(%!AqcOuNBJvEzh!bYzjLs@wP#(0!oy@>RkdJwMZtc3Dtd@BcG#T'9bWxg2@2Fznd*#Y+;2x'c}w<zizixNgwa#Z'U+!/!a'!a+w~g~z6wcn{Rn}wcnzRn|5Rh%=]nJg5vuRmvNvdRlvcprJu}w*az*a#!%.a.'Bot9qT]kj@Wg'ay2Gzv@Jv`!%b[zEwsfHI}1;ck#Ux`<Cbbx_Lu+w!a&0*!wko*wwo,So,}6Juqxf!E}PigQuyRm`d3(`#8>Rn%:A5B;bZ~%KvhCa!a2!x>k7#Uxb@b{#xaRk7Jw0!)>wwhlShl}6>wwhmShm}6CJvB!.x'hhvj{!!5Bwkhhbaz}x'hivjz~!5Bwkhibaz|xEhTrNu,v-vpD!a%&/)a3a.,%Ro2t[CE{)@3re9b]{%wjo09:rgc:Z&Ro6=<riifuaw&RmoKrNA!%(Ro4>Ro89;Ri`dSaL'UYzxZb)7Rka3xRhT&!,!#^1U}vbaz{>>@=be}yC@:D5bazzKu+A&!}{?ba}y>>@=be}wxBh[t`u~vJvr!%a!a()a,a0a4RoC=]o;Ju(!%RoGRhdwjh`=]oAg>w#Ro?g5vuRo=NvdRl|Ku]C.!&;RoEJvB!%RoORoMBx'h[v+_?w~h`}~5?w~hd~!xKh]oiptu-utv.vp!#%&a30a@a'a+(a/aOp(o~p!RoDJu(!%RoHRhewjha=]oBNvdRl}g>w#Ro@g5vuRo>c[#X']o<CauRoRAd-#Y':RkpauRoQKu]C.!&;RoFJvB!%RoNRoPBx'h]v+_?w~ha}t5?w~he}ue!/UbhYacXaW^Tc&a;b:a-c/#b&aja1(!cL+!bKbt!bmcRc9aIc?8[yW3Dtt94Rg`Jv}!&SiRMzBhEebShEMNuPRe>x7gL#TzuwjirRipc<Z&>on;>z=h-MSh.Mwqczx'a7vj&!>Re4@=ResJt__NuPRi*NuPRi)j]uNr|~FRfzKrJ>_+@Wfy@Wf]2WocKrJ<!+'@Wg%g/QRl@@Jv`!&awRl<wsfFIzgLu(w*!.*&ShBMwvhIRhI9;RhNx1hK'!#Sn]Mx1hK~0!#:2<H~7cNu+w7D*'1ZtW>Rn1~?rOc:Z&Rn2=<rQ<7wjh&=BSnLMc]#X(6Vz)w[b=a!U#9wzgMc3#&(RgMRitRis<x,gKt`ax!&+SioM=BSilMc3#&(RgKRinRimKurB,!&SiQMzBhDebShDM6BJQ!(P~Efx978B2@@=I}WLrJw!!,a*&@G}O@9wkibRid@@x'fKwC!&SlDMSfLMjUv~Q~EfKKv3@a+!(hFv-]mpx/hYZ(C5RiWz<o/MwkhY?So/M@x,gbvfB*&!SgEM:SoeeehFu3:Rgbda(,^TZa)X/7Sg[eb:2RgI~BrMC@wgkc:wwkcRerx3h(uUvK!&*,SnOM4Sh*MArRg;wHRh(x=h;rJvPwI!a4',a'0@Wg&=BSh/Mg>w=Rh=g3w*wwgGRgGcW(X#;Sg}M2Gzk@Jv`!&awRl=wsfGIz`dKZ*T'Y-:RhR7RhQg5u-p`j6v(us5d,#Y+~Awkia?RicOuNBwkibba}Ld6p~tyu_vbAa'a+!a/'a3aEa8a!>Sh,ebJv{!&Sh@ebSaReb9;SgwebNuPRi(NvdRl)NuPRi'hHu^<Rm^Jvv_@Wl(g;u1Si/ebKu'B&!*Sh?eb@Wl'z@aPeb95Si.ebcpputyvjB)!,&a+0a%ShAMWeK@G}C@WfJ9;RhMwvhH9w{ia}ix,hJvRA1(!zAn[MRhHx1hJ~*!#hFv(BSn[MBJQ!(@@=I~'978B2@@=I}2db.Ua<'X}+T#a0XaG2G}E;wkg|wuh!Rh!x,hZu,@)!&So0MVy)C5RiXACJvB!&5RiY5RiZg8w)cG}*T#2@bU}=KsA>(!a.3wkhZba~(x,h^u(A!&(SoCMRhb5Bz=h[eb?w~hb~6x,h_u(A!&(SoDMRhc5Bz=h]eb?w~hc~6e)aA1T#T,^^^c-bMb&blcPaP(a/!0!bA=b5c@a(!bfbrc#2afwmhARnjwchORnp2Wlf3DtsNvdRl-2@wpa<]m0bx(#:awRk2@Jw3!%RfhwpfgRlnKQB%!(G{V@G|'NuuRl6d='T+Y#VyUg<v~Rl~==G|<Jv+'!aYShC}6@B<5?ba~8@Jw3'!g2QRljhLrpWlOd+#Y'g.w'rIg>w*wgj@g-u0Rj@Lu+wT&)ZtUauq]~GrGci&U#F|39:rELrNvj!.%*RhCwunfw~nf~:9;Ri]>wtnhg;wHRnhx3hDs@v~!/+'@Wfr@9RkSNu&Rlo=@<5GzoKs0@_+@Wl+@awRkmJuh!-3d(}pY#qWJvj!%Rm(:Jw3!%Rm,Rm*de&!1U-U#`)Re;@G|.@9Ri82@wjfvRlq=@<5GzpLvOvr!).&2RlF8Rf`C=x!eE{.Jw3_g2QRlkhLrpWlPde(!#U{s,UXa*Ta'[y'g:v>ReS;x0PZ&RnlRnn~HrKJw1}f!=x!eB|2w]aP(#Xa&a*Ta.Ua2a7=]iOd'#Y&Ro&WnWg;u.RiDg6vjRiBNvdRlzhNvj]nYJuW_2Wm3x)kFze{9d])!a.!,Y01!#&aC!a3RndC=ox~BrC@2b^{pg,rlse7x'ksuq!%Rm.E{xidw(wBRmGx9o+)X#wwo-So-}69:Rl4@xSf@a#XZ'X)X,Ta(/ARl8b[xc>RfY:RlI:RfQwlg.ARl:9;Rlwdn'#^XafaQa1X1TaHTa)@b[{zcZ#X'7RkwWg@Ou4ARn&x)kG#{,g7u/RkGdH'U#Y*Vz'Wm&CARm|bx#(A]gUbUzJj9Q~=d,#Y(56H}l978H{U7d,0#U*2>ABb_xZ978BbU{e~AJQ{g!978BbU{hxMh?ad{oUYZ.x1h?{l!#:2<H{mx3n[t{vl!,&a%3Ro(z=iS}6ARnr=Bwsn^wvn`Rnbd`*T}B0!#^X'BG{c9b]{a>>@=be}F?JvS!&BG{d7BG}(Bde#`a1X,Ya@!a'P~=wxf@2bZ}I56B2@@=aybb}08@55B9;5bb}<j3vLv;<Jw3&!>Rfg=ayb^}&OuNBKuLA!)a!P~=x#fD{f2@>==<bbzl?C972@@=Ix^d6rSu,v7w*C(0a)a6#B+a%!sQ[y?3Dt%3[xn~<5rLOu!5p@Ku+D#'!t7~GrP~?rNKvlaya7'!h+v-5qMg=t|cd,U#5AAaa5Abb{S@52B5@a[@52B5Gx[iXueu;d<#`a(!/549C;ag>23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!b<bwA!#5@B932:aV2G|:d-)Y#hJrL>RhG<7@C5<H|_=Cau:5aj5@B932:bJ|ng>vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61);var at;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE",e[e.VALUE_MASK=8191]="VALUE_MASK"})(at||(at={}));var xt;(function(e){e[e.AMP=38]="AMP",e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_X=120]="LOWER_X"})(xt||(xt={}));var Qi=32,Sc=21,o1=2097151,La=2047,Tc=0;function a1(e){let t=e>>>Sc;return t===La?Tc:t}function Rc(e){return e-xt.ZERO>>>0<=9}function l1(e){return(e|Qi)-xt.LOWER_A>>>0<=5}function Mc(e){return(e|Qi)-xt.LOWER_A>>>0<=25}function c1(e){return e===xt.EQUALS||Mc(e)||Rc(e)}var Cc;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Cc||(Cc={}));var Ia;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ia||(Ia={}));function u1(e,t,n,r){let s=(t&at.BRANCH_LENGTH)>>7,i=t&at.JUMP_TABLE;if(i){if(s===0)return r===i?n:-1;let l=r-i;if(l>>>0>=s)return-1;let u=e[n+l];return u===0?-1:n+s+u-1&65535}if(s===0)return-1;let o=s+1>>1,a=n+o+s;for(let l=0;l<s;l++){let d=e[n+(l>>1)]>>((l&1)<<3)&255;if(d===r){let h=n+o+l;return a+e[h]&65535}if(d>r)return-1}return-1}function _c(e,t,n){if(n===1)return String.fromCharCode(e[t]&at.VALUE_MASK);if(n===2)return String.fromCharCode(e[t+1]);return String.fromCharCode(e[t+1],e[t+2])}function d1(e,t,n){let r=t+1,s=0,i=r;if(r<n&&(e.charCodeAt(r)|Qi)===xt.LOWER_X){r+=1,i=r;while(r<n){let a=e.charCodeAt(r);if(Rc(a))s=s*16+(a-xt.ZERO);else if(l1(a))s=s*16+((a|Qi)-xt.LOWER_A+10);else break;r+=1}}else while(r<n){let a=e.charCodeAt(r)-xt.ZERO;if(a>>>0>9)break;s=s*10+a,r+=1}if(r===i)return 0;if(r<n&&e.charCodeAt(r)===xt.SEMI)r+=1;if(s>1114111)s=1114112;let o=r-t;if(o>=La)Tc=o,o=La;return o<<Sc|s}function f1(e,t,n){let r=Ac,s=e.indexOf("&");if(s<0)return e;let i=e.length,o=0,a="",l=r[0],u=l&at.JUMP_TABLE,d=(l&at.BRANCH_LENGTH)>>7;do{let h=s+1,p=e.charCodeAt(h),g,b;if(p===xt.NUM){let x=d1(e,h,i);if(g=a1(x),t&&g>0&&e.charCodeAt(h+g-1)!==xt.SEMI)g=0;b=g===0?"":xc(x&o1)}else if(Mc(p)){g=0,b="";let x=p-u,k;if(x>>>0<d){let D=r[1+x];k=D===0?-1:d+D&65535}else k=-1;let E=0,T=0,_=k<0?0:r[k],A=h+1;e:while(A<i){while((_&(at.VALUE_LENGTH|at.FLAG13))===0&&(_&at.JUMP_TABLE)!==0){let B=_&at.JUMP_TABLE,O=(_&at.BRANCH_LENGTH)>>7;if(O===0){if(e.charCodeAt(A)!==B)break e;k+=1}else{let H=e.charCodeAt(A)-B;if(H>>>0>=O)break e;let K=r[k+1+H];if(K===0)break e;k=k+O+K&65535}if(_=r[k],A+=1,A>=i)break e}if((_&(at.VALUE_LENGTH|at.FLAG13))===at.FLAG13){let B=(_&at.BRANCH_LENGTH)>>7;if(e.charCodeAt(A)!==(_&at.JUMP_TABLE))break;A+=1;let O=B-1,H=k+1,K=0;for(;K+1<O;K+=2){let G=r[H];if(e.charCodeAt(A)!==(G&255))break e;if(A+=1,e.charCodeAt(A)!==(G>>8&255))break e;A+=1,H+=1}if(K<O){if(e.charCodeAt(A)!==(r[H]&255))break;A+=1}k+=1+(B>>1),_=r[k];continue}let D=_>>>14,R=e.charCodeAt(A);if(D!==0){if(R===xt.SEMI){g=A-h+1,b=D===1?String.fromCharCode(_&at.VALUE_MASK):_c(r,k,D);break}if(!t&&(_&at.FLAG13)===0)g=A-h,E=k,T=D;if(D===1)break}let L=u1(r,_,k+(D||1),R);if(L<0)break;k=L,_=r[k],A+=1}if(b===""){let D=_>>>14;if(D!==0&&!t&&(_&at.FLAG13)===0)g=A-h,E=k,T=D;if(g>0)b=_c(r,E,T)}}else g=0,b="";if(g===0||n&&p!==xt.NUM&&e.charCodeAt(h+g-1)!==xt.SEMI&&h+g<i&&c1(e.charCodeAt(h+g)))s=h;else{if(o<s)a+=e.slice(o,s);a+=b,s=o=h+g}if(e.charCodeAt(s)!==xt.AMP)s=e.indexOf("&",s)}while(s>=0);return a+e.slice(o)}function eo(e){return f1(e,!0,!1)}var Dc;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(Dc||(Dc={}));var Lc;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(Lc||(Lc={}));var m1=class{src_Any=Sa.source;src_Cc=Ta.source;src_Z=Ma.source;src_P=Ws.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,n=4){let r=this.escapeRE(e),s=this.escapeRE(t),i=`(?:(?!${this.src_ZCc}|${r}|${s}).)`,o=`${r}${i}{0,1000}${s}`;for(let a=2;a<=n;a++)o=`${r}(?:${i}|${o}){0,1000}${s}`;return o}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){let t=`(?:(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:[0-9A-Fa-f]{1,4}:){6}${t}|::(?:[0-9A-Fa-f]{1,4}:){5}${t}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;let e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map((e)=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},Na={validate:(e,t,n)=>{let r=n.re.get_http_validator();r.lastIndex=t;let s=r.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)},p1={"http:":Na,"https:":Na,"ftp:":Na,"//":{validate:function(e,t,n){let r=n.re.get_relative_proto_validator();r.lastIndex=t;let s=r.exec(e);if(s){if(t>=3&&e[t-3]===":")return 0;if(t>=3&&e[t-3]==="/")return 0;return s[0].length}return 0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){let r=n.re.get_mailto_validator();r.lastIndex=t;let s=r.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)}},g1="a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",b1="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function v1(){let e=b1.split("|");return g1.split("|").forEach((t)=>{let n=t.indexOf(":"),r=t.slice(0,n);for(let s of t.slice(n+1))e.push(r+s)}),e}var y1={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:v1(),urlAuth:!1,maxLength:1e4},Ic=class{schema;index;lastIndex;raw;text;url;constructor(e,t,n,r){let s=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=s,this.text=s,this.url=s}},Nc=class{__opts__;__schemas__;re;constructor(e={}){let{rebuilder:t,...n}=e;this.__opts__={...y1,...n},this.__schemas__={...p1},this.re=t||new m1,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{let n={normalize:(r,s)=>s.normalize(r),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;n=this.re.get_schema_search(),n.lastIndex=0;while((t=n.exec(e))!==null)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]){if(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null)return!0}if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]){if(e.indexOf("@")>=0){let r=this.re.get_fuzzy_mail_host_search(),s=this.re.get_mail_name_validator();r.lastIndex=0;while((t=r.exec(e))!==null){let i=e.slice(Math.max(0,t.index-65),t.index);if(s.test(i))return!0}}}return!1}testSchemaAt(e,t,n){if(!this.__schemas__[t.toLowerCase()])return 0;return this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this)}match(e){let t=[],n=this.re.get_schema_search(),r,s,i,o,a,l,u=!1,d=!1,h=!1,p=0;if(!e.length)return null;if(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"])r=this.re.get_fuzzy_link_search(),r.lastIndex=0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"])s=this.re.get_fuzzy_mail_host_search(),s.lastIndex=0,i=this.re.get_mail_name_validator();for(;;){let g=Math.max(p-1,0);if(s&&i&&!h&&(!a||a.index<p)){if(s.lastIndex<g)s.lastIndex=g;for(;;){let T=s.exec(e);if(!T){h=!0,a=void 0;break}let _=i.exec(e.slice(Math.max(0,T.index-65),T.index));if(!_)continue;if(a={schema:"mailto:",index:T.index-_[1].length,lastIndex:T.index+T[0].length},a.index>=p)break;if(s.lastIndex<g)s.lastIndex=g}}if(r&&!d&&(!o||o.index<p)){if(r.lastIndex<g)r.lastIndex=g;for(;;){let T=r.exec(e);if(!T){d=!0,o=void 0;break}if(o={schema:"",index:T.index+T[1].length,lastIndex:T.index+T[0].length},o.index>=p)break;if(r.lastIndex<g)r.lastIndex=g}}let b=a;if(!b||o&&(o.index<b.index||o.index===b.index&&o.lastIndex>b.lastIndex))b=o;let x;if(!u)for(;;){if(!l){if(n.lastIndex<g)n.lastIndex=g;let A=n.exec(e);if(!A){u=!0;break}l={schema:A[2],index:A.index+A[1].length,lastIndex:A.index+A[0].length}}if(l.index<p){l=void 0;continue}if(b&&l.index>b.index)break;let T=l;l=void 0;let _=this.testSchemaAt(e,T.schema,T.lastIndex);if(_){x={schema:T.schema,index:T.index,lastIndex:T.lastIndex+_};break}}let k=x;if(!k||a&&(a.index<k.index||a.index===k.index&&a.lastIndex>k.lastIndex))k=a;if(!k||o&&(o.index<k.index||o.index===k.index&&o.lastIndex>k.lastIndex))k=o;if(!k)break;if(k===a)a=void 0;else if(k===o)o=void 0;let E=new Ic(e,k.schema,k.index,k.lastIndex);if(E.schema)this.__schemas__[E.schema].normalize(E,this);else this.normalize(E);t.push(E),p=k.lastIndex}if(t.length)return t;return null}matchAtStart(e){if(!e.length)return null;let t=this.re.get_schema_at_start().exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;let r=new Ic(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[r.schema].normalize(r,this),r}tlds(e,t=!1){if(e=Array.isArray(e)?e:[e],!t)this.__opts__.tlds=e;else this.__opts__.tlds=this.__opts__.tlds.concat(e);return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){if(!e.schema)e.url=`http://${e.url}`;if(e.schema==="mailto:"&&!/^mailto:/i.test(e.url))e.url=`mailto:${e.url}`}};var k1=/^xn--/,w1=/[^\0-\x7F]/,x1=/[\x2E\u3002\uFF0E\uFF61]/g,E1={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var dn=Math.floor,Ba=String.fromCharCode;function ar(e){throw RangeError(E1[e])}function A1(e,t){let n=[],r=e.length;while(r--)n[r]=t(e[r]);return n}function Oc(e,t){let n=e.split("@"),r="";if(n.length>1)r=n[0]+"@",e=n[1];e=e.replace(x1,".");let s=e.split("."),i=A1(s,t).join(".");return r+i}function $c(e){let t=[],n=0,r=e.length;while(n<r){let s=e.charCodeAt(n++);if(s>=55296&&s<=56319&&n<r){let i=e.charCodeAt(n++);if((i&64512)==56320)t.push(((s&1023)<<10)+(i&1023)+65536);else t.push(s),n--}else t.push(s)}return t}var C1=(e)=>String.fromCodePoint(...e),_1=function(e){if(e>=48&&e<58)return 26+(e-48);if(e>=65&&e<91)return e-65;if(e>=97&&e<123)return e-97;return 36},Bc=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},zc=function(e,t,n){let r=0;e=n?dn(e/700):e>>1,e+=dn(e/t);for(;e>455;r+=36)e=dn(e/35);return dn(r+36*e/(e+38))},Fc=function(e){let t=[],n=e.length,r=0,s=128,i=72,o=e.lastIndexOf("-");if(o<0)o=0;for(let a=0;a<o;++a){if(e.charCodeAt(a)>=128)ar("not-basic");t.push(e.charCodeAt(a))}for(let a=o>0?o+1:0;a<n;){let l=r;for(let d=1,h=36;;h+=36){if(a>=n)ar("invalid-input");let p=_1(e.charCodeAt(a++));if(p>=36)ar("invalid-input");if(p>dn((2147483647-r)/d))ar("overflow");r+=p*d;let g=h<=i?1:h>=i+26?26:h-i;if(p<g)break;let b=36-g;if(d>dn(2147483647/b))ar("overflow");d*=b}let u=t.length+1;if(i=zc(r-l,u,l==0),dn(r/u)>2147483647-s)ar("overflow");s+=dn(r/u),r%=u,t.splice(r++,0,s)}return String.fromCodePoint(...t)},qc=function(e){let t=[];e=$c(e);let n=e.length,r=128,s=0,i=72;for(let l of e)if(l<128)t.push(Ba(l));let o=t.length,a=o;if(o)t.push("-");while(a<n){let l=2147483647;for(let d of e)if(d>=r&&d<l)l=d;let u=a+1;if(l-r>dn((2147483647-s)/u))ar("overflow");s+=(l-r)*u,r=l;for(let d of e){if(d<r&&++s>2147483647)ar("overflow");if(d===r){let h=s;for(let p=36;;p+=36){let g=p<=i?1:p>=i+26?26:p-i;if(h<g)break;let b=h-g,x=36-g;t.push(Ba(Bc(g+b%x,0))),h=dn(b/x)}t.push(Ba(Bc(h,0))),i=zc(s,u,a===o),s=0,++a}}++s,++r}return t.join("")},S1=function(e){return Oc(e,function(t){return k1.test(t)?Fc(t.slice(4).toLowerCase()):t})},T1=function(e){return Oc(e,function(t){return w1.test(t)?"xn--"+qc(t):t})},R1={version:"2.3.1",ucs2:{decode:$c,encode:C1},decode:Fc,encode:qc,toASCII:T1,toUnicode:S1};var Oa=R1;/*! markdown-it 15.0.3 https://github.com/markdown-it/markdown-it @license MIT */var Hc=Object.defineProperty,Qc=(e,t)=>{let n={};for(var r in e)Hc(n,r,{get:e[r],enumerable:!0});if(!t)Hc(n,Symbol.toStringTag,{value:"Module"});return n},M1=Qc({arrayReplaceAt:()=>D1,asciiTrim:()=>io,callable:()=>eu,escapeHtml:()=>lr,escapeRE:()=>H1,fromCodePoint:()=>Gs,isMdAsciiPunct:()=>Js,isPunctChar:()=>nu,isPunctCharCode:()=>Vs,isSpace:()=>Je,isValidEntityCode:()=>Pa,isWhiteSpace:()=>Ks,lib:()=>P1,normalizeReference:()=>so,unescapeAll:()=>ls,unescapeMd:()=>B1});function eu(e){let t=function(...n){return Reflect.construct(e,n,new.target&&new.target!==t?new.target:e)};return Object.defineProperty(t,"name",{value:e.name}),Object.setPrototypeOf(t,e),t.prototype=e.prototype,t}function D1(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Pa(e){if(e>=55296&&e<=57343)return!1;if(e>=64976&&e<=65007)return!1;if((e&65535)===65535||(e&65535)===65534)return!1;if(e>=0&&e<=8)return!1;if(e===11)return!1;if(e>=14&&e<=31)return!1;if(e>=127&&e<=159)return!1;if(e>1114111)return!1;return!0}function Gs(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var tu=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,L1=new RegExp(`${tu.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),I1=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function N1(e,t){if(t.charCodeAt(0)===35&&I1.test(t)){let r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);if(Pa(r))return Gs(r);return e}let n=eo(e);if(n!==e)return n;return e}function B1(e){if(e.indexOf("\\")<0)return e;return e.replace(tu,"$1")}function ls(e){if(e.indexOf("\\")<0&&e.indexOf("&")<0)return e;return e.replace(L1,function(t,n,r){if(n)return n;return N1(t,r)})}var O1=/[&<>"]/,$1=/[&<>"]/g,z1={"&":"&","<":"<",">":">",'"':"""};function F1(e){return z1[e]}function lr(e){if(O1.test(e))return e.replace($1,F1);return e}var q1=/[.?*+^$[\]\\(){}|-]/g;function H1(e){return e.replace(q1,"\\$&")}function Je(e){switch(e){case 9:case 32:return!0}return!1}function Ks(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function nu(e){return Ws.test(e)||Ra.test(e)}function Vs(e){return nu(Gs(e))}function Js(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function so(e){return e=e.trim().replace(/\s+/g," "),e.toLowerCase().toUpperCase()}function Pc(e){return e===32||e===9||e===10||e===13}function io(e){let t=0;for(;t<e.length;t++)if(!Pc(e.charCodeAt(t)))break;let n=e.length-1;for(;n>=t;n--)if(!Pc(e.charCodeAt(n)))break;return e.slice(t,n+1)}var P1={mdurl:_a,ucmicro:Da};function U1(e,t,n){let r,s,i,o,{posMax:a,pos:l}=e;e.pos=t+1,r=1;while(e.pos<a){if(i=e.src.charCodeAt(e.pos),i===93){if(r--,r===0){s=!0;break}}if(o=e.pos,e.md.inline.skipToken(e),i===91){if(o===e.pos-1)r++;else if(n)return e.pos=l,-1}}let u=-1;if(s)u=e.pos;return e.pos=l,u}function W1(e,t,n){let r,s=t,i={ok:!1,pos:0,str:""};if(e.charCodeAt(s)===60){s++;while(s<n){if(r=e.charCodeAt(s),r===10)return i;if(r===60)return i;if(r===62)return i.pos=s+1,i.str=ls(e.slice(t+1,s)),i.ok=!0,i;if(r===92&&s+1<n){s+=2;continue}s++}return i}let o=0;while(s<n){if(r=e.charCodeAt(s),r===32)break;if(r<32||r===127)break;if(r===92&&s+1<n){if(e.charCodeAt(s+1)===32){s++;continue}s+=2;continue}if(r===40){if(o++,o>32)return i}if(r===41){if(o===0)break;o--}s++}if(t===s)return i;if(o!==0)return i;return i.str=ls(e.slice(t,s)),i.pos=s,i.ok=!0,i}function j1(e,t,n,r){let s,i=t,o={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(i>=n)return o;let a=e.charCodeAt(i);if(a!==34&&a!==39&&a!==40)return o;if(t++,i++,a===40)a=41;o.marker=a}while(i<n){if(s=e.charCodeAt(i),s===o.marker)return o.pos=i+1,o.str+=ls(e.slice(t,i)),o.ok=!0,o;else if(s===40&&o.marker===41)return o;else if(s===92&&i+1<n)i++;i++}return o.can_continue=!0,o.str+=ls(e.slice(t,i)),o}var G1=Qc({parseLinkDestination:()=>W1,parseLinkLabel:()=>U1,parseLinkTitle:()=>j1});function Zs(e){return Zs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zs(e)}function K1(e,t){if(Zs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Zs(r)!="object")return r;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function V1(e){var t=K1(e,"string");return Zs(t)=="symbol"?t:t+""}function ye(e,t,n){return(t=V1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lr=class{constructor(e,t,n){ye(this,"map",null),ye(this,"level",0),ye(this,"children",null),ye(this,"content",""),ye(this,"markup",""),ye(this,"info",""),ye(this,"block",!1),ye(this,"hidden",!1),this.type=e,this.tag=t,this.attrs=null,this.nesting=n,this.meta=null}attrIndex(e){if(!this.attrs)return-1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1}attrPush(e){if(this.attrs)this.attrs.push(e);else this.attrs=[e]}attrSet(e,t){let n=this.attrIndex(e),r=[e,t];if(n<0)this.attrPush(r);else this.attrs[n]=r}attrGet(e){let t=this.attrIndex(e),n=null;if(t>=0)n=this.attrs[t][1];return n}attrJoin(e,t){let n=this.attrIndex(e);if(n<0)this.attrPush([e,t]);else this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},Ys=class{constructor(){ye(this,"__rules__",[]),ye(this,"__cache__",null)}__find__(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1}__compile__(){let e=new Set;this.__rules__.forEach((t)=>{if(!t.enabled)return;t.alt.forEach((n)=>{if(n)e.add(n)})}),this.__cache__=Object.create(null),this.__cache__[""]=[],this.__rules__.forEach((t)=>{if(t.enabled)this.__cache__[""].push(t.fn)}),e.forEach((t)=>{this.__cache__[t]=[],this.__rules__.forEach((n)=>{if(n.enabled&&n.alt.indexOf(t)>=0)this.__cache__[t].push(n.fn)})})}at(e,t,n={}){let r=this.__find__(e);if(r===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__[r].fn=t,this.__rules__[r].alt=n.alt||[],this.__cache__=null}before(e,t,n,r={}){let s=this.__find__(e);if(s===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(s,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null}after(e,t,n,r={}){let s=this.__find__(e);if(s===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null}push(e,t,n={}){this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null}enable(e,t=!1){if(!Array.isArray(e))e=[e];let n=[];return e.forEach((r)=>{let s=this.__find__(r);if(s<0){if(t)return;throw Error(`Rules manager: invalid rule name ${r}`)}this.__rules__[s].enabled=!0,n.push(r)}),this.__cache__=null,n}enableOnly(e,t=!1){if(!Array.isArray(e))e=[e];this.__rules__.forEach((n)=>{n.enabled=!1}),this.enable(e,t)}disable(e,t=!1){if(!Array.isArray(e))e=[e];let n=[];return e.forEach((r)=>{let s=this.__find__(r);if(s<0){if(t)return;throw Error(`Rules manager: invalid rule name ${r}`)}this.__rules__[s].enabled=!1,n.push(r)}),this.__cache__=null,n}getRules(e){if(!this.__cache__)this.__compile__();return this.__cache__[e]||[]}},fn={};fn.code_inline=function(e,t,n,r,s){let i=e[t];return`<code${s.renderAttrs(i)}>${lr(i.content)}</code>`};fn.code_block=function(e,t,n,r,s){let i=e[t];return`<pre${s.renderAttrs(i)}><code>${lr(e[t].content)}</code></pre>
|
|
5
|
-
`};
|
|
1
|
+
var E1=Object.create;var{getPrototypeOf:A1,defineProperty:Ha,getOwnPropertyNames:C1}=Object;var Ic=Object.prototype.hasOwnProperty;function S1(e){return this[e]}var _1,T1,R1=(e,t,n)=>{var r=e!=null&&typeof e==="object";if(r){var s=t?_1??=new WeakMap:T1??=new WeakMap,i=s.get(e);if(i)return i}n=e!=null?E1(A1(e)):{};let o=t||!e||!e.__esModule||!Ic.call(e,"default")?Ha(n,"default",{value:e,enumerable:!0}):n;if(e&&typeof e==="object"||typeof e==="function"){for(let a of C1(e))if(!Ic.call(o,a))Ha(o,a,{get:S1.bind(e,a),enumerable:!0})}if(r)s.set(e,o);return o};var M1=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var D1=(e)=>e;function L1(e,t){this[e]=D1.bind(null,t)}var Nc=(e,t)=>{for(var n in t)Ha(e,n,{get:t[n],enumerable:!0,configurable:!0,set:L1.bind(t,n)})};var nh=M1(function(U7,th){function qf(e){if(e instanceof Map)e.clear=e.delete=e.set=function(){throw Error("map is read-only")};else if(e instanceof Set)e.add=e.clear=e.delete=function(){throw Error("set is read-only")};return Object.freeze(e),Object.getOwnPropertyNames(e).forEach((t)=>{let n=e[t],r=typeof n;if((r==="object"||r==="function")&&!Object.isFrozen(n))qf(n)}),e}class o0{constructor(e){if(e.data===void 0)e.data={};this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Hf(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function vr(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let s in r)n[s]=r[s]}),n}var B3="</span>",Nf=(e)=>!!e.scope,O3=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,s)=>`${r}${"_".repeat(s+1)}`)].join(" ")}return`${t}${e}`};class Pf{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=Hf(e)}openNode(e){if(!Nf(e))return;let t=O3(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){if(!Nf(e))return;this.buffer+=B3}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}var Bf=(e={})=>{let t={children:[]};return Object.assign(t,e),t};class a0{constructor(){this.rootNode=Bf(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=Bf({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop();return}closeAllNodes(){while(this.closeNode());}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){if(typeof t==="string")e.addText(t);else if(t.children)e.openNode(t),t.children.forEach((n)=>this._walk(e,n)),e.closeNode(t);return e}static _collapse(e){if(typeof e==="string")return;if(!e.children)return;if(e.children.every((t)=>typeof t==="string"))e.children=[e.children.join("")];else e.children.forEach((t)=>{a0._collapse(t)})}}class Uf extends a0{constructor(e){super();this.options=e}addText(e){if(e==="")return;this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;if(t)n.scope=`language:${t}`;this.add(n)}toHTML(){return new Pf(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Ei(e){if(!e)return null;if(typeof e==="string")return e;return e.source}function Wf(e){return Ur("(?=",e,")")}function $3(e){return Ur("(?:",e,")*")}function F3(e){return Ur("(?:",e,")?")}function Ur(...e){return e.map((n)=>Ei(n)).join("")}function z3(e){let t=e[e.length-1];if(typeof t==="object"&&t.constructor===Object)return e.splice(e.length-1,1),t;else return{}}function Vo(...e){return"("+(z3(e).capture?"":"?:")+e.map((r)=>Ei(r)).join("|")+")"}function jf(e){return new RegExp(e.toString()+"|").exec("").length-1}function q3(e,t){let n=e&&e.exec(t);return n&&n.index===0}var H3=new RegExp(Vo(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));function l0(e,{joinWith:t}){let n=0;return e.map((r)=>{n+=1;let s=n,i=Ei(r),o="";while(i.length>0){let a=H3.exec(i);if(!a){o+=i;break}if(o+=i.substring(0,a.index),i=i.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1])o+="\\"+String(Number(a[1])+s);else if(o+=a[0],a[0]==="("||/^\(\?[<']/.test(a[0]))n++}return o}).map((r)=>`(${r})`).join(t)}var P3=/\b\B/,Gf="[a-zA-Z]\\w*",c0="[a-zA-Z_]\\w*",Kf="\\b\\d+(\\.\\d+)?",Vf="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Jf="\\b(0b[01]+)",U3="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",W3=(e={})=>{let t=/^#![ ]*\//;if(e.binary)e.begin=Ur(t,/.*\b/,e.binary,/\b.*/);return vr({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{if(n.index!==0)r.ignoreMatch()}},e)},Ai={begin:"\\\\[\\s\\S]",relevance:0},j3={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ai]},G3={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ai]},K3={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/},Jo=function(e,t,n={}){let r=vr({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let s=Vo("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 r.contains.push({begin:Ur(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},V3=Jo("//","$"),J3=Jo("/\\*","\\*/"),Z3=Jo("#","$"),Y3={scope:"number",begin:Kf,relevance:0},X3={scope:"number",begin:Vf,relevance:0},Q3={scope:"number",begin:Jf,relevance:0},e5={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Ai,{begin:/\[/,end:/\]/,relevance:0,contains:[Ai]}]},t5={scope:"title",begin:Gf,relevance:0},n5={scope:"title",begin:c0,relevance:0},r5={begin:"\\.\\s*"+c0,relevance:0},s5=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{if(n.data._beginMatch!==t[1])n.ignoreMatch()}})},Go=Object.freeze({__proto__:null,APOS_STRING_MODE:j3,BACKSLASH_ESCAPE:Ai,BINARY_NUMBER_MODE:Q3,BINARY_NUMBER_RE:Jf,COMMENT:Jo,C_BLOCK_COMMENT_MODE:J3,C_LINE_COMMENT_MODE:V3,C_NUMBER_MODE:X3,C_NUMBER_RE:Vf,END_SAME_AS_BEGIN:s5,HASH_COMMENT_MODE:Z3,IDENT_RE:Gf,MATCH_NOTHING_RE:P3,METHOD_GUARD:r5,NUMBER_MODE:Y3,NUMBER_RE:Kf,PHRASAL_WORDS_MODE:K3,QUOTE_STRING_MODE:G3,REGEXP_MODE:e5,RE_STARTERS_RE:U3,SHEBANG:W3,TITLE_MODE:t5,UNDERSCORE_IDENT_RE:c0,UNDERSCORE_TITLE_MODE:n5});function i5(e,t){if(e.input[e.index-1]===".")t.ignoreMatch()}function o5(e,t){if(e.className!==void 0)e.scope=e.className,delete e.className}function a5(e,t){if(!t)return;if(!e.beginKeywords)return;if(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=i5,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0)e.relevance=0}function l5(e,t){if(!Array.isArray(e.illegal))return;e.illegal=Vo(...e.illegal)}function c5(e,t){if(!e.match)return;if(e.begin||e.end)throw Error("begin & end are not supported with match");e.begin=e.match,delete e.match}function u5(e,t){if(e.relevance===void 0)e.relevance=1}var d5=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach((r)=>{delete e[r]}),e.keywords=n.keywords,e.begin=Ur(n.beforeMatch,Wf(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},f5=["of","and","for","in","not","or","if","then","parent","list","value"],h5="keyword";function Zf(e,t,n=h5){let r=Object.create(null);if(typeof e==="string")s(n,e.split(" "));else if(Array.isArray(e))s(n,e);else Object.keys(e).forEach(function(i){Object.assign(r,Zf(e[i],t,i))});return r;function s(i,o){if(t)o=o.map((a)=>a.toLowerCase());o.forEach(function(a){let l=a.split("|");r[l[0]]=[i,m5(l[0],l[1])]})}}function m5(e,t){if(t)return Number(t);return p5(e)?0:1}function p5(e){return f5.includes(e.toLowerCase())}var Of={},Pr=(e)=>{console.error(e)},$f=(e,...t)=>{console.log(`WARN: ${e}`,...t)},As=(e,t)=>{if(Of[`${e}/${t}`])return;console.log(`Deprecated as of ${e}. ${t}`),Of[`${e}/${t}`]=!0},Ko=Error();function Yf(e,t,{key:n}){let r=0,s=e[n],i={},o={};for(let a=1;a<=t.length;a++)o[a+r]=s[a],i[a+r]=!0,r+=jf(t[a-1]);e[n]=o,e[n]._emit=i,e[n]._multi=!0}function g5(e){if(!Array.isArray(e.begin))return;if(e.skip||e.excludeBegin||e.returnBegin)throw Pr("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ko;if(typeof e.beginScope!=="object"||e.beginScope===null)throw Pr("beginScope must be object"),Ko;Yf(e,e.begin,{key:"beginScope"}),e.begin=l0(e.begin,{joinWith:""})}function b5(e){if(!Array.isArray(e.end))return;if(e.skip||e.excludeEnd||e.returnEnd)throw Pr("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ko;if(typeof e.endScope!=="object"||e.endScope===null)throw Pr("endScope must be object"),Ko;Yf(e,e.end,{key:"endScope"}),e.end=l0(e.end,{joinWith:""})}function v5(e){if(e.scope&&typeof e.scope==="object"&&e.scope!==null)e.beginScope=e.scope,delete e.scope}function y5(e){if(v5(e),typeof e.beginScope==="string")e.beginScope={_wrap:e.beginScope};if(typeof e.endScope==="string")e.endScope={_wrap:e.endScope};g5(e),b5(e)}function k5(e){function t(o,a){return new RegExp(Ei(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,a){a.position=this.position++,this.matchIndexes[this.matchAt]=a,this.regexes.push([a,o]),this.matchAt+=jf(o)+1}compile(){if(this.regexes.length===0)this.exec=()=>null;let o=this.regexes.map((a)=>a[1]);this.matcherRe=t(l0(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;let a=this.matcherRe.exec(o);if(!a)return null;let l=a.findIndex((d,h)=>h>0&&d!==void 0),u=this.matchIndexes[l];return a.splice(0,l),Object.assign(a,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];let a=new n;return this.rules.slice(o).forEach(([l,u])=>a.addRule(l,u)),a.compile(),this.multiRegexes[o]=a,a}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,a){if(this.rules.push([o,a]),a.type==="begin")this.count++}exec(o){let a=this.getMatcher(this.regexIndex);a.lastIndex=this.lastIndex;let l=a.exec(o);if(this.resumingScanAtSamePosition())if(l&&l.index===this.lastIndex);else{let u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,l=u.exec(o)}if(l){if(this.regexIndex+=l.position+1,this.regexIndex===this.count)this.considerAll()}return l}}function s(o){let a=new r;if(o.contains.forEach((l)=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd)a.addRule(o.terminatorEnd,{type:"end"});if(o.illegal)a.addRule(o.illegal,{type:"illegal"});return a}function i(o,a){let l=o;if(o.isCompiled)return l;[o5,c5,y5,d5].forEach((d)=>d(o,a)),e.compilerExtensions.forEach((d)=>d(o,a)),o.__beforeBegin=null,[a5,l5,u5].forEach((d)=>d(o,a)),o.isCompiled=!0;let u=null;if(typeof o.keywords==="object"&&o.keywords.$pattern)o.keywords=Object.assign({},o.keywords),u=o.keywords.$pattern,delete o.keywords.$pattern;if(u=u||/\w+/,o.keywords)o.keywords=Zf(o.keywords,e.case_insensitive);if(l.keywordPatternRe=t(u,!0),a){if(!o.begin)o.begin=/\B|\b/;if(l.beginRe=t(l.begin),!o.end&&!o.endsWithParent)o.end=/\B|\b/;if(o.end)l.endRe=t(l.end);if(l.terminatorEnd=Ei(l.end)||"",o.endsWithParent&&a.terminatorEnd)l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd}if(o.illegal)l.illegalRe=t(o.illegal);if(!o.contains)o.contains=[];if(o.contains=[].concat(...o.contains.map(function(d){return w5(d==="self"?o:d)})),o.contains.forEach(function(d){i(d,l)}),o.starts)i(o.starts,a);return l.matcher=s(l),l}if(!e.compilerExtensions)e.compilerExtensions=[];if(e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=vr(e.classNameAliases||{}),i(e)}function Xf(e){if(!e)return!1;return e.endsWithParent||Xf(e.starts)}function w5(e){if(e.variants&&!e.cachedVariants)e.cachedVariants=e.variants.map(function(t){return vr(e,{variants:null},t)});if(e.cachedVariants)return e.cachedVariants;if(Xf(e))return vr(e,{starts:e.starts?vr(e.starts):null});if(Object.isFrozen(e))return vr(e);return e}var x5="11.12.0";class Qf extends Error{constructor(e,t){super(e);this.name="HTMLInjectionError",this.html=t}}var i0=Hf,Ff=vr,zf=Symbol("nomatch"),E5=7,eh=function(e){let t=Object.create(null),n=Object.create(null),r=[],s=!0,i="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]},a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Uf};function l(z){return a.noHighlightRe.test(z)}function u(z){let V=z.className+" ";V+=z.parentNode?z.parentNode.className:"";let Z=a.languageDetectRe.exec(V);if(Z){let de=F(Z[1]);if(!de)$f(i.replace("{}",Z[1])),$f("Falling back to no-highlight mode for this block.",z);return de?Z[1]:"no-highlight"}return V.split(/\s+/).find((de)=>l(de)||F(de))}function d(z,V,Z){let de="",te="";if(typeof V==="object")de=z,Z=V.ignoreIllegals,te=V.language;else As("10.7.0","highlight(lang, code, ...args) has been deprecated."),As("10.7.0",`Please use highlight(code, options) instead.
|
|
2
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),te=z,de=V;if(Z===void 0)Z=!0;let N={code:de,language:te};re("before:highlight",N);let W=N.result?N.result:h(N.language,N.code,Z);return W.code=N.code,re("after:highlight",W),W}function h(z,V,Z,de){let te=Object.create(null);function N(fe,ke){return fe.keywords[ke]}function W(){if(!Re.keywords){it.addText(Ue);return}let fe=0;Re.keywordPatternRe.lastIndex=0;let ke=Re.keywordPatternRe.exec(Ue),De="";while(ke){De+=Ue.substring(fe,ke.index);let $e=st.case_insensitive?ke[0].toLowerCase():ke[0],At=N(Re,$e);if(At){let[Hn,w1]=At;if(it.addText(De),De="",te[$e]=(te[$e]||0)+1,te[$e]<=E5)ds+=w1;if(Hn.startsWith("_"))De+=ke[0];else{let x1=st.classNameAliases[Hn]||Hn;ue(ke[0],x1)}}else De+=ke[0];fe=Re.keywordPatternRe.lastIndex,ke=Re.keywordPatternRe.exec(Ue)}De+=Ue.substring(fe),it.addText(De)}function K(){if(Ue==="")return;let fe=null;if(typeof Re.subLanguage==="string"){if(!t[Re.subLanguage]){it.addText(Ue);return}fe=h(Re.subLanguage,Ue,!0,Nr[Re.subLanguage]),Nr[Re.subLanguage]=fe._top}else fe=g(Ue,Re.subLanguage.length?Re.subLanguage:null);if(Re.relevance>0)ds+=fe.relevance;it.__addSublanguage(fe._emitter,fe.language)}function oe(){if(Re.subLanguage!=null)K();else W();Ue=""}function ue(fe,ke){if(fe==="")return;it.startScope(ke),it.addText(fe),it.endScope()}function Le(fe,ke){let De=1,$e=ke.length-1;while(De<=$e){if(!fe._emit[De]){De++;continue}let At=st.classNameAliases[fe[De]]||fe[De],Hn=ke[De];if(At)ue(Hn,At);else Ue=Hn,W(),Ue="";De++}}function G(fe,ke){if(fe.scope&&typeof fe.scope==="string")it.openNode(st.classNameAliases[fe.scope]||fe.scope);if(fe.beginScope){if(fe.beginScope._wrap)ue(Ue,st.classNameAliases[fe.beginScope._wrap]||fe.beginScope._wrap),Ue="";else if(fe.beginScope._multi)Le(fe.beginScope,ke),Ue=""}return Re=Object.create(fe,{parent:{value:Re}}),Re}function ae(fe,ke,De){let $e=q3(fe.endRe,De);if($e){if(fe["on:end"]){let At=new o0(fe);if(fe["on:end"](ke,At),At.isMatchIgnored)$e=!1}if($e){while(fe.endsParent&&fe.parent)fe=fe.parent;return fe}}if(fe.endsWithParent)return ae(fe.parent,ke,De)}function be(fe){if(Re.matcher.regexIndex===0)return Ue+=fe[0],1;else return hs=!0,0}function ce(fe){let ke=fe[0],De=fe.rule,$e=new o0(De),At=[De.__beforeBegin,De["on:begin"]];for(let Hn of At){if(!Hn)continue;if(Hn(fe,$e),$e.isMatchIgnored)return be(ke)}if(De.skip)Ue+=ke;else{if(De.excludeBegin)Ue+=ke;if(oe(),!De.returnBegin&&!De.excludeBegin)Ue=ke}return G(De,fe),De.returnBegin?0:ke.length}function xe(fe){let ke=fe[0],De=V.substring(fe.index),$e=ae(Re,fe,De);if(!$e)return zf;let At=Re;if(Re.endScope&&Re.endScope._wrap)oe(),ue(ke,Re.endScope._wrap);else if(Re.endScope&&Re.endScope._multi)oe(),Le(Re.endScope,fe);else if(At.skip)Ue+=ke;else{if(!(At.returnEnd||At.excludeEnd))Ue+=ke;if(oe(),At.excludeEnd)Ue=ke}do{if(Re.scope)it.closeNode();if(!Re.skip&&!Re.subLanguage)ds+=Re.relevance;Re=Re.parent}while(Re!==$e.parent);if($e.starts)G($e.starts,fe);return At.returnEnd?0:ke.length}function Ce(){let fe=[];for(let ke=Re;ke!==st;ke=ke.parent)if(ke.scope)fe.unshift(ke.scope);fe.forEach((ke)=>it.openNode(ke))}let Ve={};function qe(fe,ke){let De=ke&&ke[0];if(Ue+=fe,De==null)return oe(),0;if(Ve.type==="begin"&&ke.type==="end"&&Ve.index===ke.index&&De===""){if(Ue+=V.slice(ke.index,ke.index+1),!s){let $e=Error(`0 width match regex (${z})`);throw $e.languageName=z,$e.badRule=Ve.rule,$e}return 1}if(Ve=ke,ke.type==="begin")return ce(ke);else if(ke.type==="illegal"&&!Z){let $e=Error('Illegal lexeme "'+De+'" for mode "'+(Re.scope||"<unnamed>")+'"');throw $e.mode=Re,$e}else if(ke.type==="end"){let $e=xe(ke);if($e!==zf)return $e}if(ke.type==="illegal"&&De===""){if(ke.index===V.length);else Ue+=`
|
|
3
|
+
`;return 1}if(fs>1e5&&fs>ke.index*3)throw Error("potential infinite loop, way more iterations than matches");return Ue+=De,De.length}let st=F(z);if(!st)throw Pr(i.replace("{}",z)),Error('Unknown language: "'+z+'"');let Kt=k5(st),Ir="",Re=de||Kt,Nr={},it=new a.__emitter(a);Ce();let Ue="",ds=0,fn=0,fs=0,hs=!1;try{if(!st.__emitTokens){Re.matcher.considerAll();for(;;){if(fs++,hs)hs=!1;else Re.matcher.considerAll();Re.matcher.lastIndex=fn;let fe=Re.matcher.exec(V);if(!fe)break;let ke=V.substring(fn,fe.index),De=qe(ke,fe);fn=fe.index+De}qe(V.substring(fn))}else st.__emitTokens(V,it);return it.finalize(),Ir=it.toHTML(),{language:z,value:Ir,relevance:ds,illegal:!1,_emitter:it,_top:Re}}catch(fe){if(fe.message&&fe.message.includes("Illegal"))return{language:z,value:i0(V),illegal:!0,relevance:0,_illegalBy:{message:fe.message,index:fn,context:V.slice(fn-100,fn+100),mode:fe.mode,resultSoFar:Ir},_emitter:it};else if(s)return{language:z,value:i0(V),illegal:!1,relevance:0,errorRaised:fe,_emitter:it,_top:Re};else throw fe}}function p(z){let V={value:i0(z),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return V._emitter.addText(z),V}function g(z,V){V=V||a.languages||Object.keys(t);let Z=p(z),de=V.filter(F).filter(q).map((oe)=>h(oe,z,!1));de.unshift(Z);let te=de.sort((oe,ue)=>{if(oe.relevance!==ue.relevance)return ue.relevance-oe.relevance;if(oe.language&&ue.language){if(F(oe.language).supersetOf===ue.language)return 1;else if(F(ue.language).supersetOf===oe.language)return-1}return 0}),[N,W]=te,K=N;return K.secondBest=W,K}function b(z,V,Z){let de=V&&n[V]||Z;z.classList.add("hljs"),z.classList.add(`language-${de}`)}function k(z){let V=null,Z=u(z);if(l(Z))return;if(re("before:highlightElement",{el:z,language:Z}),z.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",z);return}if(z.children.length>0){if(!a.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(z);if(a.throwUnescapedHTML)throw new Qf("One of your code blocks includes unescaped HTML.",z.innerHTML)}V=z;let de=V.textContent,te=Z?d(de,{language:Z,ignoreIllegals:!0}):g(de);if(z.innerHTML=te.value,z.dataset.highlighted="yes",b(z,Z,te.language),z.result={language:te.language,re:te.relevance,relevance:te.relevance},te.secondBest)z.secondBest={language:te.secondBest.language,relevance:te.secondBest.relevance};re("after:highlightElement",{el:z,result:te,text:de})}function w(z){a=Ff(a,z)}let A=()=>{E(),As("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function _(){E(),As("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let S=!1;function E(){function z(){E()}if(document.readyState==="loading"){if(!S)window.addEventListener("DOMContentLoaded",z,!1);S=!0;return}document.querySelectorAll(a.cssSelector).forEach(k)}function R(z,V){let Z=null;try{Z=V(e)}catch(de){if(Pr("Language definition for '{}' could not be registered.".replace("{}",z)),!s)throw de;else Pr(de);Z=o}if(!Z.name)Z.name=z;if(t[z]=Z,Z.rawDefinition=V.bind(null,e),Z.aliases)I(Z.aliases,{languageName:z})}function L(z){delete t[z];for(let V of Object.keys(n))if(n[V]===z)delete n[V]}function T(){return Object.keys(t)}function F(z){return z=(z||"").toLowerCase(),t[z]||t[n[z]]}function I(z,{languageName:V}){if(typeof z==="string")z=[z];z.forEach((Z)=>{n[Z.toLowerCase()]=V})}function q(z){let V=F(z);return V&&!V.disableAutodetect}function U(z){if(z["before:highlightBlock"]&&!z["before:highlightElement"])z["before:highlightElement"]=(V)=>{z["before:highlightBlock"](Object.assign({block:V.el},V))};if(z["after:highlightBlock"]&&!z["after:highlightElement"])z["after:highlightElement"]=(V)=>{z["after:highlightBlock"](Object.assign({block:V.el},V))}}function j(z){U(z),r.push(z)}function J(z){let V=r.indexOf(z);if(V!==-1)r.splice(V,1)}function re(z,V){let Z=z;r.forEach(function(de){if(de[Z])de[Z](V)})}function ne(z){return As("10.7.0","highlightBlock will be removed entirely in v12.0"),As("10.7.0","Please use highlightElement now."),k(z)}Object.assign(e,{highlight:d,highlightAuto:g,highlightAll:E,highlightElement:k,highlightBlock:ne,configure:w,initHighlighting:A,initHighlightingOnLoad:_,registerLanguage:R,unregisterLanguage:L,listLanguages:T,getLanguage:F,registerAliases:I,autoDetection:q,inherit:Ff,addPlugin:j,removePlugin:J}),e.debugMode=function(){s=!1},e.safeMode=function(){s=!0},e.versionString=x5,e.regex={concat:Ur,lookahead:Wf,either:Vo,optional:F3,anyNumberOfTimes:$3};for(let z in Go)if(typeof Go[z]==="object")qf(Go[z]);return Object.assign(e,Go),e},Cs=eh({});Cs.newInstance=()=>eh({});th.exports=Cs;Cs.HighlightJS=Cs;Cs.default=Cs});var Ga={};Nc(Ga,{decode:()=>Xs,encode:()=>ur,format:()=>ms,parse:()=>Qs});var Ya={};Nc(Ya,{Any:()=>Ka,Cc:()=>Va,Cf:()=>Z1,P:()=>ei,S:()=>Ja,Z:()=>Za});function I1(){if(typeof window>"u")return"zh-CN";try{return window.localStorage.getItem("omo-web-language")==="en"?"en":"zh-CN"}catch{return"zh-CN"}}var me=I1();function c(e,t){return me==="en"?t:e}function Bc(e){try{return window.localStorage.setItem("omo-web-language",e),!0}catch{return!1}}function Oc(e=document){if(e.documentElement.lang=me,me!=="en")return;for(let t of e.querySelectorAll("[data-en]"))t.textContent=t.getAttribute("data-en");for(let t of["title","aria-label","placeholder","alt"]){let n=`data-en-${t}`;for(let r of e.querySelectorAll(`[${n}]`)){let s=r.getAttribute(n);if(s!==null)r.setAttribute(t,s)}}}function ge(e,t){let n=document.getElementById(e);if(n instanceof t)return n;throw Error(c(`界面控件不存在:${e}`,`Missing interface control: ${e}`))}function v(e,t="",n=""){let r=document.createElement(e);if(t)r.className=t;if(n)r.textContent=n;return r}function Be(e,t,n=""){let r=v("button",`button ${n}`,e);return r.type="button",r.addEventListener("click",t),r}function Q(e,t=""){if(e.textContent!==t)e.textContent=t;e.hidden=!t}function cr(e,t){let n=v("label","field");return n.append(v("span","",e),t),n}function ot(e,t){let n=v("option","",e);return n.value=t,n}function Rt(e,...t){let n=v("details"),r=v("div","fold-body stack stack--tight");return r.append(...t),n.append(v("summary","",e),r),n}function hn(e){let t=v("pre");return t.tabIndex=0,t.append(v("code","",e)),t}var N1=(e)=>e!==null&&typeof e==="object"&&!Array.isArray(e),H=(e)=>N1(e)?e:{},ve=(e)=>Array.isArray(e)?e:[],C=(e)=>typeof e==="string"?e:"",Ee=(e)=>typeof e==="number"&&Number.isFinite(e)?e:void 0,$c=(e)=>typeof e==="string"?e:JSON.stringify(e,null,2)??"",_e=(e)=>e instanceof Error?e.message:c("发生未知错误","An unknown error occurred"),B1=["image/png","image/jpeg","image/gif","image/webp"],ao=(e)=>B1.some((t)=>t===e);function mn(e){let t=H(e),n=C(t.id);if(!n)return;return{id:n,name:C(t.name)||c("未命名会话","Untitled session"),cwd:C(t.cwd),updatedAt:Ee(t.updatedAt)??0,archived:t.archived===!0,settled:t.settled===!0,active:t.active===!0,running:t.running===!0}}var Pa=(e)=>ve(e.sessions).flatMap((t)=>{let n=mn(t);return n?[n]:[]});class Ie extends Error{status;code;constructor(e,t,n){super(e);this.status=t;this.code=n}}var Ge=(e)=>`/api/sessions/${encodeURIComponent(e)}`,lo=(e)=>`/api/cli-history/${encodeURIComponent(e)}`,co=(e)=>`/api/cli-live/${encodeURIComponent(e)}`,Ua=({kind:e,id:t})=>{switch(e){case"web":return Ge(t);case"history":return lo(t);case"live":return co(t)}};class Wa{onAuthenticationRequired;token="";authGeneration=0;constructor(e){this.onAuthenticationRequired=e}async request(e,t,n,r){let s=t!==void 0,i=this.authGeneration,o=await fetch(e,{method:s?"POST":"GET",signal:n,cache:"no-store",...s?{headers:{"Content-Type":"application/json","X-OmO-Token":this.token},body:JSON.stringify(t)}:{}}),a;try{let l=await o.json();a=H(l)}catch(l){if(!(l instanceof SyntaxError))throw l;throw new Ie(c(`本机 Web 服务返回了无效响应(HTTP ${o.status})`,`The local Web server returned an invalid response (HTTP ${o.status}).`),o.status,"")}if(!o.ok||r!==void 0&&o.status!==r){if(o.status===401&&a.code==="authentication_required"&&i===this.authGeneration)this.onAuthenticationRequired?.();throw new Ie(C(a.error)||c(`请求失败(HTTP ${o.status})`,`Request failed (HTTP ${o.status}).`),o.status,C(a.code))}return a}action(e,t){return this.request(`${Ge(e)}/actions`,t)}async closeSession({id:e,cwd:t}){let n=await this.request(`${Ge(e)}/actions`,{action:"close"},void 0,200),r=H(n.session),s=mn(r),i=n.result;if(!s||r.id!==e||r.cwd!==t||r.active!==!1||r.running!==!1||!i||typeof i!=="object"||Array.isArray(i)||Object.keys(i).length)throw new Ie(c("未收到有效的关闭回执。","No valid close receipt was returned."),502,"close_unconfirmed");return s}cliLiveAction(e,t){return this.request(`${co(e)}/actions`,t)}async resumeHistory(e){let t=await this.request(`${lo(e)}/resume`,{}),n=mn(t.session);if(!n?.active)throw new Ie(c("没有收到可继续的 Web 会话。请检查会话列表。","No active Web session was returned. Check the session list."),502,"");return n}async handoff(e){let t=await this.request(`${Ge(e)}/handoff`,{}),n=mn(t.session),r=C(t.command);if(!n||n.id!==e||H(t.session).active!==!1||!r.trim())throw new Ie(c("无法确认会话已释放,未显示启动命令。","Could not confirm that the session was released. The launch command was not shown."),502,"");return{session:n,command:r}}}var O1=new Set(["select","confirm","input","editor","question"]),Ys=(e)=>C(e.id)||C(e.requestId),uo=(e)=>Boolean(Ys(e)&&O1.has(C(e.method)));function $1(e,t){let n=[];for(let[s,i]of ve(t.questions).entries()){let o=H(i),a=C(o.id);if(!a)continue;let l=v("fieldset","stack stack--tight"),u=(s+1).toLocaleString(me);if(l.append(v("legend","",C(o.header)||c(`问题 ${u}`,`Question ${u}`))),C(o.question))l.append(v("p","plain",C(o.question)));let d=[];for(let p of ve(o.options)){let g=H(p),b=C(g.label);if(!b)continue;let k=v("input");k.name=`question-${s}`,k.type=o.multiSelect===!0?"checkbox":"radio",k.value=b;let w=v("label","interaction-option"),A=v("span","break",b);if(C(g.description))A.append(v("small","muted",` · ${C(g.description)}`));w.append(k,A),d.push(k),l.append(w)}let h=v("input");h.type="text",h.maxLength=12000,h.autocomplete="off",l.append(cr(c("自填回答(选填)","Your own answer (optional)"),h)),e.append(l),n.push(()=>{let p=d.filter((b)=>b.checked).map((b)=>b.value),g=h.value.trim();return p.length||g?[a,{selected:p,...g?{text:g}:{}}]:void 0})}let r=v("textarea");return r.rows=2,r.maxLength=12000,e.append(cr(c("补充说明(选填)","Comment (optional)"),r)),e.append(v("p","small muted",c("至少回答一题或填写补充说明。","Answer at least one question or leave a comment."))),()=>{let s=n.flatMap((o)=>{let a=o();return a?[a]:[]}),i=r.value.trim();return s.length||i?{answers:Object.fromEntries(s),...i?{comment:i}:{}}:void 0}}function zc(e,t){let n=e.querySelector("[data-question-metadata]");if(!n)return;let r=[];if(t.waitForAnswer===!0)r.push(c("等待回答","Waiting for your answer"));else if(t.waitForAnswer===!1)r.push(c("异步提问","Not waiting for an answer"));let s=C(t.raisedBy);if(s)r.push(c(`提问人:${s}`,`Asked by: ${s}`));let i=Ee(t.remainingMs);if(i!==void 0){let a=Math.ceil(Math.max(0,i)/1000),l=a.toLocaleString(me);r.push(c(`更新时剩余 ${l} 秒`,`${l} ${a===1?"second":"seconds"} left at last update`))}let o=Ee(t.deadlineAtMs);if(o!==void 0){let a=new Date(o);if(!Number.isNaN(a.getTime())){let l=a.toLocaleString(me);r.push(c(`截止:${l}`,`Deadline: ${l}`))}}n.textContent=r.join(" · "),n.hidden=r.length===0}var Fc={Allow:c("允许","Allow"),"Allow once":c("仅允许这次","Allow once"),"Allow always":c("始终允许","Always allow"),"Allow for session":c("本会话始终允许","Allow for this session"),Deny:c("拒绝","Deny"),Block:c("阻止","Block"),"Deny with feedback":c("拒绝并说明原因","Deny with feedback")};function F1(e,t){let n=C(e.method),r=C(e.title),s=Boolean(e.toolCallId)&&n!=="question",i=v("form","request-form"),o=n==="question"?c("待回答问题","Pending question"):s?c("工具批准","Tool approval"):c("等待你的决定","Your response is needed");i.setAttribute("aria-label",o),i.dataset.method=n;let a=v(r?"p":"h2","request-kind",n==="question"?c("Agent 提问","Agent question"):o),l=v("div","request-copy");if(r)l.append(v("h2","plain request-title",r));if(C(e.message))l.append(v("p","plain",C(e.message)));if(n==="question"){let E=v("p","small muted");E.dataset.questionMetadata="",l.append(E)}let u=H(e.remoteOrigin),d=C(u.deviceName)||C(u.deviceId);if(d)l.append(v("p","small muted break",c(`请求设备:${d}`,`Requesting device: ${d}`)));if(s){let E=C(e.toolCallId);l.append(v("p","small muted path",c(`工具调用:${E}`,`Tool call: ${E}`)))}let h=v("div","stack stack--tight request-fields"),p=v("p","notice error small");p.setAttribute("role","alert"),p.hidden=!0;let g=v("div","row request-actions"),b=!1,k=async(E)=>{if(b||i.dataset.offline==="true")return;b=!0,i.setAttribute("aria-busy","true"),Q(p);for(let R of g.querySelectorAll("button"))R.disabled=!0;try{await t(Ys(e),E)}catch(R){let L=R instanceof Error?R.message:c("发生未知错误","Unknown error");Q(p,c(`未能提交:${L}`,`Could not submit: ${L}`))}finally{b=!1,i.removeAttribute("aria-busy");for(let R of g.querySelectorAll("button"))R.disabled=i.dataset.offline==="true"}},w,A=e.secret===!0||Boolean(e.privateInput);switch(n){case"question":w=$1(h,e);break;case"confirm":g.append(Be(c("不批准",s?"Deny":"No"),()=>void k({confirmed:!1})),Be(c("确认","Confirm"),()=>void k({confirmed:!0})));break;case"select":{let E=v("select"),R=ot(c("请选择,不会自动批准","Choose an option. Nothing is approved automatically."),"");R.disabled=!0,E.append(R);for(let L of ve(e.options))if(typeof L==="string"&&L)E.append(ot(Object.hasOwn(Fc,L)?Fc[L]??L:L,L));E.value="",h.append(cr(c("可选操作","Options"),E)),w=()=>E.value?{value:E.value}:void 0;break}case"input":case"editor":{if(A){h.append(v("p","muted",c("此输入需要在原生客户端中处理。","Respond in the native client.")));break}let E=n==="editor"?v("textarea"):v("input");if(E instanceof HTMLTextAreaElement)E.rows=5,E.value=C(e.prefill);else E.autocomplete="off";E.placeholder=C(e.placeholder),h.append(cr(c("输入内容","Response"),E)),w=()=>({value:E.value});break}}if(!A)g.append(Be(c("取消请求","Cancel request"),()=>void k({cancelled:!0}),"button--quiet"));if(w){let E=v("button","button",c("提交回答","Submit response"));E.type="submit",g.append(E)}i.addEventListener("submit",(E)=>{if(E.preventDefault(),!w)return;let R=w();if(R)k(R);else Q(p,c("请至少填写一项回答或选择一个操作。","Enter a response or choose an option."))});let _=v("div",n==="select"?"request-controls request-controls--choice":"request-controls");_.append(h,g);let S=v("div","request-body");if(S.append(l,_,p),i.append(a,S),n==="question")zc(i,e);return i}class ja{root;nodes=new Map;constructor(e){this.root=e}get first(){return this.nodes.values().next().value}get firstQuestion(){return[...this.nodes.values()].find((e)=>e.dataset.method==="question")}render(e,t,n){for(let[r,s]of this.nodes)if(!e.has(r))s.remove(),this.nodes.delete(r);for(let[r,s]of e){let i=this.nodes.get(r);if(!i)i=F1(s,n),this.nodes.set(r,i),this.root.append(i);if(s.method==="question")zc(i,s);if(i.dataset.offline=String(!t),i.getAttribute("aria-busy")!=="true")for(let o of i.querySelectorAll("button"))o.disabled=!t}}reset(){this.nodes.clear(),this.root.replaceChildren()}}var qc={};function z1(e){let t=qc[e];if(t)return t;t=qc[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function fo(e,t){if(typeof t!=="string")t=fo.defaultChars;let n=z1(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let s="";for(let i=0,o=r.length;i<o;i+=3){let a=parseInt(r.slice(i+1,i+3),16);if(a<128){s+=n[a];continue}if((a&224)===192&&i+3<o){let l=parseInt(r.slice(i+4,i+6),16);if((l&192)===128){let u=a<<6&1984|l&63;if(u<128)s+="��";else s+=String.fromCharCode(u);i+=3;continue}}if((a&240)===224&&i+6<o){let l=parseInt(r.slice(i+4,i+6),16),u=parseInt(r.slice(i+7,i+9),16);if((l&192)===128&&(u&192)===128){let d=a<<12&61440|l<<6&4032|u&63;if(d<2048||d>=55296&&d<=57343)s+="���";else s+=String.fromCharCode(d);i+=6;continue}}if((a&248)===240&&i+9<o){let l=parseInt(r.slice(i+4,i+6),16),u=parseInt(r.slice(i+7,i+9),16),d=parseInt(r.slice(i+10,i+12),16);if((l&192)===128&&(u&192)===128&&(d&192)===128){let h=a<<18&1835008|l<<12&258048|u<<6&4032|d&63;if(h<65536||h>1114111)s+="����";else h-=65536,s+=String.fromCharCode(55296+(h>>10),56320+(h&1023));i+=9;continue}}s+="�"}return s})}fo.defaultChars=";/?:@&=+$,#";fo.componentChars="";var Xs=fo;var Hc={};function q1(e){let t=Hc[e];if(t)return t;t=Hc[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);if(/^[0-9a-z]$/i.test(r))t.push(r);else t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function ho(e,t,n){if(typeof t!=="string")n=t,t=ho.defaultChars;if(typeof n>"u")n=!0;let r=q1(t),s="";for(let i=0,o=e.length;i<o;i++){let a=e.charCodeAt(i);if(n&&a===37&&i+2<o){if(/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))){s+=e.slice(i,i+3),i+=2;continue}}if(a<128){s+=r[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1<o){let l=e.charCodeAt(i+1);if(l>=56320&&l<=57343){s+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[i])}return s}ho.defaultChars=";/?:@&=+$,-_.!~*'()#";ho.componentChars="-_.!~*'()";var ur=ho;function ms(e){let t="";if(t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1)t+="["+e.hostname+"]";else t+=e.hostname||"";return t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function mo(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var H1=/^([a-z0-9.+-]+:)/i,P1=/:[0-9]*$/,U1=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,W1=["<",">",'"',"`"," ","\r",`
|
|
4
|
+
`,"\t"],j1=["{","}","|","\\","^","`"].concat(W1),G1=["'"].concat(j1),Pc=["%","/","?",";","#"].concat(G1),Uc=["/","?","#"],K1=255,Wc=/^[+a-z0-9A-Z_-]{0,63}$/,V1=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,jc={javascript:!0,"javascript:":!0},Gc={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function J1(e,t){if(e&&e instanceof mo)return e;let n=new mo;return n.parse(e,t),n}mo.prototype.parse=function(e,t){let n,r,s,i=e;if(i=i.trim(),!t&&e.split("#").length===1){let u=U1.exec(i);if(u){if(this.pathname=u[1],u[2])this.search=u[2];return this}}let o=H1.exec(i);if(o)o=o[0],n=o.toLowerCase(),this.protocol=o,i=i.substr(o.length);if(t||o||i.match(/^\/\/[^@\/]+@[^@\/]+/)){if(s=i.substr(0,2)==="//",s&&!(o&&jc[o]))i=i.substr(2),this.slashes=!0}if(!jc[o]&&(s||o&&!Gc[o])){let u=-1;for(let b=0;b<Uc.length;b++)if(r=i.indexOf(Uc[b]),r!==-1&&(u===-1||r<u))u=r;let d,h;if(u===-1)h=i.lastIndexOf("@");else h=i.lastIndexOf("@",u);if(h!==-1)d=i.slice(0,h),i=i.slice(h+1),this.auth=d;u=-1;for(let b=0;b<Pc.length;b++)if(r=i.indexOf(Pc[b]),r!==-1&&(u===-1||r<u))u=r;if(u===-1)u=i.length;if(i[u-1]===":")u--;let p=i.slice(0,u);i=i.slice(u),this.parseHost(p),this.hostname=this.hostname||"";let g=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!g){let b=this.hostname.split(/\./);for(let k=0,w=b.length;k<w;k++){let A=b[k];if(!A)continue;if(!A.match(Wc)){let _="";for(let S=0,E=A.length;S<E;S++)if(A.charCodeAt(S)>127)_+="x";else _+=A[S];if(!_.match(Wc)){let S=b.slice(0,k),E=b.slice(k+1),R=A.match(V1);if(R)S.push(R[1]),E.unshift(R[2]);if(E.length)i=E.join(".")+i;this.hostname=S.join(".");break}}}}if(this.hostname.length>K1)this.hostname="";if(g)this.hostname=this.hostname.substr(1,this.hostname.length-2)}let a=i.indexOf("#");if(a!==-1)this.hash=i.substr(a),i=i.slice(0,a);let l=i.indexOf("?");if(l!==-1)this.search=i.substr(l),i=i.slice(0,l);if(i)this.pathname=i;if(Gc[n]&&this.hostname&&!this.pathname)this.pathname="";return this};mo.prototype.parseHost=function(e){let t=P1.exec(e);if(t){if(t=t[0],t!==":")this.port=t.substr(1);e=e.substr(0,e.length-t.length)}if(e)this.hostname=e};var Qs=J1;var Ka=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Va=/[\0-\x1F\x7F-\x9F]/,Z1=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,ei=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,Ja=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/,Za=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var Y1=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function X1(e){return e===0||e>=55296&&e<=57343||e>1114111}function Kc(e){if(X1(e))return 65533;if(e>=128&&e<=159)return Y1[e-128]||e;return e}function Vc(e){return e-1>>>0<127||e-160>>>0<55136?String.fromCharCode(e):String.fromCodePoint(Kc(e))}var pn=(()=>{let e=new Uint8Array(127),t=0;for(let n=33;n<=126;n++)if(n!==34&&n!==36&&n!==92)e[n]=t++;return e})();function Jc(e,t,n,r,s,i){let a=e.length,l=i*90,u=0,d=()=>{let I=pn[e.charCodeAt(u++)];return I<i?I:I*91-l+pn[e.charCodeAt(u++)]},h=n-r,p=n+s,g=new Int32Array(p);g.fill(-1,r,i),g.fill(-1,i+h,p);let b=new Int32Array(p),k=new Int32Array(p);function w(I,q){let U=0,j=q,J=q+I;while(j<J){let re=pn[e.charCodeAt(u++)];if(re<89)U+=re,g[j++]=U;else if(re===89){let ne=pn[e.charCodeAt(u++)]+2;while(ne--)g[j++]=++U}else{let ne=pn[e.charCodeAt(u++)];U+=89+(ne<90?ne*91+pn[e.charCodeAt(u++)]:pn[e.charCodeAt(u++)]*8281+pn[e.charCodeAt(u++)]*91+pn[e.charCodeAt(u++)]),g[j++]=U}}}w(r,0),w(h,i);let A=new Int32Array(s*2),_=0,S=0;function E(I,q){for(let U=0;U<I;U++){let j=q+U,J=d(),re=d();A[S*2]=J,A[S*2+1]=re,S+=1,b[j]=_;let ne=(g[J]<0?k[J]:1)+(g[re]<0?k[re]:1);k[j]=ne,_+=ne}}E(s-i+r,i+h),E(i-r,r);let R=new Uint16Array(_),L=0;for(let I=0;I<S;I++)for(let q=0;q<2;q++){let U=A[I*2+q],j=g[U];if(j<0){let J=b[U],re=J+k[U];while(J<re)R[L++]=R[J++]}else R[L++]=j}let T=new Uint16Array(t),F=0;while(u<a){let I=pn[e.charCodeAt(u++)];if(I>=i)I=I*91-l+pn[e.charCodeAt(u++)];let q=g[I];if(q<0){let U=b[I],j=U+k[I];while(U<j)T[F++]=R[U++]}else T[F++]=q}return T}var Zc=Jc("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR~#N~'N~#r~#m#-~#i'?%#'%~#B%##%,%#~#_%#0%~#]732~,w~2+#:&#%&'0%&>%}#>##F+)#%&&#(+_}4&}-%}(&}@&}O7Fdf0@+/v4}&WU##&/0#&'('B#%}.%}'+#%}#%%&#&%#%##+#&#)#6#'#.},%}c%},%#%##%&#&%#&~#>'*-.%##%##%}#%%}%'~#)D1}#%*&~#_%%'(~#S2%'.}#~#=##*'*-%}&'%'##&&~'E%.#&~#M4}%%##&'%#~#O1##%&#'+~#<B%##%%'%+~#;#@%}#&%#&&%#(~#H1}'%'##&&~#?A}&'~#D#%32}'&&&&~#[}'(#%}'~#;C})&}%%#%~#=&%,3}%'(#%%~#^'#&&)#%'~#Y%-~#d-%'~#^%%&#&&&}#~#b~2t*&'~&(~&@~0%~e~3}%*''0})&}+~!9##-}#%-hD*)1fC#%/&/fB#40~!+#)*4~!+~!K'&:~!/*7~!.#~!H~!L':~%x&~!H#~!*~%1~!I#~!+A~#p'~!F~~#-#~,,(~.Z~!V~%;'B'mq-W~!N~%I%#&&#&}#%},%%}'%}+X#%}#&}(%}'%}<%}#%}%%'}'%}:~![)9@~%>~#UA%-%##&~!C%~!-.9:~!1~!-^2/:a~!y,D*J#-5)/4~%23,~#G~!L1~!0X3`~!2+~!!0-~&E~!W~!o,>Y&]~%cZx_&~#O*9#A#'#+I'%#)~!0B*-5A+-((F&*M#)(-7-5+'-3a5Vi~!Y~!?+[)%3),ERHm~!+:D,VG.+)?fB%%*(%)'(#&80%1'8`K8?`+'Z#&O&'H5#*9)A%%5&3))0%39+.*7#()&&*=4@**L)<'_&*+..;(#*+)./&0#3)%')-8(4ixD(&.}%,('aI:,)%,k2231T)I'#/-W7,/'Q#.'Y24+h')37</31&83##&0#),H(?'&?/1##%#&&#%''-%&&&#(&''&#.-'%#%%(,')*'&#&#'##%(%(#%('#&##%%%%('%#%#%%#%#&%##h>w+v<ayvyvcg.uuhKr}g/v|g>u9i[~>g5uI~=RvdwEg;v/g;uk!!TTSx]@RT!U!#!@VBRUU!'UTe-d0c`e&gSdicedFcrdTaqb.kYcAohdYd@a3e+d}dMdtd.aJ#bqcK`dle/e.e'dwdPdodddjbEb}ogd^ofdpduc6j?l%d{drdqc)d7bacOdQ%T#Y)X.sR[yH>6Vyv3[xwLu>vo'!*.[yBacahoj>6Rew3[xqdZa#!a&#^(X-[yG>6Vyu3[xvg3sEr|g.u/Ri9db0T#^(Xa)!-[y;>6Vylg4wKs{JwNZt3@3r=c4Z([xlg;wKt!cpq's@v7A'*a(a+!-a#[y<3Dt?3Dt'>6Vym3[xmg9rxsNJwLZt4~?r?db1T#`-!(Xa,!0[yS>6Vz%NuQs.g4wKtnJwNZtS@3r>c4Z([y%g;wKtrdga8!a(!#&T*Y-Xa#!a0<or[yc3Dtq>6Vz43[y3JwNZtf@3s!Ju}!%Dti:pm3c_%X#tjB5pkd6q!r]u?voC'*-a.a2!0a&a+[yI3DtI3Ds~3DtH>6Vyw3[xx;:s#~<5pKJwNZtE@3r~d`a)!a2T#a.(!+U.X1[yT3Dt`3Dtv>6Vz&3[y&g9rxwzcxstPu.<rAJwLZtT~?r@dZa%!a.&^*Za(/Reu[ya>6Vz23[y1g3sEr}wkg{NuQRg{ci(U#5@b`~,cg#U(2WnH5wugcRh7dX#T(Y,a'Ta!!a,[yZ<]mj>6Vz,3[y+Pv#5ReZKu+=,%!H}7ABwkaS?Rh:BcW(X#<]mrj:ubv/ARekdg%!(!a.*Ta(Y.X1!#sP>Rl*Dt6[y>>6Vyo3Wf*jOvuumvuRgRJuq*!:9<B@bX~3jVv&v@s@5Re[d/rQt{uAvo&a&a*)a2!,0Wf!3Dt0=Bs'>6Re}3[xy~<5s%JwJZt1~Gs)c;&!#2sJkNuXvzq7rxu,Re8dka4!a8(aEZ+a@Y.X1Xa)[yd=Bs(3DtP>6Vz53[y4cX#X&Re:avRe9~<5s&JwJZtQ~Gs*i^rzvdRg+Jv{%!2sbB@bX}kdga,!Za?&^*T1/!a'Dt+[y6>6Vyf3Wf%g/u;s4hGu6?Rh-JvZ,!c%#&RoX54Rivj7uyvf8RgTKvZB%*!2sGh<vu5Rgq<=C::9bb~#dZ#T&Ta6Y.X*Dt>[y93Wf)coZ(T,6VyifluvRgC@95@B@bX~/hFu34cC#T,k/unq8w8Q5RkUklwQuzunq8w8Q5Rk8d/rJu?v8w9)-&!a0a;a&aIWejg3sEr/h1s<DtDJvyZqY5aws3Jvy!&Wei~Hr1:au5@Bag>23E~5c:Z&bX};kKv?w&unuVu5Rjc;>bs)#~@:Rh.=ay<a]C;b`}Vd6s/t{uAvoaxa()!a,a7%-a#a2Dt,[yF2Wo[>6Vyt3[xuNuPRi&NuPwpi#RoWh?vf8Ri%Jv]!%Ri:KvxD!.'2WeAjZu`q9rxu,Re7woeAg-unLq(qA_/*2Wg_g3u5q^9:4E}/jTrxrzv=Wkkd~0UX#^^Xa-a1a5T&a=U1a'*aEa]!a*aPaA-adok[y54Rn>;:p3~Dp5g9rpsFNvZqjg3uJp4~<5p0Pw;5qlJwNZt*@3p1Pw:5p/Ou!5p2JvG'!6Vye=<qnJvh_[xhg3v,Rh3kOwOw-sDuev/Re^dha[a%!%!a+#Ta7)-5TaCaO!aka!a)sf[yb2>Rl!9ARiq5E}Qg=ucRkBE|oJrJ_@Wk~@Wk{JrJ_@Wk|@WkyJrJ_@Wk}@WkzJvO_[y2g-vMRmiKuYC!)&>Ri;>Ri<@3RkNc](X#@9Rk=g5vuRmhKvDB!+'=]meg3u4Rmgd)#Y'Vz3CARmfd`a+!%T'!+#Ta1Ta6TaM-sTDt9[yA9sYd'%Y#s[[xpj:ueunaXRgEjRq,v-vuqdd2'`#6Rev<32@5>:2<E}5xIo9a*X#Y(;5RePJvD_g>vyRgNj8w)v8<wggs:RgXiZt|vjx,hSq3ah!-(~@:Ro/Ou!5RhWj^v(pyw8unRhUdx-UY#^Ua.a3a70!)%UX1TaDa)'omRiRRhE[y:3Dsz=Br,>6Vyj3[xkg6ruwjcqsrPw;5r*Ku]D'Zt-@3r(~?r.i[vwv]dU1a--U#`a4(g/vsRhPOu!5RhLj:rmu9Wo!~@:wdh@g/vsRiTjXuvvNr}:RhBj^v(pyw8unRn]dz1UYa'a+^Y(!aETZalaRY.Ta?a4[yDJw1!#qLsW>6Vyrfzq-pLflpwRe|Js>%!Dt@3Dt&Jvy_[xs~HrnjMuwpsw'RecKu+D#'!t<~Grl~?rjg5u-x,gwp{ah!-(~@:Rg~Ou!5Rh'jXuvvNr}:Rh#cW#X/c;&!#2sLi[v7u7RgpJv)(!iLrxu,Re6j7v@s@5Se[e7d`aW!Za(a`T.a#!a3!&aDa-!9)Dt_=6s+3[x~~DR|h~DS6avhGun5RkZj3w)v-]mkKunB!&*]kb97R|i<ARk<c:Z(6Vy}Juh'!wziMRoS:F|vkLuauJv5vtvQRh1d='T+Y#VyO~DR|jcF#T'7R|g97R|kJv3'!ay<Rj,Jvh&!:ReXcsa6*a+#a#_aIRf9aLRf?c,Z&Rf5Rf7c.Z&Rf;Rf>cQ#%T'p-Rf8Rf=ct#%'(*!,p,Rf4p+Rf6Rf:Rf<d~'Ua%U*^UYa(!a,-!#a4YaTalaEX0a8a<Weo3Dt/3Dsx=Br93Wen~Dr;~<5p<JwNZt2@3p=Pw:5p;Ou!5r3c7&!#:p>3Ds}KvGB)_6Vyk2sM=<r7x'eovA(!hFu1ARf}cV#X&@r5j6rvwQa^Rf3c=Za'wkghJv__g;unRggA53B9=b^}%j6uduo5Jq;!(hIv%2Re`Ou4ARe_e%a#^^^Xa&!a*a2!&a6YaP!*ad!#a:aE/5Rn?[y@>6Vyp;:pE~DrY~<5pBJwNZt8@3pCh=rt3rWPw:5pAJup_[xoNuPpF9c!#'45pD5ARn)d8#X'X*3@rU72s]h>v<<sSjJpqvewOJq/(!hNw'5ReBk0s2u3w/w'5ReE5@Jq.!a+JQ!&WeU23d(#Y&RjG5]jBk!u7w&u0udARjEe#+^^^Ub#!a2/a`Z(agT1!a-a;|@TaG!aS[yV=Re~fow'RguNuPRe?bz#'>RoUWeL>:Cbb|?JwPZtVg6ruRmzJvD'!6Vz(g/vmRh~Jvy_[y(g9voRgyx*cy(#2>Ri2B9b]~9kIw9u7rluJu3Rg]dI#a%UY'@=p%CAx.gQZ&RhwwygtRm{x5g_Z'+ABqR9Woa=Bp&dV#^*Xa'!&@o{g4v]Rk;Jv{!%Rk[wkkiA5RkiwwfUB=x,fUuqC&*!>RfTg8v0RfV~ARfSd;rJsAuAv9wR'ae+/aO!a@aza/a#[yQ@Wg!2Wemg3sEr0JvB_g>uvReWg2v+Re=KupB_+[y!2AbY~-~Hr2AJwD!(h<~El>h<~El?Kun@+_:9b`}Kg-v/Ri3g;vtwyk_9]k_d=&T#*U.6qh@Ab`|K9:H|CJv[!&3Dtex'fDwC%!Rf[9WlMd[(^X,!a%Z06Vz!@WgBg=v~Rgvg,QRe@awd,#Y+jTv|Q~EfWj]uNr|~FRfXdy#Y&^Ua%!aO.!(a)Ua;=!a@aKap!a-,a!Ta]a[rSa]p?[y82sK=Bq~;:p:~<5p8Pw:5p7d'#Y'Wf(;RnRi[u4w&RgJJvG'!6Vyh=<r#ijuuv/sIKuYD'ZtG@3p9~Gr&d2#`(g<vtRgFj`u5w&rqpxRf2CJuY!+:wfnTOu!5Rg}jNs1ucv&RfwJvA!&3@q|BDcC#T,k/unq8w8Q5RkTklwQuzunq8w8Q5Rk9dga#!a'!a=#a0!:+Tb*b@aO.a4!aba8aFJv^}?!VyR~Dr<g;u%Rn.~<5p[x'e`wNZtR@3p]Pw:5pZhNvjBp.woe_g5u-r4JwF!%DtO3:ooc7&!#:p^3DtpLuGw(!+%)Dtk6Vz#2sd=<r8d'#Y([y#<x3gJt`w@!)%}MRiowzikRij=]ilxAf3,U(#B2Rf#g0v-Rm[ck{`U#]giKv3>)!&6Ri154s,KuGB_%@r68r:dJ|t`#X(9<E|u2@H|rx3gJu?w'!+'1Nu7Reg4=H~+9<wxgY95Rm]xLggZ-`(X}U2:Ri4h<uOawRmsJv__5@bb{jbV~3dka#a'a]!,#a+U=a>b6a3b%!/aKa/)!arwve^VyJ;:pR~DpTg3uJpS~<5pOPw;5qmPw:5pNOu!5pQJvG'!6Vyx=<qoJvA!{~Jup!%@qk7Rn/KvyD!}''[xz;>wkh'?Rh,x8gyt`w5D!&),(SgyccRgztJ@3pPB5p#d'(Y#<]mmifubw&RgoJvE&!82s^JvF&!8Rf,ADb]~;x=h'rNu]vK!,%'*0RnORh)4Rh*AqQg-vaRnNg;wHwkh'ba~4cE#Ta*x3gctyw@'!+%RnFRnD<4Rn@hFvK5RnCxWg[#`&a0Ua()`1Rm75Rg[c]%X#qi8Rg^NvdRj>BwzgZauwji7Rm6A4wgg]d1#&(*,.0a#Rm;Rm<Rm=Rm>Rm?Rm@RmARmBe%#^^^Xaea?aC/b+(,!a+a#!a/!>a&Ta<aKbD!2wphBRnk[yPw}hE|.=Br-3Dtm>6Vy~g6urRf.x,hPrNav!%'RnqRo%Ro#Nu;q[Pw;5r+JwNZtM@3r)d'#Y'Weh;xChL#`&RnmRnoKu}>%(!Rne~Bs-;2wjcussJv+'!aYSO}6@B<5?ba~8LrNvj!.%*ROwungw~ng~:9;Ri^>wtnig;wHRnixDh@|(UZ.x1h@|)!#:2<H|*xHn]#-UX'3Ro)z=iT}6ARns=Bwsn_wpnaRncw]aR(#UXa&Ua*a/=]iPd'#Y&Ro'WnXf{QRm2hNvj]nZd`'T~&1`{|`#9b]{}c:'!#Wl{>@=be}]?cl{{U#:5Abb}Jds#^YaF!a*b4a#a3aPa>&Tb!bH!*a_!Eau?/a&RjY<]gj>6Vz*;:pe~DrZg,QRj1JwNZtX@wihspcJvZ&!VyX9WmOJu|!|N2WmHJvh&!]ht~Bpbcn&T(!#RmQ<s7Nu;padH#X'`+WmJ@>RmKCARhnKup=!)&Wf+:RhqNuPpf9c!#'45pd5AwghpARn(Ls@w!%,)!RmP@Wfe<E|IJva!&WmNg8vsRmLd`*.`#Y'Xa!axRn*]hrA8Rhug5s@rXg8u!RmMd8#X'X*3@rV72smdI*#UY&RmICARho~GsgxVgd)Ta'U-Y&Xa!T#RnEWnA@Wffg1uDRi0hFvK5RnBxGnG&#`%owp)@wsf+bX}Ze-*1!a*^^^Ua|!#a.aq&Ya2!a>.a6!a:aO`aJDtL[y`@Wg#>6Vz12@wzoYRoZNuPRi!NuPRhzg=ucRi,@=b`{Yg=ucRi-ACJvB!&Sh[ebSh]ebi`wUuFRm4Jw2_[y0JvB!.<Ju(!&SoG}6Shd}6<Ju(!&SoH}6She}6Kur@._g5vHRieJvx!{L2G{Kx6gd'T#?Rh82Wi5cZ#X(g1w)Rm5dW-Y(Ta#!a)!#aYa=wnfE=su2>>bU{0j9udv:<svj8uQv-7RgHdE%#^'sq9sp=>Bb_{TJv`!&g/r|snj6v(us5d,#Y(56H}[978H}]Jw5!&g1rushJvB!+j;v{u5?zDhd}6}bj;v{u5?zDhe}6}ce*#`(^^^a[aea!=!a6a*aoXb1a.!aAbL!b>,b'aL!aV@Wf|2Wlg3[y/JwNZt^@3piPw:5pgJunZou3@rsJva&!Vy_g<v~Rm#JvG'!6Vz0=<r{Ju{%!:pj@WfsiXuJu3Rm:JvZ&!WfA~Bph@c4Z&Dtwax5rubx(#:awRk1@d,#Y&RfjRfid1#,Y(@Wfp2Wlrg5s@ryKu[@!,'=]ig9wlk?Rk>g5u-rqJvy'!@9RkQcH(T#=>Ri~@<wkj(Wj(KuZB*!&<7rw@9RkRcH(T#=>Ri}@<wkj)Wj)dg(Ta2Xa9X#`-!a*CARhg@@=I}d9x;c~#X%so=<sj>2@@=aybb}XjWv0Q~EfEj3vLv;<d,#Y(56H}`978H}_dgaPaFa'a/!#a3Y0a_a;a|!1(a7-[yE3[xt;:pJNvZrrg3uJrvJwNZt=@3pIh=rt3rxPw:5pGOu!5rpJvG'!6Vys=<rz@c4Z&Dt(ax5rtJvZ!&~BpH@wsfNg-vaRlNci*U#=<wei<F}a5@Jq.!a*JQ!%@qZ23d(#Y&RjH5]jCk!u7w&u0udARjFd/prq=tyvpaEa(a:.!a1aZ(@@=I}:9wpd%=<sX55w_h}@@=I{t=ay<aU@@=I}T=ay<2@@=I})?C9:9au@9Cb]}DP~=x-fAZ(2Wl1=ay<aU@@=I}>5@d##Y+jTv|vV~EfFj]uNpn~FRfGdgaK!Z2&!a8a-Tb({E!acTbM*!a(DtY[yYd'%Y#sl[y*hHvh>Re5x2c{Z}.j4uCvcawRiMd+#X+_x&d!},<5RkX;2Hzw@x,gavfB-!{CcF&T#Roe;RodwWbBg5urRgaKvHC*_6Vz+<4opieuew&Rmq@d]&Y)X,T#X0Rh}<BqP=4qS9:ReMg/ujReNJw0!/<Jui%!bd{kawwnemRelAxUa?a3#*.&UX(Ya+a/RhvRnQ<o}9Wmtd-#Y&RgSRmw9;Rmxay=Rmyg-vaRmuxEhSrNu,v-voC!%(aR.a(a7+1Ro1>Ro5CE{A9b]{@;5x#eO{:g;urRi+KrNA!%(Ro3>Ro79;Ri_Ku@>{;&!x%gX|{KunA_+g5QRj/g3u5Rj#g>uERj%wio/xRhS&!,!#^1U}wba{8>>@=be}qC@:D5ba{7Ku+A&!}x?ba}t>>@=be}se(aA^^^Uat!b0#{pa+awUazbGa#aLb9bgaWac'a5TbS=Br!d1#`%scp_Jvl!#rT>Re0JvX&!VyN=H{Fcm#U&:pY=ReaJv2&!]h0=]nUJvG'!6Vy|=<r%JrM_=]h2@Wlud'#)U'Wf'b]{i=]h/Jvh!&~BpWg=v]RnMx+ny#'Nu;pVwjnu=]nwxJnx,T#`&Reqwjnt=]nvieu9vrRjLLuYwP(#+!th@wih5pX~Gr'g5v/Rh4KunA'!-CARnP@wwiN:Rm_9x'cvw>!|l=<saKvAA!0&3@q}>w^e1bp#&Re2Re3BDx7gH#T|f5H|eKuZ>!%(:qNAH{]Jv6!+3B2B9=b^{X<5<B92:E{ZLvhwA(a;a%!igQuyRmad+#Y}m@3Rh5d8#X'X*:AqUAHzmaxwbh<aXRnVcF}RT#Nw&cj#U(BWnug/vsRntdka)(a3+.Zb7aYYan1!bVa@Xa}[y^@b[{G=H{+hFu73Rj&Pv#5ReQcK%T#sig1v{Rj'Ku+D#'!t]~Grm~?rkKuMB!01d5#`'Vy.ta3Dtu~Hroc8#'{^45s85AwZbP&!#Rn!wghxWn#KvEA!)&2RlA2RlBx:h|#(T,=]j09Wobz>x]z/@awRoTd+#Y(az]hFhCrm4d,#Y+jTv|Q~EfMj]uNr|~FRfOdCa!Xa9_X#@<plJvf!%b`{(9;Rgwc;.!#2x7cw#T|UDb]|T5Ju={(!=@E{&Jv)&!Ab`{'awJvf!~*>>@=be{#KuY>!+&4Ezyi[ugv&RjIdea+T)#UXa&T-T&a!Rh9auRmW=]kLg5vuRn+g3u4Rn-Ow6ARn,hHus5xNk?#UX(U~)/g8v0RkD~AwkkF?Ri.OuNBwkkA?Ri/d|a2`a*^UYa.!aBTZaTa'Xa;!(!2!-a#b2[yC>6Vyq3[xr2Wi?g1rusVh%s?DtF~<5rbJs;%!DtBfswKtCj[uvuSsEu3RgVx3o:u+wN'*Zt;@3rd~Grh~?rfg8w)Lq)qE&-a%!>bI|`jWv0vV~EfCjTv|vV~Ef@j]uNpn~FRfBcK#T']gWNu7x,k7q4ai(0!hHv8<RhmkMu9vrsBuev/RhlCJvB!,g<v{wchh~@:Rhji[vrv{wchi~@:RhkdS&a5UY#Ta!RgPwwiI5BwciI~@:Rh`x'iJvj'!5]iJPu8Bwch]~@:Rhach)U#h3rp]gLh@t|Ax,hTq3ah!-(~@:Ro0Ou!5RhXj^v(pyw8unRhVd|)`,^UYas!a?/a2Z'a^Ta{Tb7Ta(a#!a,Wf&9sZ3DtAadamov=Bqt3[xig8vsRm~>waiL2b`{QJv*_Ouv2qgj<v]v2BqfdR'X*X#Y-@3qr~Gqv~?p6hHv-]glPup5Lq+q?_%*b_{qF{n9b^{rOu4ARhpKvCD!+&~Bqp:5Dbb}nwoiKl&unuTuBv]v+ueunaXRf0=Jvh!0nKufu8v1w&w7q%w&uHrz:Rgnj5w,uxDJq/(!hNw'5ReCk0s2u3w/w'5ReFd>Za&!*UaA=<wkgsRnSJv^!%Refifw3vyRgOKu_B'!,<]gkiiu:w&Rh<=C@a^<B57@2F{[<B5@aW:=3away9A5aW=<B=C@a^<B57@2F{Ie-#`(^^^bCara.b8aza6!/bZ,!adTbnTbOb+aFaS!aAT9@Wf~2Wli3Dtl2@d,#Y&RfnRfmJwJZtN~GqyJva&!VyMg<v~Rm%iXuJu3Rm9Jv[_=]ih9wlkDRkCd1#`(@Wg>2Wls3cH#T(@<Rj*=>Ri|b~'#23s9h<~El.d'#Y&Dtxi^rzvdRl#d*#U%(o|B2s`hJwSaxRmDKv4B&!1:Rmdd5#`'Vx}to~Hq{x'f1v3(!BA5ba|bJv_&!Wfug1v]ReIdO+U/Y#&G}-8wze=Rh{g1v]ReHg/uQRf/by#)ibQwERl/cH#T(@<Rj+=>Ri{cNu+vlax-!(#a0qa9<Rii2;;bU{H;x<i=&X#Rk`<4wwi=C9H~8xAI(Y#<azRi@45wXI<B9;5bb~7dL(X#Xa(+!aL6Vy{g5QqOau:5au2@ay547EzbxOcU(UX-T#Ta#:Cbb|A?wjh/b_|SOw6ARgtihr}u7Rhy<d1#T)X1@@=I|~=ay<2@@=aybb}Sj3vLv;<d,#Y(56H}A978H}@dGpvs@uAu`vcw9*!aFa+ai%(b!aXa8.a?a[ozWey=sU2@G}Nch&U#Rf_WexKu+D#'!t:~Gr`~?r^j]uNr|~FRg*j^psurwJt|RmcKv)@&!)7Rkv~Br[@wxfO:Rl3co#U'6Rezj_q#vIuavjRltwzeyh@vr5JqD0!>aY?C9:9au@9Cb]}9cl#U*5;5<H||jbuus1ucv&Rfvg1v~d/pppzqFr^a--a~!aMat1(hFv;Wiz@@=Izoj5uuv-7Rix~Cw`fk2WlVcZ#X,k)u3vWs@u2]ktg;wEx'fBq(_2Wg/jTv|vV~EfoJv]!15x'hzqG!(P~EfU~CRl_j6v(us5x4i-#T(2WmZ?C2F|d>Kq<aj1!*jTqIsBv=Wl`~Cw`fi2WlWj`v0u*~>RlR=c>Z,k#u3vWs@u2]kr<c1Z+jTqIsBv=Wla~Cw`fm2WlXdmb3!a{(arZa`bkTa%TbQTa-a9+c'!aM!/[yL=Bqug.w'RifhFvyDRj.g>vgwyk^9]k^Jv3_@WfbAARkhJw2_[x|JvB_wkoIRoKwkoJRoLd'(Y#<]gm=<9<H|yd'%_X#skDtb3awwqkgNulRkgdB#^',9:p'hJwSaxRmEBwVb8@4=H|qLu+w50&!)@3qs~?pU>Awwn;;Rn=c:Z'ARn<=<qwKvC@!/&~BqqJv6!&]eVb^z^xRge'/a%+^`#Sge}6<4Rn3=]n0Pw2>Rn8Jw0!&>Rn:>Rn6cY#a7+!a&=<wkaNw~h3z_c5Z{=wjh#=]nLKv^D!&)Vyz=bW|swYb<WetcG#T(2wxa@qVx@gD#Y&b^|V5JwG&!5bb|pg/w&RgD@x=kHs=uAvn!a%%/'+RmSRh694Ro`g-vaRmRhHv-]mlxCcS#`&ba~.5cD#Ta)P~=d,#Y(56H{>978H{Dd_#{2^Y%_+qbbb{6g3sERhsbU{?dfa.,`a(Xa<!aiX#(55RiG54RiHcI#T'WiU3RiVNvdwtfcRlKNvdd,#Y&RlHRlExQgf.1*^T'X#Sgf}6Wn4=]hfPrk>Rn7Jw0!&>Rn5>Rn9Lunw?&a2!,5<oq@@wqfdRlJj5Q~=d,#Y(~ARfcOuN]fdDKw;ay(}i!547E}j?cI#T(@5bV}iCbV}hdv(^^Tb?a40,b##Tbo!a*bR!a<b|a/!aKai!aU[yK=]o^g:v>ReGJwPZtK<7Rh+h<~El,Pv#5ReR@awwxjCg,ulRjDJv6&!]j!z?aQeeg>w=Sh<eeJw;!&axEzOg,Qosc!#*:wkeJ]eJ>x'h-u(!%Ro.w~h.zPdNZ(X,Ya![x{;9ReY;wkgxRiF:x?ap#Y&RmUg<s2Rkod]+UY0TZ'!a&A9sw<=bczLNvuw{gqzNhJwSaxRmCKuLay!#&s_Rf-55b^{uJvZa!!c%#(55Ri654wmiu5RiuawLu,vp!+}^%b_}Y9;wkgxba}o>A9:=b^}zKuh=a''!3awRk3c*'!#aHRk6c+Z&Rk5Rk4Jv)&!awRjSawd9*`#0?C2@EzMj8u<uJ5RmbjQrquJu3x,k>uq@_+=ayb^|W~ARkEOuN]k@7dhzV^X/X&a-#zRzSb`zXcJzTT#2WkVKvDBzW!%FzY9;5bbzWjQrquJu3Jw3%!b`zU=ayb^zQd:#X(T-a!6Vyywxh}=b]{Jg=u1RiAdGp~qHtzv!w(wA+a+a;<!aJaYai'anasb(=azRmV:Cbb{MLq2vb!%')RjuRjrRjtRjqx3jnqCw3!%')Rk(Rk+Rk&Rk)Lq2vb!%')Rj{RjxRjzRjwLq2vb!%')RjsRjpRjfRjex3jcqCw3!%')Rk'Rk*RjkRjl9<CbbzfOu4ARhxLq2vb!%')RjyRjvRjhRjgx=joq*uKvb!%')+-Rk.Rk%Rj~Rk-Rk#Rj}x=jdq*uKvb!%')+-Rk,Rk!Rj|RjmRjjRjidAq&qKs@uAv8Aa.'*-a@a&0!aM@a5[y73Dsy3Ds|3Dt):wxgI2sHJwJZt.~Gqxwsf0ikrzt}Rl0Jvy_[xj~HqzKv_A|D!&WfP8axRoVcf,U#k(v]v+ueunaXRf1Ju}'!g8u#Ri=jQw!sCunLprq>!,')~<5qeGzq9F{W=c##%s5au:5aU3CBE|;d4#X(D!a&6Vygx(b;#(=]ed?C2F{N<capoq2r[a&!aPa9,'Pw;5s:@@=I|,55w_h|@@=IzcP~=x'fCqB_2Wl2>aU@@=I|1OuNBc1Z+jTqIsBv=Wlc~Cw`fl2WlZ~AcTa%!Z+jTqIsBv=Wlb~Cw`fh2WlYk+uNqJsBv=WlSg,u3dca3#UXaMYa)TaB-=cM|7T#<bI}l5@B932:aV2G{BOuNBJq:|M!5Ezt=<B=C@a^<B57@2F{v>cB{/T#=ay<bI{3Jv6!a.6BKq0ah&+!5E}HP~Ef{978BaU@@=Iza<7d#.Y#978BaU@@=IzH~AJq0!(@@=IzG978BaU@@=IzFe,aU*Y&^^^bvJb,b:bFad!a,c2Ta>aL.bo6!a#CbTa'T#Re{2Wlh2@G{yg6t~Ro_NvdRfticuRQRllJv3&!x&c|zs@Jw3!%RflwpfkRlpKuL;%(!Re<@G|C2GzdhIvuBwgjAg-u0RjAKQB%!(GzZ@G|5NuuRl7d='T+Y#Vy[g<v~Rm!==G|>JvA!)@wma=]m1ifuaw&RmnLs@vT'!|/+[y,g:v>ReTJw1!#qX=x!eC{bLu+wT&)ZtZauq_~Graci&U#F|89:r_Lupvq!.)&2RlG8RfaC=x!eF{_h?rpWlmd&'!#X|&]k::xJey#`'T|+<E|&2@H|%dE#(^,g;u.RiEg6vjRiC9xCkA{O|zY#g=ucRmXKs0@!&*@G|m@awRknJuh!,3d(}gY}eJvj!%Rm):Jw3!%Rm+Rm-Ls0w(&!a(a#@b[|6cZ#X'7RkxWgAOu4ARn'dH'U#Y*Vz-Wm'CARm}d]*#a%^a*T'aK!a<9bV{PC=p*Jw4!&SgxcbB5r]idw(wBRmF7xFkt#&`(Rm/Rm8E|!JuY_9:Rl5=wrgr2:bbxd@xXfB(a*#T+!.X0X1Ta/a'T&RlDRfL>RlyARl9b[z[>RfZ:RlL:RfRwlg/ARl;9;RlxKv,A/!%7s69<74=BA5ba{-8Bde#`a<XaKYa1,a'P~=wxfB2bZ}}?C972@@=I}r8@55B9;5bb}G978B2@@=aybb}3j3vLv;<Jw3&!>Rfk=ayb^}4~Ad1#`*@@=aybb{w2@>==<bbz]dx+UY#^UaF!a9!bB'Ya1.!ajXa#%olRhD[y=3Dt#Ov5BrHKuMB%!(Rf^Wep~HrJwkiQjKr|~FRg)Ku+D#'!t5~GrF~?rDdV)UY,Z/_7RkuG{<~BrBg,rlsO:235B@bX}|d?a1!#`(6Vyn5@d##Y+jTv|vV~EfIj]uNpn~FRfH7Lq2vb1!a9-978BaU@@=Iz9978BbU}#~AJq0!(@@=Iz8978BaU@@=Iz7~AJQ|}!978BbU}!JvkaK!AdUa21-U#`a+(g/vsRn~Ou!5RPj:rmu9WhOjXuvvNr}:RhAj^v(pyw8unRn[kPr}p|u7vwv]RiSBd;pppzq@qHQa?(b.!a.a`@.|xa(hFv;Wiyj5uuv-7Riw~Cw`fg2WlU978BbU|wOuNBJqG!(P~EfD~CRlQcZ#X,k)u3vWs@u2]ksg;wEx'f@q1_2Wg.j]uNpn~FRfqJv]!15x'h{qG!(@@=IzK~CRl^j6v(us5x4i,#T(2WmY?C2F{1>Kq<aj1!*jTqIsBv=Wld~Cw`fj2Wl[j`v0u*~>RlT=c>Z,k#u3vWs@u2]kq<c1Z+jTqIsBv=Wle~Cw`fn2Wl]dn1#c(a(b^a2!b/bAT(bj!aDa7bu,a_a{c0!2T0g:v>ReD2@G{42@G{5~DpM~<5rc=Bx6i>{RT#RnI@zCx]y]z:2Jv[!zr5Awyk]9]k]dD(Y+X#6Vz.g=wKtgwhaCwgmTWj2Lu,w%_+/[y-B;b^xeg3u3Rj-2@bX{*KrJ<!+'@Wg(g?QRlC@Jv`!%b[zIwsfII}8JQ_@w|kW|=Jv(%!AqcOuNBJvEzh!bYzjLs@wP#(0!oy@>RkdJwMZtc3Dtd@BcG#T'9bWxg2@2Fznd*#Y+;2x'c}w<zizixNgwa#Z'U+!/!a'!a+w~g~z6wcn{Rn}wcnzRn|5Rh%=]nJg5vuRmvNvdRlvcprJu}w*az*a#!%.a.'Bot9qT]kj@Wg'ay2Gzv@Jv`!%b[zEwsfHI}1;ck#Ux`<Cbbx_Lu+w!a&0*!wko*wwo,So,}6Juqxf!E}PigQuyRm`d3(`#8>Rn%:A5B;bZ~%KvhCa!a2!x>k7#Uxb@b{#xaRk7Jw0!)>wwhlShl}6>wwhmShm}6CJvB!.x'hhvj{!!5Bwkhhbaz}x'hivjz~!5Bwkhibaz|xEhTrNu,v-vpD!a%&/)a3a.,%Ro2t[CE{)@3re9b]{%wjo09:rgc:Z&Ro6=<riifuaw&RmoKrNA!%(Ro4>Ro89;Ri`dSaL'UYzxZb)7Rka3xRhT&!,!#^1U}vbaz{>>@=be}yC@:D5bazzKu+A&!}{?ba}y>>@=be}wxBh[t`u~vJvr!%a!a()a,a0a4RoC=]o;Ju(!%RoGRhdwjh`=]oAg>w#Ro?g5vuRo=NvdRl|Ku]C.!&;RoEJvB!%RoORoMBx'h[v+_?w~h`}~5?w~hd~!xKh]oiptu-utv.vp!#%&a30a@a'a+(a/aOp(o~p!RoDJu(!%RoHRhewjha=]oBNvdRl}g>w#Ro@g5vuRo>c[#X']o<CauRoRAd-#Y':RkpauRoQKu]C.!&;RoFJvB!%RoNRoPBx'h]v+_?w~ha}t5?w~he}ue!/UbhYacXaW^Tc&a;b:a-c/#b&aja1(!cL+!bKbt!bmcRc9aIc?8[yW3Dtt94Rg`Jv}!&SiRMzBhEebShEMNuPRe>x7gL#TzuwjirRipc<Z&>on;>z=h-MSh.Mwqczx'a7vj&!>Re4@=ResJt__NuPRi*NuPRi)j]uNr|~FRfzKrJ>_+@Wfy@Wf]2WocKrJ<!+'@Wg%g/QRl@@Jv`!&awRl<wsfFIzgLu(w*!.*&ShBMwvhIRhI9;RhNx1hK'!#Sn]Mx1hK~0!#:2<H~7cNu+w7D*'1ZtW>Rn1~?rOc:Z&Rn2=<rQ<7wjh&=BSnLMc]#X(6Vz)w[b=a!U#9wzgMc3#&(RgMRitRis<x,gKt`ax!&+SioM=BSilMc3#&(RgKRinRimKurB,!&SiQMzBhDebShDM6BJQ!(P~Efx978B2@@=I}WLrJw!!,a*&@G}O@9wkibRid@@x'fKwC!&SlDMSfLMjUv~Q~EfKKv3@a+!(hFv-]mpx/hYZ(C5RiWz<o/MwkhY?So/M@x,gbvfB*&!SgEM:SoeeehFu3:Rgbda(,^TZa)X/7Sg[eb:2RgI~BrMC@wgkc:wwkcRerx3h(uUvK!&*,SnOM4Sh*MArRg;wHRh(x=h;rJvPwI!a4',a'0@Wg&=BSh/Mg>w=Rh=g3w*wwgGRgGcW(X#;Sg}M2Gzk@Jv`!&awRl=wsfGIz`dKZ*T'Y-:RhR7RhQg5u-p`j6v(us5d,#Y+~Awkia?RicOuNBwkibba}Ld6p~tyu_vbAa'a+!a/'a3aEa8a!>Sh,ebJv{!&Sh@ebSaReb9;SgwebNuPRi(NvdRl)NuPRi'hHu^<Rm^Jvv_@Wl(g;u1Si/ebKu'B&!*Sh?eb@Wl'z@aPeb95Si.ebcpputyvjB)!,&a+0a%ShAMWeK@G}C@WfJ9;RhMwvhH9w{ia}ix,hJvRA1(!zAn[MRhHx1hJ~*!#hFv(BSn[MBJQ!(@@=I~'978B2@@=I}2db.Ua<'X}+T#a0XaG2G}E;wkg|wuh!Rh!x,hZu,@)!&So0MVy)C5RiXACJvB!&5RiY5RiZg8w)cG}*T#2@bU}=KsA>(!a.3wkhZba~(x,h^u(A!&(SoCMRhb5Bz=h[eb?w~hb~6x,h_u(A!&(SoDMRhc5Bz=h]eb?w~hc~6e)aA1T#T,^^^c-bMb&blcPaP(a/!0!bA=b5c@a(!bfbrc#2afwmhARnjwchORnp2Wlf3DtsNvdRl-2@wpa<]m0bx(#:awRk2@Jw3!%RfhwpfgRlnKQB%!(G{V@G|'NuuRl6d='T+Y#VyUg<v~Rl~==G|<Jv+'!aYShC}6@B<5?ba~8@Jw3'!g2QRljhLrpWlOd+#Y'g.w'rIg>w*wgj@g-u0Rj@Lu+wT&)ZtUauq]~GrGci&U#F|39:rELrNvj!.%*RhCwunfw~nf~:9;Ri]>wtnhg;wHRnhx3hDs@v~!/+'@Wfr@9RkSNu&Rlo=@<5GzoKs0@_+@Wl+@awRkmJuh!-3d(}pY#qWJvj!%Rm(:Jw3!%Rm,Rm*de&!1U-U#`)Re;@G|.@9Ri82@wjfvRlq=@<5GzpLvOvr!).&2RlF8Rf`C=x!eE{.Jw3_g2QRlkhLrpWlPde(!#U{s,UXa*Ta'[y'g:v>ReS;x0PZ&RnlRnn~HrKJw1}f!=x!eB|2w]aP(#Xa&a*Ta.Ua2a7=]iOd'#Y&Ro&WnWg;u.RiDg6vjRiBNvdRlzhNvj]nYJuW_2Wm3x)kFze{9d])!a.!,Y01!#&aC!a3RndC=ox~BrC@2b^{pg,rlse7x'ksuq!%Rm.E{xidw(wBRmGx9o+)X#wwo-So-}69:Rl4@xSf@a#XZ'X)X,Ta(/ARl8b[xc>RfY:RlI:RfQwlg.ARl:9;Rlwdn'#^XafaQa1X1TaHTa)@b[{zcZ#X'7RkwWg@Ou4ARn&x)kG#{,g7u/RkGdH'U#Y*Vz'Wm&CARm|bx#(A]gUbUzJj9Q~=d,#Y(56H}l978H{U7d,0#U*2>ABb_xZ978BbU{e~AJQ{g!978BbU{hxMh?ad{oUYZ.x1h?{l!#:2<H{mx3n[t{vl!,&a%3Ro(z=iS}6ARnr=Bwsn^wvn`Rnbd`*T}B0!#^X'BG{c9b]{a>>@=be}F?JvS!&BG{d7BG}(Bde#`a1X,Ya@!a'P~=wxf@2bZ}I56B2@@=aybb}08@55B9;5bb}<j3vLv;<Jw3&!>Rfg=ayb^}&OuNBKuLA!)a!P~=x#fD{f2@>==<bbzl?C972@@=Ix^d6rSu,v7w*C(0a)a6#B+a%!sQ[y?3Dt%3[xn~<5rLOu!5p@Ku+D#'!t7~GrP~?rNKvlaya7'!h+v-5qMg=t|cd,U#5AAaa5Abb{S@52B5@a[@52B5Gx[iXueu;d<#`a(!/549C;ag>23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!b<bwA!#5@B932:aV2G|:d-)Y#hJrL>RhG<7@C5<H|_=Cau:5aj5@B932:bJ|ng>vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61);var at;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE",e[e.VALUE_MASK=8191]="VALUE_MASK"})(at||(at={}));var wt;(function(e){e[e.AMP=38]="AMP",e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_X=120]="LOWER_X"})(wt||(wt={}));var po=32,Qc=21,Q1=2097151,Xa=2047,eu=0;function eg(e){let t=e>>>Qc;return t===Xa?eu:t}function tu(e){return e-wt.ZERO>>>0<=9}function tg(e){return(e|po)-wt.LOWER_A>>>0<=5}function nu(e){return(e|po)-wt.LOWER_A>>>0<=25}function ng(e){return e===wt.EQUALS||nu(e)||tu(e)}var Yc;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Yc||(Yc={}));var Qa;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Qa||(Qa={}));function rg(e,t,n,r){let s=(t&at.BRANCH_LENGTH)>>7,i=t&at.JUMP_TABLE;if(i){if(s===0)return r===i?n:-1;let l=r-i;if(l>>>0>=s)return-1;let u=e[n+l];return u===0?-1:n+s+u-1&65535}if(s===0)return-1;let o=s+1>>1,a=n+o+s;for(let l=0;l<s;l++){let d=e[n+(l>>1)]>>((l&1)<<3)&255;if(d===r){let h=n+o+l;return a+e[h]&65535}if(d>r)return-1}return-1}function Xc(e,t,n){if(n===1)return String.fromCharCode(e[t]&at.VALUE_MASK);if(n===2)return String.fromCharCode(e[t+1]);return String.fromCharCode(e[t+1],e[t+2])}function sg(e,t,n){let r=t+1,s=0,i=r;if(r<n&&(e.charCodeAt(r)|po)===wt.LOWER_X){r+=1,i=r;while(r<n){let a=e.charCodeAt(r);if(tu(a))s=s*16+(a-wt.ZERO);else if(tg(a))s=s*16+((a|po)-wt.LOWER_A+10);else break;r+=1}}else while(r<n){let a=e.charCodeAt(r)-wt.ZERO;if(a>>>0>9)break;s=s*10+a,r+=1}if(r===i)return 0;if(r<n&&e.charCodeAt(r)===wt.SEMI)r+=1;if(s>1114111)s=1114112;let o=r-t;if(o>=Xa)eu=o,o=Xa;return o<<Qc|s}function ig(e,t,n){let r=Zc,s=e.indexOf("&");if(s<0)return e;let i=e.length,o=0,a="",l=r[0],u=l&at.JUMP_TABLE,d=(l&at.BRANCH_LENGTH)>>7;do{let h=s+1,p=e.charCodeAt(h),g,b;if(p===wt.NUM){let k=sg(e,h,i);if(g=eg(k),t&&g>0&&e.charCodeAt(h+g-1)!==wt.SEMI)g=0;b=g===0?"":Vc(k&Q1)}else if(nu(p)){g=0,b="";let k=p-u,w;if(k>>>0<d){let R=r[1+k];w=R===0?-1:d+R&65535}else w=-1;let A=0,_=0,S=w<0?0:r[w],E=h+1;e:while(E<i){while((S&(at.VALUE_LENGTH|at.FLAG13))===0&&(S&at.JUMP_TABLE)!==0){let F=S&at.JUMP_TABLE,I=(S&at.BRANCH_LENGTH)>>7;if(I===0){if(e.charCodeAt(E)!==F)break e;w+=1}else{let q=e.charCodeAt(E)-F;if(q>>>0>=I)break e;let U=r[w+1+q];if(U===0)break e;w=w+I+U&65535}if(S=r[w],E+=1,E>=i)break e}if((S&(at.VALUE_LENGTH|at.FLAG13))===at.FLAG13){let F=(S&at.BRANCH_LENGTH)>>7;if(e.charCodeAt(E)!==(S&at.JUMP_TABLE))break;E+=1;let I=F-1,q=w+1,U=0;for(;U+1<I;U+=2){let j=r[q];if(e.charCodeAt(E)!==(j&255))break e;if(E+=1,e.charCodeAt(E)!==(j>>8&255))break e;E+=1,q+=1}if(U<I){if(e.charCodeAt(E)!==(r[q]&255))break;E+=1}w+=1+(F>>1),S=r[w];continue}let R=S>>>14,L=e.charCodeAt(E);if(R!==0){if(L===wt.SEMI){g=E-h+1,b=R===1?String.fromCharCode(S&at.VALUE_MASK):Xc(r,w,R);break}if(!t&&(S&at.FLAG13)===0)g=E-h,A=w,_=R;if(R===1)break}let T=rg(r,S,w+(R||1),L);if(T<0)break;w=T,S=r[w],E+=1}if(b===""){let R=S>>>14;if(R!==0&&!t&&(S&at.FLAG13)===0)g=E-h,A=w,_=R;if(g>0)b=Xc(r,A,_)}}else g=0,b="";if(g===0||n&&p!==wt.NUM&&e.charCodeAt(h+g-1)!==wt.SEMI&&h+g<i&&ng(e.charCodeAt(h+g)))s=h;else{if(o<s)a+=e.slice(o,s);a+=b,s=o=h+g}if(e.charCodeAt(s)!==wt.AMP)s=e.indexOf("&",s)}while(s>=0);return a+e.slice(o)}function go(e){return ig(e,!0,!1)}var ru;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(ru||(ru={}));var su;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(su||(su={}));var ag=class{src_Any=Ka.source;src_Cc=Va.source;src_Z=Za.source;src_P=ei.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,n=4){let r=this.escapeRE(e),s=this.escapeRE(t),i=`(?:(?!${this.src_ZCc}|${r}|${s}).)`,o=`${r}${i}{0,1000}${s}`;for(let a=2;a<=n;a++)o=`${r}(?:${i}|${o}){0,1000}${s}`;return o}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){let t=`(?:(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:[0-9A-Fa-f]{1,4}:){6}${t}|::(?:[0-9A-Fa-f]{1,4}:){5}${t}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::${t}|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;let e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map((e)=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},el={validate:(e,t,n)=>{let r=n.re.get_http_validator();r.lastIndex=t;let s=r.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)},lg={"http:":el,"https:":el,"ftp:":el,"//":{validate:function(e,t,n){let r=n.re.get_relative_proto_validator();r.lastIndex=t;let s=r.exec(e);if(s){if(t>=3&&e[t-3]===":")return 0;if(t>=3&&e[t-3]==="/")return 0;return s[0].length}return 0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){let r=n.re.get_mailto_validator();r.lastIndex=t;let s=r.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)}},cg="a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",ug="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function dg(){let e=ug.split("|");return cg.split("|").forEach((t)=>{let n=t.indexOf(":"),r=t.slice(0,n);for(let s of t.slice(n+1))e.push(r+s)}),e}var fg={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:dg(),urlAuth:!1,maxLength:1e4},iu=class{schema;index;lastIndex;raw;text;url;constructor(e,t,n,r){let s=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=s,this.text=s,this.url=s}},ou=class{__opts__;__schemas__;re;constructor(e={}){let{rebuilder:t,...n}=e;this.__opts__={...fg,...n},this.__schemas__={...lg},this.re=t||new ag,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{let n={normalize:(r,s)=>s.normalize(r),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;n=this.re.get_schema_search(),n.lastIndex=0;while((t=n.exec(e))!==null)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]){if(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null)return!0}if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]){if(e.indexOf("@")>=0){let r=this.re.get_fuzzy_mail_host_search(),s=this.re.get_mail_name_validator();r.lastIndex=0;while((t=r.exec(e))!==null){let i=e.slice(Math.max(0,t.index-65),t.index);if(s.test(i))return!0}}}return!1}testSchemaAt(e,t,n){if(!this.__schemas__[t.toLowerCase()])return 0;return this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this)}match(e){let t=[],n=this.re.get_schema_search(),r,s,i,o,a,l,u=!1,d=!1,h=!1,p=0;if(!e.length)return null;if(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"])r=this.re.get_fuzzy_link_search(),r.lastIndex=0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"])s=this.re.get_fuzzy_mail_host_search(),s.lastIndex=0,i=this.re.get_mail_name_validator();for(;;){let g=Math.max(p-1,0);if(s&&i&&!h&&(!a||a.index<p)){if(s.lastIndex<g)s.lastIndex=g;for(;;){let _=s.exec(e);if(!_){h=!0,a=void 0;break}let S=i.exec(e.slice(Math.max(0,_.index-65),_.index));if(!S)continue;if(a={schema:"mailto:",index:_.index-S[1].length,lastIndex:_.index+_[0].length},a.index>=p)break;if(s.lastIndex<g)s.lastIndex=g}}if(r&&!d&&(!o||o.index<p)){if(r.lastIndex<g)r.lastIndex=g;for(;;){let _=r.exec(e);if(!_){d=!0,o=void 0;break}if(o={schema:"",index:_.index+_[1].length,lastIndex:_.index+_[0].length},o.index>=p)break;if(r.lastIndex<g)r.lastIndex=g}}let b=a;if(!b||o&&(o.index<b.index||o.index===b.index&&o.lastIndex>b.lastIndex))b=o;let k;if(!u)for(;;){if(!l){if(n.lastIndex<g)n.lastIndex=g;let E=n.exec(e);if(!E){u=!0;break}l={schema:E[2],index:E.index+E[1].length,lastIndex:E.index+E[0].length}}if(l.index<p){l=void 0;continue}if(b&&l.index>b.index)break;let _=l;l=void 0;let S=this.testSchemaAt(e,_.schema,_.lastIndex);if(S){k={schema:_.schema,index:_.index,lastIndex:_.lastIndex+S};break}}let w=k;if(!w||a&&(a.index<w.index||a.index===w.index&&a.lastIndex>w.lastIndex))w=a;if(!w||o&&(o.index<w.index||o.index===w.index&&o.lastIndex>w.lastIndex))w=o;if(!w)break;if(w===a)a=void 0;else if(w===o)o=void 0;let A=new iu(e,w.schema,w.index,w.lastIndex);if(A.schema)this.__schemas__[A.schema].normalize(A,this);else this.normalize(A);t.push(A),p=w.lastIndex}if(t.length)return t;return null}matchAtStart(e){if(!e.length)return null;let t=this.re.get_schema_at_start().exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;let r=new iu(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[r.schema].normalize(r,this),r}tlds(e,t=!1){if(e=Array.isArray(e)?e:[e],!t)this.__opts__.tlds=e;else this.__opts__.tlds=this.__opts__.tlds.concat(e);return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){if(!e.schema)e.url=`http://${e.url}`;if(e.schema==="mailto:"&&!/^mailto:/i.test(e.url))e.url=`mailto:${e.url}`}};var hg=/^xn--/,mg=/[^\0-\x7F]/,pg=/[\x2E\u3002\uFF0E\uFF61]/g,gg={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var wn=Math.floor,tl=String.fromCharCode;function dr(e){throw RangeError(gg[e])}function bg(e,t){let n=[],r=e.length;while(r--)n[r]=t(e[r]);return n}function lu(e,t){let n=e.split("@"),r="";if(n.length>1)r=n[0]+"@",e=n[1];e=e.replace(pg,".");let s=e.split("."),i=bg(s,t).join(".");return r+i}function cu(e){let t=[],n=0,r=e.length;while(n<r){let s=e.charCodeAt(n++);if(s>=55296&&s<=56319&&n<r){let i=e.charCodeAt(n++);if((i&64512)==56320)t.push(((s&1023)<<10)+(i&1023)+65536);else t.push(s),n--}else t.push(s)}return t}var vg=(e)=>String.fromCodePoint(...e),yg=function(e){if(e>=48&&e<58)return 26+(e-48);if(e>=65&&e<91)return e-65;if(e>=97&&e<123)return e-97;return 36},au=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},uu=function(e,t,n){let r=0;e=n?wn(e/700):e>>1,e+=wn(e/t);for(;e>455;r+=36)e=wn(e/35);return wn(r+36*e/(e+38))},du=function(e){let t=[],n=e.length,r=0,s=128,i=72,o=e.lastIndexOf("-");if(o<0)o=0;for(let a=0;a<o;++a){if(e.charCodeAt(a)>=128)dr("not-basic");t.push(e.charCodeAt(a))}for(let a=o>0?o+1:0;a<n;){let l=r;for(let d=1,h=36;;h+=36){if(a>=n)dr("invalid-input");let p=yg(e.charCodeAt(a++));if(p>=36)dr("invalid-input");if(p>wn((2147483647-r)/d))dr("overflow");r+=p*d;let g=h<=i?1:h>=i+26?26:h-i;if(p<g)break;let b=36-g;if(d>wn(2147483647/b))dr("overflow");d*=b}let u=t.length+1;if(i=uu(r-l,u,l==0),wn(r/u)>2147483647-s)dr("overflow");s+=wn(r/u),r%=u,t.splice(r++,0,s)}return String.fromCodePoint(...t)},fu=function(e){let t=[];e=cu(e);let n=e.length,r=128,s=0,i=72;for(let l of e)if(l<128)t.push(tl(l));let o=t.length,a=o;if(o)t.push("-");while(a<n){let l=2147483647;for(let d of e)if(d>=r&&d<l)l=d;let u=a+1;if(l-r>wn((2147483647-s)/u))dr("overflow");s+=(l-r)*u,r=l;for(let d of e){if(d<r&&++s>2147483647)dr("overflow");if(d===r){let h=s;for(let p=36;;p+=36){let g=p<=i?1:p>=i+26?26:p-i;if(h<g)break;let b=h-g,k=36-g;t.push(tl(au(g+b%k,0))),h=wn(b/k)}t.push(tl(au(h,0))),i=uu(s,u,a===o),s=0,++a}}++s,++r}return t.join("")},kg=function(e){return lu(e,function(t){return hg.test(t)?du(t.slice(4).toLowerCase()):t})},wg=function(e){return lu(e,function(t){return mg.test(t)?"xn--"+fu(t):t})},xg={version:"2.3.1",ucs2:{decode:cu,encode:vg},decode:du,encode:fu,toASCII:wg,toUnicode:kg};var nl=xg;/*! markdown-it 15.0.3 https://github.com/markdown-it/markdown-it @license MIT */var hu=Object.defineProperty,Cu=(e,t)=>{let n={};for(var r in e)hu(n,r,{get:e[r],enumerable:!0});if(!t)hu(n,Symbol.toStringTag,{value:"Module"});return n},Eg=Cu({arrayReplaceAt:()=>Ag,asciiTrim:()=>wo,callable:()=>Su,escapeHtml:()=>fr,escapeRE:()=>Ng,fromCodePoint:()=>ni,isMdAsciiPunct:()=>ii,isPunctChar:()=>Tu,isPunctCharCode:()=>si,isSpace:()=>Je,isValidEntityCode:()=>ll,isWhiteSpace:()=>ri,lib:()=>Bg,normalizeReference:()=>ko,unescapeAll:()=>ps,unescapeMd:()=>Tg});function Su(e){let t=function(...n){return Reflect.construct(e,n,new.target&&new.target!==t?new.target:e)};return Object.defineProperty(t,"name",{value:e.name}),Object.setPrototypeOf(t,e),t.prototype=e.prototype,t}function Ag(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function ll(e){if(e>=55296&&e<=57343)return!1;if(e>=64976&&e<=65007)return!1;if((e&65535)===65535||(e&65535)===65534)return!1;if(e>=0&&e<=8)return!1;if(e===11)return!1;if(e>=14&&e<=31)return!1;if(e>=127&&e<=159)return!1;if(e>1114111)return!1;return!0}function ni(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var _u=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Cg=new RegExp(`${_u.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),Sg=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function _g(e,t){if(t.charCodeAt(0)===35&&Sg.test(t)){let r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);if(ll(r))return ni(r);return e}let n=go(e);if(n!==e)return n;return e}function Tg(e){if(e.indexOf("\\")<0)return e;return e.replace(_u,"$1")}function ps(e){if(e.indexOf("\\")<0&&e.indexOf("&")<0)return e;return e.replace(Cg,function(t,n,r){if(n)return n;return _g(t,r)})}var Rg=/[&<>"]/,Mg=/[&<>"]/g,Dg={"&":"&","<":"<",">":">",'"':"""};function Lg(e){return Dg[e]}function fr(e){if(Rg.test(e))return e.replace(Mg,Lg);return e}var Ig=/[.?*+^$[\]\\(){}|-]/g;function Ng(e){return e.replace(Ig,"\\$&")}function Je(e){switch(e){case 9:case 32:return!0}return!1}function ri(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Tu(e){return ei.test(e)||Ja.test(e)}function si(e){return Tu(ni(e))}function ii(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function ko(e){return e=e.trim().replace(/\s+/g," "),e.toLowerCase().toUpperCase()}function mu(e){return e===32||e===9||e===10||e===13}function wo(e){let t=0;for(;t<e.length;t++)if(!mu(e.charCodeAt(t)))break;let n=e.length-1;for(;n>=t;n--)if(!mu(e.charCodeAt(n)))break;return e.slice(t,n+1)}var Bg={mdurl:Ga,ucmicro:Ya};function Og(e,t,n){let r,s,i,o,{posMax:a,pos:l}=e;e.pos=t+1,r=1;while(e.pos<a){if(i=e.src.charCodeAt(e.pos),i===93){if(r--,r===0){s=!0;break}}if(o=e.pos,e.md.inline.skipToken(e),i===91){if(o===e.pos-1)r++;else if(n)return e.pos=l,-1}}let u=-1;if(s)u=e.pos;return e.pos=l,u}function $g(e,t,n){let r,s=t,i={ok:!1,pos:0,str:""};if(e.charCodeAt(s)===60){s++;while(s<n){if(r=e.charCodeAt(s),r===10)return i;if(r===60)return i;if(r===62)return i.pos=s+1,i.str=ps(e.slice(t+1,s)),i.ok=!0,i;if(r===92&&s+1<n){s+=2;continue}s++}return i}let o=0;while(s<n){if(r=e.charCodeAt(s),r===32)break;if(r<32||r===127)break;if(r===92&&s+1<n){if(e.charCodeAt(s+1)===32){s++;continue}s+=2;continue}if(r===40){if(o++,o>32)return i}if(r===41){if(o===0)break;o--}s++}if(t===s)return i;if(o!==0)return i;return i.str=ps(e.slice(t,s)),i.pos=s,i.ok=!0,i}function Fg(e,t,n,r){let s,i=t,o={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(i>=n)return o;let a=e.charCodeAt(i);if(a!==34&&a!==39&&a!==40)return o;if(t++,i++,a===40)a=41;o.marker=a}while(i<n){if(s=e.charCodeAt(i),s===o.marker)return o.pos=i+1,o.str+=ps(e.slice(t,i)),o.ok=!0,o;else if(s===40&&o.marker===41)return o;else if(s===92&&i+1<n)i++;i++}return o.can_continue=!0,o.str+=ps(e.slice(t,i)),o}var zg=Cu({parseLinkDestination:()=>$g,parseLinkLabel:()=>Og,parseLinkTitle:()=>Fg});function oi(e){return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oi(e)}function qg(e,t){if(oi(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(oi(r)!="object")return r;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hg(e){var t=qg(e,"string");return oi(t)=="symbol"?t:t+""}function ye(e,t,n){return(t=Hg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Or=class{constructor(e,t,n){ye(this,"map",null),ye(this,"level",0),ye(this,"children",null),ye(this,"content",""),ye(this,"markup",""),ye(this,"info",""),ye(this,"block",!1),ye(this,"hidden",!1),this.type=e,this.tag=t,this.attrs=null,this.nesting=n,this.meta=null}attrIndex(e){if(!this.attrs)return-1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1}attrPush(e){if(this.attrs)this.attrs.push(e);else this.attrs=[e]}attrSet(e,t){let n=this.attrIndex(e),r=[e,t];if(n<0)this.attrPush(r);else this.attrs[n]=r}attrGet(e){let t=this.attrIndex(e),n=null;if(t>=0)n=this.attrs[t][1];return n}attrJoin(e,t){let n=this.attrIndex(e);if(n<0)this.attrPush([e,t]);else this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},ai=class{constructor(){ye(this,"__rules__",[]),ye(this,"__cache__",null)}__find__(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1}__compile__(){let e=new Set;this.__rules__.forEach((t)=>{if(!t.enabled)return;t.alt.forEach((n)=>{if(n)e.add(n)})}),this.__cache__=Object.create(null),this.__cache__[""]=[],this.__rules__.forEach((t)=>{if(t.enabled)this.__cache__[""].push(t.fn)}),e.forEach((t)=>{this.__cache__[t]=[],this.__rules__.forEach((n)=>{if(n.enabled&&n.alt.indexOf(t)>=0)this.__cache__[t].push(n.fn)})})}at(e,t,n={}){let r=this.__find__(e);if(r===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__[r].fn=t,this.__rules__[r].alt=n.alt||[],this.__cache__=null}before(e,t,n,r={}){let s=this.__find__(e);if(s===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(s,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null}after(e,t,n,r={}){let s=this.__find__(e);if(s===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null}push(e,t,n={}){this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null}enable(e,t=!1){if(!Array.isArray(e))e=[e];let n=[];return e.forEach((r)=>{let s=this.__find__(r);if(s<0){if(t)return;throw Error(`Rules manager: invalid rule name ${r}`)}this.__rules__[s].enabled=!0,n.push(r)}),this.__cache__=null,n}enableOnly(e,t=!1){if(!Array.isArray(e))e=[e];this.__rules__.forEach((n)=>{n.enabled=!1}),this.enable(e,t)}disable(e,t=!1){if(!Array.isArray(e))e=[e];let n=[];return e.forEach((r)=>{let s=this.__find__(r);if(s<0){if(t)return;throw Error(`Rules manager: invalid rule name ${r}`)}this.__rules__[s].enabled=!1,n.push(r)}),this.__cache__=null,n}getRules(e){if(!this.__cache__)this.__compile__();return this.__cache__[e]||[]}},xn={};xn.code_inline=function(e,t,n,r,s){let i=e[t];return`<code${s.renderAttrs(i)}>${fr(i.content)}</code>`};xn.code_block=function(e,t,n,r,s){let i=e[t];return`<pre${s.renderAttrs(i)}><code>${fr(e[t].content)}</code></pre>
|
|
5
|
+
`};xn.fence=function(e,t,n,r,s){let i=e[t],o=i.info?ps(i.info).trim():"",a="",l="";if(o){let d=o.split(/(\s+)/g);a=d[0],l=d.slice(2).join("")}let u;if(n.highlight)u=n.highlight(i.content,a,l)||fr(i.content);else u=fr(i.content);if(u.indexOf("<pre")===0)return u+`
|
|
6
6
|
`;if(o){let d=i.attrIndex("class"),h=i.attrs?i.attrs.slice():[];if(d<0)h.push(["class",`${n.langPrefix}${a}`]);else h[d]=[h[d][0],h[d][1]],h[d][1]+=` ${n.langPrefix}${a}`;let p={attrs:h};return`<pre><code${s.renderAttrs(p)}>${u}</code></pre>
|
|
7
7
|
`}return`<pre><code${s.renderAttrs(i)}>${u}</code></pre>
|
|
8
|
-
`};
|
|
8
|
+
`};xn.image=function(e,t,n,r,s){let i=e[t];return i.attrs[i.attrIndex("alt")][1]=s.renderInlineAsText(i.children,n,r),s.renderToken(e,t,n)};xn.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
|
|
9
9
|
`:`<br>
|
|
10
|
-
`};
|
|
10
|
+
`};xn.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
|
|
11
11
|
`:`<br>
|
|
12
12
|
`:`
|
|
13
|
-
`};
|
|
13
|
+
`};xn.text=function(e,t){return fr(e[t].content)};xn.html_block=function(e,t){return e[t].content};xn.html_inline=function(e,t){return e[t].content};var Ru=class{constructor(){ye(this,"rules",Object.assign({},xn))}renderAttrs(e){let t,n,r;if(!e.attrs)return"";r="";for(t=0,n=e.attrs.length;t<n;t++)r+=` ${fr(e.attrs[t][0])}="${fr(String(e.attrs[t][1]))}"`;return r}renderToken(e,t,n){let r=e[t],s="";if(r.hidden)return"";let i=t-1;while(i>=0&&e[i].hidden&&e[i].nesting===0)i--;if(r.block&&r.nesting!==-1&&i>=0&&e[i].hidden&&e[i].nesting===-1)s+=`
|
|
14
14
|
`;if(s+=(r.nesting===-1?"</":"<")+r.tag,s+=this.renderAttrs(r),r.nesting===0&&n.xhtmlOut)s+=" /";let o=!1;if(r.block){if(o=!0,r.nesting===1){let a=t+1;while(a<e.length&&e[a].hidden&&e[a].nesting===0)a++;if(a<e.length){let l=e[a];if(l.type==="inline"||l.hidden)o=!1;else if(l.nesting===-1&&l.tag===r.tag)o=!1}}}return s+=o?`>
|
|
15
15
|
`:">",s}renderInline(e,t,n){let r="",s=this.rules;for(let i=0,o=e.length;i<o;i++){let a=e[i].type;if(typeof s[a]<"u")r+=s[a](e,i,t,n,this);else r+=this.renderToken(e,i,t)}return r}renderInlineAsText(e,t,n){let r="";for(let s=0,i=e.length;s<i;s++)switch(e[s].type){case"text":case"code_inline":r+=e[s].content;break;case"image":r+=this.renderInlineAsText(e[s].children,t,n);break;case"html_inline":case"html_block":r+=e[s].content;break;case"softbreak":case"hardbreak":r+=`
|
|
16
|
-
`}return r}render(e,t,n){let r="",s=this.rules;for(let i=0,o=e.length;i<o;i++){let a=e[i].type;if(a==="inline")r+=this.renderInline(e[i].children,t,n);else if(typeof s[a]<"u")r+=s[a](e,i,t,n,this);else r+=this.renderToken(e,i,t)}return r}},
|
|
17
|
-
`),t=t.replace(Z1,"�"),e.src=t}function X1(e){let t;if(e.inlineMode)t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t);else e.md.block.parse(e.src,e.md,e.env,e.tokens)}function Q1(e){let t=e.tokens,n=0;for(let r=0;r<t.length;r++){if(t[r].type==="reference_definition")continue;if(r!==n)t[n]=t[r];n++}if(t.length!==n)t.length=n}function eg(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let s=t[n];if(s.type==="inline")e.md.inline.parse(s.content,e.md,e.env,s.children)}}function tg(e){return/^<a[>\s]/i.test(e)}function ng(e){return/^<\/a\s*>/i.test(e)}function rg(e){let t=e.tokens;if(!e.md.options.linkify)return;for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.test(t[n].content))continue;let s=t[n].children,i=[],o=0;for(let a=s.length-1;a>=0;a--){let l=s[a];if(l.type==="link_close"){a--;while(s[a].level!==l.level&&s[a].type!=="link_open")a--;continue}if(l.type==="html_inline"){if(tg(l.content)&&o>0)o--;if(ng(l.content))o++}if(o>0)continue;if(l.type==="text"&&e.md.linkify.test(l.content)){let u=l.content,d=e.md.linkify.match(u),h=[],p=l.level,g=0;if(d.length>0&&d[0].index===0&&a>0&&s[a-1].type==="text_special")d=d.slice(1);for(let b=0;b<d.length;b++){let x=d[b].url,k=e.md.normalizeLink(x);if(!e.md.validateLink(k))continue;let E=d[b].text;if(!d[b].schema)E=e.md.normalizeLinkText(`http://${E}`).replace(/^http:\/\//,"");else if(d[b].schema==="mailto:"&&!/^mailto:/i.test(E))E=e.md.normalizeLinkText(`mailto:${E}`).replace(/^mailto:/,"");else E=e.md.normalizeLinkText(E);let T=d[b].index;if(T>g){let R=new e.Token("text","",0);R.content=u.slice(g,T),R.level=p,h.push(R)}let _=new e.Token("link_open","a",1);_.attrs=[["href",k]],_.level=p++,_.markup="linkify",_.info="auto",h.push(_);let A=new e.Token("text","",0);A.content=E,A.level=p,h.push(A);let D=new e.Token("link_close","a",-1);D.level=--p,D.markup="linkify",D.info="auto",h.push(D),g=d[b].lastIndex}if(g<u.length){let b=new e.Token("text","",0);b.content=u.slice(g),b.level=p,h.push(b)}i.push({index:a,nodes:h})}}if(i.length>0){let a=s.length;for(let h of i)a+=h.nodes.length-1;let l=Array(a),u=0,d=0;i.reverse();for(let h=0;h<s.length;h++){let p=i[u];if((p===null||p===void 0?void 0:p.index)===h){for(let g of p.nodes)l[d++]=g;u++}else l[d++]=s[h]}t[n].children=l}}}var iu=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,sg=/\((c|tm|r)\)/i,ig=/\((c|tm|r)\)/gi,og={c:"©",r:"®",tm:"™"};function ag(e,t){return og[t.toLowerCase()]}function lg(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type==="text"&&!t)r.content=r.content.replace(ig,ag);if(r.type==="link_open"&&r.info==="auto")t--;if(r.type==="link_close"&&r.info==="auto")t++}}function cg(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type==="text"&&!t){if(iu.test(r.content))r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")}if(r.type==="link_open"&&r.info==="auto")t--;if(r.type==="link_close"&&r.info==="auto")t++}}function ug(e){let t;if(!e.md.options.typographer)return;for(t=e.tokens.length-1;t>=0;t--){if(e.tokens[t].type!=="inline")continue;if(sg.test(e.tokens[t].content))lg(e.tokens[t].children);if(iu.test(e.tokens[t].content))cg(e.tokens[t].children)}}var dg=/['"]/,Uc=/['"]/g,Wc="’",fg=1000;function jc(e,t,n){while(e.length>n){let r=e.pop();if(r.isSingleQuote)t.single=r.prevSameQuoteIdx;else t.double=r.prevSameQuoteIdx}}function to(e,t,n,r){if(!e[t])e[t]=[];e[t].push({pos:n,ch:r})}function hg(e,t){let n="",r=0;t.sort((s,i)=>s.pos-i.pos);for(let s=0;s<t.length;s++){let i=t[s];n+=e.slice(r,i.pos)+i.ch,r=i.pos+1}return n+e.slice(r)}function mg(e,t){let n,r=[],s={single:-1,double:-1},i={};for(let o=0;o<e.length;o++){let a=e[o],l=e[o].level;for(n=r.length-1;n>=0;n--)if(r[n].level<=l)break;if(jc(r,s,n+1),a.type!=="text")continue;let u=a.content,d=0,h=u.length;e:while(d<h){Uc.lastIndex=d;let p=Uc.exec(u);if(!p)break;let g=!0,b=!0;d=p.index+1;let x=p[0]==="'",k=32;if(p.index-1>=0)k=u.charCodeAt(p.index-1);else for(n=o-1;n>=0;n--){if(e[n].type==="softbreak"||e[n].type==="hardbreak")break;if(!e[n].content)continue;k=e[n].content.charCodeAt(e[n].content.length-1);break}let E=32;if(d<h)E=u.charCodeAt(d);else for(n=o+1;n<e.length;n++){if(e[n].type==="softbreak"||e[n].type==="hardbreak")break;if(!e[n].content)continue;E=e[n].content.charCodeAt(0);break}let T=Js(k)||Vs(k),_=Js(E)||Vs(E),A=Ks(k),D=Ks(E);if(D)g=!1;else if(_){if(!(A||T))g=!1}if(A)b=!1;else if(T){if(!(D||_))b=!1}if(E===34&&p[0]==='"'){if(k>=48&&k<=57)b=g=!1}if(g&&b)g=T,b=_;if(!g&&!b){if(x)to(i,o,p.index,Wc);continue}if(b){if(n=x?s.single:s.double,n>=0&&r[n].level===l){let R=r[n],L,B;if(x)L=t.md.options.quotes[2],B=t.md.options.quotes[3];else L=t.md.options.quotes[0],B=t.md.options.quotes[1];to(i,o,p.index,B),to(i,R.tokenIdx,R.contentPos,L),jc(r,s,n);continue e}}if(g){if(r.length>=fg)return;if(r.push({tokenIdx:o,contentPos:p.index,isSingleQuote:x,level:l,prevSameQuoteIdx:x?s.single:s.double}),x)s.single=r.length-1;else s.double=r.length-1}else if(b&&x)to(i,o,p.index,Wc)}}Object.keys(i).forEach(function(o){let a=Number(o);e[a].content=hg(e[a].content,i[o])})}function pg(e){if(!e.md.options.typographer)return;for(let t=e.tokens.length-1;t>=0;t--){if(e.tokens[t].type!=="inline"||!dg.test(e.tokens[t].content))continue;mg(e.tokens[t].children,e)}}function gg(e){let t,n,r=e.length;for(t=0;t<r;t++)if(e[t].type==="text_special")e[t].type="text";for(t=n=0;t<r;t++)if(e[t].type==="text"&&t+1<r&&e[t+1].type==="text")e[t+1].content=e[t].content+e[t+1].content;else{if(t!==n)e[n]=e[t];n++}if(t!==n)e.length=n}function bg(e){let t,n,r=e.tokens,s=r.length;for(let i=0;i<s;i++){if(r[i].type!=="inline")continue;let o=r[i].children,a=o.length;for(t=0;t<a;t++){if(o[t].type==="text_special")o[t].type="text";if(o[t].children)gg(o[t].children)}for(t=n=0;t<a;t++)if(o[t].type==="text"&&t+1<a&&o[t+1].type==="text")o[t+1].content=o[t].content+o[t+1].content;else{if(t!==n)o[n]=o[t];n++}if(t!==n)o.length=n}}var $a=[["normalize",Y1],["block",X1],["strip_references",Q1],["inline",eg],["linkify",rg],["replacements",ug],["smartquotes",pg],["text_join",bg]],ou=class{constructor(){ye(this,"ruler",new Ys),ye(this,"State",su);for(let e=0;e<$a.length;e++)this.ruler.push($a[e][0],$a[e][1])}process(e){let t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)}},au=class{constructor(e,t,n,r){ye(this,"bMarks",[]),ye(this,"eMarks",[]),ye(this,"tShift",[]),ye(this,"sCount",[]),ye(this,"bsCount",[]),ye(this,"blkIndent",0),ye(this,"line",0),ye(this,"lineMax",0),ye(this,"tight",!1),ye(this,"listIndent",-1),ye(this,"parentType","root"),ye(this,"level",0),ye(this,"Token",Lr),this.src=e,this.md=t,this.env=n,this.tokens=r;let s=this.src;for(let i=0,o=0,a=0,l=0,u=s.length,d=!1;o<u;o++){let h=s.charCodeAt(o);if(!d)if(Je(h)){if(a++,h===9)l+=4-l%4;else l++;continue}else d=!0;if(h===10||o===u-1){if(h!==10)o++;this.bMarks.push(i),this.eMarks.push(o),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),d=!1,a=0,l=0,i=o+1}}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){let r=new Lr(e,t,n);if(r.block=!0,n<0)this.level--;if(r.level=this.level,n>0)this.level++;return this.tokens.push(r),r}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){for(let t=this.lineMax;e<t;e++)if(this.bMarks[e]+this.tShift[e]<this.eMarks[e])break;return e}skipSpaces(e){for(let t=this.src.length;e<t;e++)if(!Je(this.src.charCodeAt(e)))break;return e}skipSpacesBack(e,t){if(e<=t)return e;while(e>t)if(!Je(this.src.charCodeAt(--e)))return e+1;return e}skipChars(e,t){for(let n=this.src.length;e<n;e++)if(this.src.charCodeAt(e)!==t)break;return e}skipCharsBack(e,t,n){if(e<=n)return e;while(e>n)if(t!==this.src.charCodeAt(--e))return e+1;return e}getLines(e,t,n,r){if(e>=t)return"";let s=Array(t-e);for(let i=0,o=e;o<t;o++,i++){let a=0,l=this.bMarks[o],u=l,d;if(o+1<t||r)d=this.eMarks[o]+1;else d=this.eMarks[o];while(u<d&&a<n){let h=this.src.charCodeAt(u);if(Je(h))if(h===9)a+=4-(a+this.bsCount[o])%4;else a++;else if(u-l<this.tShift[o])a++;else break;u++}if(a>n)s[i]=Array(a-n+1).join(" ")+this.src.slice(u,d);else s[i]=this.src.slice(u,d)}return s.join("")}},vg=65536;function za(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Gc(e){let t=[],n=e.length,r=0,s=e.charCodeAt(r),i=!1,o=0,a="";while(r<n){if(s===124)if(!i)t.push(a+e.substring(o,r)),a="",o=r+1;else a+=e.substring(o,r-1),o=r;i=s===92,r++,s=e.charCodeAt(r)}return t.push(a+e.substring(o)),t}function yg(e,t,n,r){if(t+2>n)return!1;let s=t+1;if(e.sCount[s]<e.blkIndent)return!1;if(e.sCount[s]-e.blkIndent>=4)return!1;let i=e.bMarks[s]+e.tShift[s];if(i>=e.eMarks[s])return!1;let o=e.src.charCodeAt(i++);if(o!==124&&o!==45&&o!==58)return!1;if(i>=e.eMarks[s])return!1;let a=e.src.charCodeAt(i++);if(a!==124&&a!==45&&a!==58&&!Je(a))return!1;if(o===45&&Je(a))return!1;while(i<e.eMarks[s]){let A=e.src.charCodeAt(i);if(A!==124&&A!==45&&A!==58&&!Je(A))return!1;i++}let l=za(e,t+1),u=l.split("|"),d=[];for(let A=0;A<u.length;A++){let D=u[A].trim();if(!D)if(A===0||A===u.length-1)continue;else return!1;if(!/^:?-+:?$/.test(D))return!1;if(D.charCodeAt(D.length-1)===58)d.push(D.charCodeAt(0)===58?"center":"right");else if(D.charCodeAt(0)===58)d.push("left");else d.push("")}if(l=za(e,t).trim(),l.indexOf("|")===-1)return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(u=Gc(l),u.length&&u[0]==="")u.shift();if(u.length&&u[u.length-1]==="")u.pop();let h=u.length;if(h===0||h!==d.length)return!1;if(r)return!0;let p=e.parentType;e.parentType="table";let g=e.md.block.ruler.getRules("blockquote"),b=e.push("table_open","table",1),x=[t,0];b.map=x;let k=e.push("thead_open","thead",1);k.map=[t,t+1];let E=e.push("tr_open","tr",1);E.map=[t,t+1];for(let A=0;A<u.length;A++){let D=e.push("th_open","th",1);if(d[A])D.attrs=[["style",`text-align:${d[A]}`]];let R=e.push("inline","",0);R.content=u[A].trim(),R.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let T,_=0;for(s=t+2;s<n;s++){if(e.sCount[s]<e.blkIndent)break;let A=!1;for(let R=0,L=g.length;R<L;R++)if(g[R](e,s,n,!0)){A=!0;break}if(A)break;if(l=za(e,s).trim(),!l)break;if(e.sCount[s]-e.blkIndent>=4)break;if(u=Gc(l),u.length&&u[0]==="")u.shift();if(u.length&&u[u.length-1]==="")u.pop();if(_+=h-u.length,_>vg)break;if(s===t+2){let R=e.push("tbody_open","tbody",1);R.map=T=[t+2,0]}let D=e.push("tr_open","tr",1);D.map=[s,s+1];for(let R=0;R<h;R++){let L=e.push("td_open","td",1);if(d[R])L.attrs=[["style",`text-align:${d[R]}`]];let B=e.push("inline","",0);B.content=u[R]?u[R].trim():"",B.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}if(T)e.push("tbody_close","tbody",-1),T[1]=s;return e.push("table_close","table",-1),x[1]=s,e.parentType=p,e.line=s,!0}function kg(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,s=r;while(r<n){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,s=r;continue}break}e.line=s;let i=e.push("code_block","code",0);return i.content=e.getLines(t,s,4+e.blkIndent,!1)+`
|
|
18
|
-
`,i.map=[t,e.line],!0}function wg(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(s+3>i)return!1;let o=e.src.charCodeAt(s);if(o!==126&&o!==96)return!1;let a=s;s=e.skipChars(s,o);let l=s-a;if(l<3)return!1;let u=e.src.slice(a,s),d=e.src.slice(s,i);if(o===96){if(d.indexOf(String.fromCharCode(o))>=0)return!1}if(r)return!0;let h=t,p=!1;for(;;){if(h++,h>=n)break;if(s=a=e.bMarks[h]+e.tShift[h],i=e.eMarks[h],s<i&&e.sCount[h]<e.blkIndent)break;if(e.src.charCodeAt(s)!==o)continue;if(e.sCount[h]-e.blkIndent>=4)continue;if(s=e.skipChars(s,o),s-a<l)continue;if(s=e.skipSpaces(s),s<i)continue;p=!0;break}l=e.sCount[t],e.line=h+(p?1:0);let g=e.push("fence","code",0);return g.info=d,g.content=e.getLines(t+1,h,l,!0),g.markup=u,g.map=[t,e.line],!0}function xg(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.src.charCodeAt(s)!==62)return!1;if(r)return!0;let a=[],l=[],u=[],d=[],h=e.md.block.ruler.getRules("blockquote"),p=e.parentType;e.parentType="blockquote";let g=!1,b;for(b=t;b<n;b++){let _=e.sCount[b]<e.blkIndent;if(s=e.bMarks[b]+e.tShift[b],i=e.eMarks[b],s>=i)break;if(e.src.charCodeAt(s++)===62&&!_){let D=e.sCount[b]+1,R,L;if(e.src.charCodeAt(s)===32)s++,D++,L=!1,R=!0;else if(e.src.charCodeAt(s)===9)if(R=!0,(e.bsCount[b]+D)%4===3)s++,D++,L=!1;else L=!0;else R=!1;let B=D;a.push(e.bMarks[b]),e.bMarks[b]=s;while(s<i){let O=e.src.charCodeAt(s);if(Je(O))if(O===9)B+=4-(B+e.bsCount[b]+(L?1:0))%4;else B++;else break;s++}g=s>=i,l.push(e.bsCount[b]),e.bsCount[b]=e.sCount[b]+1+(R?1:0),u.push(e.sCount[b]),e.sCount[b]=B-D,d.push(e.tShift[b]),e.tShift[b]=s-e.bMarks[b];continue}if(g)break;let A=!1;for(let D=0,R=h.length;D<R;D++)if(h[D](e,b,n,!0)){A=!0;break}if(A){if(e.lineMax=b,e.blkIndent!==0)a.push(e.bMarks[b]),l.push(e.bsCount[b]),d.push(e.tShift[b]),u.push(e.sCount[b]),e.sCount[b]-=e.blkIndent;break}a.push(e.bMarks[b]),l.push(e.bsCount[b]),d.push(e.tShift[b]),u.push(e.sCount[b]),e.sCount[b]=-1}let x=e.blkIndent;e.blkIndent=0;let k=e.push("blockquote_open","blockquote",1);k.markup=">";let E=[t,0];k.map=E,e.md.block.tokenize(e,t,b);let T=e.push("blockquote_close","blockquote",-1);T.markup=">",e.lineMax=o,e.parentType=p,E[1]=e.line;for(let _=0;_<d.length;_++)e.bMarks[_+t]=a[_],e.tShift[_+t]=d[_],e.sCount[_+t]=u[_],e.bsCount[_+t]=l[_];return e.blkIndent=x,!0}function Eg(e,t,n,r){let s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(i++);if(o!==42&&o!==45&&o!==95)return!1;let a=1;while(i<s){let u=e.src.charCodeAt(i++);if(u!==o&&!Je(u))return!1;if(u===o)a++}if(a<3)return!1;if(r)return!0;e.line=t+1;let l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(a+1).join(String.fromCharCode(o)),!0}function Kc(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(r++);if(s!==42&&s!==45&&s!==43)return-1;if(r<n){if(!Je(e.src.charCodeAt(r)))return-1}return r}function Vc(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],s=n;if(s+1>=r)return-1;let i=e.src.charCodeAt(s++);if(i<48||i>57)return-1;for(;;){if(s>=r)return-1;if(i=e.src.charCodeAt(s++),i>=48&&i<=57){if(s-n>=10)return-1;continue}if(i===41||i===46)break;return-1}if(s<r){if(i=e.src.charCodeAt(s),!Je(i))return-1}return s}function Ag(e,t){let n=e.level+2;for(let r=t+2,s=e.tokens.length-2;r<s;r++)if(e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open")e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2}function Cg(e,t,n,r){let s,i,o,a,l=t,u=!0;if(e.sCount[l]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let d=!1;if(r&&e.parentType==="paragraph"){if(e.sCount[l]>=e.blkIndent)d=!0}let h,p,g;if((g=Vc(e,l))>=0){if(h=!0,o=e.bMarks[l]+e.tShift[l],p=Number(e.src.slice(o,g-1)),d&&p!==1)return!1}else if((g=Kc(e,l))>=0)h=!1;else return!1;if(d){if(e.skipSpaces(g)>=e.eMarks[l])return!1}if(r)return!0;let b=e.src.charCodeAt(g-1),x=e.tokens.length;if(h){if(a=e.push("ordered_list_open","ol",1),p!==1)a.attrs=[["start",p]]}else a=e.push("bullet_list_open","ul",1);let k=[l,0];a.map=k,a.markup=String.fromCharCode(b);let E=!1,T=e.md.block.ruler.getRules("list"),_=e.parentType;e.parentType="list";while(l<n){i=g,s=e.eMarks[l];let A=e.sCount[l]+g-(e.bMarks[l]+e.tShift[l]),D=A;while(i<s){let ae=e.src.charCodeAt(i);if(ae===9)D+=4-(D+e.bsCount[l])%4;else if(ae===32)D++;else break;i++}let R=i,L;if(R>=s)L=1;else L=D-A;if(L>4)L=1;let B=A+L;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(b);let O=[l,0];if(a.map=O,h)a.info=e.src.slice(o,g-1);let H=e.tight,K=e.tShift[l],G=e.sCount[l],de=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=B,e.tight=!0,e.tShift[l]=R-e.bMarks[l],e.sCount[l]=D,R>=s&&e.isEmpty(l+1))e.line=Math.min(e.line+2,n);else e.md.block.tokenize(e,l,n);if(!e.tight||E)u=!1;if(E=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=de,e.tShift[l]=K,e.sCount[l]=G,e.tight=H,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(b),l=e.line,O[1]=l,l>=n)break;if(e.sCount[l]<e.blkIndent)break;if(e.sCount[l]-e.blkIndent>=4)break;let ne=!1;for(let ae=0,z=T.length;ae<z;ae++)if(T[ae](e,l,n,!0)){ne=!0;break}if(ne)break;if(h){if(g=Vc(e,l),g<0)break;o=e.bMarks[l]+e.tShift[l]}else if(g=Kc(e,l),g<0)break;if(b!==e.src.charCodeAt(g-1))break}if(h)a=e.push("ordered_list_close","ol",-1);else a=e.push("bullet_list_close","ul",-1);if(a.markup=String.fromCharCode(b),k[1]=l,e.line=l,e.parentType=_,u)Ag(e,x);return!0}var Fa=999;function _g(e){let t=e.length;for(let n=0;n<e.length-1;n++){let r=e.charCodeAt(n);if(r<55296||r>56319)continue;let s=e.charCodeAt(n+1);if(s>=56320&&s<=57343)t--,n++}return t}function js(e,t){return Math.min(e.eMarks[t]+1,e.src.length)}function no(e,t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return-1;let r=!1;if(e.sCount[t]-e.blkIndent>3)r=!0;if(e.sCount[t]<0)r=!0;if(!r){let s=e.md.block.ruler.getRules("reference"),i=e.parentType;e.parentType="reference";let o=!1;for(let a=0,l=s.length;a<l;a++)if(s[a](e,t,n,!0)){o=!0;break}if(e.parentType=i,o)return-1}return e.bMarks[t]+e.tShift[t]}function Sg(e,t,n,r){let s=e.src,i=e.bMarks[t]+e.tShift[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(s.charCodeAt(i)!==91)return!1;let a=js(e,t),l="",u=-1,d=++i;while(i<a){if(l.length+i-d>Fa*2)return!1;let R=s.charCodeAt(i);if(R===91)return!1;if(R===93){u=i;break}if(R===92)R=s.charCodeAt(++i);if(R===10&&i<a){let L=no(e,o);if(L<0)return!1;l+=s.slice(d,a),i=d=L,a=js(e,o++);continue}i++}if(u<0||s.charCodeAt(u+1)!==58)return!1;if(l+=s.slice(d,u),l.length>Fa&&_g(l)>Fa)return!1;i=u+2;while(i<a){let R=s.charCodeAt(i);if(R===10){let L=no(e,o);if(L<0)break;i=L,a=js(e,o++)}else if(Je(R))i++;else break}let h=e.md.helpers.parseLinkDestination(s,i,a);if(!h.ok)return!1;let p=e.md.normalizeLink(h.str);if(!e.md.validateLink(p))return!1;i=h.pos;let g=i,b=a,x=o;while(i<a){let R=s.charCodeAt(i);if(R===10){let L=no(e,o);if(L<0)break;i=L,a=js(e,o++)}else if(Je(R))i++;else break}let k=i,E=e.md.helpers.parseLinkTitle(s,i,a);while(E.can_continue){let R=no(e,o);if(R<0)break;i=R,a=js(e,o++),E=e.md.helpers.parseLinkTitle(s,i,a,E)}let T;if(k!==g&&E.ok)T=E.str,i=E.pos;else T="",i=g,a=b,o=x;while(i<a){if(!Je(s.charCodeAt(i)))break;i++}if(i<a&&s.charCodeAt(i)!==10){if(T){T="",i=g,a=b,o=x;while(i<a){if(!Je(s.charCodeAt(i)))break;i++}}}if(i<a&&s.charCodeAt(i)!==10)return!1;let _=so(l);if(!_)return!1;if(r)return!0;if(typeof e.env.references>"u")e.env.references={};if(typeof e.env.references[_]>"u")e.env.references[_]={title:T,href:p};let A=e.push("reference_definition","",0);A.map=[t,o],A.hidden=!0;let D=Object.create(null);return D.label=_,A.meta=D,e.line=o,!0}var Tg=["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"],lu=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,cu="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>";new RegExp(`^(?:${lu}|${cu}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`);var uu=new RegExp(`^(?:${lu}|${cu})`),Dr=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp(`^</?(${Tg.join("|")})(?=(\\s|/?>|$))`,"i"),/^$/,!0],[new RegExp(`${uu.source}\\s*$`),/^$/,!1]];function Rg(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(e.src.charCodeAt(s)!==60)return!1;let o=e.src.slice(s,i),a=0;for(;a<Dr.length;a++)if(Dr[a][0].test(o))break;if(a===Dr.length)return!1;if(r)return Dr[a][2];let l=t+1,u=Dr[a][1].test("");if(!Dr[a][1].test(o))for(;l<n;l++){if(e.sCount[l]<e.blkIndent){if(u||!e.isEmpty(l))break}if(s=e.bMarks[l]+e.tShift[l],i=e.eMarks[l],o=e.src.slice(s,i),Dr[a][1].test(o)){if(o.length!==0)l++;break}}e.line=l;let d=e.push("html_block","",0);return d.map=[t,l],d.content=e.getLines(t,l,e.blkIndent,!0),!0}function Mg(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(s);if(o!==35||s>=i)return!1;let a=1;o=e.src.charCodeAt(++s);while(o===35&&s<i&&a<=6)a++,o=e.src.charCodeAt(++s);if(a>6||s<i&&!Je(o))return!1;if(r)return!0;i=e.skipSpacesBack(i,s);let l=e.skipCharsBack(i,35,s);if(l>s&&Je(e.src.charCodeAt(l-1)))i=l;e.line=t+1;let u=e.push("heading_open",`h${a}`,1);u.markup="########".slice(0,a),u.map=[t,e.line];let d=e.push("inline","",0);d.content=io(e.src.slice(s,i)),d.map=[t,e.line],d.children=[];let h=e.push("heading_close",`h${a}`,-1);return h.markup="########".slice(0,a),!0}function Dg(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.parentType;e.parentType="paragraph";let i=0,o,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let g=e.bMarks[a]+e.tShift[a],b=e.eMarks[a];if(g<b){if(o=e.src.charCodeAt(g),o===45||o===61){if(g=e.skipChars(g,o),g=e.skipSpaces(g),g>=b){i=o===61?1:2;break}}}}if(e.sCount[a]<0)continue;let p=!1;for(let g=0,b=r.length;g<b;g++)if(r[g](e,a,n,!0)){p=!0;break}if(p)break}if(!i)return e.parentType=s,!1;let l=io(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;let u=e.push("heading_open",`h${i}`,1);u.markup=String.fromCharCode(o),u.map=[t,e.line];let d=e.push("inline","",0);d.content=l,d.map=[t,e.line-1],d.children=[];let h=e.push("heading_close",`h${i}`,-1);return h.markup=String.fromCharCode(o),e.parentType=s,!0}function Lg(e,t,n){let r=e.md.block.ruler.getRules("paragraph"),s=e.parentType,i=t+1;e.parentType="paragraph";for(;i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3)continue;if(e.sCount[i]<0)continue;let u=!1;for(let d=0,h=r.length;d<h;d++)if(r[d](e,i,n,!0)){u=!0;break}if(u)break}let o=io(e.getLines(t,i,e.blkIndent,!1));e.line=i;let a=e.push("paragraph_open","p",1);a.map=[t,e.line];let l=e.push("inline","",0);return l.content=o,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}var ro=[["table",yg,["paragraph","reference"]],["code",kg],["fence",wg,["paragraph","reference","blockquote","list"]],["blockquote",xg,["paragraph","reference","blockquote","list"]],["hr",Eg,["paragraph","reference","blockquote","list"]],["list",Cg,["paragraph","reference","blockquote"]],["reference",Sg],["html_block",Rg,["paragraph","reference","blockquote"]],["heading",Mg,["paragraph","reference","blockquote"]],["lheading",Dg],["paragraph",Lg]],du=class{constructor(){ye(this,"ruler",new Ys),ye(this,"State",au);for(let e=0;e<ro.length;e++)this.ruler.push(ro[e][0],ro[e][1],{alt:(ro[e][2]||[]).slice()})}tokenize(e,t,n){let r=this.ruler.getRules(""),s=r.length,i=e.md.options.maxNesting,o=t,a=!1;while(o<n){if(e.line=o=e.skipEmptyLines(o),o>=n)break;if(e.sCount[o]<e.blkIndent)break;if(e.level>=i){e.line=n;break}let l=e.line,u=!1;for(let d=0;d<s;d++)if(u=r[d](e,o,n,!1),u){if(l>=e.line)throw Error("block rule didn't increment state.line");break}if(!u)throw Error("none of the block rules matched");if(e.tight=!a,e.isEmpty(e.line-1))a=!0;if(o=e.line,o<n&&e.isEmpty(o))a=!0,o++,e.line=o}}parse(e,t,n,r){if(!e)return;let s=new this.State(e,t,n,r);this.tokenize(s,s.line,s.lineMax)}},fu=class{constructor(e,t,n,r){ye(this,"pos",0),ye(this,"level",0),ye(this,"pending",""),ye(this,"pendingLevel",0),ye(this,"cache",{}),ye(this,"backticks",{}),ye(this,"backticksScanned",!1),ye(this,"skipHtmlSpecial",!1),ye(this,"linkLevel",0),ye(this,"delimiters",[]),ye(this,"_prev_delimiters",[]),ye(this,"Token",Lr),this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.posMax=this.src.length}pushPending(){let e=new Lr("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}push(e,t,n){if(this.pending)this.pushPending();let r=new Lr(e,t,n),s=void 0;if(n<0)this.level--,this.delimiters=this._prev_delimiters.pop();if(r.level=this.level,n>0)this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters};return this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(s),r}scanDelims(e,t){let n=this.posMax,r=this.src.charCodeAt(e),s;if(e===0)s=32;else if(e===1){if(s=this.src.charCodeAt(0),(s&63488)===55296)s=65533}else if(s=this.src.charCodeAt(e-1),(s&64512)===56320){let b=this.src.charCodeAt(e-2);s=(b&64512)===55296?65536+(b-55296<<10)+(s-56320):65533}else if((s&64512)===55296)s=65533;let i=e;while(i<n&&this.src.charCodeAt(i)===r)i++;let o=i-e,a=i<n?this.src.charCodeAt(i):32;if((a&64512)===55296){let b=this.src.charCodeAt(i+1);a=(b&64512)===56320?65536+(a-55296<<10)+(b-56320):65533}else if((a&64512)===56320)a=65533;let l=Js(s)||Vs(s),u=Js(a)||Vs(a),d=Ks(s),h=Ks(a),p=!h&&(!u||d||l),g=!d&&(!l||h||u);return{can_open:p&&(t||!g||l),can_close:g&&(t||!p||u),length:o}}};function Ig(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Ng(e,t){let n=e.pos;while(n<e.posMax&&!Ig(e.src.charCodeAt(n)))n++;if(n===e.pos)return!1;if(!t)e.pending+=e.src.slice(e.pos,n);return e.pos=n,!0}function Bg(e){return e>=65&&e<=90||e>=97&&e<=122}function Og(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===45||e===46}function $g(e,t){if(!e.md.options.linkify)return!1;if(e.linkLevel>0)return!1;let{pos:n,posMax:r}=e;if(n+3>r)return!1;if(e.src.charCodeAt(n)!==58)return!1;if(e.src.charCodeAt(n+1)!==47)return!1;if(e.src.charCodeAt(n+2)!==47)return!1;let s=n-Math.min(10,e.pending.length,n),i=n;while(i>s&&Og(e.src.charCodeAt(i-1)))i--;if(i===n||!Bg(e.src.charCodeAt(i)))return!1;let o=n-i,a=e.md.linkify.matchAtStart(e.src.slice(i));if(!a)return!1;let l=a.url;if(l.length<=o)return!1;let u=l.length;while(u>0&&l.charCodeAt(u-1)===42)u--;if(u!==l.length)l=l.slice(0,u);let d=e.md.normalizeLink(l);if(!e.md.validateLink(d))return!1;if(!t){e.pending=e.pending.slice(0,-o);let h=e.push("link_open","a",1);h.attrs=[["href",d]],h.markup="linkify",h.info="auto";let p=e.push("text","",0);p.content=e.md.normalizeLinkText(l);let g=e.push("link_close","a",-1);g.markup="linkify",g.info="auto"}return e.pos+=l.length-o,!0}function zg(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,s=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;while(i>=1&&e.pending.charCodeAt(i-1)===32)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);n++;while(n<s&&Je(e.src.charCodeAt(n)))n++;return e.pos=n,!0}var Ua=[];for(let e=0;e<256;e++)Ua.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Ua[e.charCodeAt(0)]=1});function Fg(e,t){let{pos:n,posMax:r}=e;if(e.src.charCodeAt(n)!==92)return!1;if(n++,n>=r)return!1;let s=e.src.charCodeAt(n);if(s===10){if(!t)e.push("hardbreak","br",0);n++;while(n<r){if(s=e.src.charCodeAt(n),!Je(s))break;n++}return e.pos=n,!0}if(s===32){if(!t){let a=e.push("text_special","",0);a.content="\\",a.markup="\\",a.info="escape"}return e.pos=n,!0}let i=e.src[n];if(s>=55296&&s<=56319&&n+1<r){let a=e.src.charCodeAt(n+1);if(a>=56320&&a<=57343)i+=e.src[n+1],n++}let o="\\"+i;if(!t){let a=e.push("text_special","",0);if(s<256&&Ua[s]!==0)a.content=i;else a.content=o;a.markup=o,a.info="escape"}return e.pos=n+1,!0}function qg(e){let t={},n=0;while((n=e.indexOf("`",n))!==-1){let r=n;while(e.charCodeAt(++n)===96);t[n-r]=r}return t}function Hg(e,t){var n;let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;let s=e.posMax,i=r+1;while(i<s&&e.src.charCodeAt(i)===96)i++;let o=e.src.slice(r,i),a=o.length;if(!e.backticksScanned)e.backticks=qg(e.src),e.backticksScanned=!0;if(((n=e.backticks[a])!==null&&n!==void 0?n:-1)>=i){let l=i,u;while((u=e.src.indexOf("`",l))!==-1&&u<s){l=u+1;while(e.src.charCodeAt(l)===96)l++;if(l>s)break;if(l-u===a){if(!t){let d=e.push("code_inline","code",0);d.markup=o;let h=e.src.slice(i,u).replace(/\n/g," ");if(h.startsWith(" ")&&h.endsWith(" ")&&/[^ ]/.test(h))h=h.slice(1,-1);d.content=h}return e.pos=l,!0}}}if(!t)e.pending+=o;return e.pos=i,!0}function Pg(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(r!==126)return!1;let s=e.scanDelims(e.pos,!0),i=s.length,o=String.fromCharCode(r);if(i<2)return!1;let a;if(i%2)a=e.push("text","",0),a.content=o,i--;for(let l=0;l<i;l+=2)a=e.push("text","",0),a.content=o+o,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0}function Jc(e,t){let n,r=[],s=t.length;for(let i=0;i<s;i++){let o=t[i];if(o.marker!==126)continue;if(o.end===-1)continue;let a=t[o.end];if(n=e.tokens[o.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~")r.push(a.token-1)}while(r.length){let i=r.pop(),o=i+1;while(o<e.tokens.length&&e.tokens[o].type==="s_close")o++;if(o--,i!==o)n=e.tokens[o],e.tokens[o]=e.tokens[i],e.tokens[i]=n}}function Ug(e){let t=e.tokens_meta,n=e.tokens_meta.length;Jc(e,e.delimiters);for(let s=0;s<n;s++){var r;let i=(r=t[s])===null||r===void 0?void 0:r.delimiters;if(i)Jc(e,i)}}var hu={tokenize:Pg,postProcess:Ug};function Wg(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(r!==95&&r!==42)return!1;let s=e.scanDelims(e.pos,r===42);for(let i=0;i<s.length;i++){let o=e.push("text","",0);o.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:s.length,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close})}return e.pos+=s.length,!0}function Zc(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let s=t[r];if(s.marker!==95&&s.marker!==42)continue;if(s.end===-1)continue;let i=t[s.end],o=r>0&&t[r-1].end===s.end+1&&t[r-1].marker===s.marker&&t[r-1].token===s.token-1&&t[s.end+1].token===i.token+1,a=String.fromCharCode(s.marker),l=e.tokens[s.token];l.type=o?"strong_open":"em_open",l.tag=o?"strong":"em",l.nesting=1,l.markup=o?a+a:a,l.content="";let u=e.tokens[i.token];if(u.type=o?"strong_close":"em_close",u.tag=o?"strong":"em",u.nesting=-1,u.markup=o?a+a:a,u.content="",o)e.tokens[t[r-1].token].content="",e.tokens[t[s.end+1].token].content="",r--}}function jg(e){let t=e.tokens_meta,n=e.tokens_meta.length;Zc(e,e.delimiters);for(let s=0;s<n;s++){var r;let i=(r=t[s])===null||r===void 0?void 0:r.delimiters;if(i)Zc(e,i)}}var mu={tokenize:Wg,postProcess:jg};function Gg(e,t){let n,r,s,i,o="",a="",l=e.pos,u=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let{pos:d,posMax:h}=e,p=e.pos+1,g=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(g<0)return!1;let b=g+1;if(b<h&&e.src.charCodeAt(b)===40){u=!1,b++;for(;b<h;b++)if(n=e.src.charCodeAt(b),!Je(n)&&n!==10)break;if(b>=h)return!1;if(l=b,s=e.md.helpers.parseLinkDestination(e.src,b,e.posMax),s.ok){if(o=e.md.normalizeLink(s.str),e.md.validateLink(o))b=s.pos;else o="";l=b;for(;b<h;b++)if(n=e.src.charCodeAt(b),!Je(n)&&n!==10)break;if(s=e.md.helpers.parseLinkTitle(e.src,b,e.posMax),b<h&&l!==b&&s.ok){a=s.str,b=s.pos;for(;b<h;b++)if(n=e.src.charCodeAt(b),!Je(n)&&n!==10)break}}if(b>=h||e.src.charCodeAt(b)!==41)u=!0;b++}if(u){if(typeof e.env.references>"u")return!1;if(b<h&&e.src.charCodeAt(b)===91)if(l=b+1,b=e.md.helpers.parseLinkLabel(e,b),b>=0)r=e.src.slice(l,b++);else b=g+1;else b=g+1;if(!r)r=e.src.slice(p,g);if(r=so(r),i=e.env.references[r],!i)return e.pos=d,!1;o=i.href,a=i.title}if(!t){e.pos=p,e.posMax=g;let x=e.push("link_open","a",1),k=[["href",o]];if(x.attrs=k,a)k.push(["title",a]);if(r){let E=Object.create(null);E.label=r,x.meta=E}e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=b,e.posMax=h,!0}function Kg(e,t){let n,r,s,i,o,a,l,u,d="",{pos:h,posMax:p}=e;if(e.src.charCodeAt(e.pos)!==33)return!1;if(e.src.charCodeAt(e.pos+1)!==91)return!1;let g=e.pos+2,b=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(b<0)return!1;if(i=b+1,i<p&&e.src.charCodeAt(i)===40){i++;for(;i<p;i++)if(n=e.src.charCodeAt(i),!Je(n)&&n!==10)break;if(i>=p)return!1;if(u=i,a=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),a.ok)if(d=e.md.normalizeLink(a.str),e.md.validateLink(d))i=a.pos;else d="";u=i;for(;i<p;i++)if(n=e.src.charCodeAt(i),!Je(n)&&n!==10)break;if(a=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<p&&u!==i&&a.ok){l=a.str,i=a.pos;for(;i<p;i++)if(n=e.src.charCodeAt(i),!Je(n)&&n!==10)break}else l="";if(i>=p||e.src.charCodeAt(i)!==41)return e.pos=h,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<p&&e.src.charCodeAt(i)===91)if(u=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0)s=e.src.slice(u,i++);else i=b+1;else i=b+1;if(!s)s=e.src.slice(g,b);if(s=so(s),o=e.env.references[s],!o)return e.pos=h,!1;d=o.href,l=o.title}if(!t){r=e.src.slice(g,b);let x=[];e.md.inline.parse(r,e.md,e.env,x);let k=e.push("image","img",0),E=[["src",d],["alt",""]];if(k.attrs=E,k.children=x,k.content=r,l)E.push(["title",l]);if(s){let T=Object.create(null);T.label=s,k.meta=T}}return e.pos=i,e.posMax=p,!0}var Vg=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Jg=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Zg(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let{pos:r,posMax:s}=e;for(;;){if(++n>=s)return!1;let o=e.src.charCodeAt(n);if(o===60)return!1;if(o===62)break}let i=e.src.slice(r+1,n);if(Jg.test(i)){let o=e.md.normalizeLink(i);if(!e.md.validateLink(o))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}if(Vg.test(i)){let o=e.md.normalizeLink(`mailto:${i}`);if(!e.md.validateLink(o))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}return!1}function Yg(e){return/^<a[>\s]/i.test(e)}function Xg(e){return/^<\/a\s*>/i.test(e)}function pu(e){let t=e|32;return t>=97&&t<=122}function Qg(e,t){let n=e.src,r,s;if(n.startsWith("<!--",t)){if(n.startsWith(">",t+4))return t+5;if(n.startsWith("->",t+4))return t+6;r=t+4,s="-->"}else if(n.startsWith("<![CDATA[",t))r=t+9,s="]]>";else if(n.charCodeAt(t+1)===63)r=t+2,s="?>";else if(pu(n.charCodeAt(t+2)))r=t+3,s=">";else return-1;if(e.skipHtmlSpecial)return-1;let i=n.indexOf(s,r);if(i<0)return e.skipHtmlSpecial=!0,-1;return i+s.length}function e4(e,t){if(!e.md.options.html)return!1;let{posMax:n,pos:r}=e;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let s,i=e.src.charCodeAt(r+1);if(i===33||i===63)s=Qg(e,r);else if(i===47||pu(i)){let o=e.src.slice(r).match(uu);s=o?r+o[0].length:-1}else return!1;if(s<0)return!1;if(!t){let o=e.push("html_inline","",0);if(o.content=e.src.slice(r,s),Yg(o.content))e.linkLevel++;if(Xg(o.content))e.linkLevel--}return e.pos=s,!0}var t4=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,n4=/^&([a-z][a-z0-9]{1,31});/i;function r4(e,t){let{pos:n,posMax:r}=e;if(e.src.charCodeAt(n)!==38)return!1;if(n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let s=e.src.slice(n).match(t4);if(s){if(!t){let i=s[1][0].toLowerCase()==="x"?parseInt(s[1].slice(1),16):parseInt(s[1],10),o=e.push("text_special","",0);o.content=Pa(i)?Gs(i):Gs(65533),o.markup=s[0],o.info="entity"}return e.pos+=s[0].length,!0}}else{let s=e.src.slice(n).match(n4);if(s){let i=eo(s[0]);if(i!==s[0]){if(!t){let o=e.push("text_special","",0);o.content=i,o.markup=s[0],o.info="entity"}return e.pos+=s[0].length,!0}}}return!1}function Yc(e){let t={},n=e.length;if(!n)return;let r=0,s=-2,i=[];for(let o=0;o<n;o++){let a=e[o];if(i.push(0),e[r].marker!==a.marker||s!==a.token-1)r=o;if(s=a.token,a.length=a.length||0,!a.close)continue;if(!t.hasOwnProperty(a.marker))t[a.marker]=[-1,-1,-1,-1,-1,-1];let l=t[a.marker][(a.open?3:0)+a.length%3],u=r-i[r]-1,d=u;for(;u>l;u-=i[u]+1){let h=e[u];if(h.marker!==a.marker)continue;if(h.open&&h.end<0){let p=!1;if(h.close||a.open){if((h.length+a.length)%3===0){if(h.length%3!==0||a.length%3!==0)p=!0}}if(!p){let g=u>0&&!e[u-1].open?i[u-1]+1:0;i[o]=o-u+g,i[u]=g,a.open=!1,h.end=o,h.close=!1,d=-1,s=-2;break}}}if(d!==-1)t[a.marker][(a.open?3:0)+(a.length||0)%3]=d}}function s4(e){let t=e.tokens_meta,n=e.tokens_meta.length;Yc(e.delimiters);for(let s=0;s<n;s++){var r;let i=(r=t[s])===null||r===void 0?void 0:r.delimiters;if(i)Yc(i)}}function i4(e){let t,n,r=0,s=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++){if(s[t].nesting<0)r--;if(s[t].level=r,s[t].nesting>0)r++;if(s[t].type==="text"&&t+1<i&&s[t+1].type==="text")s[t+1].content=s[t].content+s[t+1].content;else{if(t!==n)s[n]=s[t];n++}}if(t!==n)s.length=n}var qa=[["text",Ng],["linkify",$g],["newline",zg],["escape",Fg],["backticks",Hg],["strikethrough",hu.tokenize],["emphasis",mu.tokenize],["link",Gg],["image",Kg],["autolink",Zg],["html_inline",e4],["entity",r4]],Ha=[["balance_pairs",s4],["strikethrough",hu.postProcess],["emphasis",mu.postProcess],["fragments_join",i4]],gu=class{constructor(){ye(this,"ruler",new Ys),ye(this,"ruler2",new Ys),ye(this,"State",fu);for(let e=0;e<qa.length;e++)this.ruler.push(qa[e][0],qa[e][1]);for(let e=0;e<Ha.length;e++)this.ruler2.push(Ha[e][0],Ha[e][1])}skipToken(e){let t=e.pos,n=this.ruler.getRules(""),r=n.length,s=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let o=!1;if(e.level<s){for(let a=0;a<r;a++)if(e.level++,o=n[a](e,!0),e.level--,o){if(t>=e.pos)throw Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;if(!o)e.pos++;i[t]=e.pos}tokenize(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,s=e.md.options.maxNesting;while(e.pos<r){let i=e.pos,o=!1;if(e.level<s){for(let a=0;a<n;a++)if(o=t[a](e,!1),o){if(i>=e.pos)throw Error("inline rule didn't increment state.pos");break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}if(e.pending)e.pushPending()}parse(e,t,n,r){let s=new this.State(e,t,n,r);this.tokenize(s);let i=this.ruler2.getRules(""),o=i.length;for(let a=0;a<o;a++)i[a](s)}},o4={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},a4=/^(vbscript|javascript|file|data):/,l4=/^data:image\/(gif|png|jpeg|webp);/,Xc=["http:","https:","mailto:"],hn=class{validateLink(e){let t=e.trim().toLowerCase();return a4.test(t)?l4.test(t):!0}normalizeLink(e){let t=Us(e,!0);if(t.hostname){if(!t.protocol||Xc.indexOf(t.protocol)>=0)try{t.hostname=Oa.toASCII(t.hostname)}catch(n){}}if(t.auth)t.auth=or(t.auth);if(t.hostname)t.hostname=or(t.hostname);if(t.pathname)t.pathname=or(t.pathname);if(t.search)t.search=or(t.search);if(t.hash)t.hash=or(t.hash);return as(t)}normalizeLinkText(e){let t=Us(e,!0);if(t.hostname){if(!t.protocol||Xc.indexOf(t.protocol)>=0)try{t.hostname=Oa.toUnicode(t.hostname)}catch(n){}}return Ps(as(t),Ps.defaultChars+"%")}constructor(...e){ye(this,"inline",new gu),ye(this,"block",new du),ye(this,"core",new ou),ye(this,"renderer",new ru),ye(this,"linkify",new Nc),ye(this,"utils",M1),ye(this,"helpers",Object.assign({},G1));let[t,n]=e;if(typeof t==="string"){if(this.configure(t),n)this.set(n)}else this.configure("default"),this.set(t||{})}set(e){return Object.assign(this.options,e),this}configure(e){let t;if(typeof e==="string"){let s=e;if(t=o4[s],!t)throw Error(`Wrong 'markdown-it' preset "${s}", check name`)}else t=e;if(!t)throw Error("Wrong `markdown-it` preset, can't be empty");if(t.options)this.options={...t.options};let n=t.components;if(n){var r;["core","block","inline"].forEach((i)=>{var o;let a=(o=n[i])===null||o===void 0?void 0:o.rules;if(a)this[i].ruler.enableOnly(a)});let s=(r=n.inline)===null||r===void 0?void 0:r.rules2;if(s)this.inline.ruler2.enableOnly(s)}return this}enable(e,t=!1){let n=[];if(!Array.isArray(e))e=[e];["core","block","inline"].forEach((s)=>{n=n.concat(this[s].ruler.enable(e,!0))}),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter((s)=>n.indexOf(s)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to enable unknown rule(s): ${r}`);return this}disable(e,t=!1){let n=[];if(!Array.isArray(e))e=[e];["core","block","inline"].forEach((s)=>{n=n.concat(this[s].ruler.disable(e,!0))}),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter((s)=>n.indexOf(s)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to disable unknown rule(s): ${r}`);return this}use(e,...t){return e.apply(e,[this,...t]),this}parse(e,t){if(typeof e!=="string")throw Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens}render(e,t={}){return this.renderer.render(this.parse(e,t),this.options,t)}parseInline(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens}renderInline(e,t={}){return this.renderer.render(this.parseInline(e,t),this.options,t)}};ye(hn,"Token",Lr);ye(hn,"Ruler",Ys);ye(hn,"Renderer",ru);ye(hn,"ParserCore",ou);ye(hn,"StateCore",su);ye(hn,"ParserBlock",du);ye(hn,"StateBlock",au);ye(hn,"ParserInline",gu);ye(hn,"StateInline",fu);var bu=eu(hn);var Dv=String.raw`\$&`,vu=(e)=>e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'");var Nn=(e,t,n)=>(n?[e[n].ruler]:[e.core.ruler,e.block.ruler,e.inline.ruler]).some((r)=>r.__rules__.some(({name:s})=>s===t)),Lv=String.raw`\^$.*+?()[]{}|`;var c4=(e)=>{if(e.length===0)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=32||n===34||n===39||n===47||n===60||n===61||n===62)return!1}return!0},Xs=(e)=>{let t="",n=0;for(let r=0;r<e.length;r++){let s="";switch(e.charCodeAt(r)){case 34:s=""";break;case 38:s="&";break;case 60:s="<";break;case 62:s=">"}s&&(t+=e.slice(n,r)+s,n=r+1)}return n===0?e:t+e.slice(n)},oo=(e,t)=>{if(t){for(let[n,r]of Object.entries(t))if(c4(n))if(n==="class"){let s=String(r).trim();s&&e.attrJoin("class",s)}else e.attrSet(n,r)}},Wa=(e)=>(e??0)>0?`:${e}`:"",yu=(e,t)=>`${typeof e=="string"?`-${e}-`:""}${t+1}`,u4=(e,t)=>`[${e+1}${Wa(t)}]`,d4=(e,t)=>{let{id:n,subId:r}=e[t].meta;return u4(n,r)},f4=(e,t,n,r,s)=>{let{href:i,anchorId:o,anchorClass:a}=e[t].meta,l=s.rules.footnote_caption(e,t,n,r,s);return`<sup${s.renderAttrs(e[t])}><a href="${Xs(i)}">${l}</a><a class="${Xs(a)}" id="${Xs(o)}"></a></sup>`},h4=(e,t,n,r,s)=>{let{separatorClass:i,listClass:o}=e[t].meta;return`<hr class="${Xs(i)}"${n.xhtmlOut?" /":""}>
|
|
16
|
+
`}return r}render(e,t,n){let r="",s=this.rules;for(let i=0,o=e.length;i<o;i++){let a=e[i].type;if(a==="inline")r+=this.renderInline(e[i].children,t,n);else if(typeof s[a]<"u")r+=s[a](e,i,t,n,this);else r+=this.renderToken(e,i,t)}return r}},Mu=class{constructor(e,t,n){ye(this,"tokens",[]),ye(this,"inlineMode",!1),ye(this,"Token",Or),this.src=e,this.env=n,this.md=t}},Pg=/\r\n?/g,Ug=/\0/g;function Wg(e){let t;t=e.src.replace(Pg,`
|
|
17
|
+
`),t=t.replace(Ug,"�"),e.src=t}function jg(e){let t;if(e.inlineMode)t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t);else e.md.block.parse(e.src,e.md,e.env,e.tokens)}function Gg(e){let t=e.tokens,n=0;for(let r=0;r<t.length;r++){if(t[r].type==="reference_definition")continue;if(r!==n)t[n]=t[r];n++}if(t.length!==n)t.length=n}function Kg(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let s=t[n];if(s.type==="inline")e.md.inline.parse(s.content,e.md,e.env,s.children)}}function Vg(e){return/^<a[>\s]/i.test(e)}function Jg(e){return/^<\/a\s*>/i.test(e)}function Zg(e){let t=e.tokens;if(!e.md.options.linkify)return;for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.test(t[n].content))continue;let s=t[n].children,i=[],o=0;for(let a=s.length-1;a>=0;a--){let l=s[a];if(l.type==="link_close"){a--;while(s[a].level!==l.level&&s[a].type!=="link_open")a--;continue}if(l.type==="html_inline"){if(Vg(l.content)&&o>0)o--;if(Jg(l.content))o++}if(o>0)continue;if(l.type==="text"&&e.md.linkify.test(l.content)){let u=l.content,d=e.md.linkify.match(u),h=[],p=l.level,g=0;if(d.length>0&&d[0].index===0&&a>0&&s[a-1].type==="text_special")d=d.slice(1);for(let b=0;b<d.length;b++){let k=d[b].url,w=e.md.normalizeLink(k);if(!e.md.validateLink(w))continue;let A=d[b].text;if(!d[b].schema)A=e.md.normalizeLinkText(`http://${A}`).replace(/^http:\/\//,"");else if(d[b].schema==="mailto:"&&!/^mailto:/i.test(A))A=e.md.normalizeLinkText(`mailto:${A}`).replace(/^mailto:/,"");else A=e.md.normalizeLinkText(A);let _=d[b].index;if(_>g){let L=new e.Token("text","",0);L.content=u.slice(g,_),L.level=p,h.push(L)}let S=new e.Token("link_open","a",1);S.attrs=[["href",w]],S.level=p++,S.markup="linkify",S.info="auto",h.push(S);let E=new e.Token("text","",0);E.content=A,E.level=p,h.push(E);let R=new e.Token("link_close","a",-1);R.level=--p,R.markup="linkify",R.info="auto",h.push(R),g=d[b].lastIndex}if(g<u.length){let b=new e.Token("text","",0);b.content=u.slice(g),b.level=p,h.push(b)}i.push({index:a,nodes:h})}}if(i.length>0){let a=s.length;for(let h of i)a+=h.nodes.length-1;let l=Array(a),u=0,d=0;i.reverse();for(let h=0;h<s.length;h++){let p=i[u];if((p===null||p===void 0?void 0:p.index)===h){for(let g of p.nodes)l[d++]=g;u++}else l[d++]=s[h]}t[n].children=l}}}var Du=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Yg=/\((c|tm|r)\)/i,Xg=/\((c|tm|r)\)/gi,Qg={c:"©",r:"®",tm:"™"};function e4(e,t){return Qg[t.toLowerCase()]}function t4(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type==="text"&&!t)r.content=r.content.replace(Xg,e4);if(r.type==="link_open"&&r.info==="auto")t--;if(r.type==="link_close"&&r.info==="auto")t++}}function n4(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type==="text"&&!t){if(Du.test(r.content))r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")}if(r.type==="link_open"&&r.info==="auto")t--;if(r.type==="link_close"&&r.info==="auto")t++}}function r4(e){let t;if(!e.md.options.typographer)return;for(t=e.tokens.length-1;t>=0;t--){if(e.tokens[t].type!=="inline")continue;if(Yg.test(e.tokens[t].content))t4(e.tokens[t].children);if(Du.test(e.tokens[t].content))n4(e.tokens[t].children)}}var s4=/['"]/,pu=/['"]/g,gu="’",i4=1000;function bu(e,t,n){while(e.length>n){let r=e.pop();if(r.isSingleQuote)t.single=r.prevSameQuoteIdx;else t.double=r.prevSameQuoteIdx}}function bo(e,t,n,r){if(!e[t])e[t]=[];e[t].push({pos:n,ch:r})}function o4(e,t){let n="",r=0;t.sort((s,i)=>s.pos-i.pos);for(let s=0;s<t.length;s++){let i=t[s];n+=e.slice(r,i.pos)+i.ch,r=i.pos+1}return n+e.slice(r)}function a4(e,t){let n,r=[],s={single:-1,double:-1},i={};for(let o=0;o<e.length;o++){let a=e[o],l=e[o].level;for(n=r.length-1;n>=0;n--)if(r[n].level<=l)break;if(bu(r,s,n+1),a.type!=="text")continue;let u=a.content,d=0,h=u.length;e:while(d<h){pu.lastIndex=d;let p=pu.exec(u);if(!p)break;let g=!0,b=!0;d=p.index+1;let k=p[0]==="'",w=32;if(p.index-1>=0)w=u.charCodeAt(p.index-1);else for(n=o-1;n>=0;n--){if(e[n].type==="softbreak"||e[n].type==="hardbreak")break;if(!e[n].content)continue;w=e[n].content.charCodeAt(e[n].content.length-1);break}let A=32;if(d<h)A=u.charCodeAt(d);else for(n=o+1;n<e.length;n++){if(e[n].type==="softbreak"||e[n].type==="hardbreak")break;if(!e[n].content)continue;A=e[n].content.charCodeAt(0);break}let _=ii(w)||si(w),S=ii(A)||si(A),E=ri(w),R=ri(A);if(R)g=!1;else if(S){if(!(E||_))g=!1}if(E)b=!1;else if(_){if(!(R||S))b=!1}if(A===34&&p[0]==='"'){if(w>=48&&w<=57)b=g=!1}if(g&&b)g=_,b=S;if(!g&&!b){if(k)bo(i,o,p.index,gu);continue}if(b){if(n=k?s.single:s.double,n>=0&&r[n].level===l){let L=r[n],T,F;if(k)T=t.md.options.quotes[2],F=t.md.options.quotes[3];else T=t.md.options.quotes[0],F=t.md.options.quotes[1];bo(i,o,p.index,F),bo(i,L.tokenIdx,L.contentPos,T),bu(r,s,n);continue e}}if(g){if(r.length>=i4)return;if(r.push({tokenIdx:o,contentPos:p.index,isSingleQuote:k,level:l,prevSameQuoteIdx:k?s.single:s.double}),k)s.single=r.length-1;else s.double=r.length-1}else if(b&&k)bo(i,o,p.index,gu)}}Object.keys(i).forEach(function(o){let a=Number(o);e[a].content=o4(e[a].content,i[o])})}function l4(e){if(!e.md.options.typographer)return;for(let t=e.tokens.length-1;t>=0;t--){if(e.tokens[t].type!=="inline"||!s4.test(e.tokens[t].content))continue;a4(e.tokens[t].children,e)}}function c4(e){let t,n,r=e.length;for(t=0;t<r;t++)if(e[t].type==="text_special")e[t].type="text";for(t=n=0;t<r;t++)if(e[t].type==="text"&&t+1<r&&e[t+1].type==="text")e[t+1].content=e[t].content+e[t+1].content;else{if(t!==n)e[n]=e[t];n++}if(t!==n)e.length=n}function u4(e){let t,n,r=e.tokens,s=r.length;for(let i=0;i<s;i++){if(r[i].type!=="inline")continue;let o=r[i].children,a=o.length;for(t=0;t<a;t++){if(o[t].type==="text_special")o[t].type="text";if(o[t].children)c4(o[t].children)}for(t=n=0;t<a;t++)if(o[t].type==="text"&&t+1<a&&o[t+1].type==="text")o[t+1].content=o[t].content+o[t+1].content;else{if(t!==n)o[n]=o[t];n++}if(t!==n)o.length=n}}var rl=[["normalize",Wg],["block",jg],["strip_references",Gg],["inline",Kg],["linkify",Zg],["replacements",r4],["smartquotes",l4],["text_join",u4]],Lu=class{constructor(){ye(this,"ruler",new ai),ye(this,"State",Mu);for(let e=0;e<rl.length;e++)this.ruler.push(rl[e][0],rl[e][1])}process(e){let t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)}},Iu=class{constructor(e,t,n,r){ye(this,"bMarks",[]),ye(this,"eMarks",[]),ye(this,"tShift",[]),ye(this,"sCount",[]),ye(this,"bsCount",[]),ye(this,"blkIndent",0),ye(this,"line",0),ye(this,"lineMax",0),ye(this,"tight",!1),ye(this,"listIndent",-1),ye(this,"parentType","root"),ye(this,"level",0),ye(this,"Token",Or),this.src=e,this.md=t,this.env=n,this.tokens=r;let s=this.src;for(let i=0,o=0,a=0,l=0,u=s.length,d=!1;o<u;o++){let h=s.charCodeAt(o);if(!d)if(Je(h)){if(a++,h===9)l+=4-l%4;else l++;continue}else d=!0;if(h===10||o===u-1){if(h!==10)o++;this.bMarks.push(i),this.eMarks.push(o),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),d=!1,a=0,l=0,i=o+1}}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){let r=new Or(e,t,n);if(r.block=!0,n<0)this.level--;if(r.level=this.level,n>0)this.level++;return this.tokens.push(r),r}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){for(let t=this.lineMax;e<t;e++)if(this.bMarks[e]+this.tShift[e]<this.eMarks[e])break;return e}skipSpaces(e){for(let t=this.src.length;e<t;e++)if(!Je(this.src.charCodeAt(e)))break;return e}skipSpacesBack(e,t){if(e<=t)return e;while(e>t)if(!Je(this.src.charCodeAt(--e)))return e+1;return e}skipChars(e,t){for(let n=this.src.length;e<n;e++)if(this.src.charCodeAt(e)!==t)break;return e}skipCharsBack(e,t,n){if(e<=n)return e;while(e>n)if(t!==this.src.charCodeAt(--e))return e+1;return e}getLines(e,t,n,r){if(e>=t)return"";let s=Array(t-e);for(let i=0,o=e;o<t;o++,i++){let a=0,l=this.bMarks[o],u=l,d;if(o+1<t||r)d=this.eMarks[o]+1;else d=this.eMarks[o];while(u<d&&a<n){let h=this.src.charCodeAt(u);if(Je(h))if(h===9)a+=4-(a+this.bsCount[o])%4;else a++;else if(u-l<this.tShift[o])a++;else break;u++}if(a>n)s[i]=Array(a-n+1).join(" ")+this.src.slice(u,d);else s[i]=this.src.slice(u,d)}return s.join("")}},d4=65536;function sl(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function vu(e){let t=[],n=e.length,r=0,s=e.charCodeAt(r),i=!1,o=0,a="";while(r<n){if(s===124)if(!i)t.push(a+e.substring(o,r)),a="",o=r+1;else a+=e.substring(o,r-1),o=r;i=s===92,r++,s=e.charCodeAt(r)}return t.push(a+e.substring(o)),t}function f4(e,t,n,r){if(t+2>n)return!1;let s=t+1;if(e.sCount[s]<e.blkIndent)return!1;if(e.sCount[s]-e.blkIndent>=4)return!1;let i=e.bMarks[s]+e.tShift[s];if(i>=e.eMarks[s])return!1;let o=e.src.charCodeAt(i++);if(o!==124&&o!==45&&o!==58)return!1;if(i>=e.eMarks[s])return!1;let a=e.src.charCodeAt(i++);if(a!==124&&a!==45&&a!==58&&!Je(a))return!1;if(o===45&&Je(a))return!1;while(i<e.eMarks[s]){let E=e.src.charCodeAt(i);if(E!==124&&E!==45&&E!==58&&!Je(E))return!1;i++}let l=sl(e,t+1),u=l.split("|"),d=[];for(let E=0;E<u.length;E++){let R=u[E].trim();if(!R)if(E===0||E===u.length-1)continue;else return!1;if(!/^:?-+:?$/.test(R))return!1;if(R.charCodeAt(R.length-1)===58)d.push(R.charCodeAt(0)===58?"center":"right");else if(R.charCodeAt(0)===58)d.push("left");else d.push("")}if(l=sl(e,t).trim(),l.indexOf("|")===-1)return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(u=vu(l),u.length&&u[0]==="")u.shift();if(u.length&&u[u.length-1]==="")u.pop();let h=u.length;if(h===0||h!==d.length)return!1;if(r)return!0;let p=e.parentType;e.parentType="table";let g=e.md.block.ruler.getRules("blockquote"),b=e.push("table_open","table",1),k=[t,0];b.map=k;let w=e.push("thead_open","thead",1);w.map=[t,t+1];let A=e.push("tr_open","tr",1);A.map=[t,t+1];for(let E=0;E<u.length;E++){let R=e.push("th_open","th",1);if(d[E])R.attrs=[["style",`text-align:${d[E]}`]];let L=e.push("inline","",0);L.content=u[E].trim(),L.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let _,S=0;for(s=t+2;s<n;s++){if(e.sCount[s]<e.blkIndent)break;let E=!1;for(let L=0,T=g.length;L<T;L++)if(g[L](e,s,n,!0)){E=!0;break}if(E)break;if(l=sl(e,s).trim(),!l)break;if(e.sCount[s]-e.blkIndent>=4)break;if(u=vu(l),u.length&&u[0]==="")u.shift();if(u.length&&u[u.length-1]==="")u.pop();if(S+=h-u.length,S>d4)break;if(s===t+2){let L=e.push("tbody_open","tbody",1);L.map=_=[t+2,0]}let R=e.push("tr_open","tr",1);R.map=[s,s+1];for(let L=0;L<h;L++){let T=e.push("td_open","td",1);if(d[L])T.attrs=[["style",`text-align:${d[L]}`]];let F=e.push("inline","",0);F.content=u[L]?u[L].trim():"",F.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}if(_)e.push("tbody_close","tbody",-1),_[1]=s;return e.push("table_close","table",-1),k[1]=s,e.parentType=p,e.line=s,!0}function h4(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,s=r;while(r<n){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,s=r;continue}break}e.line=s;let i=e.push("code_block","code",0);return i.content=e.getLines(t,s,4+e.blkIndent,!1)+`
|
|
18
|
+
`,i.map=[t,e.line],!0}function m4(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(s+3>i)return!1;let o=e.src.charCodeAt(s);if(o!==126&&o!==96)return!1;let a=s;s=e.skipChars(s,o);let l=s-a;if(l<3)return!1;let u=e.src.slice(a,s),d=e.src.slice(s,i);if(o===96){if(d.indexOf(String.fromCharCode(o))>=0)return!1}if(r)return!0;let h=t,p=!1;for(;;){if(h++,h>=n)break;if(s=a=e.bMarks[h]+e.tShift[h],i=e.eMarks[h],s<i&&e.sCount[h]<e.blkIndent)break;if(e.src.charCodeAt(s)!==o)continue;if(e.sCount[h]-e.blkIndent>=4)continue;if(s=e.skipChars(s,o),s-a<l)continue;if(s=e.skipSpaces(s),s<i)continue;p=!0;break}l=e.sCount[t],e.line=h+(p?1:0);let g=e.push("fence","code",0);return g.info=d,g.content=e.getLines(t+1,h,l,!0),g.markup=u,g.map=[t,e.line],!0}function p4(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.src.charCodeAt(s)!==62)return!1;if(r)return!0;let a=[],l=[],u=[],d=[],h=e.md.block.ruler.getRules("blockquote"),p=e.parentType;e.parentType="blockquote";let g=!1,b;for(b=t;b<n;b++){let S=e.sCount[b]<e.blkIndent;if(s=e.bMarks[b]+e.tShift[b],i=e.eMarks[b],s>=i)break;if(e.src.charCodeAt(s++)===62&&!S){let R=e.sCount[b]+1,L,T;if(e.src.charCodeAt(s)===32)s++,R++,T=!1,L=!0;else if(e.src.charCodeAt(s)===9)if(L=!0,(e.bsCount[b]+R)%4===3)s++,R++,T=!1;else T=!0;else L=!1;let F=R;a.push(e.bMarks[b]),e.bMarks[b]=s;while(s<i){let I=e.src.charCodeAt(s);if(Je(I))if(I===9)F+=4-(F+e.bsCount[b]+(T?1:0))%4;else F++;else break;s++}g=s>=i,l.push(e.bsCount[b]),e.bsCount[b]=e.sCount[b]+1+(L?1:0),u.push(e.sCount[b]),e.sCount[b]=F-R,d.push(e.tShift[b]),e.tShift[b]=s-e.bMarks[b];continue}if(g)break;let E=!1;for(let R=0,L=h.length;R<L;R++)if(h[R](e,b,n,!0)){E=!0;break}if(E){if(e.lineMax=b,e.blkIndent!==0)a.push(e.bMarks[b]),l.push(e.bsCount[b]),d.push(e.tShift[b]),u.push(e.sCount[b]),e.sCount[b]-=e.blkIndent;break}a.push(e.bMarks[b]),l.push(e.bsCount[b]),d.push(e.tShift[b]),u.push(e.sCount[b]),e.sCount[b]=-1}let k=e.blkIndent;e.blkIndent=0;let w=e.push("blockquote_open","blockquote",1);w.markup=">";let A=[t,0];w.map=A,e.md.block.tokenize(e,t,b);let _=e.push("blockquote_close","blockquote",-1);_.markup=">",e.lineMax=o,e.parentType=p,A[1]=e.line;for(let S=0;S<d.length;S++)e.bMarks[S+t]=a[S],e.tShift[S+t]=d[S],e.sCount[S+t]=u[S],e.bsCount[S+t]=l[S];return e.blkIndent=k,!0}function g4(e,t,n,r){let s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(i++);if(o!==42&&o!==45&&o!==95)return!1;let a=1;while(i<s){let u=e.src.charCodeAt(i++);if(u!==o&&!Je(u))return!1;if(u===o)a++}if(a<3)return!1;if(r)return!0;e.line=t+1;let l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(a+1).join(String.fromCharCode(o)),!0}function yu(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(r++);if(s!==42&&s!==45&&s!==43)return-1;if(r<n){if(!Je(e.src.charCodeAt(r)))return-1}return r}function ku(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],s=n;if(s+1>=r)return-1;let i=e.src.charCodeAt(s++);if(i<48||i>57)return-1;for(;;){if(s>=r)return-1;if(i=e.src.charCodeAt(s++),i>=48&&i<=57){if(s-n>=10)return-1;continue}if(i===41||i===46)break;return-1}if(s<r){if(i=e.src.charCodeAt(s),!Je(i))return-1}return s}function b4(e,t){let n=e.level+2;for(let r=t+2,s=e.tokens.length-2;r<s;r++)if(e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open")e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2}function v4(e,t,n,r){let s,i,o,a,l=t,u=!0;if(e.sCount[l]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let d=!1;if(r&&e.parentType==="paragraph"){if(e.sCount[l]>=e.blkIndent)d=!0}let h,p,g;if((g=ku(e,l))>=0){if(h=!0,o=e.bMarks[l]+e.tShift[l],p=Number(e.src.slice(o,g-1)),d&&p!==1)return!1}else if((g=yu(e,l))>=0)h=!1;else return!1;if(d){if(e.skipSpaces(g)>=e.eMarks[l])return!1}if(r)return!0;let b=e.src.charCodeAt(g-1),k=e.tokens.length;if(h){if(a=e.push("ordered_list_open","ol",1),p!==1)a.attrs=[["start",p]]}else a=e.push("bullet_list_open","ul",1);let w=[l,0];a.map=w,a.markup=String.fromCharCode(b);let A=!1,_=e.md.block.ruler.getRules("list"),S=e.parentType;e.parentType="list";while(l<n){i=g,s=e.eMarks[l];let E=e.sCount[l]+g-(e.bMarks[l]+e.tShift[l]),R=E;while(i<s){let ne=e.src.charCodeAt(i);if(ne===9)R+=4-(R+e.bsCount[l])%4;else if(ne===32)R++;else break;i++}let L=i,T;if(L>=s)T=1;else T=R-E;if(T>4)T=1;let F=E+T;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(b);let I=[l,0];if(a.map=I,h)a.info=e.src.slice(o,g-1);let q=e.tight,U=e.tShift[l],j=e.sCount[l],J=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=F,e.tight=!0,e.tShift[l]=L-e.bMarks[l],e.sCount[l]=R,L>=s&&e.isEmpty(l+1))e.line=Math.min(e.line+2,n);else e.md.block.tokenize(e,l,n);if(!e.tight||A)u=!1;if(A=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=J,e.tShift[l]=U,e.sCount[l]=j,e.tight=q,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(b),l=e.line,I[1]=l,l>=n)break;if(e.sCount[l]<e.blkIndent)break;if(e.sCount[l]-e.blkIndent>=4)break;let re=!1;for(let ne=0,z=_.length;ne<z;ne++)if(_[ne](e,l,n,!0)){re=!0;break}if(re)break;if(h){if(g=ku(e,l),g<0)break;o=e.bMarks[l]+e.tShift[l]}else if(g=yu(e,l),g<0)break;if(b!==e.src.charCodeAt(g-1))break}if(h)a=e.push("ordered_list_close","ol",-1);else a=e.push("bullet_list_close","ul",-1);if(a.markup=String.fromCharCode(b),w[1]=l,e.line=l,e.parentType=S,u)b4(e,k);return!0}var il=999;function y4(e){let t=e.length;for(let n=0;n<e.length-1;n++){let r=e.charCodeAt(n);if(r<55296||r>56319)continue;let s=e.charCodeAt(n+1);if(s>=56320&&s<=57343)t--,n++}return t}function ti(e,t){return Math.min(e.eMarks[t]+1,e.src.length)}function vo(e,t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return-1;let r=!1;if(e.sCount[t]-e.blkIndent>3)r=!0;if(e.sCount[t]<0)r=!0;if(!r){let s=e.md.block.ruler.getRules("reference"),i=e.parentType;e.parentType="reference";let o=!1;for(let a=0,l=s.length;a<l;a++)if(s[a](e,t,n,!0)){o=!0;break}if(e.parentType=i,o)return-1}return e.bMarks[t]+e.tShift[t]}function k4(e,t,n,r){let s=e.src,i=e.bMarks[t]+e.tShift[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(s.charCodeAt(i)!==91)return!1;let a=ti(e,t),l="",u=-1,d=++i;while(i<a){if(l.length+i-d>il*2)return!1;let L=s.charCodeAt(i);if(L===91)return!1;if(L===93){u=i;break}if(L===92)L=s.charCodeAt(++i);if(L===10&&i<a){let T=vo(e,o);if(T<0)return!1;l+=s.slice(d,a),i=d=T,a=ti(e,o++);continue}i++}if(u<0||s.charCodeAt(u+1)!==58)return!1;if(l+=s.slice(d,u),l.length>il&&y4(l)>il)return!1;i=u+2;while(i<a){let L=s.charCodeAt(i);if(L===10){let T=vo(e,o);if(T<0)break;i=T,a=ti(e,o++)}else if(Je(L))i++;else break}let h=e.md.helpers.parseLinkDestination(s,i,a);if(!h.ok)return!1;let p=e.md.normalizeLink(h.str);if(!e.md.validateLink(p))return!1;i=h.pos;let g=i,b=a,k=o;while(i<a){let L=s.charCodeAt(i);if(L===10){let T=vo(e,o);if(T<0)break;i=T,a=ti(e,o++)}else if(Je(L))i++;else break}let w=i,A=e.md.helpers.parseLinkTitle(s,i,a);while(A.can_continue){let L=vo(e,o);if(L<0)break;i=L,a=ti(e,o++),A=e.md.helpers.parseLinkTitle(s,i,a,A)}let _;if(w!==g&&A.ok)_=A.str,i=A.pos;else _="",i=g,a=b,o=k;while(i<a){if(!Je(s.charCodeAt(i)))break;i++}if(i<a&&s.charCodeAt(i)!==10){if(_){_="",i=g,a=b,o=k;while(i<a){if(!Je(s.charCodeAt(i)))break;i++}}}if(i<a&&s.charCodeAt(i)!==10)return!1;let S=ko(l);if(!S)return!1;if(r)return!0;if(typeof e.env.references>"u")e.env.references={};if(typeof e.env.references[S]>"u")e.env.references[S]={title:_,href:p};let E=e.push("reference_definition","",0);E.map=[t,o],E.hidden=!0;let R=Object.create(null);return R.label=S,E.meta=R,e.line=o,!0}var w4=["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"],Nu=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,Bu="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>";new RegExp(`^(?:${Nu}|${Bu}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`);var Ou=new RegExp(`^(?:${Nu}|${Bu})`),Br=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp(`^</?(${w4.join("|")})(?=(\\s|/?>|$))`,"i"),/^$/,!0],[new RegExp(`${Ou.source}\\s*$`),/^$/,!1]];function x4(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(e.src.charCodeAt(s)!==60)return!1;let o=e.src.slice(s,i),a=0;for(;a<Br.length;a++)if(Br[a][0].test(o))break;if(a===Br.length)return!1;if(r)return Br[a][2];let l=t+1,u=Br[a][1].test("");if(!Br[a][1].test(o))for(;l<n;l++){if(e.sCount[l]<e.blkIndent){if(u||!e.isEmpty(l))break}if(s=e.bMarks[l]+e.tShift[l],i=e.eMarks[l],o=e.src.slice(s,i),Br[a][1].test(o)){if(o.length!==0)l++;break}}e.line=l;let d=e.push("html_block","",0);return d.map=[t,l],d.content=e.getLines(t,l,e.blkIndent,!0),!0}function E4(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(s);if(o!==35||s>=i)return!1;let a=1;o=e.src.charCodeAt(++s);while(o===35&&s<i&&a<=6)a++,o=e.src.charCodeAt(++s);if(a>6||s<i&&!Je(o))return!1;if(r)return!0;i=e.skipSpacesBack(i,s);let l=e.skipCharsBack(i,35,s);if(l>s&&Je(e.src.charCodeAt(l-1)))i=l;e.line=t+1;let u=e.push("heading_open",`h${a}`,1);u.markup="########".slice(0,a),u.map=[t,e.line];let d=e.push("inline","",0);d.content=wo(e.src.slice(s,i)),d.map=[t,e.line],d.children=[];let h=e.push("heading_close",`h${a}`,-1);return h.markup="########".slice(0,a),!0}function A4(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.parentType;e.parentType="paragraph";let i=0,o,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let g=e.bMarks[a]+e.tShift[a],b=e.eMarks[a];if(g<b){if(o=e.src.charCodeAt(g),o===45||o===61){if(g=e.skipChars(g,o),g=e.skipSpaces(g),g>=b){i=o===61?1:2;break}}}}if(e.sCount[a]<0)continue;let p=!1;for(let g=0,b=r.length;g<b;g++)if(r[g](e,a,n,!0)){p=!0;break}if(p)break}if(!i)return e.parentType=s,!1;let l=wo(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;let u=e.push("heading_open",`h${i}`,1);u.markup=String.fromCharCode(o),u.map=[t,e.line];let d=e.push("inline","",0);d.content=l,d.map=[t,e.line-1],d.children=[];let h=e.push("heading_close",`h${i}`,-1);return h.markup=String.fromCharCode(o),e.parentType=s,!0}function C4(e,t,n){let r=e.md.block.ruler.getRules("paragraph"),s=e.parentType,i=t+1;e.parentType="paragraph";for(;i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3)continue;if(e.sCount[i]<0)continue;let u=!1;for(let d=0,h=r.length;d<h;d++)if(r[d](e,i,n,!0)){u=!0;break}if(u)break}let o=wo(e.getLines(t,i,e.blkIndent,!1));e.line=i;let a=e.push("paragraph_open","p",1);a.map=[t,e.line];let l=e.push("inline","",0);return l.content=o,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}var yo=[["table",f4,["paragraph","reference"]],["code",h4],["fence",m4,["paragraph","reference","blockquote","list"]],["blockquote",p4,["paragraph","reference","blockquote","list"]],["hr",g4,["paragraph","reference","blockquote","list"]],["list",v4,["paragraph","reference","blockquote"]],["reference",k4],["html_block",x4,["paragraph","reference","blockquote"]],["heading",E4,["paragraph","reference","blockquote"]],["lheading",A4],["paragraph",C4]],$u=class{constructor(){ye(this,"ruler",new ai),ye(this,"State",Iu);for(let e=0;e<yo.length;e++)this.ruler.push(yo[e][0],yo[e][1],{alt:(yo[e][2]||[]).slice()})}tokenize(e,t,n){let r=this.ruler.getRules(""),s=r.length,i=e.md.options.maxNesting,o=t,a=!1;while(o<n){if(e.line=o=e.skipEmptyLines(o),o>=n)break;if(e.sCount[o]<e.blkIndent)break;if(e.level>=i){e.line=n;break}let l=e.line,u=!1;for(let d=0;d<s;d++)if(u=r[d](e,o,n,!1),u){if(l>=e.line)throw Error("block rule didn't increment state.line");break}if(!u)throw Error("none of the block rules matched");if(e.tight=!a,e.isEmpty(e.line-1))a=!0;if(o=e.line,o<n&&e.isEmpty(o))a=!0,o++,e.line=o}}parse(e,t,n,r){if(!e)return;let s=new this.State(e,t,n,r);this.tokenize(s,s.line,s.lineMax)}},Fu=class{constructor(e,t,n,r){ye(this,"pos",0),ye(this,"level",0),ye(this,"pending",""),ye(this,"pendingLevel",0),ye(this,"cache",{}),ye(this,"backticks",{}),ye(this,"backticksScanned",!1),ye(this,"skipHtmlSpecial",!1),ye(this,"linkLevel",0),ye(this,"delimiters",[]),ye(this,"_prev_delimiters",[]),ye(this,"Token",Or),this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.posMax=this.src.length}pushPending(){let e=new Or("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}push(e,t,n){if(this.pending)this.pushPending();let r=new Or(e,t,n),s=void 0;if(n<0)this.level--,this.delimiters=this._prev_delimiters.pop();if(r.level=this.level,n>0)this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters};return this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(s),r}scanDelims(e,t){let n=this.posMax,r=this.src.charCodeAt(e),s;if(e===0)s=32;else if(e===1){if(s=this.src.charCodeAt(0),(s&63488)===55296)s=65533}else if(s=this.src.charCodeAt(e-1),(s&64512)===56320){let b=this.src.charCodeAt(e-2);s=(b&64512)===55296?65536+(b-55296<<10)+(s-56320):65533}else if((s&64512)===55296)s=65533;let i=e;while(i<n&&this.src.charCodeAt(i)===r)i++;let o=i-e,a=i<n?this.src.charCodeAt(i):32;if((a&64512)===55296){let b=this.src.charCodeAt(i+1);a=(b&64512)===56320?65536+(a-55296<<10)+(b-56320):65533}else if((a&64512)===56320)a=65533;let l=ii(s)||si(s),u=ii(a)||si(a),d=ri(s),h=ri(a),p=!h&&(!u||d||l),g=!d&&(!l||h||u);return{can_open:p&&(t||!g||l),can_close:g&&(t||!p||u),length:o}}};function S4(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function _4(e,t){let n=e.pos;while(n<e.posMax&&!S4(e.src.charCodeAt(n)))n++;if(n===e.pos)return!1;if(!t)e.pending+=e.src.slice(e.pos,n);return e.pos=n,!0}function T4(e){return e>=65&&e<=90||e>=97&&e<=122}function R4(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===45||e===46}function M4(e,t){if(!e.md.options.linkify)return!1;if(e.linkLevel>0)return!1;let{pos:n,posMax:r}=e;if(n+3>r)return!1;if(e.src.charCodeAt(n)!==58)return!1;if(e.src.charCodeAt(n+1)!==47)return!1;if(e.src.charCodeAt(n+2)!==47)return!1;let s=n-Math.min(10,e.pending.length,n),i=n;while(i>s&&R4(e.src.charCodeAt(i-1)))i--;if(i===n||!T4(e.src.charCodeAt(i)))return!1;let o=n-i,a=e.md.linkify.matchAtStart(e.src.slice(i));if(!a)return!1;let l=a.url;if(l.length<=o)return!1;let u=l.length;while(u>0&&l.charCodeAt(u-1)===42)u--;if(u!==l.length)l=l.slice(0,u);let d=e.md.normalizeLink(l);if(!e.md.validateLink(d))return!1;if(!t){e.pending=e.pending.slice(0,-o);let h=e.push("link_open","a",1);h.attrs=[["href",d]],h.markup="linkify",h.info="auto";let p=e.push("text","",0);p.content=e.md.normalizeLinkText(l);let g=e.push("link_close","a",-1);g.markup="linkify",g.info="auto"}return e.pos+=l.length-o,!0}function D4(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,s=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;while(i>=1&&e.pending.charCodeAt(i-1)===32)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);n++;while(n<s&&Je(e.src.charCodeAt(n)))n++;return e.pos=n,!0}var cl=[];for(let e=0;e<256;e++)cl.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){cl[e.charCodeAt(0)]=1});function L4(e,t){let{pos:n,posMax:r}=e;if(e.src.charCodeAt(n)!==92)return!1;if(n++,n>=r)return!1;let s=e.src.charCodeAt(n);if(s===10){if(!t)e.push("hardbreak","br",0);n++;while(n<r){if(s=e.src.charCodeAt(n),!Je(s))break;n++}return e.pos=n,!0}if(s===32){if(!t){let a=e.push("text_special","",0);a.content="\\",a.markup="\\",a.info="escape"}return e.pos=n,!0}let i=e.src[n];if(s>=55296&&s<=56319&&n+1<r){let a=e.src.charCodeAt(n+1);if(a>=56320&&a<=57343)i+=e.src[n+1],n++}let o="\\"+i;if(!t){let a=e.push("text_special","",0);if(s<256&&cl[s]!==0)a.content=i;else a.content=o;a.markup=o,a.info="escape"}return e.pos=n+1,!0}function I4(e){let t={},n=0;while((n=e.indexOf("`",n))!==-1){let r=n;while(e.charCodeAt(++n)===96);t[n-r]=r}return t}function N4(e,t){var n;let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;let s=e.posMax,i=r+1;while(i<s&&e.src.charCodeAt(i)===96)i++;let o=e.src.slice(r,i),a=o.length;if(!e.backticksScanned)e.backticks=I4(e.src),e.backticksScanned=!0;if(((n=e.backticks[a])!==null&&n!==void 0?n:-1)>=i){let l=i,u;while((u=e.src.indexOf("`",l))!==-1&&u<s){l=u+1;while(e.src.charCodeAt(l)===96)l++;if(l>s)break;if(l-u===a){if(!t){let d=e.push("code_inline","code",0);d.markup=o;let h=e.src.slice(i,u).replace(/\n/g," ");if(h.startsWith(" ")&&h.endsWith(" ")&&/[^ ]/.test(h))h=h.slice(1,-1);d.content=h}return e.pos=l,!0}}}if(!t)e.pending+=o;return e.pos=i,!0}function B4(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(r!==126)return!1;let s=e.scanDelims(e.pos,!0),i=s.length,o=String.fromCharCode(r);if(i<2)return!1;let a;if(i%2)a=e.push("text","",0),a.content=o,i--;for(let l=0;l<i;l+=2)a=e.push("text","",0),a.content=o+o,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0}function wu(e,t){let n,r=[],s=t.length;for(let i=0;i<s;i++){let o=t[i];if(o.marker!==126)continue;if(o.end===-1)continue;let a=t[o.end];if(n=e.tokens[o.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~")r.push(a.token-1)}while(r.length){let i=r.pop(),o=i+1;while(o<e.tokens.length&&e.tokens[o].type==="s_close")o++;if(o--,i!==o)n=e.tokens[o],e.tokens[o]=e.tokens[i],e.tokens[i]=n}}function O4(e){let t=e.tokens_meta,n=e.tokens_meta.length;wu(e,e.delimiters);for(let s=0;s<n;s++){var r;let i=(r=t[s])===null||r===void 0?void 0:r.delimiters;if(i)wu(e,i)}}var zu={tokenize:B4,postProcess:O4};function $4(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(r!==95&&r!==42)return!1;let s=e.scanDelims(e.pos,r===42);for(let i=0;i<s.length;i++){let o=e.push("text","",0);o.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:s.length,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close})}return e.pos+=s.length,!0}function xu(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let s=t[r];if(s.marker!==95&&s.marker!==42)continue;if(s.end===-1)continue;let i=t[s.end],o=r>0&&t[r-1].end===s.end+1&&t[r-1].marker===s.marker&&t[r-1].token===s.token-1&&t[s.end+1].token===i.token+1,a=String.fromCharCode(s.marker),l=e.tokens[s.token];l.type=o?"strong_open":"em_open",l.tag=o?"strong":"em",l.nesting=1,l.markup=o?a+a:a,l.content="";let u=e.tokens[i.token];if(u.type=o?"strong_close":"em_close",u.tag=o?"strong":"em",u.nesting=-1,u.markup=o?a+a:a,u.content="",o)e.tokens[t[r-1].token].content="",e.tokens[t[s.end+1].token].content="",r--}}function F4(e){let t=e.tokens_meta,n=e.tokens_meta.length;xu(e,e.delimiters);for(let s=0;s<n;s++){var r;let i=(r=t[s])===null||r===void 0?void 0:r.delimiters;if(i)xu(e,i)}}var qu={tokenize:$4,postProcess:F4};function z4(e,t){let n,r,s,i,o="",a="",l=e.pos,u=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let{pos:d,posMax:h}=e,p=e.pos+1,g=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(g<0)return!1;let b=g+1;if(b<h&&e.src.charCodeAt(b)===40){u=!1,b++;for(;b<h;b++)if(n=e.src.charCodeAt(b),!Je(n)&&n!==10)break;if(b>=h)return!1;if(l=b,s=e.md.helpers.parseLinkDestination(e.src,b,e.posMax),s.ok){if(o=e.md.normalizeLink(s.str),e.md.validateLink(o))b=s.pos;else o="";l=b;for(;b<h;b++)if(n=e.src.charCodeAt(b),!Je(n)&&n!==10)break;if(s=e.md.helpers.parseLinkTitle(e.src,b,e.posMax),b<h&&l!==b&&s.ok){a=s.str,b=s.pos;for(;b<h;b++)if(n=e.src.charCodeAt(b),!Je(n)&&n!==10)break}}if(b>=h||e.src.charCodeAt(b)!==41)u=!0;b++}if(u){if(typeof e.env.references>"u")return!1;if(b<h&&e.src.charCodeAt(b)===91)if(l=b+1,b=e.md.helpers.parseLinkLabel(e,b),b>=0)r=e.src.slice(l,b++);else b=g+1;else b=g+1;if(!r)r=e.src.slice(p,g);if(r=ko(r),i=e.env.references[r],!i)return e.pos=d,!1;o=i.href,a=i.title}if(!t){e.pos=p,e.posMax=g;let k=e.push("link_open","a",1),w=[["href",o]];if(k.attrs=w,a)w.push(["title",a]);if(r){let A=Object.create(null);A.label=r,k.meta=A}e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=b,e.posMax=h,!0}function q4(e,t){let n,r,s,i,o,a,l,u,d="",{pos:h,posMax:p}=e;if(e.src.charCodeAt(e.pos)!==33)return!1;if(e.src.charCodeAt(e.pos+1)!==91)return!1;let g=e.pos+2,b=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(b<0)return!1;if(i=b+1,i<p&&e.src.charCodeAt(i)===40){i++;for(;i<p;i++)if(n=e.src.charCodeAt(i),!Je(n)&&n!==10)break;if(i>=p)return!1;if(u=i,a=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),a.ok)if(d=e.md.normalizeLink(a.str),e.md.validateLink(d))i=a.pos;else d="";u=i;for(;i<p;i++)if(n=e.src.charCodeAt(i),!Je(n)&&n!==10)break;if(a=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<p&&u!==i&&a.ok){l=a.str,i=a.pos;for(;i<p;i++)if(n=e.src.charCodeAt(i),!Je(n)&&n!==10)break}else l="";if(i>=p||e.src.charCodeAt(i)!==41)return e.pos=h,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<p&&e.src.charCodeAt(i)===91)if(u=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0)s=e.src.slice(u,i++);else i=b+1;else i=b+1;if(!s)s=e.src.slice(g,b);if(s=ko(s),o=e.env.references[s],!o)return e.pos=h,!1;d=o.href,l=o.title}if(!t){r=e.src.slice(g,b);let k=[];e.md.inline.parse(r,e.md,e.env,k);let w=e.push("image","img",0),A=[["src",d],["alt",""]];if(w.attrs=A,w.children=k,w.content=r,l)A.push(["title",l]);if(s){let _=Object.create(null);_.label=s,w.meta=_}}return e.pos=i,e.posMax=p,!0}var H4=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,P4=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function U4(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let{pos:r,posMax:s}=e;for(;;){if(++n>=s)return!1;let o=e.src.charCodeAt(n);if(o===60)return!1;if(o===62)break}let i=e.src.slice(r+1,n);if(P4.test(i)){let o=e.md.normalizeLink(i);if(!e.md.validateLink(o))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}if(H4.test(i)){let o=e.md.normalizeLink(`mailto:${i}`);if(!e.md.validateLink(o))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=i.length+2,!0}return!1}function W4(e){return/^<a[>\s]/i.test(e)}function j4(e){return/^<\/a\s*>/i.test(e)}function Hu(e){let t=e|32;return t>=97&&t<=122}function G4(e,t){let n=e.src,r,s;if(n.startsWith("<!--",t)){if(n.startsWith(">",t+4))return t+5;if(n.startsWith("->",t+4))return t+6;r=t+4,s="-->"}else if(n.startsWith("<![CDATA[",t))r=t+9,s="]]>";else if(n.charCodeAt(t+1)===63)r=t+2,s="?>";else if(Hu(n.charCodeAt(t+2)))r=t+3,s=">";else return-1;if(e.skipHtmlSpecial)return-1;let i=n.indexOf(s,r);if(i<0)return e.skipHtmlSpecial=!0,-1;return i+s.length}function K4(e,t){if(!e.md.options.html)return!1;let{posMax:n,pos:r}=e;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let s,i=e.src.charCodeAt(r+1);if(i===33||i===63)s=G4(e,r);else if(i===47||Hu(i)){let o=e.src.slice(r).match(Ou);s=o?r+o[0].length:-1}else return!1;if(s<0)return!1;if(!t){let o=e.push("html_inline","",0);if(o.content=e.src.slice(r,s),W4(o.content))e.linkLevel++;if(j4(o.content))e.linkLevel--}return e.pos=s,!0}var V4=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,J4=/^&([a-z][a-z0-9]{1,31});/i;function Z4(e,t){let{pos:n,posMax:r}=e;if(e.src.charCodeAt(n)!==38)return!1;if(n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let s=e.src.slice(n).match(V4);if(s){if(!t){let i=s[1][0].toLowerCase()==="x"?parseInt(s[1].slice(1),16):parseInt(s[1],10),o=e.push("text_special","",0);o.content=ll(i)?ni(i):ni(65533),o.markup=s[0],o.info="entity"}return e.pos+=s[0].length,!0}}else{let s=e.src.slice(n).match(J4);if(s){let i=go(s[0]);if(i!==s[0]){if(!t){let o=e.push("text_special","",0);o.content=i,o.markup=s[0],o.info="entity"}return e.pos+=s[0].length,!0}}}return!1}function Eu(e){let t={},n=e.length;if(!n)return;let r=0,s=-2,i=[];for(let o=0;o<n;o++){let a=e[o];if(i.push(0),e[r].marker!==a.marker||s!==a.token-1)r=o;if(s=a.token,a.length=a.length||0,!a.close)continue;if(!t.hasOwnProperty(a.marker))t[a.marker]=[-1,-1,-1,-1,-1,-1];let l=t[a.marker][(a.open?3:0)+a.length%3],u=r-i[r]-1,d=u;for(;u>l;u-=i[u]+1){let h=e[u];if(h.marker!==a.marker)continue;if(h.open&&h.end<0){let p=!1;if(h.close||a.open){if((h.length+a.length)%3===0){if(h.length%3!==0||a.length%3!==0)p=!0}}if(!p){let g=u>0&&!e[u-1].open?i[u-1]+1:0;i[o]=o-u+g,i[u]=g,a.open=!1,h.end=o,h.close=!1,d=-1,s=-2;break}}}if(d!==-1)t[a.marker][(a.open?3:0)+(a.length||0)%3]=d}}function Y4(e){let t=e.tokens_meta,n=e.tokens_meta.length;Eu(e.delimiters);for(let s=0;s<n;s++){var r;let i=(r=t[s])===null||r===void 0?void 0:r.delimiters;if(i)Eu(i)}}function X4(e){let t,n,r=0,s=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++){if(s[t].nesting<0)r--;if(s[t].level=r,s[t].nesting>0)r++;if(s[t].type==="text"&&t+1<i&&s[t+1].type==="text")s[t+1].content=s[t].content+s[t+1].content;else{if(t!==n)s[n]=s[t];n++}}if(t!==n)s.length=n}var ol=[["text",_4],["linkify",M4],["newline",D4],["escape",L4],["backticks",N4],["strikethrough",zu.tokenize],["emphasis",qu.tokenize],["link",z4],["image",q4],["autolink",U4],["html_inline",K4],["entity",Z4]],al=[["balance_pairs",Y4],["strikethrough",zu.postProcess],["emphasis",qu.postProcess],["fragments_join",X4]],Pu=class{constructor(){ye(this,"ruler",new ai),ye(this,"ruler2",new ai),ye(this,"State",Fu);for(let e=0;e<ol.length;e++)this.ruler.push(ol[e][0],ol[e][1]);for(let e=0;e<al.length;e++)this.ruler2.push(al[e][0],al[e][1])}skipToken(e){let t=e.pos,n=this.ruler.getRules(""),r=n.length,s=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let o=!1;if(e.level<s){for(let a=0;a<r;a++)if(e.level++,o=n[a](e,!0),e.level--,o){if(t>=e.pos)throw Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;if(!o)e.pos++;i[t]=e.pos}tokenize(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,s=e.md.options.maxNesting;while(e.pos<r){let i=e.pos,o=!1;if(e.level<s){for(let a=0;a<n;a++)if(o=t[a](e,!1),o){if(i>=e.pos)throw Error("inline rule didn't increment state.pos");break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}if(e.pending)e.pushPending()}parse(e,t,n,r){let s=new this.State(e,t,n,r);this.tokenize(s);let i=this.ruler2.getRules(""),o=i.length;for(let a=0;a<o;a++)i[a](s)}},Q4={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},e2=/^(vbscript|javascript|file|data):/,t2=/^data:image\/(gif|png|jpeg|webp);/,Au=["http:","https:","mailto:"],En=class{validateLink(e){let t=e.trim().toLowerCase();return e2.test(t)?t2.test(t):!0}normalizeLink(e){let t=Qs(e,!0);if(t.hostname){if(!t.protocol||Au.indexOf(t.protocol)>=0)try{t.hostname=nl.toASCII(t.hostname)}catch(n){}}if(t.auth)t.auth=ur(t.auth);if(t.hostname)t.hostname=ur(t.hostname);if(t.pathname)t.pathname=ur(t.pathname);if(t.search)t.search=ur(t.search);if(t.hash)t.hash=ur(t.hash);return ms(t)}normalizeLinkText(e){let t=Qs(e,!0);if(t.hostname){if(!t.protocol||Au.indexOf(t.protocol)>=0)try{t.hostname=nl.toUnicode(t.hostname)}catch(n){}}return Xs(ms(t),Xs.defaultChars+"%")}constructor(...e){ye(this,"inline",new Pu),ye(this,"block",new $u),ye(this,"core",new Lu),ye(this,"renderer",new Ru),ye(this,"linkify",new ou),ye(this,"utils",Eg),ye(this,"helpers",Object.assign({},zg));let[t,n]=e;if(typeof t==="string"){if(this.configure(t),n)this.set(n)}else this.configure("default"),this.set(t||{})}set(e){return Object.assign(this.options,e),this}configure(e){let t;if(typeof e==="string"){let s=e;if(t=Q4[s],!t)throw Error(`Wrong 'markdown-it' preset "${s}", check name`)}else t=e;if(!t)throw Error("Wrong `markdown-it` preset, can't be empty");if(t.options)this.options={...t.options};let n=t.components;if(n){var r;["core","block","inline"].forEach((i)=>{var o;let a=(o=n[i])===null||o===void 0?void 0:o.rules;if(a)this[i].ruler.enableOnly(a)});let s=(r=n.inline)===null||r===void 0?void 0:r.rules2;if(s)this.inline.ruler2.enableOnly(s)}return this}enable(e,t=!1){let n=[];if(!Array.isArray(e))e=[e];["core","block","inline"].forEach((s)=>{n=n.concat(this[s].ruler.enable(e,!0))}),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter((s)=>n.indexOf(s)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to enable unknown rule(s): ${r}`);return this}disable(e,t=!1){let n=[];if(!Array.isArray(e))e=[e];["core","block","inline"].forEach((s)=>{n=n.concat(this[s].ruler.disable(e,!0))}),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter((s)=>n.indexOf(s)<0);if(r.length&&!t)throw Error(`MarkdownIt. Failed to disable unknown rule(s): ${r}`);return this}use(e,...t){return e.apply(e,[this,...t]),this}parse(e,t){if(typeof e!=="string")throw Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens}render(e,t={}){return this.renderer.render(this.parse(e,t),this.options,t)}parseInline(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens}renderInline(e,t={}){return this.renderer.render(this.parseInline(e,t),this.options,t)}};ye(En,"Token",Or);ye(En,"Ruler",ai);ye(En,"Renderer",Ru);ye(En,"ParserCore",Lu);ye(En,"StateCore",Mu);ye(En,"ParserBlock",$u);ye(En,"StateBlock",Iu);ye(En,"ParserInline",Pu);ye(En,"StateInline",Fu);var Uu=Su(En);var I7=String.raw`\$&`,Wu=(e)=>e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'");var Pn=(e,t,n)=>(n?[e[n].ruler]:[e.core.ruler,e.block.ruler,e.inline.ruler]).some((r)=>r.__rules__.some(({name:s})=>s===t)),N7=String.raw`\^$.*+?()[]{}|`;var n2=(e)=>{if(e.length===0)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=32||n===34||n===39||n===47||n===60||n===61||n===62)return!1}return!0},li=(e)=>{let t="",n=0;for(let r=0;r<e.length;r++){let s="";switch(e.charCodeAt(r)){case 34:s=""";break;case 38:s="&";break;case 60:s="<";break;case 62:s=">"}s&&(t+=e.slice(n,r)+s,n=r+1)}return n===0?e:t+e.slice(n)},xo=(e,t)=>{if(t){for(let[n,r]of Object.entries(t))if(n2(n))if(n==="class"){let s=String(r).trim();s&&e.attrJoin("class",s)}else e.attrSet(n,r)}},ul=(e)=>(e??0)>0?`:${e}`:"",ju=(e,t)=>`${typeof e=="string"?`-${e}-`:""}${t+1}`,r2=(e,t)=>`[${e+1}${ul(t)}]`,s2=(e,t)=>{let{id:n,subId:r}=e[t].meta;return r2(n,r)},i2=(e,t,n,r,s)=>{let{href:i,anchorId:o,anchorClass:a}=e[t].meta,l=s.rules.footnote_caption(e,t,n,r,s);return`<sup${s.renderAttrs(e[t])}><a href="${li(i)}">${l}</a><a class="${li(a)}" id="${li(o)}"></a></sup>`},o2=(e,t,n,r,s)=>{let{separatorClass:i,listClass:o}=e[t].meta;return`<hr class="${li(i)}"${n.xhtmlOut?" /":""}>
|
|
19
19
|
<section${s.renderAttrs(e[t])}>
|
|
20
|
-
<ol class="${
|
|
21
|
-
`},
|
|
20
|
+
<ol class="${li(o)}">
|
|
21
|
+
`},a2=()=>`</ol>
|
|
22
22
|
</section>
|
|
23
|
-
`,
|
|
24
|
-
`,
|
|
23
|
+
`,l2=(e,t,n,r,s)=>`<li${s.renderAttrs(e[t])}>`,c2=()=>`</li>
|
|
24
|
+
`,u2=(e,t,n,r,s)=>{let{text:i}=e[t].meta;return` <a${s.renderAttrs(e[t])}>${Wu(i)}</a>`},d2=(e,t,n,r)=>{let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],o;if(s+4>i||e.src.charCodeAt(s)!==91||e.src.charCodeAt(s+1)!==94)return!1;let a=s+2;for(;a<i;){if(o=e.src.charCodeAt(a),o===32)return!1;if(o===93)break;a++}if(a===s+2||a+1>=i||e.src.charCodeAt(++a)!==58)return!1;if(r)return!0;a++,(e.env.footnotes??={}).refs??={};let l=e.src.slice(s+2,a-2);e.env.footnotes.refs[`:${l}`]=-1;let u=e.push("footnote_reference_open","",1);u.meta={label:l},u.level=e.level++;let d=e.bMarks[t],h=e.tShift[t],p=e.sCount[t],g=e.parentType,b=a,k=e.sCount[t]+a-(e.bMarks[t]+e.tShift[t]),w=k;for(;a<i;){if(o=e.src.charCodeAt(a),o===9)w+=4-w%4;else if(o===32)w++;else break;a++}e.tShift[t]=a-b,e.sCount[t]=w-k,e.bMarks[t]=b,e.blkIndent+=4,e.parentType="footnote",e.sCount[t]<e.blkIndent&&(e.sCount[t]+=e.blkIndent),e.md.block.tokenize(e,t,n),e.parentType=g,e.blkIndent-=4,e.tShift[t]=h,e.sCount[t]=p,e.bMarks[t]=d;let A=e.push("footnote_reference_close","",-1);return A.level=--e.level,!0},Gu=(e,t,n,r,s)=>{let i=e.push("footnote_ref","",0),o=ju(e.env.docId,n),a=ul(r);i.meta={id:n,subId:r,label:s,href:`#footnote${o}`,anchorId:`footnote-ref${o}${a}`,anchorClass:"footnote-anchor"},i.attrJoin("class","footnote-ref"),xo(i,t.refAttrs)},f2=(e)=>(t,n)=>{let{posMax:r,pos:s}=t;if(s+2>=r||t.src.charCodeAt(s)!==94||t.src.charCodeAt(s+1)!==91)return!1;let i=t.md.helpers.parseLinkLabel(t,s+1);if(i<0)return!1;let o=s+2;if(!n){let a=((t.env.footnotes??={}).list??=[]).length,l=[];t.md.inline.parse(t.src.slice(o,i),t.md,t.env,l),t.env.footnotes.list[a]={content:t.src.slice(o,i),tokens:l},Gu(t,e,a)}return t.pos=i+1,t.posMax=r,!0},h2=(e)=>(t,n)=>{let{pos:r,posMax:s}=t;if(r+3>s||!t.env.footnotes?.refs||t.src.charCodeAt(r)!==91||t.src.charCodeAt(r+1)!==94)return!1;let i=r+2,o;for(;i<s;){if(o=t.src.charCodeAt(i),o===32||o===10)return!1;if(o===93)break;i++}if(i===r+2||i>=s)return!1;i++;let a=t.src.slice(r+2,i-1);if(typeof t.env.footnotes.refs[`:${a}`]!="number")return!1;if(!n){let l=t.env.footnotes.list??=[],{refs:u}=t.env.footnotes,d;u[`:${a}`]<0?(d=l.length,l[d]={label:a,count:0},u[`:${a}`]=d):d=u[`:${a}`];let h=l[d].count;l[d].count+=1,Gu(t,e,d,h,a)}return t.pos=i,t.posMax=s,!0},m2=(e)=>(t)=>{let n={},r=[];if(!t.env.footnotes?.list){let a=0;t.tokens=t.tokens.filter((l)=>l.type==="footnote_reference_open"?(a++,!1):l.type==="footnote_reference_close"?(a--,!1):a===0);return}let{list:s}=t.env.footnotes;t.tokens=t.tokens.filter((a)=>{if(a.type==="footnote_reference_open")return r.push({label:a.meta.label,tokens:[]}),!1;if(a.type==="footnote_reference_close"){let{label:l,tokens:u}=r.pop();return n[`:${l}`]=u,!1}return r.length===0||(r[r.length-1].tokens.push(a),!1)});let i=new t.Token("footnote_block_open","",1);i.meta={separatorClass:"footnotes-sep",listClass:"footnotes-list"},i.attrJoin("class","footnotes"),xo(i,e.containerAttrs),t.tokens.push(i);let o=s.length;for(let a=0;a<o;a++){let l=new t.Token("footnote_open","",1),u=ju(t.env.docId,a);if(l.meta={id:a,label:s[a].label},l.attrSet("id",`footnote${u}`),l.attrJoin("class","footnote-item"),xo(l,e.itemAttrs),t.tokens.push(l),s[a].tokens){let h=new t.Token("paragraph_open","p",1);h.block=!0;let p=new t.Token("inline","",0);p.children=s[a].tokens,p.content=s[a].content;let g=new t.Token("paragraph_close","p",-1);g.block=!0,t.tokens.push(h,p,g)}else{let h=n[`:${s[a].label}`];h&&t.tokens.push(...h)}let d=t.tokens[t.tokens.length-1].type==="paragraph_close"?t.tokens.pop():null;for(let h=0;h<(Number(s[a].count)>0?s[a].count:1);h++){let p=new t.Token("footnote_anchor","",0);p.meta={id:a,subId:h,label:s[a].label,text:"↩︎"},p.attrSet("href",`#footnote-ref${u}${ul(h)}`),p.attrJoin("class","footnote-backref"),xo(p,e.backrefAttrs),t.tokens.push(p)}d&&t.tokens.push(d),t.tokens.push(new t.Token("footnote_close","",-1))}t.tokens.push(new t.Token("footnote_block_close","",-1))},Ku=(e,t)=>{Pn(e,"footnoteTail","core")||(e.renderer.rules.footnote_ref=i2,e.renderer.rules.footnote_block_open=o2,e.renderer.rules.footnote_block_close=a2,e.renderer.rules.footnote_open=l2,e.renderer.rules.footnote_close=c2,e.renderer.rules.footnote_anchor=u2,e.renderer.rules.footnote_caption=s2,e.block.ruler.before("reference","footnoteDef",d2,{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnoteInline",f2(t??{})),e.inline.ruler.after("footnoteInline","footnote_ref",h2(t??{})),e.core.ruler.after("inline","footnoteTail",m2(t??{})))};var Vu=(e,t,n)=>{let r=e.attrIndex(t),s=[t,n];r<0?e.attrPush(s):e.attrs[r]=s},p2=(e)=>e.type==="inline",g2=(e)=>e.type==="paragraph_open",b2=(e)=>e.type==="list_item_open",v2=(e)=>{let t=e.content;if(t.length<4||t.charCodeAt(0)!==91||t.charCodeAt(2)!==93)return!1;let n=t.charCodeAt(3);if(n!==32&&n!==160)return!1;let r=t.charCodeAt(1);return r===120||r===88?"checked":r===32||r===160},y2=(e)=>{e[0].type==="text"?e[0].content=e[0].content.slice(4):(e.splice(0,3),e[0].content=e[0].content.slice(1))},Ju=(e,t={})=>{if(Pn(e,"task_list","core"))return;let{disabled:n=!0,label:r=!0,containerClass:s="task-list-container",itemClass:i="task-list-item",checkboxClass:o="task-list-item-checkbox",labelClass:a="task-list-item-label"}=t;e.core.ruler.after("inline","task_list",(l)=>{let u=l.tokens,d=[];for(let h=0;h<u.length;h++){let p=u[h];if(d[p.level]=h,h<2||!p2(p)||!g2(u[h-1])||!b2(u[h-2]))continue;let g=v2(p);if(g===!1)continue;p.children??=[],y2(p.children);let b=new l.Token("checkbox_input","input",0);if(b.attrs=[["type","checkbox"],["class",o]],g==="checked"&&b.attrs.push(["checked","checked"]),n&&b.attrs.push(["disabled","disabled"]),p.children.unshift(b),r){let k=new l.Token("label_open","label",1);k.attrs=[["class",a]],p.children.unshift(k),p.children.push(new l.Token("label_close","label",-1))}Vu(u[h-2],"class",i),Vu(u[d[u[h-2].level-1]],"class",s)}})};var k2=String.raw`\[`,w2=String.raw`\(`,Zu=(e,t,n=0)=>{let r=0,s=t-1;for(;s>=n&&e.charCodeAt(s)===92;)r++,s--;return r},Qu=(e)=>e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95,x2=(e,t,n)=>{let r=e.src.charCodeAt(t-1),s=e.src.charCodeAt(t+1),i=e.md.utils.isSpace;return r!==36&&(t===0||i(r)||!Qu(r))&&(n||!i(s))},E2=(e,t,n)=>{let r=e.src.charCodeAt(t-1),s=e.src.charCodeAt(t+1),i=e.md.utils.isSpace;return s!==36&&(s==null||i(s)||!Qu(s))&&(n||!i(r))},A2=(e)=>(t,n)=>{if(n||t.src[t.pos]!=="$")return!1;if(!x2(t,t.pos,e))return t.pending+="$",t.pos++,!0;let r=t.pos+1,s,i=t.md.utils.isSpace;for(;(r=t.src.indexOf("$",r))!==-1;){if(r>=t.posMax){r=-1;break}for(s=r-1;t.src.charCodeAt(s)===92;)s--;if((r-s)%2==0){r++;continue}if(E2(t,r,e))break;let a=t.src.charCodeAt(r-1),l=t.src.charCodeAt(r+1);if(!e&&i(a)&&(r+1>=t.posMax||i(l)))r++;else{r=-1;break}}if(r===-1)return t.pending+="$",t.pos+=1,!0;if(r-(t.pos+1)===0)return t.pending+="$$",t.pos+=2,!0;let o=t.push("math_inline","math",0);return o.markup="$",o.content=t.src.slice(t.pos+1,r),t.pos=r+1,!0},C2=()=>(e,t)=>{let{pos:n,posMax:r}=e;if(t||n+1>=r||e.src.charCodeAt(n)!==92||e.src.charCodeAt(n+1)!==40)return!1;let s=n+2,i=!1;for(;s+1<r;){if(e.src.charCodeAt(s)===92&&e.src.charCodeAt(s+1)===41){if(Zu(e.src,n)%2==1)return!1;if(Zu(e.src,s,n+2)%2==0){i=!0;break}}s++}if(!i)return!1;let o=e.push("math_inline","math",0);return o.markup=w2,o.content=e.src.slice(n+2,s),e.pos=s+2,!0},ci=(e,t,n)=>{let r=e.md.utils.isWhiteSpace,s=t;for(;s>n&&r(e.src.charCodeAt(s-1));)s--;return s},dl=(e,t,n,r,s)=>n-t>=2&&e.charCodeAt(n-1)===s&&e.charCodeAt(n-2)===r,Yu=new WeakMap,ed=(e,t,n,r,s)=>{let i=Yu.get(e);if(i&&i.endLine===n&&i.blkIndent===e.blkIndent&&i.close1===r&&i.close2===s&&t>=i.from&&t<i.stop)return-1;let{src:o}=e,a=n;for(let l=t+1;l<n;l++){let u=e.bMarks[l]+e.tShift[l],d=e.eMarks[l];if(u<d&&e.sCount[l]<e.blkIndent){a=l;break}let h=ci(e,d,u);if(dl(o,u,h,r,s))return l}return Yu.set(e,{blkIndent:e.blkIndent,close1:r,close2:s,endLine:n,from:t,stop:a}),-1},S2=(e,t,n)=>{let r=e.md.utils.isWhiteSpace;for(let s=t;s<n-1;s++)if(e.src.charCodeAt(s)===36&&e.src.charCodeAt(s+1)===36){for(let i=s+2;i<n;i++)if(!r(e.src.charCodeAt(i)))return!0;break}return!1},_2=(e,t,n,r)=>{let{src:s}=e,i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(s.charCodeAt(i)!==36||s.charCodeAt(i+1)!==36||S2(e,i+2,o))return!1;let a=ci(e,o,i),l=i+2,u=dl(s,l,a,36,36),d=u?t:ed(e,t,n,36,36);if(d===-1)return!1;if(r)return!0;let h=s.slice(l,u?a-2:o),p="";if(!u){let b=e.bMarks[d]+e.tShift[d];p=s.slice(b,ci(e,e.eMarks[d],b)-2)}e.line=d+1;let g=e.push("math_block","math",0);return g.block=!0,g.content=(h?`${h}
|
|
25
25
|
`:"")+e.getLines(t+1,d,e.sCount[t],!0)+(p?`${p}
|
|
26
|
-
`:""),g.map=[t,e.line],g.markup="$$",!0},
|
|
26
|
+
`:""),g.map=[t,e.line],g.markup="$$",!0},T2=(e,t,n,r)=>{let{src:s}=e,i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(s.charCodeAt(i)!==92||s.charCodeAt(i+1)!==91)return!1;let a=ci(e,o,i),l=i+2,u=dl(s,l,a,92,93),d=u?t:ed(e,t,n,92,93);if(d===-1)return!1;if(r)return!0;let h=s.slice(l,u?a-2:o),p="";if(!u){let b=e.bMarks[d]+e.tShift[d];p=s.slice(b,ci(e,e.eMarks[d],b)-2)}e.line=d+1;let g=e.push("math_block","math",0);return g.block=!0,g.content=(h?`${h}
|
|
27
27
|
`:"")+e.getLines(t+1,d,e.sCount[t],!0)+(p?`${p}
|
|
28
|
-
`:""),g.map=[t,e.line],g.markup=
|
|
28
|
+
`:""),g.map=[t,e.line],g.markup=k2,!0},Xu={alt:["paragraph","reference","blockquote","list"]},td=(e,t)=>{if(typeof t?.render!="function")throw TypeError('[@mdit/plugin-tex]: "render" option should be a function');let{allowInlineWithSpace:n=!1,mathFence:r=!1,delimiters:s="dollars",render:i}=t;if(!(Pn(e,"math_inline_dollar","inline")||Pn(e,"math_block_dollar","block")||Pn(e,"math_inline_bracket","inline")||Pn(e,"math_block_bracket","block"))){if(r){let o=e.renderer.rules.fence;e.renderer.rules.fence=(a,l,u,d,h)=>{let p=a[l];return p.info.trim()==="math"?i(p.content,!0,d):o(a,l,u,d,h)}}(s==="dollars"||s==="all")&&(e.inline.ruler.after("escape","math_inline_dollar",A2(n)),e.block.ruler.after("blockquote","math_block_dollar",_2,Xu)),(s==="brackets"||s==="all")&&(e.inline.ruler.before("escape","math_inline_bracket",C2()),e.block.ruler.after("blockquote","math_block_bracket",T2,Xu)),e.renderer.rules.math_inline=(o,a,l,u)=>i(o[a].content,!1,u),e.renderer.rules.math_block=(o,a,l,u)=>i(o[a].content,!0,u)}};class se extends Error{constructor(e,t){var n="KaTeX parse error: "+e,r,s,i=t&&t.loc;if(i&&i.start<=i.end){var o=i.lexer.input;if(r=i.start,s=i.end,r===o.length)n+=" at end of input: ";else n+=" at position "+(r+1)+": ";var a=o.slice(r,s).replace(/[^]/g,"$&̲"),l;if(r>15)l="…"+o.slice(r-15,r);else l=o.slice(0,r);var u;if(s+15<o.length)u=o.slice(s,s+15)+"…";else u=o.slice(s);n+=l+a+u}super(n);if(this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,se.prototype),this.position=r,r!=null&&s!=null)this.length=s-r;this.rawMessage=e}}var R2=/([A-Z])/g,M2=(e)=>e.replace(R2,"-$1").toLowerCase(),D2={"&":"&",">":">","<":"<",'"':""","'":"'"},L2=/[&><"']/g,Ct=(e)=>String(e).replace(L2,(t)=>D2[t]),To=(e)=>{if(e.type==="ordgroup")if(e.body.length===1)return To(e.body[0]);else return e;else if(e.type==="color")if(e.body.length===1)return To(e.body[0]);else return e;else if(e.type==="font")return To(e.body);else return e},I2=new Set(["mathord","textord","atom"]),Jn=(e)=>I2.has(To(e).type),N2=(e)=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);if(!t)return"_relative";if(t[2]!==":")return null;if(!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1]))return null;return t[1].toLowerCase()},El={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:(e)=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:(e)=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:(e)=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1000,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:(e)=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:(e)=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function B2(e){if(typeof e!=="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw Error("Unexpected schema type; settings must declare an explicit default.")}}function O2(e){if(Object.prototype.hasOwnProperty.call(e,"default")&&e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return B2(t)}function $2(e,t,n,r){var s=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,i=Object.prototype.hasOwnProperty.call(r,"processor")?r.processor:void 0;e[t]=s!==void 0?i?i(s):s:O2(r)}class Bo{constructor(e){if(e===void 0)e={};this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t of Object.keys(El)){var n=El[t];if(n)$2(this,t,e,n)}}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=N2(e.url);if(t==null)return!1;e.protocol=t}var n=typeof this.trust==="function"?this.trust(e):this.trust;return Boolean(n)}}class Wn{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Cn[F2[this.id]]}sub(){return Cn[z2[this.id]]}fracNum(){return Cn[q2[this.id]]}fracDen(){return Cn[H2[this.id]]}cramp(){return Cn[P2[this.id]]}text(){return Cn[U2[this.id]]}isTight(){return this.size>=2}}var Pl=0,Lo=1,ys=2,Kn=3,gi=4,tn=5,ks=6,Dt=7,Cn=[new Wn(Pl,0,!1),new Wn(Lo,0,!0),new Wn(ys,1,!1),new Wn(Kn,1,!0),new Wn(gi,2,!1),new Wn(tn,2,!0),new Wn(ks,3,!1),new Wn(Dt,3,!0)],F2=[gi,tn,gi,tn,ks,Dt,ks,Dt],z2=[tn,tn,tn,tn,Dt,Dt,Dt,Dt],q2=[ys,Kn,gi,tn,ks,Dt,ks,Dt],H2=[Kn,Kn,tn,tn,Dt,Dt,Dt,Dt],P2=[Lo,Lo,Kn,Kn,tn,tn,Dt,Dt],U2=[Pl,Lo,ys,Kn,ys,Kn,ys,Kn],Me={DISPLAY:Cn[Pl],TEXT:Cn[ys],SCRIPT:Cn[gi],SCRIPTSCRIPT:Cn[ks]},Al=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function W2(e){for(var t=0;t<Al.length;t++){var n=Al[t];for(var r=0;r<n.blocks.length;r++){var s=n.blocks[r];if(e>=s[0]&&e<=s[1])return n.name}}return null}var Ro=[];Al.forEach((e)=>e.blocks.forEach((t)=>Ro.push(...t)));function zd(e){for(var t=0;t<Ro.length;t+=2)if(e>=Ro[t]&&e<=Ro[t+1])return!0;return!1}var pt=(e)=>e+" "+e,gs=80,j2=function(t,n){return"M95,"+(622+t+n)+`
|
|
29
29
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
30
30
|
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
31
31
|
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
@@ -36,7 +36,7 @@ c5.3,-9.3,12,-14,20,-14
|
|
|
36
36
|
H400000v`+(40+t)+`H845.2724
|
|
37
37
|
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
38
38
|
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
39
|
-
M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},
|
|
39
|
+
M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},G2=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119
|
|
40
40
|
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
41
41
|
c340,-704.7,510.7,-1060.3,512,-1067
|
|
42
42
|
l`+t/2.084+" -"+t+`
|
|
@@ -46,7 +46,7 @@ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,
|
|
|
46
46
|
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
47
47
|
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
48
48
|
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
49
|
-
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},
|
|
49
|
+
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},K2=function(t,n){return"M983 "+(10+t+n)+`
|
|
50
50
|
l`+t/3.13+" -"+t+`
|
|
51
51
|
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
|
|
52
52
|
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
@@ -55,7 +55,7 @@ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
|
55
55
|
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
56
56
|
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
57
57
|
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
58
|
-
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},
|
|
58
|
+
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},V2=function(t,n){return"M424,"+(2398+t+n)+`
|
|
59
59
|
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
60
60
|
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
61
61
|
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
@@ -65,18 +65,18 @@ v`+(40+t)+`H1014.6
|
|
|
65
65
|
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
66
66
|
c-2,6,-10,9,-24,9
|
|
67
67
|
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+`
|
|
68
|
-
h400000v`+(40+t)+"h-400000z"},
|
|
68
|
+
h400000v`+(40+t)+"h-400000z"},J2=function(t,n){return"M473,"+(2713+t+n)+`
|
|
69
69
|
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
|
|
70
70
|
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
|
|
71
71
|
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
72
72
|
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
73
73
|
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
74
74
|
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
75
|
-
606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},
|
|
75
|
+
606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},Z2=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},Y2=function(t,n,r){var s=r-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+`
|
|
76
76
|
H742v`+s+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
77
77
|
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
78
78
|
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
79
|
-
219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},
|
|
79
|
+
219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},X2=function(t,n,r){n=1000*n;var s="";switch(t){case"sqrtMain":s=j2(n,gs);break;case"sqrtSize1":s=G2(n,gs);break;case"sqrtSize2":s=K2(n,gs);break;case"sqrtSize3":s=V2(n,gs);break;case"sqrtSize4":s=J2(n,gs);break;case"sqrtTall":s=Y2(n,gs,r)}return s},Q2=function(t,n){switch(t){case"⎜":return pt("M291 0 H417 V"+n+" H291z");case"∣":return pt("M145 0 H188 V"+n+" H145z");case"∥":return pt("M145 0 H188 V"+n+" H145z")+pt("M367 0 H410 V"+n+" H367z");case"⎟":return pt("M457 0 H583 V"+n+" H457z");case"⎢":return pt("M319 0 H403 V"+n+" H319z");case"⎥":return pt("M263 0 H347 V"+n+" H263z");case"⎪":return pt("M384 0 H504 V"+n+" H384z");case"⏐":return pt("M312 0 H355 V"+n+" H312z");case"‖":return pt("M257 0 H300 V"+n+" H257z")+pt("M478 0 H521 V"+n+" H478z");default:return""}},nd={doubleleftarrow:`M262 157
|
|
80
80
|
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
81
81
|
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
82
82
|
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
@@ -247,7 +247,7 @@ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`
|
|
|
247
247
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
248
248
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
249
249
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
250
|
-
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},
|
|
250
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},eb=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 v84 h347 v-84
|
|
251
251
|
H403z M403 1759 V0 H319 V1759 v`+n+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z
|
|
252
252
|
M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
|
|
253
253
|
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
@@ -275,26 +275,31 @@ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6
|
|
|
275
275
|
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
276
276
|
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
277
277
|
l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
278
|
-
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error("Unknown stretchy delimiter.")}};function l2(e){return"toText"in e}class Br{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createDocumentFragment();for(var t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){var e="";for(var t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e)=>{if(l2(e))return e.toText();throw Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}}var il={pt:1,mm:2.8452755905511813,cm:28.45275590551181,in:72.27,bp:1.00375,pc:12,dd:1.070008643042351,cc:12.84010371650821,nd:1.0669781931464175,nc:12.80373831775701,sp:0.0000152587890625,px:1.00375},c2={ex:!0,em:!0,mu:!0},md=function(t){if(typeof t!=="string")t=t.unit;return t in il||t in c2||t==="ex"},rt=function(t,n){var r;if(t.unit in il)r=il[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var s;if(n.style.isTight())s=n.havingStyle(n.style.text());else s=n;if(t.unit==="ex")r=s.fontMetrics().xHeight;else if(t.unit==="em")r=s.fontMetrics().quad;else throw new se("Invalid unit: '"+t.unit+"'");if(s!==n)r*=s.sizeMultiplier/n.sizeMultiplier}return Math.min(t.number*r,n.maxSize)},ce=function(t){return+t.toFixed(4)+"em"},ur=function(t){return t.filter((n)=>n).join(" ")},El=function(t){var n="";for(var r of Object.keys(t)){var s=t[r];if(s!==void 0)n+=$4(r)+":"+s+";"}return n},pd=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){if(n.style.isTight())this.classes.push("mtight");var s=n.getColor();if(s)this.style.color=s}},gd=function(t){var n=document.createElement(t);n.className=ur(this.classes),Object.assign(n.style,this.style);for(var r of Object.keys(this.attributes))n.setAttribute(r,this.attributes[r]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n},u2=/[\s"'>/=\x00-\x1f]/,bd=function(t){var n="<"+t;if(this.classes.length)n+=' class="'+Ct(ur(this.classes))+'"';var r=El(this.style);if(r)n+=' style="'+Ct(r)+'"';for(var s of Object.keys(this.attributes)){if(u2.test(s))throw new se("Invalid attribute name '"+s+"'");n+=" "+s+'="'+Ct(this.attributes[s])+'"'}n+=">";for(var i=0;i<this.children.length;i++)n+=this.children[i].toMarkup();return n+="</"+t+">",n};class Or{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,pd.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return gd.call(this,"span")}toMarkup(){return bd.call(this,"span")}}class di{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,pd.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return gd.call(this,"a")}toMarkup(){return bd.call(this,"a")}}class vd{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e='<img src="'+Ct(this.src)+'"'+(' alt="'+Ct(this.alt)+'"'),t=El(this.style);if(t)e+=' style="'+Ct(t)+'"';return e+="'/>",e}}var d2={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class qt{constructor(e,t,n,r,s,i,o,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=s||0,this.width=i||0,this.classes=o||[],this.style=a||{},this.maxFontSize=0;var l=Y4(this.text.charCodeAt(0));if(l)this.classes.push(l+"_fallback");if(/[îïíì]/.test(this.text))this.text=d2[this.text]}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;if(this.italic>0)t=document.createElement("span"),t.style.marginRight=ce(this.italic);if(this.classes.length>0)t=t||document.createElement("span"),t.className=ur(this.classes);if(Object.keys(this.style).length>0)t=t||document.createElement("span"),Object.assign(t.style,this.style);if(t)return t.appendChild(e),t;else return e}toMarkup(){var e=!1,t="<span";if(this.classes.length)e=!0,t+=' class="',t+=Ct(ur(this.classes)),t+='"';var n="";if(this.italic>0)n+="margin-right:"+ce(this.italic)+";";if(n+=El(this.style),n)e=!0,t+=' style="'+Ct(n)+'"';var r=Ct(this.text);if(e)return t+=">",t+=r,t+="</span>",t;else return r}}class bn{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t of Object.keys(this.attributes))e+=" "+t+'="'+Ct(this.attributes[t])+'"';e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}}class qn{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"path");if(this.alternate)t.setAttribute("d",this.alternate);else t.setAttribute("d",Mu[this.pathName]);return t}toMarkup(){if(this.alternate)return'<path d="'+Ct(this.alternate)+'"/>';else return'<path d="'+Ct(Mu[this.pathName])+'"/>'}}class vo{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var e="<line";for(var t of Object.keys(this.attributes))e+=" "+t+'="'+Ct(this.attributes[t])+'"';return e+="/>",e}}function f2(e){if(e instanceof qt)return e;else throw Error("Expected symbolNode but got "+String(e)+".")}function h2(e){if(e instanceof Or)return e;else throw Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var m2=(e)=>e instanceof Or||e instanceof di||e instanceof Br,gn={"AMS-Regular":{"32":[0,0,0,0,0.25],"65":[0,0.68889,0,0,0.72222],"66":[0,0.68889,0,0,0.66667],"67":[0,0.68889,0,0,0.72222],"68":[0,0.68889,0,0,0.72222],"69":[0,0.68889,0,0,0.66667],"70":[0,0.68889,0,0,0.61111],"71":[0,0.68889,0,0,0.77778],"72":[0,0.68889,0,0,0.77778],"73":[0,0.68889,0,0,0.38889],"74":[0.16667,0.68889,0,0,0.5],"75":[0,0.68889,0,0,0.77778],"76":[0,0.68889,0,0,0.66667],"77":[0,0.68889,0,0,0.94445],"78":[0,0.68889,0,0,0.72222],"79":[0.16667,0.68889,0,0,0.77778],"80":[0,0.68889,0,0,0.61111],"81":[0.16667,0.68889,0,0,0.77778],"82":[0,0.68889,0,0,0.72222],"83":[0,0.68889,0,0,0.55556],"84":[0,0.68889,0,0,0.66667],"85":[0,0.68889,0,0,0.72222],"86":[0,0.68889,0,0,0.72222],"87":[0,0.68889,0,0,1],"88":[0,0.68889,0,0,0.72222],"89":[0,0.68889,0,0,0.72222],"90":[0,0.68889,0,0,0.66667],"107":[0,0.68889,0,0,0.55556],"160":[0,0,0,0,0.25],"165":[0,0.675,0.025,0,0.75],"174":[0.15559,0.69224,0,0,0.94666],"240":[0,0.68889,0,0,0.55556],"295":[0,0.68889,0,0,0.54028],"710":[0,0.825,0,0,2.33334],"732":[0,0.9,0,0,2.33334],"770":[0,0.825,0,0,2.33334],"771":[0,0.9,0,0,2.33334],"989":[0.08167,0.58167,0,0,0.77778],"1008":[0,0.43056,0.04028,0,0.66667],"8245":[0,0.54986,0,0,0.275],"8463":[0,0.68889,0,0,0.54028],"8487":[0,0.68889,0,0,0.72222],"8498":[0,0.68889,0,0,0.55556],"8502":[0,0.68889,0,0,0.66667],"8503":[0,0.68889,0,0,0.44445],"8504":[0,0.68889,0,0,0.66667],"8513":[0,0.68889,0,0,0.63889],"8592":[-0.03598,0.46402,0,0,0.5],"8594":[-0.03598,0.46402,0,0,0.5],"8602":[-0.13313,0.36687,0,0,1],"8603":[-0.13313,0.36687,0,0,1],"8606":[0.01354,0.52239,0,0,1],"8608":[0.01354,0.52239,0,0,1],"8610":[0.01354,0.52239,0,0,1.11111],"8611":[0.01354,0.52239,0,0,1.11111],"8619":[0,0.54986,0,0,1],"8620":[0,0.54986,0,0,1],"8621":[-0.13313,0.37788,0,0,1.38889],"8622":[-0.13313,0.36687,0,0,1],"8624":[0,0.69224,0,0,0.5],"8625":[0,0.69224,0,0,0.5],"8630":[0,0.43056,0,0,1],"8631":[0,0.43056,0,0,1],"8634":[0.08198,0.58198,0,0,0.77778],"8635":[0.08198,0.58198,0,0,0.77778],"8638":[0.19444,0.69224,0,0,0.41667],"8639":[0.19444,0.69224,0,0,0.41667],"8642":[0.19444,0.69224,0,0,0.41667],"8643":[0.19444,0.69224,0,0,0.41667],"8644":[0.1808,0.675,0,0,1],"8646":[0.1808,0.675,0,0,1],"8647":[0.1808,0.675,0,0,1],"8648":[0.19444,0.69224,0,0,0.83334],"8649":[0.1808,0.675,0,0,1],"8650":[0.19444,0.69224,0,0,0.83334],"8651":[0.01354,0.52239,0,0,1],"8652":[0.01354,0.52239,0,0,1],"8653":[-0.13313,0.36687,0,0,1],"8654":[-0.13313,0.36687,0,0,1],"8655":[-0.13313,0.36687,0,0,1],"8666":[0.13667,0.63667,0,0,1],"8667":[0.13667,0.63667,0,0,1],"8669":[-0.13313,0.37788,0,0,1],"8672":[-0.064,0.437,0,0,1.334],"8674":[-0.064,0.437,0,0,1.334],"8705":[0,0.825,0,0,0.5],"8708":[0,0.68889,0,0,0.55556],"8709":[0.08167,0.58167,0,0,0.77778],"8717":[0,0.43056,0,0,0.42917],"8722":[-0.03598,0.46402,0,0,0.5],"8724":[0.08198,0.69224,0,0,0.77778],"8726":[0.08167,0.58167,0,0,0.77778],"8733":[0,0.69224,0,0,0.77778],"8736":[0,0.69224,0,0,0.72222],"8737":[0,0.69224,0,0,0.72222],"8738":[0.03517,0.52239,0,0,0.72222],"8739":[0.08167,0.58167,0,0,0.22222],"8740":[0.25142,0.74111,0,0,0.27778],"8741":[0.08167,0.58167,0,0,0.38889],"8742":[0.25142,0.74111,0,0,0.5],"8756":[0,0.69224,0,0,0.66667],"8757":[0,0.69224,0,0,0.66667],"8764":[-0.13313,0.36687,0,0,0.77778],"8765":[-0.13313,0.37788,0,0,0.77778],"8769":[-0.13313,0.36687,0,0,0.77778],"8770":[-0.03625,0.46375,0,0,0.77778],"8774":[0.30274,0.79383,0,0,0.77778],"8776":[-0.01688,0.48312,0,0,0.77778],"8778":[0.08167,0.58167,0,0,0.77778],"8782":[0.06062,0.54986,0,0,0.77778],"8783":[0.06062,0.54986,0,0,0.77778],"8785":[0.08198,0.58198,0,0,0.77778],"8786":[0.08198,0.58198,0,0,0.77778],"8787":[0.08198,0.58198,0,0,0.77778],"8790":[0,0.69224,0,0,0.77778],"8791":[0.22958,0.72958,0,0,0.77778],"8796":[0.08198,0.91667,0,0,0.77778],"8806":[0.25583,0.75583,0,0,0.77778],"8807":[0.25583,0.75583,0,0,0.77778],"8808":[0.25142,0.75726,0,0,0.77778],"8809":[0.25142,0.75726,0,0,0.77778],"8812":[0.25583,0.75583,0,0,0.5],"8814":[0.20576,0.70576,0,0,0.77778],"8815":[0.20576,0.70576,0,0,0.77778],"8816":[0.30274,0.79383,0,0,0.77778],"8817":[0.30274,0.79383,0,0,0.77778],"8818":[0.22958,0.72958,0,0,0.77778],"8819":[0.22958,0.72958,0,0,0.77778],"8822":[0.1808,0.675,0,0,0.77778],"8823":[0.1808,0.675,0,0,0.77778],"8828":[0.13667,0.63667,0,0,0.77778],"8829":[0.13667,0.63667,0,0,0.77778],"8830":[0.22958,0.72958,0,0,0.77778],"8831":[0.22958,0.72958,0,0,0.77778],"8832":[0.20576,0.70576,0,0,0.77778],"8833":[0.20576,0.70576,0,0,0.77778],"8840":[0.30274,0.79383,0,0,0.77778],"8841":[0.30274,0.79383,0,0,0.77778],"8842":[0.13597,0.63597,0,0,0.77778],"8843":[0.13597,0.63597,0,0,0.77778],"8847":[0.03517,0.54986,0,0,0.77778],"8848":[0.03517,0.54986,0,0,0.77778],"8858":[0.08198,0.58198,0,0,0.77778],"8859":[0.08198,0.58198,0,0,0.77778],"8861":[0.08198,0.58198,0,0,0.77778],"8862":[0,0.675,0,0,0.77778],"8863":[0,0.675,0,0,0.77778],"8864":[0,0.675,0,0,0.77778],"8865":[0,0.675,0,0,0.77778],"8872":[0,0.69224,0,0,0.61111],"8873":[0,0.69224,0,0,0.72222],"8874":[0,0.69224,0,0,0.88889],"8876":[0,0.68889,0,0,0.61111],"8877":[0,0.68889,0,0,0.61111],"8878":[0,0.68889,0,0,0.72222],"8879":[0,0.68889,0,0,0.72222],"8882":[0.03517,0.54986,0,0,0.77778],"8883":[0.03517,0.54986,0,0,0.77778],"8884":[0.13667,0.63667,0,0,0.77778],"8885":[0.13667,0.63667,0,0,0.77778],"8888":[0,0.54986,0,0,1.11111],"8890":[0.19444,0.43056,0,0,0.55556],"8891":[0.19444,0.69224,0,0,0.61111],"8892":[0.19444,0.69224,0,0,0.61111],"8901":[0,0.54986,0,0,0.27778],"8903":[0.08167,0.58167,0,0,0.77778],"8905":[0.08167,0.58167,0,0,0.77778],"8906":[0.08167,0.58167,0,0,0.77778],"8907":[0,0.69224,0,0,0.77778],"8908":[0,0.69224,0,0,0.77778],"8909":[-0.03598,0.46402,0,0,0.77778],"8910":[0,0.54986,0,0,0.76042],"8911":[0,0.54986,0,0,0.76042],"8912":[0.03517,0.54986,0,0,0.77778],"8913":[0.03517,0.54986,0,0,0.77778],"8914":[0,0.54986,0,0,0.66667],"8915":[0,0.54986,0,0,0.66667],"8916":[0,0.69224,0,0,0.66667],"8918":[0.0391,0.5391,0,0,0.77778],"8919":[0.0391,0.5391,0,0,0.77778],"8920":[0.03517,0.54986,0,0,1.33334],"8921":[0.03517,0.54986,0,0,1.33334],"8922":[0.38569,0.88569,0,0,0.77778],"8923":[0.38569,0.88569,0,0,0.77778],"8926":[0.13667,0.63667,0,0,0.77778],"8927":[0.13667,0.63667,0,0,0.77778],"8928":[0.30274,0.79383,0,0,0.77778],"8929":[0.30274,0.79383,0,0,0.77778],"8934":[0.23222,0.74111,0,0,0.77778],"8935":[0.23222,0.74111,0,0,0.77778],"8936":[0.23222,0.74111,0,0,0.77778],"8937":[0.23222,0.74111,0,0,0.77778],"8938":[0.20576,0.70576,0,0,0.77778],"8939":[0.20576,0.70576,0,0,0.77778],"8940":[0.30274,0.79383,0,0,0.77778],"8941":[0.30274,0.79383,0,0,0.77778],"8994":[0.19444,0.69224,0,0,0.77778],"8995":[0.19444,0.69224,0,0,0.77778],"9416":[0.15559,0.69224,0,0,0.90222],"9484":[0,0.69224,0,0,0.5],"9488":[0,0.69224,0,0,0.5],"9492":[0,0.37788,0,0,0.5],"9496":[0,0.37788,0,0,0.5],"9585":[0.19444,0.68889,0,0,0.88889],"9586":[0.19444,0.74111,0,0,0.88889],"9632":[0,0.675,0,0,0.77778],"9633":[0,0.675,0,0,0.77778],"9650":[0,0.54986,0,0,0.72222],"9651":[0,0.54986,0,0,0.72222],"9654":[0.03517,0.54986,0,0,0.77778],"9660":[0,0.54986,0,0,0.72222],"9661":[0,0.54986,0,0,0.72222],"9664":[0.03517,0.54986,0,0,0.77778],"9674":[0.11111,0.69224,0,0,0.66667],"9733":[0.19444,0.69224,0,0,0.94445],"10003":[0,0.69224,0,0,0.83334],"10016":[0,0.69224,0,0,0.83334],"10731":[0.11111,0.69224,0,0,0.66667],"10846":[0.19444,0.75583,0,0,0.61111],"10877":[0.13667,0.63667,0,0,0.77778],"10878":[0.13667,0.63667,0,0,0.77778],"10885":[0.25583,0.75583,0,0,0.77778],"10886":[0.25583,0.75583,0,0,0.77778],"10887":[0.13597,0.63597,0,0,0.77778],"10888":[0.13597,0.63597,0,0,0.77778],"10889":[0.26167,0.75726,0,0,0.77778],"10890":[0.26167,0.75726,0,0,0.77778],"10891":[0.48256,0.98256,0,0,0.77778],"10892":[0.48256,0.98256,0,0,0.77778],"10901":[0.13667,0.63667,0,0,0.77778],"10902":[0.13667,0.63667,0,0,0.77778],"10933":[0.25142,0.75726,0,0,0.77778],"10934":[0.25142,0.75726,0,0,0.77778],"10935":[0.26167,0.75726,0,0,0.77778],"10936":[0.26167,0.75726,0,0,0.77778],"10937":[0.26167,0.75726,0,0,0.77778],"10938":[0.26167,0.75726,0,0,0.77778],"10949":[0.25583,0.75583,0,0,0.77778],"10950":[0.25583,0.75583,0,0,0.77778],"10955":[0.28481,0.79383,0,0,0.77778],"10956":[0.28481,0.79383,0,0,0.77778],"57350":[0.08167,0.58167,0,0,0.22222],"57351":[0.08167,0.58167,0,0,0.38889],"57352":[0.08167,0.58167,0,0,0.77778],"57353":[0,0.43056,0.04028,0,0.66667],"57356":[0.25142,0.75726,0,0,0.77778],"57357":[0.25142,0.75726,0,0,0.77778],"57358":[0.41951,0.91951,0,0,0.77778],"57359":[0.30274,0.79383,0,0,0.77778],"57360":[0.30274,0.79383,0,0,0.77778],"57361":[0.41951,0.91951,0,0,0.77778],"57366":[0.25142,0.75726,0,0,0.77778],"57367":[0.25142,0.75726,0,0,0.77778],"57368":[0.25142,0.75726,0,0,0.77778],"57369":[0.25142,0.75726,0,0,0.77778],"57370":[0.13597,0.63597,0,0,0.77778],"57371":[0.13597,0.63597,0,0,0.77778]},"Caligraphic-Regular":{"32":[0,0,0,0,0.25],"65":[0,0.68333,0,0.19445,0.79847],"66":[0,0.68333,0.03041,0.13889,0.65681],"67":[0,0.68333,0.05834,0.13889,0.52653],"68":[0,0.68333,0.02778,0.08334,0.77139],"69":[0,0.68333,0.08944,0.11111,0.52778],"70":[0,0.68333,0.09931,0.11111,0.71875],"71":[0.09722,0.68333,0.0593,0.11111,0.59487],"72":[0,0.68333,0.00965,0.11111,0.84452],"73":[0,0.68333,0.07382,0,0.54452],"74":[0.09722,0.68333,0.18472,0.16667,0.67778],"75":[0,0.68333,0.01445,0.05556,0.76195],"76":[0,0.68333,0,0.13889,0.68972],"77":[0,0.68333,0,0.13889,1.2009],"78":[0,0.68333,0.14736,0.08334,0.82049],"79":[0,0.68333,0.02778,0.11111,0.79611],"80":[0,0.68333,0.08222,0.08334,0.69556],"81":[0.09722,0.68333,0,0.11111,0.81667],"82":[0,0.68333,0,0.08334,0.8475],"83":[0,0.68333,0.075,0.13889,0.60556],"84":[0,0.68333,0.25417,0,0.54464],"85":[0,0.68333,0.09931,0.08334,0.62583],"86":[0,0.68333,0.08222,0,0.61278],"87":[0,0.68333,0.08222,0.08334,0.98778],"88":[0,0.68333,0.14643,0.13889,0.7133],"89":[0.09722,0.68333,0.08222,0.08334,0.66834],"90":[0,0.68333,0.07944,0.13889,0.72473],"160":[0,0,0,0,0.25]},"Fraktur-Regular":{"32":[0,0,0,0,0.25],"33":[0,0.69141,0,0,0.29574],"34":[0,0.69141,0,0,0.21471],"38":[0,0.69141,0,0,0.73786],"39":[0,0.69141,0,0,0.21201],"40":[0.24982,0.74947,0,0,0.38865],"41":[0.24982,0.74947,0,0,0.38865],"42":[0,0.62119,0,0,0.27764],"43":[0.08319,0.58283,0,0,0.75623],"44":[0,0.10803,0,0,0.27764],"45":[0.08319,0.58283,0,0,0.75623],"46":[0,0.10803,0,0,0.27764],"47":[0.24982,0.74947,0,0,0.50181],"48":[0,0.47534,0,0,0.50181],"49":[0,0.47534,0,0,0.50181],"50":[0,0.47534,0,0,0.50181],"51":[0.18906,0.47534,0,0,0.50181],"52":[0.18906,0.47534,0,0,0.50181],"53":[0.18906,0.47534,0,0,0.50181],"54":[0,0.69141,0,0,0.50181],"55":[0.18906,0.47534,0,0,0.50181],"56":[0,0.69141,0,0,0.50181],"57":[0.18906,0.47534,0,0,0.50181],"58":[0,0.47534,0,0,0.21606],"59":[0.12604,0.47534,0,0,0.21606],"61":[-0.13099,0.36866,0,0,0.75623],"63":[0,0.69141,0,0,0.36245],"65":[0,0.69141,0,0,0.7176],"66":[0,0.69141,0,0,0.88397],"67":[0,0.69141,0,0,0.61254],"68":[0,0.69141,0,0,0.83158],"69":[0,0.69141,0,0,0.66278],"70":[0.12604,0.69141,0,0,0.61119],"71":[0,0.69141,0,0,0.78539],"72":[0.06302,0.69141,0,0,0.7203],"73":[0,0.69141,0,0,0.55448],"74":[0.12604,0.69141,0,0,0.55231],"75":[0,0.69141,0,0,0.66845],"76":[0,0.69141,0,0,0.66602],"77":[0,0.69141,0,0,1.04953],"78":[0,0.69141,0,0,0.83212],"79":[0,0.69141,0,0,0.82699],"80":[0.18906,0.69141,0,0,0.82753],"81":[0.03781,0.69141,0,0,0.82699],"82":[0,0.69141,0,0,0.82807],"83":[0,0.69141,0,0,0.82861],"84":[0,0.69141,0,0,0.66899],"85":[0,0.69141,0,0,0.64576],"86":[0,0.69141,0,0,0.83131],"87":[0,0.69141,0,0,1.04602],"88":[0,0.69141,0,0,0.71922],"89":[0.18906,0.69141,0,0,0.83293],"90":[0.12604,0.69141,0,0,0.60201],"91":[0.24982,0.74947,0,0,0.27764],"93":[0.24982,0.74947,0,0,0.27764],"94":[0,0.69141,0,0,0.49965],"97":[0,0.47534,0,0,0.50046],"98":[0,0.69141,0,0,0.51315],"99":[0,0.47534,0,0,0.38946],"100":[0,0.62119,0,0,0.49857],"101":[0,0.47534,0,0,0.40053],"102":[0.18906,0.69141,0,0,0.32626],"103":[0.18906,0.47534,0,0,0.5037],"104":[0.18906,0.69141,0,0,0.52126],"105":[0,0.69141,0,0,0.27899],"106":[0,0.69141,0,0,0.28088],"107":[0,0.69141,0,0,0.38946],"108":[0,0.69141,0,0,0.27953],"109":[0,0.47534,0,0,0.76676],"110":[0,0.47534,0,0,0.52666],"111":[0,0.47534,0,0,0.48885],"112":[0.18906,0.52396,0,0,0.50046],"113":[0.18906,0.47534,0,0,0.48912],"114":[0,0.47534,0,0,0.38919],"115":[0,0.47534,0,0,0.44266],"116":[0,0.62119,0,0,0.33301],"117":[0,0.47534,0,0,0.5172],"118":[0,0.52396,0,0,0.5118],"119":[0,0.52396,0,0,0.77351],"120":[0.18906,0.47534,0,0,0.38865],"121":[0.18906,0.47534,0,0,0.49884],"122":[0.18906,0.47534,0,0,0.39054],"160":[0,0,0,0,0.25],"8216":[0,0.69141,0,0,0.21471],"8217":[0,0.69141,0,0,0.21471],"58112":[0,0.62119,0,0,0.49749],"58113":[0,0.62119,0,0,0.4983],"58114":[0.18906,0.69141,0,0,0.33328],"58115":[0.18906,0.69141,0,0,0.32923],"58116":[0.18906,0.47534,0,0,0.50343],"58117":[0,0.69141,0,0,0.33301],"58118":[0,0.62119,0,0,0.33409],"58119":[0,0.47534,0,0,0.50073]},"Main-Bold":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.35],"34":[0,0.69444,0,0,0.60278],"35":[0.19444,0.69444,0,0,0.95833],"36":[0.05556,0.75,0,0,0.575],"37":[0.05556,0.75,0,0,0.95833],"38":[0,0.69444,0,0,0.89444],"39":[0,0.69444,0,0,0.31944],"40":[0.25,0.75,0,0,0.44722],"41":[0.25,0.75,0,0,0.44722],"42":[0,0.75,0,0,0.575],"43":[0.13333,0.63333,0,0,0.89444],"44":[0.19444,0.15556,0,0,0.31944],"45":[0,0.44444,0,0,0.38333],"46":[0,0.15556,0,0,0.31944],"47":[0.25,0.75,0,0,0.575],"48":[0,0.64444,0,0,0.575],"49":[0,0.64444,0,0,0.575],"50":[0,0.64444,0,0,0.575],"51":[0,0.64444,0,0,0.575],"52":[0,0.64444,0,0,0.575],"53":[0,0.64444,0,0,0.575],"54":[0,0.64444,0,0,0.575],"55":[0,0.64444,0,0,0.575],"56":[0,0.64444,0,0,0.575],"57":[0,0.64444,0,0,0.575],"58":[0,0.44444,0,0,0.31944],"59":[0.19444,0.44444,0,0,0.31944],"60":[0.08556,0.58556,0,0,0.89444],"61":[-0.10889,0.39111,0,0,0.89444],"62":[0.08556,0.58556,0,0,0.89444],"63":[0,0.69444,0,0,0.54305],"64":[0,0.69444,0,0,0.89444],"65":[0,0.68611,0,0,0.86944],"66":[0,0.68611,0,0,0.81805],"67":[0,0.68611,0,0,0.83055],"68":[0,0.68611,0,0,0.88194],"69":[0,0.68611,0,0,0.75555],"70":[0,0.68611,0,0,0.72361],"71":[0,0.68611,0,0,0.90416],"72":[0,0.68611,0,0,0.9],"73":[0,0.68611,0,0,0.43611],"74":[0,0.68611,0,0,0.59444],"75":[0,0.68611,0,0,0.90138],"76":[0,0.68611,0,0,0.69166],"77":[0,0.68611,0,0,1.09166],"78":[0,0.68611,0,0,0.9],"79":[0,0.68611,0,0,0.86388],"80":[0,0.68611,0,0,0.78611],"81":[0.19444,0.68611,0,0,0.86388],"82":[0,0.68611,0,0,0.8625],"83":[0,0.68611,0,0,0.63889],"84":[0,0.68611,0,0,0.8],"85":[0,0.68611,0,0,0.88472],"86":[0,0.68611,0.01597,0,0.86944],"87":[0,0.68611,0.01597,0,1.18888],"88":[0,0.68611,0,0,0.86944],"89":[0,0.68611,0.02875,0,0.86944],"90":[0,0.68611,0,0,0.70277],"91":[0.25,0.75,0,0,0.31944],"92":[0.25,0.75,0,0,0.575],"93":[0.25,0.75,0,0,0.31944],"94":[0,0.69444,0,0,0.575],"95":[0.31,0.13444,0.03194,0,0.575],"97":[0,0.44444,0,0,0.55902],"98":[0,0.69444,0,0,0.63889],"99":[0,0.44444,0,0,0.51111],"100":[0,0.69444,0,0,0.63889],"101":[0,0.44444,0,0,0.52708],"102":[0,0.69444,0.10903,0,0.35139],"103":[0.19444,0.44444,0.01597,0,0.575],"104":[0,0.69444,0,0,0.63889],"105":[0,0.69444,0,0,0.31944],"106":[0.19444,0.69444,0,0,0.35139],"107":[0,0.69444,0,0,0.60694],"108":[0,0.69444,0,0,0.31944],"109":[0,0.44444,0,0,0.95833],"110":[0,0.44444,0,0,0.63889],"111":[0,0.44444,0,0,0.575],"112":[0.19444,0.44444,0,0,0.63889],"113":[0.19444,0.44444,0,0,0.60694],"114":[0,0.44444,0,0,0.47361],"115":[0,0.44444,0,0,0.45361],"116":[0,0.63492,0,0,0.44722],"117":[0,0.44444,0,0,0.63889],"118":[0,0.44444,0.01597,0,0.60694],"119":[0,0.44444,0.01597,0,0.83055],"120":[0,0.44444,0,0,0.60694],"121":[0.19444,0.44444,0.01597,0,0.60694],"122":[0,0.44444,0,0,0.51111],"123":[0.25,0.75,0,0,0.575],"124":[0.25,0.75,0,0,0.31944],"125":[0.25,0.75,0,0,0.575],"126":[0.35,0.34444,0,0,0.575],"160":[0,0,0,0,0.25],"163":[0,0.69444,0,0,0.86853],"168":[0,0.69444,0,0,0.575],"172":[0,0.44444,0,0,0.76666],"176":[0,0.69444,0,0,0.86944],"177":[0.13333,0.63333,0,0,0.89444],"184":[0.17014,0,0,0,0.51111],"198":[0,0.68611,0,0,1.04166],"215":[0.13333,0.63333,0,0,0.89444],"216":[0.04861,0.73472,0,0,0.89444],"223":[0,0.69444,0,0,0.59722],"230":[0,0.44444,0,0,0.83055],"247":[0.13333,0.63333,0,0,0.89444],"248":[0.09722,0.54167,0,0,0.575],"305":[0,0.44444,0,0,0.31944],"338":[0,0.68611,0,0,1.16944],"339":[0,0.44444,0,0,0.89444],"567":[0.19444,0.44444,0,0,0.35139],"710":[0,0.69444,0,0,0.575],"711":[0,0.63194,0,0,0.575],"713":[0,0.59611,0,0,0.575],"714":[0,0.69444,0,0,0.575],"715":[0,0.69444,0,0,0.575],"728":[0,0.69444,0,0,0.575],"729":[0,0.69444,0,0,0.31944],"730":[0,0.69444,0,0,0.86944],"732":[0,0.69444,0,0,0.575],"733":[0,0.69444,0,0,0.575],"915":[0,0.68611,0,0,0.69166],"916":[0,0.68611,0,0,0.95833],"920":[0,0.68611,0,0,0.89444],"923":[0,0.68611,0,0,0.80555],"926":[0,0.68611,0,0,0.76666],"928":[0,0.68611,0,0,0.9],"931":[0,0.68611,0,0,0.83055],"933":[0,0.68611,0,0,0.89444],"934":[0,0.68611,0,0,0.83055],"936":[0,0.68611,0,0,0.89444],"937":[0,0.68611,0,0,0.83055],"8211":[0,0.44444,0.03194,0,0.575],"8212":[0,0.44444,0.03194,0,1.14999],"8216":[0,0.69444,0,0,0.31944],"8217":[0,0.69444,0,0,0.31944],"8220":[0,0.69444,0,0,0.60278],"8221":[0,0.69444,0,0,0.60278],"8224":[0.19444,0.69444,0,0,0.51111],"8225":[0.19444,0.69444,0,0,0.51111],"8242":[0,0.55556,0,0,0.34444],"8407":[0,0.72444,0.15486,0,0.575],"8463":[0,0.69444,0,0,0.66759],"8465":[0,0.69444,0,0,0.83055],"8467":[0,0.69444,0,0,0.47361],"8472":[0.19444,0.44444,0,0,0.74027],"8476":[0,0.69444,0,0,0.83055],"8501":[0,0.69444,0,0,0.70277],"8592":[-0.10889,0.39111,0,0,1.14999],"8593":[0.19444,0.69444,0,0,0.575],"8594":[-0.10889,0.39111,0,0,1.14999],"8595":[0.19444,0.69444,0,0,0.575],"8596":[-0.10889,0.39111,0,0,1.14999],"8597":[0.25,0.75,0,0,0.575],"8598":[0.19444,0.69444,0,0,1.14999],"8599":[0.19444,0.69444,0,0,1.14999],"8600":[0.19444,0.69444,0,0,1.14999],"8601":[0.19444,0.69444,0,0,1.14999],"8636":[-0.10889,0.39111,0,0,1.14999],"8637":[-0.10889,0.39111,0,0,1.14999],"8640":[-0.10889,0.39111,0,0,1.14999],"8641":[-0.10889,0.39111,0,0,1.14999],"8656":[-0.10889,0.39111,0,0,1.14999],"8657":[0.19444,0.69444,0,0,0.70277],"8658":[-0.10889,0.39111,0,0,1.14999],"8659":[0.19444,0.69444,0,0,0.70277],"8660":[-0.10889,0.39111,0,0,1.14999],"8661":[0.25,0.75,0,0,0.70277],"8704":[0,0.69444,0,0,0.63889],"8706":[0,0.69444,0.06389,0,0.62847],"8707":[0,0.69444,0,0,0.63889],"8709":[0.05556,0.75,0,0,0.575],"8711":[0,0.68611,0,0,0.95833],"8712":[0.08556,0.58556,0,0,0.76666],"8715":[0.08556,0.58556,0,0,0.76666],"8722":[0.13333,0.63333,0,0,0.89444],"8723":[0.13333,0.63333,0,0,0.89444],"8725":[0.25,0.75,0,0,0.575],"8726":[0.25,0.75,0,0,0.575],"8727":[-0.02778,0.47222,0,0,0.575],"8728":[-0.02639,0.47361,0,0,0.575],"8729":[-0.02639,0.47361,0,0,0.575],"8730":[0.18,0.82,0,0,0.95833],"8733":[0,0.44444,0,0,0.89444],"8734":[0,0.44444,0,0,1.14999],"8736":[0,0.69224,0,0,0.72222],"8739":[0.25,0.75,0,0,0.31944],"8741":[0.25,0.75,0,0,0.575],"8743":[0,0.55556,0,0,0.76666],"8744":[0,0.55556,0,0,0.76666],"8745":[0,0.55556,0,0,0.76666],"8746":[0,0.55556,0,0,0.76666],"8747":[0.19444,0.69444,0.12778,0,0.56875],"8764":[-0.10889,0.39111,0,0,0.89444],"8768":[0.19444,0.69444,0,0,0.31944],"8771":[0.00222,0.50222,0,0,0.89444],"8773":[0.027,0.638,0,0,0.894],"8776":[0.02444,0.52444,0,0,0.89444],"8781":[0.00222,0.50222,0,0,0.89444],"8801":[0.00222,0.50222,0,0,0.89444],"8804":[0.19667,0.69667,0,0,0.89444],"8805":[0.19667,0.69667,0,0,0.89444],"8810":[0.08556,0.58556,0,0,1.14999],"8811":[0.08556,0.58556,0,0,1.14999],"8826":[0.08556,0.58556,0,0,0.89444],"8827":[0.08556,0.58556,0,0,0.89444],"8834":[0.08556,0.58556,0,0,0.89444],"8835":[0.08556,0.58556,0,0,0.89444],"8838":[0.19667,0.69667,0,0,0.89444],"8839":[0.19667,0.69667,0,0,0.89444],"8846":[0,0.55556,0,0,0.76666],"8849":[0.19667,0.69667,0,0,0.89444],"8850":[0.19667,0.69667,0,0,0.89444],"8851":[0,0.55556,0,0,0.76666],"8852":[0,0.55556,0,0,0.76666],"8853":[0.13333,0.63333,0,0,0.89444],"8854":[0.13333,0.63333,0,0,0.89444],"8855":[0.13333,0.63333,0,0,0.89444],"8856":[0.13333,0.63333,0,0,0.89444],"8857":[0.13333,0.63333,0,0,0.89444],"8866":[0,0.69444,0,0,0.70277],"8867":[0,0.69444,0,0,0.70277],"8868":[0,0.69444,0,0,0.89444],"8869":[0,0.69444,0,0,0.89444],"8900":[-0.02639,0.47361,0,0,0.575],"8901":[-0.02639,0.47361,0,0,0.31944],"8902":[-0.02778,0.47222,0,0,0.575],"8968":[0.25,0.75,0,0,0.51111],"8969":[0.25,0.75,0,0,0.51111],"8970":[0.25,0.75,0,0,0.51111],"8971":[0.25,0.75,0,0,0.51111],"8994":[-0.13889,0.36111,0,0,1.14999],"8995":[-0.13889,0.36111,0,0,1.14999],"9651":[0.19444,0.69444,0,0,1.02222],"9657":[-0.02778,0.47222,0,0,0.575],"9661":[0.19444,0.69444,0,0,1.02222],"9667":[-0.02778,0.47222,0,0,0.575],"9711":[0.19444,0.69444,0,0,1.14999],"9824":[0.12963,0.69444,0,0,0.89444],"9825":[0.12963,0.69444,0,0,0.89444],"9826":[0.12963,0.69444,0,0,0.89444],"9827":[0.12963,0.69444,0,0,0.89444],"9837":[0,0.75,0,0,0.44722],"9838":[0.19444,0.69444,0,0,0.44722],"9839":[0.19444,0.69444,0,0,0.44722],"10216":[0.25,0.75,0,0,0.44722],"10217":[0.25,0.75,0,0,0.44722],"10815":[0,0.68611,0,0,0.9],"10927":[0.19667,0.69667,0,0,0.89444],"10928":[0.19667,0.69667,0,0,0.89444],"57376":[0.19444,0.69444,0,0,0]},"Main-BoldItalic":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0.11417,0,0.38611],"34":[0,0.69444,0.07939,0,0.62055],"35":[0.19444,0.69444,0.06833,0,0.94444],"37":[0.05556,0.75,0.12861,0,0.94444],"38":[0,0.69444,0.08528,0,0.88555],"39":[0,0.69444,0.12945,0,0.35555],"40":[0.25,0.75,0.15806,0,0.47333],"41":[0.25,0.75,0.03306,0,0.47333],"42":[0,0.75,0.14333,0,0.59111],"43":[0.10333,0.60333,0.03306,0,0.88555],"44":[0.19444,0.14722,0,0,0.35555],"45":[0,0.44444,0.02611,0,0.41444],"46":[0,0.14722,0,0,0.35555],"47":[0.25,0.75,0.15806,0,0.59111],"48":[0,0.64444,0.13167,0,0.59111],"49":[0,0.64444,0.13167,0,0.59111],"50":[0,0.64444,0.13167,0,0.59111],"51":[0,0.64444,0.13167,0,0.59111],"52":[0.19444,0.64444,0.13167,0,0.59111],"53":[0,0.64444,0.13167,0,0.59111],"54":[0,0.64444,0.13167,0,0.59111],"55":[0.19444,0.64444,0.13167,0,0.59111],"56":[0,0.64444,0.13167,0,0.59111],"57":[0,0.64444,0.13167,0,0.59111],"58":[0,0.44444,0.06695,0,0.35555],"59":[0.19444,0.44444,0.06695,0,0.35555],"61":[-0.10889,0.39111,0.06833,0,0.88555],"63":[0,0.69444,0.11472,0,0.59111],"64":[0,0.69444,0.09208,0,0.88555],"65":[0,0.68611,0,0,0.86555],"66":[0,0.68611,0.0992,0,0.81666],"67":[0,0.68611,0.14208,0,0.82666],"68":[0,0.68611,0.09062,0,0.87555],"69":[0,0.68611,0.11431,0,0.75666],"70":[0,0.68611,0.12903,0,0.72722],"71":[0,0.68611,0.07347,0,0.89527],"72":[0,0.68611,0.17208,0,0.8961],"73":[0,0.68611,0.15681,0,0.47166],"74":[0,0.68611,0.145,0,0.61055],"75":[0,0.68611,0.14208,0,0.89499],"76":[0,0.68611,0,0,0.69777],"77":[0,0.68611,0.17208,0,1.07277],"78":[0,0.68611,0.17208,0,0.8961],"79":[0,0.68611,0.09062,0,0.85499],"80":[0,0.68611,0.0992,0,0.78721],"81":[0.19444,0.68611,0.09062,0,0.85499],"82":[0,0.68611,0.02559,0,0.85944],"83":[0,0.68611,0.11264,0,0.64999],"84":[0,0.68611,0.12903,0,0.7961],"85":[0,0.68611,0.17208,0,0.88083],"86":[0,0.68611,0.18625,0,0.86555],"87":[0,0.68611,0.18625,0,1.15999],"88":[0,0.68611,0.15681,0,0.86555],"89":[0,0.68611,0.19803,0,0.86555],"90":[0,0.68611,0.14208,0,0.70888],"91":[0.25,0.75,0.1875,0,0.35611],"93":[0.25,0.75,0.09972,0,0.35611],"94":[0,0.69444,0.06709,0,0.59111],"95":[0.31,0.13444,0.09811,0,0.59111],"97":[0,0.44444,0.09426,0,0.59111],"98":[0,0.69444,0.07861,0,0.53222],"99":[0,0.44444,0.05222,0,0.53222],"100":[0,0.69444,0.10861,0,0.59111],"101":[0,0.44444,0.085,0,0.53222],"102":[0.19444,0.69444,0.21778,0,0.4],"103":[0.19444,0.44444,0.105,0,0.53222],"104":[0,0.69444,0.09426,0,0.59111],"105":[0,0.69326,0.11387,0,0.35555],"106":[0.19444,0.69326,0.1672,0,0.35555],"107":[0,0.69444,0.11111,0,0.53222],"108":[0,0.69444,0.10861,0,0.29666],"109":[0,0.44444,0.09426,0,0.94444],"110":[0,0.44444,0.09426,0,0.64999],"111":[0,0.44444,0.07861,0,0.59111],"112":[0.19444,0.44444,0.07861,0,0.59111],"113":[0.19444,0.44444,0.105,0,0.53222],"114":[0,0.44444,0.11111,0,0.50167],"115":[0,0.44444,0.08167,0,0.48694],"116":[0,0.63492,0.09639,0,0.385],"117":[0,0.44444,0.09426,0,0.62055],"118":[0,0.44444,0.11111,0,0.53222],"119":[0,0.44444,0.11111,0,0.76777],"120":[0,0.44444,0.12583,0,0.56055],"121":[0.19444,0.44444,0.105,0,0.56166],"122":[0,0.44444,0.13889,0,0.49055],"126":[0.35,0.34444,0.11472,0,0.59111],"160":[0,0,0,0,0.25],"168":[0,0.69444,0.11473,0,0.59111],"176":[0,0.69444,0,0,0.94888],"184":[0.17014,0,0,0,0.53222],"198":[0,0.68611,0.11431,0,1.02277],"216":[0.04861,0.73472,0.09062,0,0.88555],"223":[0.19444,0.69444,0.09736,0,0.665],"230":[0,0.44444,0.085,0,0.82666],"248":[0.09722,0.54167,0.09458,0,0.59111],"305":[0,0.44444,0.09426,0,0.35555],"338":[0,0.68611,0.11431,0,1.14054],"339":[0,0.44444,0.085,0,0.82666],"567":[0.19444,0.44444,0.04611,0,0.385],"710":[0,0.69444,0.06709,0,0.59111],"711":[0,0.63194,0.08271,0,0.59111],"713":[0,0.59444,0.10444,0,0.59111],"714":[0,0.69444,0.08528,0,0.59111],"715":[0,0.69444,0,0,0.59111],"728":[0,0.69444,0.10333,0,0.59111],"729":[0,0.69444,0.12945,0,0.35555],"730":[0,0.69444,0,0,0.94888],"732":[0,0.69444,0.11472,0,0.59111],"733":[0,0.69444,0.11472,0,0.59111],"915":[0,0.68611,0.12903,0,0.69777],"916":[0,0.68611,0,0,0.94444],"920":[0,0.68611,0.09062,0,0.88555],"923":[0,0.68611,0,0,0.80666],"926":[0,0.68611,0.15092,0,0.76777],"928":[0,0.68611,0.17208,0,0.8961],"931":[0,0.68611,0.11431,0,0.82666],"933":[0,0.68611,0.10778,0,0.88555],"934":[0,0.68611,0.05632,0,0.82666],"936":[0,0.68611,0.10778,0,0.88555],"937":[0,0.68611,0.0992,0,0.82666],"8211":[0,0.44444,0.09811,0,0.59111],"8212":[0,0.44444,0.09811,0,1.18221],"8216":[0,0.69444,0.12945,0,0.35555],"8217":[0,0.69444,0.12945,0,0.35555],"8220":[0,0.69444,0.16772,0,0.62055],"8221":[0,0.69444,0.07939,0,0.62055]},"Main-Italic":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0.12417,0,0.30667],"34":[0,0.69444,0.06961,0,0.51444],"35":[0.19444,0.69444,0.06616,0,0.81777],"37":[0.05556,0.75,0.13639,0,0.81777],"38":[0,0.69444,0.09694,0,0.76666],"39":[0,0.69444,0.12417,0,0.30667],"40":[0.25,0.75,0.16194,0,0.40889],"41":[0.25,0.75,0.03694,0,0.40889],"42":[0,0.75,0.14917,0,0.51111],"43":[0.05667,0.56167,0.03694,0,0.76666],"44":[0.19444,0.10556,0,0,0.30667],"45":[0,0.43056,0.02826,0,0.35778],"46":[0,0.10556,0,0,0.30667],"47":[0.25,0.75,0.16194,0,0.51111],"48":[0,0.64444,0.13556,0,0.51111],"49":[0,0.64444,0.13556,0,0.51111],"50":[0,0.64444,0.13556,0,0.51111],"51":[0,0.64444,0.13556,0,0.51111],"52":[0.19444,0.64444,0.13556,0,0.51111],"53":[0,0.64444,0.13556,0,0.51111],"54":[0,0.64444,0.13556,0,0.51111],"55":[0.19444,0.64444,0.13556,0,0.51111],"56":[0,0.64444,0.13556,0,0.51111],"57":[0,0.64444,0.13556,0,0.51111],"58":[0,0.43056,0.0582,0,0.30667],"59":[0.19444,0.43056,0.0582,0,0.30667],"61":[-0.13313,0.36687,0.06616,0,0.76666],"63":[0,0.69444,0.1225,0,0.51111],"64":[0,0.69444,0.09597,0,0.76666],"65":[0,0.68333,0,0,0.74333],"66":[0,0.68333,0.10257,0,0.70389],"67":[0,0.68333,0.14528,0,0.71555],"68":[0,0.68333,0.09403,0,0.755],"69":[0,0.68333,0.12028,0,0.67833],"70":[0,0.68333,0.13305,0,0.65277],"71":[0,0.68333,0.08722,0,0.77361],"72":[0,0.68333,0.16389,0,0.74333],"73":[0,0.68333,0.15806,0,0.38555],"74":[0,0.68333,0.14028,0,0.525],"75":[0,0.68333,0.14528,0,0.76888],"76":[0,0.68333,0,0,0.62722],"77":[0,0.68333,0.16389,0,0.89666],"78":[0,0.68333,0.16389,0,0.74333],"79":[0,0.68333,0.09403,0,0.76666],"80":[0,0.68333,0.10257,0,0.67833],"81":[0.19444,0.68333,0.09403,0,0.76666],"82":[0,0.68333,0.03868,0,0.72944],"83":[0,0.68333,0.11972,0,0.56222],"84":[0,0.68333,0.13305,0,0.71555],"85":[0,0.68333,0.16389,0,0.74333],"86":[0,0.68333,0.18361,0,0.74333],"87":[0,0.68333,0.18361,0,0.99888],"88":[0,0.68333,0.15806,0,0.74333],"89":[0,0.68333,0.19383,0,0.74333],"90":[0,0.68333,0.14528,0,0.61333],"91":[0.25,0.75,0.1875,0,0.30667],"93":[0.25,0.75,0.10528,0,0.30667],"94":[0,0.69444,0.06646,0,0.51111],"95":[0.31,0.12056,0.09208,0,0.51111],"97":[0,0.43056,0.07671,0,0.51111],"98":[0,0.69444,0.06312,0,0.46],"99":[0,0.43056,0.05653,0,0.46],"100":[0,0.69444,0.10333,0,0.51111],"101":[0,0.43056,0.07514,0,0.46],"102":[0.19444,0.69444,0.21194,0,0.30667],"103":[0.19444,0.43056,0.08847,0,0.46],"104":[0,0.69444,0.07671,0,0.51111],"105":[0,0.65536,0.1019,0,0.30667],"106":[0.19444,0.65536,0.14467,0,0.30667],"107":[0,0.69444,0.10764,0,0.46],"108":[0,0.69444,0.10333,0,0.25555],"109":[0,0.43056,0.07671,0,0.81777],"110":[0,0.43056,0.07671,0,0.56222],"111":[0,0.43056,0.06312,0,0.51111],"112":[0.19444,0.43056,0.06312,0,0.51111],"113":[0.19444,0.43056,0.08847,0,0.46],"114":[0,0.43056,0.10764,0,0.42166],"115":[0,0.43056,0.08208,0,0.40889],"116":[0,0.61508,0.09486,0,0.33222],"117":[0,0.43056,0.07671,0,0.53666],"118":[0,0.43056,0.10764,0,0.46],"119":[0,0.43056,0.10764,0,0.66444],"120":[0,0.43056,0.12042,0,0.46389],"121":[0.19444,0.43056,0.08847,0,0.48555],"122":[0,0.43056,0.12292,0,0.40889],"126":[0.35,0.31786,0.11585,0,0.51111],"160":[0,0,0,0,0.25],"168":[0,0.66786,0.10474,0,0.51111],"176":[0,0.69444,0,0,0.83129],"184":[0.17014,0,0,0,0.46],"198":[0,0.68333,0.12028,0,0.88277],"216":[0.04861,0.73194,0.09403,0,0.76666],"223":[0.19444,0.69444,0.10514,0,0.53666],"230":[0,0.43056,0.07514,0,0.71555],"248":[0.09722,0.52778,0.09194,0,0.51111],"338":[0,0.68333,0.12028,0,0.98499],"339":[0,0.43056,0.07514,0,0.71555],"710":[0,0.69444,0.06646,0,0.51111],"711":[0,0.62847,0.08295,0,0.51111],"713":[0,0.56167,0.10333,0,0.51111],"714":[0,0.69444,0.09694,0,0.51111],"715":[0,0.69444,0,0,0.51111],"728":[0,0.69444,0.10806,0,0.51111],"729":[0,0.66786,0.11752,0,0.30667],"730":[0,0.69444,0,0,0.83129],"732":[0,0.66786,0.11585,0,0.51111],"733":[0,0.69444,0.1225,0,0.51111],"915":[0,0.68333,0.13305,0,0.62722],"916":[0,0.68333,0,0,0.81777],"920":[0,0.68333,0.09403,0,0.76666],"923":[0,0.68333,0,0,0.69222],"926":[0,0.68333,0.15294,0,0.66444],"928":[0,0.68333,0.16389,0,0.74333],"931":[0,0.68333,0.12028,0,0.71555],"933":[0,0.68333,0.11111,0,0.76666],"934":[0,0.68333,0.05986,0,0.71555],"936":[0,0.68333,0.11111,0,0.76666],"937":[0,0.68333,0.10257,0,0.71555],"8211":[0,0.43056,0.09208,0,0.51111],"8212":[0,0.43056,0.09208,0,1.02222],"8216":[0,0.69444,0.12417,0,0.30667],"8217":[0,0.69444,0.12417,0,0.30667],"8220":[0,0.69444,0.1685,0,0.51444],"8221":[0,0.69444,0.06961,0,0.51444],"8463":[0,0.68889,0,0,0.54028]},"Main-Regular":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.27778],"34":[0,0.69444,0,0,0.5],"35":[0.19444,0.69444,0,0,0.83334],"36":[0.05556,0.75,0,0,0.5],"37":[0.05556,0.75,0,0,0.83334],"38":[0,0.69444,0,0,0.77778],"39":[0,0.69444,0,0,0.27778],"40":[0.25,0.75,0,0,0.38889],"41":[0.25,0.75,0,0,0.38889],"42":[0,0.75,0,0,0.5],"43":[0.08333,0.58333,0,0,0.77778],"44":[0.19444,0.10556,0,0,0.27778],"45":[0,0.43056,0,0,0.33333],"46":[0,0.10556,0,0,0.27778],"47":[0.25,0.75,0,0,0.5],"48":[0,0.64444,0,0,0.5],"49":[0,0.64444,0,0,0.5],"50":[0,0.64444,0,0,0.5],"51":[0,0.64444,0,0,0.5],"52":[0,0.64444,0,0,0.5],"53":[0,0.64444,0,0,0.5],"54":[0,0.64444,0,0,0.5],"55":[0,0.64444,0,0,0.5],"56":[0,0.64444,0,0,0.5],"57":[0,0.64444,0,0,0.5],"58":[0,0.43056,0,0,0.27778],"59":[0.19444,0.43056,0,0,0.27778],"60":[0.0391,0.5391,0,0,0.77778],"61":[-0.13313,0.36687,0,0,0.77778],"62":[0.0391,0.5391,0,0,0.77778],"63":[0,0.69444,0,0,0.47222],"64":[0,0.69444,0,0,0.77778],"65":[0,0.68333,0,0,0.75],"66":[0,0.68333,0,0,0.70834],"67":[0,0.68333,0,0,0.72222],"68":[0,0.68333,0,0,0.76389],"69":[0,0.68333,0,0,0.68056],"70":[0,0.68333,0,0,0.65278],"71":[0,0.68333,0,0,0.78472],"72":[0,0.68333,0,0,0.75],"73":[0,0.68333,0,0,0.36111],"74":[0,0.68333,0,0,0.51389],"75":[0,0.68333,0,0,0.77778],"76":[0,0.68333,0,0,0.625],"77":[0,0.68333,0,0,0.91667],"78":[0,0.68333,0,0,0.75],"79":[0,0.68333,0,0,0.77778],"80":[0,0.68333,0,0,0.68056],"81":[0.19444,0.68333,0,0,0.77778],"82":[0,0.68333,0,0,0.73611],"83":[0,0.68333,0,0,0.55556],"84":[0,0.68333,0,0,0.72222],"85":[0,0.68333,0,0,0.75],"86":[0,0.68333,0.01389,0,0.75],"87":[0,0.68333,0.01389,0,1.02778],"88":[0,0.68333,0,0,0.75],"89":[0,0.68333,0.025,0,0.75],"90":[0,0.68333,0,0,0.61111],"91":[0.25,0.75,0,0,0.27778],"92":[0.25,0.75,0,0,0.5],"93":[0.25,0.75,0,0,0.27778],"94":[0,0.69444,0,0,0.5],"95":[0.31,0.12056,0.02778,0,0.5],"97":[0,0.43056,0,0,0.5],"98":[0,0.69444,0,0,0.55556],"99":[0,0.43056,0,0,0.44445],"100":[0,0.69444,0,0,0.55556],"101":[0,0.43056,0,0,0.44445],"102":[0,0.69444,0.07778,0,0.30556],"103":[0.19444,0.43056,0.01389,0,0.5],"104":[0,0.69444,0,0,0.55556],"105":[0,0.66786,0,0,0.27778],"106":[0.19444,0.66786,0,0,0.30556],"107":[0,0.69444,0,0,0.52778],"108":[0,0.69444,0,0,0.27778],"109":[0,0.43056,0,0,0.83334],"110":[0,0.43056,0,0,0.55556],"111":[0,0.43056,0,0,0.5],"112":[0.19444,0.43056,0,0,0.55556],"113":[0.19444,0.43056,0,0,0.52778],"114":[0,0.43056,0,0,0.39167],"115":[0,0.43056,0,0,0.39445],"116":[0,0.61508,0,0,0.38889],"117":[0,0.43056,0,0,0.55556],"118":[0,0.43056,0.01389,0,0.52778],"119":[0,0.43056,0.01389,0,0.72222],"120":[0,0.43056,0,0,0.52778],"121":[0.19444,0.43056,0.01389,0,0.52778],"122":[0,0.43056,0,0,0.44445],"123":[0.25,0.75,0,0,0.5],"124":[0.25,0.75,0,0,0.27778],"125":[0.25,0.75,0,0,0.5],"126":[0.35,0.31786,0,0,0.5],"160":[0,0,0,0,0.25],"163":[0,0.69444,0,0,0.76909],"167":[0.19444,0.69444,0,0,0.44445],"168":[0,0.66786,0,0,0.5],"172":[0,0.43056,0,0,0.66667],"176":[0,0.69444,0,0,0.75],"177":[0.08333,0.58333,0,0,0.77778],"182":[0.19444,0.69444,0,0,0.61111],"184":[0.17014,0,0,0,0.44445],"198":[0,0.68333,0,0,0.90278],"215":[0.08333,0.58333,0,0,0.77778],"216":[0.04861,0.73194,0,0,0.77778],"223":[0,0.69444,0,0,0.5],"230":[0,0.43056,0,0,0.72222],"247":[0.08333,0.58333,0,0,0.77778],"248":[0.09722,0.52778,0,0,0.5],"305":[0,0.43056,0,0,0.27778],"338":[0,0.68333,0,0,1.01389],"339":[0,0.43056,0,0,0.77778],"567":[0.19444,0.43056,0,0,0.30556],"710":[0,0.69444,0,0,0.5],"711":[0,0.62847,0,0,0.5],"713":[0,0.56778,0,0,0.5],"714":[0,0.69444,0,0,0.5],"715":[0,0.69444,0,0,0.5],"728":[0,0.69444,0,0,0.5],"729":[0,0.66786,0,0,0.27778],"730":[0,0.69444,0,0,0.75],"732":[0,0.66786,0,0,0.5],"733":[0,0.69444,0,0,0.5],"915":[0,0.68333,0,0,0.625],"916":[0,0.68333,0,0,0.83334],"920":[0,0.68333,0,0,0.77778],"923":[0,0.68333,0,0,0.69445],"926":[0,0.68333,0,0,0.66667],"928":[0,0.68333,0,0,0.75],"931":[0,0.68333,0,0,0.72222],"933":[0,0.68333,0,0,0.77778],"934":[0,0.68333,0,0,0.72222],"936":[0,0.68333,0,0,0.77778],"937":[0,0.68333,0,0,0.72222],"8211":[0,0.43056,0.02778,0,0.5],"8212":[0,0.43056,0.02778,0,1],"8216":[0,0.69444,0,0,0.27778],"8217":[0,0.69444,0,0,0.27778],"8220":[0,0.69444,0,0,0.5],"8221":[0,0.69444,0,0,0.5],"8224":[0.19444,0.69444,0,0,0.44445],"8225":[0.19444,0.69444,0,0,0.44445],"8230":[0,0.123,0,0,1.172],"8242":[0,0.55556,0,0,0.275],"8407":[0,0.71444,0.15382,0,0.5],"8463":[0,0.68889,0,0,0.54028],"8465":[0,0.69444,0,0,0.72222],"8467":[0,0.69444,0,0.11111,0.41667],"8472":[0.19444,0.43056,0,0.11111,0.63646],"8476":[0,0.69444,0,0,0.72222],"8501":[0,0.69444,0,0,0.61111],"8592":[-0.13313,0.36687,0,0,1],"8593":[0.19444,0.69444,0,0,0.5],"8594":[-0.13313,0.36687,0,0,1],"8595":[0.19444,0.69444,0,0,0.5],"8596":[-0.13313,0.36687,0,0,1],"8597":[0.25,0.75,0,0,0.5],"8598":[0.19444,0.69444,0,0,1],"8599":[0.19444,0.69444,0,0,1],"8600":[0.19444,0.69444,0,0,1],"8601":[0.19444,0.69444,0,0,1],"8614":[0.011,0.511,0,0,1],"8617":[0.011,0.511,0,0,1.126],"8618":[0.011,0.511,0,0,1.126],"8636":[-0.13313,0.36687,0,0,1],"8637":[-0.13313,0.36687,0,0,1],"8640":[-0.13313,0.36687,0,0,1],"8641":[-0.13313,0.36687,0,0,1],"8652":[0.011,0.671,0,0,1],"8656":[-0.13313,0.36687,0,0,1],"8657":[0.19444,0.69444,0,0,0.61111],"8658":[-0.13313,0.36687,0,0,1],"8659":[0.19444,0.69444,0,0,0.61111],"8660":[-0.13313,0.36687,0,0,1],"8661":[0.25,0.75,0,0,0.61111],"8704":[0,0.69444,0,0,0.55556],"8706":[0,0.69444,0.05556,0.08334,0.5309],"8707":[0,0.69444,0,0,0.55556],"8709":[0.05556,0.75,0,0,0.5],"8711":[0,0.68333,0,0,0.83334],"8712":[0.0391,0.5391,0,0,0.66667],"8715":[0.0391,0.5391,0,0,0.66667],"8722":[0.08333,0.58333,0,0,0.77778],"8723":[0.08333,0.58333,0,0,0.77778],"8725":[0.25,0.75,0,0,0.5],"8726":[0.25,0.75,0,0,0.5],"8727":[-0.03472,0.46528,0,0,0.5],"8728":[-0.05555,0.44445,0,0,0.5],"8729":[-0.05555,0.44445,0,0,0.5],"8730":[0.2,0.8,0,0,0.83334],"8733":[0,0.43056,0,0,0.77778],"8734":[0,0.43056,0,0,1],"8736":[0,0.69224,0,0,0.72222],"8739":[0.25,0.75,0,0,0.27778],"8741":[0.25,0.75,0,0,0.5],"8743":[0,0.55556,0,0,0.66667],"8744":[0,0.55556,0,0,0.66667],"8745":[0,0.55556,0,0,0.66667],"8746":[0,0.55556,0,0,0.66667],"8747":[0.19444,0.69444,0.11111,0,0.41667],"8764":[-0.13313,0.36687,0,0,0.77778],"8768":[0.19444,0.69444,0,0,0.27778],"8771":[-0.03625,0.46375,0,0,0.77778],"8773":[-0.022,0.589,0,0,0.778],"8776":[-0.01688,0.48312,0,0,0.77778],"8781":[-0.03625,0.46375,0,0,0.77778],"8784":[-0.133,0.673,0,0,0.778],"8801":[-0.03625,0.46375,0,0,0.77778],"8804":[0.13597,0.63597,0,0,0.77778],"8805":[0.13597,0.63597,0,0,0.77778],"8810":[0.0391,0.5391,0,0,1],"8811":[0.0391,0.5391,0,0,1],"8826":[0.0391,0.5391,0,0,0.77778],"8827":[0.0391,0.5391,0,0,0.77778],"8834":[0.0391,0.5391,0,0,0.77778],"8835":[0.0391,0.5391,0,0,0.77778],"8838":[0.13597,0.63597,0,0,0.77778],"8839":[0.13597,0.63597,0,0,0.77778],"8846":[0,0.55556,0,0,0.66667],"8849":[0.13597,0.63597,0,0,0.77778],"8850":[0.13597,0.63597,0,0,0.77778],"8851":[0,0.55556,0,0,0.66667],"8852":[0,0.55556,0,0,0.66667],"8853":[0.08333,0.58333,0,0,0.77778],"8854":[0.08333,0.58333,0,0,0.77778],"8855":[0.08333,0.58333,0,0,0.77778],"8856":[0.08333,0.58333,0,0,0.77778],"8857":[0.08333,0.58333,0,0,0.77778],"8866":[0,0.69444,0,0,0.61111],"8867":[0,0.69444,0,0,0.61111],"8868":[0,0.69444,0,0,0.77778],"8869":[0,0.69444,0,0,0.77778],"8872":[0.249,0.75,0,0,0.867],"8900":[-0.05555,0.44445,0,0,0.5],"8901":[-0.05555,0.44445,0,0,0.27778],"8902":[-0.03472,0.46528,0,0,0.5],"8904":[0.005,0.505,0,0,0.9],"8942":[0.03,0.903,0,0,0.278],"8943":[-0.19,0.313,0,0,1.172],"8945":[-0.1,0.823,0,0,1.282],"8968":[0.25,0.75,0,0,0.44445],"8969":[0.25,0.75,0,0,0.44445],"8970":[0.25,0.75,0,0,0.44445],"8971":[0.25,0.75,0,0,0.44445],"8994":[-0.14236,0.35764,0,0,1],"8995":[-0.14236,0.35764,0,0,1],"9136":[0.244,0.744,0,0,0.412],"9137":[0.244,0.745,0,0,0.412],"9651":[0.19444,0.69444,0,0,0.88889],"9657":[-0.03472,0.46528,0,0,0.5],"9661":[0.19444,0.69444,0,0,0.88889],"9667":[-0.03472,0.46528,0,0,0.5],"9711":[0.19444,0.69444,0,0,1],"9824":[0.12963,0.69444,0,0,0.77778],"9825":[0.12963,0.69444,0,0,0.77778],"9826":[0.12963,0.69444,0,0,0.77778],"9827":[0.12963,0.69444,0,0,0.77778],"9837":[0,0.75,0,0,0.38889],"9838":[0.19444,0.69444,0,0,0.38889],"9839":[0.19444,0.69444,0,0,0.38889],"10216":[0.25,0.75,0,0,0.38889],"10217":[0.25,0.75,0,0,0.38889],"10222":[0.244,0.744,0,0,0.412],"10223":[0.244,0.745,0,0,0.412],"10229":[0.011,0.511,0,0,1.609],"10230":[0.011,0.511,0,0,1.638],"10231":[0.011,0.511,0,0,1.859],"10232":[0.024,0.525,0,0,1.609],"10233":[0.024,0.525,0,0,1.638],"10234":[0.024,0.525,0,0,1.858],"10236":[0.011,0.511,0,0,1.638],"10815":[0,0.68333,0,0,0.75],"10927":[0.13597,0.63597,0,0,0.77778],"10928":[0.13597,0.63597,0,0,0.77778],"57376":[0.19444,0.69444,0,0,0]},"Math-BoldItalic":{"32":[0,0,0,0,0.25],"48":[0,0.44444,0,0,0.575],"49":[0,0.44444,0,0,0.575],"50":[0,0.44444,0,0,0.575],"51":[0.19444,0.44444,0,0,0.575],"52":[0.19444,0.44444,0,0,0.575],"53":[0.19444,0.44444,0,0,0.575],"54":[0,0.64444,0,0,0.575],"55":[0.19444,0.44444,0,0,0.575],"56":[0,0.64444,0,0,0.575],"57":[0.19444,0.44444,0,0,0.575],"65":[0,0.68611,0,0,0.86944],"66":[0,0.68611,0.04835,0,0.8664],"67":[0,0.68611,0.06979,0,0.81694],"68":[0,0.68611,0.03194,0,0.93812],"69":[0,0.68611,0.05451,0,0.81007],"70":[0,0.68611,0.15972,0,0.68889],"71":[0,0.68611,0,0,0.88673],"72":[0,0.68611,0.08229,0,0.98229],"73":[0,0.68611,0.07778,0,0.51111],"74":[0,0.68611,0.10069,0,0.63125],"75":[0,0.68611,0.06979,0,0.97118],"76":[0,0.68611,0,0,0.75555],"77":[0,0.68611,0.11424,0,1.14201],"78":[0,0.68611,0.11424,0,0.95034],"79":[0,0.68611,0.03194,0,0.83666],"80":[0,0.68611,0.15972,0,0.72309],"81":[0.19444,0.68611,0,0,0.86861],"82":[0,0.68611,0.00421,0,0.87235],"83":[0,0.68611,0.05382,0,0.69271],"84":[0,0.68611,0.15972,0,0.63663],"85":[0,0.68611,0.11424,0,0.80027],"86":[0,0.68611,0.25555,0,0.67778],"87":[0,0.68611,0.15972,0,1.09305],"88":[0,0.68611,0.07778,0,0.94722],"89":[0,0.68611,0.25555,0,0.67458],"90":[0,0.68611,0.06979,0,0.77257],"97":[0,0.44444,0,0,0.63287],"98":[0,0.69444,0,0,0.52083],"99":[0,0.44444,0,0,0.51342],"100":[0,0.69444,0,0,0.60972],"101":[0,0.44444,0,0,0.55361],"102":[0.19444,0.69444,0.11042,0,0.56806],"103":[0.19444,0.44444,0.03704,0,0.5449],"104":[0,0.69444,0,0,0.66759],"105":[0,0.69326,0,0,0.4048],"106":[0.19444,0.69326,0.0622,0,0.47083],"107":[0,0.69444,0.01852,0,0.6037],"108":[0,0.69444,0.0088,0,0.34815],"109":[0,0.44444,0,0,1.0324],"110":[0,0.44444,0,0,0.71296],"111":[0,0.44444,0,0,0.58472],"112":[0.19444,0.44444,0,0,0.60092],"113":[0.19444,0.44444,0.03704,0,0.54213],"114":[0,0.44444,0.03194,0,0.5287],"115":[0,0.44444,0,0,0.53125],"116":[0,0.63492,0,0,0.41528],"117":[0,0.44444,0,0,0.68102],"118":[0,0.44444,0.03704,0,0.56666],"119":[0,0.44444,0.02778,0,0.83148],"120":[0,0.44444,0,0,0.65903],"121":[0.19444,0.44444,0.03704,0,0.59028],"122":[0,0.44444,0.04213,0,0.55509],"160":[0,0,0,0,0.25],"915":[0,0.68611,0.15972,0,0.65694],"916":[0,0.68611,0,0,0.95833],"920":[0,0.68611,0.03194,0,0.86722],"923":[0,0.68611,0,0,0.80555],"926":[0,0.68611,0.07458,0,0.84125],"928":[0,0.68611,0.08229,0,0.98229],"931":[0,0.68611,0.05451,0,0.88507],"933":[0,0.68611,0.15972,0,0.67083],"934":[0,0.68611,0,0,0.76666],"936":[0,0.68611,0.11653,0,0.71402],"937":[0,0.68611,0.04835,0,0.8789],"945":[0,0.44444,0,0,0.76064],"946":[0.19444,0.69444,0.03403,0,0.65972],"947":[0.19444,0.44444,0.06389,0,0.59003],"948":[0,0.69444,0.03819,0,0.52222],"949":[0,0.44444,0,0,0.52882],"950":[0.19444,0.69444,0.06215,0,0.50833],"951":[0.19444,0.44444,0.03704,0,0.6],"952":[0,0.69444,0.03194,0,0.5618],"953":[0,0.44444,0,0,0.41204],"954":[0,0.44444,0,0,0.66759],"955":[0,0.69444,0,0,0.67083],"956":[0.19444,0.44444,0,0,0.70787],"957":[0,0.44444,0.06898,0,0.57685],"958":[0.19444,0.69444,0.03021,0,0.50833],"959":[0,0.44444,0,0,0.58472],"960":[0,0.44444,0.03704,0,0.68241],"961":[0.19444,0.44444,0,0,0.6118],"962":[0.09722,0.44444,0.07917,0,0.42361],"963":[0,0.44444,0.03704,0,0.68588],"964":[0,0.44444,0.13472,0,0.52083],"965":[0,0.44444,0.03704,0,0.63055],"966":[0.19444,0.44444,0,0,0.74722],"967":[0.19444,0.44444,0,0,0.71805],"968":[0.19444,0.69444,0.03704,0,0.75833],"969":[0,0.44444,0.03704,0,0.71782],"977":[0,0.69444,0,0,0.69155],"981":[0.19444,0.69444,0,0,0.7125],"982":[0,0.44444,0.03194,0,0.975],"1009":[0.19444,0.44444,0,0,0.6118],"1013":[0,0.44444,0,0,0.48333],"57649":[0,0.44444,0,0,0.39352],"57911":[0.19444,0.44444,0,0,0.43889]},"Math-Italic":{"32":[0,0,0,0,0.25],"48":[0,0.43056,0,0,0.5],"49":[0,0.43056,0,0,0.5],"50":[0,0.43056,0,0,0.5],"51":[0.19444,0.43056,0,0,0.5],"52":[0.19444,0.43056,0,0,0.5],"53":[0.19444,0.43056,0,0,0.5],"54":[0,0.64444,0,0,0.5],"55":[0.19444,0.43056,0,0,0.5],"56":[0,0.64444,0,0,0.5],"57":[0.19444,0.43056,0,0,0.5],"65":[0,0.68333,0,0.13889,0.75],"66":[0,0.68333,0.05017,0.08334,0.75851],"67":[0,0.68333,0.07153,0.08334,0.71472],"68":[0,0.68333,0.02778,0.05556,0.82792],"69":[0,0.68333,0.05764,0.08334,0.7382],"70":[0,0.68333,0.13889,0.08334,0.64306],"71":[0,0.68333,0,0.08334,0.78625],"72":[0,0.68333,0.08125,0.05556,0.83125],"73":[0,0.68333,0.07847,0.11111,0.43958],"74":[0,0.68333,0.09618,0.16667,0.55451],"75":[0,0.68333,0.07153,0.05556,0.84931],"76":[0,0.68333,0,0.02778,0.68056],"77":[0,0.68333,0.10903,0.08334,0.97014],"78":[0,0.68333,0.10903,0.08334,0.80347],"79":[0,0.68333,0.02778,0.08334,0.76278],"80":[0,0.68333,0.13889,0.08334,0.64201],"81":[0.19444,0.68333,0,0.08334,0.79056],"82":[0,0.68333,0.00773,0.08334,0.75929],"83":[0,0.68333,0.05764,0.08334,0.6132],"84":[0,0.68333,0.13889,0.08334,0.58438],"85":[0,0.68333,0.10903,0.02778,0.68278],"86":[0,0.68333,0.22222,0,0.58333],"87":[0,0.68333,0.13889,0,0.94445],"88":[0,0.68333,0.07847,0.08334,0.82847],"89":[0,0.68333,0.22222,0,0.58056],"90":[0,0.68333,0.07153,0.08334,0.68264],"97":[0,0.43056,0,0,0.52859],"98":[0,0.69444,0,0,0.42917],"99":[0,0.43056,0,0.05556,0.43276],"100":[0,0.69444,0,0.16667,0.52049],"101":[0,0.43056,0,0.05556,0.46563],"102":[0.19444,0.69444,0.10764,0.16667,0.48959],"103":[0.19444,0.43056,0.03588,0.02778,0.47697],"104":[0,0.69444,0,0,0.57616],"105":[0,0.65952,0,0,0.34451],"106":[0.19444,0.65952,0.05724,0,0.41181],"107":[0,0.69444,0.03148,0,0.5206],"108":[0,0.69444,0.01968,0.08334,0.29838],"109":[0,0.43056,0,0,0.87801],"110":[0,0.43056,0,0,0.60023],"111":[0,0.43056,0,0.05556,0.48472],"112":[0.19444,0.43056,0,0.08334,0.50313],"113":[0.19444,0.43056,0.03588,0.08334,0.44641],"114":[0,0.43056,0.02778,0.05556,0.45116],"115":[0,0.43056,0,0.05556,0.46875],"116":[0,0.61508,0,0.08334,0.36111],"117":[0,0.43056,0,0.02778,0.57246],"118":[0,0.43056,0.03588,0.02778,0.48472],"119":[0,0.43056,0.02691,0.08334,0.71592],"120":[0,0.43056,0,0.02778,0.57153],"121":[0.19444,0.43056,0.03588,0.05556,0.49028],"122":[0,0.43056,0.04398,0.05556,0.46505],"160":[0,0,0,0,0.25],"915":[0,0.68333,0.13889,0.08334,0.61528],"916":[0,0.68333,0,0.16667,0.83334],"920":[0,0.68333,0.02778,0.08334,0.76278],"923":[0,0.68333,0,0.16667,0.69445],"926":[0,0.68333,0.07569,0.08334,0.74236],"928":[0,0.68333,0.08125,0.05556,0.83125],"931":[0,0.68333,0.05764,0.08334,0.77986],"933":[0,0.68333,0.13889,0.05556,0.58333],"934":[0,0.68333,0,0.08334,0.66667],"936":[0,0.68333,0.11,0.05556,0.61222],"937":[0,0.68333,0.05017,0.08334,0.7724],"945":[0,0.43056,0.0037,0.02778,0.6397],"946":[0.19444,0.69444,0.05278,0.08334,0.56563],"947":[0.19444,0.43056,0.05556,0,0.51773],"948":[0,0.69444,0.03785,0.05556,0.44444],"949":[0,0.43056,0,0.08334,0.46632],"950":[0.19444,0.69444,0.07378,0.08334,0.4375],"951":[0.19444,0.43056,0.03588,0.05556,0.49653],"952":[0,0.69444,0.02778,0.08334,0.46944],"953":[0,0.43056,0,0.05556,0.35394],"954":[0,0.43056,0,0,0.57616],"955":[0,0.69444,0,0,0.58334],"956":[0.19444,0.43056,0,0.02778,0.60255],"957":[0,0.43056,0.06366,0.02778,0.49398],"958":[0.19444,0.69444,0.04601,0.11111,0.4375],"959":[0,0.43056,0,0.05556,0.48472],"960":[0,0.43056,0.03588,0,0.57003],"961":[0.19444,0.43056,0,0.08334,0.51702],"962":[0.09722,0.43056,0.07986,0.08334,0.36285],"963":[0,0.43056,0.03588,0,0.57141],"964":[0,0.43056,0.1132,0.02778,0.43715],"965":[0,0.43056,0.03588,0.02778,0.54028],"966":[0.19444,0.43056,0,0.08334,0.65417],"967":[0.19444,0.43056,0,0.05556,0.62569],"968":[0.19444,0.69444,0.03588,0.11111,0.65139],"969":[0,0.43056,0.03588,0,0.62245],"977":[0,0.69444,0,0.08334,0.59144],"981":[0.19444,0.69444,0,0.08334,0.59583],"982":[0,0.43056,0.02778,0,0.82813],"1009":[0.19444,0.43056,0,0.08334,0.51702],"1013":[0,0.43056,0,0.05556,0.4059],"57649":[0,0.43056,0,0.02778,0.32246],"57911":[0.19444,0.43056,0,0.08334,0.38403]},"SansSerif-Bold":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.36667],"34":[0,0.69444,0,0,0.55834],"35":[0.19444,0.69444,0,0,0.91667],"36":[0.05556,0.75,0,0,0.55],"37":[0.05556,0.75,0,0,1.02912],"38":[0,0.69444,0,0,0.83056],"39":[0,0.69444,0,0,0.30556],"40":[0.25,0.75,0,0,0.42778],"41":[0.25,0.75,0,0,0.42778],"42":[0,0.75,0,0,0.55],"43":[0.11667,0.61667,0,0,0.85556],"44":[0.10556,0.13056,0,0,0.30556],"45":[0,0.45833,0,0,0.36667],"46":[0,0.13056,0,0,0.30556],"47":[0.25,0.75,0,0,0.55],"48":[0,0.69444,0,0,0.55],"49":[0,0.69444,0,0,0.55],"50":[0,0.69444,0,0,0.55],"51":[0,0.69444,0,0,0.55],"52":[0,0.69444,0,0,0.55],"53":[0,0.69444,0,0,0.55],"54":[0,0.69444,0,0,0.55],"55":[0,0.69444,0,0,0.55],"56":[0,0.69444,0,0,0.55],"57":[0,0.69444,0,0,0.55],"58":[0,0.45833,0,0,0.30556],"59":[0.10556,0.45833,0,0,0.30556],"61":[-0.09375,0.40625,0,0,0.85556],"63":[0,0.69444,0,0,0.51945],"64":[0,0.69444,0,0,0.73334],"65":[0,0.69444,0,0,0.73334],"66":[0,0.69444,0,0,0.73334],"67":[0,0.69444,0,0,0.70278],"68":[0,0.69444,0,0,0.79445],"69":[0,0.69444,0,0,0.64167],"70":[0,0.69444,0,0,0.61111],"71":[0,0.69444,0,0,0.73334],"72":[0,0.69444,0,0,0.79445],"73":[0,0.69444,0,0,0.33056],"74":[0,0.69444,0,0,0.51945],"75":[0,0.69444,0,0,0.76389],"76":[0,0.69444,0,0,0.58056],"77":[0,0.69444,0,0,0.97778],"78":[0,0.69444,0,0,0.79445],"79":[0,0.69444,0,0,0.79445],"80":[0,0.69444,0,0,0.70278],"81":[0.10556,0.69444,0,0,0.79445],"82":[0,0.69444,0,0,0.70278],"83":[0,0.69444,0,0,0.61111],"84":[0,0.69444,0,0,0.73334],"85":[0,0.69444,0,0,0.76389],"86":[0,0.69444,0.01528,0,0.73334],"87":[0,0.69444,0.01528,0,1.03889],"88":[0,0.69444,0,0,0.73334],"89":[0,0.69444,0.0275,0,0.73334],"90":[0,0.69444,0,0,0.67223],"91":[0.25,0.75,0,0,0.34306],"93":[0.25,0.75,0,0,0.34306],"94":[0,0.69444,0,0,0.55],"95":[0.35,0.10833,0.03056,0,0.55],"97":[0,0.45833,0,0,0.525],"98":[0,0.69444,0,0,0.56111],"99":[0,0.45833,0,0,0.48889],"100":[0,0.69444,0,0,0.56111],"101":[0,0.45833,0,0,0.51111],"102":[0,0.69444,0.07639,0,0.33611],"103":[0.19444,0.45833,0.01528,0,0.55],"104":[0,0.69444,0,0,0.56111],"105":[0,0.69444,0,0,0.25556],"106":[0.19444,0.69444,0,0,0.28611],"107":[0,0.69444,0,0,0.53056],"108":[0,0.69444,0,0,0.25556],"109":[0,0.45833,0,0,0.86667],"110":[0,0.45833,0,0,0.56111],"111":[0,0.45833,0,0,0.55],"112":[0.19444,0.45833,0,0,0.56111],"113":[0.19444,0.45833,0,0,0.56111],"114":[0,0.45833,0.01528,0,0.37222],"115":[0,0.45833,0,0,0.42167],"116":[0,0.58929,0,0,0.40417],"117":[0,0.45833,0,0,0.56111],"118":[0,0.45833,0.01528,0,0.5],"119":[0,0.45833,0.01528,0,0.74445],"120":[0,0.45833,0,0,0.5],"121":[0.19444,0.45833,0.01528,0,0.5],"122":[0,0.45833,0,0,0.47639],"126":[0.35,0.34444,0,0,0.55],"160":[0,0,0,0,0.25],"168":[0,0.69444,0,0,0.55],"176":[0,0.69444,0,0,0.73334],"180":[0,0.69444,0,0,0.55],"184":[0.17014,0,0,0,0.48889],"305":[0,0.45833,0,0,0.25556],"567":[0.19444,0.45833,0,0,0.28611],"710":[0,0.69444,0,0,0.55],"711":[0,0.63542,0,0,0.55],"713":[0,0.63778,0,0,0.55],"728":[0,0.69444,0,0,0.55],"729":[0,0.69444,0,0,0.30556],"730":[0,0.69444,0,0,0.73334],"732":[0,0.69444,0,0,0.55],"733":[0,0.69444,0,0,0.55],"915":[0,0.69444,0,0,0.58056],"916":[0,0.69444,0,0,0.91667],"920":[0,0.69444,0,0,0.85556],"923":[0,0.69444,0,0,0.67223],"926":[0,0.69444,0,0,0.73334],"928":[0,0.69444,0,0,0.79445],"931":[0,0.69444,0,0,0.79445],"933":[0,0.69444,0,0,0.85556],"934":[0,0.69444,0,0,0.79445],"936":[0,0.69444,0,0,0.85556],"937":[0,0.69444,0,0,0.79445],"8211":[0,0.45833,0.03056,0,0.55],"8212":[0,0.45833,0.03056,0,1.10001],"8216":[0,0.69444,0,0,0.30556],"8217":[0,0.69444,0,0,0.30556],"8220":[0,0.69444,0,0,0.55834],"8221":[0,0.69444,0,0,0.55834]},"SansSerif-Italic":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0.05733,0,0.31945],"34":[0,0.69444,0.00316,0,0.5],"35":[0.19444,0.69444,0.05087,0,0.83334],"36":[0.05556,0.75,0.11156,0,0.5],"37":[0.05556,0.75,0.03126,0,0.83334],"38":[0,0.69444,0.03058,0,0.75834],"39":[0,0.69444,0.07816,0,0.27778],"40":[0.25,0.75,0.13164,0,0.38889],"41":[0.25,0.75,0.02536,0,0.38889],"42":[0,0.75,0.11775,0,0.5],"43":[0.08333,0.58333,0.02536,0,0.77778],"44":[0.125,0.08333,0,0,0.27778],"45":[0,0.44444,0.01946,0,0.33333],"46":[0,0.08333,0,0,0.27778],"47":[0.25,0.75,0.13164,0,0.5],"48":[0,0.65556,0.11156,0,0.5],"49":[0,0.65556,0.11156,0,0.5],"50":[0,0.65556,0.11156,0,0.5],"51":[0,0.65556,0.11156,0,0.5],"52":[0,0.65556,0.11156,0,0.5],"53":[0,0.65556,0.11156,0,0.5],"54":[0,0.65556,0.11156,0,0.5],"55":[0,0.65556,0.11156,0,0.5],"56":[0,0.65556,0.11156,0,0.5],"57":[0,0.65556,0.11156,0,0.5],"58":[0,0.44444,0.02502,0,0.27778],"59":[0.125,0.44444,0.02502,0,0.27778],"61":[-0.13,0.37,0.05087,0,0.77778],"63":[0,0.69444,0.11809,0,0.47222],"64":[0,0.69444,0.07555,0,0.66667],"65":[0,0.69444,0,0,0.66667],"66":[0,0.69444,0.08293,0,0.66667],"67":[0,0.69444,0.11983,0,0.63889],"68":[0,0.69444,0.07555,0,0.72223],"69":[0,0.69444,0.11983,0,0.59722],"70":[0,0.69444,0.13372,0,0.56945],"71":[0,0.69444,0.11983,0,0.66667],"72":[0,0.69444,0.08094,0,0.70834],"73":[0,0.69444,0.13372,0,0.27778],"74":[0,0.69444,0.08094,0,0.47222],"75":[0,0.69444,0.11983,0,0.69445],"76":[0,0.69444,0,0,0.54167],"77":[0,0.69444,0.08094,0,0.875],"78":[0,0.69444,0.08094,0,0.70834],"79":[0,0.69444,0.07555,0,0.73611],"80":[0,0.69444,0.08293,0,0.63889],"81":[0.125,0.69444,0.07555,0,0.73611],"82":[0,0.69444,0.08293,0,0.64584],"83":[0,0.69444,0.09205,0,0.55556],"84":[0,0.69444,0.13372,0,0.68056],"85":[0,0.69444,0.08094,0,0.6875],"86":[0,0.69444,0.1615,0,0.66667],"87":[0,0.69444,0.1615,0,0.94445],"88":[0,0.69444,0.13372,0,0.66667],"89":[0,0.69444,0.17261,0,0.66667],"90":[0,0.69444,0.11983,0,0.61111],"91":[0.25,0.75,0.15942,0,0.28889],"93":[0.25,0.75,0.08719,0,0.28889],"94":[0,0.69444,0.0799,0,0.5],"95":[0.35,0.09444,0.08616,0,0.5],"97":[0,0.44444,0.00981,0,0.48056],"98":[0,0.69444,0.03057,0,0.51667],"99":[0,0.44444,0.08336,0,0.44445],"100":[0,0.69444,0.09483,0,0.51667],"101":[0,0.44444,0.06778,0,0.44445],"102":[0,0.69444,0.21705,0,0.30556],"103":[0.19444,0.44444,0.10836,0,0.5],"104":[0,0.69444,0.01778,0,0.51667],"105":[0,0.67937,0.09718,0,0.23889],"106":[0.19444,0.67937,0.09162,0,0.26667],"107":[0,0.69444,0.08336,0,0.48889],"108":[0,0.69444,0.09483,0,0.23889],"109":[0,0.44444,0.01778,0,0.79445],"110":[0,0.44444,0.01778,0,0.51667],"111":[0,0.44444,0.06613,0,0.5],"112":[0.19444,0.44444,0.0389,0,0.51667],"113":[0.19444,0.44444,0.04169,0,0.51667],"114":[0,0.44444,0.10836,0,0.34167],"115":[0,0.44444,0.0778,0,0.38333],"116":[0,0.57143,0.07225,0,0.36111],"117":[0,0.44444,0.04169,0,0.51667],"118":[0,0.44444,0.10836,0,0.46111],"119":[0,0.44444,0.10836,0,0.68334],"120":[0,0.44444,0.09169,0,0.46111],"121":[0.19444,0.44444,0.10836,0,0.46111],"122":[0,0.44444,0.08752,0,0.43472],"126":[0.35,0.32659,0.08826,0,0.5],"160":[0,0,0,0,0.25],"168":[0,0.67937,0.06385,0,0.5],"176":[0,0.69444,0,0,0.73752],"184":[0.17014,0,0,0,0.44445],"305":[0,0.44444,0.04169,0,0.23889],"567":[0.19444,0.44444,0.04169,0,0.26667],"710":[0,0.69444,0.0799,0,0.5],"711":[0,0.63194,0.08432,0,0.5],"713":[0,0.60889,0.08776,0,0.5],"714":[0,0.69444,0.09205,0,0.5],"715":[0,0.69444,0,0,0.5],"728":[0,0.69444,0.09483,0,0.5],"729":[0,0.67937,0.07774,0,0.27778],"730":[0,0.69444,0,0,0.73752],"732":[0,0.67659,0.08826,0,0.5],"733":[0,0.69444,0.09205,0,0.5],"915":[0,0.69444,0.13372,0,0.54167],"916":[0,0.69444,0,0,0.83334],"920":[0,0.69444,0.07555,0,0.77778],"923":[0,0.69444,0,0,0.61111],"926":[0,0.69444,0.12816,0,0.66667],"928":[0,0.69444,0.08094,0,0.70834],"931":[0,0.69444,0.11983,0,0.72222],"933":[0,0.69444,0.09031,0,0.77778],"934":[0,0.69444,0.04603,0,0.72222],"936":[0,0.69444,0.09031,0,0.77778],"937":[0,0.69444,0.08293,0,0.72222],"8211":[0,0.44444,0.08616,0,0.5],"8212":[0,0.44444,0.08616,0,1],"8216":[0,0.69444,0.07816,0,0.27778],"8217":[0,0.69444,0.07816,0,0.27778],"8220":[0,0.69444,0.14205,0,0.5],"8221":[0,0.69444,0.00316,0,0.5]},"SansSerif-Regular":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.31945],"34":[0,0.69444,0,0,0.5],"35":[0.19444,0.69444,0,0,0.83334],"36":[0.05556,0.75,0,0,0.5],"37":[0.05556,0.75,0,0,0.83334],"38":[0,0.69444,0,0,0.75834],"39":[0,0.69444,0,0,0.27778],"40":[0.25,0.75,0,0,0.38889],"41":[0.25,0.75,0,0,0.38889],"42":[0,0.75,0,0,0.5],"43":[0.08333,0.58333,0,0,0.77778],"44":[0.125,0.08333,0,0,0.27778],"45":[0,0.44444,0,0,0.33333],"46":[0,0.08333,0,0,0.27778],"47":[0.25,0.75,0,0,0.5],"48":[0,0.65556,0,0,0.5],"49":[0,0.65556,0,0,0.5],"50":[0,0.65556,0,0,0.5],"51":[0,0.65556,0,0,0.5],"52":[0,0.65556,0,0,0.5],"53":[0,0.65556,0,0,0.5],"54":[0,0.65556,0,0,0.5],"55":[0,0.65556,0,0,0.5],"56":[0,0.65556,0,0,0.5],"57":[0,0.65556,0,0,0.5],"58":[0,0.44444,0,0,0.27778],"59":[0.125,0.44444,0,0,0.27778],"61":[-0.13,0.37,0,0,0.77778],"63":[0,0.69444,0,0,0.47222],"64":[0,0.69444,0,0,0.66667],"65":[0,0.69444,0,0,0.66667],"66":[0,0.69444,0,0,0.66667],"67":[0,0.69444,0,0,0.63889],"68":[0,0.69444,0,0,0.72223],"69":[0,0.69444,0,0,0.59722],"70":[0,0.69444,0,0,0.56945],"71":[0,0.69444,0,0,0.66667],"72":[0,0.69444,0,0,0.70834],"73":[0,0.69444,0,0,0.27778],"74":[0,0.69444,0,0,0.47222],"75":[0,0.69444,0,0,0.69445],"76":[0,0.69444,0,0,0.54167],"77":[0,0.69444,0,0,0.875],"78":[0,0.69444,0,0,0.70834],"79":[0,0.69444,0,0,0.73611],"80":[0,0.69444,0,0,0.63889],"81":[0.125,0.69444,0,0,0.73611],"82":[0,0.69444,0,0,0.64584],"83":[0,0.69444,0,0,0.55556],"84":[0,0.69444,0,0,0.68056],"85":[0,0.69444,0,0,0.6875],"86":[0,0.69444,0.01389,0,0.66667],"87":[0,0.69444,0.01389,0,0.94445],"88":[0,0.69444,0,0,0.66667],"89":[0,0.69444,0.025,0,0.66667],"90":[0,0.69444,0,0,0.61111],"91":[0.25,0.75,0,0,0.28889],"93":[0.25,0.75,0,0,0.28889],"94":[0,0.69444,0,0,0.5],"95":[0.35,0.09444,0.02778,0,0.5],"97":[0,0.44444,0,0,0.48056],"98":[0,0.69444,0,0,0.51667],"99":[0,0.44444,0,0,0.44445],"100":[0,0.69444,0,0,0.51667],"101":[0,0.44444,0,0,0.44445],"102":[0,0.69444,0.06944,0,0.30556],"103":[0.19444,0.44444,0.01389,0,0.5],"104":[0,0.69444,0,0,0.51667],"105":[0,0.67937,0,0,0.23889],"106":[0.19444,0.67937,0,0,0.26667],"107":[0,0.69444,0,0,0.48889],"108":[0,0.69444,0,0,0.23889],"109":[0,0.44444,0,0,0.79445],"110":[0,0.44444,0,0,0.51667],"111":[0,0.44444,0,0,0.5],"112":[0.19444,0.44444,0,0,0.51667],"113":[0.19444,0.44444,0,0,0.51667],"114":[0,0.44444,0.01389,0,0.34167],"115":[0,0.44444,0,0,0.38333],"116":[0,0.57143,0,0,0.36111],"117":[0,0.44444,0,0,0.51667],"118":[0,0.44444,0.01389,0,0.46111],"119":[0,0.44444,0.01389,0,0.68334],"120":[0,0.44444,0,0,0.46111],"121":[0.19444,0.44444,0.01389,0,0.46111],"122":[0,0.44444,0,0,0.43472],"126":[0.35,0.32659,0,0,0.5],"160":[0,0,0,0,0.25],"168":[0,0.67937,0,0,0.5],"176":[0,0.69444,0,0,0.66667],"184":[0.17014,0,0,0,0.44445],"305":[0,0.44444,0,0,0.23889],"567":[0.19444,0.44444,0,0,0.26667],"710":[0,0.69444,0,0,0.5],"711":[0,0.63194,0,0,0.5],"713":[0,0.60889,0,0,0.5],"714":[0,0.69444,0,0,0.5],"715":[0,0.69444,0,0,0.5],"728":[0,0.69444,0,0,0.5],"729":[0,0.67937,0,0,0.27778],"730":[0,0.69444,0,0,0.66667],"732":[0,0.67659,0,0,0.5],"733":[0,0.69444,0,0,0.5],"915":[0,0.69444,0,0,0.54167],"916":[0,0.69444,0,0,0.83334],"920":[0,0.69444,0,0,0.77778],"923":[0,0.69444,0,0,0.61111],"926":[0,0.69444,0,0,0.66667],"928":[0,0.69444,0,0,0.70834],"931":[0,0.69444,0,0,0.72222],"933":[0,0.69444,0,0,0.77778],"934":[0,0.69444,0,0,0.72222],"936":[0,0.69444,0,0,0.77778],"937":[0,0.69444,0,0,0.72222],"8211":[0,0.44444,0.02778,0,0.5],"8212":[0,0.44444,0.02778,0,1],"8216":[0,0.69444,0,0,0.27778],"8217":[0,0.69444,0,0,0.27778],"8220":[0,0.69444,0,0,0.5],"8221":[0,0.69444,0,0,0.5]},"Script-Regular":{"32":[0,0,0,0,0.25],"65":[0,0.7,0.22925,0,0.80253],"66":[0,0.7,0.04087,0,0.90757],"67":[0,0.7,0.1689,0,0.66619],"68":[0,0.7,0.09371,0,0.77443],"69":[0,0.7,0.18583,0,0.56162],"70":[0,0.7,0.13634,0,0.89544],"71":[0,0.7,0.17322,0,0.60961],"72":[0,0.7,0.29694,0,0.96919],"73":[0,0.7,0.19189,0,0.80907],"74":[0.27778,0.7,0.19189,0,1.05159],"75":[0,0.7,0.31259,0,0.91364],"76":[0,0.7,0.19189,0,0.87373],"77":[0,0.7,0.15981,0,1.08031],"78":[0,0.7,0.3525,0,0.9015],"79":[0,0.7,0.08078,0,0.73787],"80":[0,0.7,0.08078,0,1.01262],"81":[0,0.7,0.03305,0,0.88282],"82":[0,0.7,0.06259,0,0.85],"83":[0,0.7,0.19189,0,0.86767],"84":[0,0.7,0.29087,0,0.74697],"85":[0,0.7,0.25815,0,0.79996],"86":[0,0.7,0.27523,0,0.62204],"87":[0,0.7,0.27523,0,0.80532],"88":[0,0.7,0.26006,0,0.94445],"89":[0,0.7,0.2939,0,0.70961],"90":[0,0.7,0.24037,0,0.8212],"160":[0,0,0,0,0.25]},"Size1-Regular":{"32":[0,0,0,0,0.25],"40":[0.35001,0.85,0,0,0.45834],"41":[0.35001,0.85,0,0,0.45834],"47":[0.35001,0.85,0,0,0.57778],"91":[0.35001,0.85,0,0,0.41667],"92":[0.35001,0.85,0,0,0.57778],"93":[0.35001,0.85,0,0,0.41667],"123":[0.35001,0.85,0,0,0.58334],"125":[0.35001,0.85,0,0,0.58334],"160":[0,0,0,0,0.25],"710":[0,0.72222,0,0,0.55556],"732":[0,0.72222,0,0,0.55556],"770":[0,0.72222,0,0,0.55556],"771":[0,0.72222,0,0,0.55556],"8214":[-0.00099,0.601,0,0,0.77778],"8593":[0.00001,0.6,0,0,0.66667],"8595":[0.00001,0.6,0,0,0.66667],"8657":[0.00001,0.6,0,0,0.77778],"8659":[0.00001,0.6,0,0,0.77778],"8719":[0.25001,0.75,0,0,0.94445],"8720":[0.25001,0.75,0,0,0.94445],"8721":[0.25001,0.75,0,0,1.05556],"8730":[0.35001,0.85,0,0,1],"8739":[-0.00599,0.606,0,0,0.33333],"8741":[-0.00599,0.606,0,0,0.55556],"8747":[0.30612,0.805,0.19445,0,0.47222],"8748":[0.306,0.805,0.19445,0,0.47222],"8749":[0.306,0.805,0.19445,0,0.47222],"8750":[0.30612,0.805,0.19445,0,0.47222],"8896":[0.25001,0.75,0,0,0.83334],"8897":[0.25001,0.75,0,0,0.83334],"8898":[0.25001,0.75,0,0,0.83334],"8899":[0.25001,0.75,0,0,0.83334],"8968":[0.35001,0.85,0,0,0.47222],"8969":[0.35001,0.85,0,0,0.47222],"8970":[0.35001,0.85,0,0,0.47222],"8971":[0.35001,0.85,0,0,0.47222],"9168":[-0.00099,0.601,0,0,0.66667],"10216":[0.35001,0.85,0,0,0.47222],"10217":[0.35001,0.85,0,0,0.47222],"10752":[0.25001,0.75,0,0,1.11111],"10753":[0.25001,0.75,0,0,1.11111],"10754":[0.25001,0.75,0,0,1.11111],"10756":[0.25001,0.75,0,0,0.83334],"10758":[0.25001,0.75,0,0,0.83334]},"Size2-Regular":{"32":[0,0,0,0,0.25],"40":[0.65002,1.15,0,0,0.59722],"41":[0.65002,1.15,0,0,0.59722],"47":[0.65002,1.15,0,0,0.81111],"91":[0.65002,1.15,0,0,0.47222],"92":[0.65002,1.15,0,0,0.81111],"93":[0.65002,1.15,0,0,0.47222],"123":[0.65002,1.15,0,0,0.66667],"125":[0.65002,1.15,0,0,0.66667],"160":[0,0,0,0,0.25],"710":[0,0.75,0,0,1],"732":[0,0.75,0,0,1],"770":[0,0.75,0,0,1],"771":[0,0.75,0,0,1],"8719":[0.55001,1.05,0,0,1.27778],"8720":[0.55001,1.05,0,0,1.27778],"8721":[0.55001,1.05,0,0,1.44445],"8730":[0.65002,1.15,0,0,1],"8747":[0.86225,1.36,0.44445,0,0.55556],"8748":[0.862,1.36,0.44445,0,0.55556],"8749":[0.862,1.36,0.44445,0,0.55556],"8750":[0.86225,1.36,0.44445,0,0.55556],"8896":[0.55001,1.05,0,0,1.11111],"8897":[0.55001,1.05,0,0,1.11111],"8898":[0.55001,1.05,0,0,1.11111],"8899":[0.55001,1.05,0,0,1.11111],"8968":[0.65002,1.15,0,0,0.52778],"8969":[0.65002,1.15,0,0,0.52778],"8970":[0.65002,1.15,0,0,0.52778],"8971":[0.65002,1.15,0,0,0.52778],"10216":[0.65002,1.15,0,0,0.61111],"10217":[0.65002,1.15,0,0,0.61111],"10752":[0.55001,1.05,0,0,1.51112],"10753":[0.55001,1.05,0,0,1.51112],"10754":[0.55001,1.05,0,0,1.51112],"10756":[0.55001,1.05,0,0,1.11111],"10758":[0.55001,1.05,0,0,1.11111]},"Size3-Regular":{"32":[0,0,0,0,0.25],"40":[0.95003,1.45,0,0,0.73611],"41":[0.95003,1.45,0,0,0.73611],"47":[0.95003,1.45,0,0,1.04445],"91":[0.95003,1.45,0,0,0.52778],"92":[0.95003,1.45,0,0,1.04445],"93":[0.95003,1.45,0,0,0.52778],"123":[0.95003,1.45,0,0,0.75],"125":[0.95003,1.45,0,0,0.75],"160":[0,0,0,0,0.25],"710":[0,0.75,0,0,1.44445],"732":[0,0.75,0,0,1.44445],"770":[0,0.75,0,0,1.44445],"771":[0,0.75,0,0,1.44445],"8730":[0.95003,1.45,0,0,1],"8968":[0.95003,1.45,0,0,0.58334],"8969":[0.95003,1.45,0,0,0.58334],"8970":[0.95003,1.45,0,0,0.58334],"8971":[0.95003,1.45,0,0,0.58334],"10216":[0.95003,1.45,0,0,0.75],"10217":[0.95003,1.45,0,0,0.75]},"Size4-Regular":{"32":[0,0,0,0,0.25],"40":[1.25003,1.75,0,0,0.79167],"41":[1.25003,1.75,0,0,0.79167],"47":[1.25003,1.75,0,0,1.27778],"91":[1.25003,1.75,0,0,0.58334],"92":[1.25003,1.75,0,0,1.27778],"93":[1.25003,1.75,0,0,0.58334],"123":[1.25003,1.75,0,0,0.80556],"125":[1.25003,1.75,0,0,0.80556],"160":[0,0,0,0,0.25],"710":[0,0.825,0,0,1.8889],"732":[0,0.825,0,0,1.8889],"770":[0,0.825,0,0,1.8889],"771":[0,0.825,0,0,1.8889],"8730":[1.25003,1.75,0,0,1],"8968":[1.25003,1.75,0,0,0.63889],"8969":[1.25003,1.75,0,0,0.63889],"8970":[1.25003,1.75,0,0,0.63889],"8971":[1.25003,1.75,0,0,0.63889],"9115":[0.64502,1.155,0,0,0.875],"9116":[0.00001,0.6,0,0,0.875],"9117":[0.64502,1.155,0,0,0.875],"9118":[0.64502,1.155,0,0,0.875],"9119":[0.00001,0.6,0,0,0.875],"9120":[0.64502,1.155,0,0,0.875],"9121":[0.64502,1.155,0,0,0.66667],"9122":[-0.00099,0.601,0,0,0.66667],"9123":[0.64502,1.155,0,0,0.66667],"9124":[0.64502,1.155,0,0,0.66667],"9125":[-0.00099,0.601,0,0,0.66667],"9126":[0.64502,1.155,0,0,0.66667],"9127":[0.00001,0.9,0,0,0.88889],"9128":[0.65002,1.15,0,0,0.88889],"9129":[0.90001,0,0,0,0.88889],"9130":[0,0.3,0,0,0.88889],"9131":[0.00001,0.9,0,0,0.88889],"9132":[0.65002,1.15,0,0,0.88889],"9133":[0.90001,0,0,0,0.88889],"9143":[0.88502,0.915,0,0,1.05556],"10216":[1.25003,1.75,0,0,0.80556],"10217":[1.25003,1.75,0,0,0.80556],"57344":[-0.00499,0.605,0,0,1.05556],"57345":[-0.00499,0.605,0,0,1.05556],"57680":[0,0.12,0,0,0.45],"57681":[0,0.12,0,0,0.45],"57682":[0,0.12,0,0,0.45],"57683":[0,0.12,0,0,0.45]},"Typewriter-Regular":{"32":[0,0,0,0,0.525],"33":[0,0.61111,0,0,0.525],"34":[0,0.61111,0,0,0.525],"35":[0,0.61111,0,0,0.525],"36":[0.08333,0.69444,0,0,0.525],"37":[0.08333,0.69444,0,0,0.525],"38":[0,0.61111,0,0,0.525],"39":[0,0.61111,0,0,0.525],"40":[0.08333,0.69444,0,0,0.525],"41":[0.08333,0.69444,0,0,0.525],"42":[0,0.52083,0,0,0.525],"43":[-0.08056,0.53055,0,0,0.525],"44":[0.13889,0.125,0,0,0.525],"45":[-0.08056,0.53055,0,0,0.525],"46":[0,0.125,0,0,0.525],"47":[0.08333,0.69444,0,0,0.525],"48":[0,0.61111,0,0,0.525],"49":[0,0.61111,0,0,0.525],"50":[0,0.61111,0,0,0.525],"51":[0,0.61111,0,0,0.525],"52":[0,0.61111,0,0,0.525],"53":[0,0.61111,0,0,0.525],"54":[0,0.61111,0,0,0.525],"55":[0,0.61111,0,0,0.525],"56":[0,0.61111,0,0,0.525],"57":[0,0.61111,0,0,0.525],"58":[0,0.43056,0,0,0.525],"59":[0.13889,0.43056,0,0,0.525],"60":[-0.05556,0.55556,0,0,0.525],"61":[-0.19549,0.41562,0,0,0.525],"62":[-0.05556,0.55556,0,0,0.525],"63":[0,0.61111,0,0,0.525],"64":[0,0.61111,0,0,0.525],"65":[0,0.61111,0,0,0.525],"66":[0,0.61111,0,0,0.525],"67":[0,0.61111,0,0,0.525],"68":[0,0.61111,0,0,0.525],"69":[0,0.61111,0,0,0.525],"70":[0,0.61111,0,0,0.525],"71":[0,0.61111,0,0,0.525],"72":[0,0.61111,0,0,0.525],"73":[0,0.61111,0,0,0.525],"74":[0,0.61111,0,0,0.525],"75":[0,0.61111,0,0,0.525],"76":[0,0.61111,0,0,0.525],"77":[0,0.61111,0,0,0.525],"78":[0,0.61111,0,0,0.525],"79":[0,0.61111,0,0,0.525],"80":[0,0.61111,0,0,0.525],"81":[0.13889,0.61111,0,0,0.525],"82":[0,0.61111,0,0,0.525],"83":[0,0.61111,0,0,0.525],"84":[0,0.61111,0,0,0.525],"85":[0,0.61111,0,0,0.525],"86":[0,0.61111,0,0,0.525],"87":[0,0.61111,0,0,0.525],"88":[0,0.61111,0,0,0.525],"89":[0,0.61111,0,0,0.525],"90":[0,0.61111,0,0,0.525],"91":[0.08333,0.69444,0,0,0.525],"92":[0.08333,0.69444,0,0,0.525],"93":[0.08333,0.69444,0,0,0.525],"94":[0,0.61111,0,0,0.525],"95":[0.09514,0,0,0,0.525],"96":[0,0.61111,0,0,0.525],"97":[0,0.43056,0,0,0.525],"98":[0,0.61111,0,0,0.525],"99":[0,0.43056,0,0,0.525],"100":[0,0.61111,0,0,0.525],"101":[0,0.43056,0,0,0.525],"102":[0,0.61111,0,0,0.525],"103":[0.22222,0.43056,0,0,0.525],"104":[0,0.61111,0,0,0.525],"105":[0,0.61111,0,0,0.525],"106":[0.22222,0.61111,0,0,0.525],"107":[0,0.61111,0,0,0.525],"108":[0,0.61111,0,0,0.525],"109":[0,0.43056,0,0,0.525],"110":[0,0.43056,0,0,0.525],"111":[0,0.43056,0,0,0.525],"112":[0.22222,0.43056,0,0,0.525],"113":[0.22222,0.43056,0,0,0.525],"114":[0,0.43056,0,0,0.525],"115":[0,0.43056,0,0,0.525],"116":[0,0.55358,0,0,0.525],"117":[0,0.43056,0,0,0.525],"118":[0,0.43056,0,0,0.525],"119":[0,0.43056,0,0,0.525],"120":[0,0.43056,0,0,0.525],"121":[0.22222,0.43056,0,0,0.525],"122":[0,0.43056,0,0,0.525],"123":[0.08333,0.69444,0,0,0.525],"124":[0.08333,0.69444,0,0,0.525],"125":[0.08333,0.69444,0,0,0.525],"126":[0,0.61111,0,0,0.525],"127":[0,0.61111,0,0,0.525],"160":[0,0,0,0,0.525],"176":[0,0.61111,0,0,0.525],"184":[0.19445,0,0,0,0.525],"305":[0,0.43056,0,0,0.525],"567":[0.22222,0.43056,0,0,0.525],"711":[0,0.56597,0,0,0.525],"713":[0,0.56555,0,0,0.525],"714":[0,0.61111,0,0,0.525],"715":[0,0.61111,0,0,0.525],"728":[0,0.61111,0,0,0.525],"730":[0,0.61111,0,0,0.525],"770":[0,0.61111,0,0,0.525],"771":[0,0.61111,0,0,0.525],"776":[0,0.61111,0,0,0.525],"915":[0,0.61111,0,0,0.525],"916":[0,0.61111,0,0,0.525],"920":[0,0.61111,0,0,0.525],"923":[0,0.61111,0,0,0.525],"926":[0,0.61111,0,0,0.525],"928":[0,0.61111,0,0,0.525],"931":[0,0.61111,0,0,0.525],"933":[0,0.61111,0,0,0.525],"934":[0,0.61111,0,0,0.525],"936":[0,0.61111,0,0,0.525],"937":[0,0.61111,0,0,0.525],"8216":[0,0.61111,0,0,0.525],"8217":[0,0.61111,0,0,0.525],"8242":[0,0.61111,0,0,0.525],"9251":[0.11111,0.21944,0,0,0.525]}};var Ga={slant:[0.25,0.25,0.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[0.431,0.431,0.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[0.677,0.732,0.925],num2:[0.394,0.384,0.387],num3:[0.444,0.471,0.504],denom1:[0.686,0.752,1.025],denom2:[0.345,0.344,0.532],sup1:[0.413,0.503,0.504],sup2:[0.363,0.431,0.404],sup3:[0.289,0.286,0.294],sub1:[0.15,0.143,0.2],sub2:[0.247,0.286,0.4],supDrop:[0.386,0.353,0.494],subDrop:[0.05,0.071,0.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[0.25,0.25,0.25],defaultRuleThickness:[0.04,0.049,0.049],bigOpSpacing1:[0.111,0.111,0.111],bigOpSpacing2:[0.166,0.166,0.166],bigOpSpacing3:[0.2,0.2,0.2],bigOpSpacing4:[0.6,0.611,0.611],bigOpSpacing5:[0.1,0.143,0.143],sqrtRuleThickness:[0.04,0.04,0.04],ptPerEm:[10,10,10],doubleRuleSep:[0.2,0.2,0.2],arrayRuleWidth:[0.04,0.04,0.04],fboxsep:[0.3,0.3,0.3],fboxrule:[0.04,0.04,0.04]},Du={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function p2(e,t){gn[e]=t}function Al(e,t,n){if(!gn[t])throw Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),s=gn[t][r];if(!s&&e[0]in Du)r=Du[e[0]].charCodeAt(0),s=gn[t][r];if(!s&&n==="text"){if(hd(r))s=gn[t][77]}if(s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var Ka={};function g2(e){var t;if(e>=5)t=0;else if(e>=3)t=1;else t=2;if(!Ka[t]){var n=Ka[t]={cssEmPerMu:Ga.quad[t]/18};for(var r of Object.keys(Ga))n[r]=Ga[r][t]}return Ka[t]}var Qe={math:{},text:{}};function f(e,t,n,r,s,i){if(Qe[e][s]={font:t,group:n,replace:r},i&&r)Qe[e][r]=Qe[e][s]}var m="math",J="text",v="main",S="ams",et="accent-token",pe="bin",It="close",gs="inner",_e="mathord",dt="op-token",Vt="open",fi="punct",M="rel",Pn="spacing",I="textord";f(m,v,M,"≡","\\equiv",!0);f(m,v,M,"≺","\\prec",!0);f(m,v,M,"≻","\\succ",!0);f(m,v,M,"∼","\\sim",!0);f(m,v,M,"⊥","\\perp");f(m,v,M,"⪯","\\preceq",!0);f(m,v,M,"⪰","\\succeq",!0);f(m,v,M,"≃","\\simeq",!0);f(m,v,M,"∣","\\mid",!0);f(m,v,M,"≪","\\ll",!0);f(m,v,M,"≫","\\gg",!0);f(m,v,M,"≍","\\asymp",!0);f(m,v,M,"∥","\\parallel");f(m,v,M,"⋈","\\bowtie",!0);f(m,v,M,"⌣","\\smile",!0);f(m,v,M,"⊑","\\sqsubseteq",!0);f(m,v,M,"⊒","\\sqsupseteq",!0);f(m,v,M,"≐","\\doteq",!0);f(m,v,M,"⌢","\\frown",!0);f(m,v,M,"∋","\\ni",!0);f(m,v,M,"∝","\\propto",!0);f(m,v,M,"⊢","\\vdash",!0);f(m,v,M,"⊣","\\dashv",!0);f(m,v,M,"∋","\\owns");f(m,v,fi,".","\\ldotp");f(m,v,fi,"⋅","\\cdotp");f(m,v,fi,"⋅","·");f(J,v,I,"⋅","·");f(m,v,I,"#","\\#");f(J,v,I,"#","\\#");f(m,v,I,"&","\\&");f(J,v,I,"&","\\&");f(m,v,I,"ℵ","\\aleph",!0);f(m,v,I,"∀","\\forall",!0);f(m,v,I,"ℏ","\\hbar",!0);f(m,v,I,"∃","\\exists",!0);f(m,v,I,"∇","\\nabla",!0);f(m,v,I,"♭","\\flat",!0);f(m,v,I,"ℓ","\\ell",!0);f(m,v,I,"♮","\\natural",!0);f(m,v,I,"♣","\\clubsuit",!0);f(m,v,I,"℘","\\wp",!0);f(m,v,I,"♯","\\sharp",!0);f(m,v,I,"♢","\\diamondsuit",!0);f(m,v,I,"ℜ","\\Re",!0);f(m,v,I,"♡","\\heartsuit",!0);f(m,v,I,"ℑ","\\Im",!0);f(m,v,I,"♠","\\spadesuit",!0);f(m,v,I,"§","\\S",!0);f(J,v,I,"§","\\S");f(m,v,I,"¶","\\P",!0);f(J,v,I,"¶","\\P");f(m,v,I,"†","\\dag");f(J,v,I,"†","\\dag");f(J,v,I,"†","\\textdagger");f(m,v,I,"‡","\\ddag");f(J,v,I,"‡","\\ddag");f(J,v,I,"‡","\\textdaggerdbl");f(m,v,It,"⎱","\\rmoustache",!0);f(m,v,Vt,"⎰","\\lmoustache",!0);f(m,v,It,"⟯","\\rgroup",!0);f(m,v,Vt,"⟮","\\lgroup",!0);f(m,v,pe,"∓","\\mp",!0);f(m,v,pe,"⊖","\\ominus",!0);f(m,v,pe,"⊎","\\uplus",!0);f(m,v,pe,"⊓","\\sqcap",!0);f(m,v,pe,"∗","\\ast");f(m,v,pe,"⊔","\\sqcup",!0);f(m,v,pe,"◯","\\bigcirc",!0);f(m,v,pe,"∙","\\bullet",!0);f(m,v,pe,"‡","\\ddagger");f(m,v,pe,"≀","\\wr",!0);f(m,v,pe,"⨿","\\amalg");f(m,v,pe,"&","\\And");f(m,v,M,"⟵","\\longleftarrow",!0);f(m,v,M,"⇐","\\Leftarrow",!0);f(m,v,M,"⟸","\\Longleftarrow",!0);f(m,v,M,"⟶","\\longrightarrow",!0);f(m,v,M,"⇒","\\Rightarrow",!0);f(m,v,M,"⟹","\\Longrightarrow",!0);f(m,v,M,"↔","\\leftrightarrow",!0);f(m,v,M,"⟷","\\longleftrightarrow",!0);f(m,v,M,"⇔","\\Leftrightarrow",!0);f(m,v,M,"⟺","\\Longleftrightarrow",!0);f(m,v,M,"↦","\\mapsto",!0);f(m,v,M,"⟼","\\longmapsto",!0);f(m,v,M,"↗","\\nearrow",!0);f(m,v,M,"↩","\\hookleftarrow",!0);f(m,v,M,"↪","\\hookrightarrow",!0);f(m,v,M,"↘","\\searrow",!0);f(m,v,M,"↼","\\leftharpoonup",!0);f(m,v,M,"⇀","\\rightharpoonup",!0);f(m,v,M,"↙","\\swarrow",!0);f(m,v,M,"↽","\\leftharpoondown",!0);f(m,v,M,"⇁","\\rightharpoondown",!0);f(m,v,M,"↖","\\nwarrow",!0);f(m,v,M,"⇌","\\rightleftharpoons",!0);f(m,S,M,"≮","\\nless",!0);f(m,S,M,"","\\@nleqslant");f(m,S,M,"","\\@nleqq");f(m,S,M,"⪇","\\lneq",!0);f(m,S,M,"≨","\\lneqq",!0);f(m,S,M,"","\\@lvertneqq");f(m,S,M,"⋦","\\lnsim",!0);f(m,S,M,"⪉","\\lnapprox",!0);f(m,S,M,"⊀","\\nprec",!0);f(m,S,M,"⋠","\\npreceq",!0);f(m,S,M,"⋨","\\precnsim",!0);f(m,S,M,"⪹","\\precnapprox",!0);f(m,S,M,"≁","\\nsim",!0);f(m,S,M,"","\\@nshortmid");f(m,S,M,"∤","\\nmid",!0);f(m,S,M,"⊬","\\nvdash",!0);f(m,S,M,"⊭","\\nvDash",!0);f(m,S,M,"⋪","\\ntriangleleft");f(m,S,M,"⋬","\\ntrianglelefteq",!0);f(m,S,M,"⊊","\\subsetneq",!0);f(m,S,M,"","\\@varsubsetneq");f(m,S,M,"⫋","\\subsetneqq",!0);f(m,S,M,"","\\@varsubsetneqq");f(m,S,M,"≯","\\ngtr",!0);f(m,S,M,"","\\@ngeqslant");f(m,S,M,"","\\@ngeqq");f(m,S,M,"⪈","\\gneq",!0);f(m,S,M,"≩","\\gneqq",!0);f(m,S,M,"","\\@gvertneqq");f(m,S,M,"⋧","\\gnsim",!0);f(m,S,M,"⪊","\\gnapprox",!0);f(m,S,M,"⊁","\\nsucc",!0);f(m,S,M,"⋡","\\nsucceq",!0);f(m,S,M,"⋩","\\succnsim",!0);f(m,S,M,"⪺","\\succnapprox",!0);f(m,S,M,"≆","\\ncong",!0);f(m,S,M,"","\\@nshortparallel");f(m,S,M,"∦","\\nparallel",!0);f(m,S,M,"⊯","\\nVDash",!0);f(m,S,M,"⋫","\\ntriangleright");f(m,S,M,"⋭","\\ntrianglerighteq",!0);f(m,S,M,"","\\@nsupseteqq");f(m,S,M,"⊋","\\supsetneq",!0);f(m,S,M,"","\\@varsupsetneq");f(m,S,M,"⫌","\\supsetneqq",!0);f(m,S,M,"","\\@varsupsetneqq");f(m,S,M,"⊮","\\nVdash",!0);f(m,S,M,"⪵","\\precneqq",!0);f(m,S,M,"⪶","\\succneqq",!0);f(m,S,M,"","\\@nsubseteqq");f(m,S,pe,"⊴","\\unlhd");f(m,S,pe,"⊵","\\unrhd");f(m,S,M,"↚","\\nleftarrow",!0);f(m,S,M,"↛","\\nrightarrow",!0);f(m,S,M,"⇍","\\nLeftarrow",!0);f(m,S,M,"⇏","\\nRightarrow",!0);f(m,S,M,"↮","\\nleftrightarrow",!0);f(m,S,M,"⇎","\\nLeftrightarrow",!0);f(m,S,M,"△","\\vartriangle");f(m,S,I,"ℏ","\\hslash");f(m,S,I,"▽","\\triangledown");f(m,S,I,"◊","\\lozenge");f(m,S,I,"Ⓢ","\\circledS");f(m,S,I,"®","\\circledR");f(J,S,I,"®","\\circledR");f(m,S,I,"∡","\\measuredangle",!0);f(m,S,I,"∄","\\nexists");f(m,S,I,"℧","\\mho");f(m,S,I,"Ⅎ","\\Finv",!0);f(m,S,I,"⅁","\\Game",!0);f(m,S,I,"‵","\\backprime");f(m,S,I,"▲","\\blacktriangle");f(m,S,I,"▼","\\blacktriangledown");f(m,S,I,"■","\\blacksquare");f(m,S,I,"⧫","\\blacklozenge");f(m,S,I,"★","\\bigstar");f(m,S,I,"∢","\\sphericalangle",!0);f(m,S,I,"∁","\\complement",!0);f(m,S,I,"ð","\\eth",!0);f(J,v,I,"ð","ð");f(m,S,I,"╱","\\diagup");f(m,S,I,"╲","\\diagdown");f(m,S,I,"□","\\square");f(m,S,I,"□","\\Box");f(m,S,I,"◊","\\Diamond");f(m,S,I,"¥","\\yen",!0);f(J,S,I,"¥","\\yen",!0);f(m,S,I,"✓","\\checkmark",!0);f(J,S,I,"✓","\\checkmark");f(m,S,I,"ℶ","\\beth",!0);f(m,S,I,"ℸ","\\daleth",!0);f(m,S,I,"ℷ","\\gimel",!0);f(m,S,I,"ϝ","\\digamma",!0);f(m,S,I,"ϰ","\\varkappa");f(m,S,Vt,"┌","\\@ulcorner",!0);f(m,S,It,"┐","\\@urcorner",!0);f(m,S,Vt,"└","\\@llcorner",!0);f(m,S,It,"┘","\\@lrcorner",!0);f(m,S,M,"≦","\\leqq",!0);f(m,S,M,"⩽","\\leqslant",!0);f(m,S,M,"⪕","\\eqslantless",!0);f(m,S,M,"≲","\\lesssim",!0);f(m,S,M,"⪅","\\lessapprox",!0);f(m,S,M,"≊","\\approxeq",!0);f(m,S,pe,"⋖","\\lessdot");f(m,S,M,"⋘","\\lll",!0);f(m,S,M,"≶","\\lessgtr",!0);f(m,S,M,"⋚","\\lesseqgtr",!0);f(m,S,M,"⪋","\\lesseqqgtr",!0);f(m,S,M,"≑","\\doteqdot");f(m,S,M,"≓","\\risingdotseq",!0);f(m,S,M,"≒","\\fallingdotseq",!0);f(m,S,M,"∽","\\backsim",!0);f(m,S,M,"⋍","\\backsimeq",!0);f(m,S,M,"⫅","\\subseteqq",!0);f(m,S,M,"⋐","\\Subset",!0);f(m,S,M,"⊏","\\sqsubset",!0);f(m,S,M,"≼","\\preccurlyeq",!0);f(m,S,M,"⋞","\\curlyeqprec",!0);f(m,S,M,"≾","\\precsim",!0);f(m,S,M,"⪷","\\precapprox",!0);f(m,S,M,"⊲","\\vartriangleleft");f(m,S,M,"⊴","\\trianglelefteq");f(m,S,M,"⊨","\\vDash",!0);f(m,S,M,"⊪","\\Vvdash",!0);f(m,S,M,"⌣","\\smallsmile");f(m,S,M,"⌢","\\smallfrown");f(m,S,M,"≏","\\bumpeq",!0);f(m,S,M,"≎","\\Bumpeq",!0);f(m,S,M,"≧","\\geqq",!0);f(m,S,M,"⩾","\\geqslant",!0);f(m,S,M,"⪖","\\eqslantgtr",!0);f(m,S,M,"≳","\\gtrsim",!0);f(m,S,M,"⪆","\\gtrapprox",!0);f(m,S,pe,"⋗","\\gtrdot");f(m,S,M,"⋙","\\ggg",!0);f(m,S,M,"≷","\\gtrless",!0);f(m,S,M,"⋛","\\gtreqless",!0);f(m,S,M,"⪌","\\gtreqqless",!0);f(m,S,M,"≖","\\eqcirc",!0);f(m,S,M,"≗","\\circeq",!0);f(m,S,M,"≜","\\triangleq",!0);f(m,S,M,"∼","\\thicksim");f(m,S,M,"≈","\\thickapprox");f(m,S,M,"⫆","\\supseteqq",!0);f(m,S,M,"⋑","\\Supset",!0);f(m,S,M,"⊐","\\sqsupset",!0);f(m,S,M,"≽","\\succcurlyeq",!0);f(m,S,M,"⋟","\\curlyeqsucc",!0);f(m,S,M,"≿","\\succsim",!0);f(m,S,M,"⪸","\\succapprox",!0);f(m,S,M,"⊳","\\vartriangleright");f(m,S,M,"⊵","\\trianglerighteq");f(m,S,M,"⊩","\\Vdash",!0);f(m,S,M,"∣","\\shortmid");f(m,S,M,"∥","\\shortparallel");f(m,S,M,"≬","\\between",!0);f(m,S,M,"⋔","\\pitchfork",!0);f(m,S,M,"∝","\\varpropto");f(m,S,M,"◀","\\blacktriangleleft");f(m,S,M,"∴","\\therefore",!0);f(m,S,M,"∍","\\backepsilon");f(m,S,M,"▶","\\blacktriangleright");f(m,S,M,"∵","\\because",!0);f(m,S,M,"⋘","\\llless");f(m,S,M,"⋙","\\gggtr");f(m,S,pe,"⊲","\\lhd");f(m,S,pe,"⊳","\\rhd");f(m,S,M,"≂","\\eqsim",!0);f(m,v,M,"⋈","\\Join");f(m,S,M,"≑","\\Doteq",!0);f(m,S,pe,"∔","\\dotplus",!0);f(m,S,pe,"∖","\\smallsetminus");f(m,S,pe,"⋒","\\Cap",!0);f(m,S,pe,"⋓","\\Cup",!0);f(m,S,pe,"⩞","\\doublebarwedge",!0);f(m,S,pe,"⊟","\\boxminus",!0);f(m,S,pe,"⊞","\\boxplus",!0);f(m,S,pe,"⋇","\\divideontimes",!0);f(m,S,pe,"⋉","\\ltimes",!0);f(m,S,pe,"⋊","\\rtimes",!0);f(m,S,pe,"⋋","\\leftthreetimes",!0);f(m,S,pe,"⋌","\\rightthreetimes",!0);f(m,S,pe,"⋏","\\curlywedge",!0);f(m,S,pe,"⋎","\\curlyvee",!0);f(m,S,pe,"⊝","\\circleddash",!0);f(m,S,pe,"⊛","\\circledast",!0);f(m,S,pe,"⋅","\\centerdot");f(m,S,pe,"⊺","\\intercal",!0);f(m,S,pe,"⋒","\\doublecap");f(m,S,pe,"⋓","\\doublecup");f(m,S,pe,"⊠","\\boxtimes",!0);f(m,S,M,"⇢","\\dashrightarrow",!0);f(m,S,M,"⇠","\\dashleftarrow",!0);f(m,S,M,"⇇","\\leftleftarrows",!0);f(m,S,M,"⇆","\\leftrightarrows",!0);f(m,S,M,"⇚","\\Lleftarrow",!0);f(m,S,M,"↞","\\twoheadleftarrow",!0);f(m,S,M,"↢","\\leftarrowtail",!0);f(m,S,M,"↫","\\looparrowleft",!0);f(m,S,M,"⇋","\\leftrightharpoons",!0);f(m,S,M,"↶","\\curvearrowleft",!0);f(m,S,M,"↺","\\circlearrowleft",!0);f(m,S,M,"↰","\\Lsh",!0);f(m,S,M,"⇈","\\upuparrows",!0);f(m,S,M,"↿","\\upharpoonleft",!0);f(m,S,M,"⇃","\\downharpoonleft",!0);f(m,v,M,"⊶","\\origof",!0);f(m,v,M,"⊷","\\imageof",!0);f(m,S,M,"⊸","\\multimap",!0);f(m,S,M,"↭","\\leftrightsquigarrow",!0);f(m,S,M,"⇉","\\rightrightarrows",!0);f(m,S,M,"⇄","\\rightleftarrows",!0);f(m,S,M,"↠","\\twoheadrightarrow",!0);f(m,S,M,"↣","\\rightarrowtail",!0);f(m,S,M,"↬","\\looparrowright",!0);f(m,S,M,"↷","\\curvearrowright",!0);f(m,S,M,"↻","\\circlearrowright",!0);f(m,S,M,"↱","\\Rsh",!0);f(m,S,M,"⇊","\\downdownarrows",!0);f(m,S,M,"↾","\\upharpoonright",!0);f(m,S,M,"⇂","\\downharpoonright",!0);f(m,S,M,"⇝","\\rightsquigarrow",!0);f(m,S,M,"⇝","\\leadsto");f(m,S,M,"⇛","\\Rrightarrow",!0);f(m,S,M,"↾","\\restriction");f(m,v,I,"‘","`");f(m,v,I,"$","\\$");f(J,v,I,"$","\\$");f(J,v,I,"$","\\textdollar");f(m,v,I,"%","\\%");f(J,v,I,"%","\\%");f(m,v,I,"_","\\_");f(J,v,I,"_","\\_");f(J,v,I,"_","\\textunderscore");f(m,v,I,"∠","\\angle",!0);f(m,v,I,"∞","\\infty",!0);f(m,v,I,"′","\\prime");f(m,v,I,"△","\\triangle");f(m,v,I,"Γ","\\Gamma",!0);f(m,v,I,"Δ","\\Delta",!0);f(m,v,I,"Θ","\\Theta",!0);f(m,v,I,"Λ","\\Lambda",!0);f(m,v,I,"Ξ","\\Xi",!0);f(m,v,I,"Π","\\Pi",!0);f(m,v,I,"Σ","\\Sigma",!0);f(m,v,I,"Υ","\\Upsilon",!0);f(m,v,I,"Φ","\\Phi",!0);f(m,v,I,"Ψ","\\Psi",!0);f(m,v,I,"Ω","\\Omega",!0);f(m,v,I,"A","Α");f(m,v,I,"B","Β");f(m,v,I,"E","Ε");f(m,v,I,"Z","Ζ");f(m,v,I,"H","Η");f(m,v,I,"I","Ι");f(m,v,I,"K","Κ");f(m,v,I,"M","Μ");f(m,v,I,"N","Ν");f(m,v,I,"O","Ο");f(m,v,I,"P","Ρ");f(m,v,I,"T","Τ");f(m,v,I,"X","Χ");f(m,v,I,"¬","\\neg",!0);f(m,v,I,"¬","\\lnot");f(m,v,I,"⊤","\\top");f(m,v,I,"⊥","\\bot");f(m,v,I,"∅","\\emptyset");f(m,S,I,"∅","\\varnothing");f(m,v,_e,"α","\\alpha",!0);f(m,v,_e,"β","\\beta",!0);f(m,v,_e,"γ","\\gamma",!0);f(m,v,_e,"δ","\\delta",!0);f(m,v,_e,"ϵ","\\epsilon",!0);f(m,v,_e,"ζ","\\zeta",!0);f(m,v,_e,"η","\\eta",!0);f(m,v,_e,"θ","\\theta",!0);f(m,v,_e,"ι","\\iota",!0);f(m,v,_e,"κ","\\kappa",!0);f(m,v,_e,"λ","\\lambda",!0);f(m,v,_e,"μ","\\mu",!0);f(m,v,_e,"ν","\\nu",!0);f(m,v,_e,"ξ","\\xi",!0);f(m,v,_e,"ο","\\omicron",!0);f(m,v,_e,"π","\\pi",!0);f(m,v,_e,"ρ","\\rho",!0);f(m,v,_e,"σ","\\sigma",!0);f(m,v,_e,"τ","\\tau",!0);f(m,v,_e,"υ","\\upsilon",!0);f(m,v,_e,"ϕ","\\phi",!0);f(m,v,_e,"χ","\\chi",!0);f(m,v,_e,"ψ","\\psi",!0);f(m,v,_e,"ω","\\omega",!0);f(m,v,_e,"ε","\\varepsilon",!0);f(m,v,_e,"ϑ","\\vartheta",!0);f(m,v,_e,"ϖ","\\varpi",!0);f(m,v,_e,"ϱ","\\varrho",!0);f(m,v,_e,"ς","\\varsigma",!0);f(m,v,_e,"φ","\\varphi",!0);f(m,v,pe,"∗","*",!0);f(m,v,pe,"+","+");f(m,v,pe,"−","-",!0);f(m,v,pe,"⋅","\\cdot",!0);f(m,v,pe,"∘","\\circ",!0);f(m,v,pe,"÷","\\div",!0);f(m,v,pe,"±","\\pm",!0);f(m,v,pe,"×","\\times",!0);f(m,v,pe,"∩","\\cap",!0);f(m,v,pe,"∪","\\cup",!0);f(m,v,pe,"∖","\\setminus",!0);f(m,v,pe,"∧","\\land");f(m,v,pe,"∨","\\lor");f(m,v,pe,"∧","\\wedge",!0);f(m,v,pe,"∨","\\vee",!0);f(m,v,I,"√","\\surd");f(m,v,Vt,"⟨","\\langle",!0);f(m,v,Vt,"∣","\\lvert");f(m,v,Vt,"∥","\\lVert");f(m,v,It,"?","?");f(m,v,It,"!","!");f(m,v,It,"⟩","\\rangle",!0);f(m,v,It,"∣","\\rvert");f(m,v,It,"∥","\\rVert");f(m,v,M,"=","=");f(m,v,M,":",":");f(m,v,M,"≈","\\approx",!0);f(m,v,M,"≅","\\cong",!0);f(m,v,M,"≥","\\ge");f(m,v,M,"≥","\\geq",!0);f(m,v,M,"←","\\gets");f(m,v,M,">","\\gt",!0);f(m,v,M,"∈","\\in",!0);f(m,v,M,"","\\@not");f(m,v,M,"⊂","\\subset",!0);f(m,v,M,"⊃","\\supset",!0);f(m,v,M,"⊆","\\subseteq",!0);f(m,v,M,"⊇","\\supseteq",!0);f(m,S,M,"⊈","\\nsubseteq",!0);f(m,S,M,"⊉","\\nsupseteq",!0);f(m,v,M,"⊨","\\models");f(m,v,M,"←","\\leftarrow",!0);f(m,v,M,"≤","\\le");f(m,v,M,"≤","\\leq",!0);f(m,v,M,"<","\\lt",!0);f(m,v,M,"→","\\rightarrow",!0);f(m,v,M,"→","\\to");f(m,S,M,"≱","\\ngeq",!0);f(m,S,M,"≰","\\nleq",!0);f(m,v,Pn," ","\\ ");f(m,v,Pn," ","\\space");f(m,v,Pn," ","\\nobreakspace");f(J,v,Pn," ","\\ ");f(J,v,Pn," "," ");f(J,v,Pn," ","\\space");f(J,v,Pn," ","\\nobreakspace");f(m,v,Pn,"","\\nobreak");f(m,v,Pn,"","\\allowbreak");f(m,v,fi,",",",");f(m,v,fi,";",";");f(m,S,pe,"⊼","\\barwedge",!0);f(m,S,pe,"⊻","\\veebar",!0);f(m,v,pe,"⊙","\\odot",!0);f(m,v,pe,"⊕","\\oplus",!0);f(m,v,pe,"⊗","\\otimes",!0);f(m,v,I,"∂","\\partial",!0);f(m,v,pe,"⊘","\\oslash",!0);f(m,S,pe,"⊚","\\circledcirc",!0);f(m,S,pe,"⊡","\\boxdot",!0);f(m,v,pe,"△","\\bigtriangleup");f(m,v,pe,"▽","\\bigtriangledown");f(m,v,pe,"†","\\dagger");f(m,v,pe,"⋄","\\diamond");f(m,v,pe,"⋆","\\star");f(m,v,pe,"◃","\\triangleleft");f(m,v,pe,"▹","\\triangleright");f(m,v,Vt,"{","\\{");f(J,v,I,"{","\\{");f(J,v,I,"{","\\textbraceleft");f(m,v,It,"}","\\}");f(J,v,I,"}","\\}");f(J,v,I,"}","\\textbraceright");f(m,v,Vt,"{","\\lbrace");f(m,v,It,"}","\\rbrace");f(m,v,Vt,"[","\\lbrack",!0);f(J,v,I,"[","\\lbrack",!0);f(m,v,It,"]","\\rbrack",!0);f(J,v,I,"]","\\rbrack",!0);f(m,v,Vt,"(","\\lparen",!0);f(m,v,It,")","\\rparen",!0);f(J,v,I,"<","\\textless",!0);f(J,v,I,">","\\textgreater",!0);f(m,v,Vt,"⌊","\\lfloor",!0);f(m,v,It,"⌋","\\rfloor",!0);f(m,v,Vt,"⌈","\\lceil",!0);f(m,v,It,"⌉","\\rceil",!0);f(m,v,I,"\\","\\backslash");f(m,v,I,"∣","|");f(m,v,I,"∣","\\vert");f(J,v,I,"|","\\textbar",!0);f(m,v,I,"∥","\\|");f(m,v,I,"∥","\\Vert");f(J,v,I,"∥","\\textbardbl");f(J,v,I,"~","\\textasciitilde");f(J,v,I,"\\","\\textbackslash");f(J,v,I,"^","\\textasciicircum");f(m,v,M,"↑","\\uparrow",!0);f(m,v,M,"⇑","\\Uparrow",!0);f(m,v,M,"↓","\\downarrow",!0);f(m,v,M,"⇓","\\Downarrow",!0);f(m,v,M,"↕","\\updownarrow",!0);f(m,v,M,"⇕","\\Updownarrow",!0);f(m,v,dt,"∐","\\coprod");f(m,v,dt,"⋁","\\bigvee");f(m,v,dt,"⋀","\\bigwedge");f(m,v,dt,"⨄","\\biguplus");f(m,v,dt,"⋂","\\bigcap");f(m,v,dt,"⋃","\\bigcup");f(m,v,dt,"∫","\\int");f(m,v,dt,"∫","\\intop");f(m,v,dt,"∬","\\iint");f(m,v,dt,"∭","\\iiint");f(m,v,dt,"∏","\\prod");f(m,v,dt,"∑","\\sum");f(m,v,dt,"⨂","\\bigotimes");f(m,v,dt,"⨁","\\bigoplus");f(m,v,dt,"⨀","\\bigodot");f(m,v,dt,"∮","\\oint");f(m,v,dt,"∯","\\oiint");f(m,v,dt,"∰","\\oiiint");f(m,v,dt,"⨆","\\bigsqcup");f(m,v,dt,"∫","\\smallint");f(J,v,gs,"…","\\textellipsis");f(m,v,gs,"…","\\mathellipsis");f(J,v,gs,"…","\\ldots",!0);f(m,v,gs,"…","\\ldots",!0);f(m,v,gs,"⋯","\\@cdots",!0);f(m,v,gs,"⋱","\\ddots",!0);f(m,v,I,"⋮","\\varvdots");f(J,v,I,"⋮","\\varvdots");f(m,v,et,"ˊ","\\acute");f(m,v,et,"ˋ","\\grave");f(m,v,et,"¨","\\ddot");f(m,v,et,"~","\\tilde");f(m,v,et,"ˉ","\\bar");f(m,v,et,"˘","\\breve");f(m,v,et,"ˇ","\\check");f(m,v,et,"^","\\hat");f(m,v,et,"⃗","\\vec");f(m,v,et,"˙","\\dot");f(m,v,et,"˚","\\mathring");f(m,v,_e,"","\\@imath");f(m,v,_e,"","\\@jmath");f(m,v,I,"ı","ı");f(m,v,I,"ȷ","ȷ");f(J,v,I,"ı","\\i",!0);f(J,v,I,"ȷ","\\j",!0);f(J,v,I,"ß","\\ss",!0);f(J,v,I,"æ","\\ae",!0);f(J,v,I,"œ","\\oe",!0);f(J,v,I,"ø","\\o",!0);f(J,v,I,"Æ","\\AE",!0);f(J,v,I,"Œ","\\OE",!0);f(J,v,I,"Ø","\\O",!0);f(J,v,et,"ˊ","\\'");f(J,v,et,"ˋ","\\`");f(J,v,et,"ˆ","\\^");f(J,v,et,"˜","\\~");f(J,v,et,"ˉ","\\=");f(J,v,et,"˘","\\u");f(J,v,et,"˙","\\.");f(J,v,et,"¸","\\c");f(J,v,et,"˚","\\r");f(J,v,et,"ˇ","\\v");f(J,v,et,"¨","\\\"");f(J,v,et,"˝","\\H");f(J,v,et,"◯","\\textcircled");var yd={"--":!0,"---":!0,"``":!0,"''":!0};f(J,v,I,"–","--",!0);f(J,v,I,"–","\\textendash");f(J,v,I,"—","---",!0);f(J,v,I,"—","\\textemdash");f(J,v,I,"‘","`",!0);f(J,v,I,"‘","\\textquoteleft");f(J,v,I,"’","'",!0);f(J,v,I,"’","\\textquoteright");f(J,v,I,"“","``",!0);f(J,v,I,"“","\\textquotedblleft");f(J,v,I,"”","''",!0);f(J,v,I,"”","\\textquotedblright");f(m,v,I,"°","\\degree",!0);f(J,v,I,"°","\\degree");f(J,v,I,"°","\\textdegree",!0);f(m,v,I,"£","\\pounds");f(m,v,I,"£","\\mathsterling",!0);f(J,v,I,"£","\\pounds");f(J,v,I,"£","\\textsterling",!0);f(m,S,I,"✠","\\maltese");f(J,S,I,"✠","\\maltese");var Lu='0123456789/@."';for(ei=0;ei<Lu.length;ei++)po=Lu.charAt(ei),f(m,v,I,po,po);var po,ei,Iu='0123456789!@*()-=+";:?/.,';for(ti=0;ti<Iu.length;ti++)go=Iu.charAt(ti),f(J,v,I,go,go);var go,ti,yo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(ni=0;ni<yo.length;ni++)us=yo.charAt(ni),f(m,v,_e,us,us),f(J,v,I,us,us);var us,ni;f(m,S,I,"C","ℂ");f(J,S,I,"C","ℂ");f(m,S,I,"H","ℍ");f(J,S,I,"H","ℍ");f(m,S,I,"N","ℕ");f(J,S,I,"N","ℕ");f(m,S,I,"P","ℙ");f(J,S,I,"P","ℙ");f(m,S,I,"Q","ℚ");f(J,S,I,"Q","ℚ");f(m,S,I,"R","ℝ");f(J,S,I,"R","ℝ");f(m,S,I,"Z","ℤ");f(J,S,I,"Z","ℤ");f(m,v,_e,"h","ℎ");f(J,v,_e,"h","ℎ");var Se;for(Et=0;Et<yo.length;Et++)if(Xe=yo.charAt(Et),Se=String.fromCharCode(55349,56320+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56372+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56424+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56580+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56684+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56736+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56788+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56840+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56944+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Et<26)Se=String.fromCharCode(55349,56632+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se),Se=String.fromCharCode(55349,56476+Et),f(m,v,_e,Xe,Se),f(J,v,I,Xe,Se);var Xe,Et;Se=String.fromCharCode(55349,56668);f(m,v,_e,"k",Se);f(J,v,I,"k",Se);for($n=0;$n<10;$n++)mn=$n.toString(),Se=String.fromCharCode(55349,57294+$n),f(m,v,_e,mn,Se),f(J,v,I,mn,Se),Se=String.fromCharCode(55349,57314+$n),f(m,v,_e,mn,Se),f(J,v,I,mn,Se),Se=String.fromCharCode(55349,57324+$n),f(m,v,_e,mn,Se),f(J,v,I,mn,Se),Se=String.fromCharCode(55349,57334+$n),f(m,v,_e,mn,Se),f(J,v,I,mn,Se);var mn,$n,ol="ÐÞþ";for(ri=0;ri<ol.length;ri++)ds=ol.charAt(ri),f(m,v,_e,ds,ds),f(J,v,I,ds,ds);var ds,ri,al={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Nu={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},Bu={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},b2={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Nr={mathClass:"",textClass:"",font:""},Ou={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},$u={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},zu={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},ll={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},cl={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},Fu={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},ul={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},qu=[al,al,Nu,Nu,Bu,Bu,b2,Nr,Nr,Nr,Ou,Ou,$u,$u,zu,zu,ll,ll,cl,cl,Fu,Fu,Nr,Nr,ul,ul],v2=[al,Nr,ll,cl,ul],y2=(e)=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484){var s=Math.floor((r-119808)/26);return qu[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return v2[i]}else if(r===120485||r===120486)return qu[0];else if(120486<r&&r<120782)return Nr;else throw new se("Unsupported character: "+e)};function Ft(e){var{strict:t,errorCode:n,errorMsg:r,token:s,report:i}=e,o=t;if(typeof t==="function")if(i)o=t(n,r,s);else try{o=t(n,r,s)}catch(a){o="error"}switch(o){case!0:case"error":if(i)throw new se("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+n+"]"),s);else return!0;case!1:case"ignore":if(!i)return!1;break;case"warn":default:if(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+n+"]")),!i)return!1;break}}var wo=function(t,n,r){if(Qe[r][t]){var s=Qe[r][t].replace;if(s)t=s}return{value:t,metrics:Al(t,n,r)}},Dt=function(t,n,r,s,i){var o=wo(t,n,r),a=o.metrics;t=o.value;var l;if(a){var u=a.italic;if(r==="text"||s&&s.font==="mathit")u=0;l=new qt(t,a.height,a.depth,u,a.skew,a.width,i)}else Ft({strict:s.strict,errorCode:"symbolNotInFont",errorMsg:"No character metrics for '"+t+"' in style '"+n+"' and mode '"+r+"'",report:!0}),l=new qt(t,0,0,0,0,0,i);if(l.maxFontSize=s.sizeMultiplier,s.style.isTight())l.classes.push("mtight");var d=s.getColor();if(d)l.style.color=d;return l},Cl=function(t,n,r,s){if(s===void 0)s=[];if(r.font==="boldsymbol"&&wo(t,"Main-Bold",n).metrics)return Dt(t,"Main-Bold",n,r,s.concat(["mathbf"]));else if(t==="\\"||Qe[n][t].font==="main")return Dt(t,"Main-Regular",n,r,s);else return Dt(t,"AMS-Regular",n,r,s.concat(["amsrm"]))},k2=function(t,n,r){if(r!=="textord"&&wo(t,"Math-BoldItalic",n).metrics)return{fontName:"Math-BoldItalic",fontClass:"boldsymbol"};else return{fontName:"Main-Bold",fontClass:"mathbf"}},xo=function(t,n){var r=t.type==="mathord"?"mathord":"textord",{mode:s,text:i}=t,o=["mord"],{font:a,fontFamily:l,fontWeight:u,fontShape:d}=n,h=s==="math"||s==="text"&&!!a,p=h?a:l,g="",b="";if(i.charCodeAt(0)===55349){var x=y2(i);g=x.font,b=x[s+"Class"]}if(g)return Dt(i,g,s,n,o.concat(b));else if(p){var k,E;if(p==="boldsymbol"){var T=k2(i,s,r);k=T.fontName,E=[T.fontClass]}else if(h)k=dl[a].fontName,E=[a];else k=ao(l,u,d),E=[l,u,d];if(wo(i,k,s).metrics)return Dt(i,k,s,n,o.concat(E));else if(Object.prototype.hasOwnProperty.call(yd,i)&&k.slice(0,10)==="Typewriter"){var _=[];for(var A=0;A<i.length;A++)_.push(Dt(i[A],k,s,n,o.concat(E)));return Un(_)}}if(r==="mathord")return Dt(i,"Math-Italic",s,n,o.concat(["mathnormal"]));else if(r==="textord"){var D=Qe[s][i]&&Qe[s][i].font;if(D==="ams"){var R=ao("amsrm",u,d);return Dt(i,R,s,n,o.concat("amsrm",u,d))}else if(D==="main"||!D){var L=ao("textrm",u,d);return Dt(i,L,s,n,o.concat(u,d))}else{var B=ao(D,u,d);return Dt(i,B,s,n,o.concat(B,u,d))}}else throw Error("unexpected type: "+r+" in makeOrd")},w2=(e,t)=>{if(ur(e.classes)!==ur(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var s of Object.keys(t.style))if(e.style[s]!==t.style[s])return!1;return!0},kd=(e)=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];if(n instanceof qt&&r instanceof qt&&w2(n,r))n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--}return e},_l=function(t){var n=0,r=0,s=0;for(var i=0;i<t.children.length;i++){var o=t.children[i];if(o.height>n)n=o.height;if(o.depth>r)r=o.depth;if(o.maxFontSize>s)s=o.maxFontSize}t.height=n,t.depth=r,t.maxFontSize=s},ee=function(t,n,r,s){var i=new Or(t,n,r,s);return _l(i),i},dr=(e,t,n,r)=>new Or(e,t,n,r),ms=function(t,n,r){var s=ee([t],[],n);return s.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),s.style.borderBottomWidth=ce(s.height),s.maxFontSize=1,s},x2=function(t,n,r,s){var i=new di(t,n,r,s);return _l(i),i},Un=function(t){var n=new Br(t);return _l(n),n},ps=function(t,n){if(t instanceof Br)return ee([],[t],n);return t},E2=function(t){if(t.positionType==="individualShift"){var n=t.children,r=[n[0]],s=-n[0].shift-n[0].elem.depth,i=s;for(var o=1;o<n.length;o++){var a=-n[o].shift-i-n[o].elem.depth,l=a-(n[o-1].elem.height+n[o-1].elem.depth);i=i+a,r.push({type:"kern",size:l}),r.push(n[o])}return{children:r,depth:s}}var u;if(t.positionType==="top"){var d=t.positionData;for(var h=0;h<t.children.length;h++){var p=t.children[h];d-=p.type==="kern"?p.size:p.elem.height+p.elem.depth}u=d}else if(t.positionType==="bottom")u=-t.positionData;else{var g=t.children[0];if(g.type!=="elem")throw Error('First child must have type "elem".');if(t.positionType==="shift")u=-g.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")u=-g.elem.depth;else throw Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:u}},qe=function(t,n){var r=E2(t),{children:s,depth:i}=r,o=0;for(var a=0;a<s.length;a++){var l=s[a];if(l.type==="elem"){var u=l.elem;o=Math.max(o,u.maxFontSize,u.height)}}o+=2;var d=ee(["pstrut"],[]);d.style.height=ce(o);var h=[],p=i,g=i,b=i;for(var x=0;x<s.length;x++){var k=s[x];if(k.type==="kern")b+=k.size;else{var E=k.elem,T=k.wrapperClasses||[],_=k.wrapperStyle||{},A=ee(T,[d,E],void 0,_);if(A.style.top=ce(-o-b-E.depth),k.marginLeft)A.style.marginLeft=k.marginLeft;if(k.marginRight)A.style.marginRight=k.marginRight;h.push(A),b+=E.height+E.depth}p=Math.min(p,b),g=Math.max(g,b)}var D=ee(["vlist"],h);D.style.height=ce(g);var R;if(p<0){var L=ee([],[]),B=ee(["vlist"],[L]);B.style.height=ce(-p);var O=ee(["vlist-s"],[new qt("")]);R=[ee(["vlist-r"],[D,O]),ee(["vlist-r"],[B])]}else R=[ee(["vlist-r"],[D])];var H=ee(["vlist-t"],R);if(R.length===2)H.classes.push("vlist-t2");return H.height=g,H.depth=-p,H},wd=(e,t)=>{var n=ee(["mspace"],[],t),r=rt(e,t);return n.style.marginRight=ce(r),n},ao=(e,t,n)=>{var r,s;switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}if(t==="textbf"&&n==="textit")s="BoldItalic";else if(t==="textbf")s="Bold";else if(n==="textit")s="Italic";else s="Regular";return r+"-"+s},dl={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},xd={vec:["vec",0.471,0.714],oiintSize1:["oiintSize1",0.957,0.499],oiintSize2:["oiintSize2",1.472,0.659],oiiintSize1:["oiiintSize1",1.304,0.499],oiiintSize2:["oiiintSize2",1.98,0.659]},Ed=function(t,n){var r=xd[t],s=r[0],i=r[1],o=r[2],a=new qn(s),l=new bn([a],{width:ce(i),height:ce(o),style:"width:"+ce(i),viewBox:"0 0 "+1000*i+" "+1000*o,preserveAspectRatio:"xMinYMin"}),u=dr(["katex-overlay"],[l],n);return u.height=o,u.style.height=ce(o),u.style.width=ce(i),u},nt={number:3,unit:"mu"},Ir={number:4,unit:"mu"},Bn={number:5,unit:"mu"},A2={mord:{mop:nt,mbin:Ir,mrel:Bn,minner:nt},mop:{mord:nt,mop:nt,mrel:Bn,minner:nt},mbin:{mord:Ir,mop:Ir,mopen:Ir,minner:Ir},mrel:{mord:Bn,mop:Bn,mopen:Bn,minner:Bn},mopen:{},mclose:{mop:nt,mbin:Ir,mrel:Bn,minner:nt},mpunct:{mord:nt,mop:nt,mrel:Bn,mopen:nt,mclose:nt,mpunct:nt,minner:nt},minner:{mord:nt,mop:nt,mbin:Ir,mrel:Bn,mopen:nt,mpunct:nt,minner:nt}},C2={mord:{mop:nt},mop:{mord:nt,mop:nt},mbin:{},mrel:{},mopen:{},mclose:{mop:nt},mpunct:{},minner:{mop:nt}},Ad={},ai={},li={};function he(e){var{type:t,names:n,htmlBuilder:r,mathmlBuilder:s}=e;for(var i=0;i<n.length;++i)Ad[n[i]]=e;if(t){if(r)ai[t]=r;if(s)li[t]=s}}function $r(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;if(n)ai[t]=n;if(r)li[t]=r}var ci=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},ut=function(t){return t.type==="ordgroup"?t.body:[t]},_2=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),S2=new Set(["rightmost","mrel","mclose","mpunct"]),T2={display:De.DISPLAY,text:De.TEXT,script:De.SCRIPT,scriptscript:De.SCRIPTSCRIPT},R2={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},gt=function(t,n,r,s){if(s===void 0)s=[null,null];var i=[];for(var o=0;o<t.length;o++){var a=ze(t[o],n);if(a instanceof Br){var l=a.children;i.push(...l)}else i.push(a)}if(kd(i),!r)return i;var u=n;if(t.length===1){var d=t[0];if(d.type==="sizing")u=n.havingSize(d.size);else if(d.type==="styling")u=n.havingStyle(T2[d.style])}var h=ee([s[0]||"leftmost"],[],n),p=ee([s[1]||"rightmost"],[],n),g=r==="root";return fl(i,(b,x)=>{var k=x.classes[0],E=b.classes[0];if(k==="mbin"&&S2.has(E))x.classes[0]="mord";else if(E==="mbin"&&_2.has(k))b.classes[0]="mord"},{node:h},p,g),fl(i,(b,x)=>{var k,E,T=ml(x),_=ml(b),A=T&&_?b.hasClass("mtight")?(k=C2[T])==null?void 0:k[_]:(E=A2[T])==null?void 0:E[_]:null;if(A)return wd(A,u)},{node:h},p,g),i},fl=function(t,n,r,s,i){if(s)t.push(s);var o=0;for(;o<t.length;o++){var a=t[o],l=Cd(a);if(l){fl(l.children,n,r,null,i);continue}var u=!a.hasClass("mspace");if(u){var d=n(a,r.node);if(d)if(r.insertAfter)r.insertAfter(d);else t.unshift(d),o++}if(u)r.node=a;else if(i&&a.hasClass("katex-newline"))r.node=ee(["leftmost"]);r.insertAfter=((h)=>(p)=>{t.splice(h+1,0,p),o++})(o)}if(s)t.pop()},Cd=function(t){if(t instanceof Br||t instanceof di||t instanceof Or&&t.hasClass("enclosing"))return t;return null},hl=function(t,n){var r=Cd(t);if(r){var s=r.children;if(s.length){if(n==="right")return hl(s[s.length-1],"right");else if(n==="left")return hl(s[0],"left")}}return t},ml=function(t,n){if(!t)return null;if(n)t=hl(t,n);var r=t.classes[0];return R2[r]||null},ui=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return ee(n.concat(r))},ze=function(t,n,r){if(!t)return ee();if(ai[t.type]){var s=ai[t.type](t,n);if(r&&n.size!==r.size){s=ee(n.sizingClasses(r),[s],n);var i=n.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new se("Got group of unknown type: '"+t.type+"'")};function lo(e,t){var n=ee(["katex-base"],e,t),r=ee(["katex-strut"]);if(r.style.height=ce(n.height+n.depth),n.depth)r.style.verticalAlign=ce(-n.depth);return n.children.unshift(r),n}function pl(e,t){var n=null;if(e.length===1&&e[0].type==="tag")n=e[0].tag,e=e[0].body;var r=gt(e,t,"root"),s;if(r.length===2&&r[1].hasClass("katex-tag"))s=r.pop();var i=[],o=[];for(var a=0;a<r.length;a++)if(o.push(r[a]),r[a].hasClass("mbin")||r[a].hasClass("mrel")||r[a].hasClass("allowbreak")){var l=!1;while(a<r.length-1&&r[a+1].hasClass("mspace")&&!r[a+1].hasClass("katex-newline"))if(a++,o.push(r[a]),r[a].hasClass("nobreak"))l=!0;if(!l)i.push(lo(o,t)),o=[]}else if(r[a].hasClass("katex-newline")){if(o.pop(),o.length>0)i.push(lo(o,t)),o=[];i.push(r[a])}if(o.length>0)i.push(lo(o,t));var u;if(n)u=lo(gt(n,t,!0),t),u.classes=["katex-tag"],i.push(u);else if(s)i.push(s);var d=ee(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),u){var h=u.children[0];if(h.style.height=ce(d.height+d.depth),d.depth)h.style.verticalAlign=ce(-d.depth)}return d}function _d(e){return new Br(e)}class ie{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e.setAttribute(n,r)}if(this.classes.length>0)e.className=ur(this.classes);for(var s=0;s<this.children.length;s++)if(this.children[s]instanceof lt&&this.children[s+1]instanceof lt){var i=this.children[s].toText()+this.children[++s].toText();while(this.children[s+1]instanceof lt)i+=this.children[++s].toText();e.appendChild(new lt(i).toNode())}else e.appendChild(this.children[s].toNode());return e}toMarkup(){var e="<"+this.type;for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e+=" "+n+'="',e+=Ct(r),e+='"'}if(this.classes.length>0)e+=' class ="'+Ct(ur(this.classes))+'"';e+=">";for(var s=0;s<this.children.length;s++)e+=this.children[s].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map((e)=>e.toText()).join("")}}class lt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Ct(this.toText())}toText(){return this.text}}class Sl{constructor(e){if(this.width=void 0,this.character=void 0,this.width=e,e>=0.05555&&e<=0.05556)this.character=" ";else if(e>=0.1666&&e<=0.1667)this.character=" ";else if(e>=0.2222&&e<=0.2223)this.character=" ";else if(e>=0.2777&&e<=0.2778)this.character=" ";else if(e>=-0.05556&&e<=-0.05555)this.character=" ";else if(e>=-0.1667&&e<=-0.1666)this.character=" ";else if(e>=-0.2223&&e<=-0.2222)this.character=" ";else if(e>=-0.2778&&e<=-0.2777)this.character=" ";else this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);else{var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",ce(this.width)),e}}toMarkup(){if(this.character)return"<mtext>"+this.character+"</mtext>";else return'<mspace width="'+ce(this.width)+'"/>'}toText(){if(this.character)return this.character;else return" "}}var M2=new Set(["\\imath","\\jmath"]),D2=new Set(["mrow","mtable"]),en=function(t,n,r){var s,i;if(Qe[n][t]&&Qe[n][t].replace&&t.charCodeAt(0)!==55349&&!(Object.prototype.hasOwnProperty.call(yd,t)&&((r==null||(s=r.fontFamily)==null?void 0:s.slice(4,6))==="tt"||(r==null||(i=r.font)==null?void 0:i.slice(4,6))==="tt")))t=Qe[n][t].replace;return new lt(t)},Tl=function(t){if(t.length===1)return t[0];else return new ie("mrow",t)},L2={mathit:"italic",boldsymbol:(e)=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},Rl=(e,t)=>{if(e.mode==="text"){if(t.fontFamily==="texttt")return"monospace";else if(t.fontFamily==="textsf")if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"sans-serif-bold-italic";else if(t.fontShape==="textit")return"sans-serif-italic";else if(t.fontWeight==="textbf")return"bold-sans-serif";else return"sans-serif";else if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";else if(t.fontShape==="textit")return"italic";else if(t.fontWeight==="textbf")return"bold"}var n=t.font;if(!n||n==="mathnormal")return null;var r=e.mode,s=L2[n];if(s)return typeof s==="function"?s(e):s;var i=e.text;if(M2.has(i))return null;if(Qe[r][i]){var o=Qe[r][i].replace;if(o)i=o}var a=dl[n].fontName;if(Al(i,a,r))return dl[n].variant;return null};function Va(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof lt&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof lt&&n.text===","}else return!1}var Jt=function(t,n,r){if(t.length===1){var s=je(t[0],n);if(r&&s instanceof ie&&s.type==="mo")s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em");return[s]}var i=[],o;for(var a=0;a<t.length;a++){var l=je(t[a],n);if(l instanceof ie&&o instanceof ie){if(l.type==="mtext"&&o.type==="mtext"&&l.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...l.children);continue}else if(l.type==="mn"&&o.type==="mn"){o.children.push(...l.children);continue}else if(Va(l)&&o.type==="mn"){o.children.push(...l.children);continue}else if(l.type==="mn"&&Va(o))l.children=[...o.children,...l.children],i.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(o.type==="mn"||Va(o))){var u=l.children[0];if(u instanceof ie&&u.type==="mn")u.children=[...o.children,...u.children],i.pop()}else if(o.type==="mi"&&o.children.length===1){var d=o.children[0];if(d instanceof lt&&d.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var h=l.children[0];if(h instanceof lt&&h.text.length>0)h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),i.pop()}}}i.push(l),o=l}return i},fr=function(t,n,r){return Tl(Jt(t,n,r))},je=function(t,n){if(!t)return new ie("mrow");if(li[t.type])return li[t.type](t,n);else throw new se("Got group of unknown type: '"+t.type+"'")};function Hu(e,t,n,r,s){var i=Jt(e,n),o;if(i.length===1&&i[0]instanceof ie&&D2.has(i[0].type))o=i[0];else o=new ie("mrow",i);var a=new ie("annotation",[new lt(t)]);a.setAttribute("encoding","application/x-tex");var l=new ie("semantics",[o,a]),u=new ie("math",[l]);if(u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r)u.setAttribute("display","block");var d=s?"katex":"katex-mathml";return ee([d],[u])}var I2=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Pu=[0.5,0.6,0.7,0.8,0.9,1,1.2,1.44,1.728,2.074,2.488],Uu=function(t,n){return n.size<2?t:I2[t-1][n.size-1]};class zn{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.strict=void 0,this.style=e.style,this.color=e.color,this.size=e.size||zn.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Pu[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this.strict=e.strict,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness,strict:this.strict};return Object.assign(t,e),new zn(t)}havingStyle(e){if(this.style===e)return this;else return this.extend({style:e,size:Uu(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){if(this.size===e&&this.textSize===e)return this;else return this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Pu[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Uu(zn.BASESIZE,e);if(this.size===t&&this.textSize===zn.BASESIZE&&this.style===e)return this;else return this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){if(e.size!==this.size)return["katex-sizing","reset-size"+e.size,"size"+this.size];else return[]}baseSizingClasses(){if(this.size!==zn.BASESIZE)return["katex-sizing","reset-size"+this.size,"size"+zn.BASESIZE];else return[]}fontMetrics(){if(!this._fontMetrics)this._fontMetrics=g2(this.size);return this._fontMetrics}getColor(){if(this.phantom)return"transparent";else return this.color}}zn.BASESIZE=6;var Sd=(e)=>new zn({style:e.displayMode?De.DISPLAY:De.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness,strict:e.strict}),Td=function(t,n){if(n.displayMode){var r=["katex-display"];if(n.leqno)r.push("leqno");if(n.fleqn)r.push("fleqn");t=ee(r,[t])}return t},N2=function(t,n,r){var s=Sd(r),i;if(r.output==="mathml")return Hu(t,n,s,r.displayMode,!0);else if(r.output==="html"){var o=pl(t,s);i=ee(["katex"],[o])}else{var a=Hu(t,n,s,r.displayMode,!1),l=pl(t,s);i=ee(["katex"],[a,l])}return Td(i,r)},B2=function(t,n){var r=Sd(n),s=pl(t,r),i=ee(["katex"],[s]);return Td(i,n)},O2={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Eo=function(t){var n=new ie("mo",[new lt(O2[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},$2={overrightarrow:[["rightarrow"],0.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],0.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],0.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],0.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],0.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],0.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],0.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],0.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],0.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],0.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],0.888,522,"xMaxYMin"],xlongequal:[["longequal"],0.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],0.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],0.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],0.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],0.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],0.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],0.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],0.888,342],undergroup:[["leftgroupunder","rightgroupunder"],0.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},z2=new Set(["widehat","widecheck","widetilde","utilde"]),Ao=function(t,n){function r(){var l=400000,u=t.label.slice(1);if(z2.has(u)&&"base"in t){var d=t.base.type==="ordgroup"?t.base.body.length:1,h,p,g;if(d>5)if(u==="widehat"||u==="widecheck")h=420,l=2364,g=0.42,p=u+"4";else h=312,l=2340,g=0.34,p="tilde4";else{var b=[1,1,2,2,3,3][d];if(u==="widehat"||u==="widecheck")l=[0,1062,2364,2364,2364][b],h=[0,239,300,360,420][b],g=[0,0.24,0.3,0.3,0.36,0.42][b],p=u+b;else l=[0,600,1033,2339,2340][b],h=[0,260,286,306,312][b],g=[0,0.26,0.286,0.3,0.306,0.34][b],p="tilde"+b}var x=new qn(p),k=new bn([x],{width:"100%",height:ce(g),viewBox:"0 0 "+l+" "+h,preserveAspectRatio:"none"});return{span:dr([],[k],n),minWidth:0,height:g}}else{var E=[],T=$2[u];if(!T)throw Error('No SVG data for "'+u+'".');var _=T[0],A=T[1],D=T[2],R=D/1000,L=_.length,B,O;if(L===1){if(T.length!==4)throw Error('Expected 4-tuple for single-path SVG data "'+u+'".');B=["hide-tail"],O=[T[3]]}else if(L===2)B=["halfarrow-left","halfarrow-right"],O=["xMinYMin","xMaxYMin"];else if(L===3)B=["brace-left","brace-center","brace-right"],O=["xMinYMin","xMidYMin","xMaxYMin"];else throw Error(`Correct katexImagesData or update code here to support
|
|
279
|
-
`+L+" children.");for(var H=0;H<L;H++){var K=new qn(_[H]),G=new bn([K],{width:"400em",height:ce(R),viewBox:"0 0 "+l+" "+D,preserveAspectRatio:O[H]+" slice"}),de=dr([B[H]],[G],n);if(L===1)return{span:de,minWidth:A,height:R};else de.style.height=ce(R),E.push(de)}return{span:ee(["katex-stretchy"],E,n),minWidth:A,height:R}}}var s=r(),{span:i,minWidth:o,height:a}=s;if(i.height=a,i.style.height=ce(a),o>0)i.style.minWidth=ce(o);return i},F2=function(t,n,r,s,i){var o,a=t.height+t.depth+r+s;if(/fbox|color|angl/.test(n)){if(o=ee(["katex-stretchy",n],[],i),n==="fbox"){var l=i.color&&i.getColor();if(l)o.style.borderColor=l}}else{var u=[];if(/^[bx]cancel$/.test(n))u.push(new vo({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"}));if(/^x?cancel$/.test(n))u.push(new vo({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new bn(u,{width:"100%",height:ce(a)});o=dr([],[d],i)}return o.height=a,o.style.height=ce(a),o},q2=["bin","close","inner","open","punct","rel"],H2=["accent-token","mathord","op-token","spacing","textord"],P2=new Set(q2),U2=new Set(H2);function W2(e){return P2.has(e)}function Ie(e,t){if(!e||e.type!==t)throw Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Co(e){var t=_o(e);if(!t)throw Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function _o(e){if(e.type==="atom"||U2.has(e.type))return e;return null}function Ml(e,t,n){var r="";for(var s of e.body)if(s.type==="textord")r+=s.text;else if(n&&s.type==="spacing"&&s.text===" ")r+=" ";else throw new se(t,e);return r}var Rd=(e)=>{if(e instanceof qt)return e;if(m2(e)&&e.children.length===1)return Rd(e.children[0])},Md=(e,t)=>{var n,r,s;if(e&&e.type==="supsub")r=Ie(e.base,"accent"),n=r.base,e.base=n,s=h2(ze(e,t)),e.base=r;else r=Ie(e,"accent"),n=r.base;var i=ze(n,t.havingCrampedStyle()),o=r.isShifty&&Hn(n),a=0;if(o){var l,u;a=(l=(u=Rd(i))==null?void 0:u.skew)!=null?l:0}var d=r.label==="\\c",h=d?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight),p;if(!r.isStretchy){var g,b;if(r.label==="\\vec")g=Ed("vec",t),b=xd.vec[1];else if(g=xo({type:"textord",mode:r.mode,text:r.label},t),g=f2(g),g.italic=0,b=g.width,d)h+=g.depth;p=ee(["accent-body"],[g]);var x=r.label==="\\textcircled";if(x)p.classes.push("accent-full"),h=i.height;var k=a;if(!x)k-=b/2;if(p.style.left=ce(k),r.label==="\\textcircled")p.style.top=".2em";p=qe({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-h},{type:"elem",elem:p}]})}else p=Ao(r,t),p=qe({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+ce(2*a)+")",marginLeft:ce(2*a)}:void 0}]});var E=ee(["mord","katex-accent"],[p],t);if(s)return s.children[0]=E,s.height=Math.max(E.height,s.height),s.classes[0]="mord",s;else return E};var j2=(e,t)=>{var n=e.isStretchy?Eo(e.label):new ie("mo",[en(e.label,e.mode)]),r=new ie("mover",[je(e.base,t),n]);return r.setAttribute("accent","true"),r},G2=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e)=>"\\"+e).join("|"));he({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],numArgs:1,handler:(e,t)=>{var n=ci(t[0]),r=!G2.test(e.funcName),s=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:s,base:n}},htmlBuilder:Md,mathmlBuilder:j2});he({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.","\\\"","\\c","\\r","\\H","\\v","\\textcircled"],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"],handler:(e,t)=>{var n=t[0],r=e.parser.mode;if(r==="math")Ft({strict:e.parser.settings.strict,errorCode:"mathVsTextAccents",errorMsg:"LaTeX's accent "+e.funcName+" works only in text mode",report:!0}),r="text";return{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}});he({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:s}},htmlBuilder:(e,t)=>{var n=ze(e.base,t),r=Ao(e,t),s=e.label==="\\utilde"?0.12:0,i=qe({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:n}]});return ee(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var n=Eo(e.label),r=new ie("munder",[je(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var co=(e)=>{var t=new ie("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};he({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),s=ps(ze(e.body,r,t),t),i=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(i+"-arrow-pad");var o;if(e.below)r=t.havingStyle(n.sub()),o=ps(ze(e.below,r,t),t),o.classes.push(i+"-arrow-pad");var a=Ao(e,t),l=-t.fontMetrics().axisHeight+0.5*a.height,u=-t.fontMetrics().axisHeight-0.5*a.height-0.111;if(s.depth>0.25||e.label==="\\xleftequilibrium")u-=s.depth;var d;if(o){var h=-t.fontMetrics().axisHeight+o.height+0.5*a.height+0.111;d=qe({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:a,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:o,shift:h}]})}else d=qe({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:a,shift:l,wrapperClasses:["svg-align"]}]});return ee(["mrel","x-arrow"],[d],t)},mathmlBuilder(e,t){var n=Eo(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=co(je(e.body,t));if(e.below){var i=co(je(e.below,t));r=new ie("munderover",[n,i,s])}else r=new ie("mover",[n,s])}else if(e.below){var o=co(je(e.below,t));r=new ie("munder",[n,o])}else r=co(),r=new ie("mover",[n,r]);return r}});function K2(e,t){var n=gt(e.body,t,!0);return ee([e.mclass],n,t)}function V2(e,t){var n,r=Jt(e.body,t);if(e.mclass==="minner")n=new ie("mpadded",r);else if(e.mclass==="mord")if(e.isCharacterBox)n=r[0],n.type="mi";else n=new ie("mi",r);else{if(e.isCharacterBox)n=r[0],n.type="mo";else n=new ie("mo",r);if(e.mclass==="mbin")n.attributes.lspace="0.22em",n.attributes.rspace="0.22em";else if(e.mclass==="mpunct")n.attributes.lspace="0em",n.attributes.rspace="0.17em";else if(e.mclass==="mopen"||e.mclass==="mclose")n.attributes.lspace="0em",n.attributes.rspace="0em"}return n}he({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],numArgs:1,primitive:!0,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:ut(s),isCharacterBox:Hn(s)}},htmlBuilder:K2,mathmlBuilder:V2});var So=(e)=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;if(t.type==="atom"&&(t.family==="bin"||t.family==="rel"))return"m"+t.family;else return"mord"};he({type:"mclass",names:["\\@binrel"],numArgs:2,handler(e,t){var n=e.parser;return{type:"mclass",mode:n.mode,mclass:So(t[0]),body:ut(t[1]),isCharacterBox:Hn(t[1])}}});he({type:"mclass",names:["\\stackrel","\\overset","\\underset"],numArgs:2,handler(e,t){var{parser:n,funcName:r}=e,s=t[1],i=t[0],o;if(r!=="\\stackrel")o=So(s);else o="mrel";var a={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:ut(s)},l=r==="\\underset"?{type:"supsub",mode:i.mode,base:a,sub:i}:{type:"supsub",mode:i.mode,base:a,sup:i};return{type:"mclass",mode:n.mode,mclass:o,body:[l],isCharacterBox:Hn(l)}}});he({type:"pmb",names:["\\pmb"],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser;return{type:"pmb",mode:n.mode,mclass:So(t[0]),body:ut(t[0])}},htmlBuilder(e,t){var n=gt(e.body,t,!0),r=ee([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=Jt(e.body,t),r=new ie("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var J2={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Wu=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),ju=(e)=>e.type==="textord"&&e.text==="@",Z2=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function Y2(e,t,n){var r=J2[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var s=n.callFunction("\\\\cdleft",[t[0]],[]),i={type:"atom",text:r,mode:"math",family:"rel"},o=n.callFunction("\\Big",[i],[]),a=n.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[s,o,a]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function X2(e){var t=[];e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();while(!0){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){if(t[t.length-1].length===0)t.pop();break}else throw new se("Expected \\\\ or \\cr or \\end",e.nextToken)}var r=[],s=[r];for(var i=0;i<t.length;i++){var o=t[i],a=Wu();for(var l=0;l<o.length;l++)if(!ju(o[l]))a.body.push(o[l]);else{r.push(a),l+=1;var u=Co(o[l]).text,d=[,,];if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},"=|.".includes(u));else if("<>AV".includes(u))for(var h=0;h<2;h++){var p=!0;for(var g=l+1;g<o.length;g++){if(Z2(o[g],u)){p=!1,l=g;break}if(ju(o[g]))throw new se("Missing a "+u+" character to complete a CD arrow.",o[g]);d[h].body.push(o[g])}if(p)throw new se("Missing a "+u+" character to complete a CD arrow.",o[l])}else throw new se('Expected one of "<>AV=|." after @',o[l]);var b=Y2(u,d,e),x={type:"styling",body:[b],mode:"math",style:"display",resetFont:!0};r.push(x),a=Wu()}if(i%2===0)r.push(a);else r.shift();r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var k=Array(s[0].length).fill({type:"align",align:"c",pregap:0.25,postgap:0.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:k,colSeparationType:"CD",hLinesBeforeRow:Array(s.length+1).fill([])}}he({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=ps(ze(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=ce(0.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new ie("mrow",[je(e.label,t)]);if(n=new ie("mpadded",[n]),n.setAttribute("width","0"),e.side==="left")n.setAttribute("lspace","-1width");return n.setAttribute("voffset","0.7em"),n=new ie("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});he({type:"cdlabelparent",names:["\\\\cdparent"],numArgs:1,handler(e,t){var n=e.parser;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=ps(ze(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new ie("mrow",[je(e.fragment,t)])}});he({type:"textord",names:["\\@char"],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=Ie(t[0],"ordgroup"),s=Ml(r,"\\@char has non-numeric argument"),i=parseInt(s),o;if(isNaN(i))throw new se("\\@char has non-numeric argument "+s);else if(i<0||i>1114111)throw new se("\\@char with invalid code point "+s);else if(i<=65535)o=String.fromCharCode(i);else i-=65536,o=String.fromCharCode((i>>10)+55296,(i&1023)+56320);return{type:"textord",mode:n.mode,text:o}}});var Q2=(e,t)=>{var n=gt(e.body,t.withColor(e.color),!1);return Un(n)},eb=(e,t)=>{var n=Jt(e.body,t.withColor(e.color)),r=new ie("mstyle",n);return r.setAttribute("mathcolor",e.color),r};he({type:"color",names:["\\textcolor"],numArgs:2,allowedInText:!0,argTypes:["color","original"],handler(e,t){var n=e.parser,r=Ie(t[0],"color-token").color,s=t[1];return{type:"color",mode:n.mode,color:r,body:ut(s)}},htmlBuilder:Q2,mathmlBuilder:eb});he({type:"color",names:["\\color"],numArgs:1,allowedInText:!0,argTypes:["color"],handler(e,t){var{parser:n,breakOnTokenText:r}=e,s=Ie(t[0],"color-token").color;n.gullet.macros.set("\\current@color",s);var i=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:s,body:i}}});he({type:"cr",names:["\\\\"],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=t.gullet.future().text==="["?t.parseSizeGroup(!0):null,r=!t.settings.displayMode||!Ft({strict:t.settings.strict,errorCode:"newLineInDisplayMode",errorMsg:"In LaTeX, \\\\ or \\newline does nothing in display mode",report:!1});return{type:"cr",mode:t.mode,newLine:r,size:n&&Ie(n,"size").value}},htmlBuilder(e,t){var n=ee(["mspace"],[],t);if(e.newLine){if(n.classes.push("katex-newline"),e.size)n.style.marginTop=ce(rt(e.size,t))}return n},mathmlBuilder(e,t){var n=new ie("mspace");if(e.newLine){if(n.setAttribute("linebreak","newline"),e.size)n.setAttribute("height",ce(rt(e.size,t)))}return n}});var gl={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Dd=(e)=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new se("Expected a control sequence",e);return t},tb=(e)=>{var t=e.gullet.popToken();if(t.text==="="){if(t=e.gullet.popToken(),t.text===" ")t=e.gullet.popToken()}return t},Ld=(e,t,n,r)=>{var s=e.gullet.macros.get(n.text);if(s==null)n.noexpand=!0,s={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)};e.gullet.macros.set(t,s,r)};he({type:"internal",names:["\\global","\\long","\\\\globallong"],numArgs:0,allowedInText:!0,handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(gl[r.text]){if(n==="\\global"||n==="\\\\globallong")r.text=gl[r.text];return Ie(t.parseFunction(),"internal")}throw new se("Invalid token after macro prefix",r)}});he({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new se("Expected a control sequence",r);var i=0,o,a=[[]];while(t.gullet.future().text!=="{")if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){o=t.gullet.future(),a[i].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new se('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new se('Argument number "'+r.text+'" out of order');i++,a.push([])}else if(r.text==="EOF")throw new se("Expected a macro definition");else a[i].push(r.text);var l=t.gullet.consumeArg(),u=l.tokens;if(o)u.unshift(o);if(n==="\\edef"||n==="\\xdef")u=t.gullet.expandTokens(u),u.reverse();return t.gullet.macros.set(s,{tokens:u,numArgs:i,delimiters:a},n===gl[n]),{type:"internal",mode:t.mode}}});he({type:"internal",names:["\\let","\\\\globallet"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=Dd(t.gullet.popToken());t.gullet.consumeSpaces();var s=tb(t);return Ld(t,r,s,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});he({type:"internal",names:["\\futurelet","\\\\globalfuture"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=Dd(t.gullet.popToken()),s=t.gullet.popToken(),i=t.gullet.popToken();return Ld(t,r,i,n==="\\\\globalfuture"),t.gullet.pushToken(i),t.gullet.pushToken(s),{type:"internal",mode:t.mode}}});var si=function(t,n,r){var s=Qe.math[t]&&Qe.math[t].replace,i=Al(s||t,n,r);if(!i)throw Error("Unsupported symbol "+t+" and font size "+n+".");return i},Dl=function(t,n,r,s){var i=r.havingBaseStyle(n),o=ee(s.concat(i.sizingClasses(r)),[t],r),a=i.sizeMultiplier/r.sizeMultiplier;return o.height*=a,o.depth*=a,o.maxFontSize=i.sizeMultiplier,o},Id=function(t,n,r){var s=n.havingBaseStyle(r),i=(1-n.sizeMultiplier/s.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=ce(i),t.height-=i,t.depth+=i},nb=function(t,n,r,s,i,o){var a=Dt(t,"Main-Regular",i,s),l=Dl(a,n,s,o);if(r)Id(l,s,n);return l},rb=function(t,n,r,s){return Dt(t,"Size"+n+"-Regular",r,s)},Nd=function(t,n,r,s,i,o){var a=rb(t,n,i,s),l=Dl(ee(["delimsizing","size"+n],[a],s),De.TEXT,s,o);if(r)Id(l,s,De.TEXT);return l},Ja=function(t,n,r,s){var i;if(n==="Size1-Regular")i="delim-size1";else i="delim-size4";var o=ee(["delimsizinginner",i],[ee([],[Dt(t,n,r,s)])]);return{type:"elem",elem:o}},Za=function(t,n,r){var s=gn["Size4-Regular"][t.charCodeAt(0)]?gn["Size4-Regular"][t.charCodeAt(0)][4]:gn["Size1-Regular"][t.charCodeAt(0)][4],i=new qn("inner",o2(t,Math.round(1000*n))),o=new bn([i],{width:ce(s),height:ce(n),style:"width:"+ce(s),viewBox:"0 0 "+1000*s+" "+Math.round(1000*n),preserveAspectRatio:"xMinYMin"}),a=dr([],[o],r);return a.height=n,a.style.height=ce(n),a.style.width=ce(s),{type:"elem",elem:a}},bl=0.008,uo={type:"kern",size:-1*bl},sb=new Set(["|","\\lvert","\\rvert","\\vert"]),ib=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Bd=function(t,n,r,s,i,o){var a,l,u,d,h="",p=0;a=u=d=t,l=null;var g="Size1-Regular";if(t==="\\uparrow")u=d="⏐";else if(t==="\\Uparrow")u=d="‖";else if(t==="\\downarrow")a=u="⏐";else if(t==="\\Downarrow")a=u="‖";else if(t==="\\updownarrow")a="\\uparrow",u="⏐",d="\\downarrow";else if(t==="\\Updownarrow")a="\\Uparrow",u="‖",d="\\Downarrow";else if(sb.has(t))u="∣",h="vert",p=333;else if(ib.has(t))u="∥",h="doublevert",p=556;else if(t==="["||t==="\\lbrack")a="⎡",u="⎢",d="⎣",g="Size4-Regular",h="lbrack",p=667;else if(t==="]"||t==="\\rbrack")a="⎤",u="⎥",d="⎦",g="Size4-Regular",h="rbrack",p=667;else if(t==="\\lfloor"||t==="⌊")u=a="⎢",d="⎣",g="Size4-Regular",h="lfloor",p=667;else if(t==="\\lceil"||t==="⌈")a="⎡",u=d="⎢",g="Size4-Regular",h="lceil",p=667;else if(t==="\\rfloor"||t==="⌋")u=a="⎥",d="⎦",g="Size4-Regular",h="rfloor",p=667;else if(t==="\\rceil"||t==="⌉")a="⎤",u=d="⎥",g="Size4-Regular",h="rceil",p=667;else if(t==="("||t==="\\lparen")a="⎛",u="⎜",d="⎝",g="Size4-Regular",h="lparen",p=875;else if(t===")"||t==="\\rparen")a="⎞",u="⎟",d="⎠",g="Size4-Regular",h="rparen",p=875;else if(t==="\\{"||t==="\\lbrace")a="⎧",l="⎨",d="⎩",u="⎪",g="Size4-Regular";else if(t==="\\}"||t==="\\rbrace")a="⎫",l="⎬",d="⎭",u="⎪",g="Size4-Regular";else if(t==="\\lgroup"||t==="⟮")a="⎧",d="⎩",u="⎪",g="Size4-Regular";else if(t==="\\rgroup"||t==="⟯")a="⎫",d="⎭",u="⎪",g="Size4-Regular";else if(t==="\\lmoustache"||t==="⎰")a="⎧",d="⎭",u="⎪",g="Size4-Regular";else if(t==="\\rmoustache"||t==="⎱")a="⎫",d="⎩",u="⎪",g="Size4-Regular";var b=si(a,g,i),x=b.height+b.depth,k=si(u,g,i),E=k.height+k.depth,T=si(d,g,i),_=T.height+T.depth,A=0,D=1;if(l!==null){var R=si(l,g,i);A=R.height+R.depth,D=2}var L=x+_+A,B=Math.max(0,Math.ceil((n-L)/(D*E))),O=L+B*D*E,H=s.fontMetrics().axisHeight;if(r)H*=s.sizeMultiplier;var K=O/2-H,G=[];if(h.length>0){var de=O-x-_,ne=Math.round(O*1000),ae=a2(h,Math.round(de*1000)),z=new qn(h,ae),j=ce(p/1000),Z=ce(ne/1000),Q=new bn([z],{width:j,height:Z,viewBox:"0 0 "+p+" "+ne}),oe=dr([],[Q],s);oe.height=ne/1000,oe.style.width=j,oe.style.height=Z,G.push({type:"elem",elem:oe})}else{if(G.push(Ja(d,g,i,s)),G.push(uo),l===null){var F=O-x-_+2*bl;G.push(Za(u,F,s))}else{var X=(O-x-_-A)/2+2*bl;G.push(Za(u,X,s)),G.push(uo),G.push(Ja(l,g,i,s)),G.push(uo),G.push(Za(u,X,s))}G.push(uo),G.push(Ja(a,g,i,s))}var te=s.havingBaseStyle(De.TEXT),xe=qe({positionType:"bottom",positionData:K,children:G});return Dl(ee(["delimsizing","mult"],[xe],te),De.TEXT,s,o)},Ya=80,Xa=0.08,Qa=function(t,n,r,s,i){var o=i2(t,s,r),a=new qn(t,o),l=new bn([a],{width:"400em",height:ce(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return dr(["hide-tail"],[l],i)},ob=function(t,n){var r=n.havingBaseSizing(),s=qd("\\surd",t*r.sizeMultiplier,Fd,r),i=r.sizeMultiplier,o=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),a,l,u,d,h;if(s.type==="small"){if(d=1000+1000*o+Ya,t<1)i=1;else if(t<1.4)i=0.7;l=(1+o+Xa)/i,u=(1+o)/i,a=Qa("sqrtMain",l,d,o,n),a.style.minWidth="0.853em",h=0.833/i}else if(s.type==="large")d=(1000+Ya)*ii[s.size],u=(ii[s.size]+o)/i,l=(ii[s.size]+o+Xa)/i,a=Qa("sqrtSize"+s.size,l,d,o,n),a.style.minWidth="1.02em",h=1/i;else l=t+o+Xa,u=t+o,d=Math.floor(1000*t+o)+Ya,a=Qa("sqrtTall",l,d,o,n),a.style.minWidth="0.742em",h=1.056;return a.height=u,a.style.height=ce(l),{span:a,advanceWidth:h,ruleWidth:(n.fontMetrics().sqrtRuleThickness+o)*i}},Od=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),ab=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),$d=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),ii=[0,1.2,1.8,2.4,3],zd=function(t,n,r,s,i){if(t==="<"||t==="\\lt"||t==="⟨")t="\\langle";else if(t===">"||t==="\\gt"||t==="⟩")t="\\rangle";if(Od.has(t)||$d.has(t))return Nd(t,n,!1,r,s,i);else if(ab.has(t))return Bd(t,ii[n],!1,r,s,i);else throw new se("Illegal delimiter: '"+t+"'")},lb=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],cb=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"stack"}],Fd=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],ub=function(t){if(t.type==="small")return"Main-Regular";else if(t.type==="large")return"Size"+t.size+"-Regular";else if(t.type==="stack")return"Size4-Regular";else{var n=t.type;throw Error("Add support for delim type '"+n+"' here.")}},qd=function(t,n,r,s){var i=Math.min(2,3-s.style.size);for(var o=i;o<r.length;o++){var a=r[o];if(a.type==="stack")break;var l=si(t,ub(a),"math"),u=l.height+l.depth;if(a.type==="small"){var d=s.havingBaseStyle(a.style);u*=d.sizeMultiplier}if(u>n)return a}return r[r.length-1]},vl=function(t,n,r,s,i,o){if(t==="<"||t==="\\lt"||t==="⟨")t="\\langle";else if(t===">"||t==="\\gt"||t==="⟩")t="\\rangle";var a;if($d.has(t))a=lb;else if(Od.has(t))a=Fd;else a=cb;var l=qd(t,n,a,s);if(l.type==="small")return nb(t,l.style,r,s,i,o);else if(l.type==="large")return Nd(t,l.size,r,s,i,o);else return Bd(t,n,r,s,i,o)},el=function(t,n,r,s,i,o){var a=s.fontMetrics().axisHeight*s.sizeMultiplier,l=901,u=5/s.fontMetrics().ptPerEm,d=Math.max(n-a,r+a),h=Math.max(d/500*l,2*d-u);return vl(t,h,!0,s,i,o)},Gu={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},db=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function Ku(e){return"isMiddle"in e}function To(e,t){var n=_o(e);if(n&&db.has(n.text))return n;else if(n)throw new se("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e);else throw new se("Invalid delimiter type '"+e.type+"'",e)}he({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],numArgs:1,argTypes:["primitive"],handler:(e,t)=>{var n=To(ci(t[0]),e);return{type:"delimsizing",mode:e.parser.mode,size:Gu[e.funcName].size,mclass:Gu[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>{if(e.delim===".")return ee([e.mclass]);return zd(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:(e)=>{var t=[];if(e.delim!==".")t.push(en(e.delim,e.mode));var n=new ie("mo",t);if(e.mclass==="mopen"||e.mclass==="mclose")n.setAttribute("fence","true");else n.setAttribute("fence","false");n.setAttribute("stretchy","true");var r=ce(ii[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function Vu(e){if(!e.body)throw Error("Bug: The leftright ParseNode wasn't fully parsed.")}he({type:"leftright-right",names:["\\right"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!=="string")throw new se("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:To(t[0],e).text,color:n}}});he({type:"leftright",names:["\\left"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=To(t[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=Ie(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:n.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{Vu(e);var n=gt(e.body,t,!0,["mopen","mclose"]),r=0,s=0,i=!1;for(var o=0;o<n.length;o++){var a=n[o];if(Ku(a))i=!0;else r=Math.max(n[o].height,r),s=Math.max(n[o].depth,s)}r*=t.sizeMultiplier,s*=t.sizeMultiplier;var l;if(e.left===".")l=ui(t,["mopen"]);else l=el(e.left,r,s,t,e.mode,["mopen"]);if(n.unshift(l),i)for(var u=1;u<n.length;u++){var d=n[u];if(Ku(d)){var h=d.isMiddle;n[u]=el(h.delim,r,s,h.options,e.mode,[])}}var p;if(e.right===".")p=ui(t,["mclose"]);else{var g=e.rightColor?t.withColor(e.rightColor):t;p=el(e.right,r,s,g,e.mode,["mclose"])}return n.push(p),ee(["minner"],n,t)},mathmlBuilder:(e,t)=>{Vu(e);var n=Jt(e.body,t);if(e.left!=="."){var r=new ie("mo",[en(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var s=new ie("mo",[en(e.right,e.mode)]);if(s.setAttribute("fence","true"),e.rightColor)s.setAttribute("mathcolor",e.rightColor);n.push(s)}return Tl(n)}});he({type:"middle",names:["\\middle"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=To(t[0],e);if(!e.parser.leftrightDepth)throw new se("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===".")n=ui(t,[]);else n=zd(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t};return n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?en("|","text"):en(e.delim,e.mode),r=new ie("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var fb=(e,t)=>{var n=ps(ze(e.body,t),t),r=e.label.slice(1),s=t.sizeMultiplier,i,o,a=Hn(e.body);if(r==="sout")i=ee(["katex-stretchy","katex-sout"]),i.height=t.fontMetrics().defaultRuleThickness/s,o=-0.5*t.fontMetrics().xHeight;else if(r==="phase"){var l=rt({number:0.6,unit:"pt"},t),u=rt({number:0.35,unit:"ex"},t),d=t.havingBaseSizing();s=s/d.sizeMultiplier;var h=n.height+n.depth+l+u;n.style.paddingLeft=ce(h/2+l);var p=Math.floor(1000*h*s),g=r2(p),b=new bn([new qn("phase",g)],{width:"400em",height:ce(p/1000),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=dr(["hide-tail"],[b],t),i.style.height=ce(h),o=n.depth+l+u}else{if(/cancel/.test(r)){if(!a)n.classes.push("cancel-pad")}else if(r==="angl")n.classes.push("anglpad");else n.classes.push("boxpad");var x,k,E=0;if(/box/.test(r))E=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),x=t.fontMetrics().fboxsep+(r==="colorbox"?0:E),k=x;else if(r==="angl")E=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),x=4*E,k=Math.max(0,0.25-n.depth);else x=a?0.2:0,k=x;if(i=F2(n,r,x,k,t),/fbox|boxed|fcolorbox/.test(r))i.style.borderStyle="solid",i.style.borderWidth=ce(E);else if(r==="angl"&&E!==0.049)i.style.borderTopWidth=ce(E),i.style.borderRightWidth=ce(E);if(o=n.depth+k,e.backgroundColor){if(i.style.backgroundColor=e.backgroundColor,e.borderColor)i.style.borderColor=e.borderColor}}var T;if(e.backgroundColor)T=qe({positionType:"individualShift",children:[{type:"elem",elem:i,shift:o},{type:"elem",elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?["svg-align"]:[];T=qe({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:i,shift:o,wrapperClasses:_}]})}if(/cancel/.test(r))T.height=n.height,T.depth=n.depth;if(/cancel/.test(r)&&!a)return ee(["mord","cancel-lap"],[T],t);else return ee(["mord"],[T],t)},hb=(e,t)=>{var n,r=new ie(e.label.includes("colorbox")?"mpadded":"menclose",[je(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var s=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+ce(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}if(e.backgroundColor)r.setAttribute("mathbackground",e.backgroundColor);return r};he({type:"enclose",names:["\\colorbox"],numArgs:2,allowedInText:!0,argTypes:["color","hbox"],handler(e,t,n){var{parser:r,funcName:s}=e,i=Ie(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:o}},htmlBuilder:fb,mathmlBuilder:hb});he({type:"enclose",names:["\\fcolorbox"],numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"],handler(e,t,n){var{parser:r,funcName:s}=e,i=Ie(t[0],"color-token").color,o=Ie(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:o,borderColor:i,body:a}}});he({type:"enclose",names:["\\fbox"],numArgs:1,argTypes:["hbox"],allowedInText:!0,handler(e,t){var n=e.parser;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});he({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"enclose",mode:n.mode,label:r,body:s}}});he({type:"enclose",names:["\\sout"],numArgs:1,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e;if(n.mode==="math")Ft({strict:n.settings.strict,errorCode:"mathVsSout",errorMsg:"LaTeX's \\sout works only in text mode",report:!0});var s=t[0];return{type:"enclose",mode:n.mode,label:r,body:s}}});he({type:"enclose",names:["\\angl"],numArgs:1,argTypes:["hbox"],allowedInText:!1,handler(e,t){var n=e.parser;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var Hd={};function vn(e){var{type:t,names:n,props:r,handler:s,htmlBuilder:i,mathmlBuilder:o}=e,a={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s};for(var l=0;l<n.length;++l)Hd[n[l]]=a;if(i)ai[t]=i;if(o)li[t]=o}var Pd={};function w(e,t){Pd[e]=t}class zt{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){if(!t)return e&&e.loc;else if(!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer)return null;else return new zt(e.loc.lexer,e.loc.start,t.loc.end)}}class Kt{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new Kt(t,zt.range(this,e))}}function Ju(e){var t=[];e.consumeSpaces();var n=e.fetch().text;if(n==="\\relax")e.consume(),e.consumeSpaces(),n=e.fetch().text;while(n==="\\hline"||n==="\\hdashline")e.consume(),t.push(n==="\\hdashline"),e.consumeSpaces(),n=e.fetch().text;return t}var Ro=(e)=>{var t=e.parser.settings;if(!t.displayMode)throw new se("{"+e.envName+"} can be used only in display mode.")},mb=new Set(["gather","gather*"]);function Ll(e){if(!e.includes("ed"))return!e.includes("*")}function hr(e,t,n){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:o,colSeparationType:a,autoTag:l,singleRow:u,emptySingleRow:d,maxNumCols:h,leqno:p}=t;if(e.gullet.beginGroup(),!u)e.gullet.macros.set("\\cr","\\\\\\relax");if(!o){var g=e.gullet.expandMacroAsText("\\arraystretch");if(g==null)o=1;else if(o=parseFloat(g),!o||o<0)throw new se("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var b=[],x=[b],k=[],E=[],T=l!=null?[]:void 0;function _(){if(l)e.gullet.macros.set("\\@eqnsw","1",!0)}function A(){if(T)if(e.gullet.macros.get("\\df@tag"))T.push(e.subparse([new Kt("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0);else T.push(Boolean(l)&&e.gullet.macros.get("\\@eqnsw")==="1")}_(),E.push(Ju(e));while(!0){var D=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var R={type:"ordgroup",mode:e.mode,body:D};if(n)R={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[R]};b.push(R);var L=e.fetch().text;if(L==="&"){if(h&&b.length===h)if(u||a)throw new se("Too many tab characters: &",e.nextToken);else Ft({strict:e.settings.strict,errorCode:"textEnv",errorMsg:"Too few columns specified in the {array} column argument.",report:!0});e.consume()}else if(L==="\\end"){if(A(),b.length===1&&R.type==="styling"&&R.body.length===1&&R.body[0].type==="ordgroup"&&R.body[0].body.length===0&&(x.length>1||!d)&&!Array.isArray(T==null?void 0:T[T.length-1])&&!(l&&(T==null?void 0:T[T.length-1])===!0))x.pop();if(E.length<x.length+1)E.push([]);break}else if(L==="\\\\"){e.consume();var B=void 0;if(e.gullet.future().text!==" ")B=e.parseSizeGroup(!0);k.push(B?B.value:null),A(),E.push(Ju(e)),b=[],x.push(b),_()}else throw new se("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:s,arraystretch:o,body:x,cols:i,rowGaps:k,hskipBeforeAndAfter:r,hLinesBeforeRow:E,colSeparationType:a,tags:T,leqno:p}}function Il(e){if(e.slice(0,1)==="d")return"display";else return"text"}var yn=function(t,n){var r,s,i=t.body.length,o=t.hLinesBeforeRow,a=0,l=Array(i),u=[],d=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),h=1/n.fontMetrics().ptPerEm,p=5*h;if(t.colSeparationType&&t.colSeparationType==="small"){var g=n.havingStyle(De.SCRIPT).sizeMultiplier;p=0.2778*(g/n.sizeMultiplier)}var b=t.colSeparationType==="CD"?rt({number:3,unit:"ex"},n):12*h,x=3*h,k=t.arraystretch*b,E=0.7*k,T=0.3*k,_=0;function A(Le){for(var $e=0;$e<Le.length;++$e){if($e>0)_+=0.25;u.push({pos:_,isDashed:Le[$e]})}}A(o[0]);for(r=0;r<t.body.length;++r){var D=t.body[r],R=E,L=T;if(a<D.length)a=D.length;var B={cells:Array(D.length),height:0,depth:0,pos:0};for(s=0;s<D.length;++s){var O=ze(D[s],n);if(L<O.depth)L=O.depth;if(R<O.height)R=O.height;B.cells[s]=O}var H=t.rowGaps[r],K=0;if(H){if(K=rt(H,n),K>0){if(K+=T,L<K)L=K;K=0}}if(t.addJot&&r<t.body.length-1)L+=x;B.height=R,B.depth=L,_+=R,B.pos=_,_+=L+K,l[r]=B,A(o[r+1])}var G=_/2+n.fontMetrics().axisHeight,de=t.cols||[],ne=[],ae,z,j=[];if(t.tags&&t.tags.some((Le)=>Le))for(r=0;r<i;++r){var Z=l[r],Q=Z.pos-G,oe=t.tags[r],F=void 0;if(oe===!0)F=ee(["eqn-num"],[],n);else if(oe===!1)F=ee([],[],n);else F=ee([],gt(oe,n,!0),n);F.depth=Z.depth,F.height=Z.height,j.push({type:"elem",elem:F,shift:Q})}for(s=0,z=0;s<a||z<de.length;++s,++z){var X,te=de[z],xe=!0;while(((W=te)==null?void 0:W.type)==="separator"){var W;if(!xe)ae=ee(["arraycolsep"],[]),ae.style.width=ce(n.fontMetrics().doubleRuleSep),ne.push(ae);if(te.separator==="|"||te.separator===":"){var ge=te.separator==="|"?"solid":"dashed",q=ee(["vertical-separator"],[],n);q.style.height=ce(_),q.style.borderRightWidth=ce(d),q.style.borderRightStyle=ge,q.style.margin="0 "+ce(-d/2);var Y=_-G;if(Y)q.style.verticalAlign=ce(-Y);ne.push(q)}else throw new se("Invalid separator type: "+te.separator);z++,te=de[z],xe=!1}if(s>=a)continue;var ue=void 0;if(s>0||t.hskipBeforeAndAfter){var le,be;if(ue=(le=(be=te)==null?void 0:be.pregap)!=null?le:p,ue!==0)ae=ee(["arraycolsep"],[]),ae.style.width=ce(ue),ne.push(ae)}var Ae=[];for(r=0;r<i;++r){var He=l[r],Ne=He.cells[s];if(!Ne)continue;var Pe=He.pos-G;Ne.depth=He.depth,Ne.height=He.height,Ae.push({type:"elem",elem:Ne,shift:Pe})}var mt=qe({positionType:"individualShift",children:Ae}),Dn=ee(["col-align-"+(((X=te)==null?void 0:X.align)||"c")],[mt]);if(ne.push(Dn),s<a-1||t.hskipBeforeAndAfter){var Te,Mr;if(ue=(Te=(Mr=te)==null?void 0:Mr.postgap)!=null?Te:p,ue!==0)ae=ee(["arraycolsep"],[]),ae.style.width=ce(ue),ne.push(ae)}}var st=ee(["mtable"],ne);if(u.length>0){var We=ms("katex-hline",n,d),ss=ms("katex-hdashline",n,d),rn=[{type:"elem",elem:st,shift:0}];while(u.length>0){var is=u.pop(),os=is.pos-G;if(is.isDashed)rn.push({type:"elem",elem:ss,shift:os});else rn.push({type:"elem",elem:We,shift:os})}st=qe({positionType:"individualShift",children:rn})}if(j.length===0)return ee(["mord"],[st],n);else{var fe=qe({positionType:"individualShift",children:j}),ke=ee(["katex-tag"],[fe],n);return Un([st,ke])}},pb={c:"center ",l:"left ",r:"right "},kn=function(t,n){var r=[],s=new ie("mtd",[],["mtr-glue"]),i=new ie("mtd",[],["mml-eqn-num"]);for(var o=0;o<t.body.length;o++){var a=t.body[o],l=[];for(var u=0;u<a.length;u++)l.push(new ie("mtd",[je(a[u],n)]));if(t.tags&&t.tags[o])if(l.unshift(s),l.push(s),t.leqno)l.unshift(i);else l.push(i);r.push(new ie("mtr",l))}var d=new ie("mtable",r),h=t.arraystretch===0.5?0.1:0.16+t.arraystretch-1+(t.addJot?0.09:0);d.setAttribute("rowspacing",ce(h));var p="",g="";if(t.cols&&t.cols.length>0){var b=t.cols,x="",k=!1,E=0,T=b.length;if(b[0].type==="separator")p+="top ",E=1;if(b[b.length-1].type==="separator")p+="bottom ",T-=1;for(var _=E;_<T;_++){var A=b[_];if(A.type==="align"){if(g+=pb[A.align],k)x+="none ";k=!0}else if(A.type==="separator"){if(k)x+=A.separator==="|"?"solid ":"dashed ",k=!1}}if(d.setAttribute("columnalign",g.trim()),/[sd]/.test(x))d.setAttribute("columnlines",x.trim())}if(t.colSeparationType==="align"){var D=t.cols||[],R="";for(var L=1;L<D.length;L++)R+=L%2?"0em ":"1em ";d.setAttribute("columnspacing",R.trim())}else if(t.colSeparationType==="alignat"||t.colSeparationType==="gather")d.setAttribute("columnspacing","0em");else if(t.colSeparationType==="small")d.setAttribute("columnspacing","0.2778em");else if(t.colSeparationType==="CD")d.setAttribute("columnspacing","0.5em");else d.setAttribute("columnspacing","1em");var B="",O=t.hLinesBeforeRow;p+=O[0].length>0?"left ":"",p+=O[O.length-1].length>0?"right ":"";for(var H=1;H<O.length-1;H++)B+=O[H].length===0?"none ":O[H][0]?"dashed ":"solid ";if(/[sd]/.test(B))d.setAttribute("rowlines",B.trim());if(p!=="")d=new ie("menclose",[d]),d.setAttribute("notation",p.trim());if(t.arraystretch&&t.arraystretch<1)d=new ie("mstyle",[d]),d.setAttribute("scriptlevel","1");return d},Ud=function(t,n){if(!t.envName.includes("ed"))Ro(t);var r=[],s=t.envName==="split",i=hr(t.parser,{cols:r,addJot:!0,autoTag:s?void 0:Ll(t.envName),emptySingleRow:!0,colSeparationType:t.envName.includes("at")?"alignat":"align",maxNumCols:s?2:void 0,leqno:t.parser.settings.leqno},"display"),o=0,a=0,l={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){var u="Number of columns should be a positive integer",d=Ml(n[0],u);if(!/^[0-9]+$/.test(d)||Number(d)<1)throw new se(u,n[0]);o=Number(d),a=o*2}var h=!a;i.body.forEach(function(x){for(var k=1;k<x.length;k+=2){var E=Ie(x[k],"styling"),T=Ie(E.body[0],"ordgroup");T.body.unshift(l)}if(!h){var _=x.length/2;if(o<_)throw new se("Too many math in a row: "+("expected "+o+", but got "+_),x[0])}else if(a<x.length)a=x.length});for(var p=0;p<a;++p){var g="r",b=0;if(p%2===1)g="l";else if(p>0&&h)b=1;r[p]={type:"align",align:g,pregap:b,postgap:0}}return i.colSeparationType=h?"align":"alignat",i};vn({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=_o(t[0]),r=n?[t[0]]:Ie(t[0],"ordgroup").body,s=r.map(function(o){var a=Co(o),l=a.text;if("lcr".includes(l))return{type:"align",align:l};else if(l==="|")return{type:"separator",separator:"|"};else if(l===":")return{type:"separator",separator:":"};throw new se("Unknown column alignment: "+l,o)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return hr(e.parser,i,Il(e.envName))},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),n=s.fetch().text,!"lcr".includes(n))throw new se("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:n}]}}var i=hr(e.parser,r,Il(e.envName)),o=Math.max(0,...i.body.map((a)=>a.length));return i.cols=Array(o).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:0.5},n=hr(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=_o(t[0]),r=n?[t[0]]:Ie(t[0],"ordgroup").body,s=r.map(function(a){var l=Co(a),u=l.text;if("lc".includes(u))return{type:"align",align:u};throw new se("Unknown column alignment: "+u,a)});if(s.length>1)throw new se("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:0.5},o=hr(e.parser,i,"script");if(o.body.length>0&&o.body[0].length>1)throw new se("{subarray} can contain only one column");return o},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=hr(e.parser,t,Il(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Ud,htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){if(mb.has(e.envName))Ro(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Ll(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return hr(e.parser,t,"display")},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Ud,htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Ro(e);var t={autoTag:Ll(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return hr(e.parser,t,"display")},htmlBuilder:yn,mathmlBuilder:kn});vn({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Ro(e),X2(e.parser)},htmlBuilder:yn,mathmlBuilder:kn});w("\\nonumber","\\gdef\\@eqnsw{0}");w("\\notag","\\nonumber");he({type:"text",names:["\\hline","\\hdashline"],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new se(e.funcName+" valid only within array environment")}});var Zu=Hd;he({type:"environment",names:["\\begin","\\end"],numArgs:1,argTypes:["text"],handler(e,t){var{parser:n,funcName:r}=e,s=t[0];if(s.type!=="ordgroup")throw new se("Invalid environment name",s);var i=Ml(s,"Environment name should contain only text characters and spaces",!0);if(r==="\\begin"){if(!Object.prototype.hasOwnProperty.call(Zu,i))throw new se("No such environment: "+i,s);var o=Zu[i],a=n.parseArguments("\\begin{"+i+"}",o),{args:l,optArgs:u}=a,d={mode:n.mode,envName:i,parser:n},h=o.handler(d,l,u);n.expect("\\end",!1);var p=n.nextToken,g=Ie(n.parseFunction(),"environment");if(g.name!==i)throw new se("Mismatch: \\begin{"+i+"} matched by \\end{"+g.name+"}",p);return h}return{type:"environment",mode:n.mode,name:i,nameGroup:s}}});var gb=(e,t)=>{var n=e.font,r=t.withFont(n);return ze(e.body,r)},bb=(e,t)=>{var n=e.font,r=t.withFont(n);return je(e.body,r)},Yu={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};he({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=ci(t[0]),i=r in Yu?Yu[r]:r;return{type:"font",mode:n.mode,font:i.slice(1),body:s}},htmlBuilder:gb,mathmlBuilder:bb});he({type:"mclass",names:["\\boldsymbol","\\bm"],numArgs:1,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"mclass",mode:n.mode,mclass:So(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:Hn(r)}}});he({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],numArgs:0,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:s}=e,i=n.mode,o=n.parseExpression(!0,s);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:o}}}});var vb=(e,t)=>{var n=t.style,r=n.fracNum(),s=n.fracDen(),i;i=t.havingStyle(r);var o=ze(e.numer,i,t);if(e.continued){var a=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height<a?a:o.height,o.depth=o.depth<l?l:o.depth}i=t.havingStyle(s);var u=ze(e.denom,i,t),d,h,p;if(e.hasBarLine){if(e.barSize)h=rt(e.barSize,t),d=ms("frac-line",t,h);else d=ms("frac-line",t);h=d.height,p=d.height}else d=null,h=0,p=t.fontMetrics().defaultRuleThickness;var g,b,x;if(n.size===De.DISPLAY.size){if(g=t.fontMetrics().num1,h>0)b=3*p;else b=7*p;x=t.fontMetrics().denom1}else{if(h>0)g=t.fontMetrics().num2,b=p;else g=t.fontMetrics().num3,b=3*p;x=t.fontMetrics().denom2}var k;if(!d){var E=g-o.depth-(u.height-x);if(E<b)g+=0.5*(b-E),x+=0.5*(b-E);k=qe({positionType:"individualShift",children:[{type:"elem",elem:u,shift:x},{type:"elem",elem:o,shift:-g}]})}else{var T=t.fontMetrics().axisHeight;if(g-o.depth-(T+0.5*h)<b)g+=b-(g-o.depth-(T+0.5*h));if(T-0.5*h-(u.height-x)<b)x+=b-(T-0.5*h-(u.height-x));var _=-(T-0.5*h);k=qe({positionType:"individualShift",children:[{type:"elem",elem:u,shift:x},{type:"elem",elem:d,shift:_},{type:"elem",elem:o,shift:-g}]})}i=t.havingStyle(n),k.height*=i.sizeMultiplier/t.sizeMultiplier,k.depth*=i.sizeMultiplier/t.sizeMultiplier;var A;if(n.size===De.DISPLAY.size)A=t.fontMetrics().delim1;else if(n.size===De.SCRIPTSCRIPT.size)A=t.havingStyle(De.SCRIPT).fontMetrics().delim2;else A=t.fontMetrics().delim2;var D,R;if(e.leftDelim==null)D=ui(t,["mopen"]);else D=vl(e.leftDelim,A,!0,t.havingStyle(n),e.mode,["mopen"]);if(e.continued)R=ee([]);else if(e.rightDelim==null)R=ui(t,["mclose"]);else R=vl(e.rightDelim,A,!0,t.havingStyle(n),e.mode,["mclose"]);return ee(["mord"].concat(i.sizingClasses(t)),[D,ee(["mfrac"],[k]),R],t)},yb=(e,t)=>{var n=new ie("mfrac",[je(e.numer,t),je(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=rt(e.barSize,t);n.setAttribute("linethickness",ce(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new ie("mo",[new lt(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(n),e.rightDelim!=null){var o=new ie("mo",[new lt(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}return Tl(s)}return n},Wd=(e,t)=>{if(!t)return e;var n={type:"styling",mode:e.mode,style:t,body:[e]};return n};he({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0],i=t[1],o,a=null,l=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,a="(",l=")";break;case"\\\\bracefrac":o=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":o=!1,a="[",l="]";break;default:throw Error("Unrecognized genfrac command")}var u=r==="\\cfrac",d=null;if(u||r.startsWith("\\d"))d="display";else if(r.startsWith("\\t"))d="text";return Wd({type:"genfrac",mode:n.mode,numer:s,denom:i,continued:u,hasBarLine:o,leftDelim:a,rightDelim:l,barSize:null},d)},htmlBuilder:vb,mathmlBuilder:yb});he({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],numArgs:0,infix:!0,handler(e){var{parser:t,funcName:n,token:r}=e,s;switch(n){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:s,token:r}}});var Xu=["display","text","script","scriptscript"],Qu=function(t){var n=null;if(t.length>0)n=t,n=n==="."?null:n;return n};he({type:"genfrac",names:["\\genfrac"],numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"],handler(e,t){var n=e.parser,r=t[4],s=t[5],i=ci(t[0]),o=i.type==="atom"&&i.family==="open"?Qu(i.text):null,a=ci(t[1]),l=a.type==="atom"&&a.family==="close"?Qu(a.text):null,u=Ie(t[2],"size"),d,h=null;if(u.isBlank)d=!0;else h=u.value,d=h.number>0;var p=null,g=t[3];if(g.type==="ordgroup"){if(g.body.length>0){var b=Ie(g.body[0],"textord");p=Xu[Number(b.text)]}}else g=Ie(g,"textord"),p=Xu[Number(g.text)];return Wd({type:"genfrac",mode:n.mode,numer:r,denom:s,continued:!1,hasBarLine:d,barSize:h,leftDelim:o,rightDelim:l},p)}});he({type:"infix",names:["\\above"],numArgs:1,argTypes:["size"],infix:!0,handler(e,t){var n=e.parser;e.funcName;var r=e.token;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Ie(t[0],"size").value,token:r}}});he({type:"genfrac",names:["\\\\abovefrac"],numArgs:3,argTypes:["math","size","math"],handler:(e,t)=>{var n=e.parser;e.funcName;var r=t[0],s=Ie(t[1],"infix").size;if(!s)throw Error("\\\\abovefrac expected size, but got "+String(s));var i=t[2],o=s.number>0;return{type:"genfrac",mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:o,barSize:s,leftDelim:null,rightDelim:null}}});var jd=(e,t)=>{var n=t.style,r,s;if(e.type==="supsub")r=e.sup?ze(e.sup,t.havingStyle(n.sup()),t):ze(e.sub,t.havingStyle(n.sub()),t),s=Ie(e.base,"horizBrace");else s=Ie(e,"horizBrace");var i=ze(s.base,t.havingBaseStyle(De.DISPLAY)),o=Ao(s,t),a;if(s.isOver)a=qe({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:0.1},{type:"elem",elem:o,wrapperClasses:["svg-align"]}]});else a=qe({positionType:"bottom",positionData:i.depth+0.1+o.height,children:[{type:"elem",elem:o,wrapperClasses:["svg-align"]},{type:"kern",size:0.1},{type:"elem",elem:i}]});if(r){var l=ee(["minner",s.isOver?"mover":"munder"],[a],t);if(s.isOver)a=qe({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:0.2},{type:"elem",elem:r}]});else a=qe({positionType:"bottom",positionData:l.depth+0.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:0.2},{type:"elem",elem:l}]})}return ee(["minner",s.isOver?"mover":"munder"],[a],t)};var kb=(e,t)=>{var n=Eo(e.label);return new ie(e.isOver?"mover":"munder",[je(e.base,t),n])};he({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:r.includes("\\over"),base:t[0]}},htmlBuilder:jd,mathmlBuilder:kb});he({type:"href",names:["\\href"],numArgs:2,argTypes:["url","original"],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[1],s=Ie(t[0],"url").url;if(!n.settings.isTrusted({command:"\\href",url:s}))return n.formatUnsupportedCmd("\\href");return{type:"href",mode:n.mode,href:s,body:ut(r)}},htmlBuilder:(e,t)=>{var n=gt(e.body,t,!1);return x2(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=fr(e.body,t);if(!(n instanceof ie))n=new ie("mrow",[n]);return n.setAttribute("href",e.href),n}});he({type:"href",names:["\\url"],numArgs:1,argTypes:["url"],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=Ie(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");var s=[];for(var i=0;i<r.length;i++){var o=r[i];if(o==="~")o="\\textasciitilde";s.push({type:"textord",mode:"text",text:o})}var a={type:"text",mode:n.mode,font:"\\texttt",body:s};return{type:"href",mode:n.mode,href:r,body:ut(a)}}});he({type:"hbox",names:["\\hbox"],numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0,handler(e,t){var n=e.parser;return{type:"hbox",mode:n.mode,body:ut(t[0])}},htmlBuilder(e,t){var n=gt(e.body,t.withFont(""),!1);return Un(n)},mathmlBuilder(e,t){return new ie("mrow",Jt(e.body,t.withFont("")))}});he({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],numArgs:2,argTypes:["raw","original"],allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e;e.token;var s=Ie(t[0],"raw").string,i=t[1];if(n.settings.strict)Ft({strict:n.settings.strict,errorCode:"htmlExtension",errorMsg:"HTML extension is disabled on strict mode",report:!0});var o,a={};switch(r){case"\\htmlClass":a.class=s,o={command:"\\htmlClass",class:s};break;case"\\htmlId":a.id=s,o={command:"\\htmlId",id:s};break;case"\\htmlStyle":a.style=s,o={command:"\\htmlStyle",style:s};break;case"\\htmlData":{var l="{,}",u=[],d="";for(var h=0;h<s.length;h++)if(s.startsWith(l,h))d+=",",h+=l.length-1;else if(s[h]===",")u.push(d),d="";else d+=s[h];u.push(d);for(var p=0;p<u.length;p++){var g=u[p],b=g.indexOf("=");if(b<0)throw new se("\\htmlData key/value '"+g+"' missing equals sign");var x=g.slice(0,b),k=g.slice(b+1);a["data-"+x.trim()]=k}o={command:"\\htmlData",attributes:a};break}default:throw Error("Unrecognized html command")}if(!n.settings.isTrusted(o))return n.formatUnsupportedCmd(r);return{type:"html",mode:n.mode,attributes:a,body:ut(i)}},htmlBuilder:(e,t)=>{var n=gt(e.body,t,!1),r=["enclosing"];if(e.attributes.class)r.push(...e.attributes.class.trim().split(/\s+/));var s=ee(r,n,t);for(var i of Object.entries(e.attributes)){var o=i[0],a=i[1];if(o!=="class")s.setAttribute(o,a)}return s},mathmlBuilder:(e,t)=>fr(e.body,t)});he({type:"htmlmathml",names:["\\html@mathml"],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>{var n=e.parser;return{type:"htmlmathml",mode:n.mode,html:ut(t[0]),mathml:ut(t[1])}},htmlBuilder:(e,t)=>{var n=gt(e.html,t,!1);return Un(n)},mathmlBuilder:(e,t)=>fr(e.mathml,t)});var tl=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};else{var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new se("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!md(r))throw new se("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r}};he({type:"includegraphics",names:["\\includegraphics"],numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1,handler:(e,t,n)=>{var r=e.parser,s={number:0,unit:"em"},i={number:0.9,unit:"em"},o={number:0,unit:"em"},a="";if(n[0]){var l=Ie(n[0],"raw").string,u=l.split(",");for(var d=0;d<u.length;d++){var h=u[d].split("=");if(h.length===2){var p=h[1].trim();switch(h[0].trim()){case"alt":a=p;break;case"width":s=tl(p);break;case"height":i=tl(p);break;case"totalheight":o=tl(p);break;default:throw new se("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}}var g=Ie(t[0],"url").url;if(a==="")a=g,a=a.replace(/^.*[\\/]/,""),a=a.substring(0,a.lastIndexOf("."));if(!r.settings.isTrusted({command:"\\includegraphics",url:g}))return r.formatUnsupportedCmd("\\includegraphics");return{type:"includegraphics",mode:r.mode,alt:a,width:s,height:i,totalheight:o,src:g}},htmlBuilder:(e,t)=>{var n=rt(e.height,t),r=0;if(e.totalheight.number>0)r=rt(e.totalheight,t)-n;var s=0;if(e.width.number>0)s=rt(e.width,t);var i={height:ce(n+r)};if(s>0)i.width=ce(s);if(r>0)i.verticalAlign=ce(-r);var o=new vd(e.src,e.alt,i);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new ie("mglyph",[]);n.setAttribute("alt",e.alt);var r=rt(e.height,t),s=0;if(e.totalheight.number>0)s=rt(e.totalheight,t)-r,n.setAttribute("valign",ce(-s));if(n.setAttribute("height",ce(r+s)),e.width.number>0){var i=rt(e.width,t);n.setAttribute("width",ce(i))}return n.setAttribute("src",e.src),n}});he({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,s=Ie(t[0],"size");if(n.settings.strict){var i=r[1]==="m",o=s.value.unit==="mu";if(i){if(!o)Ft({strict:n.settings.strict,errorCode:"mathVsTextUnits",errorMsg:"LaTeX's "+r+" supports only mu units, "+("not "+s.value.unit+" units"),report:!0});if(n.mode!=="math")Ft({strict:n.settings.strict,errorCode:"mathVsTextUnits",errorMsg:"LaTeX's "+r+" works only in math mode",report:!0})}else if(o)Ft({strict:n.settings.strict,errorCode:"mathVsTextUnits",errorMsg:"LaTeX's "+r+" doesn't support mu units",report:!0})}return{type:"kern",mode:n.mode,dimension:s.value}},htmlBuilder(e,t){return wd(e.dimension,t)},mathmlBuilder(e,t){var n=rt(e.dimension,t);return new Sl(n)}});he({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,t)=>{var n;if(e.alignment==="clap")n=ee([],[ze(e.body,t)]),n=ee(["katex-inner"],[n],t);else n=ee(["katex-inner"],[ze(e.body,t)]);var r=ee(["katex-fix"],[]),s=ee([e.alignment],[n,r],t),i=ee(["katex-strut"]);if(i.style.height=ce(s.height+s.depth),s.depth)i.style.verticalAlign=ce(-s.depth);return s.children.unshift(i),s=ee(["katex-thinbox"],[s],t),ee(["mord","katex-vbox"],[s],t)},mathmlBuilder:(e,t)=>{var n=new ie("mpadded",[je(e.body,t)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});he({type:"styling",names:["\\(","$"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var{funcName:n,parser:r}=e,s=r.mode;r.switchMode("math");var i=n==="\\("?"\\)":"$",o=r.parseExpression(!1,i);return r.expect(i),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:o}}});he({type:"text",names:["\\)","\\]"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new se("Mismatched "+e.funcName)}});var ed=(e,t)=>{switch(t.style.size){case De.DISPLAY.size:return e.display;case De.TEXT.size:return e.text;case De.SCRIPT.size:return e.script;case De.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};he({type:"mathchoice",names:["\\mathchoice"],numArgs:4,primitive:!0,handler:(e,t)=>{var n=e.parser;return{type:"mathchoice",mode:n.mode,display:ut(t[0]),text:ut(t[1]),script:ut(t[2]),scriptscript:ut(t[3])}},htmlBuilder:(e,t)=>{var n=ed(e,t),r=gt(n,t,!1);return Un(r)},mathmlBuilder:(e,t)=>{var n=ed(e,t);return fr(n,t)}});var Gd=(e,t,n,r,s,i,o)=>{e=ee([],[e]);var a=n&&Hn(n),l,u;if(t){var d=ze(t,r.havingStyle(s.sup()),r);u={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var h=ze(n,r.havingStyle(s.sub()),r);l={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}var p;if(u&&l){var g=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o;p=qe({positionType:"bottom",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ce(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ce(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(l){var b=e.height-o;p=qe({positionType:"top",positionData:b,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ce(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(u){var x=e.depth+o;p=qe({positionType:"bottom",positionData:x,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ce(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var k=[p];if(l&&i!==0&&!a){var E=ee(["mspace"],[],r);E.style.marginRight=ce(i),k.unshift(E)}return ee(["mop","op-limits"],k,r)},Kd=new Set(["\\smallint"]),Vd=(e,t)=>{var n,r,s=!1,i;if(e.type==="supsub")n=e.sup,r=e.sub,i=Ie(e.base,"op"),s=!0;else i=Ie(e,"op");var o=t.style,a=!1;if(o.size===De.DISPLAY.size&&i.symbol&&!Kd.has(i.name))a=!0;var l,u;if(i.symbol){var d=a?"Size2-Regular":"Size1-Regular",h="";if(i.name==="\\oiint"||i.name==="\\oiiint")h=i.name.slice(1),i.name=h==="oiint"?"\\iint":"\\iiint";if(l=Dt(i.name,d,"math",t,["mop","op-symbol",a?"large-op":"small-op"]),u=l.italic,h.length>0){var p=Ed(h+"Size"+(a?"2":"1"),t);l=qe({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:a?0.08:0}]}),i.name="\\"+h,l.classes.unshift("mop"),l.italic=u}}else if(i.body){var g=gt(i.body,t,!0);if(g.length===1&&g[0]instanceof qt)l=g[0],l.classes[0]="mop";else l=ee(["mop"],g,t)}else{var b=[];for(var x=1;x<i.name.length;x++)b.push(Cl(i.name[x],i.mode,t));l=ee(["mop"],b,t)}var k=0,E=0;if((l instanceof qt||i.name==="\\oiint"||i.name==="\\oiiint")&&!i.suppressBaseShift){var T;k=(l.height-l.depth)/2-t.fontMetrics().axisHeight,E=(T=l.italic)!=null?T:0}if(s)return Gd(l,n,r,t,o,E,k);else{if(k)l.style.position="relative",l.style.top=ce(k);return l}},wb=(e,t)=>{var n;if(e.symbol){if(n=new ie("mo",[en(e.name,e.mode)]),Kd.has(e.name))n.setAttribute("largeop","false")}else if(e.body)n=new ie("mo",Jt(e.body,t));else{n=new ie("mi",[new lt(e.name.slice(1))]);var r=new ie("mo",[en("","text")]);if(e.parentIsSupSub)n=new ie("mrow",[n,r]);else n=_d([n,r])}return n},xb={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};he({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],numArgs:0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=r;if(s.length===1)s=xb[s];return{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:Vd,mathmlBuilder:wb});he({type:"op",names:["\\mathop"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ut(r)}}});var Eb={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};he({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}});he({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}});he({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],numArgs:0,allowedInArgument:!0,handler(e){var{parser:t,funcName:n}=e,r=n;if(r.length===1)r=Eb[r];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}}});var Jd=(e,t)=>{var n,r,s=!1,i;if(e.type==="supsub")n=e.sup,r=e.sub,i=Ie(e.base,"operatorname"),s=!0;else i=Ie(e,"operatorname");var o;if(i.body.length>0){var a=i.body.map((h)=>{var p="text"in h?h.text:void 0;if(typeof p==="string")return{type:"textord",mode:h.mode,text:p};else return h}),l=gt(a,t.withFont("mathrm"),!0);for(var u=0;u<l.length;u++){var d=l[u];if(d instanceof qt)d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*")}o=ee(["mop"],l,t)}else o=ee(["mop"],[],t);if(s)return Gd(o,n,r,t,t.style,0,0);else return o},Ab=(e,t)=>{var n=Jt(e.body,t.withFont("mathrm")),r=!0;for(var s=0;s<n.length;s++){var i=n[s];if(i instanceof Sl);else if(i instanceof ie)switch(i.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var o=i.children[0];if(i.children.length===1&&o instanceof lt)o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*");else r=!1;break}default:r=!1}else r=!1}if(r){var a=n.map((d)=>d.toText()).join("");n=[new lt(a)]}var l=new ie("mi",n);l.setAttribute("mathvariant","normal");var u=new ie("mo",[en("","text")]);if(e.parentIsSupSub)return new ie("mrow",[l,u]);else return _d([l,u])};he({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"operatorname",mode:n.mode,body:ut(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Jd,mathmlBuilder:Ab});w("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");$r({type:"ordgroup",htmlBuilder(e,t){if(e.semisimple)return Un(gt(e.body,t,!1));return ee(["mord"],gt(e.body,t,!0),t)},mathmlBuilder(e,t){return fr(e.body,t,!0)}});he({type:"overline",names:["\\overline"],numArgs:1,handler(e,t){var n=e.parser,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=ze(e.body,t.havingCrampedStyle()),r=ms("overline-line",t),s=t.fontMetrics().defaultRuleThickness,i=qe({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return ee(["mord","katex-overline"],[i],t)},mathmlBuilder(e,t){var n=new ie("mo",[new lt("‾")]);n.setAttribute("stretchy","true");var r=new ie("mover",[je(e.body,t),n]);return r.setAttribute("accent","true"),r}});he({type:"phantom",names:["\\phantom"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"phantom",mode:n.mode,body:ut(r)}},htmlBuilder:(e,t)=>{var n=gt(e.body,t.withPhantom(),!1);return Un(n)},mathmlBuilder:(e,t)=>{var n=Jt(e.body,t);return new ie("mphantom",n)}});w("\\hphantom","\\smash{\\phantom{#1}}");he({type:"vphantom",names:["\\vphantom"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=ee(["katex-inner"],[ze(e.body,t.withPhantom())]),r=ee(["katex-fix"],[]);return ee(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=Jt(ut(e.body),t),r=new ie("mphantom",n),s=new ie("mpadded",[r]);return s.setAttribute("width","0px"),s}});he({type:"raisebox",names:["\\raisebox"],numArgs:2,argTypes:["size","hbox"],allowedInText:!0,handler(e,t){var n=e.parser,r=Ie(t[0],"size").value,s=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:s}},htmlBuilder(e,t){var n=ze(e.body,t),r=rt(e.dy,t);return qe({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new ie("mpadded",[je(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});var Zd=(e,t)=>{var n=e.parser;return{type:"reflectbox",mode:n.mode,body:t[0]}};he({type:"reflectbox",names:["\\reflectbox"],numArgs:1,argTypes:["hbox"],allowedInText:!0,handler:Zd,htmlBuilder(e,t){return ee(["mord","reflectbox"],[ze(e.body,t)],t)},mathmlBuilder(e,t){return je(e.body,t)}});he({type:"reflectbox",names:["\\mathreflectbox"],numArgs:1,argTypes:["math"],handler:Zd});he({type:"internal",names:["\\relax"],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){var t=e.parser;return{type:"internal",mode:t.mode}}});he({type:"rule",names:["\\rule"],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"],handler(e,t,n){var r=e.parser,s=n[0],i=Ie(t[0],"size"),o=Ie(t[1],"size");return{type:"rule",mode:r.mode,shift:s&&Ie(s,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var n=ee(["mord","katex-rule"],[],t),r=rt(e.width,t),s=rt(e.height,t),i=e.shift?rt(e.shift,t):0;return n.style.borderRightWidth=ce(r),n.style.borderTopWidth=ce(s),n.style.bottom=ce(i),n.width=r,n.height=s+i,n.depth=-i,n.maxFontSize=s*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=rt(e.width,t),r=rt(e.height,t),s=e.shift?rt(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new ie("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",ce(n)),o.setAttribute("height",ce(r));var a=new ie("mpadded",[o]);if(s>=0)a.setAttribute("height",ce(s));else a.setAttribute("height",ce(s)),a.setAttribute("depth",ce(-s));return a.setAttribute("voffset",ce(s)),a}});function Yd(e,t,n){var r=gt(e,t,!1),s=t.sizeMultiplier/n.sizeMultiplier;for(var i=0;i<r.length;i++){var o=r[i].classes.indexOf("katex-sizing");if(o<0)Array.prototype.push.apply(r[i].classes,t.sizingClasses(n));else if(r[i].classes[o+1]==="reset-size"+t.size)r[i].classes[o+1]="reset-size"+n.size;r[i].height*=s,r[i].depth*=s}return Un(r)}var td=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Cb=(e,t)=>{var n=t.havingSize(e.size);return Yd(e.body,n,t)};he({type:"sizing",names:td,numArgs:0,allowedInText:!0,handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:s}=e,i=s.parseExpression(!1,n);return{type:"sizing",mode:s.mode,size:td.indexOf(r)+1,body:i}},htmlBuilder:Cb,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=Jt(e.body,n),s=new ie("mstyle",r);return s.setAttribute("mathsize",ce(n.sizeMultiplier)),s}});he({type:"smash",names:["\\smash"],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var r=e.parser,s=!1,i=!1,o=n[0]&&Ie(n[0],"ordgroup");if(o){var a;for(var l=0;l<o.body.length;++l){var u=o.body[l];if(a=Co(u).text,a==="t")s=!0;else if(a==="b")i=!0;else{s=!1,i=!1;break}}}else s=!0,i=!0;var d=t[0];return{type:"smash",mode:r.mode,body:d,smashHeight:s,smashDepth:i}},htmlBuilder:(e,t)=>{var n=ee([],[ze(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight)n.height=0;if(e.smashDepth)n.depth=0;if(e.smashHeight&&e.smashDepth)return ee(["mord","katex-smash"],[n],t);if(n.children)for(var r=0;r<n.children.length;r++){if(e.smashHeight)n.children[r].height=0;if(e.smashDepth)n.children[r].depth=0}var s=qe({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return ee(["mord"],[s],t)},mathmlBuilder:(e,t)=>{var n=new ie("mpadded",[je(e.body,t)]);if(e.smashHeight)n.setAttribute("height","0px");if(e.smashDepth)n.setAttribute("depth","0px");return n}});he({type:"sqrt",names:["\\sqrt"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,s=n[0],i=t[0];return{type:"sqrt",mode:r.mode,body:i,index:s}},htmlBuilder(e,t){var n=ze(e.body,t.havingCrampedStyle());if(n.height===0)n.height=t.fontMetrics().xHeight;n=ps(n,t);var r=t.fontMetrics(),s=r.defaultRuleThickness,i=s;if(t.style.id<De.TEXT.id)i=t.fontMetrics().xHeight;var o=s+i/4,a=n.height+n.depth+o+s,l=ob(a,t),{span:u,ruleWidth:d,advanceWidth:h}=l,p=u.height-d;if(p>n.height+n.depth+o)o=(o+p-n.height-n.depth)/2;var g=u.height-n.height-o-d;n.style.paddingLeft=ce(h);var b=qe({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+g)},{type:"elem",elem:u},{type:"kern",size:d}]});if(!e.index)return ee(["mord","sqrt"],[b],t);else{var x=t.havingStyle(De.SCRIPTSCRIPT),k=ze(e.index,x,t),E=0.6*(b.height-b.depth),T=qe({positionType:"shift",positionData:-E,children:[{type:"elem",elem:k}]}),_=ee(["katex-root"],[T]);return ee(["mord","sqrt"],[_,b],t)}},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new ie("mroot",[je(n,t),je(r,t)]):new ie("msqrt",[je(n,t)])}});var yl={display:De.DISPLAY,text:De.TEXT,script:De.SCRIPT,scriptscript:De.SCRIPTSCRIPT};function _b(e){return e in yl}he({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var{breakOnTokenText:n,funcName:r,parser:s}=e,i=s.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!_b(o))throw Error("Unknown style: "+o);return{type:"styling",mode:s.mode,style:o,body:i}},htmlBuilder(e,t){var n=yl[e.style],r=t.havingStyle(n);if(e.resetFont)r=r.withFont("");return Yd(e.body,r,t)},mathmlBuilder(e,t){var n=yl[e.style],r=t.havingStyle(n);if(e.resetFont)r=r.withFont("");var s=Jt(e.body,r),i=new ie("mstyle",s),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},a=o[e.style];return i.setAttribute("scriptlevel",a[0]),i.setAttribute("displaystyle",a[1]),i}});var Sb=function(t,n){var r=t.base;if(!r)return null;else if(r.type==="op"){var s=r.limits&&(n.style.size===De.DISPLAY.size||r.alwaysHandleSupSub);return s?Vd:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(n.style.size===De.DISPLAY.size||r.limits);return i?Jd:null}else if(r.type==="accent")return Hn(r.base)?Md:null;else if(r.type==="horizBrace"){var o=!t.sub;return o===r.isOver?jd:null}else return null};$r({type:"supsub",htmlBuilder(e,t){var n=Sb(e,t);if(n)return n(e,t);var{base:r,sup:s,sub:i}=e,o=ze(r,t),a,l,u=t.fontMetrics(),d=0,h=0,p=r&&Hn(r);if(s){var g=t.havingStyle(t.style.sup());if(a=ze(s,g,t),!p)d=o.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier}if(i){var b=t.havingStyle(t.style.sub());if(l=ze(i,b,t),!p)h=o.depth+b.fontMetrics().subDrop*b.sizeMultiplier/t.sizeMultiplier}var x;if(t.style===De.DISPLAY)x=u.sup1;else if(t.style.cramped)x=u.sup3;else x=u.sup2;var k=t.sizeMultiplier,E=ce(0.5/u.ptPerEm/k),T=null;if(l){var _=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(o instanceof qt||_){var A;T=ce(-((A=o.italic)!=null?A:0))}}var D;if(a&&l){d=Math.max(d,x,a.depth+0.25*u.xHeight),h=Math.max(h,u.sub2);var R=u.defaultRuleThickness,L=4*R;if(d-a.depth-(l.height-h)<L){h=L-(d-a.depth)+l.height;var B=0.8*u.xHeight-(d-a.depth);if(B>0)d+=B,h-=B}var O=[{type:"elem",elem:l,shift:h,marginRight:E,marginLeft:T},{type:"elem",elem:a,shift:-d,marginRight:E}];D=qe({positionType:"individualShift",children:O})}else if(l){h=Math.max(h,u.sub1,l.height-0.8*u.xHeight);var H=[{type:"elem",elem:l,marginLeft:T,marginRight:E}];D=qe({positionType:"shift",positionData:h,children:H})}else if(a)d=Math.max(d,x,a.depth+0.25*u.xHeight),D=qe({positionType:"shift",positionData:-d,children:[{type:"elem",elem:a,marginRight:E}]});else throw Error("supsub must have either sup or sub.");var K=ml(o,"right")||"mord";return ee([K],[o,ee(["msupsub"],[D])],t)},mathmlBuilder(e,t){var n=!1,r,s;if(e.base&&e.base.type==="horizBrace"){if(s=!!e.sup,s===e.base.isOver)n=!0,r=e.base.isOver}if(e.base&&(e.base.type==="op"||e.base.type==="operatorname"))e.base.parentIsSupSub=!0;var i=[je(e.base,t)];if(e.sub)i.push(je(e.sub,t));if(e.sup)i.push(je(e.sup,t));var o;if(n)o=r?"mover":"munder";else if(!e.sub){var a=e.base;if(a&&a.type==="op"&&a.limits&&(t.style===De.DISPLAY||a.alwaysHandleSupSub))o="mover";else if(a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||t.style===De.DISPLAY))o="mover";else o="msup"}else if(!e.sup){var l=e.base;if(l&&l.type==="op"&&l.limits&&(t.style===De.DISPLAY||l.alwaysHandleSupSub))o="munder";else if(l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===De.DISPLAY))o="munder";else o="msub"}else{var u=e.base;if(u&&u.type==="op"&&u.limits&&t.style===De.DISPLAY)o="munderover";else if(u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===De.DISPLAY||u.limits))o="munderover";else o="msubsup"}return new ie(o,i)}});$r({type:"atom",htmlBuilder(e,t){return Cl(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new ie("mo",[en(e.text,e.mode)]);if(e.family==="bin"){var r=Rl(e,t);if(r==="bold-italic")n.setAttribute("mathvariant",r)}else if(e.family==="punct")n.setAttribute("separator","true");else if(e.family==="open"||e.family==="close")n.setAttribute("stretchy","false");return n}});var Xd={mi:"italic",mn:"normal",mtext:"normal"};$r({type:"mathord",htmlBuilder(e,t){return xo(e,t)},mathmlBuilder(e,t){var n=new ie("mi",[en(e.text,e.mode,t)]),r=Rl(e,t)||"italic";if(r!==Xd[n.type])n.setAttribute("mathvariant",r);return n}});$r({type:"textord",htmlBuilder(e,t){return xo(e,t)},mathmlBuilder(e,t){var n=en(e.text,e.mode,t),r=Rl(e,t)||"normal",s;if(e.mode==="text")s=new ie("mtext",[n]);else if(/[0-9]/.test(e.text))s=new ie("mn",[n]);else if(e.text==="\\prime")s=new ie("mo",[n]);else s=new ie("mi",[n]);if(r!==Xd[s.type])s.setAttribute("mathvariant",r);return s}});var nd=new Map([["\\nobreak","nobreak"],["\\allowbreak","allowbreak"]]),rd=new Map([[" ",{}],["\\ ",{}],["~",{className:"nobreak"}],["\\space",{}],["\\nobreakspace",{className:"nobreak"}]]);$r({type:"spacing",htmlBuilder(e,t){var n=rd.get(e.text),r=nd.get(e.text);if(n){var s=n.className||"";if(e.mode==="text"){var i=xo(e,t);return i.classes.push(s),i}else return ee(["mspace",s],[Cl(e.text,e.mode,t)],t)}else if(r)return ee(["mspace",r],[],t);else throw new se('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){var n;if(rd.has(e.text))n=new ie("mtext",[new lt(" ")]);else if(nd.has(e.text))return new ie("mspace");else throw new se('Unknown type of space "'+e.text+'"');return n}});var sd=()=>{var e=new ie("mtd",[]);return e.setAttribute("width","50%"),e};$r({type:"tag",mathmlBuilder(e,t){var n=new ie("mtable",[new ie("mtr",[sd(),new ie("mtd",[fr(e.body,t)]),sd(),new ie("mtd",[fr(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var id={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},od={"\\textbf":"textbf","\\textmd":"textmd"},Tb={"\\textit":"textit","\\textup":"textup"},ad=(e,t)=>{var n=e.font;if(!n)return t;else if(id[n])return t.withTextFontFamily(id[n]);else if(od[n])return t.withTextFontWeight(od[n]);else if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit");return t.withTextFontShape(Tb[n])};he({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"text",mode:n.mode,body:ut(s),font:r}},htmlBuilder(e,t){var n=ad(e,t),r=gt(e.body,n,!0);return ee(["mord","text"],r,n)},mathmlBuilder(e,t){var n=ad(e,t);return fr(e.body,n)}});he({type:"underline",names:["\\underline"],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=ze(e.body,t),r=ms("underline-line",t),s=t.fontMetrics().defaultRuleThickness,i=qe({positionType:"top",positionData:n.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:n}]});return ee(["mord","katex-underline"],[i],t)},mathmlBuilder(e,t){var n=new ie("mo",[new lt("‾")]);n.setAttribute("stretchy","true");var r=new ie("munder",[je(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});he({type:"vcenter",names:["\\vcenter"],numArgs:1,argTypes:["original"],allowedInText:!1,handler(e,t){var n=e.parser;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=ze(e.body,t),r=t.fontMetrics().axisHeight,s=0.5*(n.height-r-(n.depth+r));return qe({positionType:"shift",positionData:s,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new ie("mpadded",[je(e.body,t)],["vcenter"]);return new ie("mrow",[n])}});he({type:"verb",names:["\\verb"],numArgs:0,allowedInText:!0,handler(e,t,n){throw new se("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){var n=ld(e),r=[],s=t.havingStyle(t.style.text());for(var i=0;i<n.length;i++){var o=n[i];if(o==="~")o="\\textasciitilde";r.push(Dt(o,"Typewriter-Regular",e.mode,s,["mord","texttt"]))}return ee(["mord","text"].concat(s.sizingClasses(t)),kd(r),s)},mathmlBuilder(e,t){var n=new lt(ld(e)),r=new ie("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var ld=(e)=>e.body.replace(/ /g,e.star?"␣":" "),cr=Ad,Qd=`[ \r
|
|
280
|
-
]`,
|
|
278
|
+
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error("Unknown stretchy delimiter.")}};function tb(e){return"toText"in e}class zr{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createDocumentFragment();for(var t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){var e="";for(var t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e)=>{if(tb(e))return e.toText();throw Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}}var Cl={pt:1,mm:2.8452755905511813,cm:28.45275590551181,in:72.27,bp:1.00375,pc:12,dd:1.070008643042351,cc:12.84010371650821,nd:1.0669781931464175,nc:12.80373831775701,sp:0.0000152587890625,px:1.00375},nb={ex:!0,em:!0,mu:!0},qd=function(t){if(typeof t!=="string")t=t.unit;return t in Cl||t in nb||t==="ex"},nt=function(t,n){var r;if(t.unit in Cl)r=Cl[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var s;if(n.style.isTight())s=n.havingStyle(n.style.text());else s=n;if(t.unit==="ex")r=s.fontMetrics().xHeight;else if(t.unit==="em")r=s.fontMetrics().quad;else throw new se("Invalid unit: '"+t.unit+"'");if(s!==n)r*=s.sizeMultiplier/n.sizeMultiplier}return Math.min(t.number*r,n.maxSize)},le=function(t){return+t.toFixed(4)+"em"},mr=function(t){return t.filter((n)=>n).join(" ")},Ul=function(t){var n="";for(var r of Object.keys(t)){var s=t[r];if(s!==void 0)n+=M2(r)+":"+s+";"}return n},Hd=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){if(n.style.isTight())this.classes.push("mtight");var s=n.getColor();if(s)this.style.color=s}},Pd=function(t){var n=document.createElement(t);n.className=mr(this.classes),Object.assign(n.style,this.style);for(var r of Object.keys(this.attributes))n.setAttribute(r,this.attributes[r]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n},rb=/[\s"'>/=\x00-\x1f]/,Ud=function(t){var n="<"+t;if(this.classes.length)n+=' class="'+Ct(mr(this.classes))+'"';var r=Ul(this.style);if(r)n+=' style="'+Ct(r)+'"';for(var s of Object.keys(this.attributes)){if(rb.test(s))throw new se("Invalid attribute name '"+s+"'");n+=" "+s+'="'+Ct(this.attributes[s])+'"'}n+=">";for(var i=0;i<this.children.length;i++)n+=this.children[i].toMarkup();return n+="</"+t+">",n};class qr{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,Hd.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Pd.call(this,"span")}toMarkup(){return Ud.call(this,"span")}}class wi{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Hd.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Pd.call(this,"a")}toMarkup(){return Ud.call(this,"a")}}class Wd{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e='<img src="'+Ct(this.src)+'"'+(' alt="'+Ct(this.alt)+'"'),t=Ul(this.style);if(t)e+=' style="'+Ct(t)+'"';return e+="'/>",e}}var sb={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class Ht{constructor(e,t,n,r,s,i,o,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=s||0,this.width=i||0,this.classes=o||[],this.style=a||{},this.maxFontSize=0;var l=W2(this.text.charCodeAt(0));if(l)this.classes.push(l+"_fallback");if(/[îïíì]/.test(this.text))this.text=sb[this.text]}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;if(this.italic>0)t=document.createElement("span"),t.style.marginRight=le(this.italic);if(this.classes.length>0)t=t||document.createElement("span"),t.className=mr(this.classes);if(Object.keys(this.style).length>0)t=t||document.createElement("span"),Object.assign(t.style,this.style);if(t)return t.appendChild(e),t;else return e}toMarkup(){var e=!1,t="<span";if(this.classes.length)e=!0,t+=' class="',t+=Ct(mr(this.classes)),t+='"';var n="";if(this.italic>0)n+="margin-right:"+le(this.italic)+";";if(n+=Ul(this.style),n)e=!0,t+=' style="'+Ct(n)+'"';var r=Ct(this.text);if(e)return t+=">",t+=r,t+="</span>",t;else return r}}class _n{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t of Object.keys(this.attributes))e+=" "+t+'="'+Ct(this.attributes[t])+'"';e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}}class Vn{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"path");if(this.alternate)t.setAttribute("d",this.alternate);else t.setAttribute("d",nd[this.pathName]);return t}toMarkup(){if(this.alternate)return'<path d="'+Ct(this.alternate)+'"/>';else return'<path d="'+Ct(nd[this.pathName])+'"/>'}}class Io{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var e="<line";for(var t of Object.keys(this.attributes))e+=" "+t+'="'+Ct(this.attributes[t])+'"';return e+="/>",e}}function ib(e){if(e instanceof Ht)return e;else throw Error("Expected symbolNode but got "+String(e)+".")}function ob(e){if(e instanceof qr)return e;else throw Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var ab=(e)=>e instanceof qr||e instanceof wi||e instanceof zr,Sn={"AMS-Regular":{"32":[0,0,0,0,0.25],"65":[0,0.68889,0,0,0.72222],"66":[0,0.68889,0,0,0.66667],"67":[0,0.68889,0,0,0.72222],"68":[0,0.68889,0,0,0.72222],"69":[0,0.68889,0,0,0.66667],"70":[0,0.68889,0,0,0.61111],"71":[0,0.68889,0,0,0.77778],"72":[0,0.68889,0,0,0.77778],"73":[0,0.68889,0,0,0.38889],"74":[0.16667,0.68889,0,0,0.5],"75":[0,0.68889,0,0,0.77778],"76":[0,0.68889,0,0,0.66667],"77":[0,0.68889,0,0,0.94445],"78":[0,0.68889,0,0,0.72222],"79":[0.16667,0.68889,0,0,0.77778],"80":[0,0.68889,0,0,0.61111],"81":[0.16667,0.68889,0,0,0.77778],"82":[0,0.68889,0,0,0.72222],"83":[0,0.68889,0,0,0.55556],"84":[0,0.68889,0,0,0.66667],"85":[0,0.68889,0,0,0.72222],"86":[0,0.68889,0,0,0.72222],"87":[0,0.68889,0,0,1],"88":[0,0.68889,0,0,0.72222],"89":[0,0.68889,0,0,0.72222],"90":[0,0.68889,0,0,0.66667],"107":[0,0.68889,0,0,0.55556],"160":[0,0,0,0,0.25],"165":[0,0.675,0.025,0,0.75],"174":[0.15559,0.69224,0,0,0.94666],"240":[0,0.68889,0,0,0.55556],"295":[0,0.68889,0,0,0.54028],"710":[0,0.825,0,0,2.33334],"732":[0,0.9,0,0,2.33334],"770":[0,0.825,0,0,2.33334],"771":[0,0.9,0,0,2.33334],"989":[0.08167,0.58167,0,0,0.77778],"1008":[0,0.43056,0.04028,0,0.66667],"8245":[0,0.54986,0,0,0.275],"8463":[0,0.68889,0,0,0.54028],"8487":[0,0.68889,0,0,0.72222],"8498":[0,0.68889,0,0,0.55556],"8502":[0,0.68889,0,0,0.66667],"8503":[0,0.68889,0,0,0.44445],"8504":[0,0.68889,0,0,0.66667],"8513":[0,0.68889,0,0,0.63889],"8592":[-0.03598,0.46402,0,0,0.5],"8594":[-0.03598,0.46402,0,0,0.5],"8602":[-0.13313,0.36687,0,0,1],"8603":[-0.13313,0.36687,0,0,1],"8606":[0.01354,0.52239,0,0,1],"8608":[0.01354,0.52239,0,0,1],"8610":[0.01354,0.52239,0,0,1.11111],"8611":[0.01354,0.52239,0,0,1.11111],"8619":[0,0.54986,0,0,1],"8620":[0,0.54986,0,0,1],"8621":[-0.13313,0.37788,0,0,1.38889],"8622":[-0.13313,0.36687,0,0,1],"8624":[0,0.69224,0,0,0.5],"8625":[0,0.69224,0,0,0.5],"8630":[0,0.43056,0,0,1],"8631":[0,0.43056,0,0,1],"8634":[0.08198,0.58198,0,0,0.77778],"8635":[0.08198,0.58198,0,0,0.77778],"8638":[0.19444,0.69224,0,0,0.41667],"8639":[0.19444,0.69224,0,0,0.41667],"8642":[0.19444,0.69224,0,0,0.41667],"8643":[0.19444,0.69224,0,0,0.41667],"8644":[0.1808,0.675,0,0,1],"8646":[0.1808,0.675,0,0,1],"8647":[0.1808,0.675,0,0,1],"8648":[0.19444,0.69224,0,0,0.83334],"8649":[0.1808,0.675,0,0,1],"8650":[0.19444,0.69224,0,0,0.83334],"8651":[0.01354,0.52239,0,0,1],"8652":[0.01354,0.52239,0,0,1],"8653":[-0.13313,0.36687,0,0,1],"8654":[-0.13313,0.36687,0,0,1],"8655":[-0.13313,0.36687,0,0,1],"8666":[0.13667,0.63667,0,0,1],"8667":[0.13667,0.63667,0,0,1],"8669":[-0.13313,0.37788,0,0,1],"8672":[-0.064,0.437,0,0,1.334],"8674":[-0.064,0.437,0,0,1.334],"8705":[0,0.825,0,0,0.5],"8708":[0,0.68889,0,0,0.55556],"8709":[0.08167,0.58167,0,0,0.77778],"8717":[0,0.43056,0,0,0.42917],"8722":[-0.03598,0.46402,0,0,0.5],"8724":[0.08198,0.69224,0,0,0.77778],"8726":[0.08167,0.58167,0,0,0.77778],"8733":[0,0.69224,0,0,0.77778],"8736":[0,0.69224,0,0,0.72222],"8737":[0,0.69224,0,0,0.72222],"8738":[0.03517,0.52239,0,0,0.72222],"8739":[0.08167,0.58167,0,0,0.22222],"8740":[0.25142,0.74111,0,0,0.27778],"8741":[0.08167,0.58167,0,0,0.38889],"8742":[0.25142,0.74111,0,0,0.5],"8756":[0,0.69224,0,0,0.66667],"8757":[0,0.69224,0,0,0.66667],"8764":[-0.13313,0.36687,0,0,0.77778],"8765":[-0.13313,0.37788,0,0,0.77778],"8769":[-0.13313,0.36687,0,0,0.77778],"8770":[-0.03625,0.46375,0,0,0.77778],"8774":[0.30274,0.79383,0,0,0.77778],"8776":[-0.01688,0.48312,0,0,0.77778],"8778":[0.08167,0.58167,0,0,0.77778],"8782":[0.06062,0.54986,0,0,0.77778],"8783":[0.06062,0.54986,0,0,0.77778],"8785":[0.08198,0.58198,0,0,0.77778],"8786":[0.08198,0.58198,0,0,0.77778],"8787":[0.08198,0.58198,0,0,0.77778],"8790":[0,0.69224,0,0,0.77778],"8791":[0.22958,0.72958,0,0,0.77778],"8796":[0.08198,0.91667,0,0,0.77778],"8806":[0.25583,0.75583,0,0,0.77778],"8807":[0.25583,0.75583,0,0,0.77778],"8808":[0.25142,0.75726,0,0,0.77778],"8809":[0.25142,0.75726,0,0,0.77778],"8812":[0.25583,0.75583,0,0,0.5],"8814":[0.20576,0.70576,0,0,0.77778],"8815":[0.20576,0.70576,0,0,0.77778],"8816":[0.30274,0.79383,0,0,0.77778],"8817":[0.30274,0.79383,0,0,0.77778],"8818":[0.22958,0.72958,0,0,0.77778],"8819":[0.22958,0.72958,0,0,0.77778],"8822":[0.1808,0.675,0,0,0.77778],"8823":[0.1808,0.675,0,0,0.77778],"8828":[0.13667,0.63667,0,0,0.77778],"8829":[0.13667,0.63667,0,0,0.77778],"8830":[0.22958,0.72958,0,0,0.77778],"8831":[0.22958,0.72958,0,0,0.77778],"8832":[0.20576,0.70576,0,0,0.77778],"8833":[0.20576,0.70576,0,0,0.77778],"8840":[0.30274,0.79383,0,0,0.77778],"8841":[0.30274,0.79383,0,0,0.77778],"8842":[0.13597,0.63597,0,0,0.77778],"8843":[0.13597,0.63597,0,0,0.77778],"8847":[0.03517,0.54986,0,0,0.77778],"8848":[0.03517,0.54986,0,0,0.77778],"8858":[0.08198,0.58198,0,0,0.77778],"8859":[0.08198,0.58198,0,0,0.77778],"8861":[0.08198,0.58198,0,0,0.77778],"8862":[0,0.675,0,0,0.77778],"8863":[0,0.675,0,0,0.77778],"8864":[0,0.675,0,0,0.77778],"8865":[0,0.675,0,0,0.77778],"8872":[0,0.69224,0,0,0.61111],"8873":[0,0.69224,0,0,0.72222],"8874":[0,0.69224,0,0,0.88889],"8876":[0,0.68889,0,0,0.61111],"8877":[0,0.68889,0,0,0.61111],"8878":[0,0.68889,0,0,0.72222],"8879":[0,0.68889,0,0,0.72222],"8882":[0.03517,0.54986,0,0,0.77778],"8883":[0.03517,0.54986,0,0,0.77778],"8884":[0.13667,0.63667,0,0,0.77778],"8885":[0.13667,0.63667,0,0,0.77778],"8888":[0,0.54986,0,0,1.11111],"8890":[0.19444,0.43056,0,0,0.55556],"8891":[0.19444,0.69224,0,0,0.61111],"8892":[0.19444,0.69224,0,0,0.61111],"8901":[0,0.54986,0,0,0.27778],"8903":[0.08167,0.58167,0,0,0.77778],"8905":[0.08167,0.58167,0,0,0.77778],"8906":[0.08167,0.58167,0,0,0.77778],"8907":[0,0.69224,0,0,0.77778],"8908":[0,0.69224,0,0,0.77778],"8909":[-0.03598,0.46402,0,0,0.77778],"8910":[0,0.54986,0,0,0.76042],"8911":[0,0.54986,0,0,0.76042],"8912":[0.03517,0.54986,0,0,0.77778],"8913":[0.03517,0.54986,0,0,0.77778],"8914":[0,0.54986,0,0,0.66667],"8915":[0,0.54986,0,0,0.66667],"8916":[0,0.69224,0,0,0.66667],"8918":[0.0391,0.5391,0,0,0.77778],"8919":[0.0391,0.5391,0,0,0.77778],"8920":[0.03517,0.54986,0,0,1.33334],"8921":[0.03517,0.54986,0,0,1.33334],"8922":[0.38569,0.88569,0,0,0.77778],"8923":[0.38569,0.88569,0,0,0.77778],"8926":[0.13667,0.63667,0,0,0.77778],"8927":[0.13667,0.63667,0,0,0.77778],"8928":[0.30274,0.79383,0,0,0.77778],"8929":[0.30274,0.79383,0,0,0.77778],"8934":[0.23222,0.74111,0,0,0.77778],"8935":[0.23222,0.74111,0,0,0.77778],"8936":[0.23222,0.74111,0,0,0.77778],"8937":[0.23222,0.74111,0,0,0.77778],"8938":[0.20576,0.70576,0,0,0.77778],"8939":[0.20576,0.70576,0,0,0.77778],"8940":[0.30274,0.79383,0,0,0.77778],"8941":[0.30274,0.79383,0,0,0.77778],"8994":[0.19444,0.69224,0,0,0.77778],"8995":[0.19444,0.69224,0,0,0.77778],"9416":[0.15559,0.69224,0,0,0.90222],"9484":[0,0.69224,0,0,0.5],"9488":[0,0.69224,0,0,0.5],"9492":[0,0.37788,0,0,0.5],"9496":[0,0.37788,0,0,0.5],"9585":[0.19444,0.68889,0,0,0.88889],"9586":[0.19444,0.74111,0,0,0.88889],"9632":[0,0.675,0,0,0.77778],"9633":[0,0.675,0,0,0.77778],"9650":[0,0.54986,0,0,0.72222],"9651":[0,0.54986,0,0,0.72222],"9654":[0.03517,0.54986,0,0,0.77778],"9660":[0,0.54986,0,0,0.72222],"9661":[0,0.54986,0,0,0.72222],"9664":[0.03517,0.54986,0,0,0.77778],"9674":[0.11111,0.69224,0,0,0.66667],"9733":[0.19444,0.69224,0,0,0.94445],"10003":[0,0.69224,0,0,0.83334],"10016":[0,0.69224,0,0,0.83334],"10731":[0.11111,0.69224,0,0,0.66667],"10846":[0.19444,0.75583,0,0,0.61111],"10877":[0.13667,0.63667,0,0,0.77778],"10878":[0.13667,0.63667,0,0,0.77778],"10885":[0.25583,0.75583,0,0,0.77778],"10886":[0.25583,0.75583,0,0,0.77778],"10887":[0.13597,0.63597,0,0,0.77778],"10888":[0.13597,0.63597,0,0,0.77778],"10889":[0.26167,0.75726,0,0,0.77778],"10890":[0.26167,0.75726,0,0,0.77778],"10891":[0.48256,0.98256,0,0,0.77778],"10892":[0.48256,0.98256,0,0,0.77778],"10901":[0.13667,0.63667,0,0,0.77778],"10902":[0.13667,0.63667,0,0,0.77778],"10933":[0.25142,0.75726,0,0,0.77778],"10934":[0.25142,0.75726,0,0,0.77778],"10935":[0.26167,0.75726,0,0,0.77778],"10936":[0.26167,0.75726,0,0,0.77778],"10937":[0.26167,0.75726,0,0,0.77778],"10938":[0.26167,0.75726,0,0,0.77778],"10949":[0.25583,0.75583,0,0,0.77778],"10950":[0.25583,0.75583,0,0,0.77778],"10955":[0.28481,0.79383,0,0,0.77778],"10956":[0.28481,0.79383,0,0,0.77778],"57350":[0.08167,0.58167,0,0,0.22222],"57351":[0.08167,0.58167,0,0,0.38889],"57352":[0.08167,0.58167,0,0,0.77778],"57353":[0,0.43056,0.04028,0,0.66667],"57356":[0.25142,0.75726,0,0,0.77778],"57357":[0.25142,0.75726,0,0,0.77778],"57358":[0.41951,0.91951,0,0,0.77778],"57359":[0.30274,0.79383,0,0,0.77778],"57360":[0.30274,0.79383,0,0,0.77778],"57361":[0.41951,0.91951,0,0,0.77778],"57366":[0.25142,0.75726,0,0,0.77778],"57367":[0.25142,0.75726,0,0,0.77778],"57368":[0.25142,0.75726,0,0,0.77778],"57369":[0.25142,0.75726,0,0,0.77778],"57370":[0.13597,0.63597,0,0,0.77778],"57371":[0.13597,0.63597,0,0,0.77778]},"Caligraphic-Regular":{"32":[0,0,0,0,0.25],"65":[0,0.68333,0,0.19445,0.79847],"66":[0,0.68333,0.03041,0.13889,0.65681],"67":[0,0.68333,0.05834,0.13889,0.52653],"68":[0,0.68333,0.02778,0.08334,0.77139],"69":[0,0.68333,0.08944,0.11111,0.52778],"70":[0,0.68333,0.09931,0.11111,0.71875],"71":[0.09722,0.68333,0.0593,0.11111,0.59487],"72":[0,0.68333,0.00965,0.11111,0.84452],"73":[0,0.68333,0.07382,0,0.54452],"74":[0.09722,0.68333,0.18472,0.16667,0.67778],"75":[0,0.68333,0.01445,0.05556,0.76195],"76":[0,0.68333,0,0.13889,0.68972],"77":[0,0.68333,0,0.13889,1.2009],"78":[0,0.68333,0.14736,0.08334,0.82049],"79":[0,0.68333,0.02778,0.11111,0.79611],"80":[0,0.68333,0.08222,0.08334,0.69556],"81":[0.09722,0.68333,0,0.11111,0.81667],"82":[0,0.68333,0,0.08334,0.8475],"83":[0,0.68333,0.075,0.13889,0.60556],"84":[0,0.68333,0.25417,0,0.54464],"85":[0,0.68333,0.09931,0.08334,0.62583],"86":[0,0.68333,0.08222,0,0.61278],"87":[0,0.68333,0.08222,0.08334,0.98778],"88":[0,0.68333,0.14643,0.13889,0.7133],"89":[0.09722,0.68333,0.08222,0.08334,0.66834],"90":[0,0.68333,0.07944,0.13889,0.72473],"160":[0,0,0,0,0.25]},"Fraktur-Regular":{"32":[0,0,0,0,0.25],"33":[0,0.69141,0,0,0.29574],"34":[0,0.69141,0,0,0.21471],"38":[0,0.69141,0,0,0.73786],"39":[0,0.69141,0,0,0.21201],"40":[0.24982,0.74947,0,0,0.38865],"41":[0.24982,0.74947,0,0,0.38865],"42":[0,0.62119,0,0,0.27764],"43":[0.08319,0.58283,0,0,0.75623],"44":[0,0.10803,0,0,0.27764],"45":[0.08319,0.58283,0,0,0.75623],"46":[0,0.10803,0,0,0.27764],"47":[0.24982,0.74947,0,0,0.50181],"48":[0,0.47534,0,0,0.50181],"49":[0,0.47534,0,0,0.50181],"50":[0,0.47534,0,0,0.50181],"51":[0.18906,0.47534,0,0,0.50181],"52":[0.18906,0.47534,0,0,0.50181],"53":[0.18906,0.47534,0,0,0.50181],"54":[0,0.69141,0,0,0.50181],"55":[0.18906,0.47534,0,0,0.50181],"56":[0,0.69141,0,0,0.50181],"57":[0.18906,0.47534,0,0,0.50181],"58":[0,0.47534,0,0,0.21606],"59":[0.12604,0.47534,0,0,0.21606],"61":[-0.13099,0.36866,0,0,0.75623],"63":[0,0.69141,0,0,0.36245],"65":[0,0.69141,0,0,0.7176],"66":[0,0.69141,0,0,0.88397],"67":[0,0.69141,0,0,0.61254],"68":[0,0.69141,0,0,0.83158],"69":[0,0.69141,0,0,0.66278],"70":[0.12604,0.69141,0,0,0.61119],"71":[0,0.69141,0,0,0.78539],"72":[0.06302,0.69141,0,0,0.7203],"73":[0,0.69141,0,0,0.55448],"74":[0.12604,0.69141,0,0,0.55231],"75":[0,0.69141,0,0,0.66845],"76":[0,0.69141,0,0,0.66602],"77":[0,0.69141,0,0,1.04953],"78":[0,0.69141,0,0,0.83212],"79":[0,0.69141,0,0,0.82699],"80":[0.18906,0.69141,0,0,0.82753],"81":[0.03781,0.69141,0,0,0.82699],"82":[0,0.69141,0,0,0.82807],"83":[0,0.69141,0,0,0.82861],"84":[0,0.69141,0,0,0.66899],"85":[0,0.69141,0,0,0.64576],"86":[0,0.69141,0,0,0.83131],"87":[0,0.69141,0,0,1.04602],"88":[0,0.69141,0,0,0.71922],"89":[0.18906,0.69141,0,0,0.83293],"90":[0.12604,0.69141,0,0,0.60201],"91":[0.24982,0.74947,0,0,0.27764],"93":[0.24982,0.74947,0,0,0.27764],"94":[0,0.69141,0,0,0.49965],"97":[0,0.47534,0,0,0.50046],"98":[0,0.69141,0,0,0.51315],"99":[0,0.47534,0,0,0.38946],"100":[0,0.62119,0,0,0.49857],"101":[0,0.47534,0,0,0.40053],"102":[0.18906,0.69141,0,0,0.32626],"103":[0.18906,0.47534,0,0,0.5037],"104":[0.18906,0.69141,0,0,0.52126],"105":[0,0.69141,0,0,0.27899],"106":[0,0.69141,0,0,0.28088],"107":[0,0.69141,0,0,0.38946],"108":[0,0.69141,0,0,0.27953],"109":[0,0.47534,0,0,0.76676],"110":[0,0.47534,0,0,0.52666],"111":[0,0.47534,0,0,0.48885],"112":[0.18906,0.52396,0,0,0.50046],"113":[0.18906,0.47534,0,0,0.48912],"114":[0,0.47534,0,0,0.38919],"115":[0,0.47534,0,0,0.44266],"116":[0,0.62119,0,0,0.33301],"117":[0,0.47534,0,0,0.5172],"118":[0,0.52396,0,0,0.5118],"119":[0,0.52396,0,0,0.77351],"120":[0.18906,0.47534,0,0,0.38865],"121":[0.18906,0.47534,0,0,0.49884],"122":[0.18906,0.47534,0,0,0.39054],"160":[0,0,0,0,0.25],"8216":[0,0.69141,0,0,0.21471],"8217":[0,0.69141,0,0,0.21471],"58112":[0,0.62119,0,0,0.49749],"58113":[0,0.62119,0,0,0.4983],"58114":[0.18906,0.69141,0,0,0.33328],"58115":[0.18906,0.69141,0,0,0.32923],"58116":[0.18906,0.47534,0,0,0.50343],"58117":[0,0.69141,0,0,0.33301],"58118":[0,0.62119,0,0,0.33409],"58119":[0,0.47534,0,0,0.50073]},"Main-Bold":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.35],"34":[0,0.69444,0,0,0.60278],"35":[0.19444,0.69444,0,0,0.95833],"36":[0.05556,0.75,0,0,0.575],"37":[0.05556,0.75,0,0,0.95833],"38":[0,0.69444,0,0,0.89444],"39":[0,0.69444,0,0,0.31944],"40":[0.25,0.75,0,0,0.44722],"41":[0.25,0.75,0,0,0.44722],"42":[0,0.75,0,0,0.575],"43":[0.13333,0.63333,0,0,0.89444],"44":[0.19444,0.15556,0,0,0.31944],"45":[0,0.44444,0,0,0.38333],"46":[0,0.15556,0,0,0.31944],"47":[0.25,0.75,0,0,0.575],"48":[0,0.64444,0,0,0.575],"49":[0,0.64444,0,0,0.575],"50":[0,0.64444,0,0,0.575],"51":[0,0.64444,0,0,0.575],"52":[0,0.64444,0,0,0.575],"53":[0,0.64444,0,0,0.575],"54":[0,0.64444,0,0,0.575],"55":[0,0.64444,0,0,0.575],"56":[0,0.64444,0,0,0.575],"57":[0,0.64444,0,0,0.575],"58":[0,0.44444,0,0,0.31944],"59":[0.19444,0.44444,0,0,0.31944],"60":[0.08556,0.58556,0,0,0.89444],"61":[-0.10889,0.39111,0,0,0.89444],"62":[0.08556,0.58556,0,0,0.89444],"63":[0,0.69444,0,0,0.54305],"64":[0,0.69444,0,0,0.89444],"65":[0,0.68611,0,0,0.86944],"66":[0,0.68611,0,0,0.81805],"67":[0,0.68611,0,0,0.83055],"68":[0,0.68611,0,0,0.88194],"69":[0,0.68611,0,0,0.75555],"70":[0,0.68611,0,0,0.72361],"71":[0,0.68611,0,0,0.90416],"72":[0,0.68611,0,0,0.9],"73":[0,0.68611,0,0,0.43611],"74":[0,0.68611,0,0,0.59444],"75":[0,0.68611,0,0,0.90138],"76":[0,0.68611,0,0,0.69166],"77":[0,0.68611,0,0,1.09166],"78":[0,0.68611,0,0,0.9],"79":[0,0.68611,0,0,0.86388],"80":[0,0.68611,0,0,0.78611],"81":[0.19444,0.68611,0,0,0.86388],"82":[0,0.68611,0,0,0.8625],"83":[0,0.68611,0,0,0.63889],"84":[0,0.68611,0,0,0.8],"85":[0,0.68611,0,0,0.88472],"86":[0,0.68611,0.01597,0,0.86944],"87":[0,0.68611,0.01597,0,1.18888],"88":[0,0.68611,0,0,0.86944],"89":[0,0.68611,0.02875,0,0.86944],"90":[0,0.68611,0,0,0.70277],"91":[0.25,0.75,0,0,0.31944],"92":[0.25,0.75,0,0,0.575],"93":[0.25,0.75,0,0,0.31944],"94":[0,0.69444,0,0,0.575],"95":[0.31,0.13444,0.03194,0,0.575],"97":[0,0.44444,0,0,0.55902],"98":[0,0.69444,0,0,0.63889],"99":[0,0.44444,0,0,0.51111],"100":[0,0.69444,0,0,0.63889],"101":[0,0.44444,0,0,0.52708],"102":[0,0.69444,0.10903,0,0.35139],"103":[0.19444,0.44444,0.01597,0,0.575],"104":[0,0.69444,0,0,0.63889],"105":[0,0.69444,0,0,0.31944],"106":[0.19444,0.69444,0,0,0.35139],"107":[0,0.69444,0,0,0.60694],"108":[0,0.69444,0,0,0.31944],"109":[0,0.44444,0,0,0.95833],"110":[0,0.44444,0,0,0.63889],"111":[0,0.44444,0,0,0.575],"112":[0.19444,0.44444,0,0,0.63889],"113":[0.19444,0.44444,0,0,0.60694],"114":[0,0.44444,0,0,0.47361],"115":[0,0.44444,0,0,0.45361],"116":[0,0.63492,0,0,0.44722],"117":[0,0.44444,0,0,0.63889],"118":[0,0.44444,0.01597,0,0.60694],"119":[0,0.44444,0.01597,0,0.83055],"120":[0,0.44444,0,0,0.60694],"121":[0.19444,0.44444,0.01597,0,0.60694],"122":[0,0.44444,0,0,0.51111],"123":[0.25,0.75,0,0,0.575],"124":[0.25,0.75,0,0,0.31944],"125":[0.25,0.75,0,0,0.575],"126":[0.35,0.34444,0,0,0.575],"160":[0,0,0,0,0.25],"163":[0,0.69444,0,0,0.86853],"168":[0,0.69444,0,0,0.575],"172":[0,0.44444,0,0,0.76666],"176":[0,0.69444,0,0,0.86944],"177":[0.13333,0.63333,0,0,0.89444],"184":[0.17014,0,0,0,0.51111],"198":[0,0.68611,0,0,1.04166],"215":[0.13333,0.63333,0,0,0.89444],"216":[0.04861,0.73472,0,0,0.89444],"223":[0,0.69444,0,0,0.59722],"230":[0,0.44444,0,0,0.83055],"247":[0.13333,0.63333,0,0,0.89444],"248":[0.09722,0.54167,0,0,0.575],"305":[0,0.44444,0,0,0.31944],"338":[0,0.68611,0,0,1.16944],"339":[0,0.44444,0,0,0.89444],"567":[0.19444,0.44444,0,0,0.35139],"710":[0,0.69444,0,0,0.575],"711":[0,0.63194,0,0,0.575],"713":[0,0.59611,0,0,0.575],"714":[0,0.69444,0,0,0.575],"715":[0,0.69444,0,0,0.575],"728":[0,0.69444,0,0,0.575],"729":[0,0.69444,0,0,0.31944],"730":[0,0.69444,0,0,0.86944],"732":[0,0.69444,0,0,0.575],"733":[0,0.69444,0,0,0.575],"915":[0,0.68611,0,0,0.69166],"916":[0,0.68611,0,0,0.95833],"920":[0,0.68611,0,0,0.89444],"923":[0,0.68611,0,0,0.80555],"926":[0,0.68611,0,0,0.76666],"928":[0,0.68611,0,0,0.9],"931":[0,0.68611,0,0,0.83055],"933":[0,0.68611,0,0,0.89444],"934":[0,0.68611,0,0,0.83055],"936":[0,0.68611,0,0,0.89444],"937":[0,0.68611,0,0,0.83055],"8211":[0,0.44444,0.03194,0,0.575],"8212":[0,0.44444,0.03194,0,1.14999],"8216":[0,0.69444,0,0,0.31944],"8217":[0,0.69444,0,0,0.31944],"8220":[0,0.69444,0,0,0.60278],"8221":[0,0.69444,0,0,0.60278],"8224":[0.19444,0.69444,0,0,0.51111],"8225":[0.19444,0.69444,0,0,0.51111],"8242":[0,0.55556,0,0,0.34444],"8407":[0,0.72444,0.15486,0,0.575],"8463":[0,0.69444,0,0,0.66759],"8465":[0,0.69444,0,0,0.83055],"8467":[0,0.69444,0,0,0.47361],"8472":[0.19444,0.44444,0,0,0.74027],"8476":[0,0.69444,0,0,0.83055],"8501":[0,0.69444,0,0,0.70277],"8592":[-0.10889,0.39111,0,0,1.14999],"8593":[0.19444,0.69444,0,0,0.575],"8594":[-0.10889,0.39111,0,0,1.14999],"8595":[0.19444,0.69444,0,0,0.575],"8596":[-0.10889,0.39111,0,0,1.14999],"8597":[0.25,0.75,0,0,0.575],"8598":[0.19444,0.69444,0,0,1.14999],"8599":[0.19444,0.69444,0,0,1.14999],"8600":[0.19444,0.69444,0,0,1.14999],"8601":[0.19444,0.69444,0,0,1.14999],"8636":[-0.10889,0.39111,0,0,1.14999],"8637":[-0.10889,0.39111,0,0,1.14999],"8640":[-0.10889,0.39111,0,0,1.14999],"8641":[-0.10889,0.39111,0,0,1.14999],"8656":[-0.10889,0.39111,0,0,1.14999],"8657":[0.19444,0.69444,0,0,0.70277],"8658":[-0.10889,0.39111,0,0,1.14999],"8659":[0.19444,0.69444,0,0,0.70277],"8660":[-0.10889,0.39111,0,0,1.14999],"8661":[0.25,0.75,0,0,0.70277],"8704":[0,0.69444,0,0,0.63889],"8706":[0,0.69444,0.06389,0,0.62847],"8707":[0,0.69444,0,0,0.63889],"8709":[0.05556,0.75,0,0,0.575],"8711":[0,0.68611,0,0,0.95833],"8712":[0.08556,0.58556,0,0,0.76666],"8715":[0.08556,0.58556,0,0,0.76666],"8722":[0.13333,0.63333,0,0,0.89444],"8723":[0.13333,0.63333,0,0,0.89444],"8725":[0.25,0.75,0,0,0.575],"8726":[0.25,0.75,0,0,0.575],"8727":[-0.02778,0.47222,0,0,0.575],"8728":[-0.02639,0.47361,0,0,0.575],"8729":[-0.02639,0.47361,0,0,0.575],"8730":[0.18,0.82,0,0,0.95833],"8733":[0,0.44444,0,0,0.89444],"8734":[0,0.44444,0,0,1.14999],"8736":[0,0.69224,0,0,0.72222],"8739":[0.25,0.75,0,0,0.31944],"8741":[0.25,0.75,0,0,0.575],"8743":[0,0.55556,0,0,0.76666],"8744":[0,0.55556,0,0,0.76666],"8745":[0,0.55556,0,0,0.76666],"8746":[0,0.55556,0,0,0.76666],"8747":[0.19444,0.69444,0.12778,0,0.56875],"8764":[-0.10889,0.39111,0,0,0.89444],"8768":[0.19444,0.69444,0,0,0.31944],"8771":[0.00222,0.50222,0,0,0.89444],"8773":[0.027,0.638,0,0,0.894],"8776":[0.02444,0.52444,0,0,0.89444],"8781":[0.00222,0.50222,0,0,0.89444],"8801":[0.00222,0.50222,0,0,0.89444],"8804":[0.19667,0.69667,0,0,0.89444],"8805":[0.19667,0.69667,0,0,0.89444],"8810":[0.08556,0.58556,0,0,1.14999],"8811":[0.08556,0.58556,0,0,1.14999],"8826":[0.08556,0.58556,0,0,0.89444],"8827":[0.08556,0.58556,0,0,0.89444],"8834":[0.08556,0.58556,0,0,0.89444],"8835":[0.08556,0.58556,0,0,0.89444],"8838":[0.19667,0.69667,0,0,0.89444],"8839":[0.19667,0.69667,0,0,0.89444],"8846":[0,0.55556,0,0,0.76666],"8849":[0.19667,0.69667,0,0,0.89444],"8850":[0.19667,0.69667,0,0,0.89444],"8851":[0,0.55556,0,0,0.76666],"8852":[0,0.55556,0,0,0.76666],"8853":[0.13333,0.63333,0,0,0.89444],"8854":[0.13333,0.63333,0,0,0.89444],"8855":[0.13333,0.63333,0,0,0.89444],"8856":[0.13333,0.63333,0,0,0.89444],"8857":[0.13333,0.63333,0,0,0.89444],"8866":[0,0.69444,0,0,0.70277],"8867":[0,0.69444,0,0,0.70277],"8868":[0,0.69444,0,0,0.89444],"8869":[0,0.69444,0,0,0.89444],"8900":[-0.02639,0.47361,0,0,0.575],"8901":[-0.02639,0.47361,0,0,0.31944],"8902":[-0.02778,0.47222,0,0,0.575],"8968":[0.25,0.75,0,0,0.51111],"8969":[0.25,0.75,0,0,0.51111],"8970":[0.25,0.75,0,0,0.51111],"8971":[0.25,0.75,0,0,0.51111],"8994":[-0.13889,0.36111,0,0,1.14999],"8995":[-0.13889,0.36111,0,0,1.14999],"9651":[0.19444,0.69444,0,0,1.02222],"9657":[-0.02778,0.47222,0,0,0.575],"9661":[0.19444,0.69444,0,0,1.02222],"9667":[-0.02778,0.47222,0,0,0.575],"9711":[0.19444,0.69444,0,0,1.14999],"9824":[0.12963,0.69444,0,0,0.89444],"9825":[0.12963,0.69444,0,0,0.89444],"9826":[0.12963,0.69444,0,0,0.89444],"9827":[0.12963,0.69444,0,0,0.89444],"9837":[0,0.75,0,0,0.44722],"9838":[0.19444,0.69444,0,0,0.44722],"9839":[0.19444,0.69444,0,0,0.44722],"10216":[0.25,0.75,0,0,0.44722],"10217":[0.25,0.75,0,0,0.44722],"10815":[0,0.68611,0,0,0.9],"10927":[0.19667,0.69667,0,0,0.89444],"10928":[0.19667,0.69667,0,0,0.89444],"57376":[0.19444,0.69444,0,0,0]},"Main-BoldItalic":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0.11417,0,0.38611],"34":[0,0.69444,0.07939,0,0.62055],"35":[0.19444,0.69444,0.06833,0,0.94444],"37":[0.05556,0.75,0.12861,0,0.94444],"38":[0,0.69444,0.08528,0,0.88555],"39":[0,0.69444,0.12945,0,0.35555],"40":[0.25,0.75,0.15806,0,0.47333],"41":[0.25,0.75,0.03306,0,0.47333],"42":[0,0.75,0.14333,0,0.59111],"43":[0.10333,0.60333,0.03306,0,0.88555],"44":[0.19444,0.14722,0,0,0.35555],"45":[0,0.44444,0.02611,0,0.41444],"46":[0,0.14722,0,0,0.35555],"47":[0.25,0.75,0.15806,0,0.59111],"48":[0,0.64444,0.13167,0,0.59111],"49":[0,0.64444,0.13167,0,0.59111],"50":[0,0.64444,0.13167,0,0.59111],"51":[0,0.64444,0.13167,0,0.59111],"52":[0.19444,0.64444,0.13167,0,0.59111],"53":[0,0.64444,0.13167,0,0.59111],"54":[0,0.64444,0.13167,0,0.59111],"55":[0.19444,0.64444,0.13167,0,0.59111],"56":[0,0.64444,0.13167,0,0.59111],"57":[0,0.64444,0.13167,0,0.59111],"58":[0,0.44444,0.06695,0,0.35555],"59":[0.19444,0.44444,0.06695,0,0.35555],"61":[-0.10889,0.39111,0.06833,0,0.88555],"63":[0,0.69444,0.11472,0,0.59111],"64":[0,0.69444,0.09208,0,0.88555],"65":[0,0.68611,0,0,0.86555],"66":[0,0.68611,0.0992,0,0.81666],"67":[0,0.68611,0.14208,0,0.82666],"68":[0,0.68611,0.09062,0,0.87555],"69":[0,0.68611,0.11431,0,0.75666],"70":[0,0.68611,0.12903,0,0.72722],"71":[0,0.68611,0.07347,0,0.89527],"72":[0,0.68611,0.17208,0,0.8961],"73":[0,0.68611,0.15681,0,0.47166],"74":[0,0.68611,0.145,0,0.61055],"75":[0,0.68611,0.14208,0,0.89499],"76":[0,0.68611,0,0,0.69777],"77":[0,0.68611,0.17208,0,1.07277],"78":[0,0.68611,0.17208,0,0.8961],"79":[0,0.68611,0.09062,0,0.85499],"80":[0,0.68611,0.0992,0,0.78721],"81":[0.19444,0.68611,0.09062,0,0.85499],"82":[0,0.68611,0.02559,0,0.85944],"83":[0,0.68611,0.11264,0,0.64999],"84":[0,0.68611,0.12903,0,0.7961],"85":[0,0.68611,0.17208,0,0.88083],"86":[0,0.68611,0.18625,0,0.86555],"87":[0,0.68611,0.18625,0,1.15999],"88":[0,0.68611,0.15681,0,0.86555],"89":[0,0.68611,0.19803,0,0.86555],"90":[0,0.68611,0.14208,0,0.70888],"91":[0.25,0.75,0.1875,0,0.35611],"93":[0.25,0.75,0.09972,0,0.35611],"94":[0,0.69444,0.06709,0,0.59111],"95":[0.31,0.13444,0.09811,0,0.59111],"97":[0,0.44444,0.09426,0,0.59111],"98":[0,0.69444,0.07861,0,0.53222],"99":[0,0.44444,0.05222,0,0.53222],"100":[0,0.69444,0.10861,0,0.59111],"101":[0,0.44444,0.085,0,0.53222],"102":[0.19444,0.69444,0.21778,0,0.4],"103":[0.19444,0.44444,0.105,0,0.53222],"104":[0,0.69444,0.09426,0,0.59111],"105":[0,0.69326,0.11387,0,0.35555],"106":[0.19444,0.69326,0.1672,0,0.35555],"107":[0,0.69444,0.11111,0,0.53222],"108":[0,0.69444,0.10861,0,0.29666],"109":[0,0.44444,0.09426,0,0.94444],"110":[0,0.44444,0.09426,0,0.64999],"111":[0,0.44444,0.07861,0,0.59111],"112":[0.19444,0.44444,0.07861,0,0.59111],"113":[0.19444,0.44444,0.105,0,0.53222],"114":[0,0.44444,0.11111,0,0.50167],"115":[0,0.44444,0.08167,0,0.48694],"116":[0,0.63492,0.09639,0,0.385],"117":[0,0.44444,0.09426,0,0.62055],"118":[0,0.44444,0.11111,0,0.53222],"119":[0,0.44444,0.11111,0,0.76777],"120":[0,0.44444,0.12583,0,0.56055],"121":[0.19444,0.44444,0.105,0,0.56166],"122":[0,0.44444,0.13889,0,0.49055],"126":[0.35,0.34444,0.11472,0,0.59111],"160":[0,0,0,0,0.25],"168":[0,0.69444,0.11473,0,0.59111],"176":[0,0.69444,0,0,0.94888],"184":[0.17014,0,0,0,0.53222],"198":[0,0.68611,0.11431,0,1.02277],"216":[0.04861,0.73472,0.09062,0,0.88555],"223":[0.19444,0.69444,0.09736,0,0.665],"230":[0,0.44444,0.085,0,0.82666],"248":[0.09722,0.54167,0.09458,0,0.59111],"305":[0,0.44444,0.09426,0,0.35555],"338":[0,0.68611,0.11431,0,1.14054],"339":[0,0.44444,0.085,0,0.82666],"567":[0.19444,0.44444,0.04611,0,0.385],"710":[0,0.69444,0.06709,0,0.59111],"711":[0,0.63194,0.08271,0,0.59111],"713":[0,0.59444,0.10444,0,0.59111],"714":[0,0.69444,0.08528,0,0.59111],"715":[0,0.69444,0,0,0.59111],"728":[0,0.69444,0.10333,0,0.59111],"729":[0,0.69444,0.12945,0,0.35555],"730":[0,0.69444,0,0,0.94888],"732":[0,0.69444,0.11472,0,0.59111],"733":[0,0.69444,0.11472,0,0.59111],"915":[0,0.68611,0.12903,0,0.69777],"916":[0,0.68611,0,0,0.94444],"920":[0,0.68611,0.09062,0,0.88555],"923":[0,0.68611,0,0,0.80666],"926":[0,0.68611,0.15092,0,0.76777],"928":[0,0.68611,0.17208,0,0.8961],"931":[0,0.68611,0.11431,0,0.82666],"933":[0,0.68611,0.10778,0,0.88555],"934":[0,0.68611,0.05632,0,0.82666],"936":[0,0.68611,0.10778,0,0.88555],"937":[0,0.68611,0.0992,0,0.82666],"8211":[0,0.44444,0.09811,0,0.59111],"8212":[0,0.44444,0.09811,0,1.18221],"8216":[0,0.69444,0.12945,0,0.35555],"8217":[0,0.69444,0.12945,0,0.35555],"8220":[0,0.69444,0.16772,0,0.62055],"8221":[0,0.69444,0.07939,0,0.62055]},"Main-Italic":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0.12417,0,0.30667],"34":[0,0.69444,0.06961,0,0.51444],"35":[0.19444,0.69444,0.06616,0,0.81777],"37":[0.05556,0.75,0.13639,0,0.81777],"38":[0,0.69444,0.09694,0,0.76666],"39":[0,0.69444,0.12417,0,0.30667],"40":[0.25,0.75,0.16194,0,0.40889],"41":[0.25,0.75,0.03694,0,0.40889],"42":[0,0.75,0.14917,0,0.51111],"43":[0.05667,0.56167,0.03694,0,0.76666],"44":[0.19444,0.10556,0,0,0.30667],"45":[0,0.43056,0.02826,0,0.35778],"46":[0,0.10556,0,0,0.30667],"47":[0.25,0.75,0.16194,0,0.51111],"48":[0,0.64444,0.13556,0,0.51111],"49":[0,0.64444,0.13556,0,0.51111],"50":[0,0.64444,0.13556,0,0.51111],"51":[0,0.64444,0.13556,0,0.51111],"52":[0.19444,0.64444,0.13556,0,0.51111],"53":[0,0.64444,0.13556,0,0.51111],"54":[0,0.64444,0.13556,0,0.51111],"55":[0.19444,0.64444,0.13556,0,0.51111],"56":[0,0.64444,0.13556,0,0.51111],"57":[0,0.64444,0.13556,0,0.51111],"58":[0,0.43056,0.0582,0,0.30667],"59":[0.19444,0.43056,0.0582,0,0.30667],"61":[-0.13313,0.36687,0.06616,0,0.76666],"63":[0,0.69444,0.1225,0,0.51111],"64":[0,0.69444,0.09597,0,0.76666],"65":[0,0.68333,0,0,0.74333],"66":[0,0.68333,0.10257,0,0.70389],"67":[0,0.68333,0.14528,0,0.71555],"68":[0,0.68333,0.09403,0,0.755],"69":[0,0.68333,0.12028,0,0.67833],"70":[0,0.68333,0.13305,0,0.65277],"71":[0,0.68333,0.08722,0,0.77361],"72":[0,0.68333,0.16389,0,0.74333],"73":[0,0.68333,0.15806,0,0.38555],"74":[0,0.68333,0.14028,0,0.525],"75":[0,0.68333,0.14528,0,0.76888],"76":[0,0.68333,0,0,0.62722],"77":[0,0.68333,0.16389,0,0.89666],"78":[0,0.68333,0.16389,0,0.74333],"79":[0,0.68333,0.09403,0,0.76666],"80":[0,0.68333,0.10257,0,0.67833],"81":[0.19444,0.68333,0.09403,0,0.76666],"82":[0,0.68333,0.03868,0,0.72944],"83":[0,0.68333,0.11972,0,0.56222],"84":[0,0.68333,0.13305,0,0.71555],"85":[0,0.68333,0.16389,0,0.74333],"86":[0,0.68333,0.18361,0,0.74333],"87":[0,0.68333,0.18361,0,0.99888],"88":[0,0.68333,0.15806,0,0.74333],"89":[0,0.68333,0.19383,0,0.74333],"90":[0,0.68333,0.14528,0,0.61333],"91":[0.25,0.75,0.1875,0,0.30667],"93":[0.25,0.75,0.10528,0,0.30667],"94":[0,0.69444,0.06646,0,0.51111],"95":[0.31,0.12056,0.09208,0,0.51111],"97":[0,0.43056,0.07671,0,0.51111],"98":[0,0.69444,0.06312,0,0.46],"99":[0,0.43056,0.05653,0,0.46],"100":[0,0.69444,0.10333,0,0.51111],"101":[0,0.43056,0.07514,0,0.46],"102":[0.19444,0.69444,0.21194,0,0.30667],"103":[0.19444,0.43056,0.08847,0,0.46],"104":[0,0.69444,0.07671,0,0.51111],"105":[0,0.65536,0.1019,0,0.30667],"106":[0.19444,0.65536,0.14467,0,0.30667],"107":[0,0.69444,0.10764,0,0.46],"108":[0,0.69444,0.10333,0,0.25555],"109":[0,0.43056,0.07671,0,0.81777],"110":[0,0.43056,0.07671,0,0.56222],"111":[0,0.43056,0.06312,0,0.51111],"112":[0.19444,0.43056,0.06312,0,0.51111],"113":[0.19444,0.43056,0.08847,0,0.46],"114":[0,0.43056,0.10764,0,0.42166],"115":[0,0.43056,0.08208,0,0.40889],"116":[0,0.61508,0.09486,0,0.33222],"117":[0,0.43056,0.07671,0,0.53666],"118":[0,0.43056,0.10764,0,0.46],"119":[0,0.43056,0.10764,0,0.66444],"120":[0,0.43056,0.12042,0,0.46389],"121":[0.19444,0.43056,0.08847,0,0.48555],"122":[0,0.43056,0.12292,0,0.40889],"126":[0.35,0.31786,0.11585,0,0.51111],"160":[0,0,0,0,0.25],"168":[0,0.66786,0.10474,0,0.51111],"176":[0,0.69444,0,0,0.83129],"184":[0.17014,0,0,0,0.46],"198":[0,0.68333,0.12028,0,0.88277],"216":[0.04861,0.73194,0.09403,0,0.76666],"223":[0.19444,0.69444,0.10514,0,0.53666],"230":[0,0.43056,0.07514,0,0.71555],"248":[0.09722,0.52778,0.09194,0,0.51111],"338":[0,0.68333,0.12028,0,0.98499],"339":[0,0.43056,0.07514,0,0.71555],"710":[0,0.69444,0.06646,0,0.51111],"711":[0,0.62847,0.08295,0,0.51111],"713":[0,0.56167,0.10333,0,0.51111],"714":[0,0.69444,0.09694,0,0.51111],"715":[0,0.69444,0,0,0.51111],"728":[0,0.69444,0.10806,0,0.51111],"729":[0,0.66786,0.11752,0,0.30667],"730":[0,0.69444,0,0,0.83129],"732":[0,0.66786,0.11585,0,0.51111],"733":[0,0.69444,0.1225,0,0.51111],"915":[0,0.68333,0.13305,0,0.62722],"916":[0,0.68333,0,0,0.81777],"920":[0,0.68333,0.09403,0,0.76666],"923":[0,0.68333,0,0,0.69222],"926":[0,0.68333,0.15294,0,0.66444],"928":[0,0.68333,0.16389,0,0.74333],"931":[0,0.68333,0.12028,0,0.71555],"933":[0,0.68333,0.11111,0,0.76666],"934":[0,0.68333,0.05986,0,0.71555],"936":[0,0.68333,0.11111,0,0.76666],"937":[0,0.68333,0.10257,0,0.71555],"8211":[0,0.43056,0.09208,0,0.51111],"8212":[0,0.43056,0.09208,0,1.02222],"8216":[0,0.69444,0.12417,0,0.30667],"8217":[0,0.69444,0.12417,0,0.30667],"8220":[0,0.69444,0.1685,0,0.51444],"8221":[0,0.69444,0.06961,0,0.51444],"8463":[0,0.68889,0,0,0.54028]},"Main-Regular":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.27778],"34":[0,0.69444,0,0,0.5],"35":[0.19444,0.69444,0,0,0.83334],"36":[0.05556,0.75,0,0,0.5],"37":[0.05556,0.75,0,0,0.83334],"38":[0,0.69444,0,0,0.77778],"39":[0,0.69444,0,0,0.27778],"40":[0.25,0.75,0,0,0.38889],"41":[0.25,0.75,0,0,0.38889],"42":[0,0.75,0,0,0.5],"43":[0.08333,0.58333,0,0,0.77778],"44":[0.19444,0.10556,0,0,0.27778],"45":[0,0.43056,0,0,0.33333],"46":[0,0.10556,0,0,0.27778],"47":[0.25,0.75,0,0,0.5],"48":[0,0.64444,0,0,0.5],"49":[0,0.64444,0,0,0.5],"50":[0,0.64444,0,0,0.5],"51":[0,0.64444,0,0,0.5],"52":[0,0.64444,0,0,0.5],"53":[0,0.64444,0,0,0.5],"54":[0,0.64444,0,0,0.5],"55":[0,0.64444,0,0,0.5],"56":[0,0.64444,0,0,0.5],"57":[0,0.64444,0,0,0.5],"58":[0,0.43056,0,0,0.27778],"59":[0.19444,0.43056,0,0,0.27778],"60":[0.0391,0.5391,0,0,0.77778],"61":[-0.13313,0.36687,0,0,0.77778],"62":[0.0391,0.5391,0,0,0.77778],"63":[0,0.69444,0,0,0.47222],"64":[0,0.69444,0,0,0.77778],"65":[0,0.68333,0,0,0.75],"66":[0,0.68333,0,0,0.70834],"67":[0,0.68333,0,0,0.72222],"68":[0,0.68333,0,0,0.76389],"69":[0,0.68333,0,0,0.68056],"70":[0,0.68333,0,0,0.65278],"71":[0,0.68333,0,0,0.78472],"72":[0,0.68333,0,0,0.75],"73":[0,0.68333,0,0,0.36111],"74":[0,0.68333,0,0,0.51389],"75":[0,0.68333,0,0,0.77778],"76":[0,0.68333,0,0,0.625],"77":[0,0.68333,0,0,0.91667],"78":[0,0.68333,0,0,0.75],"79":[0,0.68333,0,0,0.77778],"80":[0,0.68333,0,0,0.68056],"81":[0.19444,0.68333,0,0,0.77778],"82":[0,0.68333,0,0,0.73611],"83":[0,0.68333,0,0,0.55556],"84":[0,0.68333,0,0,0.72222],"85":[0,0.68333,0,0,0.75],"86":[0,0.68333,0.01389,0,0.75],"87":[0,0.68333,0.01389,0,1.02778],"88":[0,0.68333,0,0,0.75],"89":[0,0.68333,0.025,0,0.75],"90":[0,0.68333,0,0,0.61111],"91":[0.25,0.75,0,0,0.27778],"92":[0.25,0.75,0,0,0.5],"93":[0.25,0.75,0,0,0.27778],"94":[0,0.69444,0,0,0.5],"95":[0.31,0.12056,0.02778,0,0.5],"97":[0,0.43056,0,0,0.5],"98":[0,0.69444,0,0,0.55556],"99":[0,0.43056,0,0,0.44445],"100":[0,0.69444,0,0,0.55556],"101":[0,0.43056,0,0,0.44445],"102":[0,0.69444,0.07778,0,0.30556],"103":[0.19444,0.43056,0.01389,0,0.5],"104":[0,0.69444,0,0,0.55556],"105":[0,0.66786,0,0,0.27778],"106":[0.19444,0.66786,0,0,0.30556],"107":[0,0.69444,0,0,0.52778],"108":[0,0.69444,0,0,0.27778],"109":[0,0.43056,0,0,0.83334],"110":[0,0.43056,0,0,0.55556],"111":[0,0.43056,0,0,0.5],"112":[0.19444,0.43056,0,0,0.55556],"113":[0.19444,0.43056,0,0,0.52778],"114":[0,0.43056,0,0,0.39167],"115":[0,0.43056,0,0,0.39445],"116":[0,0.61508,0,0,0.38889],"117":[0,0.43056,0,0,0.55556],"118":[0,0.43056,0.01389,0,0.52778],"119":[0,0.43056,0.01389,0,0.72222],"120":[0,0.43056,0,0,0.52778],"121":[0.19444,0.43056,0.01389,0,0.52778],"122":[0,0.43056,0,0,0.44445],"123":[0.25,0.75,0,0,0.5],"124":[0.25,0.75,0,0,0.27778],"125":[0.25,0.75,0,0,0.5],"126":[0.35,0.31786,0,0,0.5],"160":[0,0,0,0,0.25],"163":[0,0.69444,0,0,0.76909],"167":[0.19444,0.69444,0,0,0.44445],"168":[0,0.66786,0,0,0.5],"172":[0,0.43056,0,0,0.66667],"176":[0,0.69444,0,0,0.75],"177":[0.08333,0.58333,0,0,0.77778],"182":[0.19444,0.69444,0,0,0.61111],"184":[0.17014,0,0,0,0.44445],"198":[0,0.68333,0,0,0.90278],"215":[0.08333,0.58333,0,0,0.77778],"216":[0.04861,0.73194,0,0,0.77778],"223":[0,0.69444,0,0,0.5],"230":[0,0.43056,0,0,0.72222],"247":[0.08333,0.58333,0,0,0.77778],"248":[0.09722,0.52778,0,0,0.5],"305":[0,0.43056,0,0,0.27778],"338":[0,0.68333,0,0,1.01389],"339":[0,0.43056,0,0,0.77778],"567":[0.19444,0.43056,0,0,0.30556],"710":[0,0.69444,0,0,0.5],"711":[0,0.62847,0,0,0.5],"713":[0,0.56778,0,0,0.5],"714":[0,0.69444,0,0,0.5],"715":[0,0.69444,0,0,0.5],"728":[0,0.69444,0,0,0.5],"729":[0,0.66786,0,0,0.27778],"730":[0,0.69444,0,0,0.75],"732":[0,0.66786,0,0,0.5],"733":[0,0.69444,0,0,0.5],"915":[0,0.68333,0,0,0.625],"916":[0,0.68333,0,0,0.83334],"920":[0,0.68333,0,0,0.77778],"923":[0,0.68333,0,0,0.69445],"926":[0,0.68333,0,0,0.66667],"928":[0,0.68333,0,0,0.75],"931":[0,0.68333,0,0,0.72222],"933":[0,0.68333,0,0,0.77778],"934":[0,0.68333,0,0,0.72222],"936":[0,0.68333,0,0,0.77778],"937":[0,0.68333,0,0,0.72222],"8211":[0,0.43056,0.02778,0,0.5],"8212":[0,0.43056,0.02778,0,1],"8216":[0,0.69444,0,0,0.27778],"8217":[0,0.69444,0,0,0.27778],"8220":[0,0.69444,0,0,0.5],"8221":[0,0.69444,0,0,0.5],"8224":[0.19444,0.69444,0,0,0.44445],"8225":[0.19444,0.69444,0,0,0.44445],"8230":[0,0.123,0,0,1.172],"8242":[0,0.55556,0,0,0.275],"8407":[0,0.71444,0.15382,0,0.5],"8463":[0,0.68889,0,0,0.54028],"8465":[0,0.69444,0,0,0.72222],"8467":[0,0.69444,0,0.11111,0.41667],"8472":[0.19444,0.43056,0,0.11111,0.63646],"8476":[0,0.69444,0,0,0.72222],"8501":[0,0.69444,0,0,0.61111],"8592":[-0.13313,0.36687,0,0,1],"8593":[0.19444,0.69444,0,0,0.5],"8594":[-0.13313,0.36687,0,0,1],"8595":[0.19444,0.69444,0,0,0.5],"8596":[-0.13313,0.36687,0,0,1],"8597":[0.25,0.75,0,0,0.5],"8598":[0.19444,0.69444,0,0,1],"8599":[0.19444,0.69444,0,0,1],"8600":[0.19444,0.69444,0,0,1],"8601":[0.19444,0.69444,0,0,1],"8614":[0.011,0.511,0,0,1],"8617":[0.011,0.511,0,0,1.126],"8618":[0.011,0.511,0,0,1.126],"8636":[-0.13313,0.36687,0,0,1],"8637":[-0.13313,0.36687,0,0,1],"8640":[-0.13313,0.36687,0,0,1],"8641":[-0.13313,0.36687,0,0,1],"8652":[0.011,0.671,0,0,1],"8656":[-0.13313,0.36687,0,0,1],"8657":[0.19444,0.69444,0,0,0.61111],"8658":[-0.13313,0.36687,0,0,1],"8659":[0.19444,0.69444,0,0,0.61111],"8660":[-0.13313,0.36687,0,0,1],"8661":[0.25,0.75,0,0,0.61111],"8704":[0,0.69444,0,0,0.55556],"8706":[0,0.69444,0.05556,0.08334,0.5309],"8707":[0,0.69444,0,0,0.55556],"8709":[0.05556,0.75,0,0,0.5],"8711":[0,0.68333,0,0,0.83334],"8712":[0.0391,0.5391,0,0,0.66667],"8715":[0.0391,0.5391,0,0,0.66667],"8722":[0.08333,0.58333,0,0,0.77778],"8723":[0.08333,0.58333,0,0,0.77778],"8725":[0.25,0.75,0,0,0.5],"8726":[0.25,0.75,0,0,0.5],"8727":[-0.03472,0.46528,0,0,0.5],"8728":[-0.05555,0.44445,0,0,0.5],"8729":[-0.05555,0.44445,0,0,0.5],"8730":[0.2,0.8,0,0,0.83334],"8733":[0,0.43056,0,0,0.77778],"8734":[0,0.43056,0,0,1],"8736":[0,0.69224,0,0,0.72222],"8739":[0.25,0.75,0,0,0.27778],"8741":[0.25,0.75,0,0,0.5],"8743":[0,0.55556,0,0,0.66667],"8744":[0,0.55556,0,0,0.66667],"8745":[0,0.55556,0,0,0.66667],"8746":[0,0.55556,0,0,0.66667],"8747":[0.19444,0.69444,0.11111,0,0.41667],"8764":[-0.13313,0.36687,0,0,0.77778],"8768":[0.19444,0.69444,0,0,0.27778],"8771":[-0.03625,0.46375,0,0,0.77778],"8773":[-0.022,0.589,0,0,0.778],"8776":[-0.01688,0.48312,0,0,0.77778],"8781":[-0.03625,0.46375,0,0,0.77778],"8784":[-0.133,0.673,0,0,0.778],"8801":[-0.03625,0.46375,0,0,0.77778],"8804":[0.13597,0.63597,0,0,0.77778],"8805":[0.13597,0.63597,0,0,0.77778],"8810":[0.0391,0.5391,0,0,1],"8811":[0.0391,0.5391,0,0,1],"8826":[0.0391,0.5391,0,0,0.77778],"8827":[0.0391,0.5391,0,0,0.77778],"8834":[0.0391,0.5391,0,0,0.77778],"8835":[0.0391,0.5391,0,0,0.77778],"8838":[0.13597,0.63597,0,0,0.77778],"8839":[0.13597,0.63597,0,0,0.77778],"8846":[0,0.55556,0,0,0.66667],"8849":[0.13597,0.63597,0,0,0.77778],"8850":[0.13597,0.63597,0,0,0.77778],"8851":[0,0.55556,0,0,0.66667],"8852":[0,0.55556,0,0,0.66667],"8853":[0.08333,0.58333,0,0,0.77778],"8854":[0.08333,0.58333,0,0,0.77778],"8855":[0.08333,0.58333,0,0,0.77778],"8856":[0.08333,0.58333,0,0,0.77778],"8857":[0.08333,0.58333,0,0,0.77778],"8866":[0,0.69444,0,0,0.61111],"8867":[0,0.69444,0,0,0.61111],"8868":[0,0.69444,0,0,0.77778],"8869":[0,0.69444,0,0,0.77778],"8872":[0.249,0.75,0,0,0.867],"8900":[-0.05555,0.44445,0,0,0.5],"8901":[-0.05555,0.44445,0,0,0.27778],"8902":[-0.03472,0.46528,0,0,0.5],"8904":[0.005,0.505,0,0,0.9],"8942":[0.03,0.903,0,0,0.278],"8943":[-0.19,0.313,0,0,1.172],"8945":[-0.1,0.823,0,0,1.282],"8968":[0.25,0.75,0,0,0.44445],"8969":[0.25,0.75,0,0,0.44445],"8970":[0.25,0.75,0,0,0.44445],"8971":[0.25,0.75,0,0,0.44445],"8994":[-0.14236,0.35764,0,0,1],"8995":[-0.14236,0.35764,0,0,1],"9136":[0.244,0.744,0,0,0.412],"9137":[0.244,0.745,0,0,0.412],"9651":[0.19444,0.69444,0,0,0.88889],"9657":[-0.03472,0.46528,0,0,0.5],"9661":[0.19444,0.69444,0,0,0.88889],"9667":[-0.03472,0.46528,0,0,0.5],"9711":[0.19444,0.69444,0,0,1],"9824":[0.12963,0.69444,0,0,0.77778],"9825":[0.12963,0.69444,0,0,0.77778],"9826":[0.12963,0.69444,0,0,0.77778],"9827":[0.12963,0.69444,0,0,0.77778],"9837":[0,0.75,0,0,0.38889],"9838":[0.19444,0.69444,0,0,0.38889],"9839":[0.19444,0.69444,0,0,0.38889],"10216":[0.25,0.75,0,0,0.38889],"10217":[0.25,0.75,0,0,0.38889],"10222":[0.244,0.744,0,0,0.412],"10223":[0.244,0.745,0,0,0.412],"10229":[0.011,0.511,0,0,1.609],"10230":[0.011,0.511,0,0,1.638],"10231":[0.011,0.511,0,0,1.859],"10232":[0.024,0.525,0,0,1.609],"10233":[0.024,0.525,0,0,1.638],"10234":[0.024,0.525,0,0,1.858],"10236":[0.011,0.511,0,0,1.638],"10815":[0,0.68333,0,0,0.75],"10927":[0.13597,0.63597,0,0,0.77778],"10928":[0.13597,0.63597,0,0,0.77778],"57376":[0.19444,0.69444,0,0,0]},"Math-BoldItalic":{"32":[0,0,0,0,0.25],"48":[0,0.44444,0,0,0.575],"49":[0,0.44444,0,0,0.575],"50":[0,0.44444,0,0,0.575],"51":[0.19444,0.44444,0,0,0.575],"52":[0.19444,0.44444,0,0,0.575],"53":[0.19444,0.44444,0,0,0.575],"54":[0,0.64444,0,0,0.575],"55":[0.19444,0.44444,0,0,0.575],"56":[0,0.64444,0,0,0.575],"57":[0.19444,0.44444,0,0,0.575],"65":[0,0.68611,0,0,0.86944],"66":[0,0.68611,0.04835,0,0.8664],"67":[0,0.68611,0.06979,0,0.81694],"68":[0,0.68611,0.03194,0,0.93812],"69":[0,0.68611,0.05451,0,0.81007],"70":[0,0.68611,0.15972,0,0.68889],"71":[0,0.68611,0,0,0.88673],"72":[0,0.68611,0.08229,0,0.98229],"73":[0,0.68611,0.07778,0,0.51111],"74":[0,0.68611,0.10069,0,0.63125],"75":[0,0.68611,0.06979,0,0.97118],"76":[0,0.68611,0,0,0.75555],"77":[0,0.68611,0.11424,0,1.14201],"78":[0,0.68611,0.11424,0,0.95034],"79":[0,0.68611,0.03194,0,0.83666],"80":[0,0.68611,0.15972,0,0.72309],"81":[0.19444,0.68611,0,0,0.86861],"82":[0,0.68611,0.00421,0,0.87235],"83":[0,0.68611,0.05382,0,0.69271],"84":[0,0.68611,0.15972,0,0.63663],"85":[0,0.68611,0.11424,0,0.80027],"86":[0,0.68611,0.25555,0,0.67778],"87":[0,0.68611,0.15972,0,1.09305],"88":[0,0.68611,0.07778,0,0.94722],"89":[0,0.68611,0.25555,0,0.67458],"90":[0,0.68611,0.06979,0,0.77257],"97":[0,0.44444,0,0,0.63287],"98":[0,0.69444,0,0,0.52083],"99":[0,0.44444,0,0,0.51342],"100":[0,0.69444,0,0,0.60972],"101":[0,0.44444,0,0,0.55361],"102":[0.19444,0.69444,0.11042,0,0.56806],"103":[0.19444,0.44444,0.03704,0,0.5449],"104":[0,0.69444,0,0,0.66759],"105":[0,0.69326,0,0,0.4048],"106":[0.19444,0.69326,0.0622,0,0.47083],"107":[0,0.69444,0.01852,0,0.6037],"108":[0,0.69444,0.0088,0,0.34815],"109":[0,0.44444,0,0,1.0324],"110":[0,0.44444,0,0,0.71296],"111":[0,0.44444,0,0,0.58472],"112":[0.19444,0.44444,0,0,0.60092],"113":[0.19444,0.44444,0.03704,0,0.54213],"114":[0,0.44444,0.03194,0,0.5287],"115":[0,0.44444,0,0,0.53125],"116":[0,0.63492,0,0,0.41528],"117":[0,0.44444,0,0,0.68102],"118":[0,0.44444,0.03704,0,0.56666],"119":[0,0.44444,0.02778,0,0.83148],"120":[0,0.44444,0,0,0.65903],"121":[0.19444,0.44444,0.03704,0,0.59028],"122":[0,0.44444,0.04213,0,0.55509],"160":[0,0,0,0,0.25],"915":[0,0.68611,0.15972,0,0.65694],"916":[0,0.68611,0,0,0.95833],"920":[0,0.68611,0.03194,0,0.86722],"923":[0,0.68611,0,0,0.80555],"926":[0,0.68611,0.07458,0,0.84125],"928":[0,0.68611,0.08229,0,0.98229],"931":[0,0.68611,0.05451,0,0.88507],"933":[0,0.68611,0.15972,0,0.67083],"934":[0,0.68611,0,0,0.76666],"936":[0,0.68611,0.11653,0,0.71402],"937":[0,0.68611,0.04835,0,0.8789],"945":[0,0.44444,0,0,0.76064],"946":[0.19444,0.69444,0.03403,0,0.65972],"947":[0.19444,0.44444,0.06389,0,0.59003],"948":[0,0.69444,0.03819,0,0.52222],"949":[0,0.44444,0,0,0.52882],"950":[0.19444,0.69444,0.06215,0,0.50833],"951":[0.19444,0.44444,0.03704,0,0.6],"952":[0,0.69444,0.03194,0,0.5618],"953":[0,0.44444,0,0,0.41204],"954":[0,0.44444,0,0,0.66759],"955":[0,0.69444,0,0,0.67083],"956":[0.19444,0.44444,0,0,0.70787],"957":[0,0.44444,0.06898,0,0.57685],"958":[0.19444,0.69444,0.03021,0,0.50833],"959":[0,0.44444,0,0,0.58472],"960":[0,0.44444,0.03704,0,0.68241],"961":[0.19444,0.44444,0,0,0.6118],"962":[0.09722,0.44444,0.07917,0,0.42361],"963":[0,0.44444,0.03704,0,0.68588],"964":[0,0.44444,0.13472,0,0.52083],"965":[0,0.44444,0.03704,0,0.63055],"966":[0.19444,0.44444,0,0,0.74722],"967":[0.19444,0.44444,0,0,0.71805],"968":[0.19444,0.69444,0.03704,0,0.75833],"969":[0,0.44444,0.03704,0,0.71782],"977":[0,0.69444,0,0,0.69155],"981":[0.19444,0.69444,0,0,0.7125],"982":[0,0.44444,0.03194,0,0.975],"1009":[0.19444,0.44444,0,0,0.6118],"1013":[0,0.44444,0,0,0.48333],"57649":[0,0.44444,0,0,0.39352],"57911":[0.19444,0.44444,0,0,0.43889]},"Math-Italic":{"32":[0,0,0,0,0.25],"48":[0,0.43056,0,0,0.5],"49":[0,0.43056,0,0,0.5],"50":[0,0.43056,0,0,0.5],"51":[0.19444,0.43056,0,0,0.5],"52":[0.19444,0.43056,0,0,0.5],"53":[0.19444,0.43056,0,0,0.5],"54":[0,0.64444,0,0,0.5],"55":[0.19444,0.43056,0,0,0.5],"56":[0,0.64444,0,0,0.5],"57":[0.19444,0.43056,0,0,0.5],"65":[0,0.68333,0,0.13889,0.75],"66":[0,0.68333,0.05017,0.08334,0.75851],"67":[0,0.68333,0.07153,0.08334,0.71472],"68":[0,0.68333,0.02778,0.05556,0.82792],"69":[0,0.68333,0.05764,0.08334,0.7382],"70":[0,0.68333,0.13889,0.08334,0.64306],"71":[0,0.68333,0,0.08334,0.78625],"72":[0,0.68333,0.08125,0.05556,0.83125],"73":[0,0.68333,0.07847,0.11111,0.43958],"74":[0,0.68333,0.09618,0.16667,0.55451],"75":[0,0.68333,0.07153,0.05556,0.84931],"76":[0,0.68333,0,0.02778,0.68056],"77":[0,0.68333,0.10903,0.08334,0.97014],"78":[0,0.68333,0.10903,0.08334,0.80347],"79":[0,0.68333,0.02778,0.08334,0.76278],"80":[0,0.68333,0.13889,0.08334,0.64201],"81":[0.19444,0.68333,0,0.08334,0.79056],"82":[0,0.68333,0.00773,0.08334,0.75929],"83":[0,0.68333,0.05764,0.08334,0.6132],"84":[0,0.68333,0.13889,0.08334,0.58438],"85":[0,0.68333,0.10903,0.02778,0.68278],"86":[0,0.68333,0.22222,0,0.58333],"87":[0,0.68333,0.13889,0,0.94445],"88":[0,0.68333,0.07847,0.08334,0.82847],"89":[0,0.68333,0.22222,0,0.58056],"90":[0,0.68333,0.07153,0.08334,0.68264],"97":[0,0.43056,0,0,0.52859],"98":[0,0.69444,0,0,0.42917],"99":[0,0.43056,0,0.05556,0.43276],"100":[0,0.69444,0,0.16667,0.52049],"101":[0,0.43056,0,0.05556,0.46563],"102":[0.19444,0.69444,0.10764,0.16667,0.48959],"103":[0.19444,0.43056,0.03588,0.02778,0.47697],"104":[0,0.69444,0,0,0.57616],"105":[0,0.65952,0,0,0.34451],"106":[0.19444,0.65952,0.05724,0,0.41181],"107":[0,0.69444,0.03148,0,0.5206],"108":[0,0.69444,0.01968,0.08334,0.29838],"109":[0,0.43056,0,0,0.87801],"110":[0,0.43056,0,0,0.60023],"111":[0,0.43056,0,0.05556,0.48472],"112":[0.19444,0.43056,0,0.08334,0.50313],"113":[0.19444,0.43056,0.03588,0.08334,0.44641],"114":[0,0.43056,0.02778,0.05556,0.45116],"115":[0,0.43056,0,0.05556,0.46875],"116":[0,0.61508,0,0.08334,0.36111],"117":[0,0.43056,0,0.02778,0.57246],"118":[0,0.43056,0.03588,0.02778,0.48472],"119":[0,0.43056,0.02691,0.08334,0.71592],"120":[0,0.43056,0,0.02778,0.57153],"121":[0.19444,0.43056,0.03588,0.05556,0.49028],"122":[0,0.43056,0.04398,0.05556,0.46505],"160":[0,0,0,0,0.25],"915":[0,0.68333,0.13889,0.08334,0.61528],"916":[0,0.68333,0,0.16667,0.83334],"920":[0,0.68333,0.02778,0.08334,0.76278],"923":[0,0.68333,0,0.16667,0.69445],"926":[0,0.68333,0.07569,0.08334,0.74236],"928":[0,0.68333,0.08125,0.05556,0.83125],"931":[0,0.68333,0.05764,0.08334,0.77986],"933":[0,0.68333,0.13889,0.05556,0.58333],"934":[0,0.68333,0,0.08334,0.66667],"936":[0,0.68333,0.11,0.05556,0.61222],"937":[0,0.68333,0.05017,0.08334,0.7724],"945":[0,0.43056,0.0037,0.02778,0.6397],"946":[0.19444,0.69444,0.05278,0.08334,0.56563],"947":[0.19444,0.43056,0.05556,0,0.51773],"948":[0,0.69444,0.03785,0.05556,0.44444],"949":[0,0.43056,0,0.08334,0.46632],"950":[0.19444,0.69444,0.07378,0.08334,0.4375],"951":[0.19444,0.43056,0.03588,0.05556,0.49653],"952":[0,0.69444,0.02778,0.08334,0.46944],"953":[0,0.43056,0,0.05556,0.35394],"954":[0,0.43056,0,0,0.57616],"955":[0,0.69444,0,0,0.58334],"956":[0.19444,0.43056,0,0.02778,0.60255],"957":[0,0.43056,0.06366,0.02778,0.49398],"958":[0.19444,0.69444,0.04601,0.11111,0.4375],"959":[0,0.43056,0,0.05556,0.48472],"960":[0,0.43056,0.03588,0,0.57003],"961":[0.19444,0.43056,0,0.08334,0.51702],"962":[0.09722,0.43056,0.07986,0.08334,0.36285],"963":[0,0.43056,0.03588,0,0.57141],"964":[0,0.43056,0.1132,0.02778,0.43715],"965":[0,0.43056,0.03588,0.02778,0.54028],"966":[0.19444,0.43056,0,0.08334,0.65417],"967":[0.19444,0.43056,0,0.05556,0.62569],"968":[0.19444,0.69444,0.03588,0.11111,0.65139],"969":[0,0.43056,0.03588,0,0.62245],"977":[0,0.69444,0,0.08334,0.59144],"981":[0.19444,0.69444,0,0.08334,0.59583],"982":[0,0.43056,0.02778,0,0.82813],"1009":[0.19444,0.43056,0,0.08334,0.51702],"1013":[0,0.43056,0,0.05556,0.4059],"57649":[0,0.43056,0,0.02778,0.32246],"57911":[0.19444,0.43056,0,0.08334,0.38403]},"SansSerif-Bold":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.36667],"34":[0,0.69444,0,0,0.55834],"35":[0.19444,0.69444,0,0,0.91667],"36":[0.05556,0.75,0,0,0.55],"37":[0.05556,0.75,0,0,1.02912],"38":[0,0.69444,0,0,0.83056],"39":[0,0.69444,0,0,0.30556],"40":[0.25,0.75,0,0,0.42778],"41":[0.25,0.75,0,0,0.42778],"42":[0,0.75,0,0,0.55],"43":[0.11667,0.61667,0,0,0.85556],"44":[0.10556,0.13056,0,0,0.30556],"45":[0,0.45833,0,0,0.36667],"46":[0,0.13056,0,0,0.30556],"47":[0.25,0.75,0,0,0.55],"48":[0,0.69444,0,0,0.55],"49":[0,0.69444,0,0,0.55],"50":[0,0.69444,0,0,0.55],"51":[0,0.69444,0,0,0.55],"52":[0,0.69444,0,0,0.55],"53":[0,0.69444,0,0,0.55],"54":[0,0.69444,0,0,0.55],"55":[0,0.69444,0,0,0.55],"56":[0,0.69444,0,0,0.55],"57":[0,0.69444,0,0,0.55],"58":[0,0.45833,0,0,0.30556],"59":[0.10556,0.45833,0,0,0.30556],"61":[-0.09375,0.40625,0,0,0.85556],"63":[0,0.69444,0,0,0.51945],"64":[0,0.69444,0,0,0.73334],"65":[0,0.69444,0,0,0.73334],"66":[0,0.69444,0,0,0.73334],"67":[0,0.69444,0,0,0.70278],"68":[0,0.69444,0,0,0.79445],"69":[0,0.69444,0,0,0.64167],"70":[0,0.69444,0,0,0.61111],"71":[0,0.69444,0,0,0.73334],"72":[0,0.69444,0,0,0.79445],"73":[0,0.69444,0,0,0.33056],"74":[0,0.69444,0,0,0.51945],"75":[0,0.69444,0,0,0.76389],"76":[0,0.69444,0,0,0.58056],"77":[0,0.69444,0,0,0.97778],"78":[0,0.69444,0,0,0.79445],"79":[0,0.69444,0,0,0.79445],"80":[0,0.69444,0,0,0.70278],"81":[0.10556,0.69444,0,0,0.79445],"82":[0,0.69444,0,0,0.70278],"83":[0,0.69444,0,0,0.61111],"84":[0,0.69444,0,0,0.73334],"85":[0,0.69444,0,0,0.76389],"86":[0,0.69444,0.01528,0,0.73334],"87":[0,0.69444,0.01528,0,1.03889],"88":[0,0.69444,0,0,0.73334],"89":[0,0.69444,0.0275,0,0.73334],"90":[0,0.69444,0,0,0.67223],"91":[0.25,0.75,0,0,0.34306],"93":[0.25,0.75,0,0,0.34306],"94":[0,0.69444,0,0,0.55],"95":[0.35,0.10833,0.03056,0,0.55],"97":[0,0.45833,0,0,0.525],"98":[0,0.69444,0,0,0.56111],"99":[0,0.45833,0,0,0.48889],"100":[0,0.69444,0,0,0.56111],"101":[0,0.45833,0,0,0.51111],"102":[0,0.69444,0.07639,0,0.33611],"103":[0.19444,0.45833,0.01528,0,0.55],"104":[0,0.69444,0,0,0.56111],"105":[0,0.69444,0,0,0.25556],"106":[0.19444,0.69444,0,0,0.28611],"107":[0,0.69444,0,0,0.53056],"108":[0,0.69444,0,0,0.25556],"109":[0,0.45833,0,0,0.86667],"110":[0,0.45833,0,0,0.56111],"111":[0,0.45833,0,0,0.55],"112":[0.19444,0.45833,0,0,0.56111],"113":[0.19444,0.45833,0,0,0.56111],"114":[0,0.45833,0.01528,0,0.37222],"115":[0,0.45833,0,0,0.42167],"116":[0,0.58929,0,0,0.40417],"117":[0,0.45833,0,0,0.56111],"118":[0,0.45833,0.01528,0,0.5],"119":[0,0.45833,0.01528,0,0.74445],"120":[0,0.45833,0,0,0.5],"121":[0.19444,0.45833,0.01528,0,0.5],"122":[0,0.45833,0,0,0.47639],"126":[0.35,0.34444,0,0,0.55],"160":[0,0,0,0,0.25],"168":[0,0.69444,0,0,0.55],"176":[0,0.69444,0,0,0.73334],"180":[0,0.69444,0,0,0.55],"184":[0.17014,0,0,0,0.48889],"305":[0,0.45833,0,0,0.25556],"567":[0.19444,0.45833,0,0,0.28611],"710":[0,0.69444,0,0,0.55],"711":[0,0.63542,0,0,0.55],"713":[0,0.63778,0,0,0.55],"728":[0,0.69444,0,0,0.55],"729":[0,0.69444,0,0,0.30556],"730":[0,0.69444,0,0,0.73334],"732":[0,0.69444,0,0,0.55],"733":[0,0.69444,0,0,0.55],"915":[0,0.69444,0,0,0.58056],"916":[0,0.69444,0,0,0.91667],"920":[0,0.69444,0,0,0.85556],"923":[0,0.69444,0,0,0.67223],"926":[0,0.69444,0,0,0.73334],"928":[0,0.69444,0,0,0.79445],"931":[0,0.69444,0,0,0.79445],"933":[0,0.69444,0,0,0.85556],"934":[0,0.69444,0,0,0.79445],"936":[0,0.69444,0,0,0.85556],"937":[0,0.69444,0,0,0.79445],"8211":[0,0.45833,0.03056,0,0.55],"8212":[0,0.45833,0.03056,0,1.10001],"8216":[0,0.69444,0,0,0.30556],"8217":[0,0.69444,0,0,0.30556],"8220":[0,0.69444,0,0,0.55834],"8221":[0,0.69444,0,0,0.55834]},"SansSerif-Italic":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0.05733,0,0.31945],"34":[0,0.69444,0.00316,0,0.5],"35":[0.19444,0.69444,0.05087,0,0.83334],"36":[0.05556,0.75,0.11156,0,0.5],"37":[0.05556,0.75,0.03126,0,0.83334],"38":[0,0.69444,0.03058,0,0.75834],"39":[0,0.69444,0.07816,0,0.27778],"40":[0.25,0.75,0.13164,0,0.38889],"41":[0.25,0.75,0.02536,0,0.38889],"42":[0,0.75,0.11775,0,0.5],"43":[0.08333,0.58333,0.02536,0,0.77778],"44":[0.125,0.08333,0,0,0.27778],"45":[0,0.44444,0.01946,0,0.33333],"46":[0,0.08333,0,0,0.27778],"47":[0.25,0.75,0.13164,0,0.5],"48":[0,0.65556,0.11156,0,0.5],"49":[0,0.65556,0.11156,0,0.5],"50":[0,0.65556,0.11156,0,0.5],"51":[0,0.65556,0.11156,0,0.5],"52":[0,0.65556,0.11156,0,0.5],"53":[0,0.65556,0.11156,0,0.5],"54":[0,0.65556,0.11156,0,0.5],"55":[0,0.65556,0.11156,0,0.5],"56":[0,0.65556,0.11156,0,0.5],"57":[0,0.65556,0.11156,0,0.5],"58":[0,0.44444,0.02502,0,0.27778],"59":[0.125,0.44444,0.02502,0,0.27778],"61":[-0.13,0.37,0.05087,0,0.77778],"63":[0,0.69444,0.11809,0,0.47222],"64":[0,0.69444,0.07555,0,0.66667],"65":[0,0.69444,0,0,0.66667],"66":[0,0.69444,0.08293,0,0.66667],"67":[0,0.69444,0.11983,0,0.63889],"68":[0,0.69444,0.07555,0,0.72223],"69":[0,0.69444,0.11983,0,0.59722],"70":[0,0.69444,0.13372,0,0.56945],"71":[0,0.69444,0.11983,0,0.66667],"72":[0,0.69444,0.08094,0,0.70834],"73":[0,0.69444,0.13372,0,0.27778],"74":[0,0.69444,0.08094,0,0.47222],"75":[0,0.69444,0.11983,0,0.69445],"76":[0,0.69444,0,0,0.54167],"77":[0,0.69444,0.08094,0,0.875],"78":[0,0.69444,0.08094,0,0.70834],"79":[0,0.69444,0.07555,0,0.73611],"80":[0,0.69444,0.08293,0,0.63889],"81":[0.125,0.69444,0.07555,0,0.73611],"82":[0,0.69444,0.08293,0,0.64584],"83":[0,0.69444,0.09205,0,0.55556],"84":[0,0.69444,0.13372,0,0.68056],"85":[0,0.69444,0.08094,0,0.6875],"86":[0,0.69444,0.1615,0,0.66667],"87":[0,0.69444,0.1615,0,0.94445],"88":[0,0.69444,0.13372,0,0.66667],"89":[0,0.69444,0.17261,0,0.66667],"90":[0,0.69444,0.11983,0,0.61111],"91":[0.25,0.75,0.15942,0,0.28889],"93":[0.25,0.75,0.08719,0,0.28889],"94":[0,0.69444,0.0799,0,0.5],"95":[0.35,0.09444,0.08616,0,0.5],"97":[0,0.44444,0.00981,0,0.48056],"98":[0,0.69444,0.03057,0,0.51667],"99":[0,0.44444,0.08336,0,0.44445],"100":[0,0.69444,0.09483,0,0.51667],"101":[0,0.44444,0.06778,0,0.44445],"102":[0,0.69444,0.21705,0,0.30556],"103":[0.19444,0.44444,0.10836,0,0.5],"104":[0,0.69444,0.01778,0,0.51667],"105":[0,0.67937,0.09718,0,0.23889],"106":[0.19444,0.67937,0.09162,0,0.26667],"107":[0,0.69444,0.08336,0,0.48889],"108":[0,0.69444,0.09483,0,0.23889],"109":[0,0.44444,0.01778,0,0.79445],"110":[0,0.44444,0.01778,0,0.51667],"111":[0,0.44444,0.06613,0,0.5],"112":[0.19444,0.44444,0.0389,0,0.51667],"113":[0.19444,0.44444,0.04169,0,0.51667],"114":[0,0.44444,0.10836,0,0.34167],"115":[0,0.44444,0.0778,0,0.38333],"116":[0,0.57143,0.07225,0,0.36111],"117":[0,0.44444,0.04169,0,0.51667],"118":[0,0.44444,0.10836,0,0.46111],"119":[0,0.44444,0.10836,0,0.68334],"120":[0,0.44444,0.09169,0,0.46111],"121":[0.19444,0.44444,0.10836,0,0.46111],"122":[0,0.44444,0.08752,0,0.43472],"126":[0.35,0.32659,0.08826,0,0.5],"160":[0,0,0,0,0.25],"168":[0,0.67937,0.06385,0,0.5],"176":[0,0.69444,0,0,0.73752],"184":[0.17014,0,0,0,0.44445],"305":[0,0.44444,0.04169,0,0.23889],"567":[0.19444,0.44444,0.04169,0,0.26667],"710":[0,0.69444,0.0799,0,0.5],"711":[0,0.63194,0.08432,0,0.5],"713":[0,0.60889,0.08776,0,0.5],"714":[0,0.69444,0.09205,0,0.5],"715":[0,0.69444,0,0,0.5],"728":[0,0.69444,0.09483,0,0.5],"729":[0,0.67937,0.07774,0,0.27778],"730":[0,0.69444,0,0,0.73752],"732":[0,0.67659,0.08826,0,0.5],"733":[0,0.69444,0.09205,0,0.5],"915":[0,0.69444,0.13372,0,0.54167],"916":[0,0.69444,0,0,0.83334],"920":[0,0.69444,0.07555,0,0.77778],"923":[0,0.69444,0,0,0.61111],"926":[0,0.69444,0.12816,0,0.66667],"928":[0,0.69444,0.08094,0,0.70834],"931":[0,0.69444,0.11983,0,0.72222],"933":[0,0.69444,0.09031,0,0.77778],"934":[0,0.69444,0.04603,0,0.72222],"936":[0,0.69444,0.09031,0,0.77778],"937":[0,0.69444,0.08293,0,0.72222],"8211":[0,0.44444,0.08616,0,0.5],"8212":[0,0.44444,0.08616,0,1],"8216":[0,0.69444,0.07816,0,0.27778],"8217":[0,0.69444,0.07816,0,0.27778],"8220":[0,0.69444,0.14205,0,0.5],"8221":[0,0.69444,0.00316,0,0.5]},"SansSerif-Regular":{"32":[0,0,0,0,0.25],"33":[0,0.69444,0,0,0.31945],"34":[0,0.69444,0,0,0.5],"35":[0.19444,0.69444,0,0,0.83334],"36":[0.05556,0.75,0,0,0.5],"37":[0.05556,0.75,0,0,0.83334],"38":[0,0.69444,0,0,0.75834],"39":[0,0.69444,0,0,0.27778],"40":[0.25,0.75,0,0,0.38889],"41":[0.25,0.75,0,0,0.38889],"42":[0,0.75,0,0,0.5],"43":[0.08333,0.58333,0,0,0.77778],"44":[0.125,0.08333,0,0,0.27778],"45":[0,0.44444,0,0,0.33333],"46":[0,0.08333,0,0,0.27778],"47":[0.25,0.75,0,0,0.5],"48":[0,0.65556,0,0,0.5],"49":[0,0.65556,0,0,0.5],"50":[0,0.65556,0,0,0.5],"51":[0,0.65556,0,0,0.5],"52":[0,0.65556,0,0,0.5],"53":[0,0.65556,0,0,0.5],"54":[0,0.65556,0,0,0.5],"55":[0,0.65556,0,0,0.5],"56":[0,0.65556,0,0,0.5],"57":[0,0.65556,0,0,0.5],"58":[0,0.44444,0,0,0.27778],"59":[0.125,0.44444,0,0,0.27778],"61":[-0.13,0.37,0,0,0.77778],"63":[0,0.69444,0,0,0.47222],"64":[0,0.69444,0,0,0.66667],"65":[0,0.69444,0,0,0.66667],"66":[0,0.69444,0,0,0.66667],"67":[0,0.69444,0,0,0.63889],"68":[0,0.69444,0,0,0.72223],"69":[0,0.69444,0,0,0.59722],"70":[0,0.69444,0,0,0.56945],"71":[0,0.69444,0,0,0.66667],"72":[0,0.69444,0,0,0.70834],"73":[0,0.69444,0,0,0.27778],"74":[0,0.69444,0,0,0.47222],"75":[0,0.69444,0,0,0.69445],"76":[0,0.69444,0,0,0.54167],"77":[0,0.69444,0,0,0.875],"78":[0,0.69444,0,0,0.70834],"79":[0,0.69444,0,0,0.73611],"80":[0,0.69444,0,0,0.63889],"81":[0.125,0.69444,0,0,0.73611],"82":[0,0.69444,0,0,0.64584],"83":[0,0.69444,0,0,0.55556],"84":[0,0.69444,0,0,0.68056],"85":[0,0.69444,0,0,0.6875],"86":[0,0.69444,0.01389,0,0.66667],"87":[0,0.69444,0.01389,0,0.94445],"88":[0,0.69444,0,0,0.66667],"89":[0,0.69444,0.025,0,0.66667],"90":[0,0.69444,0,0,0.61111],"91":[0.25,0.75,0,0,0.28889],"93":[0.25,0.75,0,0,0.28889],"94":[0,0.69444,0,0,0.5],"95":[0.35,0.09444,0.02778,0,0.5],"97":[0,0.44444,0,0,0.48056],"98":[0,0.69444,0,0,0.51667],"99":[0,0.44444,0,0,0.44445],"100":[0,0.69444,0,0,0.51667],"101":[0,0.44444,0,0,0.44445],"102":[0,0.69444,0.06944,0,0.30556],"103":[0.19444,0.44444,0.01389,0,0.5],"104":[0,0.69444,0,0,0.51667],"105":[0,0.67937,0,0,0.23889],"106":[0.19444,0.67937,0,0,0.26667],"107":[0,0.69444,0,0,0.48889],"108":[0,0.69444,0,0,0.23889],"109":[0,0.44444,0,0,0.79445],"110":[0,0.44444,0,0,0.51667],"111":[0,0.44444,0,0,0.5],"112":[0.19444,0.44444,0,0,0.51667],"113":[0.19444,0.44444,0,0,0.51667],"114":[0,0.44444,0.01389,0,0.34167],"115":[0,0.44444,0,0,0.38333],"116":[0,0.57143,0,0,0.36111],"117":[0,0.44444,0,0,0.51667],"118":[0,0.44444,0.01389,0,0.46111],"119":[0,0.44444,0.01389,0,0.68334],"120":[0,0.44444,0,0,0.46111],"121":[0.19444,0.44444,0.01389,0,0.46111],"122":[0,0.44444,0,0,0.43472],"126":[0.35,0.32659,0,0,0.5],"160":[0,0,0,0,0.25],"168":[0,0.67937,0,0,0.5],"176":[0,0.69444,0,0,0.66667],"184":[0.17014,0,0,0,0.44445],"305":[0,0.44444,0,0,0.23889],"567":[0.19444,0.44444,0,0,0.26667],"710":[0,0.69444,0,0,0.5],"711":[0,0.63194,0,0,0.5],"713":[0,0.60889,0,0,0.5],"714":[0,0.69444,0,0,0.5],"715":[0,0.69444,0,0,0.5],"728":[0,0.69444,0,0,0.5],"729":[0,0.67937,0,0,0.27778],"730":[0,0.69444,0,0,0.66667],"732":[0,0.67659,0,0,0.5],"733":[0,0.69444,0,0,0.5],"915":[0,0.69444,0,0,0.54167],"916":[0,0.69444,0,0,0.83334],"920":[0,0.69444,0,0,0.77778],"923":[0,0.69444,0,0,0.61111],"926":[0,0.69444,0,0,0.66667],"928":[0,0.69444,0,0,0.70834],"931":[0,0.69444,0,0,0.72222],"933":[0,0.69444,0,0,0.77778],"934":[0,0.69444,0,0,0.72222],"936":[0,0.69444,0,0,0.77778],"937":[0,0.69444,0,0,0.72222],"8211":[0,0.44444,0.02778,0,0.5],"8212":[0,0.44444,0.02778,0,1],"8216":[0,0.69444,0,0,0.27778],"8217":[0,0.69444,0,0,0.27778],"8220":[0,0.69444,0,0,0.5],"8221":[0,0.69444,0,0,0.5]},"Script-Regular":{"32":[0,0,0,0,0.25],"65":[0,0.7,0.22925,0,0.80253],"66":[0,0.7,0.04087,0,0.90757],"67":[0,0.7,0.1689,0,0.66619],"68":[0,0.7,0.09371,0,0.77443],"69":[0,0.7,0.18583,0,0.56162],"70":[0,0.7,0.13634,0,0.89544],"71":[0,0.7,0.17322,0,0.60961],"72":[0,0.7,0.29694,0,0.96919],"73":[0,0.7,0.19189,0,0.80907],"74":[0.27778,0.7,0.19189,0,1.05159],"75":[0,0.7,0.31259,0,0.91364],"76":[0,0.7,0.19189,0,0.87373],"77":[0,0.7,0.15981,0,1.08031],"78":[0,0.7,0.3525,0,0.9015],"79":[0,0.7,0.08078,0,0.73787],"80":[0,0.7,0.08078,0,1.01262],"81":[0,0.7,0.03305,0,0.88282],"82":[0,0.7,0.06259,0,0.85],"83":[0,0.7,0.19189,0,0.86767],"84":[0,0.7,0.29087,0,0.74697],"85":[0,0.7,0.25815,0,0.79996],"86":[0,0.7,0.27523,0,0.62204],"87":[0,0.7,0.27523,0,0.80532],"88":[0,0.7,0.26006,0,0.94445],"89":[0,0.7,0.2939,0,0.70961],"90":[0,0.7,0.24037,0,0.8212],"160":[0,0,0,0,0.25]},"Size1-Regular":{"32":[0,0,0,0,0.25],"40":[0.35001,0.85,0,0,0.45834],"41":[0.35001,0.85,0,0,0.45834],"47":[0.35001,0.85,0,0,0.57778],"91":[0.35001,0.85,0,0,0.41667],"92":[0.35001,0.85,0,0,0.57778],"93":[0.35001,0.85,0,0,0.41667],"123":[0.35001,0.85,0,0,0.58334],"125":[0.35001,0.85,0,0,0.58334],"160":[0,0,0,0,0.25],"710":[0,0.72222,0,0,0.55556],"732":[0,0.72222,0,0,0.55556],"770":[0,0.72222,0,0,0.55556],"771":[0,0.72222,0,0,0.55556],"8214":[-0.00099,0.601,0,0,0.77778],"8593":[0.00001,0.6,0,0,0.66667],"8595":[0.00001,0.6,0,0,0.66667],"8657":[0.00001,0.6,0,0,0.77778],"8659":[0.00001,0.6,0,0,0.77778],"8719":[0.25001,0.75,0,0,0.94445],"8720":[0.25001,0.75,0,0,0.94445],"8721":[0.25001,0.75,0,0,1.05556],"8730":[0.35001,0.85,0,0,1],"8739":[-0.00599,0.606,0,0,0.33333],"8741":[-0.00599,0.606,0,0,0.55556],"8747":[0.30612,0.805,0.19445,0,0.47222],"8748":[0.306,0.805,0.19445,0,0.47222],"8749":[0.306,0.805,0.19445,0,0.47222],"8750":[0.30612,0.805,0.19445,0,0.47222],"8896":[0.25001,0.75,0,0,0.83334],"8897":[0.25001,0.75,0,0,0.83334],"8898":[0.25001,0.75,0,0,0.83334],"8899":[0.25001,0.75,0,0,0.83334],"8968":[0.35001,0.85,0,0,0.47222],"8969":[0.35001,0.85,0,0,0.47222],"8970":[0.35001,0.85,0,0,0.47222],"8971":[0.35001,0.85,0,0,0.47222],"9168":[-0.00099,0.601,0,0,0.66667],"10216":[0.35001,0.85,0,0,0.47222],"10217":[0.35001,0.85,0,0,0.47222],"10752":[0.25001,0.75,0,0,1.11111],"10753":[0.25001,0.75,0,0,1.11111],"10754":[0.25001,0.75,0,0,1.11111],"10756":[0.25001,0.75,0,0,0.83334],"10758":[0.25001,0.75,0,0,0.83334]},"Size2-Regular":{"32":[0,0,0,0,0.25],"40":[0.65002,1.15,0,0,0.59722],"41":[0.65002,1.15,0,0,0.59722],"47":[0.65002,1.15,0,0,0.81111],"91":[0.65002,1.15,0,0,0.47222],"92":[0.65002,1.15,0,0,0.81111],"93":[0.65002,1.15,0,0,0.47222],"123":[0.65002,1.15,0,0,0.66667],"125":[0.65002,1.15,0,0,0.66667],"160":[0,0,0,0,0.25],"710":[0,0.75,0,0,1],"732":[0,0.75,0,0,1],"770":[0,0.75,0,0,1],"771":[0,0.75,0,0,1],"8719":[0.55001,1.05,0,0,1.27778],"8720":[0.55001,1.05,0,0,1.27778],"8721":[0.55001,1.05,0,0,1.44445],"8730":[0.65002,1.15,0,0,1],"8747":[0.86225,1.36,0.44445,0,0.55556],"8748":[0.862,1.36,0.44445,0,0.55556],"8749":[0.862,1.36,0.44445,0,0.55556],"8750":[0.86225,1.36,0.44445,0,0.55556],"8896":[0.55001,1.05,0,0,1.11111],"8897":[0.55001,1.05,0,0,1.11111],"8898":[0.55001,1.05,0,0,1.11111],"8899":[0.55001,1.05,0,0,1.11111],"8968":[0.65002,1.15,0,0,0.52778],"8969":[0.65002,1.15,0,0,0.52778],"8970":[0.65002,1.15,0,0,0.52778],"8971":[0.65002,1.15,0,0,0.52778],"10216":[0.65002,1.15,0,0,0.61111],"10217":[0.65002,1.15,0,0,0.61111],"10752":[0.55001,1.05,0,0,1.51112],"10753":[0.55001,1.05,0,0,1.51112],"10754":[0.55001,1.05,0,0,1.51112],"10756":[0.55001,1.05,0,0,1.11111],"10758":[0.55001,1.05,0,0,1.11111]},"Size3-Regular":{"32":[0,0,0,0,0.25],"40":[0.95003,1.45,0,0,0.73611],"41":[0.95003,1.45,0,0,0.73611],"47":[0.95003,1.45,0,0,1.04445],"91":[0.95003,1.45,0,0,0.52778],"92":[0.95003,1.45,0,0,1.04445],"93":[0.95003,1.45,0,0,0.52778],"123":[0.95003,1.45,0,0,0.75],"125":[0.95003,1.45,0,0,0.75],"160":[0,0,0,0,0.25],"710":[0,0.75,0,0,1.44445],"732":[0,0.75,0,0,1.44445],"770":[0,0.75,0,0,1.44445],"771":[0,0.75,0,0,1.44445],"8730":[0.95003,1.45,0,0,1],"8968":[0.95003,1.45,0,0,0.58334],"8969":[0.95003,1.45,0,0,0.58334],"8970":[0.95003,1.45,0,0,0.58334],"8971":[0.95003,1.45,0,0,0.58334],"10216":[0.95003,1.45,0,0,0.75],"10217":[0.95003,1.45,0,0,0.75]},"Size4-Regular":{"32":[0,0,0,0,0.25],"40":[1.25003,1.75,0,0,0.79167],"41":[1.25003,1.75,0,0,0.79167],"47":[1.25003,1.75,0,0,1.27778],"91":[1.25003,1.75,0,0,0.58334],"92":[1.25003,1.75,0,0,1.27778],"93":[1.25003,1.75,0,0,0.58334],"123":[1.25003,1.75,0,0,0.80556],"125":[1.25003,1.75,0,0,0.80556],"160":[0,0,0,0,0.25],"710":[0,0.825,0,0,1.8889],"732":[0,0.825,0,0,1.8889],"770":[0,0.825,0,0,1.8889],"771":[0,0.825,0,0,1.8889],"8730":[1.25003,1.75,0,0,1],"8968":[1.25003,1.75,0,0,0.63889],"8969":[1.25003,1.75,0,0,0.63889],"8970":[1.25003,1.75,0,0,0.63889],"8971":[1.25003,1.75,0,0,0.63889],"9115":[0.64502,1.155,0,0,0.875],"9116":[0.00001,0.6,0,0,0.875],"9117":[0.64502,1.155,0,0,0.875],"9118":[0.64502,1.155,0,0,0.875],"9119":[0.00001,0.6,0,0,0.875],"9120":[0.64502,1.155,0,0,0.875],"9121":[0.64502,1.155,0,0,0.66667],"9122":[-0.00099,0.601,0,0,0.66667],"9123":[0.64502,1.155,0,0,0.66667],"9124":[0.64502,1.155,0,0,0.66667],"9125":[-0.00099,0.601,0,0,0.66667],"9126":[0.64502,1.155,0,0,0.66667],"9127":[0.00001,0.9,0,0,0.88889],"9128":[0.65002,1.15,0,0,0.88889],"9129":[0.90001,0,0,0,0.88889],"9130":[0,0.3,0,0,0.88889],"9131":[0.00001,0.9,0,0,0.88889],"9132":[0.65002,1.15,0,0,0.88889],"9133":[0.90001,0,0,0,0.88889],"9143":[0.88502,0.915,0,0,1.05556],"10216":[1.25003,1.75,0,0,0.80556],"10217":[1.25003,1.75,0,0,0.80556],"57344":[-0.00499,0.605,0,0,1.05556],"57345":[-0.00499,0.605,0,0,1.05556],"57680":[0,0.12,0,0,0.45],"57681":[0,0.12,0,0,0.45],"57682":[0,0.12,0,0,0.45],"57683":[0,0.12,0,0,0.45]},"Typewriter-Regular":{"32":[0,0,0,0,0.525],"33":[0,0.61111,0,0,0.525],"34":[0,0.61111,0,0,0.525],"35":[0,0.61111,0,0,0.525],"36":[0.08333,0.69444,0,0,0.525],"37":[0.08333,0.69444,0,0,0.525],"38":[0,0.61111,0,0,0.525],"39":[0,0.61111,0,0,0.525],"40":[0.08333,0.69444,0,0,0.525],"41":[0.08333,0.69444,0,0,0.525],"42":[0,0.52083,0,0,0.525],"43":[-0.08056,0.53055,0,0,0.525],"44":[0.13889,0.125,0,0,0.525],"45":[-0.08056,0.53055,0,0,0.525],"46":[0,0.125,0,0,0.525],"47":[0.08333,0.69444,0,0,0.525],"48":[0,0.61111,0,0,0.525],"49":[0,0.61111,0,0,0.525],"50":[0,0.61111,0,0,0.525],"51":[0,0.61111,0,0,0.525],"52":[0,0.61111,0,0,0.525],"53":[0,0.61111,0,0,0.525],"54":[0,0.61111,0,0,0.525],"55":[0,0.61111,0,0,0.525],"56":[0,0.61111,0,0,0.525],"57":[0,0.61111,0,0,0.525],"58":[0,0.43056,0,0,0.525],"59":[0.13889,0.43056,0,0,0.525],"60":[-0.05556,0.55556,0,0,0.525],"61":[-0.19549,0.41562,0,0,0.525],"62":[-0.05556,0.55556,0,0,0.525],"63":[0,0.61111,0,0,0.525],"64":[0,0.61111,0,0,0.525],"65":[0,0.61111,0,0,0.525],"66":[0,0.61111,0,0,0.525],"67":[0,0.61111,0,0,0.525],"68":[0,0.61111,0,0,0.525],"69":[0,0.61111,0,0,0.525],"70":[0,0.61111,0,0,0.525],"71":[0,0.61111,0,0,0.525],"72":[0,0.61111,0,0,0.525],"73":[0,0.61111,0,0,0.525],"74":[0,0.61111,0,0,0.525],"75":[0,0.61111,0,0,0.525],"76":[0,0.61111,0,0,0.525],"77":[0,0.61111,0,0,0.525],"78":[0,0.61111,0,0,0.525],"79":[0,0.61111,0,0,0.525],"80":[0,0.61111,0,0,0.525],"81":[0.13889,0.61111,0,0,0.525],"82":[0,0.61111,0,0,0.525],"83":[0,0.61111,0,0,0.525],"84":[0,0.61111,0,0,0.525],"85":[0,0.61111,0,0,0.525],"86":[0,0.61111,0,0,0.525],"87":[0,0.61111,0,0,0.525],"88":[0,0.61111,0,0,0.525],"89":[0,0.61111,0,0,0.525],"90":[0,0.61111,0,0,0.525],"91":[0.08333,0.69444,0,0,0.525],"92":[0.08333,0.69444,0,0,0.525],"93":[0.08333,0.69444,0,0,0.525],"94":[0,0.61111,0,0,0.525],"95":[0.09514,0,0,0,0.525],"96":[0,0.61111,0,0,0.525],"97":[0,0.43056,0,0,0.525],"98":[0,0.61111,0,0,0.525],"99":[0,0.43056,0,0,0.525],"100":[0,0.61111,0,0,0.525],"101":[0,0.43056,0,0,0.525],"102":[0,0.61111,0,0,0.525],"103":[0.22222,0.43056,0,0,0.525],"104":[0,0.61111,0,0,0.525],"105":[0,0.61111,0,0,0.525],"106":[0.22222,0.61111,0,0,0.525],"107":[0,0.61111,0,0,0.525],"108":[0,0.61111,0,0,0.525],"109":[0,0.43056,0,0,0.525],"110":[0,0.43056,0,0,0.525],"111":[0,0.43056,0,0,0.525],"112":[0.22222,0.43056,0,0,0.525],"113":[0.22222,0.43056,0,0,0.525],"114":[0,0.43056,0,0,0.525],"115":[0,0.43056,0,0,0.525],"116":[0,0.55358,0,0,0.525],"117":[0,0.43056,0,0,0.525],"118":[0,0.43056,0,0,0.525],"119":[0,0.43056,0,0,0.525],"120":[0,0.43056,0,0,0.525],"121":[0.22222,0.43056,0,0,0.525],"122":[0,0.43056,0,0,0.525],"123":[0.08333,0.69444,0,0,0.525],"124":[0.08333,0.69444,0,0,0.525],"125":[0.08333,0.69444,0,0,0.525],"126":[0,0.61111,0,0,0.525],"127":[0,0.61111,0,0,0.525],"160":[0,0,0,0,0.525],"176":[0,0.61111,0,0,0.525],"184":[0.19445,0,0,0,0.525],"305":[0,0.43056,0,0,0.525],"567":[0.22222,0.43056,0,0,0.525],"711":[0,0.56597,0,0,0.525],"713":[0,0.56555,0,0,0.525],"714":[0,0.61111,0,0,0.525],"715":[0,0.61111,0,0,0.525],"728":[0,0.61111,0,0,0.525],"730":[0,0.61111,0,0,0.525],"770":[0,0.61111,0,0,0.525],"771":[0,0.61111,0,0,0.525],"776":[0,0.61111,0,0,0.525],"915":[0,0.61111,0,0,0.525],"916":[0,0.61111,0,0,0.525],"920":[0,0.61111,0,0,0.525],"923":[0,0.61111,0,0,0.525],"926":[0,0.61111,0,0,0.525],"928":[0,0.61111,0,0,0.525],"931":[0,0.61111,0,0,0.525],"933":[0,0.61111,0,0,0.525],"934":[0,0.61111,0,0,0.525],"936":[0,0.61111,0,0,0.525],"937":[0,0.61111,0,0,0.525],"8216":[0,0.61111,0,0,0.525],"8217":[0,0.61111,0,0,0.525],"8242":[0,0.61111,0,0,0.525],"9251":[0.11111,0.21944,0,0,0.525]}};var fl={slant:[0.25,0.25,0.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[0.431,0.431,0.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[0.677,0.732,0.925],num2:[0.394,0.384,0.387],num3:[0.444,0.471,0.504],denom1:[0.686,0.752,1.025],denom2:[0.345,0.344,0.532],sup1:[0.413,0.503,0.504],sup2:[0.363,0.431,0.404],sup3:[0.289,0.286,0.294],sub1:[0.15,0.143,0.2],sub2:[0.247,0.286,0.4],supDrop:[0.386,0.353,0.494],subDrop:[0.05,0.071,0.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[0.25,0.25,0.25],defaultRuleThickness:[0.04,0.049,0.049],bigOpSpacing1:[0.111,0.111,0.111],bigOpSpacing2:[0.166,0.166,0.166],bigOpSpacing3:[0.2,0.2,0.2],bigOpSpacing4:[0.6,0.611,0.611],bigOpSpacing5:[0.1,0.143,0.143],sqrtRuleThickness:[0.04,0.04,0.04],ptPerEm:[10,10,10],doubleRuleSep:[0.2,0.2,0.2],arrayRuleWidth:[0.04,0.04,0.04],fboxsep:[0.3,0.3,0.3],fboxrule:[0.04,0.04,0.04]},rd={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function lb(e,t){Sn[e]=t}function Wl(e,t,n){if(!Sn[t])throw Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),s=Sn[t][r];if(!s&&e[0]in rd)r=rd[e[0]].charCodeAt(0),s=Sn[t][r];if(!s&&n==="text"){if(zd(r))s=Sn[t][77]}if(s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var hl={};function cb(e){var t;if(e>=5)t=0;else if(e>=3)t=1;else t=2;if(!hl[t]){var n=hl[t]={cssEmPerMu:fl.quad[t]/18};for(var r of Object.keys(fl))n[r]=fl[r][t]}return hl[t]}var Ye={math:{},text:{}};function f(e,t,n,r,s,i){if(Ye[e][s]={font:t,group:n,replace:r},i&&r)Ye[e][r]=Ye[e][s]}var m="math",X="text",y="main",M="ams",Xe="accent-token",pe="bin",Lt="close",Es="inner",Ae="mathord",dt="op-token",Jt="open",xi="punct",D="rel",Zn="spacing",B="textord";f(m,y,D,"≡","\\equiv",!0);f(m,y,D,"≺","\\prec",!0);f(m,y,D,"≻","\\succ",!0);f(m,y,D,"∼","\\sim",!0);f(m,y,D,"⊥","\\perp");f(m,y,D,"⪯","\\preceq",!0);f(m,y,D,"⪰","\\succeq",!0);f(m,y,D,"≃","\\simeq",!0);f(m,y,D,"∣","\\mid",!0);f(m,y,D,"≪","\\ll",!0);f(m,y,D,"≫","\\gg",!0);f(m,y,D,"≍","\\asymp",!0);f(m,y,D,"∥","\\parallel");f(m,y,D,"⋈","\\bowtie",!0);f(m,y,D,"⌣","\\smile",!0);f(m,y,D,"⊑","\\sqsubseteq",!0);f(m,y,D,"⊒","\\sqsupseteq",!0);f(m,y,D,"≐","\\doteq",!0);f(m,y,D,"⌢","\\frown",!0);f(m,y,D,"∋","\\ni",!0);f(m,y,D,"∝","\\propto",!0);f(m,y,D,"⊢","\\vdash",!0);f(m,y,D,"⊣","\\dashv",!0);f(m,y,D,"∋","\\owns");f(m,y,xi,".","\\ldotp");f(m,y,xi,"⋅","\\cdotp");f(m,y,xi,"⋅","·");f(X,y,B,"⋅","·");f(m,y,B,"#","\\#");f(X,y,B,"#","\\#");f(m,y,B,"&","\\&");f(X,y,B,"&","\\&");f(m,y,B,"ℵ","\\aleph",!0);f(m,y,B,"∀","\\forall",!0);f(m,y,B,"ℏ","\\hbar",!0);f(m,y,B,"∃","\\exists",!0);f(m,y,B,"∇","\\nabla",!0);f(m,y,B,"♭","\\flat",!0);f(m,y,B,"ℓ","\\ell",!0);f(m,y,B,"♮","\\natural",!0);f(m,y,B,"♣","\\clubsuit",!0);f(m,y,B,"℘","\\wp",!0);f(m,y,B,"♯","\\sharp",!0);f(m,y,B,"♢","\\diamondsuit",!0);f(m,y,B,"ℜ","\\Re",!0);f(m,y,B,"♡","\\heartsuit",!0);f(m,y,B,"ℑ","\\Im",!0);f(m,y,B,"♠","\\spadesuit",!0);f(m,y,B,"§","\\S",!0);f(X,y,B,"§","\\S");f(m,y,B,"¶","\\P",!0);f(X,y,B,"¶","\\P");f(m,y,B,"†","\\dag");f(X,y,B,"†","\\dag");f(X,y,B,"†","\\textdagger");f(m,y,B,"‡","\\ddag");f(X,y,B,"‡","\\ddag");f(X,y,B,"‡","\\textdaggerdbl");f(m,y,Lt,"⎱","\\rmoustache",!0);f(m,y,Jt,"⎰","\\lmoustache",!0);f(m,y,Lt,"⟯","\\rgroup",!0);f(m,y,Jt,"⟮","\\lgroup",!0);f(m,y,pe,"∓","\\mp",!0);f(m,y,pe,"⊖","\\ominus",!0);f(m,y,pe,"⊎","\\uplus",!0);f(m,y,pe,"⊓","\\sqcap",!0);f(m,y,pe,"∗","\\ast");f(m,y,pe,"⊔","\\sqcup",!0);f(m,y,pe,"◯","\\bigcirc",!0);f(m,y,pe,"∙","\\bullet",!0);f(m,y,pe,"‡","\\ddagger");f(m,y,pe,"≀","\\wr",!0);f(m,y,pe,"⨿","\\amalg");f(m,y,pe,"&","\\And");f(m,y,D,"⟵","\\longleftarrow",!0);f(m,y,D,"⇐","\\Leftarrow",!0);f(m,y,D,"⟸","\\Longleftarrow",!0);f(m,y,D,"⟶","\\longrightarrow",!0);f(m,y,D,"⇒","\\Rightarrow",!0);f(m,y,D,"⟹","\\Longrightarrow",!0);f(m,y,D,"↔","\\leftrightarrow",!0);f(m,y,D,"⟷","\\longleftrightarrow",!0);f(m,y,D,"⇔","\\Leftrightarrow",!0);f(m,y,D,"⟺","\\Longleftrightarrow",!0);f(m,y,D,"↦","\\mapsto",!0);f(m,y,D,"⟼","\\longmapsto",!0);f(m,y,D,"↗","\\nearrow",!0);f(m,y,D,"↩","\\hookleftarrow",!0);f(m,y,D,"↪","\\hookrightarrow",!0);f(m,y,D,"↘","\\searrow",!0);f(m,y,D,"↼","\\leftharpoonup",!0);f(m,y,D,"⇀","\\rightharpoonup",!0);f(m,y,D,"↙","\\swarrow",!0);f(m,y,D,"↽","\\leftharpoondown",!0);f(m,y,D,"⇁","\\rightharpoondown",!0);f(m,y,D,"↖","\\nwarrow",!0);f(m,y,D,"⇌","\\rightleftharpoons",!0);f(m,M,D,"≮","\\nless",!0);f(m,M,D,"","\\@nleqslant");f(m,M,D,"","\\@nleqq");f(m,M,D,"⪇","\\lneq",!0);f(m,M,D,"≨","\\lneqq",!0);f(m,M,D,"","\\@lvertneqq");f(m,M,D,"⋦","\\lnsim",!0);f(m,M,D,"⪉","\\lnapprox",!0);f(m,M,D,"⊀","\\nprec",!0);f(m,M,D,"⋠","\\npreceq",!0);f(m,M,D,"⋨","\\precnsim",!0);f(m,M,D,"⪹","\\precnapprox",!0);f(m,M,D,"≁","\\nsim",!0);f(m,M,D,"","\\@nshortmid");f(m,M,D,"∤","\\nmid",!0);f(m,M,D,"⊬","\\nvdash",!0);f(m,M,D,"⊭","\\nvDash",!0);f(m,M,D,"⋪","\\ntriangleleft");f(m,M,D,"⋬","\\ntrianglelefteq",!0);f(m,M,D,"⊊","\\subsetneq",!0);f(m,M,D,"","\\@varsubsetneq");f(m,M,D,"⫋","\\subsetneqq",!0);f(m,M,D,"","\\@varsubsetneqq");f(m,M,D,"≯","\\ngtr",!0);f(m,M,D,"","\\@ngeqslant");f(m,M,D,"","\\@ngeqq");f(m,M,D,"⪈","\\gneq",!0);f(m,M,D,"≩","\\gneqq",!0);f(m,M,D,"","\\@gvertneqq");f(m,M,D,"⋧","\\gnsim",!0);f(m,M,D,"⪊","\\gnapprox",!0);f(m,M,D,"⊁","\\nsucc",!0);f(m,M,D,"⋡","\\nsucceq",!0);f(m,M,D,"⋩","\\succnsim",!0);f(m,M,D,"⪺","\\succnapprox",!0);f(m,M,D,"≆","\\ncong",!0);f(m,M,D,"","\\@nshortparallel");f(m,M,D,"∦","\\nparallel",!0);f(m,M,D,"⊯","\\nVDash",!0);f(m,M,D,"⋫","\\ntriangleright");f(m,M,D,"⋭","\\ntrianglerighteq",!0);f(m,M,D,"","\\@nsupseteqq");f(m,M,D,"⊋","\\supsetneq",!0);f(m,M,D,"","\\@varsupsetneq");f(m,M,D,"⫌","\\supsetneqq",!0);f(m,M,D,"","\\@varsupsetneqq");f(m,M,D,"⊮","\\nVdash",!0);f(m,M,D,"⪵","\\precneqq",!0);f(m,M,D,"⪶","\\succneqq",!0);f(m,M,D,"","\\@nsubseteqq");f(m,M,pe,"⊴","\\unlhd");f(m,M,pe,"⊵","\\unrhd");f(m,M,D,"↚","\\nleftarrow",!0);f(m,M,D,"↛","\\nrightarrow",!0);f(m,M,D,"⇍","\\nLeftarrow",!0);f(m,M,D,"⇏","\\nRightarrow",!0);f(m,M,D,"↮","\\nleftrightarrow",!0);f(m,M,D,"⇎","\\nLeftrightarrow",!0);f(m,M,D,"△","\\vartriangle");f(m,M,B,"ℏ","\\hslash");f(m,M,B,"▽","\\triangledown");f(m,M,B,"◊","\\lozenge");f(m,M,B,"Ⓢ","\\circledS");f(m,M,B,"®","\\circledR");f(X,M,B,"®","\\circledR");f(m,M,B,"∡","\\measuredangle",!0);f(m,M,B,"∄","\\nexists");f(m,M,B,"℧","\\mho");f(m,M,B,"Ⅎ","\\Finv",!0);f(m,M,B,"⅁","\\Game",!0);f(m,M,B,"‵","\\backprime");f(m,M,B,"▲","\\blacktriangle");f(m,M,B,"▼","\\blacktriangledown");f(m,M,B,"■","\\blacksquare");f(m,M,B,"⧫","\\blacklozenge");f(m,M,B,"★","\\bigstar");f(m,M,B,"∢","\\sphericalangle",!0);f(m,M,B,"∁","\\complement",!0);f(m,M,B,"ð","\\eth",!0);f(X,y,B,"ð","ð");f(m,M,B,"╱","\\diagup");f(m,M,B,"╲","\\diagdown");f(m,M,B,"□","\\square");f(m,M,B,"□","\\Box");f(m,M,B,"◊","\\Diamond");f(m,M,B,"¥","\\yen",!0);f(X,M,B,"¥","\\yen",!0);f(m,M,B,"✓","\\checkmark",!0);f(X,M,B,"✓","\\checkmark");f(m,M,B,"ℶ","\\beth",!0);f(m,M,B,"ℸ","\\daleth",!0);f(m,M,B,"ℷ","\\gimel",!0);f(m,M,B,"ϝ","\\digamma",!0);f(m,M,B,"ϰ","\\varkappa");f(m,M,Jt,"┌","\\@ulcorner",!0);f(m,M,Lt,"┐","\\@urcorner",!0);f(m,M,Jt,"└","\\@llcorner",!0);f(m,M,Lt,"┘","\\@lrcorner",!0);f(m,M,D,"≦","\\leqq",!0);f(m,M,D,"⩽","\\leqslant",!0);f(m,M,D,"⪕","\\eqslantless",!0);f(m,M,D,"≲","\\lesssim",!0);f(m,M,D,"⪅","\\lessapprox",!0);f(m,M,D,"≊","\\approxeq",!0);f(m,M,pe,"⋖","\\lessdot");f(m,M,D,"⋘","\\lll",!0);f(m,M,D,"≶","\\lessgtr",!0);f(m,M,D,"⋚","\\lesseqgtr",!0);f(m,M,D,"⪋","\\lesseqqgtr",!0);f(m,M,D,"≑","\\doteqdot");f(m,M,D,"≓","\\risingdotseq",!0);f(m,M,D,"≒","\\fallingdotseq",!0);f(m,M,D,"∽","\\backsim",!0);f(m,M,D,"⋍","\\backsimeq",!0);f(m,M,D,"⫅","\\subseteqq",!0);f(m,M,D,"⋐","\\Subset",!0);f(m,M,D,"⊏","\\sqsubset",!0);f(m,M,D,"≼","\\preccurlyeq",!0);f(m,M,D,"⋞","\\curlyeqprec",!0);f(m,M,D,"≾","\\precsim",!0);f(m,M,D,"⪷","\\precapprox",!0);f(m,M,D,"⊲","\\vartriangleleft");f(m,M,D,"⊴","\\trianglelefteq");f(m,M,D,"⊨","\\vDash",!0);f(m,M,D,"⊪","\\Vvdash",!0);f(m,M,D,"⌣","\\smallsmile");f(m,M,D,"⌢","\\smallfrown");f(m,M,D,"≏","\\bumpeq",!0);f(m,M,D,"≎","\\Bumpeq",!0);f(m,M,D,"≧","\\geqq",!0);f(m,M,D,"⩾","\\geqslant",!0);f(m,M,D,"⪖","\\eqslantgtr",!0);f(m,M,D,"≳","\\gtrsim",!0);f(m,M,D,"⪆","\\gtrapprox",!0);f(m,M,pe,"⋗","\\gtrdot");f(m,M,D,"⋙","\\ggg",!0);f(m,M,D,"≷","\\gtrless",!0);f(m,M,D,"⋛","\\gtreqless",!0);f(m,M,D,"⪌","\\gtreqqless",!0);f(m,M,D,"≖","\\eqcirc",!0);f(m,M,D,"≗","\\circeq",!0);f(m,M,D,"≜","\\triangleq",!0);f(m,M,D,"∼","\\thicksim");f(m,M,D,"≈","\\thickapprox");f(m,M,D,"⫆","\\supseteqq",!0);f(m,M,D,"⋑","\\Supset",!0);f(m,M,D,"⊐","\\sqsupset",!0);f(m,M,D,"≽","\\succcurlyeq",!0);f(m,M,D,"⋟","\\curlyeqsucc",!0);f(m,M,D,"≿","\\succsim",!0);f(m,M,D,"⪸","\\succapprox",!0);f(m,M,D,"⊳","\\vartriangleright");f(m,M,D,"⊵","\\trianglerighteq");f(m,M,D,"⊩","\\Vdash",!0);f(m,M,D,"∣","\\shortmid");f(m,M,D,"∥","\\shortparallel");f(m,M,D,"≬","\\between",!0);f(m,M,D,"⋔","\\pitchfork",!0);f(m,M,D,"∝","\\varpropto");f(m,M,D,"◀","\\blacktriangleleft");f(m,M,D,"∴","\\therefore",!0);f(m,M,D,"∍","\\backepsilon");f(m,M,D,"▶","\\blacktriangleright");f(m,M,D,"∵","\\because",!0);f(m,M,D,"⋘","\\llless");f(m,M,D,"⋙","\\gggtr");f(m,M,pe,"⊲","\\lhd");f(m,M,pe,"⊳","\\rhd");f(m,M,D,"≂","\\eqsim",!0);f(m,y,D,"⋈","\\Join");f(m,M,D,"≑","\\Doteq",!0);f(m,M,pe,"∔","\\dotplus",!0);f(m,M,pe,"∖","\\smallsetminus");f(m,M,pe,"⋒","\\Cap",!0);f(m,M,pe,"⋓","\\Cup",!0);f(m,M,pe,"⩞","\\doublebarwedge",!0);f(m,M,pe,"⊟","\\boxminus",!0);f(m,M,pe,"⊞","\\boxplus",!0);f(m,M,pe,"⋇","\\divideontimes",!0);f(m,M,pe,"⋉","\\ltimes",!0);f(m,M,pe,"⋊","\\rtimes",!0);f(m,M,pe,"⋋","\\leftthreetimes",!0);f(m,M,pe,"⋌","\\rightthreetimes",!0);f(m,M,pe,"⋏","\\curlywedge",!0);f(m,M,pe,"⋎","\\curlyvee",!0);f(m,M,pe,"⊝","\\circleddash",!0);f(m,M,pe,"⊛","\\circledast",!0);f(m,M,pe,"⋅","\\centerdot");f(m,M,pe,"⊺","\\intercal",!0);f(m,M,pe,"⋒","\\doublecap");f(m,M,pe,"⋓","\\doublecup");f(m,M,pe,"⊠","\\boxtimes",!0);f(m,M,D,"⇢","\\dashrightarrow",!0);f(m,M,D,"⇠","\\dashleftarrow",!0);f(m,M,D,"⇇","\\leftleftarrows",!0);f(m,M,D,"⇆","\\leftrightarrows",!0);f(m,M,D,"⇚","\\Lleftarrow",!0);f(m,M,D,"↞","\\twoheadleftarrow",!0);f(m,M,D,"↢","\\leftarrowtail",!0);f(m,M,D,"↫","\\looparrowleft",!0);f(m,M,D,"⇋","\\leftrightharpoons",!0);f(m,M,D,"↶","\\curvearrowleft",!0);f(m,M,D,"↺","\\circlearrowleft",!0);f(m,M,D,"↰","\\Lsh",!0);f(m,M,D,"⇈","\\upuparrows",!0);f(m,M,D,"↿","\\upharpoonleft",!0);f(m,M,D,"⇃","\\downharpoonleft",!0);f(m,y,D,"⊶","\\origof",!0);f(m,y,D,"⊷","\\imageof",!0);f(m,M,D,"⊸","\\multimap",!0);f(m,M,D,"↭","\\leftrightsquigarrow",!0);f(m,M,D,"⇉","\\rightrightarrows",!0);f(m,M,D,"⇄","\\rightleftarrows",!0);f(m,M,D,"↠","\\twoheadrightarrow",!0);f(m,M,D,"↣","\\rightarrowtail",!0);f(m,M,D,"↬","\\looparrowright",!0);f(m,M,D,"↷","\\curvearrowright",!0);f(m,M,D,"↻","\\circlearrowright",!0);f(m,M,D,"↱","\\Rsh",!0);f(m,M,D,"⇊","\\downdownarrows",!0);f(m,M,D,"↾","\\upharpoonright",!0);f(m,M,D,"⇂","\\downharpoonright",!0);f(m,M,D,"⇝","\\rightsquigarrow",!0);f(m,M,D,"⇝","\\leadsto");f(m,M,D,"⇛","\\Rrightarrow",!0);f(m,M,D,"↾","\\restriction");f(m,y,B,"‘","`");f(m,y,B,"$","\\$");f(X,y,B,"$","\\$");f(X,y,B,"$","\\textdollar");f(m,y,B,"%","\\%");f(X,y,B,"%","\\%");f(m,y,B,"_","\\_");f(X,y,B,"_","\\_");f(X,y,B,"_","\\textunderscore");f(m,y,B,"∠","\\angle",!0);f(m,y,B,"∞","\\infty",!0);f(m,y,B,"′","\\prime");f(m,y,B,"△","\\triangle");f(m,y,B,"Γ","\\Gamma",!0);f(m,y,B,"Δ","\\Delta",!0);f(m,y,B,"Θ","\\Theta",!0);f(m,y,B,"Λ","\\Lambda",!0);f(m,y,B,"Ξ","\\Xi",!0);f(m,y,B,"Π","\\Pi",!0);f(m,y,B,"Σ","\\Sigma",!0);f(m,y,B,"Υ","\\Upsilon",!0);f(m,y,B,"Φ","\\Phi",!0);f(m,y,B,"Ψ","\\Psi",!0);f(m,y,B,"Ω","\\Omega",!0);f(m,y,B,"A","Α");f(m,y,B,"B","Β");f(m,y,B,"E","Ε");f(m,y,B,"Z","Ζ");f(m,y,B,"H","Η");f(m,y,B,"I","Ι");f(m,y,B,"K","Κ");f(m,y,B,"M","Μ");f(m,y,B,"N","Ν");f(m,y,B,"O","Ο");f(m,y,B,"P","Ρ");f(m,y,B,"T","Τ");f(m,y,B,"X","Χ");f(m,y,B,"¬","\\neg",!0);f(m,y,B,"¬","\\lnot");f(m,y,B,"⊤","\\top");f(m,y,B,"⊥","\\bot");f(m,y,B,"∅","\\emptyset");f(m,M,B,"∅","\\varnothing");f(m,y,Ae,"α","\\alpha",!0);f(m,y,Ae,"β","\\beta",!0);f(m,y,Ae,"γ","\\gamma",!0);f(m,y,Ae,"δ","\\delta",!0);f(m,y,Ae,"ϵ","\\epsilon",!0);f(m,y,Ae,"ζ","\\zeta",!0);f(m,y,Ae,"η","\\eta",!0);f(m,y,Ae,"θ","\\theta",!0);f(m,y,Ae,"ι","\\iota",!0);f(m,y,Ae,"κ","\\kappa",!0);f(m,y,Ae,"λ","\\lambda",!0);f(m,y,Ae,"μ","\\mu",!0);f(m,y,Ae,"ν","\\nu",!0);f(m,y,Ae,"ξ","\\xi",!0);f(m,y,Ae,"ο","\\omicron",!0);f(m,y,Ae,"π","\\pi",!0);f(m,y,Ae,"ρ","\\rho",!0);f(m,y,Ae,"σ","\\sigma",!0);f(m,y,Ae,"τ","\\tau",!0);f(m,y,Ae,"υ","\\upsilon",!0);f(m,y,Ae,"ϕ","\\phi",!0);f(m,y,Ae,"χ","\\chi",!0);f(m,y,Ae,"ψ","\\psi",!0);f(m,y,Ae,"ω","\\omega",!0);f(m,y,Ae,"ε","\\varepsilon",!0);f(m,y,Ae,"ϑ","\\vartheta",!0);f(m,y,Ae,"ϖ","\\varpi",!0);f(m,y,Ae,"ϱ","\\varrho",!0);f(m,y,Ae,"ς","\\varsigma",!0);f(m,y,Ae,"φ","\\varphi",!0);f(m,y,pe,"∗","*",!0);f(m,y,pe,"+","+");f(m,y,pe,"−","-",!0);f(m,y,pe,"⋅","\\cdot",!0);f(m,y,pe,"∘","\\circ",!0);f(m,y,pe,"÷","\\div",!0);f(m,y,pe,"±","\\pm",!0);f(m,y,pe,"×","\\times",!0);f(m,y,pe,"∩","\\cap",!0);f(m,y,pe,"∪","\\cup",!0);f(m,y,pe,"∖","\\setminus",!0);f(m,y,pe,"∧","\\land");f(m,y,pe,"∨","\\lor");f(m,y,pe,"∧","\\wedge",!0);f(m,y,pe,"∨","\\vee",!0);f(m,y,B,"√","\\surd");f(m,y,Jt,"⟨","\\langle",!0);f(m,y,Jt,"∣","\\lvert");f(m,y,Jt,"∥","\\lVert");f(m,y,Lt,"?","?");f(m,y,Lt,"!","!");f(m,y,Lt,"⟩","\\rangle",!0);f(m,y,Lt,"∣","\\rvert");f(m,y,Lt,"∥","\\rVert");f(m,y,D,"=","=");f(m,y,D,":",":");f(m,y,D,"≈","\\approx",!0);f(m,y,D,"≅","\\cong",!0);f(m,y,D,"≥","\\ge");f(m,y,D,"≥","\\geq",!0);f(m,y,D,"←","\\gets");f(m,y,D,">","\\gt",!0);f(m,y,D,"∈","\\in",!0);f(m,y,D,"","\\@not");f(m,y,D,"⊂","\\subset",!0);f(m,y,D,"⊃","\\supset",!0);f(m,y,D,"⊆","\\subseteq",!0);f(m,y,D,"⊇","\\supseteq",!0);f(m,M,D,"⊈","\\nsubseteq",!0);f(m,M,D,"⊉","\\nsupseteq",!0);f(m,y,D,"⊨","\\models");f(m,y,D,"←","\\leftarrow",!0);f(m,y,D,"≤","\\le");f(m,y,D,"≤","\\leq",!0);f(m,y,D,"<","\\lt",!0);f(m,y,D,"→","\\rightarrow",!0);f(m,y,D,"→","\\to");f(m,M,D,"≱","\\ngeq",!0);f(m,M,D,"≰","\\nleq",!0);f(m,y,Zn," ","\\ ");f(m,y,Zn," ","\\space");f(m,y,Zn," ","\\nobreakspace");f(X,y,Zn," ","\\ ");f(X,y,Zn," "," ");f(X,y,Zn," ","\\space");f(X,y,Zn," ","\\nobreakspace");f(m,y,Zn,"","\\nobreak");f(m,y,Zn,"","\\allowbreak");f(m,y,xi,",",",");f(m,y,xi,";",";");f(m,M,pe,"⊼","\\barwedge",!0);f(m,M,pe,"⊻","\\veebar",!0);f(m,y,pe,"⊙","\\odot",!0);f(m,y,pe,"⊕","\\oplus",!0);f(m,y,pe,"⊗","\\otimes",!0);f(m,y,B,"∂","\\partial",!0);f(m,y,pe,"⊘","\\oslash",!0);f(m,M,pe,"⊚","\\circledcirc",!0);f(m,M,pe,"⊡","\\boxdot",!0);f(m,y,pe,"△","\\bigtriangleup");f(m,y,pe,"▽","\\bigtriangledown");f(m,y,pe,"†","\\dagger");f(m,y,pe,"⋄","\\diamond");f(m,y,pe,"⋆","\\star");f(m,y,pe,"◃","\\triangleleft");f(m,y,pe,"▹","\\triangleright");f(m,y,Jt,"{","\\{");f(X,y,B,"{","\\{");f(X,y,B,"{","\\textbraceleft");f(m,y,Lt,"}","\\}");f(X,y,B,"}","\\}");f(X,y,B,"}","\\textbraceright");f(m,y,Jt,"{","\\lbrace");f(m,y,Lt,"}","\\rbrace");f(m,y,Jt,"[","\\lbrack",!0);f(X,y,B,"[","\\lbrack",!0);f(m,y,Lt,"]","\\rbrack",!0);f(X,y,B,"]","\\rbrack",!0);f(m,y,Jt,"(","\\lparen",!0);f(m,y,Lt,")","\\rparen",!0);f(X,y,B,"<","\\textless",!0);f(X,y,B,">","\\textgreater",!0);f(m,y,Jt,"⌊","\\lfloor",!0);f(m,y,Lt,"⌋","\\rfloor",!0);f(m,y,Jt,"⌈","\\lceil",!0);f(m,y,Lt,"⌉","\\rceil",!0);f(m,y,B,"\\","\\backslash");f(m,y,B,"∣","|");f(m,y,B,"∣","\\vert");f(X,y,B,"|","\\textbar",!0);f(m,y,B,"∥","\\|");f(m,y,B,"∥","\\Vert");f(X,y,B,"∥","\\textbardbl");f(X,y,B,"~","\\textasciitilde");f(X,y,B,"\\","\\textbackslash");f(X,y,B,"^","\\textasciicircum");f(m,y,D,"↑","\\uparrow",!0);f(m,y,D,"⇑","\\Uparrow",!0);f(m,y,D,"↓","\\downarrow",!0);f(m,y,D,"⇓","\\Downarrow",!0);f(m,y,D,"↕","\\updownarrow",!0);f(m,y,D,"⇕","\\Updownarrow",!0);f(m,y,dt,"∐","\\coprod");f(m,y,dt,"⋁","\\bigvee");f(m,y,dt,"⋀","\\bigwedge");f(m,y,dt,"⨄","\\biguplus");f(m,y,dt,"⋂","\\bigcap");f(m,y,dt,"⋃","\\bigcup");f(m,y,dt,"∫","\\int");f(m,y,dt,"∫","\\intop");f(m,y,dt,"∬","\\iint");f(m,y,dt,"∭","\\iiint");f(m,y,dt,"∏","\\prod");f(m,y,dt,"∑","\\sum");f(m,y,dt,"⨂","\\bigotimes");f(m,y,dt,"⨁","\\bigoplus");f(m,y,dt,"⨀","\\bigodot");f(m,y,dt,"∮","\\oint");f(m,y,dt,"∯","\\oiint");f(m,y,dt,"∰","\\oiiint");f(m,y,dt,"⨆","\\bigsqcup");f(m,y,dt,"∫","\\smallint");f(X,y,Es,"…","\\textellipsis");f(m,y,Es,"…","\\mathellipsis");f(X,y,Es,"…","\\ldots",!0);f(m,y,Es,"…","\\ldots",!0);f(m,y,Es,"⋯","\\@cdots",!0);f(m,y,Es,"⋱","\\ddots",!0);f(m,y,B,"⋮","\\varvdots");f(X,y,B,"⋮","\\varvdots");f(m,y,Xe,"ˊ","\\acute");f(m,y,Xe,"ˋ","\\grave");f(m,y,Xe,"¨","\\ddot");f(m,y,Xe,"~","\\tilde");f(m,y,Xe,"ˉ","\\bar");f(m,y,Xe,"˘","\\breve");f(m,y,Xe,"ˇ","\\check");f(m,y,Xe,"^","\\hat");f(m,y,Xe,"⃗","\\vec");f(m,y,Xe,"˙","\\dot");f(m,y,Xe,"˚","\\mathring");f(m,y,Ae,"","\\@imath");f(m,y,Ae,"","\\@jmath");f(m,y,B,"ı","ı");f(m,y,B,"ȷ","ȷ");f(X,y,B,"ı","\\i",!0);f(X,y,B,"ȷ","\\j",!0);f(X,y,B,"ß","\\ss",!0);f(X,y,B,"æ","\\ae",!0);f(X,y,B,"œ","\\oe",!0);f(X,y,B,"ø","\\o",!0);f(X,y,B,"Æ","\\AE",!0);f(X,y,B,"Œ","\\OE",!0);f(X,y,B,"Ø","\\O",!0);f(X,y,Xe,"ˊ","\\'");f(X,y,Xe,"ˋ","\\`");f(X,y,Xe,"ˆ","\\^");f(X,y,Xe,"˜","\\~");f(X,y,Xe,"ˉ","\\=");f(X,y,Xe,"˘","\\u");f(X,y,Xe,"˙","\\.");f(X,y,Xe,"¸","\\c");f(X,y,Xe,"˚","\\r");f(X,y,Xe,"ˇ","\\v");f(X,y,Xe,"¨","\\\"");f(X,y,Xe,"˝","\\H");f(X,y,Xe,"◯","\\textcircled");var jd={"--":!0,"---":!0,"``":!0,"''":!0};f(X,y,B,"–","--",!0);f(X,y,B,"–","\\textendash");f(X,y,B,"—","---",!0);f(X,y,B,"—","\\textemdash");f(X,y,B,"‘","`",!0);f(X,y,B,"‘","\\textquoteleft");f(X,y,B,"’","'",!0);f(X,y,B,"’","\\textquoteright");f(X,y,B,"“","``",!0);f(X,y,B,"“","\\textquotedblleft");f(X,y,B,"”","''",!0);f(X,y,B,"”","\\textquotedblright");f(m,y,B,"°","\\degree",!0);f(X,y,B,"°","\\degree");f(X,y,B,"°","\\textdegree",!0);f(m,y,B,"£","\\pounds");f(m,y,B,"£","\\mathsterling",!0);f(X,y,B,"£","\\pounds");f(X,y,B,"£","\\textsterling",!0);f(m,M,B,"✠","\\maltese");f(X,M,B,"✠","\\maltese");var sd='0123456789/@."';for(ui=0;ui<sd.length;ui++)Mo=sd.charAt(ui),f(m,y,B,Mo,Mo);var Mo,ui,id='0123456789!@*()-=+";:?/.,';for(di=0;di<id.length;di++)Do=id.charAt(di),f(X,y,B,Do,Do);var Do,di,No="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(fi=0;fi<No.length;fi++)bs=No.charAt(fi),f(m,y,Ae,bs,bs),f(X,y,B,bs,bs);var bs,fi;f(m,M,B,"C","ℂ");f(X,M,B,"C","ℂ");f(m,M,B,"H","ℍ");f(X,M,B,"H","ℍ");f(m,M,B,"N","ℕ");f(X,M,B,"N","ℕ");f(m,M,B,"P","ℙ");f(X,M,B,"P","ℙ");f(m,M,B,"Q","ℚ");f(X,M,B,"Q","ℚ");f(m,M,B,"R","ℝ");f(X,M,B,"R","ℝ");f(m,M,B,"Z","ℤ");f(X,M,B,"Z","ℤ");f(m,y,Ae,"h","ℎ");f(X,y,Ae,"h","ℎ");var Te;for(xt=0;xt<No.length;xt++)if(Ze=No.charAt(xt),Te=String.fromCharCode(55349,56320+xt),f(m,y,Ae,Ze,Te),f(X,y,B,Ze,Te),Te=String.fromCharCode(55349,56372+xt),f(m,y,Ae,Ze,Te),f(X,y,B,Ze,Te),Te=String.fromCharCode(55349,56424+xt),f(m,y,Ae,Ze,Te),f(X,y,B,Ze,Te),Te=String.fromCharCode(55349,56580+xt),f(m,y,Ae,Ze,Te),f(X,y,B,Ze,Te),Te=String.fromCharCode(55349,56684+xt),f(m,y,Ae,Ze,Te),f(X,y,B,Ze,Te),Te=String.fromCharCode(55349,56736+xt),f(m,y,Ae,Ze,Te),f(X,y,B,Ze,Te),Te=String.fromCharCode(55349,56788+xt),f(m,y,Ae,Ze,Te),f(X,y,B,Ze,Te),Te=String.fromCharCode(55349,56840+xt),f(m,y,Ae,Ze,Te),f(X,y,B,Ze,Te),Te=String.fromCharCode(55349,56944+xt),f(m,y,Ae,Ze,Te),f(X,y,B,Ze,Te),xt<26)Te=String.fromCharCode(55349,56632+xt),f(m,y,Ae,Ze,Te),f(X,y,B,Ze,Te),Te=String.fromCharCode(55349,56476+xt),f(m,y,Ae,Ze,Te),f(X,y,B,Ze,Te);var Ze,xt;Te=String.fromCharCode(55349,56668);f(m,y,Ae,"k",Te);f(X,y,B,"k",Te);for(jn=0;jn<10;jn++)An=jn.toString(),Te=String.fromCharCode(55349,57294+jn),f(m,y,Ae,An,Te),f(X,y,B,An,Te),Te=String.fromCharCode(55349,57314+jn),f(m,y,Ae,An,Te),f(X,y,B,An,Te),Te=String.fromCharCode(55349,57324+jn),f(m,y,Ae,An,Te),f(X,y,B,An,Te),Te=String.fromCharCode(55349,57334+jn),f(m,y,Ae,An,Te),f(X,y,B,An,Te);var An,jn,Sl="ÐÞþ";for(hi=0;hi<Sl.length;hi++)vs=Sl.charAt(hi),f(m,y,Ae,vs,vs),f(X,y,B,vs,vs);var vs,hi,_l={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},od={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},ad={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},ub={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Fr={mathClass:"",textClass:"",font:""},ld={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},cd={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},ud={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},Tl={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},Rl={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},dd={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},Ml={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},fd=[_l,_l,od,od,ad,ad,ub,Fr,Fr,Fr,ld,ld,cd,cd,ud,ud,Tl,Tl,Rl,Rl,dd,dd,Fr,Fr,Ml,Ml],db=[_l,Fr,Tl,Rl,Ml],fb=(e)=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484){var s=Math.floor((r-119808)/26);return fd[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return db[i]}else if(r===120485||r===120486)return fd[0];else if(120486<r&&r<120782)return Fr;else throw new se("Unsupported character: "+e)};function qt(e){var{strict:t,errorCode:n,errorMsg:r,token:s,report:i}=e,o=t;if(typeof t==="function")if(i)o=t(n,r,s);else try{o=t(n,r,s)}catch(a){o="error"}switch(o){case!0:case"error":if(i)throw new se("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+n+"]"),s);else return!0;case!1:case"ignore":if(!i)return!1;break;case"warn":default:if(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+n+"]")),!i)return!1;break}}var Oo=function(t,n,r){if(Ye[r][t]){var s=Ye[r][t].replace;if(s)t=s}return{value:t,metrics:Wl(t,n,r)}},Mt=function(t,n,r,s,i){var o=Oo(t,n,r),a=o.metrics;t=o.value;var l;if(a){var u=a.italic;if(r==="text"||s&&s.font==="mathit")u=0;l=new Ht(t,a.height,a.depth,u,a.skew,a.width,i)}else qt({strict:s.strict,errorCode:"symbolNotInFont",errorMsg:"No character metrics for '"+t+"' in style '"+n+"' and mode '"+r+"'",report:!0}),l=new Ht(t,0,0,0,0,0,i);if(l.maxFontSize=s.sizeMultiplier,s.style.isTight())l.classes.push("mtight");var d=s.getColor();if(d)l.style.color=d;return l},jl=function(t,n,r,s){if(s===void 0)s=[];if(r.font==="boldsymbol"&&Oo(t,"Main-Bold",n).metrics)return Mt(t,"Main-Bold",n,r,s.concat(["mathbf"]));else if(t==="\\"||Ye[n][t].font==="main")return Mt(t,"Main-Regular",n,r,s);else return Mt(t,"AMS-Regular",n,r,s.concat(["amsrm"]))},hb=function(t,n,r){if(r!=="textord"&&Oo(t,"Math-BoldItalic",n).metrics)return{fontName:"Math-BoldItalic",fontClass:"boldsymbol"};else return{fontName:"Main-Bold",fontClass:"mathbf"}},$o=function(t,n){var r=t.type==="mathord"?"mathord":"textord",{mode:s,text:i}=t,o=["mord"],{font:a,fontFamily:l,fontWeight:u,fontShape:d}=n,h=s==="math"||s==="text"&&!!a,p=h?a:l,g="",b="";if(i.charCodeAt(0)===55349){var k=fb(i);g=k.font,b=k[s+"Class"]}if(g)return Mt(i,g,s,n,o.concat(b));else if(p){var w,A;if(p==="boldsymbol"){var _=hb(i,s,r);w=_.fontName,A=[_.fontClass]}else if(h)w=Dl[a].fontName,A=[a];else w=Eo(l,u,d),A=[l,u,d];if(Oo(i,w,s).metrics)return Mt(i,w,s,n,o.concat(A));else if(Object.prototype.hasOwnProperty.call(jd,i)&&w.slice(0,10)==="Typewriter"){var S=[];for(var E=0;E<i.length;E++)S.push(Mt(i[E],w,s,n,o.concat(A)));return Yn(S)}}if(r==="mathord")return Mt(i,"Math-Italic",s,n,o.concat(["mathnormal"]));else if(r==="textord"){var R=Ye[s][i]&&Ye[s][i].font;if(R==="ams"){var L=Eo("amsrm",u,d);return Mt(i,L,s,n,o.concat("amsrm",u,d))}else if(R==="main"||!R){var T=Eo("textrm",u,d);return Mt(i,T,s,n,o.concat(u,d))}else{var F=Eo(R,u,d);return Mt(i,F,s,n,o.concat(F,u,d))}}else throw Error("unexpected type: "+r+" in makeOrd")},mb=(e,t)=>{if(mr(e.classes)!==mr(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var s of Object.keys(t.style))if(e.style[s]!==t.style[s])return!1;return!0},Gd=(e)=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];if(n instanceof Ht&&r instanceof Ht&&mb(n,r))n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--}return e},Gl=function(t){var n=0,r=0,s=0;for(var i=0;i<t.children.length;i++){var o=t.children[i];if(o.height>n)n=o.height;if(o.depth>r)r=o.depth;if(o.maxFontSize>s)s=o.maxFontSize}t.height=n,t.depth=r,t.maxFontSize=s},ee=function(t,n,r,s){var i=new qr(t,n,r,s);return Gl(i),i},pr=(e,t,n,r)=>new qr(e,t,n,r),ws=function(t,n,r){var s=ee([t],[],n);return s.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),s.style.borderBottomWidth=le(s.height),s.maxFontSize=1,s},pb=function(t,n,r,s){var i=new wi(t,n,r,s);return Gl(i),i},Yn=function(t){var n=new zr(t);return Gl(n),n},xs=function(t,n){if(t instanceof zr)return ee([],[t],n);return t},gb=function(t){if(t.positionType==="individualShift"){var n=t.children,r=[n[0]],s=-n[0].shift-n[0].elem.depth,i=s;for(var o=1;o<n.length;o++){var a=-n[o].shift-i-n[o].elem.depth,l=a-(n[o-1].elem.height+n[o-1].elem.depth);i=i+a,r.push({type:"kern",size:l}),r.push(n[o])}return{children:r,depth:s}}var u;if(t.positionType==="top"){var d=t.positionData;for(var h=0;h<t.children.length;h++){var p=t.children[h];d-=p.type==="kern"?p.size:p.elem.height+p.elem.depth}u=d}else if(t.positionType==="bottom")u=-t.positionData;else{var g=t.children[0];if(g.type!=="elem")throw Error('First child must have type "elem".');if(t.positionType==="shift")u=-g.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")u=-g.elem.depth;else throw Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:u}},ze=function(t,n){var r=gb(t),{children:s,depth:i}=r,o=0;for(var a=0;a<s.length;a++){var l=s[a];if(l.type==="elem"){var u=l.elem;o=Math.max(o,u.maxFontSize,u.height)}}o+=2;var d=ee(["pstrut"],[]);d.style.height=le(o);var h=[],p=i,g=i,b=i;for(var k=0;k<s.length;k++){var w=s[k];if(w.type==="kern")b+=w.size;else{var A=w.elem,_=w.wrapperClasses||[],S=w.wrapperStyle||{},E=ee(_,[d,A],void 0,S);if(E.style.top=le(-o-b-A.depth),w.marginLeft)E.style.marginLeft=w.marginLeft;if(w.marginRight)E.style.marginRight=w.marginRight;h.push(E),b+=A.height+A.depth}p=Math.min(p,b),g=Math.max(g,b)}var R=ee(["vlist"],h);R.style.height=le(g);var L;if(p<0){var T=ee([],[]),F=ee(["vlist"],[T]);F.style.height=le(-p);var I=ee(["vlist-s"],[new Ht("")]);L=[ee(["vlist-r"],[R,I]),ee(["vlist-r"],[F])]}else L=[ee(["vlist-r"],[R])];var q=ee(["vlist-t"],L);if(L.length===2)q.classes.push("vlist-t2");return q.height=g,q.depth=-p,q},Kd=(e,t)=>{var n=ee(["mspace"],[],t),r=nt(e,t);return n.style.marginRight=le(r),n},Eo=(e,t,n)=>{var r,s;switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}if(t==="textbf"&&n==="textit")s="BoldItalic";else if(t==="textbf")s="Bold";else if(n==="textit")s="Italic";else s="Regular";return r+"-"+s},Dl={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Vd={vec:["vec",0.471,0.714],oiintSize1:["oiintSize1",0.957,0.499],oiintSize2:["oiintSize2",1.472,0.659],oiiintSize1:["oiiintSize1",1.304,0.499],oiiintSize2:["oiiintSize2",1.98,0.659]},Jd=function(t,n){var r=Vd[t],s=r[0],i=r[1],o=r[2],a=new Vn(s),l=new _n([a],{width:le(i),height:le(o),style:"width:"+le(i),viewBox:"0 0 "+1000*i+" "+1000*o,preserveAspectRatio:"xMinYMin"}),u=pr(["katex-overlay"],[l],n);return u.height=o,u.style.height=le(o),u.style.width=le(i),u},tt={number:3,unit:"mu"},$r={number:4,unit:"mu"},Un={number:5,unit:"mu"},bb={mord:{mop:tt,mbin:$r,mrel:Un,minner:tt},mop:{mord:tt,mop:tt,mrel:Un,minner:tt},mbin:{mord:$r,mop:$r,mopen:$r,minner:$r},mrel:{mord:Un,mop:Un,mopen:Un,minner:Un},mopen:{},mclose:{mop:tt,mbin:$r,mrel:Un,minner:tt},mpunct:{mord:tt,mop:tt,mrel:Un,mopen:tt,mclose:tt,mpunct:tt,minner:tt},minner:{mord:tt,mop:tt,mbin:$r,mrel:Un,mopen:tt,mpunct:tt,minner:tt}},vb={mord:{mop:tt},mop:{mord:tt,mop:tt},mbin:{},mrel:{},mopen:{},mclose:{mop:tt},mpunct:{},minner:{mop:tt}},Zd={},bi={},vi={};function he(e){var{type:t,names:n,htmlBuilder:r,mathmlBuilder:s}=e;for(var i=0;i<n.length;++i)Zd[n[i]]=e;if(t){if(r)bi[t]=r;if(s)vi[t]=s}}function Hr(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;if(n)bi[t]=n;if(r)vi[t]=r}var yi=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},ut=function(t){return t.type==="ordgroup"?t.body:[t]},yb=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),kb=new Set(["rightmost","mrel","mclose","mpunct"]),wb={display:Me.DISPLAY,text:Me.TEXT,script:Me.SCRIPT,scriptscript:Me.SCRIPTSCRIPT},xb={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},gt=function(t,n,r,s){if(s===void 0)s=[null,null];var i=[];for(var o=0;o<t.length;o++){var a=Fe(t[o],n);if(a instanceof zr){var l=a.children;i.push(...l)}else i.push(a)}if(Gd(i),!r)return i;var u=n;if(t.length===1){var d=t[0];if(d.type==="sizing")u=n.havingSize(d.size);else if(d.type==="styling")u=n.havingStyle(wb[d.style])}var h=ee([s[0]||"leftmost"],[],n),p=ee([s[1]||"rightmost"],[],n),g=r==="root";return Ll(i,(b,k)=>{var w=k.classes[0],A=b.classes[0];if(w==="mbin"&&kb.has(A))k.classes[0]="mord";else if(A==="mbin"&&yb.has(w))b.classes[0]="mord"},{node:h},p,g),Ll(i,(b,k)=>{var w,A,_=Nl(k),S=Nl(b),E=_&&S?b.hasClass("mtight")?(w=vb[_])==null?void 0:w[S]:(A=bb[_])==null?void 0:A[S]:null;if(E)return Kd(E,u)},{node:h},p,g),i},Ll=function(t,n,r,s,i){if(s)t.push(s);var o=0;for(;o<t.length;o++){var a=t[o],l=Yd(a);if(l){Ll(l.children,n,r,null,i);continue}var u=!a.hasClass("mspace");if(u){var d=n(a,r.node);if(d)if(r.insertAfter)r.insertAfter(d);else t.unshift(d),o++}if(u)r.node=a;else if(i&&a.hasClass("katex-newline"))r.node=ee(["leftmost"]);r.insertAfter=((h)=>(p)=>{t.splice(h+1,0,p),o++})(o)}if(s)t.pop()},Yd=function(t){if(t instanceof zr||t instanceof wi||t instanceof qr&&t.hasClass("enclosing"))return t;return null},Il=function(t,n){var r=Yd(t);if(r){var s=r.children;if(s.length){if(n==="right")return Il(s[s.length-1],"right");else if(n==="left")return Il(s[0],"left")}}return t},Nl=function(t,n){if(!t)return null;if(n)t=Il(t,n);var r=t.classes[0];return xb[r]||null},ki=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return ee(n.concat(r))},Fe=function(t,n,r){if(!t)return ee();if(bi[t.type]){var s=bi[t.type](t,n);if(r&&n.size!==r.size){s=ee(n.sizingClasses(r),[s],n);var i=n.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new se("Got group of unknown type: '"+t.type+"'")};function Ao(e,t){var n=ee(["katex-base"],e,t),r=ee(["katex-strut"]);if(r.style.height=le(n.height+n.depth),n.depth)r.style.verticalAlign=le(-n.depth);return n.children.unshift(r),n}function Bl(e,t){var n=null;if(e.length===1&&e[0].type==="tag")n=e[0].tag,e=e[0].body;var r=gt(e,t,"root"),s;if(r.length===2&&r[1].hasClass("katex-tag"))s=r.pop();var i=[],o=[];for(var a=0;a<r.length;a++)if(o.push(r[a]),r[a].hasClass("mbin")||r[a].hasClass("mrel")||r[a].hasClass("allowbreak")){var l=!1;while(a<r.length-1&&r[a+1].hasClass("mspace")&&!r[a+1].hasClass("katex-newline"))if(a++,o.push(r[a]),r[a].hasClass("nobreak"))l=!0;if(!l)i.push(Ao(o,t)),o=[]}else if(r[a].hasClass("katex-newline")){if(o.pop(),o.length>0)i.push(Ao(o,t)),o=[];i.push(r[a])}if(o.length>0)i.push(Ao(o,t));var u;if(n)u=Ao(gt(n,t,!0),t),u.classes=["katex-tag"],i.push(u);else if(s)i.push(s);var d=ee(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),u){var h=u.children[0];if(h.style.height=le(d.height+d.depth),d.depth)h.style.verticalAlign=le(-d.depth)}return d}function Xd(e){return new zr(e)}class ie{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e.setAttribute(n,r)}if(this.classes.length>0)e.className=mr(this.classes);for(var s=0;s<this.children.length;s++)if(this.children[s]instanceof lt&&this.children[s+1]instanceof lt){var i=this.children[s].toText()+this.children[++s].toText();while(this.children[s+1]instanceof lt)i+=this.children[++s].toText();e.appendChild(new lt(i).toNode())}else e.appendChild(this.children[s].toNode());return e}toMarkup(){var e="<"+this.type;for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e+=" "+n+'="',e+=Ct(r),e+='"'}if(this.classes.length>0)e+=' class ="'+Ct(mr(this.classes))+'"';e+=">";for(var s=0;s<this.children.length;s++)e+=this.children[s].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map((e)=>e.toText()).join("")}}class lt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Ct(this.toText())}toText(){return this.text}}class Kl{constructor(e){if(this.width=void 0,this.character=void 0,this.width=e,e>=0.05555&&e<=0.05556)this.character=" ";else if(e>=0.1666&&e<=0.1667)this.character=" ";else if(e>=0.2222&&e<=0.2223)this.character=" ";else if(e>=0.2777&&e<=0.2778)this.character=" ";else if(e>=-0.05556&&e<=-0.05555)this.character=" ";else if(e>=-0.1667&&e<=-0.1666)this.character=" ";else if(e>=-0.2223&&e<=-0.2222)this.character=" ";else if(e>=-0.2778&&e<=-0.2777)this.character=" ";else this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);else{var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",le(this.width)),e}}toMarkup(){if(this.character)return"<mtext>"+this.character+"</mtext>";else return'<mspace width="'+le(this.width)+'"/>'}toText(){if(this.character)return this.character;else return" "}}var Eb=new Set(["\\imath","\\jmath"]),Ab=new Set(["mrow","mtable"]),nn=function(t,n,r){var s,i;if(Ye[n][t]&&Ye[n][t].replace&&t.charCodeAt(0)!==55349&&!(Object.prototype.hasOwnProperty.call(jd,t)&&((r==null||(s=r.fontFamily)==null?void 0:s.slice(4,6))==="tt"||(r==null||(i=r.font)==null?void 0:i.slice(4,6))==="tt")))t=Ye[n][t].replace;return new lt(t)},Vl=function(t){if(t.length===1)return t[0];else return new ie("mrow",t)},Cb={mathit:"italic",boldsymbol:(e)=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},Jl=(e,t)=>{if(e.mode==="text"){if(t.fontFamily==="texttt")return"monospace";else if(t.fontFamily==="textsf")if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"sans-serif-bold-italic";else if(t.fontShape==="textit")return"sans-serif-italic";else if(t.fontWeight==="textbf")return"bold-sans-serif";else return"sans-serif";else if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";else if(t.fontShape==="textit")return"italic";else if(t.fontWeight==="textbf")return"bold"}var n=t.font;if(!n||n==="mathnormal")return null;var r=e.mode,s=Cb[n];if(s)return typeof s==="function"?s(e):s;var i=e.text;if(Eb.has(i))return null;if(Ye[r][i]){var o=Ye[r][i].replace;if(o)i=o}var a=Dl[n].fontName;if(Wl(i,a,r))return Dl[n].variant;return null};function ml(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof lt&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof lt&&n.text===","}else return!1}var Zt=function(t,n,r){if(t.length===1){var s=We(t[0],n);if(r&&s instanceof ie&&s.type==="mo")s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em");return[s]}var i=[],o;for(var a=0;a<t.length;a++){var l=We(t[a],n);if(l instanceof ie&&o instanceof ie){if(l.type==="mtext"&&o.type==="mtext"&&l.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...l.children);continue}else if(l.type==="mn"&&o.type==="mn"){o.children.push(...l.children);continue}else if(ml(l)&&o.type==="mn"){o.children.push(...l.children);continue}else if(l.type==="mn"&&ml(o))l.children=[...o.children,...l.children],i.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(o.type==="mn"||ml(o))){var u=l.children[0];if(u instanceof ie&&u.type==="mn")u.children=[...o.children,...u.children],i.pop()}else if(o.type==="mi"&&o.children.length===1){var d=o.children[0];if(d instanceof lt&&d.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var h=l.children[0];if(h instanceof lt&&h.text.length>0)h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),i.pop()}}}i.push(l),o=l}return i},gr=function(t,n,r){return Vl(Zt(t,n,r))},We=function(t,n){if(!t)return new ie("mrow");if(vi[t.type])return vi[t.type](t,n);else throw new se("Got group of unknown type: '"+t.type+"'")};function hd(e,t,n,r,s){var i=Zt(e,n),o;if(i.length===1&&i[0]instanceof ie&&Ab.has(i[0].type))o=i[0];else o=new ie("mrow",i);var a=new ie("annotation",[new lt(t)]);a.setAttribute("encoding","application/x-tex");var l=new ie("semantics",[o,a]),u=new ie("math",[l]);if(u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r)u.setAttribute("display","block");var d=s?"katex":"katex-mathml";return ee([d],[u])}var Sb=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],md=[0.5,0.6,0.7,0.8,0.9,1,1.2,1.44,1.728,2.074,2.488],pd=function(t,n){return n.size<2?t:Sb[t-1][n.size-1]};class Gn{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.strict=void 0,this.style=e.style,this.color=e.color,this.size=e.size||Gn.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=md[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this.strict=e.strict,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness,strict:this.strict};return Object.assign(t,e),new Gn(t)}havingStyle(e){if(this.style===e)return this;else return this.extend({style:e,size:pd(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){if(this.size===e&&this.textSize===e)return this;else return this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:md[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=pd(Gn.BASESIZE,e);if(this.size===t&&this.textSize===Gn.BASESIZE&&this.style===e)return this;else return this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){if(e.size!==this.size)return["katex-sizing","reset-size"+e.size,"size"+this.size];else return[]}baseSizingClasses(){if(this.size!==Gn.BASESIZE)return["katex-sizing","reset-size"+this.size,"size"+Gn.BASESIZE];else return[]}fontMetrics(){if(!this._fontMetrics)this._fontMetrics=cb(this.size);return this._fontMetrics}getColor(){if(this.phantom)return"transparent";else return this.color}}Gn.BASESIZE=6;var Qd=(e)=>new Gn({style:e.displayMode?Me.DISPLAY:Me.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness,strict:e.strict}),ef=function(t,n){if(n.displayMode){var r=["katex-display"];if(n.leqno)r.push("leqno");if(n.fleqn)r.push("fleqn");t=ee(r,[t])}return t},_b=function(t,n,r){var s=Qd(r),i;if(r.output==="mathml")return hd(t,n,s,r.displayMode,!0);else if(r.output==="html"){var o=Bl(t,s);i=ee(["katex"],[o])}else{var a=hd(t,n,s,r.displayMode,!1),l=Bl(t,s);i=ee(["katex"],[a,l])}return ef(i,r)},Tb=function(t,n){var r=Qd(n),s=Bl(t,r),i=ee(["katex"],[s]);return ef(i,n)},Rb={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Fo=function(t){var n=new ie("mo",[new lt(Rb[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},Mb={overrightarrow:[["rightarrow"],0.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],0.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],0.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],0.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],0.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],0.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],0.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],0.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],0.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],0.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],0.888,522,"xMaxYMin"],xlongequal:[["longequal"],0.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],0.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],0.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],0.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],0.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],0.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],0.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],0.888,342],undergroup:[["leftgroupunder","rightgroupunder"],0.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Db=new Set(["widehat","widecheck","widetilde","utilde"]),zo=function(t,n){function r(){var l=400000,u=t.label.slice(1);if(Db.has(u)&&"base"in t){var d=t.base.type==="ordgroup"?t.base.body.length:1,h,p,g;if(d>5)if(u==="widehat"||u==="widecheck")h=420,l=2364,g=0.42,p=u+"4";else h=312,l=2340,g=0.34,p="tilde4";else{var b=[1,1,2,2,3,3][d];if(u==="widehat"||u==="widecheck")l=[0,1062,2364,2364,2364][b],h=[0,239,300,360,420][b],g=[0,0.24,0.3,0.3,0.36,0.42][b],p=u+b;else l=[0,600,1033,2339,2340][b],h=[0,260,286,306,312][b],g=[0,0.26,0.286,0.3,0.306,0.34][b],p="tilde"+b}var k=new Vn(p),w=new _n([k],{width:"100%",height:le(g),viewBox:"0 0 "+l+" "+h,preserveAspectRatio:"none"});return{span:pr([],[w],n),minWidth:0,height:g}}else{var A=[],_=Mb[u];if(!_)throw Error('No SVG data for "'+u+'".');var S=_[0],E=_[1],R=_[2],L=R/1000,T=S.length,F,I;if(T===1){if(_.length!==4)throw Error('Expected 4-tuple for single-path SVG data "'+u+'".');F=["hide-tail"],I=[_[3]]}else if(T===2)F=["halfarrow-left","halfarrow-right"],I=["xMinYMin","xMaxYMin"];else if(T===3)F=["brace-left","brace-center","brace-right"],I=["xMinYMin","xMidYMin","xMaxYMin"];else throw Error(`Correct katexImagesData or update code here to support
|
|
279
|
+
`+T+" children.");for(var q=0;q<T;q++){var U=new Vn(S[q]),j=new _n([U],{width:"400em",height:le(L),viewBox:"0 0 "+l+" "+R,preserveAspectRatio:I[q]+" slice"}),J=pr([F[q]],[j],n);if(T===1)return{span:J,minWidth:E,height:L};else J.style.height=le(L),A.push(J)}return{span:ee(["katex-stretchy"],A,n),minWidth:E,height:L}}}var s=r(),{span:i,minWidth:o,height:a}=s;if(i.height=a,i.style.height=le(a),o>0)i.style.minWidth=le(o);return i},Lb=function(t,n,r,s,i){var o,a=t.height+t.depth+r+s;if(/fbox|color|angl/.test(n)){if(o=ee(["katex-stretchy",n],[],i),n==="fbox"){var l=i.color&&i.getColor();if(l)o.style.borderColor=l}}else{var u=[];if(/^[bx]cancel$/.test(n))u.push(new Io({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"}));if(/^x?cancel$/.test(n))u.push(new Io({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new _n(u,{width:"100%",height:le(a)});o=pr([],[d],i)}return o.height=a,o.style.height=le(a),o},Ib=["bin","close","inner","open","punct","rel"],Nb=["accent-token","mathord","op-token","spacing","textord"],Bb=new Set(Ib),Ob=new Set(Nb);function $b(e){return Bb.has(e)}function Ne(e,t){if(!e||e.type!==t)throw Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function qo(e){var t=Ho(e);if(!t)throw Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Ho(e){if(e.type==="atom"||Ob.has(e.type))return e;return null}function Zl(e,t,n){var r="";for(var s of e.body)if(s.type==="textord")r+=s.text;else if(n&&s.type==="spacing"&&s.text===" ")r+=" ";else throw new se(t,e);return r}var tf=(e)=>{if(e instanceof Ht)return e;if(ab(e)&&e.children.length===1)return tf(e.children[0])},nf=(e,t)=>{var n,r,s;if(e&&e.type==="supsub")r=Ne(e.base,"accent"),n=r.base,e.base=n,s=ob(Fe(e,t)),e.base=r;else r=Ne(e,"accent"),n=r.base;var i=Fe(n,t.havingCrampedStyle()),o=r.isShifty&&Jn(n),a=0;if(o){var l,u;a=(l=(u=tf(i))==null?void 0:u.skew)!=null?l:0}var d=r.label==="\\c",h=d?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight),p;if(!r.isStretchy){var g,b;if(r.label==="\\vec")g=Jd("vec",t),b=Vd.vec[1];else if(g=$o({type:"textord",mode:r.mode,text:r.label},t),g=ib(g),g.italic=0,b=g.width,d)h+=g.depth;p=ee(["accent-body"],[g]);var k=r.label==="\\textcircled";if(k)p.classes.push("accent-full"),h=i.height;var w=a;if(!k)w-=b/2;if(p.style.left=le(w),r.label==="\\textcircled")p.style.top=".2em";p=ze({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-h},{type:"elem",elem:p}]})}else p=zo(r,t),p=ze({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+le(2*a)+")",marginLeft:le(2*a)}:void 0}]});var A=ee(["mord","katex-accent"],[p],t);if(s)return s.children[0]=A,s.height=Math.max(A.height,s.height),s.classes[0]="mord",s;else return A};var Fb=(e,t)=>{var n=e.isStretchy?Fo(e.label):new ie("mo",[nn(e.label,e.mode)]),r=new ie("mover",[We(e.base,t),n]);return r.setAttribute("accent","true"),r},zb=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e)=>"\\"+e).join("|"));he({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],numArgs:1,handler:(e,t)=>{var n=yi(t[0]),r=!zb.test(e.funcName),s=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:s,base:n}},htmlBuilder:nf,mathmlBuilder:Fb});he({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.","\\\"","\\c","\\r","\\H","\\v","\\textcircled"],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"],handler:(e,t)=>{var n=t[0],r=e.parser.mode;if(r==="math")qt({strict:e.parser.settings.strict,errorCode:"mathVsTextAccents",errorMsg:"LaTeX's accent "+e.funcName+" works only in text mode",report:!0}),r="text";return{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}});he({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:s}},htmlBuilder:(e,t)=>{var n=Fe(e.base,t),r=zo(e,t),s=e.label==="\\utilde"?0.12:0,i=ze({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:n}]});return ee(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var n=Fo(e.label),r=new ie("munder",[We(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Co=(e)=>{var t=new ie("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};he({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),s=xs(Fe(e.body,r,t),t),i=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(i+"-arrow-pad");var o;if(e.below)r=t.havingStyle(n.sub()),o=xs(Fe(e.below,r,t),t),o.classes.push(i+"-arrow-pad");var a=zo(e,t),l=-t.fontMetrics().axisHeight+0.5*a.height,u=-t.fontMetrics().axisHeight-0.5*a.height-0.111;if(s.depth>0.25||e.label==="\\xleftequilibrium")u-=s.depth;var d;if(o){var h=-t.fontMetrics().axisHeight+o.height+0.5*a.height+0.111;d=ze({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:a,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:o,shift:h}]})}else d=ze({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:a,shift:l,wrapperClasses:["svg-align"]}]});return ee(["mrel","x-arrow"],[d],t)},mathmlBuilder(e,t){var n=Fo(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=Co(We(e.body,t));if(e.below){var i=Co(We(e.below,t));r=new ie("munderover",[n,i,s])}else r=new ie("mover",[n,s])}else if(e.below){var o=Co(We(e.below,t));r=new ie("munder",[n,o])}else r=Co(),r=new ie("mover",[n,r]);return r}});function qb(e,t){var n=gt(e.body,t,!0);return ee([e.mclass],n,t)}function Hb(e,t){var n,r=Zt(e.body,t);if(e.mclass==="minner")n=new ie("mpadded",r);else if(e.mclass==="mord")if(e.isCharacterBox)n=r[0],n.type="mi";else n=new ie("mi",r);else{if(e.isCharacterBox)n=r[0],n.type="mo";else n=new ie("mo",r);if(e.mclass==="mbin")n.attributes.lspace="0.22em",n.attributes.rspace="0.22em";else if(e.mclass==="mpunct")n.attributes.lspace="0em",n.attributes.rspace="0.17em";else if(e.mclass==="mopen"||e.mclass==="mclose")n.attributes.lspace="0em",n.attributes.rspace="0em"}return n}he({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],numArgs:1,primitive:!0,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:ut(s),isCharacterBox:Jn(s)}},htmlBuilder:qb,mathmlBuilder:Hb});var Po=(e)=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;if(t.type==="atom"&&(t.family==="bin"||t.family==="rel"))return"m"+t.family;else return"mord"};he({type:"mclass",names:["\\@binrel"],numArgs:2,handler(e,t){var n=e.parser;return{type:"mclass",mode:n.mode,mclass:Po(t[0]),body:ut(t[1]),isCharacterBox:Jn(t[1])}}});he({type:"mclass",names:["\\stackrel","\\overset","\\underset"],numArgs:2,handler(e,t){var{parser:n,funcName:r}=e,s=t[1],i=t[0],o;if(r!=="\\stackrel")o=Po(s);else o="mrel";var a={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:ut(s)},l=r==="\\underset"?{type:"supsub",mode:i.mode,base:a,sub:i}:{type:"supsub",mode:i.mode,base:a,sup:i};return{type:"mclass",mode:n.mode,mclass:o,body:[l],isCharacterBox:Jn(l)}}});he({type:"pmb",names:["\\pmb"],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser;return{type:"pmb",mode:n.mode,mclass:Po(t[0]),body:ut(t[0])}},htmlBuilder(e,t){var n=gt(e.body,t,!0),r=ee([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=Zt(e.body,t),r=new ie("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Pb={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},gd=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),bd=(e)=>e.type==="textord"&&e.text==="@",Ub=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function Wb(e,t,n){var r=Pb[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var s=n.callFunction("\\\\cdleft",[t[0]],[]),i={type:"atom",text:r,mode:"math",family:"rel"},o=n.callFunction("\\Big",[i],[]),a=n.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[s,o,a]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function jb(e){var t=[];e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();while(!0){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){if(t[t.length-1].length===0)t.pop();break}else throw new se("Expected \\\\ or \\cr or \\end",e.nextToken)}var r=[],s=[r];for(var i=0;i<t.length;i++){var o=t[i],a=gd();for(var l=0;l<o.length;l++)if(!bd(o[l]))a.body.push(o[l]);else{r.push(a),l+=1;var u=qo(o[l]).text,d=[,,];if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},"=|.".includes(u));else if("<>AV".includes(u))for(var h=0;h<2;h++){var p=!0;for(var g=l+1;g<o.length;g++){if(Ub(o[g],u)){p=!1,l=g;break}if(bd(o[g]))throw new se("Missing a "+u+" character to complete a CD arrow.",o[g]);d[h].body.push(o[g])}if(p)throw new se("Missing a "+u+" character to complete a CD arrow.",o[l])}else throw new se('Expected one of "<>AV=|." after @',o[l]);var b=Wb(u,d,e),k={type:"styling",body:[b],mode:"math",style:"display",resetFont:!0};r.push(k),a=gd()}if(i%2===0)r.push(a);else r.shift();r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var w=Array(s[0].length).fill({type:"align",align:"c",pregap:0.25,postgap:0.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:w,colSeparationType:"CD",hLinesBeforeRow:Array(s.length+1).fill([])}}he({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=xs(Fe(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=le(0.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new ie("mrow",[We(e.label,t)]);if(n=new ie("mpadded",[n]),n.setAttribute("width","0"),e.side==="left")n.setAttribute("lspace","-1width");return n.setAttribute("voffset","0.7em"),n=new ie("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});he({type:"cdlabelparent",names:["\\\\cdparent"],numArgs:1,handler(e,t){var n=e.parser;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=xs(Fe(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new ie("mrow",[We(e.fragment,t)])}});he({type:"textord",names:["\\@char"],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=Ne(t[0],"ordgroup"),s=Zl(r,"\\@char has non-numeric argument"),i=parseInt(s),o;if(isNaN(i))throw new se("\\@char has non-numeric argument "+s);else if(i<0||i>1114111)throw new se("\\@char with invalid code point "+s);else if(i<=65535)o=String.fromCharCode(i);else i-=65536,o=String.fromCharCode((i>>10)+55296,(i&1023)+56320);return{type:"textord",mode:n.mode,text:o}}});var Gb=(e,t)=>{var n=gt(e.body,t.withColor(e.color),!1);return Yn(n)},Kb=(e,t)=>{var n=Zt(e.body,t.withColor(e.color)),r=new ie("mstyle",n);return r.setAttribute("mathcolor",e.color),r};he({type:"color",names:["\\textcolor"],numArgs:2,allowedInText:!0,argTypes:["color","original"],handler(e,t){var n=e.parser,r=Ne(t[0],"color-token").color,s=t[1];return{type:"color",mode:n.mode,color:r,body:ut(s)}},htmlBuilder:Gb,mathmlBuilder:Kb});he({type:"color",names:["\\color"],numArgs:1,allowedInText:!0,argTypes:["color"],handler(e,t){var{parser:n,breakOnTokenText:r}=e,s=Ne(t[0],"color-token").color;n.gullet.macros.set("\\current@color",s);var i=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:s,body:i}}});he({type:"cr",names:["\\\\"],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=t.gullet.future().text==="["?t.parseSizeGroup(!0):null,r=!t.settings.displayMode||!qt({strict:t.settings.strict,errorCode:"newLineInDisplayMode",errorMsg:"In LaTeX, \\\\ or \\newline does nothing in display mode",report:!1});return{type:"cr",mode:t.mode,newLine:r,size:n&&Ne(n,"size").value}},htmlBuilder(e,t){var n=ee(["mspace"],[],t);if(e.newLine){if(n.classes.push("katex-newline"),e.size)n.style.marginTop=le(nt(e.size,t))}return n},mathmlBuilder(e,t){var n=new ie("mspace");if(e.newLine){if(n.setAttribute("linebreak","newline"),e.size)n.setAttribute("height",le(nt(e.size,t)))}return n}});var Ol={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},rf=(e)=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new se("Expected a control sequence",e);return t},Vb=(e)=>{var t=e.gullet.popToken();if(t.text==="="){if(t=e.gullet.popToken(),t.text===" ")t=e.gullet.popToken()}return t},sf=(e,t,n,r)=>{var s=e.gullet.macros.get(n.text);if(s==null)n.noexpand=!0,s={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)};e.gullet.macros.set(t,s,r)};he({type:"internal",names:["\\global","\\long","\\\\globallong"],numArgs:0,allowedInText:!0,handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Ol[r.text]){if(n==="\\global"||n==="\\\\globallong")r.text=Ol[r.text];return Ne(t.parseFunction(),"internal")}throw new se("Invalid token after macro prefix",r)}});he({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new se("Expected a control sequence",r);var i=0,o,a=[[]];while(t.gullet.future().text!=="{")if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){o=t.gullet.future(),a[i].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new se('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new se('Argument number "'+r.text+'" out of order');i++,a.push([])}else if(r.text==="EOF")throw new se("Expected a macro definition");else a[i].push(r.text);var l=t.gullet.consumeArg(),u=l.tokens;if(o)u.unshift(o);if(n==="\\edef"||n==="\\xdef")u=t.gullet.expandTokens(u),u.reverse();return t.gullet.macros.set(s,{tokens:u,numArgs:i,delimiters:a},n===Ol[n]),{type:"internal",mode:t.mode}}});he({type:"internal",names:["\\let","\\\\globallet"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=rf(t.gullet.popToken());t.gullet.consumeSpaces();var s=Vb(t);return sf(t,r,s,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});he({type:"internal",names:["\\futurelet","\\\\globalfuture"],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var{parser:t,funcName:n}=e,r=rf(t.gullet.popToken()),s=t.gullet.popToken(),i=t.gullet.popToken();return sf(t,r,i,n==="\\\\globalfuture"),t.gullet.pushToken(i),t.gullet.pushToken(s),{type:"internal",mode:t.mode}}});var mi=function(t,n,r){var s=Ye.math[t]&&Ye.math[t].replace,i=Wl(s||t,n,r);if(!i)throw Error("Unsupported symbol "+t+" and font size "+n+".");return i},Yl=function(t,n,r,s){var i=r.havingBaseStyle(n),o=ee(s.concat(i.sizingClasses(r)),[t],r),a=i.sizeMultiplier/r.sizeMultiplier;return o.height*=a,o.depth*=a,o.maxFontSize=i.sizeMultiplier,o},of=function(t,n,r){var s=n.havingBaseStyle(r),i=(1-n.sizeMultiplier/s.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=le(i),t.height-=i,t.depth+=i},Jb=function(t,n,r,s,i,o){var a=Mt(t,"Main-Regular",i,s),l=Yl(a,n,s,o);if(r)of(l,s,n);return l},Zb=function(t,n,r,s){return Mt(t,"Size"+n+"-Regular",r,s)},af=function(t,n,r,s,i,o){var a=Zb(t,n,i,s),l=Yl(ee(["delimsizing","size"+n],[a],s),Me.TEXT,s,o);if(r)of(l,s,Me.TEXT);return l},pl=function(t,n,r,s){var i;if(n==="Size1-Regular")i="delim-size1";else i="delim-size4";var o=ee(["delimsizinginner",i],[ee([],[Mt(t,n,r,s)])]);return{type:"elem",elem:o}},gl=function(t,n,r){var s=Sn["Size4-Regular"][t.charCodeAt(0)]?Sn["Size4-Regular"][t.charCodeAt(0)][4]:Sn["Size1-Regular"][t.charCodeAt(0)][4],i=new Vn("inner",Q2(t,Math.round(1000*n))),o=new _n([i],{width:le(s),height:le(n),style:"width:"+le(s),viewBox:"0 0 "+1000*s+" "+Math.round(1000*n),preserveAspectRatio:"xMinYMin"}),a=pr([],[o],r);return a.height=n,a.style.height=le(n),a.style.width=le(s),{type:"elem",elem:a}},$l=0.008,So={type:"kern",size:-1*$l},Yb=new Set(["|","\\lvert","\\rvert","\\vert"]),Xb=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),lf=function(t,n,r,s,i,o){var a,l,u,d,h="",p=0;a=u=d=t,l=null;var g="Size1-Regular";if(t==="\\uparrow")u=d="⏐";else if(t==="\\Uparrow")u=d="‖";else if(t==="\\downarrow")a=u="⏐";else if(t==="\\Downarrow")a=u="‖";else if(t==="\\updownarrow")a="\\uparrow",u="⏐",d="\\downarrow";else if(t==="\\Updownarrow")a="\\Uparrow",u="‖",d="\\Downarrow";else if(Yb.has(t))u="∣",h="vert",p=333;else if(Xb.has(t))u="∥",h="doublevert",p=556;else if(t==="["||t==="\\lbrack")a="⎡",u="⎢",d="⎣",g="Size4-Regular",h="lbrack",p=667;else if(t==="]"||t==="\\rbrack")a="⎤",u="⎥",d="⎦",g="Size4-Regular",h="rbrack",p=667;else if(t==="\\lfloor"||t==="⌊")u=a="⎢",d="⎣",g="Size4-Regular",h="lfloor",p=667;else if(t==="\\lceil"||t==="⌈")a="⎡",u=d="⎢",g="Size4-Regular",h="lceil",p=667;else if(t==="\\rfloor"||t==="⌋")u=a="⎥",d="⎦",g="Size4-Regular",h="rfloor",p=667;else if(t==="\\rceil"||t==="⌉")a="⎤",u=d="⎥",g="Size4-Regular",h="rceil",p=667;else if(t==="("||t==="\\lparen")a="⎛",u="⎜",d="⎝",g="Size4-Regular",h="lparen",p=875;else if(t===")"||t==="\\rparen")a="⎞",u="⎟",d="⎠",g="Size4-Regular",h="rparen",p=875;else if(t==="\\{"||t==="\\lbrace")a="⎧",l="⎨",d="⎩",u="⎪",g="Size4-Regular";else if(t==="\\}"||t==="\\rbrace")a="⎫",l="⎬",d="⎭",u="⎪",g="Size4-Regular";else if(t==="\\lgroup"||t==="⟮")a="⎧",d="⎩",u="⎪",g="Size4-Regular";else if(t==="\\rgroup"||t==="⟯")a="⎫",d="⎭",u="⎪",g="Size4-Regular";else if(t==="\\lmoustache"||t==="⎰")a="⎧",d="⎭",u="⎪",g="Size4-Regular";else if(t==="\\rmoustache"||t==="⎱")a="⎫",d="⎩",u="⎪",g="Size4-Regular";var b=mi(a,g,i),k=b.height+b.depth,w=mi(u,g,i),A=w.height+w.depth,_=mi(d,g,i),S=_.height+_.depth,E=0,R=1;if(l!==null){var L=mi(l,g,i);E=L.height+L.depth,R=2}var T=k+S+E,F=Math.max(0,Math.ceil((n-T)/(R*A))),I=T+F*R*A,q=s.fontMetrics().axisHeight;if(r)q*=s.sizeMultiplier;var U=I/2-q,j=[];if(h.length>0){var J=I-k-S,re=Math.round(I*1000),ne=eb(h,Math.round(J*1000)),z=new Vn(h,ne),V=le(p/1000),Z=le(re/1000),de=new _n([z],{width:V,height:Z,viewBox:"0 0 "+p+" "+re}),te=pr([],[de],s);te.height=re/1000,te.style.width=V,te.style.height=Z,j.push({type:"elem",elem:te})}else{if(j.push(pl(d,g,i,s)),j.push(So),l===null){var N=I-k-S+2*$l;j.push(gl(u,N,s))}else{var W=(I-k-S-E)/2+2*$l;j.push(gl(u,W,s)),j.push(So),j.push(pl(l,g,i,s)),j.push(So),j.push(gl(u,W,s))}j.push(So),j.push(pl(a,g,i,s))}var K=s.havingBaseStyle(Me.TEXT),oe=ze({positionType:"bottom",positionData:U,children:j});return Yl(ee(["delimsizing","mult"],[oe],K),Me.TEXT,s,o)},bl=80,vl=0.08,yl=function(t,n,r,s,i){var o=X2(t,s,r),a=new Vn(t,o),l=new _n([a],{width:"400em",height:le(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return pr(["hide-tail"],[l],i)},Qb=function(t,n){var r=n.havingBaseSizing(),s=hf("\\surd",t*r.sizeMultiplier,ff,r),i=r.sizeMultiplier,o=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),a,l,u,d,h;if(s.type==="small"){if(d=1000+1000*o+bl,t<1)i=1;else if(t<1.4)i=0.7;l=(1+o+vl)/i,u=(1+o)/i,a=yl("sqrtMain",l,d,o,n),a.style.minWidth="0.853em",h=0.833/i}else if(s.type==="large")d=(1000+bl)*pi[s.size],u=(pi[s.size]+o)/i,l=(pi[s.size]+o+vl)/i,a=yl("sqrtSize"+s.size,l,d,o,n),a.style.minWidth="1.02em",h=1/i;else l=t+o+vl,u=t+o,d=Math.floor(1000*t+o)+bl,a=yl("sqrtTall",l,d,o,n),a.style.minWidth="0.742em",h=1.056;return a.height=u,a.style.height=le(l),{span:a,advanceWidth:h,ruleWidth:(n.fontMetrics().sqrtRuleThickness+o)*i}},cf=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),e3=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),uf=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),pi=[0,1.2,1.8,2.4,3],df=function(t,n,r,s,i){if(t==="<"||t==="\\lt"||t==="⟨")t="\\langle";else if(t===">"||t==="\\gt"||t==="⟩")t="\\rangle";if(cf.has(t)||uf.has(t))return af(t,n,!1,r,s,i);else if(e3.has(t))return lf(t,pi[n],!1,r,s,i);else throw new se("Illegal delimiter: '"+t+"'")},t3=[{type:"small",style:Me.SCRIPTSCRIPT},{type:"small",style:Me.SCRIPT},{type:"small",style:Me.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],n3=[{type:"small",style:Me.SCRIPTSCRIPT},{type:"small",style:Me.SCRIPT},{type:"small",style:Me.TEXT},{type:"stack"}],ff=[{type:"small",style:Me.SCRIPTSCRIPT},{type:"small",style:Me.SCRIPT},{type:"small",style:Me.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],r3=function(t){if(t.type==="small")return"Main-Regular";else if(t.type==="large")return"Size"+t.size+"-Regular";else if(t.type==="stack")return"Size4-Regular";else{var n=t.type;throw Error("Add support for delim type '"+n+"' here.")}},hf=function(t,n,r,s){var i=Math.min(2,3-s.style.size);for(var o=i;o<r.length;o++){var a=r[o];if(a.type==="stack")break;var l=mi(t,r3(a),"math"),u=l.height+l.depth;if(a.type==="small"){var d=s.havingBaseStyle(a.style);u*=d.sizeMultiplier}if(u>n)return a}return r[r.length-1]},Fl=function(t,n,r,s,i,o){if(t==="<"||t==="\\lt"||t==="⟨")t="\\langle";else if(t===">"||t==="\\gt"||t==="⟩")t="\\rangle";var a;if(uf.has(t))a=t3;else if(cf.has(t))a=ff;else a=n3;var l=hf(t,n,a,s);if(l.type==="small")return Jb(t,l.style,r,s,i,o);else if(l.type==="large")return af(t,l.size,r,s,i,o);else return lf(t,n,r,s,i,o)},kl=function(t,n,r,s,i,o){var a=s.fontMetrics().axisHeight*s.sizeMultiplier,l=901,u=5/s.fontMetrics().ptPerEm,d=Math.max(n-a,r+a),h=Math.max(d/500*l,2*d-u);return Fl(t,h,!0,s,i,o)},vd={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},s3=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function yd(e){return"isMiddle"in e}function Uo(e,t){var n=Ho(e);if(n&&s3.has(n.text))return n;else if(n)throw new se("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e);else throw new se("Invalid delimiter type '"+e.type+"'",e)}he({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],numArgs:1,argTypes:["primitive"],handler:(e,t)=>{var n=Uo(yi(t[0]),e);return{type:"delimsizing",mode:e.parser.mode,size:vd[e.funcName].size,mclass:vd[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>{if(e.delim===".")return ee([e.mclass]);return df(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:(e)=>{var t=[];if(e.delim!==".")t.push(nn(e.delim,e.mode));var n=new ie("mo",t);if(e.mclass==="mopen"||e.mclass==="mclose")n.setAttribute("fence","true");else n.setAttribute("fence","false");n.setAttribute("stretchy","true");var r=le(pi[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function kd(e){if(!e.body)throw Error("Bug: The leftright ParseNode wasn't fully parsed.")}he({type:"leftright-right",names:["\\right"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!=="string")throw new se("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Uo(t[0],e).text,color:n}}});he({type:"leftright",names:["\\left"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=Uo(t[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=Ne(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:n.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{kd(e);var n=gt(e.body,t,!0,["mopen","mclose"]),r=0,s=0,i=!1;for(var o=0;o<n.length;o++){var a=n[o];if(yd(a))i=!0;else r=Math.max(n[o].height,r),s=Math.max(n[o].depth,s)}r*=t.sizeMultiplier,s*=t.sizeMultiplier;var l;if(e.left===".")l=ki(t,["mopen"]);else l=kl(e.left,r,s,t,e.mode,["mopen"]);if(n.unshift(l),i)for(var u=1;u<n.length;u++){var d=n[u];if(yd(d)){var h=d.isMiddle;n[u]=kl(h.delim,r,s,h.options,e.mode,[])}}var p;if(e.right===".")p=ki(t,["mclose"]);else{var g=e.rightColor?t.withColor(e.rightColor):t;p=kl(e.right,r,s,g,e.mode,["mclose"])}return n.push(p),ee(["minner"],n,t)},mathmlBuilder:(e,t)=>{kd(e);var n=Zt(e.body,t);if(e.left!=="."){var r=new ie("mo",[nn(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var s=new ie("mo",[nn(e.right,e.mode)]);if(s.setAttribute("fence","true"),e.rightColor)s.setAttribute("mathcolor",e.rightColor);n.push(s)}return Vl(n)}});he({type:"middle",names:["\\middle"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=Uo(t[0],e);if(!e.parser.leftrightDepth)throw new se("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===".")n=ki(t,[]);else n=df(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t};return n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?nn("|","text"):nn(e.delim,e.mode),r=new ie("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var i3=(e,t)=>{var n=xs(Fe(e.body,t),t),r=e.label.slice(1),s=t.sizeMultiplier,i,o,a=Jn(e.body);if(r==="sout")i=ee(["katex-stretchy","katex-sout"]),i.height=t.fontMetrics().defaultRuleThickness/s,o=-0.5*t.fontMetrics().xHeight;else if(r==="phase"){var l=nt({number:0.6,unit:"pt"},t),u=nt({number:0.35,unit:"ex"},t),d=t.havingBaseSizing();s=s/d.sizeMultiplier;var h=n.height+n.depth+l+u;n.style.paddingLeft=le(h/2+l);var p=Math.floor(1000*h*s),g=Z2(p),b=new _n([new Vn("phase",g)],{width:"400em",height:le(p/1000),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=pr(["hide-tail"],[b],t),i.style.height=le(h),o=n.depth+l+u}else{if(/cancel/.test(r)){if(!a)n.classes.push("cancel-pad")}else if(r==="angl")n.classes.push("anglpad");else n.classes.push("boxpad");var k,w,A=0;if(/box/.test(r))A=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),k=t.fontMetrics().fboxsep+(r==="colorbox"?0:A),w=k;else if(r==="angl")A=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),k=4*A,w=Math.max(0,0.25-n.depth);else k=a?0.2:0,w=k;if(i=Lb(n,r,k,w,t),/fbox|boxed|fcolorbox/.test(r))i.style.borderStyle="solid",i.style.borderWidth=le(A);else if(r==="angl"&&A!==0.049)i.style.borderTopWidth=le(A),i.style.borderRightWidth=le(A);if(o=n.depth+w,e.backgroundColor){if(i.style.backgroundColor=e.backgroundColor,e.borderColor)i.style.borderColor=e.borderColor}}var _;if(e.backgroundColor)_=ze({positionType:"individualShift",children:[{type:"elem",elem:i,shift:o},{type:"elem",elem:n,shift:0}]});else{var S=/cancel|phase/.test(r)?["svg-align"]:[];_=ze({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:i,shift:o,wrapperClasses:S}]})}if(/cancel/.test(r))_.height=n.height,_.depth=n.depth;if(/cancel/.test(r)&&!a)return ee(["mord","cancel-lap"],[_],t);else return ee(["mord"],[_],t)},o3=(e,t)=>{var n,r=new ie(e.label.includes("colorbox")?"mpadded":"menclose",[We(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var s=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+le(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}if(e.backgroundColor)r.setAttribute("mathbackground",e.backgroundColor);return r};he({type:"enclose",names:["\\colorbox"],numArgs:2,allowedInText:!0,argTypes:["color","hbox"],handler(e,t,n){var{parser:r,funcName:s}=e,i=Ne(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:o}},htmlBuilder:i3,mathmlBuilder:o3});he({type:"enclose",names:["\\fcolorbox"],numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"],handler(e,t,n){var{parser:r,funcName:s}=e,i=Ne(t[0],"color-token").color,o=Ne(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:o,borderColor:i,body:a}}});he({type:"enclose",names:["\\fbox"],numArgs:1,argTypes:["hbox"],allowedInText:!0,handler(e,t){var n=e.parser;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});he({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"enclose",mode:n.mode,label:r,body:s}}});he({type:"enclose",names:["\\sout"],numArgs:1,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e;if(n.mode==="math")qt({strict:n.settings.strict,errorCode:"mathVsSout",errorMsg:"LaTeX's \\sout works only in text mode",report:!0});var s=t[0];return{type:"enclose",mode:n.mode,label:r,body:s}}});he({type:"enclose",names:["\\angl"],numArgs:1,argTypes:["hbox"],allowedInText:!1,handler(e,t){var n=e.parser;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var mf={};function Tn(e){var{type:t,names:n,props:r,handler:s,htmlBuilder:i,mathmlBuilder:o}=e,a={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s};for(var l=0;l<n.length;++l)mf[n[l]]=a;if(i)bi[t]=i;if(o)vi[t]=o}var pf={};function x(e,t){pf[e]=t}class zt{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){if(!t)return e&&e.loc;else if(!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer)return null;else return new zt(e.loc.lexer,e.loc.start,t.loc.end)}}class Vt{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new Vt(t,zt.range(this,e))}}function wd(e){var t=[];e.consumeSpaces();var n=e.fetch().text;if(n==="\\relax")e.consume(),e.consumeSpaces(),n=e.fetch().text;while(n==="\\hline"||n==="\\hdashline")e.consume(),t.push(n==="\\hdashline"),e.consumeSpaces(),n=e.fetch().text;return t}var Wo=(e)=>{var t=e.parser.settings;if(!t.displayMode)throw new se("{"+e.envName+"} can be used only in display mode.")},a3=new Set(["gather","gather*"]);function Xl(e){if(!e.includes("ed"))return!e.includes("*")}function br(e,t,n){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:o,colSeparationType:a,autoTag:l,singleRow:u,emptySingleRow:d,maxNumCols:h,leqno:p}=t;if(e.gullet.beginGroup(),!u)e.gullet.macros.set("\\cr","\\\\\\relax");if(!o){var g=e.gullet.expandMacroAsText("\\arraystretch");if(g==null)o=1;else if(o=parseFloat(g),!o||o<0)throw new se("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var b=[],k=[b],w=[],A=[],_=l!=null?[]:void 0;function S(){if(l)e.gullet.macros.set("\\@eqnsw","1",!0)}function E(){if(_)if(e.gullet.macros.get("\\df@tag"))_.push(e.subparse([new Vt("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0);else _.push(Boolean(l)&&e.gullet.macros.get("\\@eqnsw")==="1")}S(),A.push(wd(e));while(!0){var R=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var L={type:"ordgroup",mode:e.mode,body:R};if(n)L={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[L]};b.push(L);var T=e.fetch().text;if(T==="&"){if(h&&b.length===h)if(u||a)throw new se("Too many tab characters: &",e.nextToken);else qt({strict:e.settings.strict,errorCode:"textEnv",errorMsg:"Too few columns specified in the {array} column argument.",report:!0});e.consume()}else if(T==="\\end"){if(E(),b.length===1&&L.type==="styling"&&L.body.length===1&&L.body[0].type==="ordgroup"&&L.body[0].body.length===0&&(k.length>1||!d)&&!Array.isArray(_==null?void 0:_[_.length-1])&&!(l&&(_==null?void 0:_[_.length-1])===!0))k.pop();if(A.length<k.length+1)A.push([]);break}else if(T==="\\\\"){e.consume();var F=void 0;if(e.gullet.future().text!==" ")F=e.parseSizeGroup(!0);w.push(F?F.value:null),E(),A.push(wd(e)),b=[],k.push(b),S()}else throw new se("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:s,arraystretch:o,body:k,cols:i,rowGaps:w,hskipBeforeAndAfter:r,hLinesBeforeRow:A,colSeparationType:a,tags:_,leqno:p}}function Ql(e){if(e.slice(0,1)==="d")return"display";else return"text"}var Rn=function(t,n){var r,s,i=t.body.length,o=t.hLinesBeforeRow,a=0,l=Array(i),u=[],d=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),h=1/n.fontMetrics().ptPerEm,p=5*h;if(t.colSeparationType&&t.colSeparationType==="small"){var g=n.havingStyle(Me.SCRIPT).sizeMultiplier;p=0.2778*(g/n.sizeMultiplier)}var b=t.colSeparationType==="CD"?nt({number:3,unit:"ex"},n):12*h,k=3*h,w=t.arraystretch*b,A=0.7*w,_=0.3*w,S=0;function E(De){for(var $e=0;$e<De.length;++$e){if($e>0)S+=0.25;u.push({pos:S,isDashed:De[$e]})}}E(o[0]);for(r=0;r<t.body.length;++r){var R=t.body[r],L=A,T=_;if(a<R.length)a=R.length;var F={cells:Array(R.length),height:0,depth:0,pos:0};for(s=0;s<R.length;++s){var I=Fe(R[s],n);if(T<I.depth)T=I.depth;if(L<I.height)L=I.height;F.cells[s]=I}var q=t.rowGaps[r],U=0;if(q){if(U=nt(q,n),U>0){if(U+=_,T<U)T=U;U=0}}if(t.addJot&&r<t.body.length-1)T+=k;F.height=L,F.depth=T,S+=L,F.pos=S,S+=T+U,l[r]=F,E(o[r+1])}var j=S/2+n.fontMetrics().axisHeight,J=t.cols||[],re=[],ne,z,V=[];if(t.tags&&t.tags.some((De)=>De))for(r=0;r<i;++r){var Z=l[r],de=Z.pos-j,te=t.tags[r],N=void 0;if(te===!0)N=ee(["eqn-num"],[],n);else if(te===!1)N=ee([],[],n);else N=ee([],gt(te,n,!0),n);N.depth=Z.depth,N.height=Z.height,V.push({type:"elem",elem:N,shift:de})}for(s=0,z=0;s<a||z<J.length;++s,++z){var W,K=J[z],oe=!0;while(((ue=K)==null?void 0:ue.type)==="separator"){var ue;if(!oe)ne=ee(["arraycolsep"],[]),ne.style.width=le(n.fontMetrics().doubleRuleSep),re.push(ne);if(K.separator==="|"||K.separator===":"){var Le=K.separator==="|"?"solid":"dashed",G=ee(["vertical-separator"],[],n);G.style.height=le(S),G.style.borderRightWidth=le(d),G.style.borderRightStyle=Le,G.style.margin="0 "+le(-d/2);var ae=S-j;if(ae)G.style.verticalAlign=le(-ae);re.push(G)}else throw new se("Invalid separator type: "+K.separator);z++,K=J[z],oe=!1}if(s>=a)continue;var be=void 0;if(s>0||t.hskipBeforeAndAfter){var ce,xe;if(be=(ce=(xe=K)==null?void 0:xe.pregap)!=null?ce:p,be!==0)ne=ee(["arraycolsep"],[]),ne.style.width=le(be),re.push(ne)}var Ce=[];for(r=0;r<i;++r){var Ve=l[r],qe=Ve.cells[s];if(!qe)continue;var st=Ve.pos-j;qe.depth=Ve.depth,qe.height=Ve.height,Ce.push({type:"elem",elem:qe,shift:st})}var Kt=ze({positionType:"individualShift",children:Ce}),Ir=ee(["col-align-"+(((W=K)==null?void 0:W.align)||"c")],[Kt]);if(re.push(Ir),s<a-1||t.hskipBeforeAndAfter){var Re,Nr;if(be=(Re=(Nr=K)==null?void 0:Nr.postgap)!=null?Re:p,be!==0)ne=ee(["arraycolsep"],[]),ne.style.width=le(be),re.push(ne)}}var it=ee(["mtable"],re);if(u.length>0){var Ue=ws("katex-hline",n,d),ds=ws("katex-hdashline",n,d),fn=[{type:"elem",elem:it,shift:0}];while(u.length>0){var fs=u.pop(),hs=fs.pos-j;if(fs.isDashed)fn.push({type:"elem",elem:ds,shift:hs});else fn.push({type:"elem",elem:Ue,shift:hs})}it=ze({positionType:"individualShift",children:fn})}if(V.length===0)return ee(["mord"],[it],n);else{var fe=ze({positionType:"individualShift",children:V}),ke=ee(["katex-tag"],[fe],n);return Yn([it,ke])}},l3={c:"center ",l:"left ",r:"right "},Mn=function(t,n){var r=[],s=new ie("mtd",[],["mtr-glue"]),i=new ie("mtd",[],["mml-eqn-num"]);for(var o=0;o<t.body.length;o++){var a=t.body[o],l=[];for(var u=0;u<a.length;u++)l.push(new ie("mtd",[We(a[u],n)]));if(t.tags&&t.tags[o])if(l.unshift(s),l.push(s),t.leqno)l.unshift(i);else l.push(i);r.push(new ie("mtr",l))}var d=new ie("mtable",r),h=t.arraystretch===0.5?0.1:0.16+t.arraystretch-1+(t.addJot?0.09:0);d.setAttribute("rowspacing",le(h));var p="",g="";if(t.cols&&t.cols.length>0){var b=t.cols,k="",w=!1,A=0,_=b.length;if(b[0].type==="separator")p+="top ",A=1;if(b[b.length-1].type==="separator")p+="bottom ",_-=1;for(var S=A;S<_;S++){var E=b[S];if(E.type==="align"){if(g+=l3[E.align],w)k+="none ";w=!0}else if(E.type==="separator"){if(w)k+=E.separator==="|"?"solid ":"dashed ",w=!1}}if(d.setAttribute("columnalign",g.trim()),/[sd]/.test(k))d.setAttribute("columnlines",k.trim())}if(t.colSeparationType==="align"){var R=t.cols||[],L="";for(var T=1;T<R.length;T++)L+=T%2?"0em ":"1em ";d.setAttribute("columnspacing",L.trim())}else if(t.colSeparationType==="alignat"||t.colSeparationType==="gather")d.setAttribute("columnspacing","0em");else if(t.colSeparationType==="small")d.setAttribute("columnspacing","0.2778em");else if(t.colSeparationType==="CD")d.setAttribute("columnspacing","0.5em");else d.setAttribute("columnspacing","1em");var F="",I=t.hLinesBeforeRow;p+=I[0].length>0?"left ":"",p+=I[I.length-1].length>0?"right ":"";for(var q=1;q<I.length-1;q++)F+=I[q].length===0?"none ":I[q][0]?"dashed ":"solid ";if(/[sd]/.test(F))d.setAttribute("rowlines",F.trim());if(p!=="")d=new ie("menclose",[d]),d.setAttribute("notation",p.trim());if(t.arraystretch&&t.arraystretch<1)d=new ie("mstyle",[d]),d.setAttribute("scriptlevel","1");return d},gf=function(t,n){if(!t.envName.includes("ed"))Wo(t);var r=[],s=t.envName==="split",i=br(t.parser,{cols:r,addJot:!0,autoTag:s?void 0:Xl(t.envName),emptySingleRow:!0,colSeparationType:t.envName.includes("at")?"alignat":"align",maxNumCols:s?2:void 0,leqno:t.parser.settings.leqno},"display"),o=0,a=0,l={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){var u="Number of columns should be a positive integer",d=Zl(n[0],u);if(!/^[0-9]+$/.test(d)||Number(d)<1)throw new se(u,n[0]);o=Number(d),a=o*2}var h=!a;i.body.forEach(function(k){for(var w=1;w<k.length;w+=2){var A=Ne(k[w],"styling"),_=Ne(A.body[0],"ordgroup");_.body.unshift(l)}if(!h){var S=k.length/2;if(o<S)throw new se("Too many math in a row: "+("expected "+o+", but got "+S),k[0])}else if(a<k.length)a=k.length});for(var p=0;p<a;++p){var g="r",b=0;if(p%2===1)g="l";else if(p>0&&h)b=1;r[p]={type:"align",align:g,pregap:b,postgap:0}}return i.colSeparationType=h?"align":"alignat",i};Tn({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=Ho(t[0]),r=n?[t[0]]:Ne(t[0],"ordgroup").body,s=r.map(function(o){var a=qo(o),l=a.text;if("lcr".includes(l))return{type:"align",align:l};else if(l==="|")return{type:"separator",separator:"|"};else if(l===":")return{type:"separator",separator:":"};throw new se("Unknown column alignment: "+l,o)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return br(e.parser,i,Ql(e.envName))},htmlBuilder:Rn,mathmlBuilder:Mn});Tn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),n=s.fetch().text,!"lcr".includes(n))throw new se("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:n}]}}var i=br(e.parser,r,Ql(e.envName)),o=Math.max(0,...i.body.map((a)=>a.length));return i.cols=Array(o).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:Rn,mathmlBuilder:Mn});Tn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:0.5},n=br(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:Rn,mathmlBuilder:Mn});Tn({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=Ho(t[0]),r=n?[t[0]]:Ne(t[0],"ordgroup").body,s=r.map(function(a){var l=qo(a),u=l.text;if("lc".includes(u))return{type:"align",align:u};throw new se("Unknown column alignment: "+u,a)});if(s.length>1)throw new se("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:0.5},o=br(e.parser,i,"script");if(o.body.length>0&&o.body[0].length>1)throw new se("{subarray} can contain only one column");return o},htmlBuilder:Rn,mathmlBuilder:Mn});Tn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=br(e.parser,t,Ql(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Rn,mathmlBuilder:Mn});Tn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:gf,htmlBuilder:Rn,mathmlBuilder:Mn});Tn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){if(a3.has(e.envName))Wo(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Xl(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return br(e.parser,t,"display")},htmlBuilder:Rn,mathmlBuilder:Mn});Tn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:gf,htmlBuilder:Rn,mathmlBuilder:Mn});Tn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Wo(e);var t={autoTag:Xl(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return br(e.parser,t,"display")},htmlBuilder:Rn,mathmlBuilder:Mn});Tn({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Wo(e),jb(e.parser)},htmlBuilder:Rn,mathmlBuilder:Mn});x("\\nonumber","\\gdef\\@eqnsw{0}");x("\\notag","\\nonumber");he({type:"text",names:["\\hline","\\hdashline"],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new se(e.funcName+" valid only within array environment")}});var xd=mf;he({type:"environment",names:["\\begin","\\end"],numArgs:1,argTypes:["text"],handler(e,t){var{parser:n,funcName:r}=e,s=t[0];if(s.type!=="ordgroup")throw new se("Invalid environment name",s);var i=Zl(s,"Environment name should contain only text characters and spaces",!0);if(r==="\\begin"){if(!Object.prototype.hasOwnProperty.call(xd,i))throw new se("No such environment: "+i,s);var o=xd[i],a=n.parseArguments("\\begin{"+i+"}",o),{args:l,optArgs:u}=a,d={mode:n.mode,envName:i,parser:n},h=o.handler(d,l,u);n.expect("\\end",!1);var p=n.nextToken,g=Ne(n.parseFunction(),"environment");if(g.name!==i)throw new se("Mismatch: \\begin{"+i+"} matched by \\end{"+g.name+"}",p);return h}return{type:"environment",mode:n.mode,name:i,nameGroup:s}}});var c3=(e,t)=>{var n=e.font,r=t.withFont(n);return Fe(e.body,r)},u3=(e,t)=>{var n=e.font,r=t.withFont(n);return We(e.body,r)},Ed={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};he({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=yi(t[0]),i=r in Ed?Ed[r]:r;return{type:"font",mode:n.mode,font:i.slice(1),body:s}},htmlBuilder:c3,mathmlBuilder:u3});he({type:"mclass",names:["\\boldsymbol","\\bm"],numArgs:1,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"mclass",mode:n.mode,mclass:Po(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:Jn(r)}}});he({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],numArgs:0,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:s}=e,i=n.mode,o=n.parseExpression(!0,s);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:o}}}});var d3=(e,t)=>{var n=t.style,r=n.fracNum(),s=n.fracDen(),i;i=t.havingStyle(r);var o=Fe(e.numer,i,t);if(e.continued){var a=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height<a?a:o.height,o.depth=o.depth<l?l:o.depth}i=t.havingStyle(s);var u=Fe(e.denom,i,t),d,h,p;if(e.hasBarLine){if(e.barSize)h=nt(e.barSize,t),d=ws("frac-line",t,h);else d=ws("frac-line",t);h=d.height,p=d.height}else d=null,h=0,p=t.fontMetrics().defaultRuleThickness;var g,b,k;if(n.size===Me.DISPLAY.size){if(g=t.fontMetrics().num1,h>0)b=3*p;else b=7*p;k=t.fontMetrics().denom1}else{if(h>0)g=t.fontMetrics().num2,b=p;else g=t.fontMetrics().num3,b=3*p;k=t.fontMetrics().denom2}var w;if(!d){var A=g-o.depth-(u.height-k);if(A<b)g+=0.5*(b-A),k+=0.5*(b-A);w=ze({positionType:"individualShift",children:[{type:"elem",elem:u,shift:k},{type:"elem",elem:o,shift:-g}]})}else{var _=t.fontMetrics().axisHeight;if(g-o.depth-(_+0.5*h)<b)g+=b-(g-o.depth-(_+0.5*h));if(_-0.5*h-(u.height-k)<b)k+=b-(_-0.5*h-(u.height-k));var S=-(_-0.5*h);w=ze({positionType:"individualShift",children:[{type:"elem",elem:u,shift:k},{type:"elem",elem:d,shift:S},{type:"elem",elem:o,shift:-g}]})}i=t.havingStyle(n),w.height*=i.sizeMultiplier/t.sizeMultiplier,w.depth*=i.sizeMultiplier/t.sizeMultiplier;var E;if(n.size===Me.DISPLAY.size)E=t.fontMetrics().delim1;else if(n.size===Me.SCRIPTSCRIPT.size)E=t.havingStyle(Me.SCRIPT).fontMetrics().delim2;else E=t.fontMetrics().delim2;var R,L;if(e.leftDelim==null)R=ki(t,["mopen"]);else R=Fl(e.leftDelim,E,!0,t.havingStyle(n),e.mode,["mopen"]);if(e.continued)L=ee([]);else if(e.rightDelim==null)L=ki(t,["mclose"]);else L=Fl(e.rightDelim,E,!0,t.havingStyle(n),e.mode,["mclose"]);return ee(["mord"].concat(i.sizingClasses(t)),[R,ee(["mfrac"],[w]),L],t)},f3=(e,t)=>{var n=new ie("mfrac",[We(e.numer,t),We(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=nt(e.barSize,t);n.setAttribute("linethickness",le(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new ie("mo",[new lt(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(n),e.rightDelim!=null){var o=new ie("mo",[new lt(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}return Vl(s)}return n},bf=(e,t)=>{if(!t)return e;var n={type:"styling",mode:e.mode,style:t,body:[e]};return n};he({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0],i=t[1],o,a=null,l=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,a="(",l=")";break;case"\\\\bracefrac":o=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":o=!1,a="[",l="]";break;default:throw Error("Unrecognized genfrac command")}var u=r==="\\cfrac",d=null;if(u||r.startsWith("\\d"))d="display";else if(r.startsWith("\\t"))d="text";return bf({type:"genfrac",mode:n.mode,numer:s,denom:i,continued:u,hasBarLine:o,leftDelim:a,rightDelim:l,barSize:null},d)},htmlBuilder:d3,mathmlBuilder:f3});he({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],numArgs:0,infix:!0,handler(e){var{parser:t,funcName:n,token:r}=e,s;switch(n){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:s,token:r}}});var Ad=["display","text","script","scriptscript"],Cd=function(t){var n=null;if(t.length>0)n=t,n=n==="."?null:n;return n};he({type:"genfrac",names:["\\genfrac"],numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"],handler(e,t){var n=e.parser,r=t[4],s=t[5],i=yi(t[0]),o=i.type==="atom"&&i.family==="open"?Cd(i.text):null,a=yi(t[1]),l=a.type==="atom"&&a.family==="close"?Cd(a.text):null,u=Ne(t[2],"size"),d,h=null;if(u.isBlank)d=!0;else h=u.value,d=h.number>0;var p=null,g=t[3];if(g.type==="ordgroup"){if(g.body.length>0){var b=Ne(g.body[0],"textord");p=Ad[Number(b.text)]}}else g=Ne(g,"textord"),p=Ad[Number(g.text)];return bf({type:"genfrac",mode:n.mode,numer:r,denom:s,continued:!1,hasBarLine:d,barSize:h,leftDelim:o,rightDelim:l},p)}});he({type:"infix",names:["\\above"],numArgs:1,argTypes:["size"],infix:!0,handler(e,t){var n=e.parser;e.funcName;var r=e.token;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Ne(t[0],"size").value,token:r}}});he({type:"genfrac",names:["\\\\abovefrac"],numArgs:3,argTypes:["math","size","math"],handler:(e,t)=>{var n=e.parser;e.funcName;var r=t[0],s=Ne(t[1],"infix").size;if(!s)throw Error("\\\\abovefrac expected size, but got "+String(s));var i=t[2],o=s.number>0;return{type:"genfrac",mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:o,barSize:s,leftDelim:null,rightDelim:null}}});var vf=(e,t)=>{var n=t.style,r,s;if(e.type==="supsub")r=e.sup?Fe(e.sup,t.havingStyle(n.sup()),t):Fe(e.sub,t.havingStyle(n.sub()),t),s=Ne(e.base,"horizBrace");else s=Ne(e,"horizBrace");var i=Fe(s.base,t.havingBaseStyle(Me.DISPLAY)),o=zo(s,t),a;if(s.isOver)a=ze({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:0.1},{type:"elem",elem:o,wrapperClasses:["svg-align"]}]});else a=ze({positionType:"bottom",positionData:i.depth+0.1+o.height,children:[{type:"elem",elem:o,wrapperClasses:["svg-align"]},{type:"kern",size:0.1},{type:"elem",elem:i}]});if(r){var l=ee(["minner",s.isOver?"mover":"munder"],[a],t);if(s.isOver)a=ze({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:0.2},{type:"elem",elem:r}]});else a=ze({positionType:"bottom",positionData:l.depth+0.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:0.2},{type:"elem",elem:l}]})}return ee(["minner",s.isOver?"mover":"munder"],[a],t)};var h3=(e,t)=>{var n=Fo(e.label);return new ie(e.isOver?"mover":"munder",[We(e.base,t),n])};he({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],numArgs:1,handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:r.includes("\\over"),base:t[0]}},htmlBuilder:vf,mathmlBuilder:h3});he({type:"href",names:["\\href"],numArgs:2,argTypes:["url","original"],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[1],s=Ne(t[0],"url").url;if(!n.settings.isTrusted({command:"\\href",url:s}))return n.formatUnsupportedCmd("\\href");return{type:"href",mode:n.mode,href:s,body:ut(r)}},htmlBuilder:(e,t)=>{var n=gt(e.body,t,!1);return pb(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=gr(e.body,t);if(!(n instanceof ie))n=new ie("mrow",[n]);return n.setAttribute("href",e.href),n}});he({type:"href",names:["\\url"],numArgs:1,argTypes:["url"],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=Ne(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");var s=[];for(var i=0;i<r.length;i++){var o=r[i];if(o==="~")o="\\textasciitilde";s.push({type:"textord",mode:"text",text:o})}var a={type:"text",mode:n.mode,font:"\\texttt",body:s};return{type:"href",mode:n.mode,href:r,body:ut(a)}}});he({type:"hbox",names:["\\hbox"],numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0,handler(e,t){var n=e.parser;return{type:"hbox",mode:n.mode,body:ut(t[0])}},htmlBuilder(e,t){var n=gt(e.body,t.withFont(""),!1);return Yn(n)},mathmlBuilder(e,t){return new ie("mrow",Zt(e.body,t.withFont("")))}});he({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],numArgs:2,argTypes:["raw","original"],allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e;e.token;var s=Ne(t[0],"raw").string,i=t[1];if(n.settings.strict)qt({strict:n.settings.strict,errorCode:"htmlExtension",errorMsg:"HTML extension is disabled on strict mode",report:!0});var o,a={};switch(r){case"\\htmlClass":a.class=s,o={command:"\\htmlClass",class:s};break;case"\\htmlId":a.id=s,o={command:"\\htmlId",id:s};break;case"\\htmlStyle":a.style=s,o={command:"\\htmlStyle",style:s};break;case"\\htmlData":{var l="{,}",u=[],d="";for(var h=0;h<s.length;h++)if(s.startsWith(l,h))d+=",",h+=l.length-1;else if(s[h]===",")u.push(d),d="";else d+=s[h];u.push(d);for(var p=0;p<u.length;p++){var g=u[p],b=g.indexOf("=");if(b<0)throw new se("\\htmlData key/value '"+g+"' missing equals sign");var k=g.slice(0,b),w=g.slice(b+1);a["data-"+k.trim()]=w}o={command:"\\htmlData",attributes:a};break}default:throw Error("Unrecognized html command")}if(!n.settings.isTrusted(o))return n.formatUnsupportedCmd(r);return{type:"html",mode:n.mode,attributes:a,body:ut(i)}},htmlBuilder:(e,t)=>{var n=gt(e.body,t,!1),r=["enclosing"];if(e.attributes.class)r.push(...e.attributes.class.trim().split(/\s+/));var s=ee(r,n,t);for(var i of Object.entries(e.attributes)){var o=i[0],a=i[1];if(o!=="class")s.setAttribute(o,a)}return s},mathmlBuilder:(e,t)=>gr(e.body,t)});he({type:"htmlmathml",names:["\\html@mathml"],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>{var n=e.parser;return{type:"htmlmathml",mode:n.mode,html:ut(t[0]),mathml:ut(t[1])}},htmlBuilder:(e,t)=>{var n=gt(e.html,t,!1);return Yn(n)},mathmlBuilder:(e,t)=>gr(e.mathml,t)});var wl=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};else{var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new se("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!qd(r))throw new se("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r}};he({type:"includegraphics",names:["\\includegraphics"],numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1,handler:(e,t,n)=>{var r=e.parser,s={number:0,unit:"em"},i={number:0.9,unit:"em"},o={number:0,unit:"em"},a="";if(n[0]){var l=Ne(n[0],"raw").string,u=l.split(",");for(var d=0;d<u.length;d++){var h=u[d].split("=");if(h.length===2){var p=h[1].trim();switch(h[0].trim()){case"alt":a=p;break;case"width":s=wl(p);break;case"height":i=wl(p);break;case"totalheight":o=wl(p);break;default:throw new se("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}}var g=Ne(t[0],"url").url;if(a==="")a=g,a=a.replace(/^.*[\\/]/,""),a=a.substring(0,a.lastIndexOf("."));if(!r.settings.isTrusted({command:"\\includegraphics",url:g}))return r.formatUnsupportedCmd("\\includegraphics");return{type:"includegraphics",mode:r.mode,alt:a,width:s,height:i,totalheight:o,src:g}},htmlBuilder:(e,t)=>{var n=nt(e.height,t),r=0;if(e.totalheight.number>0)r=nt(e.totalheight,t)-n;var s=0;if(e.width.number>0)s=nt(e.width,t);var i={height:le(n+r)};if(s>0)i.width=le(s);if(r>0)i.verticalAlign=le(-r);var o=new Wd(e.src,e.alt,i);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new ie("mglyph",[]);n.setAttribute("alt",e.alt);var r=nt(e.height,t),s=0;if(e.totalheight.number>0)s=nt(e.totalheight,t)-r,n.setAttribute("valign",le(-s));if(n.setAttribute("height",le(r+s)),e.width.number>0){var i=nt(e.width,t);n.setAttribute("width",le(i))}return n.setAttribute("src",e.src),n}});he({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,s=Ne(t[0],"size");if(n.settings.strict){var i=r[1]==="m",o=s.value.unit==="mu";if(i){if(!o)qt({strict:n.settings.strict,errorCode:"mathVsTextUnits",errorMsg:"LaTeX's "+r+" supports only mu units, "+("not "+s.value.unit+" units"),report:!0});if(n.mode!=="math")qt({strict:n.settings.strict,errorCode:"mathVsTextUnits",errorMsg:"LaTeX's "+r+" works only in math mode",report:!0})}else if(o)qt({strict:n.settings.strict,errorCode:"mathVsTextUnits",errorMsg:"LaTeX's "+r+" doesn't support mu units",report:!0})}return{type:"kern",mode:n.mode,dimension:s.value}},htmlBuilder(e,t){return Kd(e.dimension,t)},mathmlBuilder(e,t){var n=nt(e.dimension,t);return new Kl(n)}});he({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,t)=>{var n;if(e.alignment==="clap")n=ee([],[Fe(e.body,t)]),n=ee(["katex-inner"],[n],t);else n=ee(["katex-inner"],[Fe(e.body,t)]);var r=ee(["katex-fix"],[]),s=ee([e.alignment],[n,r],t),i=ee(["katex-strut"]);if(i.style.height=le(s.height+s.depth),s.depth)i.style.verticalAlign=le(-s.depth);return s.children.unshift(i),s=ee(["katex-thinbox"],[s],t),ee(["mord","katex-vbox"],[s],t)},mathmlBuilder:(e,t)=>{var n=new ie("mpadded",[We(e.body,t)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});he({type:"styling",names:["\\(","$"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var{funcName:n,parser:r}=e,s=r.mode;r.switchMode("math");var i=n==="\\("?"\\)":"$",o=r.parseExpression(!1,i);return r.expect(i),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:o}}});he({type:"text",names:["\\)","\\]"],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new se("Mismatched "+e.funcName)}});var Sd=(e,t)=>{switch(t.style.size){case Me.DISPLAY.size:return e.display;case Me.TEXT.size:return e.text;case Me.SCRIPT.size:return e.script;case Me.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};he({type:"mathchoice",names:["\\mathchoice"],numArgs:4,primitive:!0,handler:(e,t)=>{var n=e.parser;return{type:"mathchoice",mode:n.mode,display:ut(t[0]),text:ut(t[1]),script:ut(t[2]),scriptscript:ut(t[3])}},htmlBuilder:(e,t)=>{var n=Sd(e,t),r=gt(n,t,!1);return Yn(r)},mathmlBuilder:(e,t)=>{var n=Sd(e,t);return gr(n,t)}});var yf=(e,t,n,r,s,i,o)=>{e=ee([],[e]);var a=n&&Jn(n),l,u;if(t){var d=Fe(t,r.havingStyle(s.sup()),r);u={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var h=Fe(n,r.havingStyle(s.sub()),r);l={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}var p;if(u&&l){var g=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o;p=ze({positionType:"bottom",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:le(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:le(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(l){var b=e.height-o;p=ze({positionType:"top",positionData:b,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:le(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(u){var k=e.depth+o;p=ze({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:le(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var w=[p];if(l&&i!==0&&!a){var A=ee(["mspace"],[],r);A.style.marginRight=le(i),w.unshift(A)}return ee(["mop","op-limits"],w,r)},kf=new Set(["\\smallint"]),wf=(e,t)=>{var n,r,s=!1,i;if(e.type==="supsub")n=e.sup,r=e.sub,i=Ne(e.base,"op"),s=!0;else i=Ne(e,"op");var o=t.style,a=!1;if(o.size===Me.DISPLAY.size&&i.symbol&&!kf.has(i.name))a=!0;var l,u;if(i.symbol){var d=a?"Size2-Regular":"Size1-Regular",h="";if(i.name==="\\oiint"||i.name==="\\oiiint")h=i.name.slice(1),i.name=h==="oiint"?"\\iint":"\\iiint";if(l=Mt(i.name,d,"math",t,["mop","op-symbol",a?"large-op":"small-op"]),u=l.italic,h.length>0){var p=Jd(h+"Size"+(a?"2":"1"),t);l=ze({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:a?0.08:0}]}),i.name="\\"+h,l.classes.unshift("mop"),l.italic=u}}else if(i.body){var g=gt(i.body,t,!0);if(g.length===1&&g[0]instanceof Ht)l=g[0],l.classes[0]="mop";else l=ee(["mop"],g,t)}else{var b=[];for(var k=1;k<i.name.length;k++)b.push(jl(i.name[k],i.mode,t));l=ee(["mop"],b,t)}var w=0,A=0;if((l instanceof Ht||i.name==="\\oiint"||i.name==="\\oiiint")&&!i.suppressBaseShift){var _;w=(l.height-l.depth)/2-t.fontMetrics().axisHeight,A=(_=l.italic)!=null?_:0}if(s)return yf(l,n,r,t,o,A,w);else{if(w)l.style.position="relative",l.style.top=le(w);return l}},m3=(e,t)=>{var n;if(e.symbol){if(n=new ie("mo",[nn(e.name,e.mode)]),kf.has(e.name))n.setAttribute("largeop","false")}else if(e.body)n=new ie("mo",Zt(e.body,t));else{n=new ie("mi",[new lt(e.name.slice(1))]);var r=new ie("mo",[nn("","text")]);if(e.parentIsSupSub)n=new ie("mrow",[n,r]);else n=Xd([n,r])}return n},p3={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};he({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],numArgs:0,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=r;if(s.length===1)s=p3[s];return{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:wf,mathmlBuilder:m3});he({type:"op",names:["\\mathop"],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ut(r)}}});var g3={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};he({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}});he({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],numArgs:0,handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}});he({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],numArgs:0,allowedInArgument:!0,handler(e){var{parser:t,funcName:n}=e,r=n;if(r.length===1)r=g3[r];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}}});var xf=(e,t)=>{var n,r,s=!1,i;if(e.type==="supsub")n=e.sup,r=e.sub,i=Ne(e.base,"operatorname"),s=!0;else i=Ne(e,"operatorname");var o;if(i.body.length>0){var a=i.body.map((h)=>{var p="text"in h?h.text:void 0;if(typeof p==="string")return{type:"textord",mode:h.mode,text:p};else return h}),l=gt(a,t.withFont("mathrm"),!0);for(var u=0;u<l.length;u++){var d=l[u];if(d instanceof Ht)d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*")}o=ee(["mop"],l,t)}else o=ee(["mop"],[],t);if(s)return yf(o,n,r,t,t.style,0,0);else return o},b3=(e,t)=>{var n=Zt(e.body,t.withFont("mathrm")),r=!0;for(var s=0;s<n.length;s++){var i=n[s];if(i instanceof Kl);else if(i instanceof ie)switch(i.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var o=i.children[0];if(i.children.length===1&&o instanceof lt)o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*");else r=!1;break}default:r=!1}else r=!1}if(r){var a=n.map((d)=>d.toText()).join("");n=[new lt(a)]}var l=new ie("mi",n);l.setAttribute("mathvariant","normal");var u=new ie("mo",[nn("","text")]);if(e.parentIsSupSub)return new ie("mrow",[l,u]);else return Xd([l,u])};he({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],numArgs:1,handler:(e,t)=>{var{parser:n,funcName:r}=e,s=t[0];return{type:"operatorname",mode:n.mode,body:ut(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:xf,mathmlBuilder:b3});x("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Hr({type:"ordgroup",htmlBuilder(e,t){if(e.semisimple)return Yn(gt(e.body,t,!1));return ee(["mord"],gt(e.body,t,!0),t)},mathmlBuilder(e,t){return gr(e.body,t,!0)}});he({type:"overline",names:["\\overline"],numArgs:1,handler(e,t){var n=e.parser,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=Fe(e.body,t.havingCrampedStyle()),r=ws("overline-line",t),s=t.fontMetrics().defaultRuleThickness,i=ze({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return ee(["mord","katex-overline"],[i],t)},mathmlBuilder(e,t){var n=new ie("mo",[new lt("‾")]);n.setAttribute("stretchy","true");var r=new ie("mover",[We(e.body,t),n]);return r.setAttribute("accent","true"),r}});he({type:"phantom",names:["\\phantom"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"phantom",mode:n.mode,body:ut(r)}},htmlBuilder:(e,t)=>{var n=gt(e.body,t.withPhantom(),!1);return Yn(n)},mathmlBuilder:(e,t)=>{var n=Zt(e.body,t);return new ie("mphantom",n)}});x("\\hphantom","\\smash{\\phantom{#1}}");he({type:"vphantom",names:["\\vphantom"],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=ee(["katex-inner"],[Fe(e.body,t.withPhantom())]),r=ee(["katex-fix"],[]);return ee(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=Zt(ut(e.body),t),r=new ie("mphantom",n),s=new ie("mpadded",[r]);return s.setAttribute("width","0px"),s}});he({type:"raisebox",names:["\\raisebox"],numArgs:2,argTypes:["size","hbox"],allowedInText:!0,handler(e,t){var n=e.parser,r=Ne(t[0],"size").value,s=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:s}},htmlBuilder(e,t){var n=Fe(e.body,t),r=nt(e.dy,t);return ze({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new ie("mpadded",[We(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});var Ef=(e,t)=>{var n=e.parser;return{type:"reflectbox",mode:n.mode,body:t[0]}};he({type:"reflectbox",names:["\\reflectbox"],numArgs:1,argTypes:["hbox"],allowedInText:!0,handler:Ef,htmlBuilder(e,t){return ee(["mord","reflectbox"],[Fe(e.body,t)],t)},mathmlBuilder(e,t){return We(e.body,t)}});he({type:"reflectbox",names:["\\mathreflectbox"],numArgs:1,argTypes:["math"],handler:Ef});he({type:"internal",names:["\\relax"],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){var t=e.parser;return{type:"internal",mode:t.mode}}});he({type:"rule",names:["\\rule"],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"],handler(e,t,n){var r=e.parser,s=n[0],i=Ne(t[0],"size"),o=Ne(t[1],"size");return{type:"rule",mode:r.mode,shift:s&&Ne(s,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var n=ee(["mord","katex-rule"],[],t),r=nt(e.width,t),s=nt(e.height,t),i=e.shift?nt(e.shift,t):0;return n.style.borderRightWidth=le(r),n.style.borderTopWidth=le(s),n.style.bottom=le(i),n.width=r,n.height=s+i,n.depth=-i,n.maxFontSize=s*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=nt(e.width,t),r=nt(e.height,t),s=e.shift?nt(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new ie("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",le(n)),o.setAttribute("height",le(r));var a=new ie("mpadded",[o]);if(s>=0)a.setAttribute("height",le(s));else a.setAttribute("height",le(s)),a.setAttribute("depth",le(-s));return a.setAttribute("voffset",le(s)),a}});function Af(e,t,n){var r=gt(e,t,!1),s=t.sizeMultiplier/n.sizeMultiplier;for(var i=0;i<r.length;i++){var o=r[i].classes.indexOf("katex-sizing");if(o<0)Array.prototype.push.apply(r[i].classes,t.sizingClasses(n));else if(r[i].classes[o+1]==="reset-size"+t.size)r[i].classes[o+1]="reset-size"+n.size;r[i].height*=s,r[i].depth*=s}return Yn(r)}var _d=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],v3=(e,t)=>{var n=t.havingSize(e.size);return Af(e.body,n,t)};he({type:"sizing",names:_d,numArgs:0,allowedInText:!0,handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:s}=e,i=s.parseExpression(!1,n);return{type:"sizing",mode:s.mode,size:_d.indexOf(r)+1,body:i}},htmlBuilder:v3,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=Zt(e.body,n),s=new ie("mstyle",r);return s.setAttribute("mathsize",le(n.sizeMultiplier)),s}});he({type:"smash",names:["\\smash"],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var r=e.parser,s=!1,i=!1,o=n[0]&&Ne(n[0],"ordgroup");if(o){var a;for(var l=0;l<o.body.length;++l){var u=o.body[l];if(a=qo(u).text,a==="t")s=!0;else if(a==="b")i=!0;else{s=!1,i=!1;break}}}else s=!0,i=!0;var d=t[0];return{type:"smash",mode:r.mode,body:d,smashHeight:s,smashDepth:i}},htmlBuilder:(e,t)=>{var n=ee([],[Fe(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight)n.height=0;if(e.smashDepth)n.depth=0;if(e.smashHeight&&e.smashDepth)return ee(["mord","katex-smash"],[n],t);if(n.children)for(var r=0;r<n.children.length;r++){if(e.smashHeight)n.children[r].height=0;if(e.smashDepth)n.children[r].depth=0}var s=ze({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return ee(["mord"],[s],t)},mathmlBuilder:(e,t)=>{var n=new ie("mpadded",[We(e.body,t)]);if(e.smashHeight)n.setAttribute("height","0px");if(e.smashDepth)n.setAttribute("depth","0px");return n}});he({type:"sqrt",names:["\\sqrt"],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,s=n[0],i=t[0];return{type:"sqrt",mode:r.mode,body:i,index:s}},htmlBuilder(e,t){var n=Fe(e.body,t.havingCrampedStyle());if(n.height===0)n.height=t.fontMetrics().xHeight;n=xs(n,t);var r=t.fontMetrics(),s=r.defaultRuleThickness,i=s;if(t.style.id<Me.TEXT.id)i=t.fontMetrics().xHeight;var o=s+i/4,a=n.height+n.depth+o+s,l=Qb(a,t),{span:u,ruleWidth:d,advanceWidth:h}=l,p=u.height-d;if(p>n.height+n.depth+o)o=(o+p-n.height-n.depth)/2;var g=u.height-n.height-o-d;n.style.paddingLeft=le(h);var b=ze({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+g)},{type:"elem",elem:u},{type:"kern",size:d}]});if(!e.index)return ee(["mord","sqrt"],[b],t);else{var k=t.havingStyle(Me.SCRIPTSCRIPT),w=Fe(e.index,k,t),A=0.6*(b.height-b.depth),_=ze({positionType:"shift",positionData:-A,children:[{type:"elem",elem:w}]}),S=ee(["katex-root"],[_]);return ee(["mord","sqrt"],[S,b],t)}},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new ie("mroot",[We(n,t),We(r,t)]):new ie("msqrt",[We(n,t)])}});var zl={display:Me.DISPLAY,text:Me.TEXT,script:Me.SCRIPT,scriptscript:Me.SCRIPTSCRIPT};function y3(e){return e in zl}he({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var{breakOnTokenText:n,funcName:r,parser:s}=e,i=s.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!y3(o))throw Error("Unknown style: "+o);return{type:"styling",mode:s.mode,style:o,body:i}},htmlBuilder(e,t){var n=zl[e.style],r=t.havingStyle(n);if(e.resetFont)r=r.withFont("");return Af(e.body,r,t)},mathmlBuilder(e,t){var n=zl[e.style],r=t.havingStyle(n);if(e.resetFont)r=r.withFont("");var s=Zt(e.body,r),i=new ie("mstyle",s),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},a=o[e.style];return i.setAttribute("scriptlevel",a[0]),i.setAttribute("displaystyle",a[1]),i}});var k3=function(t,n){var r=t.base;if(!r)return null;else if(r.type==="op"){var s=r.limits&&(n.style.size===Me.DISPLAY.size||r.alwaysHandleSupSub);return s?wf:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(n.style.size===Me.DISPLAY.size||r.limits);return i?xf:null}else if(r.type==="accent")return Jn(r.base)?nf:null;else if(r.type==="horizBrace"){var o=!t.sub;return o===r.isOver?vf:null}else return null};Hr({type:"supsub",htmlBuilder(e,t){var n=k3(e,t);if(n)return n(e,t);var{base:r,sup:s,sub:i}=e,o=Fe(r,t),a,l,u=t.fontMetrics(),d=0,h=0,p=r&&Jn(r);if(s){var g=t.havingStyle(t.style.sup());if(a=Fe(s,g,t),!p)d=o.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier}if(i){var b=t.havingStyle(t.style.sub());if(l=Fe(i,b,t),!p)h=o.depth+b.fontMetrics().subDrop*b.sizeMultiplier/t.sizeMultiplier}var k;if(t.style===Me.DISPLAY)k=u.sup1;else if(t.style.cramped)k=u.sup3;else k=u.sup2;var w=t.sizeMultiplier,A=le(0.5/u.ptPerEm/w),_=null;if(l){var S=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(o instanceof Ht||S){var E;_=le(-((E=o.italic)!=null?E:0))}}var R;if(a&&l){d=Math.max(d,k,a.depth+0.25*u.xHeight),h=Math.max(h,u.sub2);var L=u.defaultRuleThickness,T=4*L;if(d-a.depth-(l.height-h)<T){h=T-(d-a.depth)+l.height;var F=0.8*u.xHeight-(d-a.depth);if(F>0)d+=F,h-=F}var I=[{type:"elem",elem:l,shift:h,marginRight:A,marginLeft:_},{type:"elem",elem:a,shift:-d,marginRight:A}];R=ze({positionType:"individualShift",children:I})}else if(l){h=Math.max(h,u.sub1,l.height-0.8*u.xHeight);var q=[{type:"elem",elem:l,marginLeft:_,marginRight:A}];R=ze({positionType:"shift",positionData:h,children:q})}else if(a)d=Math.max(d,k,a.depth+0.25*u.xHeight),R=ze({positionType:"shift",positionData:-d,children:[{type:"elem",elem:a,marginRight:A}]});else throw Error("supsub must have either sup or sub.");var U=Nl(o,"right")||"mord";return ee([U],[o,ee(["msupsub"],[R])],t)},mathmlBuilder(e,t){var n=!1,r,s;if(e.base&&e.base.type==="horizBrace"){if(s=!!e.sup,s===e.base.isOver)n=!0,r=e.base.isOver}if(e.base&&(e.base.type==="op"||e.base.type==="operatorname"))e.base.parentIsSupSub=!0;var i=[We(e.base,t)];if(e.sub)i.push(We(e.sub,t));if(e.sup)i.push(We(e.sup,t));var o;if(n)o=r?"mover":"munder";else if(!e.sub){var a=e.base;if(a&&a.type==="op"&&a.limits&&(t.style===Me.DISPLAY||a.alwaysHandleSupSub))o="mover";else if(a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||t.style===Me.DISPLAY))o="mover";else o="msup"}else if(!e.sup){var l=e.base;if(l&&l.type==="op"&&l.limits&&(t.style===Me.DISPLAY||l.alwaysHandleSupSub))o="munder";else if(l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===Me.DISPLAY))o="munder";else o="msub"}else{var u=e.base;if(u&&u.type==="op"&&u.limits&&t.style===Me.DISPLAY)o="munderover";else if(u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===Me.DISPLAY||u.limits))o="munderover";else o="msubsup"}return new ie(o,i)}});Hr({type:"atom",htmlBuilder(e,t){return jl(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new ie("mo",[nn(e.text,e.mode)]);if(e.family==="bin"){var r=Jl(e,t);if(r==="bold-italic")n.setAttribute("mathvariant",r)}else if(e.family==="punct")n.setAttribute("separator","true");else if(e.family==="open"||e.family==="close")n.setAttribute("stretchy","false");return n}});var Cf={mi:"italic",mn:"normal",mtext:"normal"};Hr({type:"mathord",htmlBuilder(e,t){return $o(e,t)},mathmlBuilder(e,t){var n=new ie("mi",[nn(e.text,e.mode,t)]),r=Jl(e,t)||"italic";if(r!==Cf[n.type])n.setAttribute("mathvariant",r);return n}});Hr({type:"textord",htmlBuilder(e,t){return $o(e,t)},mathmlBuilder(e,t){var n=nn(e.text,e.mode,t),r=Jl(e,t)||"normal",s;if(e.mode==="text")s=new ie("mtext",[n]);else if(/[0-9]/.test(e.text))s=new ie("mn",[n]);else if(e.text==="\\prime")s=new ie("mo",[n]);else s=new ie("mi",[n]);if(r!==Cf[s.type])s.setAttribute("mathvariant",r);return s}});var Td=new Map([["\\nobreak","nobreak"],["\\allowbreak","allowbreak"]]),Rd=new Map([[" ",{}],["\\ ",{}],["~",{className:"nobreak"}],["\\space",{}],["\\nobreakspace",{className:"nobreak"}]]);Hr({type:"spacing",htmlBuilder(e,t){var n=Rd.get(e.text),r=Td.get(e.text);if(n){var s=n.className||"";if(e.mode==="text"){var i=$o(e,t);return i.classes.push(s),i}else return ee(["mspace",s],[jl(e.text,e.mode,t)],t)}else if(r)return ee(["mspace",r],[],t);else throw new se('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){var n;if(Rd.has(e.text))n=new ie("mtext",[new lt(" ")]);else if(Td.has(e.text))return new ie("mspace");else throw new se('Unknown type of space "'+e.text+'"');return n}});var Md=()=>{var e=new ie("mtd",[]);return e.setAttribute("width","50%"),e};Hr({type:"tag",mathmlBuilder(e,t){var n=new ie("mtable",[new ie("mtr",[Md(),new ie("mtd",[gr(e.body,t)]),Md(),new ie("mtd",[gr(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var Dd={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ld={"\\textbf":"textbf","\\textmd":"textmd"},w3={"\\textit":"textit","\\textup":"textup"},Id=(e,t)=>{var n=e.font;if(!n)return t;else if(Dd[n])return t.withTextFontFamily(Dd[n]);else if(Ld[n])return t.withTextFontWeight(Ld[n]);else if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit");return t.withTextFontShape(w3[n])};he({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0,handler(e,t){var{parser:n,funcName:r}=e,s=t[0];return{type:"text",mode:n.mode,body:ut(s),font:r}},htmlBuilder(e,t){var n=Id(e,t),r=gt(e.body,n,!0);return ee(["mord","text"],r,n)},mathmlBuilder(e,t){var n=Id(e,t);return gr(e.body,n)}});he({type:"underline",names:["\\underline"],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Fe(e.body,t),r=ws("underline-line",t),s=t.fontMetrics().defaultRuleThickness,i=ze({positionType:"top",positionData:n.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:n}]});return ee(["mord","katex-underline"],[i],t)},mathmlBuilder(e,t){var n=new ie("mo",[new lt("‾")]);n.setAttribute("stretchy","true");var r=new ie("munder",[We(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});he({type:"vcenter",names:["\\vcenter"],numArgs:1,argTypes:["original"],allowedInText:!1,handler(e,t){var n=e.parser;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Fe(e.body,t),r=t.fontMetrics().axisHeight,s=0.5*(n.height-r-(n.depth+r));return ze({positionType:"shift",positionData:s,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new ie("mpadded",[We(e.body,t)],["vcenter"]);return new ie("mrow",[n])}});he({type:"verb",names:["\\verb"],numArgs:0,allowedInText:!0,handler(e,t,n){throw new se("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){var n=Nd(e),r=[],s=t.havingStyle(t.style.text());for(var i=0;i<n.length;i++){var o=n[i];if(o==="~")o="\\textasciitilde";r.push(Mt(o,"Typewriter-Regular",e.mode,s,["mord","texttt"]))}return ee(["mord","text"].concat(s.sizingClasses(t)),Gd(r),s)},mathmlBuilder(e,t){var n=new lt(Nd(e)),r=new ie("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var Nd=(e)=>e.body.replace(/ /g,e.star?"␣":" "),hr=Zd,Sf=`[ \r
|
|
280
|
+
]`,x3="\\\\[a-zA-Z@]+",E3="\\\\[^\uD800-\uDFFF]",A3="("+x3+")"+Sf+"*",C3=`\\\\(
|
|
281
281
|
|[ \r ]+
|
|
282
|
-
?)[ \r ]*`,
|
|
283
|
-
`,this.tokenRegex.lastIndex);if(s===-1)this.tokenRegex.lastIndex=e.length,Ft({strict:this.settings.strict,errorCode:"commentAtEnd",errorMsg:"% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)",report:!0});else this.tokenRegex.lastIndex=s+1;return this.lex()}return new Kt(r,new zt(this,t,this.tokenRegex.lastIndex))}}class ef{constructor(e,t){if(e===void 0)e={};if(t===void 0)t={};this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new se("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t of Object.keys(e))if(e[t]===void 0)delete this.current[t];else this.current[t]=e[t]}endGroups(){while(this.undefStack.length>0)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];else if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e];else return}set(e,t,n){if(n===void 0)n=!1;if(n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];if(this.undefStack.length>0)this.undefStack[this.undefStack.length-1][e]=t}else{var s=this.undefStack[this.undefStack.length-1];if(s&&!Object.prototype.hasOwnProperty.call(s,e))s[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0}if(t==null)delete this.current[e];else this.current[e]=t}}var Bb=Pd;w("\\noexpand",function(e){var t=e.popToken();if(e.isExpandable(t.text))t.noexpand=!0,t.treatAsRelax=!0;return{tokens:[t],numArgs:0}});w("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});w("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});w("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});w("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();if(t[0].length===1&&t[0][0].text===n.text)return{tokens:t[1],numArgs:0};else return{tokens:t[2],numArgs:0}});w("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");w("\\TextOrMath",function(e){var t=e.consumeArgs(2);if(e.mode==="text")return{tokens:t[0],numArgs:0};else return{tokens:t[1],numArgs:0}});var cd={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};w("\\char",function(e){var t=e.popToken(),n,r=0;if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")r=t.text.charCodeAt(1);else if(t.text==="EOF")throw new se("\\char` missing argument");else r=t.text.charCodeAt(0);else n=10;if(n){if(r=cd[t.text],r==null||r>=n)throw new se("Invalid base-"+n+" digit "+t.text);var s;while((s=cd[e.future().text])!=null&&s<n)r*=n,r+=s,e.popToken()}return"\\@char{"+r+"}"});var Nl=(e,t,n,r)=>{var s=e.consumeArg().tokens;if(s.length!==1)throw new se("\\newcommand's first argument must be a macro name");var i=s[0].text,o=e.isDefined(i);if(o&&!t)throw new se("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!o&&!n)throw new se("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var a=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){var l="",u=e.expandNextToken();while(u.text!=="]"&&u.text!=="EOF")l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new se("Invalid number of arguments: "+l);a=parseInt(l),s=e.consumeArg().tokens}if(!(o&&r))e.macros.set(i,{tokens:s,numArgs:a});return""};w("\\newcommand",(e)=>Nl(e,!1,!0,!1));w("\\renewcommand",(e)=>Nl(e,!0,!1,!1));w("\\providecommand",(e)=>Nl(e,!0,!0,!0));w("\\message",(e)=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((n)=>n.text).join("")),""});w("\\errmessage",(e)=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((n)=>n.text).join("")),""});w("\\show",(e)=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),cr[n],Qe.math[n],Qe.text[n]),""});w("\\bgroup","{");w("\\egroup","}");w("~","\\nobreakspace");w("\\lq","`");w("\\rq","'");w("\\aa","\\r a");w("\\AA","\\r A");w("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");w("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");w("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");w("ℬ","\\mathscr{B}");w("ℰ","\\mathscr{E}");w("ℱ","\\mathscr{F}");w("ℋ","\\mathscr{H}");w("ℐ","\\mathscr{I}");w("ℒ","\\mathscr{L}");w("ℳ","\\mathscr{M}");w("ℛ","\\mathscr{R}");w("ℭ","\\mathfrak{C}");w("ℌ","\\mathfrak{H}");w("ℨ","\\mathfrak{Z}");w("\\Bbbk","\\Bbb{k}");w("\\llap","\\mathllap{\\textrm{#1}}");w("\\rlap","\\mathrlap{\\textrm{#1}}");w("\\clap","\\mathclap{\\textrm{#1}}");w("\\mathstrut","\\vphantom{(}");w("\\underbar","\\underline{\\text{#1}}");w("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');w("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");w("\\ne","\\neq");w("≠","\\neq");w("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}"+"{\\mathrel{\\char`∉}}");w("∉","\\notin");w("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}"+"}{\\mathrel{\\char`≘}}");w("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");w("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");w("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}"+"{\\mathrel{\\char`≛}}");w("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}"+"{\\mathrel{\\char`≝}}");w("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}"+"{\\mathrel{\\char`≞}}");w("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");w("⟂","\\perp");w("‼","\\mathclose{!\\mkern-0.8mu!}");w("∌","\\notni");w("⌜","\\ulcorner");w("⌝","\\urcorner");w("⌞","\\llcorner");w("⌟","\\lrcorner");w("©","\\copyright");w("®","\\textregistered");w("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');w("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');w("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');w("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');w("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");w("⋮","\\vdots");w("\\varGamma","\\mathit{\\Gamma}");w("\\varDelta","\\mathit{\\Delta}");w("\\varTheta","\\mathit{\\Theta}");w("\\varLambda","\\mathit{\\Lambda}");w("\\varXi","\\mathit{\\Xi}");w("\\varPi","\\mathit{\\Pi}");w("\\varSigma","\\mathit{\\Sigma}");w("\\varUpsilon","\\mathit{\\Upsilon}");w("\\varPhi","\\mathit{\\Phi}");w("\\varPsi","\\mathit{\\Psi}");w("\\varOmega","\\mathit{\\Omega}");w("\\substack","\\begin{subarray}{c}#1\\end{subarray}");w("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");w("\\boxed","\\fbox{$\\displaystyle{#1}$}");w("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");w("\\implies","\\DOTSB\\;\\Longrightarrow\\;");w("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");w("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");w("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var ud={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},Ob=new Set(["bin","rel"]);w("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;if(n in ud)t=ud[n];else if(n.slice(0,4)==="\\not")t="\\dotsb";else if(n in Qe.math){if(Ob.has(Qe.math[n].group))t="\\dotsb"}return t});var Bl={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};w("\\dotso",function(e){var t=e.future().text;if(t in Bl)return"\\ldots\\,";else return"\\ldots"});w("\\dotsc",function(e){var t=e.future().text;if(t in Bl&&t!==",")return"\\ldots\\,";else return"\\ldots"});w("\\cdots",function(e){var t=e.future().text;if(t in Bl)return"\\@cdots\\,";else return"\\@cdots"});w("\\dotsb","\\cdots");w("\\dotsm","\\cdots");w("\\dotsi","\\!\\cdots");w("\\dotsx","\\ldots\\,");w("\\DOTSI","\\relax");w("\\DOTSB","\\relax");w("\\DOTSX","\\relax");w("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");w("\\,","\\tmspace+{3mu}{.1667em}");w("\\thinspace","\\,");w("\\>","\\mskip{4mu}");w("\\:","\\tmspace+{4mu}{.2222em}");w("\\medspace","\\:");w("\\;","\\tmspace+{5mu}{.2777em}");w("\\thickspace","\\;");w("\\!","\\tmspace-{3mu}{.1667em}");w("\\negthinspace","\\!");w("\\negmedspace","\\tmspace-{4mu}{.2222em}");w("\\negthickspace","\\tmspace-{5mu}{.277em}");w("\\enspace","\\kern.5em ");w("\\enskip","\\hskip.5em\\relax");w("\\quad","\\hskip1em\\relax");w("\\qquad","\\hskip2em\\relax");w("\\tag","\\@ifstar\\tag@literal\\tag@paren");w("\\tag@paren","\\tag@literal{({#1})}");w("\\tag@literal",(e)=>{if(e.macros.get("\\df@tag"))throw new se("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});w("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");w("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");w("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");w("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");w("\\newline","\\\\\\relax");w("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var tf=ce(gn["Main-Regular"][84][1]-0.7*gn["Main-Regular"][65][1]);w("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+tf+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");w("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+tf+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");w("\\hspace","\\@ifstar\\@hspacer\\@hspace");w("\\@hspace","\\hskip #1\\relax");w("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");w("\\ordinarycolon",":");w("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");w("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');w("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');w("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');w("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');w("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');w("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');w("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');w("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');w("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');w("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');w("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');w("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');w("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');w("∷","\\dblcolon");w("∹","\\eqcolon");w("≔","\\coloneqq");w("≕","\\eqqcolon");w("⩴","\\Coloneqq");w("\\ratio","\\vcentcolon");w("\\coloncolon","\\dblcolon");w("\\colonequals","\\coloneqq");w("\\coloncolonequals","\\Coloneqq");w("\\equalscolon","\\eqqcolon");w("\\equalscoloncolon","\\Eqqcolon");w("\\colonminus","\\coloneq");w("\\coloncolonminus","\\Coloneq");w("\\minuscolon","\\eqcolon");w("\\minuscoloncolon","\\Eqcolon");w("\\coloncolonapprox","\\Colonapprox");w("\\coloncolonsim","\\Colonsim");w("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");w("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");w("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");w("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");w("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");w("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");w("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");w("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");w("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");w("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");w("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");w("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");w("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");w("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");w("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");w("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");w("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");w("\\nleqq","\\html@mathml{\\@nleqq}{≰}");w("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");w("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");w("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");w("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");w("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");w("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");w("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");w("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");w("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");w("\\imath","\\html@mathml{\\@imath}{ı}");w("\\jmath","\\html@mathml{\\@jmath}{ȷ}");w("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}"+"{\\mathopen{\\char`⟦}}");w("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}"+"{\\mathclose{\\char`⟧}}");w("⟦","\\llbracket");w("⟧","\\rrbracket");w("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}"+"{\\mathopen{\\char`⦃}}");w("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}"+"{\\mathclose{\\char`⦄}}");w("↤","\\mapsfrom");w("\\mapsfrom","\\html@mathml{\\mathrel{\\mathreflectbox{\\mapsto}}}{\\mathrel{\\char`↤}}");w("⦃","\\lBrace");w("⦄","\\rBrace");w("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}"+"{\\char`⦵}}");w("⦵","\\minuso");w("\\darr","\\downarrow");w("\\dArr","\\Downarrow");w("\\Darr","\\Downarrow");w("\\lang","\\langle");w("\\rang","\\rangle");w("\\uarr","\\uparrow");w("\\uArr","\\Uparrow");w("\\Uarr","\\Uparrow");w("\\N","\\mathbb{N}");w("\\R","\\mathbb{R}");w("\\Z","\\mathbb{Z}");w("\\alef","\\aleph");w("\\alefsym","\\aleph");w("\\Alpha","\\mathrm{A}");w("\\Beta","\\mathrm{B}");w("\\bull","\\bullet");w("\\Chi","\\mathrm{X}");w("\\clubs","\\clubsuit");w("\\cnums","\\mathbb{C}");w("\\Complex","\\mathbb{C}");w("\\Dagger","\\ddagger");w("\\diamonds","\\diamondsuit");w("\\empty","\\emptyset");w("\\Epsilon","\\mathrm{E}");w("\\Eta","\\mathrm{H}");w("\\exist","\\exists");w("\\harr","\\leftrightarrow");w("\\hArr","\\Leftrightarrow");w("\\Harr","\\Leftrightarrow");w("\\hearts","\\heartsuit");w("\\image","\\Im");w("\\infin","\\infty");w("\\Iota","\\mathrm{I}");w("\\isin","\\in");w("\\Kappa","\\mathrm{K}");w("\\larr","\\leftarrow");w("\\lArr","\\Leftarrow");w("\\Larr","\\Leftarrow");w("\\lrarr","\\leftrightarrow");w("\\lrArr","\\Leftrightarrow");w("\\Lrarr","\\Leftrightarrow");w("\\Mu","\\mathrm{M}");w("\\natnums","\\mathbb{N}");w("\\Nu","\\mathrm{N}");w("\\Omicron","\\mathrm{O}");w("\\plusmn","\\pm");w("\\rarr","\\rightarrow");w("\\rArr","\\Rightarrow");w("\\Rarr","\\Rightarrow");w("\\real","\\Re");w("\\reals","\\mathbb{R}");w("\\Reals","\\mathbb{R}");w("\\Rho","\\mathrm{P}");w("\\sdot","\\cdot");w("\\sect","\\S");w("\\spades","\\spadesuit");w("\\sub","\\subset");w("\\sube","\\subseteq");w("\\supe","\\supseteq");w("\\Tau","\\mathrm{T}");w("\\thetasym","\\vartheta");w("\\weierp","\\wp");w("\\Zeta","\\mathrm{Z}");w("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");w("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");w("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");w("\\bra","\\mathinner{\\langle{#1}|}");w("\\ket","\\mathinner{|{#1}\\rangle}");w("\\braket","\\mathinner{\\langle{#1}\\rangle}");w("\\Bra","\\left\\langle#1\\right|");w("\\Ket","\\left|#1\\right\\rangle");var nf=(e)=>(t)=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,s=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),a=t.macros.get("\\|");t.macros.beginGroup();var l=(h)=>(p)=>{if(e){if(p.macros.set("|",o),s.length)p.macros.set("\\|",a)}var g=h;if(!h&&s.length){var b=p.future();if(b.text==="|")p.popToken(),g=!0}return{tokens:g?s:r,numArgs:0}};if(t.macros.set("|",l(!1)),s.length)t.macros.set("\\|",l(!0));var u=t.consumeArg().tokens,d=t.expandTokens([...i,...u,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};w("\\bra@ket",nf(!1));w("\\bra@set",nf(!0));w("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");w("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");w("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");w("\\angln","{\\angl n}");w("\\blue","\\textcolor{##6495ed}{#1}");w("\\orange","\\textcolor{##ffa500}{#1}");w("\\pink","\\textcolor{##ff00af}{#1}");w("\\red","\\textcolor{##df0030}{#1}");w("\\green","\\textcolor{##28ae7b}{#1}");w("\\gray","\\textcolor{gray}{#1}");w("\\purple","\\textcolor{##9d38bd}{#1}");w("\\blueA","\\textcolor{##ccfaff}{#1}");w("\\blueB","\\textcolor{##80f6ff}{#1}");w("\\blueC","\\textcolor{##63d9ea}{#1}");w("\\blueD","\\textcolor{##11accd}{#1}");w("\\blueE","\\textcolor{##0c7f99}{#1}");w("\\tealA","\\textcolor{##94fff5}{#1}");w("\\tealB","\\textcolor{##26edd5}{#1}");w("\\tealC","\\textcolor{##01d1c1}{#1}");w("\\tealD","\\textcolor{##01a995}{#1}");w("\\tealE","\\textcolor{##208170}{#1}");w("\\greenA","\\textcolor{##b6ffb0}{#1}");w("\\greenB","\\textcolor{##8af281}{#1}");w("\\greenC","\\textcolor{##74cf70}{#1}");w("\\greenD","\\textcolor{##1fab54}{#1}");w("\\greenE","\\textcolor{##0d923f}{#1}");w("\\goldA","\\textcolor{##ffd0a9}{#1}");w("\\goldB","\\textcolor{##ffbb71}{#1}");w("\\goldC","\\textcolor{##ff9c39}{#1}");w("\\goldD","\\textcolor{##e07d10}{#1}");w("\\goldE","\\textcolor{##a75a05}{#1}");w("\\redA","\\textcolor{##fca9a9}{#1}");w("\\redB","\\textcolor{##ff8482}{#1}");w("\\redC","\\textcolor{##f9685d}{#1}");w("\\redD","\\textcolor{##e84d39}{#1}");w("\\redE","\\textcolor{##bc2612}{#1}");w("\\maroonA","\\textcolor{##ffbde0}{#1}");w("\\maroonB","\\textcolor{##ff92c6}{#1}");w("\\maroonC","\\textcolor{##ed5fa6}{#1}");w("\\maroonD","\\textcolor{##ca337c}{#1}");w("\\maroonE","\\textcolor{##9e034e}{#1}");w("\\purpleA","\\textcolor{##ddd7ff}{#1}");w("\\purpleB","\\textcolor{##c6b9fc}{#1}");w("\\purpleC","\\textcolor{##aa87ff}{#1}");w("\\purpleD","\\textcolor{##7854ab}{#1}");w("\\purpleE","\\textcolor{##543b78}{#1}");w("\\mintA","\\textcolor{##f5f9e8}{#1}");w("\\mintB","\\textcolor{##edf2df}{#1}");w("\\mintC","\\textcolor{##e0e5cc}{#1}");w("\\grayA","\\textcolor{##f6f7f7}{#1}");w("\\grayB","\\textcolor{##f0f1f2}{#1}");w("\\grayC","\\textcolor{##e3e5e6}{#1}");w("\\grayD","\\textcolor{##d6d8da}{#1}");w("\\grayE","\\textcolor{##babec2}{#1}");w("\\grayF","\\textcolor{##888d93}{#1}");w("\\grayG","\\textcolor{##626569}{#1}");w("\\grayH","\\textcolor{##3b3e40}{#1}");w("\\grayI","\\textcolor{##21242c}{#1}");w("\\kaBlue","\\textcolor{##314453}{#1}");w("\\kaGreen","\\textcolor{##71B307}{#1}");var rf={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class sf{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new ef(Bb,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new wl(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){if(this.stack.length===0)this.pushToken(this.lexer.lex());return this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken();var s=this.consumeArg(["]"]);r=s.tokens,n=s.end}else{var i=this.consumeArg();r=i.tokens,t=i.start,n=i.end}return this.pushToken(new Kt("EOF",n.loc)),this.pushTokens(r),new Kt("",zt.range(t,n))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],n=e&&e.length>0;if(!n)this.consumeSpaces();var r=this.future(),s,i=0,o=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++i;else if(s.text==="}"){if(--i,i===-1)throw new se("Extra }",s)}else if(s.text==="EOF")throw new se("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",s);if(e&&n)if((i===0||i===1&&e[o]==="{")&&s.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}while(i!==0||n);if(r.text==="{"&&t[t.length-1].text==="}")t.pop(),t.shift();return t.reverse(),{tokens:t,start:r,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new se("The length of delimiters doesn't match the number of args!");var n=t[0];for(var r=0;r<n.length;r++){var s=this.popToken();if(n[r]!==s.text)throw new se("Use of the macro doesn't match its definition",s)}}var i=[];for(var o=0;o<e;o++)i.push(this.consumeArg(t&&t[o+1]).tokens);return i}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new se("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,r=!t.noexpand?this._getExpansion(n):null;if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]==="\\"&&!this.isDefined(n))throw new se("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var s=r.tokens,i=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){s=s.slice();for(var o=s.length-1;o>=0;--o){var a=s[o];if(a.text==="#"){if(o===0)throw new se("Incomplete placeholder at end of macro body",a);if(a=s[--o],a.text==="#")s.splice(o+1,1);else if(/^[1-9]$/.test(a.text))s.splice(o,2,...i[+a.text-1]);else throw new se("Not a valid argument number",a)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();if(e.treatAsRelax)e.text="\\relax";return e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Kt(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;this.pushTokens(e);while(this.stack.length>n)if(this.expandOnce(!0)===!1){var r=this.stack.pop();if(r.treatAsRelax)r.noexpand=!1,r.treatAsRelax=!1;t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);if(t)return t.map((n)=>n.text).join("");else return t}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==="function"?t(this):t;if(typeof r==="string"){var s=0;if(r.includes("#")){var i=r.replace(/##/g,"");while(i.includes("#"+(s+1)))++s}var o=new wl(r,this.settings),a=[],l=o.lex();while(l.text!=="EOF")a.push(l),l=o.lex();a.reverse();var u={tokens:a,numArgs:s};return u}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(cr,e)||Object.prototype.hasOwnProperty.call(Qe.math,e)||Object.prototype.hasOwnProperty.call(Qe.text,e)||Object.prototype.hasOwnProperty.call(rf,e)}isExpandable(e){var t=this.macros.get(e);if(t!=null)return typeof t==="string"||typeof t==="function"||!t.unexpandable;return Object.prototype.hasOwnProperty.call(cr,e)&&!cr[e].primitive}}var dd=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,fo=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),nl={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:"\\\"",math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},fd={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class Mo{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new sf(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0)t=!0;if(this.fetch().text!==e)throw new se("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());if(t)this.consume()}consume(){this.nextToken=null}fetch(){if(this.nextToken==null)this.nextToken=this.gullet.expandNextToken();return this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){if(!this.settings.globalGroup)this.gullet.beginGroup();if(this.settings.colorIsTextColor)this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);if(this.expect("EOF"),!this.settings.globalGroup)this.gullet.endGroup();return e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Kt("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){var n=[];while(!0){if(this.mode==="math")this.consumeSpaces();var r=this.fetch();if(Mo.endOfExpression.has(r.text))break;if(t&&r.text===t)break;if(e&&cr[r.text]&&cr[r.text].infix)break;var s=this.parseAtom(t);if(!s)break;else if(s.type==="internal")continue;n.push(s)}if(this.mode==="text")this.formLigatures(n);return this.handleInfixNodes(n)}handleInfixNodes(e){var t=-1,n;for(var r=0;r<e.length;r++){var s=e[r];if(s.type==="infix"){if(t!==-1)throw new se("only one infix operator per group",s.token);t=r,n=s.replaceWith}}if(t!==-1&&n){var i,o,a=e.slice(0,t),l=e.slice(t+1);if(a.length===1&&a[0].type==="ordgroup")i=a[0];else i={type:"ordgroup",mode:this.mode,body:a};if(l.length===1&&l[0].type==="ordgroup")o=l[0];else o={type:"ordgroup",mode:this.mode,body:l};var u;if(n==="\\\\abovefrac")u=this.callFunction(n,[i,e[t],o],[]);else u=this.callFunction(n,[i,o],[]);return[u]}else return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do{var s;r=this.parseGroup(e)}while(((s=r)==null?void 0:s.type)==="internal");if(!r)throw new se("Expected group after '"+n+"'",t);return r}formatUnsupportedCmd(e){var t=[];for(var n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t},s={type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]};return s}parseAtom(e){var t=this.parseGroup("atom",e);if((t==null?void 0:t.type)==="internal")return t;if(this.mode==="text")return t;var n,r;while(!0){this.consumeSpaces();var s=this.fetch();if(s.text==="\\limits"||s.text==="\\nolimits"){if(t&&t.type==="op")t.limits=s.text==="\\limits",t.alwaysHandleSupSub=!0;else if(t&&t.type==="operatorname"){if(t.alwaysHandleSupSub)t.limits=s.text==="\\limits"}else throw new se("Limit controls must follow a math operator",s);this.consume()}else if(s.text==="^"){if(n)throw new se("Double superscript",s);n=this.handleSupSubscript("superscript")}else if(s.text==="_"){if(r)throw new se("Double subscript",s);r=this.handleSupSubscript("subscript")}else if(s.text==="'"){if(n)throw new se("Double superscript",s);var i={type:"textord",mode:this.mode,text:"\\prime"},o=[i];this.consume();while(this.fetch().text==="'")o.push(i),this.consume();if(this.fetch().text==="^")o.push(this.handleSupSubscript("superscript"));n={type:"ordgroup",mode:this.mode,body:o}}else if(fo[s.text]){var a=dd.test(s.text),l=[];l.push(new Kt(fo[s.text])),this.consume();while(!0){var u=this.fetch().text;if(!fo[u])break;if(dd.test(u)!==a)break;l.unshift(new Kt(fo[u])),this.consume()}var d=this.subparse(l);if(a)r={type:"ordgroup",mode:"math",body:d};else n={type:"ordgroup",mode:"math",body:d}}else break}if(n&&r)return{type:"supsub",mode:this.mode,base:t,sup:n,sub:r};else if(n)return{type:"supsub",mode:this.mode,base:t,sup:n};else if(r)return{type:"supsub",mode:this.mode,base:t,sub:r};else return t}parseFunction(e,t){var n=this.fetch(),r=n.text,s=cr[r];if(!s)return null;if(this.consume(),t&&t!=="atom"&&!s.allowedInArgument)throw new se("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);else if(this.mode==="text"&&!s.allowedInText)throw new se("Can't use function '"+r+"' in text mode",n);else if(this.mode==="math"&&s.allowedInMath===!1)throw new se("Can't use function '"+r+"' in math mode",n);var i=this.parseArguments(r,s),{args:o,optArgs:a}=i;return this.callFunction(r,o,a,n,e)}callFunction(e,t,n,r,s){var i={funcName:e,parser:this,token:r,breakOnTokenText:s},o=cr[e];if(o&&o.handler)return o.handler(i,t,n);else throw new se("No function handler for "+e)}parseArguments(e,t){var n,r=(n=t.numOptionalArgs)!=null?n:0,s=t.numArgs+r;if(s===0)return{args:[],optArgs:[]};var i=[],o=[];for(var a=0;a<s;a++){var l,u=(l=t.argTypes)==null?void 0:l[a],d=a<r;if("primitive"in t&&t.primitive&&u==null||t.type==="sqrt"&&a===1&&o[0]==null)u="primitive";var h=this.parseGroupOfType("argument to '"+e+"'",u,d);if(d)o.push(h);else if(h!=null)i.push(h);else throw new se("Null argument, please report this as a bug")}return{args:i,optArgs:o}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":{var r=this.parseArgumentGroup(n,"text");return r!=null?{type:"styling",mode:r.mode,body:[r],style:"text",resetFont:!0}:null}case"raw":{this.gullet.consumeSpaces();var s=this.gullet.lexer.catcodes["%"];this.gullet.lexer.setCatcode("%",12);var i=this.parseStringGroup(n);return this.gullet.lexer.setCatcode("%",s),i!=null?{type:"raw",mode:"text",string:i.text}:null}case"primitive":{if(n)throw new se("A primitive argument cannot be optional");var o=this.parseGroup(e);if(o==null)throw new se("Expected group as "+e,this.fetch());return o}case"original":case void 0:return this.parseArgumentGroup(n);default:throw new se("Unknown group type as "+e,this.fetch())}}consumeSpaces(){while(this.fetch().text===" ")this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(t==null)return null;var n="",r;while((r=this.fetch()).text!=="EOF")n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){var n=this.fetch(),r=n,s="",i;while((i=this.fetch()).text!=="EOF"&&e.test(s+i.text))r=i,s+=r.text,this.consume();if(s==="")throw new se("Invalid "+t+": '"+n.text+"'",n);return n.range(r,s)}parseColorGroup(e){var t=this.parseStringGroup(e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new se("Invalid color: '"+t.text+"'",t);var r=n[0];if(/^[0-9a-f]{6}$/i.test(r))r="#"+r;return{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{")t=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size");else t=this.parseStringGroup(e);if(!t)return null;if(!e&&t.text.length===0)t.text="0pt",n=!0;var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new se("Invalid size: '"+t.text+"'",t);var s={number:+(r[1]+r[2]),unit:r[3]};if(!md(s))throw new se("Invalid unit: '"+s.unit+"'",t);return{type:"size",mode:this.mode,value:s,isBlank:n}}parseUrlGroup(e){var t=this.gullet.lexer.catcodes["%"],n=this.gullet.lexer.catcodes["~"];this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode("%",t),this.gullet.lexer.setCatcode("~",n),r==null)return null;var s=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:s}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;if(t)this.switchMode(t);this.gullet.beginGroup();var s=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:n.loc,body:s};if(t)this.switchMode(r);return i}parseGroup(e,t){var n=this.fetch(),r=n.text,s;if(r==="{"||r==="\\begingroup"){this.consume();var i=r==="{"?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,i),a=this.fetch();this.expect(i),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:zt.range(n,a),body:o,semisimple:r==="\\begingroup"||void 0}}else if(s=this.parseFunction(t,e)||this.parseSymbol(),s==null&&r[0]==="\\"&&!Object.prototype.hasOwnProperty.call(rf,r)){if(this.settings.throwOnError)throw new se("Undefined control sequence: "+r,n);s=this.formatUnsupportedCmd(r),this.consume()}return s}formLigatures(e){var t=e.length-1;for(var n=0;n<t;++n){var r=e[n];if(r.type!=="textord")continue;var s=r.text,i=e[n+1];if(!i||i.type!=="textord")continue;if(s==="-"&&i.text==="-"){var o=e[n+2];if(n+1<t&&o&&o.type==="textord"&&o.text==="-")e.splice(n,3,{type:"textord",mode:"text",loc:zt.range(r,o),text:"---"}),t-=2;else e.splice(n,2,{type:"textord",mode:"text",loc:zt.range(r,i),text:"--"}),t-=1}if((s==="'"||s==="`")&&i.text===s)e.splice(n,2,{type:"textord",mode:"text",loc:zt.range(r,i),text:s+s}),t-=1}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)==="*";if(r)n=n.slice(1);if(n.length<2||n.charAt(0)!==n.slice(-1))throw new se(`\\verb assertion failed --
|
|
284
|
-
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:r}}if(Object.prototype.hasOwnProperty.call(fd,t[0])&&!Qe[this.mode][t[0]]){if(this.settings.strict&&this.mode==="math")Ft({strict:this.settings.strict,errorCode:"unicodeTextInMathMode",errorMsg:'Accented Unicode text character "'+t[0]+'" used in math mode',report:!0,token:e});t=fd[t[0]]+t.slice(1)}var s=Ib.exec(t);if(s){if(t=t.substring(0,s.index),t==="i")t="ı";else if(t==="j")t="ȷ"}var i;if(Qe[this.mode][t]){if(this.settings.strict&&this.mode==="math"&&ol.includes(t))Ft({strict:this.settings.strict,errorCode:"unicodeTextInMathMode",errorMsg:'Latin-1/Unicode text character "'+t[0]+'" used in math mode',report:!0,token:e});var o=Qe[this.mode][t].group,a=zt.range(e),l;if(W2(o))l={type:"atom",mode:this.mode,family:o,loc:a,text:t};else l={type:o,mode:this.mode,loc:a,text:t};i=l}else if(t.charCodeAt(0)>=128){if(this.settings.strict){if(!hd(t.charCodeAt(0)))Ft({strict:this.settings.strict,errorCode:"unknownSymbol",errorMsg:'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),report:!0,token:e});else if(this.mode==="math")Ft({strict:this.settings.strict,errorCode:"unicodeTextInMathMode",errorMsg:'Unicode text character "'+t[0]+'" used in math mode',report:!0,token:e})}i={type:"textord",mode:"text",loc:zt.range(e),text:t}}else return null;if(this.consume(),s)for(var u=0;u<s[0].length;u++){var d=s[0][u];if(!nl[d])throw new se("Unknown accent ' "+d+"'",e);var h=nl[d][this.mode]||nl[d].text;if(!h)throw new se("Accent "+d+" unsupported in "+this.mode+" mode",e);i={type:"accent",mode:this.mode,loc:zt.range(e),label:h,isStretchy:!1,isShifty:!0,base:i}}return i}}Mo.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var Ol=function(t,n){if(!(typeof t==="string"||t instanceof String))throw TypeError("KaTeX can only parse string typed expression");var r=new Mo(t,n);delete r.gullet.macros.current["\\df@tag"];var s=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!n.displayMode)throw new se("\\tag works only in display equations");s=[{type:"tag",mode:"text",body:s,tag:r.subparse([new Kt("\\df@tag")])}]}return s},of=function(t,n,r){n.textContent="";var s=$l(t,r).toNode();n.appendChild(s)};if(typeof document<"u"){if(document.compatMode!=="CSS1Compat")typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),of=function(){throw new se("KaTeX doesn't work in quirks mode.")}}var $b=function(t,n){var r=$l(t,n).toMarkup();return r},zb=function(t,n){var r=new ko(n);return Ol(t,r)},af=function(t,n,r){if(r.throwOnError||!(t instanceof se))throw t;var s=ee(["katex-error"],[new qt(n)]);return s.setAttribute("title",t.toString()),s.setAttribute("style","color:"+r.errorColor),s},$l=function(t,n){var r=new ko(n);try{var s=Ol(t,r);return N2(s,t,r)}catch(i){return af(i,t,r)}},Fb=function(t,n){var r=new ko(n);try{var s=Ol(t,r);return B2(s,r)}catch(i){return af(i,t,r)}},qb="0.19.1",Hb={Span:Or,Anchor:di,SymbolNode:qt,SvgNode:bn,PathNode:qn,LineNode:vo},zl={version:qb,render:of,renderToString:$b,ParseError:se,SETTINGS_SCHEMA:rl,__parse:zb,__renderToDomTree:$l,__renderToHTMLTree:Fb,__setFontMetrics:p2,__defineSymbol:f,__defineFunction:he,__defineMacro:w,__domTree:Hb};var Df=Op(Mf(),1);var ys=Df.default;function Lf(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});let s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(a);let l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},d={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=e.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),b={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},x=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],k=["true","false"],E={match:/(\/[a-z._-]+)+/},T=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],_=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],A=["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"],D=["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:x,literal:k,built_in:[...T,..._,"set","shopt",...A,...D]},contains:[g,e.SHEBANG(),b,h,i,o,E,a,l,u,d,n]}}function If(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",i="<[^<>]+>",o="(decltype\\(auto\\)|"+t.optional("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a=t.concat(/\batomic_/,t.either("bool","char","schar","uchar","short","ushort","int","uint","long","ulong","llong","ullong","char16_t","char32_t","wchar_t","int_least8_t","uint_least8_t","int_least16_t","uint_least16_t","int_least32_t","uint_least32_t","int_least64_t","uint_least64_t","int_fast8_t","uint_fast8_t","int_fast16_t","uint_fast16_t","int_fast32_t","uint_fast32_t","int_fast64_t","uint_fast64_t","intptr_t","uintptr_t","size_t","ptrdiff_t","intmax_t","uintmax_t"),/\b/),l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:a}]},u="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",d={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.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:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},h={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},p={scope:"meta",begin:/#\s*include\b/,end:/$/,keywords:{keyword:"include"},contains:[{begin:/\\\n/},d,{scope:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},g={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},e.inherit(d,{className:"string"}),n,e.C_BLOCK_COMMENT_MODE]},b=[p,g],x={className:"title",begin:t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},k=t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",E=12,A={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"},D=[...b,l,n,e.C_BLOCK_COMMENT_MODE,h,d],R={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:A,contains:D.concat([{begin:/\(/,end:/\)/,keywords:A,contains:D.concat(["self"]),relevance:0}]),relevance:0},L={begin:"("+o+"[\\*&\\s]+){1,12}"+k,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:A,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:A,relevance:0},{begin:k,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,l,{begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,h,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,...b]};return{name:"C",aliases:["h"],keywords:A,disableAutodetect:!0,illegal:"</",contains:[].concat(R,L,D,[...b,{begin:e.IDENT_RE+"::",keywords:A},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:d,keywords:A}}}function Nf(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",i="<[^<>]+>",o="(?!struct)(decltype\\(auto\\)|"+t.optional("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.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:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:\\b[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|\\b[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|\\b0[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},h={scope:"meta",begin:/#\s*include\b/,end:/$/,keywords:{keyword:"include"},contains:[{begin:/\\\n/},u,{scope:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},p={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},e.inherit(u,{className:"string"}),n,e.C_BLOCK_COMMENT_MODE]},g=[h,p],b={className:"title",begin:t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},x=t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",k=12,E=["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"],T=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],_=["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"],A=["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"],L={type:T,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:_},B={className:"function.dispatch",relevance:0,keywords:{_hint:A},begin:t.concat(/\b/,`(?!${E.join("|")})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},O=[B,...g,a,n,e.C_BLOCK_COMMENT_MODE,d,u],H={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:L,contains:O.concat([{begin:/\(/,end:/\)/,keywords:L,contains:O.concat(["self"]),relevance:0}]),relevance:0},K={className:"function",begin:"("+o+"[\\*&\\s]+){1,12}"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:L,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:L,relevance:0},{begin:x,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:L,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,d,a,{begin:/\(/,end:/\)/,keywords:L,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,d,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,...g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:L,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(H,K,B,O,[...g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:L,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:L},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}var D3=(e)=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.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_-]*/}}),L3=["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"],I3=["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"],N3=[...L3,...I3],B3=["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(),O3=["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(),$3=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),z3=["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","corner-bottom-left-shape","corner-bottom-right-shape","corner-shape","corner-top-left-shape","corner-top-right-shape","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","unicode-range","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 Bf(e){let t=e.regex,n=D3(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",i=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+O3.join("|")+")"},{begin:":(:)?("+$3.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+z3.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,n.UNICODE_RANGE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:B3.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+N3.join("|")+")\\b"}]}}function Of(e){let t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function $f(e){let i={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:i,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\b0[bB](_?[01])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:i,illegal:/["']/}]}]}}var ks="[0-9](_*[0-9])*",Bo=`\\.(${ks})`,Oo="[0-9a-fA-F](_*[0-9a-fA-F])*",zf={className:"number",variants:[{begin:`(\\b(${ks})((${Bo})|\\.)?|(${Bo}))[eE][+-]?(${ks})[fFdD]?\\b`},{begin:`\\b(${ks})((${Bo})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Bo})[fFdD]?\\b`},{begin:`\\b(${ks})[fFdD]\\b`},{begin:`\\b0[xX]((${Oo})\\.?|(${Oo})?\\.(${Oo}))[pP][+-]?(${ks})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Oo})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Ff(e,t,n){if(n===-1)return"";return e.replace(t,(r)=>Ff(e,t,n-1))}function qf(e){let t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r="(?:(?:\\s*\\[\\s*])+)?",s="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"+"<@@@>(?:(?:\\s*\\[\\s*])+)?",o="(?:"+("\\?(?:\\s+(?:extends|super)\\s+"+s+")?")+"|"+s+")",a=Ff("(?:\\s*<\\s*"+o+"(?:\\s*,\\s*"+o+")*\\s*>)?",/<@@@>/g,2),p={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"]},g={className:"meta",begin:"@"+"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{beginKeywords:"new throw return else yield assert",relevance:0},{begin:["[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t.concat(a,"(?:(?:\\s*\\[\\s*])+)?",/\s+/),"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*","(?:(?:\\s*\\[\\s*])+)?",/\s*/,/=(?!=)/],className:{1:"type",3:"variable",6:"operator"}},{begin:[/record/,/\s+/,"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"],className:{1:"keyword",3:"title.class"},contains:[b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{begin:["[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t.concat(a,"(?:(?:\\s*\\[\\s*])+)?",/\s+/),"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",/\s*(?=\()/],className:{1:"type",3:"title.function"},keywords:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,zf,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},zf,g]}}var F3=["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"],q3=["true","false","null","undefined","NaN","Infinity"],Hf=["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"],Pf=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Uf=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],H3=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],P3=[].concat(Uf,Hf,Pf);function Wf(e){let t=e.regex,n=(Z,{after:Q})=>{let oe="</"+Z[0].slice(1);return Z.input.indexOf(oe,Q)!==-1},r="[A-Za-z$_][0-9A-Za-z$_]*",s={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,Q)=>{let oe=Z[0].length+Z.index,F=Z.input[oe];if(F==="<"||F===","){Q.ignoreMatch();return}if(F===">"){if(!n(Z,{after:oe}))Q.ignoreMatch()}let X,te=Z.input.substring(oe);if(X=te.match(/^\s*=/)){Q.ignoreMatch();return}if(X=te.match(/^\s+extends\s+/)){if(X.index===0){Q.ignoreMatch();return}}}},a={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:F3,literal:q3,built_in:P3,"variable.language":H3},l="[0-9](_?[0-9])*",u="\\.([0-9](_?[0-9])*)",d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:"(\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)((\\.([0-9](_?[0-9])*))|\\.)?|(\\.([0-9](_?[0-9])*)))[eE][+-]?([0-9](_?[0-9])*)\\b"},{begin:"\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)\\b((\\.([0-9](_?[0-9])*))\\b|\\.)?|(\\.([0-9](_?[0-9])*))\\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},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},T={className:"comment",variants:[e.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:"[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,k,{match:/\$\d+/},h];p.contains=_.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(_)});let A=[].concat(T,p.contains),D=A.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(A)}]),R={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:D},L={variants:[{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s+/,/extends/,/\s+/,t.concat("[A-Za-z$_][0-9A-Za-z$_]*","(",t.concat(/\./,"[A-Za-z$_][0-9A-Za-z$_]*"),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*"],scope:{1:"keyword",3:"title.class"}}]},B={relevance:0,match:t.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:{_:[...Hf,...Pf]}},O={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},H={variants:[{match:[/function/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[R],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(Z){return t.concat("(?!",Z.join("|"),")")}let de={match:t.concat(/\b/,G([...Uf,"super","import","await"].map((Z)=>`${Z}\\s*\\(`)),"[A-Za-z$_][0-9A-Za-z$_]*",t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ne={begin:t.concat(/\./,t.lookahead(t.concat("[A-Za-z$_][0-9A-Za-z$_]*",/(?![0-9A-Za-z$_(])/))),end:"[A-Za-z$_][0-9A-Za-z$_]*",excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ae={match:[/get|set/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},R]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",j={match:[/const|var|let/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[R]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:B},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),O,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,k,T,{match:/\$\d+/},h,B,{scope:"attr",match:"[A-Za-z$_][0-9A-Za-z$_]*"+t.lookahead(":"),relevance:0},j,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:i},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},H,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[R,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*",className:"title.function"})]},{match:/\.\.\./,relevance:0},ne,{match:"\\$[A-Za-z$_][0-9A-Za-z$_]*",relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[R]},de,K,L,ae,{match:/\$[(.]/}]}}var U3={scope:"number",match:"([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",relevance:0};function jf(e){let t={className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],s={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,s,U3,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function Gf(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={match:/^ {0,3}([-*_])[ \t]*(?:\1[ \t]*){2,}$/},s={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}]},i={className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),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}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=e.inherit(u,{contains:[]}),p=e.inherit(d,{contains:[]});u.contains.push(p),d.contains.push(h);let g=[n,l];return[u,d,h,p].forEach((E)=>{E.contains=E.contains.concat(g)}),g=g.concat(u,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:g}]}]},n,i,r,u,d,{className:"quote",begin:"^>\\s+",contains:g,end:"$"},s,l,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Kf(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","lazy","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","aiter","all","anext","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozendict","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","sentinel","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"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},d={begin:/\{\{/,relevance:0},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,d,u]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,d,u]},{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:/([fFtT][rR]|[rR][fFtT]|[fFtT])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,d,u]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",g="(\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.",b=`\\b|${r.join("|")}`,x={className:"number",relevance:0,variants:[{begin:`(\\b([0-9](_?[0-9])*)|((\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.))[eE][+-]?([0-9](_?[0-9])*)[jJ]?(?=${b})`},{begin:"((\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.)[jJ]?"},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${b})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${b})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${b})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${b})`},{begin:`\\b([0-9](_?[0-9])*)[jJ](?=${b})`}]},k={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},E={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,x,h,e.HASH_COMMENT_MODE]}]};return u.contains=[h,x,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,x,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,k,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[E]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[x,E,h]}]}}function Vf(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),i={scope:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!(?:let|for|while|if|else|match)\b)/,s,t.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(16|32|64|128))?",a=["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","raw","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["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!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f16","f32","f64","f128","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:d,keyword:a,literal:l,built_in:u},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{scope:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|"|\\|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{scope:"number",variants:[{begin:"\\b0b([01_]+)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"},{begin:"\\b0o([0-7_]+)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"},{begin:"\\b0x([A-Fa-f0-9_]+)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"}],relevance:0},{begin:[/\bsafe/,/\s+/,/extern/],scope:{1:"keyword",3:"keyword"}},{begin:[/fn/,/\s+/,r],scope:{1:"keyword",3:"title.function"}},{scope:"meta",begin:"#!?\\[",end:"\\]",contains:[{scope:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],scope:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],scope:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],scope:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],scope:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:u,type:d}},{scope:"punctuation",begin:"->"},i]}}function Jf(e){let t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},i=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],a=["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"],l=["add","asc","collation","desc","final","first","last","view"],u=["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"],d=["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"],h=["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"],p=["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"],g=d,b=[...u,...l].filter((D)=>!d.includes(D)),x={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},k={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},E={match:t.concat(/\b/,t.either(...g),/\s*\(/),relevance:0,keywords:{built_in:g}};function T(D){return t.concat(/\b/,t.either(...D.map((R)=>R.replace(/\s+/,"\\s+"))),/\b/)}let _={scope:"keyword",match:T(p),relevance:0};function A(D,{exceptions:R,when:L}={}){let B=L;return R=R||[],D.map((O)=>{if(O.match(/\|\d+$/)||R.includes(O))return O;else if(B(O))return`${O}|0`;else return O})}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:A(b,{when:(D)=>D.length<3}),literal:i,type:a,built_in:h},contains:[{scope:"type",match:T(o)},_,E,x,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,k]}}var Zf=["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"],Yf=["true","false","null","undefined","NaN","Infinity"],Xf=["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"],Qf=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],eh=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],th=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],nh=[].concat(eh,Xf,Qf);function W3(e){let t=e.regex,n=(Z,{after:Q})=>{let oe="</"+Z[0].slice(1);return Z.input.indexOf(oe,Q)!==-1},r="[A-Za-z$_][0-9A-Za-z$_]*",s={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,Q)=>{let oe=Z[0].length+Z.index,F=Z.input[oe];if(F==="<"||F===","){Q.ignoreMatch();return}if(F===">"){if(!n(Z,{after:oe}))Q.ignoreMatch()}let X,te=Z.input.substring(oe);if(X=te.match(/^\s*=/)){Q.ignoreMatch();return}if(X=te.match(/^\s+extends\s+/)){if(X.index===0){Q.ignoreMatch();return}}}},a={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:Zf,literal:Yf,built_in:nh,"variable.language":th},l="[0-9](_?[0-9])*",u="\\.([0-9](_?[0-9])*)",d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:"(\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)((\\.([0-9](_?[0-9])*))|\\.)?|(\\.([0-9](_?[0-9])*)))[eE][+-]?([0-9](_?[0-9])*)\\b"},{begin:"\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)\\b((\\.([0-9](_?[0-9])*))\\b|\\.)?|(\\.([0-9](_?[0-9])*))\\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},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},T={className:"comment",variants:[e.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:"[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,k,{match:/\$\d+/},h];p.contains=_.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(_)});let A=[].concat(T,p.contains),D=A.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(A)}]),R={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:D},L={variants:[{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s+/,/extends/,/\s+/,t.concat("[A-Za-z$_][0-9A-Za-z$_]*","(",t.concat(/\./,"[A-Za-z$_][0-9A-Za-z$_]*"),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*"],scope:{1:"keyword",3:"title.class"}}]},B={relevance:0,match:t.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:{_:[...Xf,...Qf]}},O={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},H={variants:[{match:[/function/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[R],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(Z){return t.concat("(?!",Z.join("|"),")")}let de={match:t.concat(/\b/,G([...eh,"super","import","await"].map((Z)=>`${Z}\\s*\\(`)),"[A-Za-z$_][0-9A-Za-z$_]*",t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ne={begin:t.concat(/\./,t.lookahead(t.concat("[A-Za-z$_][0-9A-Za-z$_]*",/(?![0-9A-Za-z$_(])/))),end:"[A-Za-z$_][0-9A-Za-z$_]*",excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ae={match:[/get|set/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},R]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",j={match:[/const|var|let/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[R]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:B},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),O,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,k,T,{match:/\$\d+/},h,B,{scope:"attr",match:"[A-Za-z$_][0-9A-Za-z$_]*"+t.lookahead(":"),relevance:0},j,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:i},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},H,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[R,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*",className:"title.function"})]},{match:/\.\.\./,relevance:0},ne,{match:"\\$[A-Za-z$_][0-9A-Za-z$_]*",relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[R]},de,K,L,ae,{match:/\$[(.]/}]}}function rh(e){let t=e.regex,n=W3(e),r="[A-Za-z$_][0-9A-Za-z$_]*",s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:Zf.concat(l),literal:Yf,built_in:nh.concat(s),"variable.language":th},d={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},h=(x,k,E)=>{let T=x.contains.findIndex((_)=>_.label===k);if(T===-1)throw Error("can not find mode to replace");x.contains.splice(T,1,E)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(d);let p=n.contains.find((x)=>x.scope==="attr"),g=Object.assign({},p,{match:t.concat("[A-Za-z$_][0-9A-Za-z$_]*",t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,p,g]),n.contains=n.contains.concat([d,i,o,g]),h(n,"shebang",e.SHEBANG()),h(n,"use_strict",a);let b=n.contains.find((x)=>x.label==="func.def");return b.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function sh(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(i,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[i,l,a,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[i,o,l,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:"css"}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:"javascript"}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function ih(e){let r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},a=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l="[0-9]{4}(-[0-9][0-9]){0,2}",u="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",d="(\\.[0-9]*)?",h="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",p={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"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:"true false yes no null",relevance:0},b={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},x={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},k=[r,{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+![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"type",begin:"!<[\\w#;/?:@&=+$,.~*'()[\\]]+>"},{className:"type",begin:"![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"type",begin:"!![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:"true false yes no null",keywords:{literal:"true false yes no null"}},p,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},b,x,i,o],E=[...k];return E.pop(),E.push(a),g.contains=E,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:k}}var j3={bash:Lf,c:If,cpp:Nf,css:Bf,diff:Of,go:$f,java:qf,javascript:Wf,json:jf,markdown:Gf,python:Kf,rust:Vf,sql:Jf,typescript:rh,xml:sh,yaml:ih};for(let[e,t]of Object.entries(j3))ys.registerLanguage(e,t);ys.registerAliases(["sh","shell","zsh"],{languageName:"bash"});ys.registerAliases("tsx",{languageName:"typescript"});var $o=262144,G3=24576,uh=4096,K3=65536,Ht=new bu({html:!1,linkify:!0,maxNesting:24}),pr=Ht.utils.escapeHtml,V3=0,oh=new WeakMap,ah=new WeakMap;function dh(e,t){if(!e||typeof e.remaining!=="number"||e.remaining<t)return!1;return e.remaining-=t,!0}function Wl(e){if(!/^(?:https?:\/\/|mailto:)/i.test(e))return;let t=URL.parse(e);if(t&&!t.username&&!t.password&&t.origin!==globalThis.location?.origin)return t}function lh(e){return e.normalize("NFKC").toLowerCase().trim().replace(/[^\p{L}\p{N}\p{M}_\s-]/gu,"").replace(/\s+/g,"-")}Ht.validateLink=(e)=>e.startsWith("#")||Wl(e)!==void 0;function fh(e,t,n){if(e.length<=uh&&dh(n,e.length+64))try{return zl.renderToString(e,{displayMode:t,output:"mathml",trust:!1,maxExpand:128,maxSize:20})}catch(r){if(!(r instanceof zl.ParseError))throw r}return`<code class="math-source">${pr(e)}</code>`}Ht.use(wu).use(Eu,{disabled:!0,label:!1}).use(Ru,{delimiters:"all",mathFence:!0,render(e,t,n){let r=fh(e,t,n);return t?`<div class="markdown-math">${r}</div>
|
|
285
|
-
`:r}});
|
|
286
|
-
`}var
|
|
287
|
-
`;
|
|
288
|
-
`;for(let e of["th","td"])
|
|
282
|
+
?)[ \r ]*`,ql="[̀-ͯ]",S3=new RegExp(ql+"+$"),_3="("+Sf+"+)|"+(C3+"|")+"([!-\\[\\]-‧-豈-]"+(ql+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ql+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+A3)+("|"+E3+")");class Hl{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(_3,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Vt("EOF",new zt(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new se("Unexpected character: '"+e[t]+"'",new Vt(e[t],new zt(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[r]===14){var s=e.indexOf(`
|
|
283
|
+
`,this.tokenRegex.lastIndex);if(s===-1)this.tokenRegex.lastIndex=e.length,qt({strict:this.settings.strict,errorCode:"commentAtEnd",errorMsg:"% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)",report:!0});else this.tokenRegex.lastIndex=s+1;return this.lex()}return new Vt(r,new zt(this,t,this.tokenRegex.lastIndex))}}class _f{constructor(e,t){if(e===void 0)e={};if(t===void 0)t={};this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new se("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t of Object.keys(e))if(e[t]===void 0)delete this.current[t];else this.current[t]=e[t]}endGroups(){while(this.undefStack.length>0)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];else if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e];else return}set(e,t,n){if(n===void 0)n=!1;if(n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];if(this.undefStack.length>0)this.undefStack[this.undefStack.length-1][e]=t}else{var s=this.undefStack[this.undefStack.length-1];if(s&&!Object.prototype.hasOwnProperty.call(s,e))s[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0}if(t==null)delete this.current[e];else this.current[e]=t}}var T3=pf;x("\\noexpand",function(e){var t=e.popToken();if(e.isExpandable(t.text))t.noexpand=!0,t.treatAsRelax=!0;return{tokens:[t],numArgs:0}});x("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});x("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});x("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});x("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();if(t[0].length===1&&t[0][0].text===n.text)return{tokens:t[1],numArgs:0};else return{tokens:t[2],numArgs:0}});x("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");x("\\TextOrMath",function(e){var t=e.consumeArgs(2);if(e.mode==="text")return{tokens:t[0],numArgs:0};else return{tokens:t[1],numArgs:0}});var Bd={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};x("\\char",function(e){var t=e.popToken(),n,r=0;if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")r=t.text.charCodeAt(1);else if(t.text==="EOF")throw new se("\\char` missing argument");else r=t.text.charCodeAt(0);else n=10;if(n){if(r=Bd[t.text],r==null||r>=n)throw new se("Invalid base-"+n+" digit "+t.text);var s;while((s=Bd[e.future().text])!=null&&s<n)r*=n,r+=s,e.popToken()}return"\\@char{"+r+"}"});var e0=(e,t,n,r)=>{var s=e.consumeArg().tokens;if(s.length!==1)throw new se("\\newcommand's first argument must be a macro name");var i=s[0].text,o=e.isDefined(i);if(o&&!t)throw new se("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!o&&!n)throw new se("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var a=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){var l="",u=e.expandNextToken();while(u.text!=="]"&&u.text!=="EOF")l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new se("Invalid number of arguments: "+l);a=parseInt(l),s=e.consumeArg().tokens}if(!(o&&r))e.macros.set(i,{tokens:s,numArgs:a});return""};x("\\newcommand",(e)=>e0(e,!1,!0,!1));x("\\renewcommand",(e)=>e0(e,!0,!1,!1));x("\\providecommand",(e)=>e0(e,!0,!0,!0));x("\\message",(e)=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((n)=>n.text).join("")),""});x("\\errmessage",(e)=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((n)=>n.text).join("")),""});x("\\show",(e)=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),hr[n],Ye.math[n],Ye.text[n]),""});x("\\bgroup","{");x("\\egroup","}");x("~","\\nobreakspace");x("\\lq","`");x("\\rq","'");x("\\aa","\\r a");x("\\AA","\\r A");x("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");x("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");x("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");x("ℬ","\\mathscr{B}");x("ℰ","\\mathscr{E}");x("ℱ","\\mathscr{F}");x("ℋ","\\mathscr{H}");x("ℐ","\\mathscr{I}");x("ℒ","\\mathscr{L}");x("ℳ","\\mathscr{M}");x("ℛ","\\mathscr{R}");x("ℭ","\\mathfrak{C}");x("ℌ","\\mathfrak{H}");x("ℨ","\\mathfrak{Z}");x("\\Bbbk","\\Bbb{k}");x("\\llap","\\mathllap{\\textrm{#1}}");x("\\rlap","\\mathrlap{\\textrm{#1}}");x("\\clap","\\mathclap{\\textrm{#1}}");x("\\mathstrut","\\vphantom{(}");x("\\underbar","\\underline{\\text{#1}}");x("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');x("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");x("\\ne","\\neq");x("≠","\\neq");x("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}"+"{\\mathrel{\\char`∉}}");x("∉","\\notin");x("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}"+"}{\\mathrel{\\char`≘}}");x("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");x("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");x("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}"+"{\\mathrel{\\char`≛}}");x("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}"+"{\\mathrel{\\char`≝}}");x("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}"+"{\\mathrel{\\char`≞}}");x("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");x("⟂","\\perp");x("‼","\\mathclose{!\\mkern-0.8mu!}");x("∌","\\notni");x("⌜","\\ulcorner");x("⌝","\\urcorner");x("⌞","\\llcorner");x("⌟","\\lrcorner");x("©","\\copyright");x("®","\\textregistered");x("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');x("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');x("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');x("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');x("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");x("⋮","\\vdots");x("\\varGamma","\\mathit{\\Gamma}");x("\\varDelta","\\mathit{\\Delta}");x("\\varTheta","\\mathit{\\Theta}");x("\\varLambda","\\mathit{\\Lambda}");x("\\varXi","\\mathit{\\Xi}");x("\\varPi","\\mathit{\\Pi}");x("\\varSigma","\\mathit{\\Sigma}");x("\\varUpsilon","\\mathit{\\Upsilon}");x("\\varPhi","\\mathit{\\Phi}");x("\\varPsi","\\mathit{\\Psi}");x("\\varOmega","\\mathit{\\Omega}");x("\\substack","\\begin{subarray}{c}#1\\end{subarray}");x("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");x("\\boxed","\\fbox{$\\displaystyle{#1}$}");x("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");x("\\implies","\\DOTSB\\;\\Longrightarrow\\;");x("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");x("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");x("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Od={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},R3=new Set(["bin","rel"]);x("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;if(n in Od)t=Od[n];else if(n.slice(0,4)==="\\not")t="\\dotsb";else if(n in Ye.math){if(R3.has(Ye.math[n].group))t="\\dotsb"}return t});var t0={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};x("\\dotso",function(e){var t=e.future().text;if(t in t0)return"\\ldots\\,";else return"\\ldots"});x("\\dotsc",function(e){var t=e.future().text;if(t in t0&&t!==",")return"\\ldots\\,";else return"\\ldots"});x("\\cdots",function(e){var t=e.future().text;if(t in t0)return"\\@cdots\\,";else return"\\@cdots"});x("\\dotsb","\\cdots");x("\\dotsm","\\cdots");x("\\dotsi","\\!\\cdots");x("\\dotsx","\\ldots\\,");x("\\DOTSI","\\relax");x("\\DOTSB","\\relax");x("\\DOTSX","\\relax");x("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");x("\\,","\\tmspace+{3mu}{.1667em}");x("\\thinspace","\\,");x("\\>","\\mskip{4mu}");x("\\:","\\tmspace+{4mu}{.2222em}");x("\\medspace","\\:");x("\\;","\\tmspace+{5mu}{.2777em}");x("\\thickspace","\\;");x("\\!","\\tmspace-{3mu}{.1667em}");x("\\negthinspace","\\!");x("\\negmedspace","\\tmspace-{4mu}{.2222em}");x("\\negthickspace","\\tmspace-{5mu}{.277em}");x("\\enspace","\\kern.5em ");x("\\enskip","\\hskip.5em\\relax");x("\\quad","\\hskip1em\\relax");x("\\qquad","\\hskip2em\\relax");x("\\tag","\\@ifstar\\tag@literal\\tag@paren");x("\\tag@paren","\\tag@literal{({#1})}");x("\\tag@literal",(e)=>{if(e.macros.get("\\df@tag"))throw new se("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});x("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");x("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");x("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");x("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");x("\\newline","\\\\\\relax");x("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Tf=le(Sn["Main-Regular"][84][1]-0.7*Sn["Main-Regular"][65][1]);x("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Tf+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");x("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Tf+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");x("\\hspace","\\@ifstar\\@hspacer\\@hspace");x("\\@hspace","\\hskip #1\\relax");x("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");x("\\ordinarycolon",":");x("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");x("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');x("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');x("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');x("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');x("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');x("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');x("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');x("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');x("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');x("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');x("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');x("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');x("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');x("∷","\\dblcolon");x("∹","\\eqcolon");x("≔","\\coloneqq");x("≕","\\eqqcolon");x("⩴","\\Coloneqq");x("\\ratio","\\vcentcolon");x("\\coloncolon","\\dblcolon");x("\\colonequals","\\coloneqq");x("\\coloncolonequals","\\Coloneqq");x("\\equalscolon","\\eqqcolon");x("\\equalscoloncolon","\\Eqqcolon");x("\\colonminus","\\coloneq");x("\\coloncolonminus","\\Coloneq");x("\\minuscolon","\\eqcolon");x("\\minuscoloncolon","\\Eqcolon");x("\\coloncolonapprox","\\Colonapprox");x("\\coloncolonsim","\\Colonsim");x("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");x("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");x("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");x("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");x("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");x("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");x("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");x("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");x("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");x("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");x("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");x("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");x("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");x("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");x("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");x("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");x("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");x("\\nleqq","\\html@mathml{\\@nleqq}{≰}");x("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");x("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");x("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");x("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");x("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");x("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");x("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");x("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");x("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");x("\\imath","\\html@mathml{\\@imath}{ı}");x("\\jmath","\\html@mathml{\\@jmath}{ȷ}");x("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}"+"{\\mathopen{\\char`⟦}}");x("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}"+"{\\mathclose{\\char`⟧}}");x("⟦","\\llbracket");x("⟧","\\rrbracket");x("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}"+"{\\mathopen{\\char`⦃}}");x("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}"+"{\\mathclose{\\char`⦄}}");x("↤","\\mapsfrom");x("\\mapsfrom","\\html@mathml{\\mathrel{\\mathreflectbox{\\mapsto}}}{\\mathrel{\\char`↤}}");x("⦃","\\lBrace");x("⦄","\\rBrace");x("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}"+"{\\char`⦵}}");x("⦵","\\minuso");x("\\darr","\\downarrow");x("\\dArr","\\Downarrow");x("\\Darr","\\Downarrow");x("\\lang","\\langle");x("\\rang","\\rangle");x("\\uarr","\\uparrow");x("\\uArr","\\Uparrow");x("\\Uarr","\\Uparrow");x("\\N","\\mathbb{N}");x("\\R","\\mathbb{R}");x("\\Z","\\mathbb{Z}");x("\\alef","\\aleph");x("\\alefsym","\\aleph");x("\\Alpha","\\mathrm{A}");x("\\Beta","\\mathrm{B}");x("\\bull","\\bullet");x("\\Chi","\\mathrm{X}");x("\\clubs","\\clubsuit");x("\\cnums","\\mathbb{C}");x("\\Complex","\\mathbb{C}");x("\\Dagger","\\ddagger");x("\\diamonds","\\diamondsuit");x("\\empty","\\emptyset");x("\\Epsilon","\\mathrm{E}");x("\\Eta","\\mathrm{H}");x("\\exist","\\exists");x("\\harr","\\leftrightarrow");x("\\hArr","\\Leftrightarrow");x("\\Harr","\\Leftrightarrow");x("\\hearts","\\heartsuit");x("\\image","\\Im");x("\\infin","\\infty");x("\\Iota","\\mathrm{I}");x("\\isin","\\in");x("\\Kappa","\\mathrm{K}");x("\\larr","\\leftarrow");x("\\lArr","\\Leftarrow");x("\\Larr","\\Leftarrow");x("\\lrarr","\\leftrightarrow");x("\\lrArr","\\Leftrightarrow");x("\\Lrarr","\\Leftrightarrow");x("\\Mu","\\mathrm{M}");x("\\natnums","\\mathbb{N}");x("\\Nu","\\mathrm{N}");x("\\Omicron","\\mathrm{O}");x("\\plusmn","\\pm");x("\\rarr","\\rightarrow");x("\\rArr","\\Rightarrow");x("\\Rarr","\\Rightarrow");x("\\real","\\Re");x("\\reals","\\mathbb{R}");x("\\Reals","\\mathbb{R}");x("\\Rho","\\mathrm{P}");x("\\sdot","\\cdot");x("\\sect","\\S");x("\\spades","\\spadesuit");x("\\sub","\\subset");x("\\sube","\\subseteq");x("\\supe","\\supseteq");x("\\Tau","\\mathrm{T}");x("\\thetasym","\\vartheta");x("\\weierp","\\wp");x("\\Zeta","\\mathrm{Z}");x("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");x("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");x("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");x("\\bra","\\mathinner{\\langle{#1}|}");x("\\ket","\\mathinner{|{#1}\\rangle}");x("\\braket","\\mathinner{\\langle{#1}\\rangle}");x("\\Bra","\\left\\langle#1\\right|");x("\\Ket","\\left|#1\\right\\rangle");var Rf=(e)=>(t)=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,s=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),a=t.macros.get("\\|");t.macros.beginGroup();var l=(h)=>(p)=>{if(e){if(p.macros.set("|",o),s.length)p.macros.set("\\|",a)}var g=h;if(!h&&s.length){var b=p.future();if(b.text==="|")p.popToken(),g=!0}return{tokens:g?s:r,numArgs:0}};if(t.macros.set("|",l(!1)),s.length)t.macros.set("\\|",l(!0));var u=t.consumeArg().tokens,d=t.expandTokens([...i,...u,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};x("\\bra@ket",Rf(!1));x("\\bra@set",Rf(!0));x("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");x("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");x("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");x("\\angln","{\\angl n}");x("\\blue","\\textcolor{##6495ed}{#1}");x("\\orange","\\textcolor{##ffa500}{#1}");x("\\pink","\\textcolor{##ff00af}{#1}");x("\\red","\\textcolor{##df0030}{#1}");x("\\green","\\textcolor{##28ae7b}{#1}");x("\\gray","\\textcolor{gray}{#1}");x("\\purple","\\textcolor{##9d38bd}{#1}");x("\\blueA","\\textcolor{##ccfaff}{#1}");x("\\blueB","\\textcolor{##80f6ff}{#1}");x("\\blueC","\\textcolor{##63d9ea}{#1}");x("\\blueD","\\textcolor{##11accd}{#1}");x("\\blueE","\\textcolor{##0c7f99}{#1}");x("\\tealA","\\textcolor{##94fff5}{#1}");x("\\tealB","\\textcolor{##26edd5}{#1}");x("\\tealC","\\textcolor{##01d1c1}{#1}");x("\\tealD","\\textcolor{##01a995}{#1}");x("\\tealE","\\textcolor{##208170}{#1}");x("\\greenA","\\textcolor{##b6ffb0}{#1}");x("\\greenB","\\textcolor{##8af281}{#1}");x("\\greenC","\\textcolor{##74cf70}{#1}");x("\\greenD","\\textcolor{##1fab54}{#1}");x("\\greenE","\\textcolor{##0d923f}{#1}");x("\\goldA","\\textcolor{##ffd0a9}{#1}");x("\\goldB","\\textcolor{##ffbb71}{#1}");x("\\goldC","\\textcolor{##ff9c39}{#1}");x("\\goldD","\\textcolor{##e07d10}{#1}");x("\\goldE","\\textcolor{##a75a05}{#1}");x("\\redA","\\textcolor{##fca9a9}{#1}");x("\\redB","\\textcolor{##ff8482}{#1}");x("\\redC","\\textcolor{##f9685d}{#1}");x("\\redD","\\textcolor{##e84d39}{#1}");x("\\redE","\\textcolor{##bc2612}{#1}");x("\\maroonA","\\textcolor{##ffbde0}{#1}");x("\\maroonB","\\textcolor{##ff92c6}{#1}");x("\\maroonC","\\textcolor{##ed5fa6}{#1}");x("\\maroonD","\\textcolor{##ca337c}{#1}");x("\\maroonE","\\textcolor{##9e034e}{#1}");x("\\purpleA","\\textcolor{##ddd7ff}{#1}");x("\\purpleB","\\textcolor{##c6b9fc}{#1}");x("\\purpleC","\\textcolor{##aa87ff}{#1}");x("\\purpleD","\\textcolor{##7854ab}{#1}");x("\\purpleE","\\textcolor{##543b78}{#1}");x("\\mintA","\\textcolor{##f5f9e8}{#1}");x("\\mintB","\\textcolor{##edf2df}{#1}");x("\\mintC","\\textcolor{##e0e5cc}{#1}");x("\\grayA","\\textcolor{##f6f7f7}{#1}");x("\\grayB","\\textcolor{##f0f1f2}{#1}");x("\\grayC","\\textcolor{##e3e5e6}{#1}");x("\\grayD","\\textcolor{##d6d8da}{#1}");x("\\grayE","\\textcolor{##babec2}{#1}");x("\\grayF","\\textcolor{##888d93}{#1}");x("\\grayG","\\textcolor{##626569}{#1}");x("\\grayH","\\textcolor{##3b3e40}{#1}");x("\\grayI","\\textcolor{##21242c}{#1}");x("\\kaBlue","\\textcolor{##314453}{#1}");x("\\kaGreen","\\textcolor{##71B307}{#1}");var Mf={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Df{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new _f(T3,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Hl(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){if(this.stack.length===0)this.pushToken(this.lexer.lex());return this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken();var s=this.consumeArg(["]"]);r=s.tokens,n=s.end}else{var i=this.consumeArg();r=i.tokens,t=i.start,n=i.end}return this.pushToken(new Vt("EOF",n.loc)),this.pushTokens(r),new Vt("",zt.range(t,n))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],n=e&&e.length>0;if(!n)this.consumeSpaces();var r=this.future(),s,i=0,o=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++i;else if(s.text==="}"){if(--i,i===-1)throw new se("Extra }",s)}else if(s.text==="EOF")throw new se("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",s);if(e&&n)if((i===0||i===1&&e[o]==="{")&&s.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}while(i!==0||n);if(r.text==="{"&&t[t.length-1].text==="}")t.pop(),t.shift();return t.reverse(),{tokens:t,start:r,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new se("The length of delimiters doesn't match the number of args!");var n=t[0];for(var r=0;r<n.length;r++){var s=this.popToken();if(n[r]!==s.text)throw new se("Use of the macro doesn't match its definition",s)}}var i=[];for(var o=0;o<e;o++)i.push(this.consumeArg(t&&t[o+1]).tokens);return i}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new se("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,r=!t.noexpand?this._getExpansion(n):null;if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]==="\\"&&!this.isDefined(n))throw new se("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var s=r.tokens,i=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){s=s.slice();for(var o=s.length-1;o>=0;--o){var a=s[o];if(a.text==="#"){if(o===0)throw new se("Incomplete placeholder at end of macro body",a);if(a=s[--o],a.text==="#")s.splice(o+1,1);else if(/^[1-9]$/.test(a.text))s.splice(o,2,...i[+a.text-1]);else throw new se("Not a valid argument number",a)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();if(e.treatAsRelax)e.text="\\relax";return e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Vt(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;this.pushTokens(e);while(this.stack.length>n)if(this.expandOnce(!0)===!1){var r=this.stack.pop();if(r.treatAsRelax)r.noexpand=!1,r.treatAsRelax=!1;t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);if(t)return t.map((n)=>n.text).join("");else return t}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==="function"?t(this):t;if(typeof r==="string"){var s=0;if(r.includes("#")){var i=r.replace(/##/g,"");while(i.includes("#"+(s+1)))++s}var o=new Hl(r,this.settings),a=[],l=o.lex();while(l.text!=="EOF")a.push(l),l=o.lex();a.reverse();var u={tokens:a,numArgs:s};return u}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(hr,e)||Object.prototype.hasOwnProperty.call(Ye.math,e)||Object.prototype.hasOwnProperty.call(Ye.text,e)||Object.prototype.hasOwnProperty.call(Mf,e)}isExpandable(e){var t=this.macros.get(e);if(t!=null)return typeof t==="string"||typeof t==="function"||!t.unexpandable;return Object.prototype.hasOwnProperty.call(hr,e)&&!hr[e].primitive}}var $d=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,_o=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),xl={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:"\\\"",math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Fd={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class jo{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Df(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0)t=!0;if(this.fetch().text!==e)throw new se("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());if(t)this.consume()}consume(){this.nextToken=null}fetch(){if(this.nextToken==null)this.nextToken=this.gullet.expandNextToken();return this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){if(!this.settings.globalGroup)this.gullet.beginGroup();if(this.settings.colorIsTextColor)this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);if(this.expect("EOF"),!this.settings.globalGroup)this.gullet.endGroup();return e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Vt("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){var n=[];while(!0){if(this.mode==="math")this.consumeSpaces();var r=this.fetch();if(jo.endOfExpression.has(r.text))break;if(t&&r.text===t)break;if(e&&hr[r.text]&&hr[r.text].infix)break;var s=this.parseAtom(t);if(!s)break;else if(s.type==="internal")continue;n.push(s)}if(this.mode==="text")this.formLigatures(n);return this.handleInfixNodes(n)}handleInfixNodes(e){var t=-1,n;for(var r=0;r<e.length;r++){var s=e[r];if(s.type==="infix"){if(t!==-1)throw new se("only one infix operator per group",s.token);t=r,n=s.replaceWith}}if(t!==-1&&n){var i,o,a=e.slice(0,t),l=e.slice(t+1);if(a.length===1&&a[0].type==="ordgroup")i=a[0];else i={type:"ordgroup",mode:this.mode,body:a};if(l.length===1&&l[0].type==="ordgroup")o=l[0];else o={type:"ordgroup",mode:this.mode,body:l};var u;if(n==="\\\\abovefrac")u=this.callFunction(n,[i,e[t],o],[]);else u=this.callFunction(n,[i,o],[]);return[u]}else return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do{var s;r=this.parseGroup(e)}while(((s=r)==null?void 0:s.type)==="internal");if(!r)throw new se("Expected group after '"+n+"'",t);return r}formatUnsupportedCmd(e){var t=[];for(var n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t},s={type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]};return s}parseAtom(e){var t=this.parseGroup("atom",e);if((t==null?void 0:t.type)==="internal")return t;if(this.mode==="text")return t;var n,r;while(!0){this.consumeSpaces();var s=this.fetch();if(s.text==="\\limits"||s.text==="\\nolimits"){if(t&&t.type==="op")t.limits=s.text==="\\limits",t.alwaysHandleSupSub=!0;else if(t&&t.type==="operatorname"){if(t.alwaysHandleSupSub)t.limits=s.text==="\\limits"}else throw new se("Limit controls must follow a math operator",s);this.consume()}else if(s.text==="^"){if(n)throw new se("Double superscript",s);n=this.handleSupSubscript("superscript")}else if(s.text==="_"){if(r)throw new se("Double subscript",s);r=this.handleSupSubscript("subscript")}else if(s.text==="'"){if(n)throw new se("Double superscript",s);var i={type:"textord",mode:this.mode,text:"\\prime"},o=[i];this.consume();while(this.fetch().text==="'")o.push(i),this.consume();if(this.fetch().text==="^")o.push(this.handleSupSubscript("superscript"));n={type:"ordgroup",mode:this.mode,body:o}}else if(_o[s.text]){var a=$d.test(s.text),l=[];l.push(new Vt(_o[s.text])),this.consume();while(!0){var u=this.fetch().text;if(!_o[u])break;if($d.test(u)!==a)break;l.unshift(new Vt(_o[u])),this.consume()}var d=this.subparse(l);if(a)r={type:"ordgroup",mode:"math",body:d};else n={type:"ordgroup",mode:"math",body:d}}else break}if(n&&r)return{type:"supsub",mode:this.mode,base:t,sup:n,sub:r};else if(n)return{type:"supsub",mode:this.mode,base:t,sup:n};else if(r)return{type:"supsub",mode:this.mode,base:t,sub:r};else return t}parseFunction(e,t){var n=this.fetch(),r=n.text,s=hr[r];if(!s)return null;if(this.consume(),t&&t!=="atom"&&!s.allowedInArgument)throw new se("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);else if(this.mode==="text"&&!s.allowedInText)throw new se("Can't use function '"+r+"' in text mode",n);else if(this.mode==="math"&&s.allowedInMath===!1)throw new se("Can't use function '"+r+"' in math mode",n);var i=this.parseArguments(r,s),{args:o,optArgs:a}=i;return this.callFunction(r,o,a,n,e)}callFunction(e,t,n,r,s){var i={funcName:e,parser:this,token:r,breakOnTokenText:s},o=hr[e];if(o&&o.handler)return o.handler(i,t,n);else throw new se("No function handler for "+e)}parseArguments(e,t){var n,r=(n=t.numOptionalArgs)!=null?n:0,s=t.numArgs+r;if(s===0)return{args:[],optArgs:[]};var i=[],o=[];for(var a=0;a<s;a++){var l,u=(l=t.argTypes)==null?void 0:l[a],d=a<r;if("primitive"in t&&t.primitive&&u==null||t.type==="sqrt"&&a===1&&o[0]==null)u="primitive";var h=this.parseGroupOfType("argument to '"+e+"'",u,d);if(d)o.push(h);else if(h!=null)i.push(h);else throw new se("Null argument, please report this as a bug")}return{args:i,optArgs:o}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":{var r=this.parseArgumentGroup(n,"text");return r!=null?{type:"styling",mode:r.mode,body:[r],style:"text",resetFont:!0}:null}case"raw":{this.gullet.consumeSpaces();var s=this.gullet.lexer.catcodes["%"];this.gullet.lexer.setCatcode("%",12);var i=this.parseStringGroup(n);return this.gullet.lexer.setCatcode("%",s),i!=null?{type:"raw",mode:"text",string:i.text}:null}case"primitive":{if(n)throw new se("A primitive argument cannot be optional");var o=this.parseGroup(e);if(o==null)throw new se("Expected group as "+e,this.fetch());return o}case"original":case void 0:return this.parseArgumentGroup(n);default:throw new se("Unknown group type as "+e,this.fetch())}}consumeSpaces(){while(this.fetch().text===" ")this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(t==null)return null;var n="",r;while((r=this.fetch()).text!=="EOF")n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){var n=this.fetch(),r=n,s="",i;while((i=this.fetch()).text!=="EOF"&&e.test(s+i.text))r=i,s+=r.text,this.consume();if(s==="")throw new se("Invalid "+t+": '"+n.text+"'",n);return n.range(r,s)}parseColorGroup(e){var t=this.parseStringGroup(e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new se("Invalid color: '"+t.text+"'",t);var r=n[0];if(/^[0-9a-f]{6}$/i.test(r))r="#"+r;return{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{")t=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size");else t=this.parseStringGroup(e);if(!t)return null;if(!e&&t.text.length===0)t.text="0pt",n=!0;var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new se("Invalid size: '"+t.text+"'",t);var s={number:+(r[1]+r[2]),unit:r[3]};if(!qd(s))throw new se("Invalid unit: '"+s.unit+"'",t);return{type:"size",mode:this.mode,value:s,isBlank:n}}parseUrlGroup(e){var t=this.gullet.lexer.catcodes["%"],n=this.gullet.lexer.catcodes["~"];this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode("%",t),this.gullet.lexer.setCatcode("~",n),r==null)return null;var s=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:s}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;if(t)this.switchMode(t);this.gullet.beginGroup();var s=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:n.loc,body:s};if(t)this.switchMode(r);return i}parseGroup(e,t){var n=this.fetch(),r=n.text,s;if(r==="{"||r==="\\begingroup"){this.consume();var i=r==="{"?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,i),a=this.fetch();this.expect(i),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:zt.range(n,a),body:o,semisimple:r==="\\begingroup"||void 0}}else if(s=this.parseFunction(t,e)||this.parseSymbol(),s==null&&r[0]==="\\"&&!Object.prototype.hasOwnProperty.call(Mf,r)){if(this.settings.throwOnError)throw new se("Undefined control sequence: "+r,n);s=this.formatUnsupportedCmd(r),this.consume()}return s}formLigatures(e){var t=e.length-1;for(var n=0;n<t;++n){var r=e[n];if(r.type!=="textord")continue;var s=r.text,i=e[n+1];if(!i||i.type!=="textord")continue;if(s==="-"&&i.text==="-"){var o=e[n+2];if(n+1<t&&o&&o.type==="textord"&&o.text==="-")e.splice(n,3,{type:"textord",mode:"text",loc:zt.range(r,o),text:"---"}),t-=2;else e.splice(n,2,{type:"textord",mode:"text",loc:zt.range(r,i),text:"--"}),t-=1}if((s==="'"||s==="`")&&i.text===s)e.splice(n,2,{type:"textord",mode:"text",loc:zt.range(r,i),text:s+s}),t-=1}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)==="*";if(r)n=n.slice(1);if(n.length<2||n.charAt(0)!==n.slice(-1))throw new se(`\\verb assertion failed --
|
|
284
|
+
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:r}}if(Object.prototype.hasOwnProperty.call(Fd,t[0])&&!Ye[this.mode][t[0]]){if(this.settings.strict&&this.mode==="math")qt({strict:this.settings.strict,errorCode:"unicodeTextInMathMode",errorMsg:'Accented Unicode text character "'+t[0]+'" used in math mode',report:!0,token:e});t=Fd[t[0]]+t.slice(1)}var s=S3.exec(t);if(s){if(t=t.substring(0,s.index),t==="i")t="ı";else if(t==="j")t="ȷ"}var i;if(Ye[this.mode][t]){if(this.settings.strict&&this.mode==="math"&&Sl.includes(t))qt({strict:this.settings.strict,errorCode:"unicodeTextInMathMode",errorMsg:'Latin-1/Unicode text character "'+t[0]+'" used in math mode',report:!0,token:e});var o=Ye[this.mode][t].group,a=zt.range(e),l;if($b(o))l={type:"atom",mode:this.mode,family:o,loc:a,text:t};else l={type:o,mode:this.mode,loc:a,text:t};i=l}else if(t.charCodeAt(0)>=128){if(this.settings.strict){if(!zd(t.charCodeAt(0)))qt({strict:this.settings.strict,errorCode:"unknownSymbol",errorMsg:'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),report:!0,token:e});else if(this.mode==="math")qt({strict:this.settings.strict,errorCode:"unicodeTextInMathMode",errorMsg:'Unicode text character "'+t[0]+'" used in math mode',report:!0,token:e})}i={type:"textord",mode:"text",loc:zt.range(e),text:t}}else return null;if(this.consume(),s)for(var u=0;u<s[0].length;u++){var d=s[0][u];if(!xl[d])throw new se("Unknown accent ' "+d+"'",e);var h=xl[d][this.mode]||xl[d].text;if(!h)throw new se("Accent "+d+" unsupported in "+this.mode+" mode",e);i={type:"accent",mode:this.mode,loc:zt.range(e),label:h,isStretchy:!1,isShifty:!0,base:i}}return i}}jo.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var n0=function(t,n){if(!(typeof t==="string"||t instanceof String))throw TypeError("KaTeX can only parse string typed expression");var r=new jo(t,n);delete r.gullet.macros.current["\\df@tag"];var s=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!n.displayMode)throw new se("\\tag works only in display equations");s=[{type:"tag",mode:"text",body:s,tag:r.subparse([new Vt("\\df@tag")])}]}return s},Lf=function(t,n,r){n.textContent="";var s=r0(t,r).toNode();n.appendChild(s)};if(typeof document<"u"){if(document.compatMode!=="CSS1Compat")typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Lf=function(){throw new se("KaTeX doesn't work in quirks mode.")}}var M3=function(t,n){var r=r0(t,n).toMarkup();return r},D3=function(t,n){var r=new Bo(n);return n0(t,r)},If=function(t,n,r){if(r.throwOnError||!(t instanceof se))throw t;var s=ee(["katex-error"],[new Ht(n)]);return s.setAttribute("title",t.toString()),s.setAttribute("style","color:"+r.errorColor),s},r0=function(t,n){var r=new Bo(n);try{var s=n0(t,r);return _b(s,t,r)}catch(i){return If(i,t,r)}},L3=function(t,n){var r=new Bo(n);try{var s=n0(t,r);return Tb(s,r)}catch(i){return If(i,t,r)}},I3="0.19.1",N3={Span:qr,Anchor:wi,SymbolNode:Ht,SvgNode:_n,PathNode:Vn,LineNode:Io},s0={version:I3,render:Lf,renderToString:M3,ParseError:se,SETTINGS_SCHEMA:El,__parse:D3,__renderToDomTree:r0,__renderToHTMLTree:L3,__setFontMetrics:lb,__defineSymbol:f,__defineFunction:he,__defineMacro:x,__domTree:N3};var rh=R1(nh(),1);var Ss=rh.default;function sh(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});let s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(a);let l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},d={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=e.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),b={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},k=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],w=["true","false"],A={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],S=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],E=["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:k,literal:w,built_in:[..._,...S,"set","shopt",...E,...R]},contains:[g,e.SHEBANG(),b,h,i,o,A,a,l,u,d,n]}}function ih(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",i="<[^<>]+>",o="(decltype\\(auto\\)|"+t.optional("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a=t.concat(/\batomic_/,t.either("bool","char","schar","uchar","short","ushort","int","uint","long","ulong","llong","ullong","char16_t","char32_t","wchar_t","int_least8_t","uint_least8_t","int_least16_t","uint_least16_t","int_least32_t","uint_least32_t","int_least64_t","uint_least64_t","int_fast8_t","uint_fast8_t","int_fast16_t","uint_fast16_t","int_fast32_t","uint_fast32_t","int_fast64_t","uint_fast64_t","intptr_t","uintptr_t","size_t","ptrdiff_t","intmax_t","uintmax_t"),/\b/),l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:a}]},u="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",d={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.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:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},h={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},p={scope:"meta",begin:/#\s*include\b/,end:/$/,keywords:{keyword:"include"},contains:[{begin:/\\\n/},d,{scope:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},g={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},e.inherit(d,{className:"string"}),n,e.C_BLOCK_COMMENT_MODE]},b=[p,g],k={className:"title",begin:t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},w=t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",A=12,E={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"},R=[...b,l,n,e.C_BLOCK_COMMENT_MODE,h,d],L={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:E,contains:R.concat([{begin:/\(/,end:/\)/,keywords:E,contains:R.concat(["self"]),relevance:0}]),relevance:0},T={begin:"("+o+"[\\*&\\s]+){1,12}"+w,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:E,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:E,relevance:0},{begin:w,returnBegin:!0,contains:[e.inherit(k,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,l,{begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,h,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,...b]};return{name:"C",aliases:["h"],keywords:E,disableAutodetect:!0,illegal:"</",contains:[].concat(L,T,R,[...b,{begin:e.IDENT_RE+"::",keywords:E},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:d,keywords:E}}}function oh(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",i="<[^<>]+>",o="(?!struct)(decltype\\(auto\\)|"+t.optional("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.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:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:\\b[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|\\b[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|\\b0[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},h={scope:"meta",begin:/#\s*include\b/,end:/$/,keywords:{keyword:"include"},contains:[{begin:/\\\n/},u,{scope:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},p={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},e.inherit(u,{className:"string"}),n,e.C_BLOCK_COMMENT_MODE]},g=[h,p],b={className:"title",begin:t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},k=t.optional("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",w=12,A=["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"],_=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["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"],E=["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"],T={type:_,keyword:A,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},F={className:"function.dispatch",relevance:0,keywords:{_hint:E},begin:t.concat(/\b/,`(?!${A.join("|")})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},I=[F,...g,a,n,e.C_BLOCK_COMMENT_MODE,d,u],q={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:I.concat([{begin:/\(/,end:/\)/,keywords:T,contains:I.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+o+"[\\*&\\s]+){1,12}"+k,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:T,relevance:0},{begin:k,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,d,a,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,d,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,...g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:T,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(q,U,F,I,[...g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:T,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:T},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}var A5=(e)=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.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_-]*/}}),C5=["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"],S5=["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"],_5=[...C5,...S5],T5=["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(),R5=["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(),M5=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),D5=["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","corner-bottom-left-shape","corner-bottom-right-shape","corner-shape","corner-top-left-shape","corner-top-right-shape","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","unicode-range","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 ah(e){let t=e.regex,n=A5(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",i=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+R5.join("|")+")"},{begin:":(:)?("+M5.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+D5.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,n.UNICODE_RANGE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:T5.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+_5.join("|")+")\\b"}]}}function lh(e){let t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function ch(e){let i={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:i,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\b0[bB](_?[01])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:i,illegal:/["']/}]}]}}var _s="[0-9](_*[0-9])*",Zo=`\\.(${_s})`,Yo="[0-9a-fA-F](_*[0-9a-fA-F])*",uh={className:"number",variants:[{begin:`(\\b(${_s})((${Zo})|\\.)?|(${Zo}))[eE][+-]?(${_s})[fFdD]?\\b`},{begin:`\\b(${_s})((${Zo})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Zo})[fFdD]?\\b`},{begin:`\\b(${_s})[fFdD]\\b`},{begin:`\\b0[xX]((${Yo})\\.?|(${Yo})?\\.(${Yo}))[pP][+-]?(${_s})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Yo})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function dh(e,t,n){if(n===-1)return"";return e.replace(t,(r)=>dh(e,t,n-1))}function fh(e){let t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r="(?:(?:\\s*\\[\\s*])+)?",s="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"+"<@@@>(?:(?:\\s*\\[\\s*])+)?",o="(?:"+("\\?(?:\\s+(?:extends|super)\\s+"+s+")?")+"|"+s+")",a=dh("(?:\\s*<\\s*"+o+"(?:\\s*,\\s*"+o+")*\\s*>)?",/<@@@>/g,2),p={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"]},g={className:"meta",begin:"@"+"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{beginKeywords:"new throw return else yield assert",relevance:0},{begin:["[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t.concat(a,"(?:(?:\\s*\\[\\s*])+)?",/\s+/),"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*","(?:(?:\\s*\\[\\s*])+)?",/\s*/,/=(?!=)/],className:{1:"type",3:"variable",6:"operator"}},{begin:[/record/,/\s+/,"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"],className:{1:"keyword",3:"title.class"},contains:[b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{begin:["[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t.concat(a,"(?:(?:\\s*\\[\\s*])+)?",/\s+/),"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",/\s*(?=\()/],className:{1:"type",3:"title.function"},keywords:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,uh,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},uh,g]}}var L5=["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"],I5=["true","false","null","undefined","NaN","Infinity"],hh=["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"],mh=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ph=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],N5=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],B5=[].concat(ph,hh,mh);function gh(e){let t=e.regex,n=(Z,{after:de})=>{let te="</"+Z[0].slice(1);return Z.input.indexOf(te,de)!==-1},r="[A-Za-z$_][0-9A-Za-z$_]*",s={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,de)=>{let te=Z[0].length+Z.index,N=Z.input[te];if(N==="<"||N===","){de.ignoreMatch();return}if(N===">"){if(!n(Z,{after:te}))de.ignoreMatch()}let W,K=Z.input.substring(te);if(W=K.match(/^\s*=/)){de.ignoreMatch();return}if(W=K.match(/^\s+extends\s+/)){if(W.index===0){de.ignoreMatch();return}}}},a={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:L5,literal:I5,built_in:B5,"variable.language":N5},l="[0-9](_?[0-9])*",u="\\.([0-9](_?[0-9])*)",d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:"(\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)((\\.([0-9](_?[0-9])*))|\\.)?|(\\.([0-9](_?[0-9])*)))[eE][+-]?([0-9](_?[0-9])*)\\b"},{begin:"\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)\\b((\\.([0-9](_?[0-9])*))\\b|\\.)?|(\\.([0-9](_?[0-9])*))\\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},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},k={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},w={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},_={className:"comment",variants:[e.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:"[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},S=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,k,w,{match:/\$\d+/},h];p.contains=S.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(S)});let E=[].concat(_,p.contains),R=E.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(E)}]),L={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:R},T={variants:[{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s+/,/extends/,/\s+/,t.concat("[A-Za-z$_][0-9A-Za-z$_]*","(",t.concat(/\./,"[A-Za-z$_][0-9A-Za-z$_]*"),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*"],scope:{1:"keyword",3:"title.class"}}]},F={relevance:0,match:t.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:{_:[...hh,...mh]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},q={variants:[{match:[/function/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[L],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function j(Z){return t.concat("(?!",Z.join("|"),")")}let J={match:t.concat(/\b/,j([...ph,"super","import","await"].map((Z)=>`${Z}\\s*\\(`)),"[A-Za-z$_][0-9A-Za-z$_]*",t.lookahead(/\s*\(/)),className:"title.function",relevance:0},re={begin:t.concat(/\./,t.lookahead(t.concat("[A-Za-z$_][0-9A-Za-z$_]*",/(?![0-9A-Za-z$_(])/))),end:"[A-Za-z$_][0-9A-Za-z$_]*",excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ne={match:[/get|set/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},L]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",V={match:[/const|var|let/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[L]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:F},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,k,w,_,{match:/\$\d+/},h,F,{scope:"attr",match:"[A-Za-z$_][0-9A-Za-z$_]*"+t.lookahead(":"),relevance:0},V,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:i},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},q,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[L,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*",className:"title.function"})]},{match:/\.\.\./,relevance:0},re,{match:"\\$[A-Za-z$_][0-9A-Za-z$_]*",relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[L]},J,U,T,ne,{match:/\$[(.]/}]}}var O5={scope:"number",match:"([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",relevance:0};function bh(e){let t={className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],s={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,s,O5,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function vh(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={match:/^ {0,3}([-*_])[ \t]*(?:\1[ \t]*){2,}$/},s={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}]},i={className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),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}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=e.inherit(u,{contains:[]}),p=e.inherit(d,{contains:[]});u.contains.push(p),d.contains.push(h);let g=[n,l];return[u,d,h,p].forEach((A)=>{A.contains=A.contains.concat(g)}),g=g.concat(u,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:g}]}]},n,i,r,u,d,{className:"quote",begin:"^>\\s+",contains:g,end:"$"},s,l,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function yh(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","lazy","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","aiter","all","anext","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozendict","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","sentinel","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"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},d={begin:/\{\{/,relevance:0},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,d,u]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,d,u]},{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:/([fFtT][rR]|[rR][fFtT]|[fFtT])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,d,u]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",g="(\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.",b=`\\b|${r.join("|")}`,k={className:"number",relevance:0,variants:[{begin:`(\\b([0-9](_?[0-9])*)|((\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.))[eE][+-]?([0-9](_?[0-9])*)[jJ]?(?=${b})`},{begin:"((\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.)[jJ]?"},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${b})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${b})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${b})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${b})`},{begin:`\\b([0-9](_?[0-9])*)[jJ](?=${b})`}]},w={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},A={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,k,h,e.HASH_COMMENT_MODE]}]};return u.contains=[h,k,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,k,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,w,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[A]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[k,A,h]}]}}function kh(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),i={scope:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!(?:let|for|while|if|else|match)\b)/,s,t.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(16|32|64|128))?",a=["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","raw","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["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!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f16","f32","f64","f128","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:d,keyword:a,literal:l,built_in:u},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{scope:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|"|\\|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{scope:"number",variants:[{begin:"\\b0b([01_]+)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"},{begin:"\\b0o([0-7_]+)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"},{begin:"\\b0x([A-Fa-f0-9_]+)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)([ui](8|16|32|64|128|size)|f(16|32|64|128))?"}],relevance:0},{begin:[/\bsafe/,/\s+/,/extern/],scope:{1:"keyword",3:"keyword"}},{begin:[/fn/,/\s+/,r],scope:{1:"keyword",3:"title.function"}},{scope:"meta",begin:"#!?\\[",end:"\\]",contains:[{scope:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],scope:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],scope:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],scope:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],scope:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:u,type:d}},{scope:"punctuation",begin:"->"},i]}}function wh(e){let t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},i=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],a=["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"],l=["add","asc","collation","desc","final","first","last","view"],u=["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"],d=["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"],h=["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"],p=["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"],g=d,b=[...u,...l].filter((R)=>!d.includes(R)),k={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},w={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},A={match:t.concat(/\b/,t.either(...g),/\s*\(/),relevance:0,keywords:{built_in:g}};function _(R){return t.concat(/\b/,t.either(...R.map((L)=>L.replace(/\s+/,"\\s+"))),/\b/)}let S={scope:"keyword",match:_(p),relevance:0};function E(R,{exceptions:L,when:T}={}){let F=T;return L=L||[],R.map((I)=>{if(I.match(/\|\d+$/)||L.includes(I))return I;else if(F(I))return`${I}|0`;else return I})}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:E(b,{when:(R)=>R.length<3}),literal:i,type:a,built_in:h},contains:[{scope:"type",match:_(o)},S,A,k,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,w]}}var xh=["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"],Eh=["true","false","null","undefined","NaN","Infinity"],Ah=["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"],Ch=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Sh=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],_h=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],Th=[].concat(Sh,Ah,Ch);function $5(e){let t=e.regex,n=(Z,{after:de})=>{let te="</"+Z[0].slice(1);return Z.input.indexOf(te,de)!==-1},r="[A-Za-z$_][0-9A-Za-z$_]*",s={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,de)=>{let te=Z[0].length+Z.index,N=Z.input[te];if(N==="<"||N===","){de.ignoreMatch();return}if(N===">"){if(!n(Z,{after:te}))de.ignoreMatch()}let W,K=Z.input.substring(te);if(W=K.match(/^\s*=/)){de.ignoreMatch();return}if(W=K.match(/^\s+extends\s+/)){if(W.index===0){de.ignoreMatch();return}}}},a={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:xh,literal:Eh,built_in:Th,"variable.language":_h},l="[0-9](_?[0-9])*",u="\\.([0-9](_?[0-9])*)",d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:"(\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)((\\.([0-9](_?[0-9])*))|\\.)?|(\\.([0-9](_?[0-9])*)))[eE][+-]?([0-9](_?[0-9])*)\\b"},{begin:"\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)\\b((\\.([0-9](_?[0-9])*))\\b|\\.)?|(\\.([0-9](_?[0-9])*))\\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},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},k={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},w={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},_={className:"comment",variants:[e.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:"[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},S=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,k,w,{match:/\$\d+/},h];p.contains=S.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(S)});let E=[].concat(_,p.contains),R=E.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(E)}]),L={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:R},T={variants:[{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s+/,/extends/,/\s+/,t.concat("[A-Za-z$_][0-9A-Za-z$_]*","(",t.concat(/\./,"[A-Za-z$_][0-9A-Za-z$_]*"),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*"],scope:{1:"keyword",3:"title.class"}}]},F={relevance:0,match:t.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:{_:[...Ah,...Ch]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},q={variants:[{match:[/function/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[L],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function j(Z){return t.concat("(?!",Z.join("|"),")")}let J={match:t.concat(/\b/,j([...Sh,"super","import","await"].map((Z)=>`${Z}\\s*\\(`)),"[A-Za-z$_][0-9A-Za-z$_]*",t.lookahead(/\s*\(/)),className:"title.function",relevance:0},re={begin:t.concat(/\./,t.lookahead(t.concat("[A-Za-z$_][0-9A-Za-z$_]*",/(?![0-9A-Za-z$_(])/))),end:"[A-Za-z$_][0-9A-Za-z$_]*",excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ne={match:[/get|set/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},L]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",V={match:[/const|var|let/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[L]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:F},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,k,w,_,{match:/\$\d+/},h,F,{scope:"attr",match:"[A-Za-z$_][0-9A-Za-z$_]*"+t.lookahead(":"),relevance:0},V,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:i},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},q,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[L,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*",className:"title.function"})]},{match:/\.\.\./,relevance:0},re,{match:"\\$[A-Za-z$_][0-9A-Za-z$_]*",relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[L]},J,U,T,ne,{match:/\$[(.]/}]}}function Rh(e){let t=e.regex,n=$5(e),r="[A-Za-z$_][0-9A-Za-z$_]*",s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:xh.concat(l),literal:Eh,built_in:Th.concat(s),"variable.language":_h},d={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},h=(k,w,A)=>{let _=k.contains.findIndex((S)=>S.label===w);if(_===-1)throw Error("can not find mode to replace");k.contains.splice(_,1,A)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(d);let p=n.contains.find((k)=>k.scope==="attr"),g=Object.assign({},p,{match:t.concat("[A-Za-z$_][0-9A-Za-z$_]*",t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,p,g]),n.contains=n.contains.concat([d,i,o,g]),h(n,"shebang",e.SHEBANG()),h(n,"use_strict",a);let b=n.contains.find((k)=>k.label==="func.def");return b.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function Mh(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(i,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[i,l,a,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[i,o,l,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:"css"}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:"javascript"}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Dh(e){let r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},a=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l="[0-9]{4}(-[0-9][0-9]){0,2}",u="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",d="(\\.[0-9]*)?",h="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",p={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"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:"true false yes no null",relevance:0},b={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},k={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},w=[r,{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+![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"type",begin:"!<[\\w#;/?:@&=+$,.~*'()[\\]]+>"},{className:"type",begin:"![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"type",begin:"!![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:"true false yes no null",keywords:{literal:"true false yes no null"}},p,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},b,k,i,o],A=[...w];return A.pop(),A.push(a),g.contains=A,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:w}}var F5={bash:sh,c:ih,cpp:oh,css:ah,diff:lh,go:ch,java:fh,javascript:gh,json:bh,markdown:vh,python:yh,rust:kh,sql:wh,typescript:Rh,xml:Mh,yaml:Dh};for(let[e,t]of Object.entries(F5))Ss.registerLanguage(e,t);Ss.registerAliases(["sh","shell","zsh"],{languageName:"bash"});Ss.registerAliases("tsx",{languageName:"typescript"});var Xo=262144,z5=24576,Oh=4096,q5=65536,Pt=new Uu({html:!1,linkify:!0,maxNesting:24}),yr=Pt.utils.escapeHtml,H5=0,Lh=new WeakMap,Ih=new WeakMap;function $h(e,t){if(!e||typeof e.remaining!=="number"||e.remaining<t)return!1;return e.remaining-=t,!0}function u0(e){if(!/^(?:https?:\/\/|mailto:)/i.test(e))return;let t=URL.parse(e);if(t&&!t.username&&!t.password&&t.origin!==globalThis.location?.origin)return t}function Nh(e){return e.normalize("NFKC").toLowerCase().trim().replace(/[^\p{L}\p{N}\p{M}_\s-]/gu,"").replace(/\s+/g,"-")}Pt.validateLink=(e)=>e.startsWith("#")||u0(e)!==void 0;function Fh(e,t,n){if(e.length<=Oh&&$h(n,e.length+64))try{return s0.renderToString(e,{displayMode:t,output:"mathml",trust:!1,maxExpand:128,maxSize:20})}catch(r){if(!(r instanceof s0.ParseError))throw r}return`<code class="math-source">${yr(e)}</code>`}Pt.use(Ku).use(Ju,{disabled:!0,label:!1}).use(td,{delimiters:"all",mathFence:!0,render(e,t,n){let r=Fh(e,t,n);return t?`<div class="markdown-math">${r}</div>
|
|
285
|
+
`:r}});Pt.inline.ruler.before("escape","web_display_math",(e,t)=>{if(!e.src.startsWith("\\[",e.pos)||e.pos+2>=e.posMax)return!1;let n=e.pos+2,r=e.src.slice(n,Math.min(e.posMax,n+Oh+2)),s=/(?<!\\)(?:\\\\)*\\\]/u.exec(r);if(!s||/[\r\n]/u.test(r.slice(0,s.index)))return!1;let i=s.index+s[0].length-2,o=r.slice(0,i);if(!o.trim())return!1;if(!t)e.push("web_display_math","span",0).content=o;return e.pos=n+i+2,!0});Pt.renderer.rules.web_display_math=(e,t,n,r)=>`<span class="markdown-math markdown-math-in-prose">${Fh(e[t].content,!0,r)}</span>`;Pt.renderer.rules.link_open=(e,t,n,r,s)=>{let i=e[t],o=String(i.attrGet("href")??"");if(o.startsWith("#"))i.attrSet("data-markdown-fragment",o.slice(1)),i.attrSet("href","#");else if(u0(o)?.protocol!=="mailto:")i.attrSet("target","_blank"),i.attrSet("rel","noopener noreferrer");return s.renderToken(e,t,n)};Pt.renderer.rules.image=(e,t,n,r,s)=>{let i=e[t],o=s.renderInlineAsText(i.children??[],n,r),a=u0(String(i.attrGet("src")??""));if(!a||a.protocol==="mailto:")return yr(o);for(let u=t-1;i.level>0&&u>=0;u--){if(e[u].type==="link_open")return yr(o||a.hostname);if(e[u].type==="link_close")break}let l=c(`打开图片:${o||a.hostname}`,`Open image: ${o||a.hostname}`);return`<a class="markdown-image" href="${yr(a.href)}" target="_blank" rel="noopener noreferrer">${yr(l)}</a>`};function zh(e,t,n){let r=/^[a-z0-9][a-z0-9_+#.-]{0,23}$/i.test(t)?t.toLowerCase():"",s=r&&e.length<=z5&&Ss.getLanguage(r)&&$h(n,e.length+64),i=s?Ss.highlight(e,{language:r,ignoreIllegals:!0}).value:yr(e);return`<div class="markdown-code"><div class="markdown-code-bar"><span>${yr(r||c("代码","Code"))}</span><button type="button" class="button button--quiet markdown-copy">${c("复制代码","Copy code")}</button></div><pre tabindex="0"><code${r?` class="${s?"hljs ":""}language-${yr(r)}"`:""}>${i}</code></pre></div>
|
|
286
|
+
`}var Bh=Pt.renderer.rules.fence;Pt.renderer.rules.fence=(e,t,n,r,s)=>{let i=e[t],o=i.info.trim().split(/\s+/,1)[0]??"";return o==="math"&&Bh?Bh(e,t,n,r,s):zh(i.content,o,r)};Pt.renderer.rules.code_block=(e,t,n,r)=>zh(e[t].content,"",r);Pt.renderer.rules.table_open=()=>'<div class="markdown-table" tabindex="0" role="region" aria-label="'+c("表格","Table")+`"><table>
|
|
287
|
+
`;Pt.renderer.rules.table_close=()=>`</table></div>
|
|
288
|
+
`;for(let e of["th","td"])Pt.renderer.rules[`${e}_open`]=(t,n)=>{let r=String(t[n].attrGet("style")??"").match(/^text-align:(left|center|right)$/)?.[1];return r?`<${e} class="markdown-align-${r}">`:`<${e}>`};function P5(e,t){let n=new Map,r=new Map;for(let s of e.querySelectorAll("h1, h2, h3, h4, h5, h6")){let i=Nh(s.textContent);if(!i)continue;let o=i,a=r.get(i)??1;while(n.has(o))o=`${i}-${a++}`;r.set(i,a),s.id=`${t}-${o}`,n.set(o,s.id)}for(let s of e.querySelectorAll("a[data-markdown-fragment]")){let i=s.dataset.markdownFragment??"",o;try{o=decodeURIComponent(i)}catch(l){if(!(l instanceof URIError))throw l;o=i}let a=n.get(Nh(o));if(a)s.setAttribute("href",`#${encodeURIComponent(a)}`);else s.removeAttribute("href");delete s.dataset.markdownFragment}}function U5(e){e.addEventListener("click",async(t)=>{let n=t.target;if(!(n instanceof HTMLButtonElement)||!n.matches(".markdown-copy"))return;let r=n.closest(".markdown-code")?.querySelector("pre > code");if(!r||n.getAttribute("aria-busy")==="true")return;n.setAttribute("aria-busy","true");try{await navigator.clipboard.writeText(r.textContent),n.textContent=c("已复制","Copied")}catch(s){if(!(s instanceof DOMException||s instanceof TypeError))throw s;n.textContent=c("复制失败","Copy failed")}finally{n.removeAttribute("aria-busy")}})}function W5(e,t,n){let r=e.children[n],s=t.outerHTML;if(r&&Ih.get(r)===s)return;if(Ih.set(t,s),!r){e.append(t);return}let i=document.activeElement,o=i instanceof HTMLAnchorElement&&r.contains(i)?i.getAttribute("href"):null;if(r.replaceWith(t),o)[...t.querySelectorAll("a[href]")].find((a)=>a.getAttribute("href")===o)?.focus({preventScroll:!0})}function d0(e,t=v("div","prose")){let n=Lh.get(t);if(n?.text===e)return t;let r=n?.id??`omo-markdown-${++H5}`;if(!n)U5(t);let s=document.createDocumentFragment();if(e.length>Xo)s.append(v("p","small muted",c("正文过长,已按纯文本显示。","This long message is displayed as plain text.")),v("div","plain break",e));else{let o=v("template");o.innerHTML=Pt.render(e,{docId:r,remaining:q5}),P5(o.content,r),s.append(o.content)}let i=[...s.children];for(let[o,a]of i.entries())W5(t,a,o);while(t.childElementCount>i.length)t.lastElementChild?.remove();return Lh.set(t,{id:r,text:e}),t}function qh(e){if(!e.startsWith('The user explicitly invoked the "')){if(!e.startsWith("<skill name="))return;let o=/^<skill name="([^"]+)" location="([^"]+)">\n([\s\S]*?)\n<\/skill>(?:\n\n([\s\S]+))?$/u.exec(e);if(o)return{skills:[{name:o[1],location:o[2],content:o[3]}],request:o[4]??""};return}let t=/The user explicitly invoked the "([^"]+)" skill\. Follow the instructions in <skill-instruction> as binding for this request, while respecting higher-priority instructions\.\n\n<skill-instruction name="([^"]+)" location="([^"]+)">\n([\s\S]*?)\n<\/skill-instruction>/uy,n=[],r=0;while(!0){t.lastIndex=r;let o=t.exec(e);if(!o||o[1]!==o[2])return;if(n.push({name:o[1],location:o[3],content:o[4]}),r=t.lastIndex,!e.startsWith(`
|
|
289
289
|
|
|
290
290
|
The user explicitly invoked the "`,r))break;r+=2}if(r===e.length)return{skills:n,request:""};let s=r+17,i=e.length-16;if(s<=i&&e.startsWith(`
|
|
291
291
|
|
|
292
292
|
<user-request>
|
|
293
293
|
`,r)&&e.endsWith(`
|
|
294
|
-
</user-request>`))return{skills:n,request:e.slice(s,i)}}function
|
|
294
|
+
</user-request>`))return{skills:n,request:e.slice(s,i)}}function Hh({skills:e}){let t=e.slice(0,3).map(({name:n})=>{let r=n.slice(0,24).replace(/[\uD800-\uDBFF]$/u,"").replace(/\s+/gu," ").trim();return n.length>24?`${r}…`:r||"…"});if(e.length>t.length)t.push(`+${e.length-t.length}`);return t.join(" · ")}function Ph({skills:e}){return e.map(({name:t,location:n,content:r})=>`${t} · ${n}
|
|
295
295
|
|
|
296
296
|
${r}`).join(`
|
|
297
297
|
|
|
298
|
-
`)}var
|
|
299
|
-
`)||e.endsWith("\r")?0:1)}function pi(e){let t=e.toLocaleString(me);return c(`${t} 行`,`${t} ${e===1?"line":"lines"}`)}function Eh(e,t,n){if(e==="apply_patch"){let o=(C(n)||C(t.patch)||C(t.patchText)).trim();if(o.length>65536||!/^\*\*\* Begin Patch\r?\n/u.test(o)||!/\n\*\*\* End Patch$/u.test(o))return[];let a=[];for(let[l,u]of[["Add",c("提交新增","Add")],["Update",c("提交更新","Update")],["Delete",c("提交删除","Delete")]]){let d=[...o.matchAll(new RegExp(`^\\*\\*\\* ${l} File: [^\\r\\n]+`,"gmu"))].length,h=d.toLocaleString(me);if(d)a.push([u,c(`${h} 个文件`,`${h} ${d===1?"file":"files"}`)])}return a}if(e==="write"||e==="write_file"){let o=Hr(t.content);return o===void 0?[]:[[c("提交文本","Submitted text"),pi(o)]]}let r=Hr(t.oldText??t.old_string),s=Hr(t.newText??t.new_string),i=[];if(r!==void 0)i.push([c("替换前","Before replacement"),pi(r)]);if(s!==void 0)i.push([r===void 0?c("提交文本","Submitted text"):c("替换后","After replacement"),pi(s)]);return i}function Ah(e){let t=C(e),n=/^https?:\/\/([^/?#\\]+)/iu.exec(t)?.[1];if(!n||n.includes("@")||/[\s\\\p{Cc}\p{Cf}]/u.test(t))return;let r=URL.parse(t);if(!r||r.username||r.password)return;let s=r.hostname.replace(/\.$/u,"");if(s.length>253||!/[a-z]/iu.test(s))return;if(!s.split(".").every((i)=>/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/iu.test(i)&&!Fo.test(i)))return;return s}function gr(e){let t=C(e);if(!t||t.length>512||!/^[\p{L}\p{M}\p{N}_.~ /\\-]+$/u.test(t)||t.startsWith("-"))return"";if(t==="."||t===".."||t==="~")return t;let n=t.split(/[/\\]/).filter(Boolean);if(n.some((r)=>Fo.test(r)))return"";if(!/[/\\]/.test(t)&&!/^(?:[\p{L}_][\p{L}\p{M}\p{N}_-]{0,23}|[\p{L}\p{N}_-]*\.[\p{L}\p{N}]{1,10})$/u.test(t))return"";return n.length>3?`…/${n.slice(-3).join("/")}`:`${t.startsWith("/")?"/":""}${n.join("/")}`}function Jl(e,t){let n=U(t),{path:r,file_path:s,filePath:i}=n,o=e.toLowerCase();switch(o){case"read":case"read_file":return{kind:"inspect",label:c("读取文件","Read file"),group:"Read",target:gr(r??s??i)};case"grep":return{kind:"inspect",label:c("搜索内容","Search contents"),group:"Grep",target:gr(r)};case"search":return{kind:"inspect",label:c("搜索内容","Search contents"),target:gr(r)};case"find":return{kind:"inspect",label:c("查找文件","Find files"),group:"Find",target:gr(r)};case"glob":return{kind:"inspect",label:c("查找文件","Find files"),group:"Glob",target:gr(r)};case"ls":case"list":case"list_dir":case"list_directory":case"list_files":return{kind:"inspect",label:c("列出目录","List directory"),group:"List",target:gr(r)};case"tool_search":return{kind:"inspect",label:c("查找工具","Find tools"),group:"Tool Search"};case"edit":case"edit_file":case"multiedit":case"apply_patch":return{kind:"modify",label:c("编辑文件","Edit file"),target:gr(r??s??i),facts:Eh(o,n,t)};case"write":case"write_file":return{kind:"modify",label:c("写入文件","Write file"),target:gr(r??s??i),facts:Eh(o,n,t)};case"bash":case"shell":case"powershell":return{kind:"terminal",label:o==="powershell"?"PowerShell":o==="shell"?"Shell":"Bash",operation:c("运行命令","Run command"),command:C(n.command)};case"bash_output":return{kind:"terminal",label:"Bash",operation:c("读取输出","Read output")};case"kill_bash":return{kind:"terminal",label:"Bash",operation:c("终止命令","Stop command")};case"memory":{let[a,l]=r5.get(C(n.command))??[];return{kind:"memory",label:"Memory",operation:a,facts:l?[[c("变更对象","Change target"),l]]:void 0}}case"todo":case"todowrite":{let a=wh(n);return{kind:"todo",label:"Todo",operation:a.operation,preview:a.preview,todo:a}}case"eval":{let a=C(n.action),l=a==="peek"?c("查看执行","View run"):a==="list"?c("列出执行","List runs"):a==="stop"?c("停止执行","Stop run"):a==="run"||n.action===void 0?c("执行脚本","Run script"):void 0;return{kind:"execution",label:"Eval",operation:l,...xh(o,n),group:l&&a!=="stop"&&(n.reset===void 0||n.reset===!1)?"Eval":void 0}}case"ctx_execute":case"ctx_execute_file":return{kind:"context",label:"Ctx Execute",operation:c("执行脚本","Run script"),group:"Ctx Execute",...xh(o,n)};case"ctx_search":{let a=zo(n.queries,qr);return{kind:"context",label:"Ctx Search",operation:c("搜索上下文","Search context"),group:"Ctx Search",facts:a===void 0?void 0:[[c("查询","Queries"),c(`${a.toLocaleString(me)} 条`,a.toLocaleString(me))]]}}case"ctx_batch":{let a=zo(n.commands,qr),l=zo(n.queries,qr),u=a!==void 0&&l!==void 0?{preview:c(`提交 ${a.toLocaleString(me)} 条命令 · ${l.toLocaleString(me)} 条查询`,`Submitted ${a.toLocaleString(me)} ${a===1?"command":"commands"} · ${l.toLocaleString(me)} ${l===1?"query":"queries"}`),facts:[[c("命令","Commands"),c(`${a.toLocaleString(me)} 条`,a.toLocaleString(me))],[c("查询","Queries"),c(`${l.toLocaleString(me)} 条`,l.toLocaleString(me))]]}:void 0;return{kind:"context",label:"Ctx Batch",operation:c("批量查询","Batch search"),group:"Ctx Batch",...u}}case"ctx_index":{let a=[[n.path,c("本机文件","Local file")],[n.content,c("提交文本","Submitted text")],[n.url,c("网页地址","Web address")]].filter(([u])=>qr(u)),l=a.length===1?C(a[0]?.[1]):"";return{kind:"context",label:"Ctx Index",operation:c("收录上下文","Index context"),facts:l?[[c("来源类型","Source type"),l]]:void 0}}case"ctx_purge":{let a=[n.project===!0&&c("项目","Project"),C(n.session)&&c("指定会话","Selected session"),C(n.source)&&c("指定来源","Selected source")].filter(Boolean),l=a.length===1?C(a[0]):"";return{kind:"context",label:"Ctx Purge",operation:c("清除上下文","Clear context"),facts:l?[[c("清除范围","Scope"),l]]:void 0}}case"task":{let a=a5(n),l=a?.map((p)=>p.route),u=n.tasks===void 0?i5(n):void 0,d=n.tasks===void 0&&_h(n.category,n.subagent_type)?C(n.prompt):"",h=l?.length.toLocaleString(me);return{kind:"agent",label:"Agent",operation:c("派发任务","Dispatch tasks"),preview:u?.join(" · ")??(l&&c(`提交 ${h} 项任务`,`Submitted ${h} ${l.length===1?"task":"tasks"}`)),dispatchRoutes:l,agentRouting:u,agentPrompts:a?.map((p)=>p.prompt)??(d.trim()?[d]:void 0)}}case"task_output":return{kind:"agent",label:"Agent",operation:c("查看任务","View task"),scope:l5.get(C(n.mode))};case"task_send":return{kind:"agent",label:"Agent",operation:c("发送消息","Send message")};case"web_search":case"mcp_tinyfish_search":return{kind:"web",label:"Web",operation:c("网页搜索","Search the web"),group:"Web Search",facts:qr(n.query)?[[c("查询","Queries"),c("1 条","1")]]:void 0};case"webfetch":case"mcp_tinyfish_fetch_content":{let a=Ah(n.url),l=zo(n.urls,qr),u=l===1&&Array.isArray(n.urls)?Ah(n.urls[0]):void 0,d=a??u;return{kind:"web",label:"Web",operation:c("读取网页","Read webpage"),group:"Web Fetch",preview:d,facts:[...d?[[c("主机","Host"),d]]:[],...l===void 0?[]:[[c("地址","Addresses"),c(`${l.toLocaleString(me)} 个`,l.toLocaleString(me))]]]}}default:return{kind:"unknown",label:/^[\p{L}\p{N}_.:-]{1,80}$/u.test(e)&&/\p{L}/u.test(e)&&!e.split(/[.:]/u).some((l)=>Fo.test(l)||/^(?:token|password|authorization|bearer|api[_-]?key)$/iu.test(l))?e:c("工具调用","Tool call")}}}var c5=4;function Sh(e,t,n=t.length,r){let s=t.slice(0,c5),i=n-s.length,o=i.toLocaleString(me);return{heading:e,rows:s,note:[r,i>0&&c(`其余 ${o} 项见详情`,`${o} more in details`)].filter(Boolean).join(" · ")}}function Th(e,t){if(!t)return[];let n=Hr(t);return[[e,n===void 0?c("已附","Included"):pi(n)]]}function Rh(e){let t=e.toLocaleString(me);return c(`${t} 行文本`,`${t} ${e===1?"line":"lines"} of text`)}function Zl(e){let t=c("可见输出","Visible output"),n=c("已收到文本","Text received");if(typeof e==="string"){let a=Hr(e);return e.length?[[t,a===void 0?n:Rh(a)]]:[]}let r=0,s=0;for(let a of we(e)){let l=U(a);if(l.type==="text"&&typeof l.text==="string"){let u=Hr(l.text);if(u===void 0)return[[t,n]];r+=u}else if(l.type==="image"||l.type==="image_placeholder"||l.type==="imagePlaceholder")s++}let i=s.toLocaleString(me),o=[r&&Rh(r),s&&c(`${i} 项图片`,`${i} ${s===1?"image":"images"}`)].filter(Boolean).join(" · ");return o?[[t,o]]:[]}function ws(e,t,n){if(t.length)return{heading:e,facts:t,note:n}}function u5(e){let t=e.trim().replace(/\s+/gu," "),n=/^[\s\S]{1,140}/u.exec(t)?.[0]??"";return n.length<t.length?`${n}…`:n}function Mh(e,t){let n=e.facts??[];switch(e.kind){case"todo":{let r=e.todo?.card;if(r)return Sh(r.heading,r.titles,r.total);return}case"agent":{let r=e.dispatchRoutes??e.agentRouting;if(r?.length){let s=e.agentPrompts;return{...Sh(c("派发配置","Dispatch settings"),r),prompts:s&&{previews:s.slice(0,2).map(u5),count:s.length}}}if(e.scope)return ws(c("任务读取","Task lookup"),[[c("范围","Scope"),e.scope]]);return}case"terminal":return ws(c("终端记录","Terminal log"),[...Th(c("命令","Command"),e.command),...Zl(t)]);case"execution":case"context":return ws(e.kind==="execution"?c("脚本记录","Script run"):c("上下文请求","Context request"),[...n,...Th(c("源码","Source code"),e.source),...Zl(t)]);case"modify":return ws(c("提交内容","Submitted changes"),n);case"memory":return ws(c("记忆变更","Memory changes"),n,c("路径与内容按需查看","Open details to inspect paths and content"));case"web":return ws(c("网页请求","Web request"),[...n,...Zl(t)]);case"inspect":case"unknown":return;default:return e.kind}}function Yl(e){let t=y("ul","tool-card-rows");return t.append(...e.map((n)=>y("li","",n))),t}function Xl(e,t){let n=(e+1).toLocaleString(me);return t>1?c(`任务 ${n} · 提示词`,`Task ${n} prompt`):c("提示词","Prompt")}function Dh(e){let t=y("div","tool-card-content");if(t.append(y("p","tool-card-heading",e.heading)),"rows"in e)t.append(Yl(e.rows));else{let n=y("dl","tool-card-facts");for(let[r,s]of e.facts){let i=y("div","tool-card-fact");i.append(y("dt","",r),y("dd","",s)),n.append(i)}t.append(n)}if(e.prompts){let{previews:n,count:r}=e.prompts,s=y("div","tool-card-prompts");if(n.forEach((i,o)=>{let a=y("div");a.append(y("p","tool-card-note",Xl(o,r)),y("p","tool-card-prompt",i)),s.append(a)}),r>n.length){let i=r-n.length,o=i.toLocaleString(me);s.append(y("p","tool-card-note",c(`其余 ${o} 条提示词见详情`,`${o} more ${i===1?"prompt":"prompts"} in details`)))}t.append(s)}if(e.note)t.append(y("p","tool-card-note",e.note));return t}class Ql{node=y("details","tool-group");body=y("ol","tool-group-body");count=y("span","tool-group-count");kinds=y("span","tool-group-kinds");paths=y("span","tool-group-paths");rows=new WeakMap;constructor(){let e=y("summary","tool-group-summary");e.append(this.count," ",this.kinds," ",this.paths),this.node.append(e,this.body)}update(e){let t=new Map,n=new Set,r=!0,s=this.body.firstElementChild;for(let u of e){let d=u.firstElementChild;if(d instanceof HTMLDetailsElement){let p=d.dataset.groupTool;if(p)t.set(p,(t.get(p)??0)+1);r&&=d.dataset.toolKind==="inspect";let g=d.querySelector(":scope > .tool-summary .tool-target:not([hidden])")?.textContent;if(g&&n.size<2)n.add(g)}let h=this.rows.get(u);if(!h)h=y("li","tool-group-row"),this.rows.set(u,h);if(u.parentElement!==h||h.parentElement!==this.body){if(u.contains(document.activeElement)||d instanceof HTMLDetailsElement&&d.open)this.node.open=!0}if(u.parentElement!==h)h.append(u);if(h!==s)this.body.insertBefore(h,s);s=h.nextElementSibling}while(s){let u=s.nextElementSibling;s.remove(),s=u}let i=r?c("探查工具","File and tool lookups"):c("工具调用","Tool calls"),o=e.length.toLocaleString(me),a=c(`${i} · ${o} 项成功`,`${i} · ${o} succeeded`);if(this.count.textContent!==a)this.count.textContent=a;let l=[...t].map(([u,d])=>`${u} ×${d.toLocaleString(me)}`);if(this.kinds.textContent!==l.join(" "))this.kinds.replaceChildren(...l.flatMap((u,d)=>[...d?[" "]:[],y("span","tool-group-kind",u)]));if(this.paths.textContent!==[...n].join(" "))this.paths.replaceChildren(...[...n].flatMap((u,d)=>[...d?[" "]:[],y("code","tool-group-path path",u)]));return this.paths.hidden=!n.size,this.node}}var e0={inspect:c("探查结果","Inspection results"),modify:c("文件变更回执","File change receipt"),terminal:c("终端输出","Terminal output"),todo:c("待办工具回执","Todo receipt"),memory:c("记忆工具回执","Memory receipt"),execution:c("执行结果","Execution results"),context:c("上下文结果","Context results"),agent:c("任务工具输出","Agent tool output"),web:c("网页输出","Web output"),unknown:c("输出","Output")};function d5(e){let t=y("div","tool-scene tool-terminal"),n=In(""),r=n.querySelector("code"),s=y("div","tool-terminal-input");return n.classList.add("tool-command-preview"),n.setAttribute("aria-label",c("提交的命令","Submitted command")),s.append(y("span","tool-scene-key",c("命令","Command")),n),t.append(s,e),{node:t,update(i){if(s.hidden=!i.command,r)re(r,i.command)}}}function Ih(e,t){let n=y("details",`tool-receipt tool-${e}-receipt`);return n.append(y("summary","",c("查看原始回执","View raw receipt")),t),n}function f5(e){let t=y("div","tool-scene tool-todo"),n=y("div","tool-todo-list"),r=y("div","tool-todo-board");return n.append(y("p","tool-scene-key",c("提交的待办","Tasks submitted")),r),t.append(n,Ih("todo",e)),{node:t,update(s){let i=s.todo?.batches??[];n.hidden=!i.length;let o=1;r.replaceChildren(...i.map((a)=>{let l=y("div","tool-todo-lane stack stack--tight"),u=y("ol");if(u.start=o,o+=a.items.length,u.append(...a.items.map((d)=>y("li","",d))),a.phase)l.append(y("p","small",a.phase));return l.append(u),l}))}}}function Lh(e,t){let n=y("div",`tool-scene tool-code-desk tool-code-desk--${t?"context":"execution"}`),r=y("details","tool-source"),s=In(""),i=s.querySelector("code");return r.append(y("summary","",c("查看原始代码","View source code")),s),n.append(r,e),{node:n,update(o){if(r.hidden=!o.source,i)re(i,o.source)}}}function Nh(e,t){switch(e){case"terminal":return d5(t);case"todo":return f5(t);case"memory":{let n=y("div","tool-scene tool-memory-audit");return n.append(y("p","tool-memory-note small muted",c("记忆路径与内容默认隐藏。","Memory paths and content are hidden by default.")),Ih("memory",t)),{node:n}}case"execution":return Lh(t,!1);case"context":return Lh(t,!0);case"inspect":case"modify":{let n=y("div",`tool-scene tool-file tool-file--${e}`);return n.append(t),{node:n}}case"agent":{let n=y("div","tool-scene tool-agent"),r=y("p","tool-agent-scope small muted"),s=y("div","stack stack--tight"),i=y("div","stack stack--tight"),o=[];return i.hidden=!0,n.append(r,s,i,t),{node:n,update(a){if(re(r,a.scope&&c(`范围:${a.scope}`,`Scope: ${a.scope}`)),s.hidden=!a.dispatchRoutes,a.dispatchRoutes)s.replaceChildren(y("p","tool-scene-key",c("派发配置","Dispatch settings")),Yl(a.dispatchRoutes));let l=a.agentPrompts??[];if(l.length===o.length&&l.every((u,d)=>u===o[d]))return;o=l,i.hidden=!l.length,i.replaceChildren(...l.flatMap((u,d)=>{let h=Xl(d,l.length),p=In(u);return p.classList.add("tool-agent-prompt"),p.setAttribute("aria-label",h),[y("p","tool-scene-key",h),p]}))}}}case"web":{let n=y("div","tool-scene tool-web");return n.append(t),{node:n}}case"unknown":return;default:return e}}var Bh={running:{label:c("运行中","Running"),icon:"M12 4a8 8 0 1 0 8 8"},success:{label:c("成功","Succeeded"),icon:"m5 12 4 4L19 6"},error:{label:c("失败","Failed"),icon:"m6 6 12 12M18 6 6 18"},unknown:{label:c("未见结果","No result"),icon:"M6 12h12"},incomplete:{label:c("结果不完整","Incomplete result"),icon:"M12 4v10m0 5v1"}},Oh=c("工具输出","Tool output"),xs=(e)=>e?.truncated===!0||e?.partial===!0,$h=(e)=>typeof e.content==="string"||Array.isArray(e.content);function h5(e,t,n){if(n?.isError===!0||C(n?.errorMessage)||t?.stage==="error")return"error";if(xs(e)||xs(n)||n?.isError===!1&&!$h(n))return"incomplete";if(n?.isError===!1||t?.stage==="done")return"success";return!n&&t?.stage==="running"?"running":"unknown"}function t0(e,t="16"){let n=document.createElementNS("http://www.w3.org/2000/svg","svg");for(let[r,s]of Object.entries({viewBox:"0 0 24 24",width:t,height:t,"aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))n.setAttribute(r,s);return n.append(e),n}class n0{renderOutputPart;node=y("article","message message--tool");details=y("details","tool-details");label=y("span","tool-label");target=y("span","tool-target path");operation=y("span","tool-operation small muted");preview=y("span","tool-preview small muted");compactFacts=y("span","tool-card-inline small muted");status=y("span","tool-state-text");icon=document.createElementNS("http://www.w3.org/2000/svg","path");kindIcon=document.createElementNS("http://www.w3.org/2000/svg","path");identity=y("p","tool-name small muted",c("工具名:","Tool name: "));name=y("code");args=In("");argsSection=y("div","stack stack--tight");rawArgs=y("details","tool-raw-args");output=y("div","tool-output stack stack--tight");outputLabel=y("p","small muted",e0.unknown);empty=y("p","muted small");outputSection=y("div","tool-result stack stack--tight");body=y("div","fold-body stack stack--tight");card;cardKey;scene;lastName;lastArgs;lastOutput;group;attachment;constructor(e){this.renderOutputPart=e;let t=y("summary","tool-summary"),n=y("span","tool-chevron");n.setAttribute("aria-hidden","true");let r=y("span","tool-subject"),s=t0(this.kindIcon);s.classList.add("tool-kind-icon"),this.compactFacts.hidden=!0,r.append(s,this.label,this.operation,this.target,this.preview,this.compactFacts);let i=y("span","tool-state");i.append(t0(this.icon),this.status),t.append(n,r," ",i),this.identity.append(this.name),this.rawArgs.append(y("summary","",c("原始参数","Raw arguments"))),this.argsSection.append(y("p","small muted",c("调用参数","Call arguments"))),this.output.tabIndex=0,this.output.setAttribute("role","region"),this.output.setAttribute("aria-label",Oh),this.outputSection.append(this.outputLabel,this.output,this.empty),this.body.append(this.identity),this.details.append(t,this.body),this.node.append(this.details)}get open(){return this.details.open}set open(e){this.details.open=e}groupWith(e){return this.group??=new Ql,this.group.update(e)}updateCard(e,t){let n=Mh(e,t),r=Boolean(e.preview&&!e.dispatchRoutes),s=n&&JSON.stringify([e.kind,n,r]);if(this.cardKey===s)return;if(this.cardKey=s,this.card?.remove(),this.card=void 0,re(this.compactFacts,n&&"facts"in n?n.facts.map(([l,u])=>`${l} ${u}`).join(" · "):""),!n)return;let i=y("div","tool-card-preview");if(r)i.dataset.repeatRecap="";let o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("d",e.kind==="todo"?"m3 12 6 6L21 6":Vl[e.kind]);let a=t0(o,"0");a.classList.add("tool-card-emblem"),i.append(a,Dh(n)),this.node.append(i),this.card=i}update(e,t,n,r){let s=C(e?.name)||t?.name||C(n?.toolName),i=e?.arguments===void 0?t?.args:e.arguments,o=n?.content??t?.output,a=h5(e,t,n),l=s==="send_file"&&a==="success"&&n?.role==="toolResult"&&n.toolName===s&&n.isError===!1?vh(r,n.content):void 0;if(l?.href!==this.attachment?.href||l?.textContent!==this.attachment?.textContent){if(this.attachment?.remove(),this.attachment=l,l)this.node.append(l)}let u=a==="unknown"&&n?c("状态未知","Unknown status"):Bh[a].label,d=Jl(s,i),{kind:h,label:p,operation:g,target:b,preview:x,group:k}=d,E=this.details.dataset.toolKind!==h;if(E){this.details.dataset.toolKind=h,this.kindIcon.setAttribute("d",Vl[h]);let D=e0[h];if(this.outputLabel.textContent=D,this.output.setAttribute("aria-label",h==="unknown"?Oh:D),this.scene?.node.remove(),this.outputSection.remove(),this.argsSection.remove(),this.rawArgs.remove(),this.scene=Nh(h,this.outputSection),this.body.classList.toggle("tool-generic",!this.scene),this.scene)this.rawArgs.append(this.args),this.body.append(this.scene.node,this.rawArgs);else this.argsSection.append(this.args),this.body.append(this.argsSection,this.outputSection)}if(this.details.dataset.groupTool!==k)if(k)this.details.dataset.groupTool=k;else delete this.details.dataset.groupTool;let T=this.details.dataset.state;if(T!==a)if(this.details.dataset.state=a,this.icon.setAttribute("d",Bh[a].icon),a==="running"&&this.scene)this.details.dataset.toolMotion="entry";else if(T==="running"&&(a==="success"||a==="error"))this.details.dataset.toolMotion="settlement";else delete this.details.dataset.toolMotion;if(this.status.textContent!==u)this.status.textContent=u;if(this.label.textContent!==p)this.label.textContent=p;re(this.operation,g),re(this.target,b),re(this.preview,x),re(this.name,h==="unknown"||s.toLowerCase()===p.toLowerCase()?"":s),this.identity.hidden=this.name.hidden;let _=E||this.lastArgs!==i||this.lastName!==s;if(_||this.lastOutput!==o)this.updateCard(d,o);if(_){this.scene?.update?.(d),this.argsSection.hidden=this.rawArgs.hidden=i===void 0;let D=this.args.firstElementChild,R=dc(i);if(D&&D.textContent!==R)D.textContent=R;this.lastArgs=i,this.lastName=s}if(this.lastOutput!==o){let D=typeof o==="string"?[{type:"text",text:o}]:we(o),R=this.output.scrollTop,L=this.output.scrollLeft;this.output.replaceChildren(...D.flatMap((B)=>{let O=this.renderOutputPart(U(B));if(O?.tagName==="PRE")O.removeAttribute("tabindex");return O??[]})),this.output.scrollTop=R,this.output.scrollLeft=L,this.lastOutput=o}this.output.hidden=!this.output.childElementCount,this.outputLabel.hidden=this.output.hidden,this.empty.hidden=!this.output.hidden;let A=a==="running"?c("等待工具输出…","Waiting for tool output…"):a==="unknown"&&!n?c("没有可见的工具结果。","No tool result is available."):c("无可显示的输出。","No output to display.");if(this.empty.textContent!==A)this.empty.textContent=A}}function zh({entries:e,start:t,liveKey:n,tools:r,calls:s,results:i}){let o=new Map,a=!1,l=[],u=()=>{if(l.length>1)for(let d of l)o.set(C(d.id),l);l=[]};for(let d=t;d<e.length;d++){let h=e[d],p=h?.message;if(!h||!p||p.role!=="assistant"||!a||h.key===n||p.streaming===!0||xs(p)||C(p.errorMessage)||p.stopReason!==void 0&&p.stopReason!=="toolUse"&&p.stopReason!=="stop"){if(u(),p?.role==="user")a=!xs(p);continue}let g=we(p.content).map(U);if(!g.length){u();continue}let b=new Set(g.flatMap((k)=>k.type==="toolCall"?C(k.id)||[]:[])),x=new Map;for(let k=e[d+1]?.message;k?.role==="toolResult";k=e[d+1]?.message){let E=C(k.toolCallId);if(!b.has(E)||x.has(E)||i.get(E)!==d+1)break;x.set(E,k),d++}for(let k of g){let E=C(k.id),T=C(k.name).toLowerCase(),_=x.get(E),A=r.get(E),D=A?.stage,R=k.arguments===void 0?A?.args:k.arguments;if(k.type==="toolCall"&&s.get(E)===1&&Jl(T,R).group&&!xs(k)&&_?.isError===!1&&$h(_)&&!xs(_)&&!C(_.errorMessage)&&(!C(_.toolName)||C(_.toolName).toLowerCase()===T)&&(D===void 0||D==="done"))l.push(k);else u()}}return u(),o}function qo(e){if(!e)return;return e.closest(".tool-group:not([open])")?.querySelector(":scope > summary")??e}function Uh(e){return typeof e==="string"?[{type:"text",text:e}]:we(e)}var Ho=Symbol("skill instructions");function m5(e){let t=Uh(e.content).map(U);if(e.role!=="user")return t;let n=U(e.historyContent);if(C(n.cursor)){let i=C(n.skillNames);return i?[...t,{type:Ho,names:i}]:t}let r=[];return[...t.map((i)=>{let o=i.type==="text"?mh(C(i.text)):void 0;if(!o)return i;return r.push({type:Ho,names:ph(o),text:gh(o)}),{type:"text",text:o.request}}),...r]}function p5(e,t){let n=t instanceof HTMLDetailsElement?t:Mt("",y("p","plain"));n.classList.add("skill-instructions");let r=C(e.names),s=n.querySelector("summary"),i=c(`Skill 指令 · ${r}`,`Skill instructions · ${r}`);if(s&&s.textContent!==i)s.textContent=i;let o=n.querySelector(":scope > .fold-body > p");if(o){let a=C(e.text);if(o.textContent!==a)o.textContent=a;o.hidden=!a}return n}function Wh(e,t,n){if(t==="tool"&&e.type!=="text"&&e.type!=="image"&&e.type!=="image_placeholder"&&e.type!=="imagePlaceholder")return;switch(e.type){case"text":{let r=C(e.text);if(!r)return;return t==="markdown"?jl(r,n):t==="tool"?In(r):y("p","plain",r)}case"thinking":{let r=C(e.thinking);if(!r)return;let s=n?.querySelector(".plain");if(n&&s)return s.textContent=r,n;return Mt(c("思考过程","Thinking"),y("p","plain muted",r))}case"image":{let r=C(e.data);if(!Gi(e.mimeType)||!/^[A-Za-z0-9+/]+={0,2}$/.test(r))return y("p","small muted",c("图片内容不可用","Image unavailable"));let s=y("img");return s.alt=t==="tool"?c("工具输出图片","Tool output image"):c("消息图片","Image attached to message"),s.loading="lazy",s.src=`data:${e.mimeType};base64,${r}`,s}case"image_placeholder":case"imagePlaceholder":return y("p","small muted",c("此图片未包含在会话快照中","This image is not included in the session snapshot."));default:{let r=C(e.type)||c("未知类型","Unknown type");return Object.keys(e).length?y("p","small muted",c(`未展开的内容 · ${r}`,`Content not displayed · ${r}`)):void 0}}}var on=(e)=>C(e.role),Pr=(e)=>{if(on(e)==="toolResult"&&C(e.toolCallId))return`result:${C(e.toolCallId)}`;if(C(e.id))return`id:${C(e.id)}`;let t=Ce(e.timestamp);return t===void 0?"":`${on(e)}:${t}`};function g5(e){let t=Ce(e);if(t===void 0)return;let n=new Date(t);if(!Number.isFinite(n.getTime()))return;let r=y("time","numerical",n.toLocaleTimeString(me,{hour:"2-digit",minute:"2-digit"}));return r.dateTime=n.toISOString(),r.title=n.toLocaleString(me),r}function b5(e,t,n,r){let s=on(e),i=r?.role===s?r:void 0,o=s==="user"||s==="assistant",a=i?.node??y("article",o?`message message--${s}`:"message"),l=i?.speaker??y("span","speaker"),u=s==="assistant"?t?c("助手 · 正在生成","Assistant · Writing"):c("助手","Assistant"):s==="user"?c("你","You"):s==="bashExecution"?c("命令输出","Command output"):c("会话记录","Session record");if(l.textContent!==u)l.textContent=u;let d=i?.body??y("div","message-body"),h=i?.timestamp===e.timestamp?i?.time:g5(e.timestamp),p=i?.header??y("header");if(!i){if(o){let B=document.createElementNS("http://www.w3.org/2000/svg","svg"),O=document.createElementNS("http://www.w3.org/2000/svg","path");B.setAttribute("viewBox","0 0 24 24"),B.setAttribute("fill","currentColor"),B.setAttribute("aria-hidden","true"),B.setAttribute("focusable","false"),O.setAttribute("fill-rule","evenodd"),O.setAttribute("d",s==="user"?"M3 6 6 3h15v15l-3 3H3V6Zm9 1-1.4 1.4 2.6 2.6H7v2h6.2l-2.6 2.6L12 17l5-5-5-5Z":"M12 2 22 12 12 22 2 12 12 2Zm0 3-7 7 7 7 7-7-7-7Zm0 4 3 3-3 3-3-3 3-3Z"),B.append(O);let H=y("span","message-identity");l.style.overflowWrap="normal",H.append(B,l),p.append(H)}else p.append(l);a.append(d)}if(i?.time!==h){if(i?.time?.remove(),h)p.append(h)}let g=m5(e).map((L,B)=>{if(L.type==="toolCall")return{part:L,node:n(L,B)};let O=i?.parts[B];if(O){let G=Object.keys(L);if(O.part===L||G.length===Object.keys(O.part).length&&G.every((de)=>Object.hasOwn(O.part,de)&&L[de]===O.part[de]))return O}let H=O?.part.type===L.type?O?.node:void 0,K=L.type===Ho?p5(L,H):Wh(L,s==="assistant"?"markdown":"plain",H);if(K instanceof HTMLDetailsElement&&H instanceof HTMLDetailsElement)K.open=H.open;return{part:L,node:K}}),b=C(e.errorMessage),x=s==="bashExecution"?C(e.output):"",k=C(e.stopReason),E=JSON.stringify([x,b,k]),T=i?.metadata===E?i.notices:[...x?[In(x)]:[],...b||k==="error"?[y("p","notice error small",b||c("生成失败","Could not generate a response."))]:[],...k==="aborted"?[y("p","muted small",c("已停止生成","Response stopped."))]:[],...k==="length"?[y("p","muted small",c("已达到输出长度限制","Response reached the length limit."))]:[]],_=s==="assistant"&&!T.length&&g.some(({part:L})=>L.type==="toolCall")&&g.every(({part:L,node:B})=>L.type==="toolCall"||!B||L.type==="text"&&!C(L.text).trim());if(a.classList.toggle("message--tool-only",_),_)p.remove();else if(p.parentNode!==a)a.prepend(p);let A=(_?g.filter(({part:L})=>L.type==="toolCall"):g).flatMap((L)=>L.node??[]),D=new Set(A);for(let L of i?.parts??[])if(L.node?.parentNode===d&&!D.has(L.node))L.node.remove();if(i&&i.notices!==T)for(let L of i.notices)L.remove();let R=d.firstElementChild;for(let L of[...A,...T]){if(L!==R)d.insertBefore(L,R);R=L.nextElementSibling}return{node:a,body:d,header:p,speaker:l,time:h,timestamp:e.timestamp,role:s,parts:g,notices:T,metadata:E}}var r0=80,Fh=c("加载更早消息","Load older messages"),qh=c("重新加载记录","Reload transcript");function Hh(e,t,n){if(e.textContent!==n)e.textContent=n;e.toggleAttribute("data-reload",t?.reload===!0),e.setAttribute("aria-disabled",String(Boolean(t?.busy||t?.disabled))),e.setAttribute("aria-busy",String(t?.busy===!0))}function Ph(e){if(e&&!e.busy&&!e.disabled)e.activate()}class Wn{root;scroller;empty;cache=new Map;openFolds=new Map;toolViews=new Map;openTools=new Set;results=new Map;contentViews=new WeakMap;older=Ue(Fh,()=>{if(this.start)this.flush(!0);else Ph(this.latest?.history?.older)},"transcript-load");status=y("span","sr-only");olderError=y("p","notice small");latest;frame;forceBottom=!1;prepended;limit=r0;start=0;first;displayed;indexed;indexedLength=0;trace;constructor(e,t,n){this.root=e;this.scroller=t;this.empty=n;this.status.setAttribute("role","status"),this.olderError.setAttribute("role","status")}observeTrace(e){this.trace=e}reset(){if(this.frame!==void 0)cancelAnimationFrame(this.frame);this.frame=void 0,this.latest=this.displayed=this.indexed=void 0,this.first=void 0,this.forceBottom=!1,this.prepended=void 0,this.limit=r0,this.start=this.indexedLength=0,this.cache.clear(),this.openFolds.clear(),this.toolViews.clear(),this.openTools.clear(),this.results.clear(),this.root.replaceChildren(),this.status.textContent="",this.empty.hidden=!1,this.scroller.scrollTop=0,this.trace?.({})}render(e,t,n,r=!1,s,i,o){if(this.latest={entries:e,liveKey:t,tools:n,history:s,sessionId:o},this.forceBottom||=r,i!==void 0)this.prepended=(this.prepended??0)+i;this.frame??=requestAnimationFrame(()=>{this.frame=void 0,this.flush()})}indexResults(e){if(this.indexed!==e||this.indexedLength>e.length)this.indexed=e,this.indexedLength=0,this.results.clear();for(;this.indexedLength<e.length;this.indexedLength++){let t=e[this.indexedLength]?.message,n=C(t?.toolCallId);if(t?.role==="toolResult"&&n)this.results.set(n,this.indexedLength)}}flush(e=!1){if(!this.latest||e&&!this.start)return;if(this.frame!==void 0)cancelAnimationFrame(this.frame);this.frame=void 0;let{entries:t,liveKey:n,tools:r,history:s,sessionId:i}=this.latest,o=this.prepended;this.prepended=void 0;let a=e||o!==void 0,{scrollTop:l,scrollHeight:u,clientHeight:d}=this.scroller,h=document.activeElement,p=h instanceof HTMLElement&&this.root.contains(h)&&(h.closest(".tool-details, .tool-group, .tool-attachment, .transcript-content, .skill-instructions, .prose")||this.trace&&h.matches(".message[tabindex='-1']"))?h:void 0,g=p?.matches(".tool-group-summary")?p.parentElement?.querySelector(".tool-summary"):p?.querySelector(".tool-summary"),b=u-d-l<72,x=this.forceBottom||b&&!p&&h!==this.older;this.forceBottom=!1;let k=this.olderError.nextElementSibling,E=a&&k instanceof HTMLElement?k:void 0,T=E?.querySelector(".tool-summary")??void 0,_=a&&p?.closest(".tool-details, .tool-group")&&E?.contains(p)?p:E,A=_?.getBoundingClientRect().top,D=a&&document.activeElement===this.older;this.indexResults(t);let R=[];for(let[W,ge]of r)if(!this.results.has(W))R.push({key:`result:${W}`,tool:ge});let L=t.length+R.length;if(o!==void 0)this.limit+=o;let B=Math.max(0,L-this.limit);if(!this.displayed||x&&!a)this.start=B;else{if(t!==this.displayed&&this.first){let W=t.findIndex((ge)=>ge.key===this.first);if(W>=0)this.start=W}this.start=Math.min(this.start,B)}let O=o??0;if(e)O=Math.min(this.start,r0),this.start-=O,this.limit=Math.max(this.limit,L-this.start);else if(o!==void 0)this.start=Math.max(0,this.start-o);this.displayed=t,this.first=t[this.start]?.key;let H=[],K=new Map;for(let W=this.start;W<t.length;W++){let ge=t[W];if(!ge)continue;let{message:q}=ge;if(q.role==="toolResult"){let Y=C(q.toolCallId);if(!Y||this.results.get(Y)===W)H.push({...ge,tool:r.get(Y)})}else{let Y=!1;if(q.role==="assistant")for(let ue of Uh(q.content)){let le=U(ue);if(le.type!=="toolCall")continue;Y=!0;let be=C(le.id);if(be)K.set(be,(K.get(be)??0)+1)}H.push({...ge,live:ge.key===n,hasCalls:Y})}}for(let W=Math.max(0,this.start-t.length);W<R.length;W++)H.push(R[W]);let G=zh({entries:t,start:this.start,liveKey:n,tools:r,calls:K,results:this.results}),de=new Set(H.filter((W)=>W.message&&W.message.role!=="toolResult").map((W)=>W.key));for(let[W,ge]of this.cache)if(!de.has(W)){let q=[...ge.view.body.querySelectorAll(":scope > details:not(.tool-group)")].flatMap((Y,ue)=>Y.open?[ue]:[]);if(q.length)this.openFolds.set(W,q);ge.view.node.remove(),this.cache.delete(W)}let ne=new Set,ae,z=(W,ge,q,Y)=>{if(ne.has(W))return;ne.add(W);let ue=this.toolViews.get(W);if(!ue)ue=new n0((be)=>Wh(be,"tool")),ue.open=this.openTools.delete(W),this.toolViews.set(W,ue);ue.update(ge,q,Y,i);let le=ue.node.querySelector(":scope > .tool-details > .fold-body");if(le)this.renderHistoryContent(le,Y&&s?.content(Y));if(this.trace&&(q?.id||C(ge?.id)||C(ge?.name)||C(Y?.toolCallId)||C(Y?.toolName)))ae=ue.node;return ue.node};if(this.older.parentNode!==this.root)this.root.prepend(this.status,this.older,this.olderError);let j=this.start?void 0:s?.older;this.older.hidden=!this.start&&!j;let Z=this.start.toLocaleString(me),Q=this.start?c(`加载更早消息(${Z} 条)`,`Load older messages (${Z})`):j?.reload?qh:j?.busy?c("正在读取…","Loading…"):Fh;if(Hh(this.older,j,Q),this.olderError.hidden=!j?.error,this.olderError.textContent!==(j?.error??""))this.olderError.textContent=j?.error??"";let oe=(W,ge)=>{let q=C(ge.id),Y=this.results.get(q);return z(q?`id:${q}`:W,ge,r.get(q),Y===void 0?void 0:t[Y]?.message)},F=this.olderError,X,te;for(let W of H){let{message:ge}=W,q;if(!ge||ge.role==="toolResult"){let ue=C(ge?.toolCallId)||W.tool?.id;if(ue&&K.has(ue))continue;q=z(ue?`id:${ue}`:`row:${W.key}`,void 0,W.tool,ge)}else{let ue=!1;q=this.updateMessage(W,ge,(be,Ae)=>{let He=C(be.id),Ne=G.get(He),Pe=`part:${W.key}:${Ae}`;if(!Ne)return oe(Pe,be);if(Ne[0]!==be){ue=!0;return}let mt=Ne.flatMap((Dn)=>oe(Pe,Dn)??[]);return this.toolViews.get(`id:${He}`)?.groupWith(mt)});let le=this.cache.get(W.key)?.view;if(le){let be=s?.content(ge),Ae=le.parts.filter(({part:mt})=>mt.type==="text"),Ne=le.parts.find(({part:mt})=>mt.type===Ho)?.node?.querySelector(":scope > .fold-body"),Pe=Ne&&C(U(ge.historyContent).skillNames);if(Ae.length===1&&Ae[0]?.node)Ae[0].node.hidden=!Pe&&Boolean(be?.chunks.length);if(this.renderHistoryContent(le.body,Pe?void 0:be,ge.role==="assistant"&&Ae.length===1),Ne)this.renderHistoryContent(Ne,Pe?be:void 0)}if(ue&&q.classList.contains("message--tool-only")&&!this.cache.get(W.key)?.view.body.childElementCount){q.remove();continue}if(this.trace&&(ge.role==="user"||ge.role==="assistant")){if(this.cache.get(W.key)?.view.parts?.some(({part:Ae,node:He})=>He&&Ae.type!=="toolCall"&&Ae.type!=="thinking"&&(Ae.type!=="text"||C(Ae.text).trim())))if(ge.role==="user")X=q;else te=q}}if(!q)continue;let Y=F.nextElementSibling;if(q!==Y)this.root.insertBefore(q,Y);F=q}for(let[W,ge]of this.toolViews)if(!ne.has(W)){if(ge.open)this.openTools.add(W);ge.node.remove(),this.toolViews.delete(W)}if(p&&document.activeElement===document.body){let W=this.root.contains(p)?p:g;if(W&&this.root.contains(W))qo(W)?.focus({preventScroll:!0})}this.empty.hidden=L>0;let xe=ae?.closest(".tool-group")??ae;if(this.trace?.({user:X,assistant:te,tool:xe?.querySelector("summary")??void 0}),a){if(O){let ge=O.toLocaleString(me);this.status.textContent=c(`已加载 ${ge} 条更早消息。`,`Loaded ${ge} older ${O===1?"message":"messages"}.`)}let W=_&&this.root.contains(_)?qo(_):qo(T);if(W&&this.root.contains(W)&&A!==void 0){if(D&&(O||this.older.hidden)){if(W.tagName!=="SUMMARY")W.tabIndex=-1;W.focus({preventScroll:!0})}this.scroller.scrollTop+=W.getBoundingClientRect().top-A}else if(D&&this.older.hidden)this.scroller.focus({preventScroll:!0})}else if(x)this.scroller.scrollTop=this.scroller.scrollHeight;if(!a&&h===this.older&&this.older.hidden)this.scroller.focus({preventScroll:!0})}renderHistoryContent(e,t,n=!1){let r=this.contentViews.get(e);if(r&&(!t||r.key!==t.key)){let u=r.node.contains(document.activeElement);if(r.node.remove(),this.contentViews.delete(e),r=void 0,u)this.scroller.focus({preventScroll:!0})}if(!t)return;if(!r){let u=y("div","transcript-content stack stack--tight"),d=y("div",n?"prose":"plain break"),h=y("p","small muted");h.setAttribute("role","status");let p=Ue("",()=>Ph(this.contentViews.get(e)?.control),"button--quiet");u.append(d,h,p),e.append(u),r={key:t.key,node:u,output:d,status:h,button:p,count:0,length:0},this.contentViews.set(e,r)}if(r.control=t.control,t.chunks.length<r.count)r.count=r.length=0,r.output.replaceChildren(),r.output.className=n?"prose":"plain break";let s=t.chunks.slice(r.count),i;if(s.length){let u=r.length;if(r.length+=s.reduce((d,h)=>d+h.length,0),n&&r.length<=$o)jl(t.chunks.join(""),r.output),i=r.output;else{let d=n&&u<=$o;if(d)r.output.className="plain break",r.output.replaceChildren(y("p","small muted",c("正文过长,已按纯文本显示。","This long message is displayed as plain text.")));let h=(d?t.chunks:s).map((p)=>y("span","",p));r.output.append(...h),i=h.find((p)=>p.textContent)}}r.count=t.chunks.length,r.output.hidden=!r.count;let o=t.control?.reload?qh:t.control?.busy?c("正在读取…","Loading…"):r.count?c("加载下一段正文","Load next content chunk"):c("加载正文","Load message content");Hh(r.button,t.control,o);let a=t.control?.reload?c("记录版本已失效。","This transcript page expired."):t.control?.error??(s.length?c("已加载正文。","Message content loaded."):t.control?.busy||!r.count?"":r.status.textContent);if(r.status.textContent!==a)r.status.textContent=a;if(r.status.hidden=!a,i&&document.activeElement===r.button)i.tabIndex=-1,i.focus({preventScroll:!0});let l=!t.control&&document.activeElement===r.button;if(r.button.hidden=!t.control,l)this.scroller.focus({preventScroll:!0})}updateMessage(e,t,n){let{key:r,hasCalls:s}=e,i=Boolean(e.live),o=this.cache.get(r);if(!s&&o&&o.message===t&&o.live===i)return o.view.node;let a=b5(t,i,n,o?.view);if(o&&a.node!==o.view.node)o.view.node.remove();if(!o){let l=this.openFolds.get(r);if(l){let u=a.body.querySelectorAll(":scope > details:not(.tool-group)");for(let d of l)if(u[d])u[d].open=!0;this.openFolds.delete(r)}}return this.cache.set(r,{message:t,live:i,view:a}),a.node}}function s0(e){let t=U(e),n=C(t.id);if(n)return{id:n,olderCursor:C(t.olderCursor)}}function i0(e){let t=U(e).status;if(t==="truncated"||t==="unavailable")return t}class o0{api;sessionId;current;enabled;tail;changed;reload;id;entries=[];status;stale=!1;reloading=!1;olderCursor;olderError;requests=new Map;contents=new Map;constructor(e,t,n,r,s,i,o,a){this.api=t;this.sessionId=n;this.current=r;this.enabled=s;this.tail=i;this.changed=o;this.reload=a;this.id=e.id,this.olderCursor=e.olderCursor}invalidate(){for(let e of this.requests.values())e.abort();this.requests.clear()}clearExpansion(){this.invalidate(),this.entries=[],this.status=void 0,this.contents.clear()}render(){let e=(t,n,r)=>({activate:this.stale?this.reload:t,disabled:!this.enabled(),busy:this.reloading||this.requests.has(n),reload:this.stale,error:r});return{older:this.olderCursor||this.stale?e(()=>{this.loadOlder()},this.olderCursor,this.olderError):void 0,content:(t)=>{let n=C(U(t.historyContent).cursor);if(!n)return;let r=this.contents.get(n),s=r?.next??n;return{key:n,chunks:r?.chunks??[],control:s?e(()=>{this.loadContent(n,s)},s,r?.error):void 0}}}}async read(e,t,n,r){if(!e||this.stale||!this.current()||!this.enabled()||this.requests.has(e))return;let s=new AbortController,i=()=>this.current()&&this.requests.get(e)===s&&!s.signal.aborted;this.requests.set(e,s),this.changed();let o;try{let a=`${Ze(this.sessionId)}/transcript${t?"/content":""}`,l=await this.api.request(`${a}?${new URLSearchParams({cursor:e})}`,void 0,AbortSignal.any([s.signal,AbortSignal.timeout(20000)]));if(i())o=n(l)}catch(a){if(!i())return;if(a instanceof Be&&(a.code.includes("cursor")||[400,401,403,404,409,410].includes(a.status)))this.expire();else r(c("读取失败,请重试。","Couldn't load this part. Try again."))}finally{if(i())this.requests.delete(e),this.changed(o)}}expire(){this.stale=!0,this.olderError=c("记录版本已失效,请重新加载。","This transcript page expired. Reload the transcript."),this.invalidate(),this.changed()}async loadOlder(){let e=this.olderCursor;await this.read(e,!1,(t)=>{let n=s0(t.page);if(!n||n.id!==this.id||n.olderCursor===e||!Array.isArray(t.messages)){this.expire();return}let r=new Set([...this.entries,...this.tail()].map((i)=>i.key)),s=we(t.messages).map(U).filter((i)=>Boolean(on(i))).flatMap((i,o)=>{let a=Pr(i),l=r.has(a);if(l&&(a.startsWith("id:")||a.startsWith("result:")))return[];let u=a&&!l?a:`older:${this.entries.length}:${o}`;return r.add(u),[{key:u,message:i}]});return this.entries=[...s,...this.entries],this.olderCursor=n.olderCursor,this.olderError=void 0,this.status=i0(t.transcript)??this.status,s.length},(t)=>{this.olderError=t})}async loadContent(e,t){let n=this.contents.get(e)??{next:e,chunks:[]};if(this.contents.set(e,n),n.next!==t)return;await this.read(t,!0,(r)=>{let s=C(r.nextCursor);if(typeof r.text!=="string"||s===t||s&&s===e){this.expire();return}n.chunks.push(r.text),n.next=s,n.error=void 0;return},(r)=>{n.error=r})}}var jh={pending:c("等待中","Pending"),queued:c("排队中","Queued"),scheduled:c("已调度","Scheduled"),blocked:c("被依赖阻塞","Blocked by dependencies"),paused:c("已暂停","Paused"),running:c("运行中","Running"),completed:c("已完成","Completed"),done:c("已完成","Completed"),success:c("成功","Succeeded"),failed:c("失败","Failed"),error:c("出错","Error"),cancelled:c("已取消","Canceled"),skipped:c("已跳过","Skipped"),interrupted:c("已中断","Interrupted"),lost:c("已失联","Lost contact")},a0=c("未知时间","Unknown time"),Nt=new Intl.NumberFormat(me),br=(e)=>Object.hasOwn(jh,e)?jh[e]:void 0,Po=(e)=>br(e)??e;function ft(e){let t=Ce(e);if(t===void 0)return a0;let n=new Date(t);return Number.isNaN(n.getTime())?a0:n.toLocaleString(me,{hour12:!1})}function v5(e,t){let n=Ce(e),r=Ce(t);if(n===void 0||r===void 0||r<n)return"";let s=Math.round((r-n)/1000);if(s<60)return c(`${Nt.format(s)} 秒`,`${Nt.format(s)} sec`);let i=Math.floor(s/60);if(i<60)return c(`${Nt.format(i)} 分钟`,`${Nt.format(i)} min`);let o=Nt.format(Math.floor(i/60)),a=Nt.format(i%60);return c(`${o} 小时 ${a} 分钟`,`${o} hr ${a} min`)}function y5(e){let t=y("dl","details-list small numerical");for(let[n,r]of e)if(r)t.append(y("dt","",n),y("dd","",r));return t.childElementCount?t:y("p","small muted",c("当前没有可用数据。","No data available."))}function k5(e,t){let n=we(e.nodes).map(U),r=we(e.edges).map(U),s=(o)=>{if(!o)return"";let a=t.get(o),l=a?C(a.description):"";return l?c(`${l}(${o})`,`${l} (${o})`):c(`子任务 ${o}`,`Subtask ${o}`)},i=[];if(n.length)i.push(y5(n.map((o)=>{let a=C(U(o).taskId),l=we(U(o).upstream).map(C).filter(Boolean),u=Nt.format(Ce(U(o).attempt)??0);return[C(U(o).label)||C(U(o).id)||c("节点","Node"),[`${Po(C(U(o).state))}`,c(`尝试 ${u} 次`,`Attempts: ${u}`),a?c(`关联:${s(a)}`,`Task: ${s(a)}`):"",l.length?c(`上游:${l.join("、")}`,`Upstream: ${l.join(", ")}`):""].filter(Boolean).join(" · ")]})));else i.push(y("p","small muted",c("这次运行还没有节点记录。","No nodes were recorded for this run.")));if(r.length){let o=y("ul","inline-list");for(let a of r){let l=C(a.fromLabel)||C(a.from),u=C(a.toLabel)||C(a.to);if(l&&u){let d=y("li","stack stack--tight");d.append(y("p","plain",`${l} → ${u}`)),o.append(d)}}if(o.childElementCount)i.push(Mt(c(`依赖边(${Nt.format(o.childElementCount)})`,`Dependencies (${Nt.format(o.childElementCount)})`),o))}return Mt(`${C(e.name)||c("运行","Run")} · ${Po(C(e.status))}`,...i)}function w5(e){let t=y("ul","inline-list");for(let n of e){let r=U(n),s=[ft(r.startedAt),r.completedAt===void 0?"":ft(r.completedAt)].filter((u)=>u&&u!==a0),i=v5(r.startedAt,r.completedAt),o=Ce(r.turns),a=Ce(r.toolCalls),l=y("li","stack stack--tight");l.append(y("p","plain",C(r.description)||c("子任务","Subtask"))),l.append(y("p","small muted break",[C(r.id)?c(`任务 ID:${C(r.id)}`,`Task ID: ${C(r.id)}`):"",C(r.parentTaskId)?c(`父任务:${C(r.parentTaskId)}`,`Parent task: ${C(r.parentTaskId)}`):"",C(r.agent)?c(`智能体:${C(r.agent)}`,`Agent: ${C(r.agent)}`):"",C(r.model)?c(`模型:${C(r.model)}`,`Model: ${C(r.model)}`):"",C(r.status)?c(`状态:${Po(C(r.status))}`,`Status: ${Po(C(r.status))}`):"",s.length?c(`时间:${s.join(" → ")}${i?`(耗时 ${i})`:""}`,`Time: ${s.join(" → ")}${i?` (${i} elapsed)`:""}`):"",o!==void 0?c(`轮次:${Nt.format(o)}`,`Turns: ${Nt.format(o)}`):"",a!==void 0?c(`工具调用:${Nt.format(a)}`,`Tool calls: ${Nt.format(a)}`):""].filter(Boolean).join(" · "))),t.append(l)}return Mt(c(`子任务(${Nt.format(t.childElementCount)})`,`Subtasks (${Nt.format(t.childElementCount)})`),t)}var x5={"no-agent-dir":c("原生任务快照不可用:未配置原生配置目录,快照入口已关闭。","Native task snapshots are disabled because no native configuration directory is set."),"invalid-id":c("原生任务快照不可用:会话标识无效,无法定位快照。","Could not locate the native task snapshot: the session ID is invalid."),"session-unavailable":c("原生任务快照不可用:会话尚未接入引擎,请先恢复会话。","Resume the session to connect it to the engine before reading its native task snapshot."),"missing-projection":c("原生任务快照不可用:原生暂无此会话的任务快照,并非读取失败。","The native host has no task snapshot for this session. The read did not fail.")};function Gh(e){let t=y("div","stack stack--tight"),n=y("section","subpanel stack stack--tight"),r=y("section","subpanel stack stack--tight");if(n.id="runtime-dag",n.tabIndex=-1,r.id="runtime-subagent",r.tabIndex=-1,n.append(y("h3","",c("DAG 快照","DAG snapshot"))),r.append(y("h3","",c("子代理","Subagents"))),t.append(r,n),C(e.status)!=="ok"){let l=C(e.reason),u=x5[l]??c("原生任务快照不可用。","Native task snapshot unavailable.");return n.append(y("p","small muted",u)),r.append(y("p","small muted",u)),t}let s=[c(`快照时间:${ft(e.updatedAt)}`,`Snapshot time: ${ft(e.updatedAt)}`),e.connected===void 0?c("工作区记录,非实时","Workspace record · Not live"):c(`Herdr 快照,记录时${e.connected===!0?"已连接":"未连接"},非实时`,`Herdr snapshot · ${e.connected===!0?"Connected":"Not connected"} at capture · Not live`)].join(" · ");n.append(y("p","small muted",s)),r.append(y("p","small muted",s));let i=we(e.runs).map(U),o=we(e.tasks).map(U);if(!i.length)n.append(y("p","small muted",c("快照中没有 DAG 记录。","No DAG runs in this snapshot.")));let a=new Map(o.map((l)=>[C(l.id),l]));for(let l of i)n.append(k5(l,a));if(o.length)r.append(w5(o));else r.append(y("p","small muted",c("快照中没有子代理记录。","No subagents in this snapshot.")));return t}function Kh(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)?e:{}}function Vh(e){return typeof e==="number"&&Number.isFinite(e)?e:void 0}function Es(e){let t=Vh(e);return t===void 0||t<0?void 0:t}function As(e){let t=Kh(e),n=Es(t.tokens),r=Es(t.contextWindow??t.window??t.context_window),s=Es(t.percent??t.percentUsed??t.usagePercent);if(n===void 0&&r===void 0&&s===void 0)return{status:"unavailable",reason:"no-data"};return{status:"ok",...n===void 0?{}:{tokens:n},...r===void 0?{}:{window:r},...s===void 0?{}:{percent:s}}}function Uo(e){let t=Kh(e),n=Vh(t.latestCacheHitRate),r=Es(t.input),s=Es(t.cacheRead),i=Es(t.cacheWrite);if(!((s??0)>0||(i??0)>0||(n??0)>0))return{status:"unavailable",reason:"no-data"};let a=n===void 0||n<0||n>100?void 0:n/100,l;if(r!==void 0&&s!==void 0&&i!==void 0){let u=r+i+s;if(u>0&&Number.isFinite(u))l=s/u}if(a===void 0&&l===void 0)return{status:"unavailable",reason:"no-data"};return{status:"ok",...a===void 0?{}:{latest:a},...l===void 0?{}:{cumulative:l}}}var gi={off:c("关闭","Off"),minimal:c("极低","Minimal"),low:c("低","Low"),medium:c("中","Medium"),high:c("高","High"),xhigh:c("极高","Extra high"),max:c("最高","Maximum")};function Jh(e){let t=U(e),n=Ce(t.tokensPerSecond),r=Ce(t.measuredAt);return n!==void 0&&n>0&&r!==void 0&&r>=0?{tokensPerSecond:n,measuredAt:r}:void 0}function Zh(e,t){let n=ve("runtime-instructions",HTMLDetailsElement),r=ve("runtime-instructions-status",HTMLElement),s=ve("runtime-instructions-text",HTMLPreElement),i=c("当前无法读取 AGENTS.md。关闭后可展开重试。","Could not read AGENTS.md. Close and reopen this section to try again."),o;function a(){o?.abort(),o=void 0,s.hidden=!0,s.textContent="",r.textContent=""}return n.addEventListener("toggle",async()=>{a();let l=t();if(!n.open||!l)return;let u=o=new AbortController,d=()=>o===u&&n.open&&t()===l;r.textContent=c("正在读取工作目录中的 AGENTS.md…","Reading AGENTS.md in the working directory…");try{let h=await e.request(`${Ze(l)}/instructions`,void 0,AbortSignal.any([u.signal,AbortSignal.timeout(18000)]));if(!d())return;switch(h.status){case"ok":if(h.file!=="AGENTS.md"||typeof h.content!=="string"){r.textContent=c("未能验证 AGENTS.md 原文。","Could not verify the contents of AGENTS.md.");break}s.textContent=h.content,s.hidden=!h.content,r.textContent=h.content?c("已读取 AGENTS.md 原文。","Showing AGENTS.md as written."):c("AGENTS.md 是空文件。","AGENTS.md is empty.");break;case"missing":r.textContent=c("当前工作目录没有 AGENTS.md。","There is no AGENTS.md in the working directory.");break;case"unsupported":r.textContent=c("当前宿主或连接方式不支持读取项目规则。","The current host or connection does not support reading project rules.");break;case"refused":r.textContent=c("宿主拒绝读取,或无法确认文件属于当前会话。","The host refused the read or could not verify that the file belongs to this session.");break;case"too_large":r.textContent=c("AGENTS.md 超过读取上限,未显示内容。","AGENTS.md exceeds the read limit. Its contents are not shown.");break;case"unavailable":default:r.textContent=i}}catch(h){if(!d())return;r.textContent=h instanceof Be&&[401,403,409].includes(h.status)?c("读取被拒绝,或当前会话连接已变化。","The read was refused or the session connection changed."):h instanceof Be&&h.status===404&&h.code==="not_found"?c("当前 Web 服务不支持读取项目规则。","This Web server does not support reading project rules."):i}finally{if(o===u)o=void 0}}),()=>{n.open=!1,a()}}var St=new Intl.NumberFormat(me,{maximumFractionDigits:2}),E5=new Intl.NumberFormat(me,{style:"currency",currency:"USD",maximumFractionDigits:5}),ct=(e)=>{let t=Ce(e);return t===void 0?"":St.format(t)},Yh=(e)=>typeof e==="boolean"?e?c("开启","On"):c("关闭","Off"):"";function tm(e){let t=y("span","","—");t.setAttribute("aria-hidden","true"),e.append(t,y("span","sr-only",_t))}function nm(e,t=!1){let n=y("dl","details-list small numerical");for(let[r,s]of e)if(s){let o=y("dd",s===_t||s===c0||s===u0?"metric-unreported":"");if(t&&s===_t)tm(o);else o.textContent=s;n.append(y("dt","",r),o)}return n.childElementCount?n:y("p","small muted",c("当前没有可用数据。","No data available."))}function rm(e,...t){let n=y("section","subpanel stack stack--tight");return n.append(y("h3","",e),...t),n}function d0(e,t,...n){let r=Mt(t,...n);return r.dataset.overviewDisclosure=e,r.querySelector("summary")?.setAttribute("data-overview-focus",e),r}function bi(e,t){let n=y("div","metric-group stack");return n.append(y("p","metric-label small",e),nm(t,!0)),n}var _t=c("尚无数据(原生未报告)","Not reported by the native host"),c0=c("未报告","Not reported"),u0=c("已报告,无数值","Reported without a value"),Xh=c("— 表示原生未报告","— means the native host did not report a value");function Qh(e){let t=Ce(e);if(t===void 0)return"";if(t>=1048576)return`${St.format(t/1048576)} MB`;if(t>=1024)return`${St.format(t/1024)} KB`;return`${St.format(t)} B`}function em(e){return e===void 0?"":`${St.format(e*100)}%`}function Ur(e){let t=Ce(e);if(t===void 0)return"";let n=new Date(t);return Number.isNaN(n.getTime())?"":n.toLocaleString(me,{hour12:!1})}function A5(e,t,n){let r=As(e.contextUsage);if(r.status==="ok"&&(r.tokens!==void 0||r.window!==void 0||r.percent===0))return r;if(r.status!=="ok"&&Object.hasOwn(e,"contextUsage"))return r;let s=As(t.contextUsage);if(s.status==="ok")return s;let i=As(n.contextUsage);if(i.status==="ok"&&(!Object.hasOwn(e,"contextUsage")||r.status==="ok"&&i.tokens!==void 0&&i.window!==void 0))return i;return r}function sm(e,t,n){let r=U(e.stats),s=U(e.state),i={...s,...t},o=U(e.sessionMemory),a=U(i.model),l=U(r.tokens??i.usageTotals),u=A5(t,s,r),d=u.status==="ok"?ct(u.tokens):"",h=u.status==="ok"?ct(u.window):"",p=u.status==="ok"?ct(u.percent):"",g=Uo(i.usageTotals),b=g.status==="ok"?g.latest:void 0,x=g.status==="ok"?g.cumulative:void 0,k=Ce(l.input),E=Ce(l.cacheRead),T=Ce(l.cacheWrite),_=(F)=>F!==void 0&&F>=0,A=_(k)&&_(E)&&_(T),D=Ce(r.cost),R=U(r.failures),L=Ce(o.mainHeapBytes),B=Ce(o.kernelHeapBytes),O=Ce(o.kernelCount),H=L!==void 0||B!==void 0||O!==void 0,K=p?d?`${d} (${p}%)`:`${p}%`:d,G=em(b),de=ct(r.toolCalls),ne=D===void 0?"":E5.format(D),ae=y("dl","metric-highlights numerical");for(let[F,X,te]of[["context",c("上下文已用","Context used"),p?`${p}%`:d?c(`${d} token`,`${d} tokens`):""],["cache",c("最新缓存命中率","Latest cache hit rate"),G],["tools",c("工具调用","Tool calls"),de],["cost",c("估算费用","Estimated cost"),ne]]){let xe=y("div","metric-tile");xe.dataset.tone=F;let W=y("dd",te?"":"metric-unreported",te);if(!te)tm(W);xe.append(y("dt","",X),W),ae.append(xe)}let z=C(i.thinkingLevel),j=y("div","row row--between"),Z=y("button","button button--quiet small",c("规则与记忆","Rules and memory"));Z.type="button",Z.id="runtime-open-resources",Z.dataset.overviewFocus="resources",Z.setAttribute("aria-controls","runtime-resources"),j.append(y("h3","",c("运行状态与用量","Runtime and usage")),Z);let Q=y("section","subpanel stack stack--tight runtime-metrics");Q.append(j,ae,bi(c("会话设置","Session settings"),[[c("模型","Model"),[C(a.provider),C(a.name)||C(a.id)].filter(Boolean).join(" · ")||_t],[c("生效思考档","Active thinking level"),(Object.hasOwn(gi,z)?gi[z]:z)||_t],[c("快速模式","Fast mode"),Yh(i.fastMode)||_t],[c("最近流式 · Web 观测","Latest streaming speed (Web)"),n?`${n.tokensPerSecond<0.01?`<${St.format(0.01)}`:St.format(n.tokensPerSecond)} token/s`:c("未测得","Not measured")]]));let oe=d0("metrics",c("完整运行明细","Full runtime details"),bi(c("上下文与缓存","Context and cache"),[[c("上下文已用(原生)","Context used (native)"),K||_t],[c("上下文窗口","Context window"),h?c(`${h} token`,`${h} tokens`):_t],[c("缓存命中率(原生最新)","Latest cache hit rate (native)"),G||(g.status==="ok"?u0:_t)],[c("缓存累计命中率","Cumulative cache hit rate"),em(x)||(g.status==="ok"?u0:_t)]]),bi(c("其他设置","Other settings"),[[c("权限预设","Permission preset"),C(i.effectivePermissionPreset)||C(i.permissionPreset)||_t],[c("自动压缩","Auto-compaction"),Yh(i.autoCompactionEnabled)||_t]]),bi(c("流量与费用","Usage and cost"),[[c("用户消息","User messages"),ct(r.userMessages)],[c("助手消息","Assistant messages"),ct(r.assistantMessages)],[c("工具调用","Tool calls"),de],[c("输入 token(含缓存)","Input tokens (including cache)"),A?ct(k+E+T):_t],[c("未缓存输入 token","Uncached input tokens"),A?ct(k+T):ct(k)],[c("输出 token","Output tokens"),ct(l.output)],[c("缓存读取 token","Cache read tokens"),ct(l.cacheRead)],[c("缓存写入 token","Cache write tokens"),ct(l.cacheWrite)],[c("总 token","Total tokens"),ct(l.total??l.totalTokens)],[c("估算费用","Estimated cost"),ne],[c("失败请求","Failed requests"),ct(R.erroredRequests)]]),bi(c("原生内存","Native memory"),[[c("OmO 宿主主堆(引擎共享)","OmO host heap (shared by the engine)"),L!==void 0?Qh(L):_t],[c("本会话内核堆","Session kernel heap"),B!==void 0?Qh(B):H?c0:_t],[c("本会话内核数","Session kernel count"),O!==void 0?ct(O):H?c0:_t]]));if(oe.classList.add("metric-breakdown"),Q.append(oe),ae.querySelector(".metric-unreported"))ae.after(y("p","metric-key small",Xh));else if(oe.querySelector(".metric-unreported [aria-hidden='true']"))oe.querySelector(".fold-body")?.append(y("p","metric-key small",Xh));return Q}function C5(e){let t=y("ul","inline-list");for(let n of e){let r=U(n),s=C(r.requestedMode),i={queued:c("排队中","Queued"),sending:c("正在发送","Sending"),held:c("等待中","Waiting"),pending:c("等待中","Waiting"),accepted:c("已接收","Accepted")}[C(r.state)]||"",o=[s==="steer"?c("引导","Steer"):s==="followUp"||s==="follow_up"?c("后续","Follow-up"):"",i].filter(Boolean).join(" · "),a=y("li","stack stack--tight");if(o)a.append(y("span","small muted",o));a.append(y("p","plain",C(r.text)||c("(无文本)","(No text)"))),t.append(a)}return t}function im(e,t,n,r,s){let i=y("p","small muted"),o=y("p","small muted");o.setAttribute("role","status");let a=y("div","stack stack--tight"),l=d0("queue",c("预览待处理输入","Preview pending inputs"),o,a),u=Ue(c("清空队列","Clear queue"),s,"button--danger");u.dataset.overviewFocus="queue:clear",u.dataset.write="";let d=y("div","row");d.append(u);let h=rm(c("输入队列","Input queue"),i,d,l),p,g,b=!1,x=!1,k=()=>{let D=!(p!==void 0&&p>0)&&!x;u.toggleAttribute("data-unavailable",D),u.disabled=D||!r()},E=(D="",...R)=>{if(a.contains(document.activeElement))l.querySelector("summary")?.focus({preventScroll:!0});re(o,D),a.replaceChildren(...R)},T=()=>{if(!b)return;g?.abort(),g=void 0,b=x=!1,E(),k()},_=()=>h.isConnected&&l.open&&n(),A=(D=!1)=>{if(!_())return;if(b&&!D)return;g?.abort();let R=g=new AbortController;b=!0,x=!1,k(),E(c("正在读取待处理输入…","Loading pending inputs…"));let L=()=>g===R&&_(),B=(O=!1)=>{E(O?c("队列响应超出读取上限。","The queue response exceeded the read limit."):c("无法读取待处理输入。","Couldn't load pending inputs."),Ue(c("重试队列预览","Retry queue preview"),()=>A(!0),"button--quiet"))};e.request(`${t}/queue`,void 0,R.signal).then((O)=>{if(!L())return;if(!Array.isArray(O.inputs)){B();return}x=O.inputs.length>0,k(),E(O.truncated===!0?c("预览已截断,仅显示部分队列内容。","Preview truncated. Only part of the queue is shown."):x?"":c("没有可预览的待处理输入。","No pending inputs to preview."),...x?[C5(O.inputs)]:[])},(O)=>{if(L())B(O instanceof Be&&O.code==="queue_too_large")}).finally(()=>{if(g===R)g=void 0})};return l.addEventListener("toggle",()=>{if(l.open)A();else T()}),{root:h,activate:A,deactivate:T,update(D){p=D,i.textContent=D===void 0?c("待处理输入数量未知。","Pending input count unknown."):D>0?c(`${St.format(D)} 条待处理输入`,`${St.format(D)} pending ${D===1?"input":"inputs"}`):c("没有排队的输入。","No queued inputs."),k()}}}function _5(e,t){let n=we(e.commands).map(U).filter((i)=>Boolean(C(i.invocation))),r=rm(c("可用命令","Available commands"));if(!n.length)return r.append(y("p","muted small",c("未读取到可用命令。","No commands were returned."))),r;let s=y("ul","command-list");for(let i of n){let o=C(i.invocation),a=Ue(o,()=>t.insertCommand(o),"button--quiet path");a.title=c("插入输入框,不会立即发送","Insert in the input box without sending"),a.setAttribute("aria-label",c(`插入命令:${o}`,`Insert command: ${o}`)),a.dataset.overviewFocus=`command:${o}`;let l=y("li","stack stack--tight");if(l.append(a),C(i.description))l.append(y("p","small muted break",C(i.description)));s.append(l)}return r.append(d0("commands",c(`${St.format(n.length)} 项 · 展开后可插入输入框`,`${St.format(n.length)} ${n.length===1?"command":"commands"} · Expand to insert`),s)),r}var S5={pending:c("待办","Pending"),in_progress:c("进行中","In progress"),completed:c("已完成","Completed"),abandoned:c("已放弃","Abandoned")},l0={"missing-tree":c("快照缺少会话树","The snapshot has no session tree."),"invalid-leaf":c("活动分支标识无效","The active branch ID is invalid."),"unknown-leaf":c("活动分支不在会话树中","The active branch is not in the session tree."),"duplicate-id":c("会话树有重复标识","The session tree contains duplicate IDs."),"broken-ancestry":c("分支链断裂或指向其他分支","The branch chain is broken or points to another branch."),"tree-budget":c("会话树超出读取上限,可能不完整","The session tree exceeds the read limit and may be incomplete."),incomplete:c("分支记录超出读取上限","The branch records exceed the read limit."),ownership_changed:c("会话或活动分支已变化","The session or active branch changed."),binding_unverified:c("无法确认会话归属","The session binding could not be verified."),unsupported:c("当前宿主不支持有界分支读取","The current host does not support bounded branch reads."),malformed:c("原生返回的分支数据格式无效","The native host returned invalid branch data.")};function T5(e){let t=y("section","subpanel stack stack--tight");if(t.append(y("h3","",c("当前待办","Current Todo"))),e.status==="loading"){let s=y("p","small muted",c("正在读取当前分支…","Loading the active branch…"));return s.setAttribute("role","status"),t.append(s),t}if(C(e.status)==="invalid"){let s=l0[C(e.reason)]??c("未知原因","Unknown reason.");return t.append(y("p","small muted",c(`无法确认活动分支(${s}),不显示待办,以免混入其他分支。`,`Could not verify the active branch. ${s} Todo is hidden to avoid showing another branch’s tasks.`))),t}if(C(e.status)!=="ok"){let s=l0[C(e.reason)];return t.append(y("p","small muted",s?c(`分支数据不可用(${s}),待办数量未知。`,`Branch data is unavailable. ${s} The Todo count is unknown.`):c("分支数据不可用,待办数量未知。可刷新重试。","Branch data is unavailable. The Todo count is unknown. Refresh to try again."))),t}let n=C(e.leafId);t.append(y("p","small muted",n?c(`活动分支:${n}`,`Active branch: ${n}`):c("当前没有活动分支。","No branch is active.")));let r=U(e.todo);if(C(r.status)==="ok"){let s=om(r),i=s.childElementCount;if(i){let o=Mt(c(`待办(${St.format(i)} 组)`,`Todo (${St.format(i)} ${i===1?"group":"groups"})`),s);o.open=!0,t.append(o)}}else if(r.status==="none")t.append(y("p","small muted",c("所选分支没有当前待办。","No current Todo on the selected branch.")));else{let s=l0[C(r.reason)]??"";t.append(y("p","small muted",[c("当前待办不可用,数量未知。可刷新重试。","Current Todo is unavailable. The task count is unknown. Refresh to try again."),s].filter(Boolean).join(" ")))}return t}function om(e){let t=y("ul","inline-list");for(let n of we(e.phases).map(U)){let r=y("li","stack stack--tight");r.append(y("p","plain break",C(n.name)||c("待办","Todo")));let s=y("ul","inline-list");for(let i of we(n.tasks).map(U)){let o=y("li");o.append(y("p","small break",`${S5[C(i.status)]??C(i.status)} · ${C(i.content)}`)),s.append(o)}if(s.childElementCount)r.append(s);t.append(r)}return t}function Wo(e){let t=y("p","small muted");if(t.setAttribute("role","status"),!e)return t.textContent=c("正在读取已记录的待办列表…","Loading recorded Todo lists…"),[t];if(e.status!=="ok"||!Array.isArray(e.snapshots)||typeof e.limitReached!=="boolean")return t.textContent=e.status==="ownership_changed"?c("无法核验历史所属分支。可刷新重试。","The branch for this history could not be verified. Refresh to try again."):c("无法读取已记录的待办列表。可刷新重试。","Recorded Todo lists are unavailable. Refresh to try again."),[t];let n=we(e.snapshots).map(U);t.textContent=n.length?c("所选分支已记录的列表,按新到旧排列。","Recorded lists for the selected branch, newest first."):e.limitReached?c("在读取范围内未找到已记录的列表,更早的记录未知。","No recorded lists in the read window. Older records are unknown."):c("所选分支没有已记录的历史列表。","No recorded lists for the selected branch.");let r=y("ol","inline-list");for(let[s,i]of n.entries()){let o=y("li","stack stack--tight");o.append(y("h4","",c(`记录 ${St.format(s+1)}`,`Recorded list ${St.format(s+1)}`)),om(i)),r.append(o)}return[t,...n.length?[r]:[],...n.length&&e.limitReached?[y("p","small muted",c("已达历史读取上限,更早的记录可能未显示。","The read limit was reached. Older records may not appear."))]:[]]}function R5(e){if(e.status==="loading")return[y("p","small muted",c("正在读取当前分支…","Loading the active branch…"))];if(e.status!=="ok")return[y("p","small muted",c("无法确认当前分支,未显示长期记忆计数。","Could not verify the active branch, so long-term memory counts are hidden."))];let t=U(e.memory);if(C(t.status)!=="ok")return[y("p","small muted",c("当前分支没有召回记录;不代表未启用长期记忆。","No recall record for this branch. Long-term memory may still be enabled."))];let n=Ce(t.recalledCount),r=Ur(t.recentRecalledAt),s=U(t.gate),i=U(t.unavailable),o=s.status==="failed"||s.status==="skipped"?c(`${s.status==="failed"?"失败":"跳过"} · 连续 ${ct(s.consecutiveFailures)} 次 · 候选 ${ct(s.candidateCount)}${Ur(s.at)?` · ${Ur(s.at)}`:""}`,`${s.status==="failed"?"Failed":"Skipped"} · Consecutive failures: ${ct(s.consecutiveFailures)} · Candidates: ${ct(s.candidateCount)}${Ur(s.at)?` · ${Ur(s.at)}`:""}`):"",a=Ce(i.count),u=[[c("长期记忆召回条目(累计,仅计数)","Long-term memory recalls (total count)"),n!==void 0?ct(n):""],[c("最近召回时间","Last recall"),r],[c("召回门控","Recall gate"),o],[c("记忆不可用记录(仅计数)","Memory unavailability records (count only)"),a!==void 0?`${ct(a)}${Ur(i.at)?` · ${Ur(i.at)}`:""}`:""]].filter(([,d])=>Boolean(d));return[y("p","small muted",c("仅活动分支的召回计数与状态,不含个人记忆原文、路径、提示词或宿主堆内存。","Recall counts and status for the active branch only. Personal memory text, paths, prompts, and host heap data are not shown.")),u.length?nm(u):y("p","small muted",c("有记忆聚合记录,但暂无可显示的数值。","Memory records exist, but there are no values to show."))]}function am(e,t,n){let r=ve("runtime-metrics",HTMLElement).querySelector(".runtime-metrics");if(!r)return;let s=sm(e,t,n),i=r.querySelector("details"),o=s.querySelector("details"),a=document.activeElement,l=a instanceof HTMLElement&&r.contains(a)?a.dataset.overviewFocus:void 0;if(i&&o)o.open=i.open;if(r.replaceWith(s),l)s.querySelector(`[data-overview-focus="${CSS.escape(l)}"]`)?.focus({preventScroll:!0})}function lm(e,t,n,r,s,i,o){let a=ve("runtime-metrics",HTMLElement),l=document.activeElement,u=l instanceof HTMLElement&&a.contains(l)?l.dataset.overviewFocus:void 0,d=new Set([...a.querySelectorAll("details[open]")].map((h)=>h.dataset.overviewDisclosure));for(let h of[...a.children])if(h!==s&&h!==i)h.remove();if(i.parentElement!==a)a.prepend(i);if(a.prepend(sm(e,t,o)),i.after(_5(n,r)),a.querySelectorAll("details[data-overview-disclosure]").forEach((h)=>{h.open=d.has(h.dataset.overviewDisclosure)}),u!==void 0&&document.activeElement!==l){let h=a.querySelector(`[data-overview-focus="${CSS.escape(u)}"]:not(:disabled)`);((h?.getClientRects().length)?h:a).focus({preventScroll:!0})}}function f0(e){let t=ve("runtime-todo",HTMLElement),n=document.activeElement,r=T5(e),s=t.querySelector("[data-runtime-branch]"),i=s?.querySelector("details"),o=r.querySelector("details");if(i&&o)o.open=i.open;let a=i?.querySelector("summary")===n;if(r.dataset.runtimeBranch="",s)s.replaceWith(r);else t.prepend(r);if(a)(o?.querySelector("summary")??t).focus({preventScroll:!0})}function h0(e){ve("runtime-memory-branch-content",HTMLElement).replaceChildren(...R5(e))}function cm(e,t){let n=new Set([...e.querySelectorAll("details[open]")].map((i)=>i.firstElementChild?.textContent)),r=Gh(t);r.querySelectorAll("details").forEach((i)=>{i.open=n.has(i.firstElementChild?.textContent)});let s=e.querySelectorAll('[role="tabpanel"]');if(!s.length){for(let i of r.children)i.removeAttribute("id");e.replaceChildren(r)}for(let i of s){let o=[...r.children].find((a)=>a.id===i.id);if(!o)continue;o.removeAttribute("id"),o.removeAttribute("tabindex"),i.replaceChildren(o)}}function um(e,t){let n=ve("branch-dialog",HTMLDialogElement),r=ve("branch-message",HTMLSelectElement),s=(x)=>ve(x,HTMLElement),i=(x)=>ve(x,HTMLButtonElement),o={web:c("来源:Web 会话。新会话和原会话可分别继续。","Source: Web session. You can continue the original and the new session separately."),history:c("来源:CLI 最后保存的上下文,不修改 CLI 记录。","Source: Last saved CLI context. The CLI record will not change."),live:c("来源:CLI 当前上下文。无法校验实时位置时不会改用历史记录。","Source: Current CLI context. If the live position cannot be verified, history will not be used instead.")},a,l,u=!1,d=!1,h=new Map;function p(){let x=u||Boolean(l),k=h.get(r.value);r.disabled=x||!h.size,i("branch-fork").disabled=x||k===void 0,i("branch-clone").disabled=x||!d,i("branch-refresh").disabled=x,i("branch-close").disabled=u,re(s("branch-message-preview"),k)}async function g(x){if(u||l)return;let k=l=new AbortController,E=s("branch-status");re(E,c("正在读取可用分支与复制选项…","Loading branch and clone options…")),re(s("branch-error")),p();try{let T=await e.request(`${Ea(x)}/branch-options`,void 0,k.signal);if(k.signal.aborted||!n.open||a!==x)return;d=T.canClone===!0,h=new Map(we(T.forkMessages).map(U).flatMap((A)=>{let D=C(A.entryId);return D&&typeof A.text==="string"?[[D,A.text]]:[]}));let _=r.value;if(r.replaceChildren(ot(c("选择一条用户消息","Choose a user message"),""),...Array.from(h,([A,D],R)=>{let L=D.trim().replace(/\s+/g," ");return ot(`${St.format(R+1)} · ${L.slice(0,100)}${L.length>100?"…":""}`,A)})),h.has(_))r.value=_;re(E,!d&&!h.size?c("此来源没有可分支或复制的上下文。","This source has no context to branch or clone."):"")}catch(T){if(!k.signal.aborted&&n.open&&a===x)d=!1,h.clear(),r.replaceChildren(ot(c("未读取到选项","No options loaded"),"")),re(E),re(s("branch-error"),c(`无法读取分支选项:${Re(T)}`,`Could not load branch options: ${Re(T)}`))}finally{if(l===k)l=void 0;p()}}async function b(x){let k=a;if(!k||u||l)return;u=!0,re(s("branch-error")),re(s("branch-status"),c("正在创建独立的 Web 会话…","Creating a separate Web session…")),p();try{let E=await e.request(`${Ea(k)}/branches`,x);if(E.cancelled===!0){re(s("branch-status"),c("已取消,原会话没有修改。","Canceled. The original session did not change."));return}let T=un(E.session);if(!T?.active)throw new Be(c("没有收到可继续的 Web 会话。请检查会话列表。","No active Web session was returned. Check the session list."),502,"");n.close(),t(T,C(E.editorText),k)}catch(E){re(s("branch-status")),re(s("branch-error"),c(`无法确认新会话:${Re(E)}`,`Could not confirm the new session: ${Re(E)}`))}finally{u=!1,p()}}return r.addEventListener("change",p),ve("branch-form",HTMLFormElement).addEventListener("submit",(x)=>{if(x.preventDefault(),!i("branch-fork").disabled)b({kind:"fork",entryId:r.value})}),i("branch-clone").addEventListener("click",()=>void b({kind:"clone"})),i("branch-close").addEventListener("click",()=>n.close()),i("branch-refresh").addEventListener("click",()=>{if(a)g(a)}),n.addEventListener("cancel",(x)=>{if(u)x.preventDefault()}),n.addEventListener("close",()=>{if(n.open)return;l?.abort(),l=void 0,a=void 0}),(x)=>{if(n.open)return;a=x,d=!1,h.clear(),r.replaceChildren(ot(c("选择一条用户消息","Choose a user message"),"")),s("branch-source").textContent=x.name,s("branch-context").textContent=o[x.kind],n.showModal(),g(x)}}var m0=(e)=>e instanceof Be&&e.status===409&&(e.code==="tree_stale"||e.code==="session_changed"||e.code==="stale_leaf");function M5(e){let{leafId:t,nextCursor:n}=e,r=(a)=>typeof a==="string"&&a.length>0,s=(a)=>a===void 0||typeof a==="string";if(!Array.isArray(e.nodes)||e.nodes.length>40||t!==null&&!r(t)||n!==void 0&&(!r(n)||!e.nodes.length))throw Error("Invalid tree page");let i=new Set;return{nodes:e.nodes.map((a)=>{let{id:l,parentId:u,type:d,role:h,label:p,summary:g}=U(a);if(!r(l)||i.has(l)||u!==null&&!r(u)||!r(d)||!s(h)||!s(p)||!s(g))throw Error("Invalid tree node");return i.add(l),{id:l,parentId:u,type:d,role:h,label:p,summary:g}}),leafId:t,nextCursor:n}}var dm={user:c("你","You"),assistant:c("助手","Assistant"),toolResult:c("工具结果","Tool result"),bashExecution:c("命令输出","Command output"),message:c("消息","Message"),compaction:c("上下文压缩","Context compaction"),branch_summary:c("分支摘要","Branch summary"),model_change:c("模型变更","Model change"),thinking_level_change:c("思考档变更","Thinking level change"),custom:c("会话记录","Session entry"),session_info:c("会话信息","Session info")},fm=c("会话位置已变化,请重新读取会话树。","The session position changed. Reload the session tree.");function hm(e,t,n,r,s){let i=y("section","subpanel stack stack--tight");i.id="runtime-tree";let o=y("p","small muted");o.setAttribute("role","status");let a=y("p","small muted",c("仅显示已加载的节点(最新记录在前),不代表完整的分支结构。选择历史用户消息可将其载入输入框;不会自动发送。","Shows loaded entries (newest first), not the complete branch structure. Select a past user message to load it into the input box without sending it.")),l=y("ul","tree"),u=y("div","row"),d=Ue(c("加载更早节点","Load older"),()=>{if(E)de(E)});d.dataset.treeOlder="";let h=Ue(c("重新读取会话树","Reload session tree"),()=>{de()});h.dataset.treeReload="";let p=Ue(c("切换到空上下文","Switch to an empty context"),()=>O(null));u.append(d,h,p);let g=Mt(c("查看会话节点","View session nodes"),o,a,l,u),b=g.querySelector("summary");i.append(y("h3","",c("会话树","Session tree")),g);let x,k,E,T=[],_=!1,A=!1,D="",R=new Map,L=()=>n()&&g.open;function B(){let z=!r();p.disabled=z;for(let j of R.values())j.disabled=z}function O(z){if(L()&&!_&&k!==void 0&&r())s(z,k)}function H(){let z=document.activeElement;if(o.textContent=D||(k!==void 0&&!R.size?k===null?c("没有可导航的会话节点。","No session nodes to navigate."):c("这一页没有列出活动节点。","This page does not include the active node."):R.size&&k!==null&&k!==void 0&&!R.has(k)?c("活动节点不在已加载的记录中。","The active node is not among the loaded entries."):""),o.classList.toggle("error",_||A),o.hidden=!o.textContent,a.hidden=!R.size,l.hidden=!R.size,d.hidden=_||!E&&z!==d,d.textContent=E?c("加载更早节点","Load older"):c("没有更早的可加载节点","No older entries to load"),h.hidden=!_&&!A&&z!==h,p.hidden=k===void 0||k===null||_,u.hidden=d.hidden&&h.hidden&&p.hidden,d.setAttribute("aria-disabled",String(Boolean(x)||!E)),h.setAttribute("aria-disabled",String(Boolean(x))),B(),L()&&(z===d&&d.hidden||z===p&&p.hidden))(_?h:b).focus({preventScroll:!0})}function K(z,j){let Z=z.nodes.map((F)=>F.id),Q=!j&&k===z.leafId&&Z.length===T.length&&Z.every((F,X)=>F===T[X]);if(!j&&!Q){let F=new Set(Z);for(let[X,te]of R)if(!F.has(X)){if(document.activeElement===te)b.focus({preventScroll:!0});te.parentElement?.remove(),R.delete(X)}}if(k=z.leafId,!Q||R.size===T.length)E=z.nextCursor;if(!j)T=Z;let oe=[];for(let F of[...z.nodes].reverse()){let X=R.get(F.id);if(!X){X=Ue("",()=>O(F.id),"button--quiet break"),R.set(F.id,X);let W=y("li");W.append(X),l.append(W)}let te=F.role||F.type,xe=F.label||(Object.hasOwn(dm,te)?dm[te]:te);if(X.textContent=`${xe} · ${C(F.summary)||F.id.slice(0,12)}`,F.id===k)X.setAttribute("aria-current","true");else X.removeAttribute("aria-current");oe.push(X.parentElement)}if(!j&&!Q){let F=null;for(let X of oe.reverse()){if(X.nextElementSibling!==F&&!X.contains(document.activeElement))l.insertBefore(X,F);F=X}}}function G(){if(ne(),!g.open&&k===void 0)return;if(l.contains(document.activeElement))b.focus({preventScroll:!0});l.replaceChildren(),R.clear(),k=void 0,E=void 0,T=[],_=!0,A=!1,D=fm,H()}async function de(z){if(!L()||x||z!==void 0&&_)return;let j=x=new AbortController,Z=()=>x===j&&L(),Q=z===void 0?"":`?${new URLSearchParams({cursor:z})}`;A=!1,D=z===void 0?c("正在读取会话节点…","Loading session entries…"):c("正在读取更早的节点…","Loading older entries…");let oe=!1;H();try{let F=AbortSignal.any([j.signal,AbortSignal.timeout(12000)]),X=await e.request(`${t}/tree${Q}`,void 0,F);if(!Z())return;let te=M5(X);if(z!==void 0&&te.leafId!==k){G();return}if(z!==void 0&&(te.nextCursor===z||te.nodes.some((xe)=>R.has(xe.id))))throw Error("Overlapping tree page");if(_=!1,D="",K(te,z!==void 0),oe=z!==void 0,document.activeElement===h)b.focus({preventScroll:!0})}catch(F){if(!Z())return;if(m0(F)){G();return}A=!0,D=z===void 0?c("读取会话树失败。请重试。","Could not load the session tree. Try again."):c("读取更早的节点失败。已保留之前的节点。","Could not load older entries. The loaded entries are kept.")}finally{if(x===j){if(x=void 0,L()){if(H(),oe&&document.activeElement===d)d.scrollIntoView({block:"nearest",behavior:"instant"})}}}}function ne(){if(!x)return;x.abort(),x=void 0,D=_?fm:"",H()}let ae=()=>{if(k===void 0&&!_&&!A)de()};return g.addEventListener("toggle",()=>{if(L())ae();else ne()}),H(),{root:i,activate:ae,abort:ne,invalidate:G,syncWrites:B,checkLeaf:(z)=>{if(k!==void 0&&k!==z)G()},refresh:()=>{de()}}}function vi(e){return!(e.defaultPrevented||e.isComposing||e.keyCode===229||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)}function yi(e,t,n,r){let s=n.length-1;if(s<0)return;switch(e){case"ArrowDown":return t===s?0:t+1;case"ArrowUp":return t<=0?s:t-1;case"PageUp":case"PageDown":{let i=e==="PageUp"?-1:1;if(t<0)return i<0?s:0;let o=i<0?0:s;if(t===o)return t;let a=n[t].getBoundingClientRect().top,l=t+i;while(l!==o&&Math.abs(n[l+i].getBoundingClientRect().top-a)<=r.clientHeight)l+=i;return l}}}function ki(e,t){let n=e.getBoundingClientRect().top+e.clientTop,r=n+e.clientHeight,s=t.getBoundingClientRect();if(s.top<n)e.scrollTop-=n-s.top;else if(s.bottom>r)e.scrollTop+=Math.min(s.bottom-r,s.top-n)}function mm(e,t,n){let r=!1;t.addEventListener("compositionstart",()=>{r=!0}),t.addEventListener("compositionend",()=>{r=!1}),t.addEventListener("blur",()=>{r=!1}),e.addEventListener("keydown",(s)=>{if(!e.open||r||!vi(s)||n.hidden)return;let i=s.target===t;if(!i&&!(s.target instanceof Element&&n.contains(s.target)))return;let o=Array.from(n.querySelectorAll("button[data-invocation]:enabled")),a=o.findIndex((u)=>u===s.target);if(!i&&a<0)return;if(i&&s.key==="Enter"&&o[0]){s.preventDefault(),o[0].click();return}let l=yi(s.key,a,o,e);if(l===void 0)return;s.preventDefault(),o[l].focus({preventScroll:!0}),ki(e,o[l])})}var gm=/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/,D5=new Map([["extension",c("扩展","Extension")],["prompt",c("提示模板","Prompt template")],["skill",c("技能","Skill")]]),L5=new Map([["enabled",c("已启用","Enabled")],["disabled",c("已停用","Disabled")],["untrusted",c("不受信任","Untrusted")],["idle",c("空闲","Idle")],["connecting",c("连接中","Connecting")],["connected",c("已连接","Connected")],["degraded",c("降级","Degraded")],["suspended",c("已挂起","Suspended")],["needs_auth",c("需要认证","Authentication required")],["needs_client_registration",c("需要注册客户端","Client registration required")]]),pm=new Intl.NumberFormat(me);function I5(e){let t=C(e.invocation),n=C(e.source),r=D5.get(n);if(!r)return;if(n==="skill"?/^\$[A-Za-z0-9-]{1,64}$/.test(t):/^\/[A-Za-z0-9_-]{1,64}$/.test(t))return{name:t,detail:r}}function N5({name:e,enabled:t,origin:n}){if(typeof e!=="string"||!gm.test(e)||typeof t!=="boolean")return;let r=n==="package"?c(" · 包来源"," · From package"):n==="top-level"?c(" · 顶层来源"," · Top-level"):"";return{name:e,detail:(t?c("已启用","Enabled"):c("已停用","Disabled"))+r}}function B5({name:e,status:t,toolCount:n}){let r=L5.get(C(t));if(!r||typeof e!=="string"||!gm.test(e)||typeof n!=="number"||!Number.isSafeInteger(n)||n<0)return;return{name:e,detail:c(`${r} · ${pm.format(n)} 个工具`,`${r} · ${pm.format(n)} ${n===1?"tool":"tools"}`)}}function p0(e,t){let n=U(e);if(n.status!=="ok"||!Array.isArray(n.rows)||typeof n.incomplete!=="boolean")return{status:"unavailable",reason:n.status==="unavailable"&&n.reason==="rpc-failed"?"rpc-failed":"invalid-response"};let r=n.rows.slice(0,128).flatMap((s)=>t(U(s))??[]);return{status:"ok",rows:r,incomplete:n.incomplete||r.length!==n.rows.length}}function g0(e,t,n){let r=y("section","subpanel stack stack--tight");if(r.append(y("h3","",e)),n.status==="unavailable")return r.append(y("p","small muted",n.reason==="rpc-failed"?c("当前不可用:未能从当前宿主读取。","Unavailable: Could not read from the current host."):c("当前不可用:原生响应格式无效。","Unavailable: The native response was invalid."))),r;if(t)r.append(y("p","small muted",t));if(n.rows.length){let s=y("dl","capability-list small numerical");s.tabIndex=0,s.setAttribute("aria-label",c(`${e} · 只读列表`,`${e} · Read-only list`));for(let i of n.rows){let o=y("div");o.tabIndex=-1;let a=y("dt");a.append(y("code","",i.name)),o.append(a,y("dd","muted",i.detail)),s.append(o)}s.addEventListener("keydown",(i)=>{if(!vi(i))return;let o=s.closest(".details-scroll");if(!o)return;let a=Array.from(s.children),l=a.findIndex((d)=>d===i.target),u=yi(i.key,l,a,o);if(u===void 0)return;i.preventDefault(),a[u].focus({preventScroll:!0}),ki(o,a[u])}),r.append(s)}if(n.incomplete)r.append(y("p","small muted",n.rows.length?c("清单不完整,部分项目未显示。","This list is incomplete. Some entries are not shown."):c("清单不完整,没有可显示的项目。","This list is incomplete. No entries can be shown.")));else if(!n.rows.length)r.append(y("p","small muted",c("原生未报告任何条目。","The native host did not report any entries.")));return r}function bm(e){return[g0(c("已加载扩展","Loaded extensions"),c("这里只显示当前会话的原生报告,不是安装清单。","Shows only what the native host reports for this session, not everything installed."),p0(e.extensions,N5)),g0(c("MCP 服务","MCP servers"),c("状态与工具数由原生报告,不代表工具可立即调用。","The native host reports status and tool counts. Tools may not be ready to use."),p0(e.mcpServers,B5)),b0(),g0(c("注册命令与技能","Registered commands and skills"),c("已注册不代表当前可执行。","Registered commands and skills may not be available to run."),p0(e.commands,I5))]}function b0(){let e=y("section","subpanel stack stack--tight");return e.id="runtime-compatibility",e.append(y("h3","",c("浏览器原生兼容未启用","Native terminal features are unavailable in the browser")),y("p","small muted",c("尚未验证浏览器终端能在各模式下可靠隔离私密交互。","The browser terminal has not been verified to keep private interactions isolated in every mode.")),y("p","small muted",c("账户登录、凭据、私密授权(含 MCP)、直接 shell 或外部编辑器,请在本机 OmO 终端完成。","Use the local OmO terminal for sign-in, credentials, private approvals (including MCP), direct shell access, and external editors.")),y("p","small muted",c("请自行打开本机 OmO,选择对应的工作目录和会话,再手动操作。此提示不会启动终端、执行或重放命令,也不会传送私密内容。","Open OmO locally and select the working directory and session. This notice does not launch a terminal, run or replay commands, or transmit private content.")),y("p","small muted",c("如果要继续同一会话,符合条件的空闲会话可用「会话管理 → 转到 CLI」先释放,再按回执在本机继续。","To continue an eligible idle session, release it with “Manage session → Move to CLI”, then follow the instructions to continue locally."))),e}var jr=64,wi="http://www.w3.org/2000/svg",O5=0,$5=/^[0-9a-f]{64}$/u,jo=(e)=>typeof e==="string"&&$5.test(e)?e:"",Wr=(e)=>{let t=Ce(e);return t!==void 0&&Number.isSafeInteger(t)&&Math.abs(t)<=8640000000000000?t:void 0};function v0(e){return{createdAt:Wr(e.createdAt),startedAt:Wr(e.startedAt),completedAt:Wr(e.completedAt),lastActivityAt:Wr(e.lastActivityAt)}}var vm=new Intl.NumberFormat(me);function y0({createdAt:e,startedAt:t,completedAt:n,lastActivityAt:r}){let s=[];for(let[i,o]of[[c("创建","Created"),e],[c("开始","Started"),t],[c("完成","Completed"),n],[c("最近活动","Last activity"),r]])if(o!==void 0)s.push([i,ft(o)]);if(t!==void 0&&n!==void 0&&n>=t){let i=Math.floor((n-t)/1000),o=vm.format(Math.floor(i/60)),a=vm.format(i%60);s.push([c("耗时","Elapsed"),i<60?c(`${a} 秒`,`${a}s`):c(`${o} 分 ${a} 秒`,`${o}m ${a}s`)])}return s}var jn=(e)=>e.label||c(`节点 ${e.id+1}`,`Node ${e.id+1}`);function ym(e){if(!Array.isArray(e.nodes)||!e.nodes.length||e.nodes.length>jr||!Array.isArray(e.waves)||!e.waves.length||e.waves.length>e.nodes.length)return;let t=e.nodes.length,n=new Map,r=(o)=>typeof o==="number"&&Number.isInteger(o)&&o>=0&&o<t;for(let o of e.nodes){let a=U(o),{id:l,state:u,upstream:d,attempt:h,agent:p,category:g,label:b,configuredModel:x,taskKey:k}=a;if(!r(l)||n.has(l)||!Array.isArray(d)||d.length>=t||!d.every(r)||new Set(d).size!==d.length)return;n.set(l,{id:l,state:C(u),upstream:d,agent:C(p),category:C(g),label:C(b),configuredModel:C(x),taskKey:jo(k),times:v0(a),attempt:typeof h==="number"&&Number.isSafeInteger(h)&&h>=0?h:void 0})}let s=new Map,i=[];for(let[o,a]of e.waves.entries()){let l=U(a);if(l.index!==o||!Array.isArray(l.nodes)||!l.nodes.length||l.nodes.length>n.size)return;let u=[];for(let d of l.nodes){if(!r(d)||s.has(d))return;let h=n.get(d);if(!h)return;s.set(d,o),u.push(h)}i.push(u)}if(s.size!==n.size)return;for(let[o,a]of i.entries())for(let l of a)if(!l.upstream.every((u)=>(s.get(u)??1/0)<o))return;return i}function km(e,t){let l=(L)=>L*104-16,u=l(Math.max(...e.map((L)=>L.length))),d=Math.min(u,l(2)),h=new Map,p=new Map,g=y("div","dag-graph-map");g.tabIndex=0,g.setAttribute("role","region"),g.setAttribute("aria-label",c("可滚动的有向依赖图,完整依赖见节点详情。","Scrollable directed dependency graph. See node details for all dependencies."));let b=y("div","dag-graph-canvas"),x=(L)=>`${L/16}rem`;for(let[L,B]of e.entries()){let O=12+L*96,H=y("div","dag-graph-wave",c(`第 ${L+1} 波`,`Wave ${L+1}`));H.style.top=x(O),b.append(H);for(let[K,G]of B.entries()){let de=12+Math.max(0,(d-l(B.length))/2)+K*104;h.set(G.id,{x:de+44,y:O+21,wave:L});let ne=y("button","dag-graph-node");ne.type="button",ne.dataset.node=String(G.id);let ae=br(G.state);if(ae)ne.dataset.state=G.state;ne.style.left=x(de),ne.style.top=x(O+21),ne.style.width=x(88),ne.style.height=x(46),ne.title=jn(G),ne.addEventListener("click",()=>t(G.id)),ne.append(y("strong","",jn(G)),y("span","",G.state==="blocked"?c("被依赖阻塞","Blocked"):ae??c("状态未知","Unknown"))),b.append(ne)}}let k=document.createElementNS(wi,"svg");k.setAttribute("class","dag-graph-edges"),k.setAttribute("aria-hidden","true"),k.setAttribute("focusable","false");let E=document.createElementNS(wi,"defs"),T=document.createElementNS(wi,"marker"),_=`dag-arrow-${++O5}`;T.setAttribute("id",_),T.setAttribute("viewBox","0 0 6 8"),T.setAttribute("markerWidth","6"),T.setAttribute("markerHeight","8"),T.setAttribute("markerUnits","userSpaceOnUse"),T.setAttribute("refX","6"),T.setAttribute("refY","4"),T.setAttribute("orient","auto");let A=document.createElementNS(wi,"path");A.setAttribute("d","M0 0 L6 4 L0 8 Z"),T.append(A),E.append(T),k.append(E);for(let L of e)for(let B of L){let O=h.get(B.id);for(let H of B.upstream){let K=h.get(H),G=K.y+46,de=O.y-2,ne=document.createElementNS(wi,"path");if(ne.dataset.from=String(H),ne.dataset.to=String(B.id),ne.setAttribute("marker-end",`url(#${_})`),O.wave===K.wave+1){let ae=(G+de)/2;ne.setAttribute("d",`M${K.x} ${G} C${K.x} ${ae} ${O.x} ${ae} ${O.x} ${de}`)}else{let ae=p.get(H)??p.size;p.set(H,ae);let z=12+u+8+5*ae;ne.setAttribute("d",`M${K.x} ${G} V${G+6} H${z} V${de-9} H${O.x} V${de}`)}k.append(ne)}}let D=24+u+p.size*5,R=24+(e.length-1)*96+21+46;return b.style.width=x(D),b.style.height=x(R),k.setAttribute("viewBox",`0 0 ${D} ${R}`),b.prepend(k),g.append(b),g}var Zt=new Intl.NumberFormat(me),Em=[["pending",c("等待","Pending")],["scheduled",c("已调度","Scheduled")],["running",c("运行中","Running")],["paused",c("已暂停","Paused")],["blocked",c("阻塞","Blocked")],["completed",c("已完成","Completed")],["failed",c("失败","Failed")],["cancelled",c("已取消","Canceled")],["skipped",c("已跳过","Skipped")]],wm=new Set(["pending","scheduled","running","paused","blocked"]),z5=new Set(["scheduled","running","paused","blocked","failed"]),k0=(e)=>br(e)??c("状态未知","Unknown status");function w0(e){let t=y("dl","capability-list small numerical break");for(let[n,r]of e){let s=y("div");s.append(y("dt","",n),y("dd",r?"":"muted",r||c("未报告","Not reported"))),t.append(s)}return t}function Am(e){return[[c("生效模型","Effective model"),e?.effectiveModel??""],[c("推理档位","Reasoning"),e?.reasoning??""]]}function x0(e){let t=U(e.effectiveModel),n=C(t.provider),r=C(t.modelId);return{description:C(e.description),configuredModel:C(e.configuredModel),effectiveModel:n&&r?`${n}/${r}`:"",reasoning:n&&r?C(t.reasoning):""}}function Cm(e,t,n){let r=x0(e),s=C(e.agent),i=C(e.category),o=[s?c(`代理:${s}`,`Agent: ${s}`):"",i?c(`类别:${i}`,`Category: ${i}`):""].filter(Boolean),a=n?.openDag?Ue(c("打开 DAG 节点","Open DAG node"),n.openDag,"task-dag-jump"):y("p","small muted",c("没有已核验的 DAG 节点关联。","No verified DAG node link.")),l=y("p","small break",r.description||c("未报告任务描述。","Task description not reported.")),u=w0([[c("路由","Route"),o.join(" · ")],[c("执行方式","Execution mode"),C(e.executionMode)],[c("请求模型","Requested model"),r.configuredModel],...Am(r),[c("创建","Created"),ft(e.createdAt)],[c("更新","Updated"),ft(e.updatedAt)]]),d=Mt("",l,...n?.openDag?[a,u]:[u,a]);if(d.querySelector("summary")?.append(y("strong","",t[0]),` · ${t[1]}`),d.className="task-run",d.name="native-subagent-task",n)d.dataset.taskKey=n.key;return d}function E0(e,t=e){e.focus({preventScroll:!0}),t.scrollIntoView({block:"start",inline:"nearest"})}function A0(e,t,n){let r=e.querySelector(".dag-graph-text"),s=r?.querySelector(`[data-node-detail="${t}"]`),i=s?.querySelector(".runtime-execution"),o=i?.querySelector("summary");if(!r||!s||!i||!o)return;if(r.open=i.open=!0,n)E0(o,s)}function Go(e){let t=Ce(e);return t!==void 0&&Number.isSafeInteger(t)&&t>=0?t:void 0}function _m(e,t){return c(`已完成 ${Zt.format(e)} / ${Zt.format(t)} 个节点`,`${Zt.format(e)} of ${Zt.format(t)} completed`)}function Ko(e){return Em.flatMap(([t,n])=>{let r=e(t);return r===void 0?[]:[`${n} ${Zt.format(r)}`]})}function Sm(e,t){let n=(a)=>{let l=Go(t[a]);return l!==void 0&&l<=e?l:void 0},r=n("completed"),s=Ko((a)=>a==="completed"?void 0:n(a)),i=s.length+Number(r!==void 0),o=[...r===void 0?[]:[y("span","dag-roster-progress",_m(r,e))],...s.length?[y("span","dag-roster-counts",s.join(" · "))]:[]];if(i<Em.length)o.push(y("span","dag-roster-counts",i?c("仅显示宿主报告的状态。","Only reported states are shown."):c("宿主未报告节点状态计数。","The host did not report node status counts.")));return o}function xm(e){let t=new Map;for(let n of e)t.set(n.state,(t.get(n.state)??0)+1);return t}function Tm(e){return c(`第 ${Zt.format(e+1)} 波`,`Wave ${Zt.format(e+1)}`)}function Rm(e){let t=y("section","dag-wave stack stack--tight");return t.append(y("h4","",Tm(e))),t}function F5(e,t,n){let r=y("li","dag-node-detail stack stack--tight");r.dataset.nodeDetail=String(e.id);let s=y("p","small break");s.append(y("strong","",jn(e)),` · ${k0(e.state)}`),r.append(s);let i=e.agent?c(`代理:${e.agent}`,`Agent: ${e.agent}`):e.category?c(`类别:${e.category}`,`Category: ${e.category}`):"",o=e.attempt===void 0?"":c(`尝试次数:${Zt.format(e.attempt)}`,`Attempts: ${Zt.format(e.attempt)}`);if(i||o)r.append(y("p","small muted break",[i,o].filter(Boolean).join(" · ")));let a=e.upstream.flatMap((k)=>{let E=t.get(k);return E?[E]:[]}),l=(k)=>`${jn(k)} (${k0(k.state)})`,u=a.map(jn);r.append(y("p","small muted break",u.length?c(`依赖:${u.join("、")}`,`Depends on: ${u.join(", ")}`):c("无上游依赖","No upstream dependencies")));let d=[[a.filter((k)=>k.state==="failed"),c("失败上游","Failed upstream")],[a.filter((k)=>wm.has(k.state)),c("未结束上游","Unfinished upstream")],[a.filter((k)=>k.state!=="failed"&&!wm.has(k.state)),c("其他上游","Other upstream")]];for(let[k,E]of d)if(k.length)r.append(y("p","small break",`${E}${c(":",": ")}${k.map(l).join(c("、",", "))}`));let h=e.taskKey?n?.task(e.taskKey):void 0,p=w0([[c("配置模型","Configured model"),e.configuredModel],...h?.configuredModel?[[c("任务请求模型","Task requested model"),h.configuredModel]]:[],...Am(h),...y0(e.times)]),g=h&&n?Ue(c("打开子代理任务","Open subagent task"),()=>n.openTask(e.taskKey),"node-task-jump"):y("p","small muted",c("没有已核验的子代理任务关联。","No verified subagent task link.")),b=y("p","small break",h?.description||c("未报告任务描述。","Task description not reported.")),x=Mt(c("执行详情","Execution details"),b,...h?[g,p]:[p,g]);return x.className="runtime-execution",x.querySelector("summary")?.setAttribute("aria-label",c(`${jn(e)}:执行详情`,`${jn(e)}: Execution details`)),r.append(x),r}function q5(e,t){let n=new Map;for(let r of we(e.nodes).slice(0,jr)){let s=U(r),i=Go(s.id);if(i!==void 0&&i<jr)n.set(i,C(s.state))}for(let r of we(e.waves).slice(0,jr)){let s=U(r),i=Go(s.index);if(i===void 0||i>=jr)continue;let o=Rm(i),a=y("ol","inline-list numerical");for(let l of we(s.nodes).slice(0,jr)){let u=Go(l),d=u===void 0?void 0:n.get(u);if(u===void 0||d===void 0)continue;n.delete(u);let h=y("li");h.append(y("p","small",`${jn({id:u,label:""})} · ${k0(d)}`)),a.append(h)}if(a.childElementCount)o.append(a),t.append(o)}if(!t.childElementCount)t.append(y("p","small muted",c("运行未提供可显示的波次。","This run did not report any waves to display.")))}function Mm(e,t,n=""){let r=y("div","dag-graph-view stack stack--tight"),s=y("details","dag-graph-text"),i=y("summary","small",c("节点详情 · 波次与依赖","Node details · Waves and dependencies")),o=y("div","dag-readout stack stack--tight"),a=ym(e),l=a?.flat()??[];if(a){let u=new Map(l.map((k)=>[k.id,k])),d=xm(l),h=c(`${Zt.format(a.length)} 个波次`,`${Zt.format(a.length)} ${a.length===1?"wave":"waves"}`);r.append(y("p","small break dag-verified-roster",[c("已核验快照","Verified snapshot"),h,_m(d.get("completed")??0,l.length)].join(" · ")));let p=Ko((k)=>k==="completed"?void 0:d.get(k));if(p.length)r.append(y("p","small muted break",p.join(" · ")));let g=C(e.name);if(g&&g!==n)r.append(y("p","small metric-label break",g));let b=y0(v0(e));if(b.length)r.append(w0(b));let x=[];for(let[k,E]of a.entries()){let T=Rm(k),_=y("ol","inline-list numerical"),A=xm(E),D=Ko((R)=>z5.has(R)?A.get(R):void 0);if(D.length)x.push(`${Tm(k)}${c(":",": ")}${D.join(" · ")}`);_.append(...E.map((R)=>F5(R,u,t))),T.append(y("p","small muted break",Ko((R)=>A.get(R)).join(" · ")),_),o.append(T)}if(x.length){let k=y("span","dag-wave-preview");for(let E of x.slice(0,3))k.append(y("span","dag-roster-counts",E));if(x.length>3)k.append(y("span","dag-roster-counts",c(`另有 ${Zt.format(x.length-3)} 个波次,展开查看`,`${Zt.format(x.length-3)} more highlighted waves in node details`)));i.append(k)}}else r.append(y("p","small muted",c("无法验证完整拓扑;仅显示可识别的节点,不显示依赖连线。","Could not verify the full graph. Only recognized nodes are shown, without dependency lines."))),q5(e,o);if(s.open=!a||matchMedia("(max-width: 760px)").matches,s.append(i,o),r.append(s),a)r.append(km(a,(u)=>A0(r,u,!0)));return{root:r,nodes:l}}var H5=new Map([["inactive",c("会话尚未接入,或正在交接。","The session is not connected or is being handed off.")],["binding_unverified",c("无法验证当前会话的宿主绑定。","Could not verify which host owns the current session.")],["unsupported",c("当前宿主或连接方式不支持此读取。","The current host or connection does not support this read.")],["native_unavailable",c("宿主未能提供摘要。","The host could not provide a summary.")],["native_window_unverified",c("宿主在读取范围内没有返回匹配的运行。更早的匹配未知。","The host returned no matching runs within its read window. Older matches are unknown.")],["engine_unavailable",c("宿主连接忙碌、已断开或读取超时。","The host is busy, disconnected, or did not respond in time.")],["web_unsupported",c("当前 Web 服务没有实时摘要入口。","This Web server does not support live summaries.")],["read_refused",c("Web 服务未允许此读取,请确认当前会话仍可用。","The Web server refused this read. Check that the session is still available.")],["read_failed",c("读取失败或超时,可手动刷新。","The read failed or timed out. Refresh to try again.")]]),vr=new Intl.NumberFormat(me),P5=new Set(["pending","running","paused"]),U5=new Set(["completed","failed","cancelled"]);function Cs(e){let t=Ce(e);return t!==void 0&&Number.isSafeInteger(t)&&t>=0?t:void 0}function xi(e){switch(e.status){case"unavailable":{let t=H5.get(C(e.reason))??c("没有可用的读取结果。","No results are available.");return c(`不可用:${t}`,`Unavailable: ${t}`)}case"ownership_changed":return c("会话归属已变化,未显示任何宿主数据。","Session ownership changed. No host data is shown.");default:return c("摘要格式无效,未显示宿主数据。","The summary is invalid. No host data is shown.")}}function Vo(e){return e.status==="unavailable"&&e.reason==="unsupported"}function Lm(e,t,n){if(t.status!=="ok")return;let r=we(t.rows).map(U),s=n?U5:P5;if(!r.length||r.length>256||!r.every((i)=>br(C(i.status))&&Wr(i.createdAt)!==void 0&&Wr(i.updatedAt)!==void 0&&(e==="tasks"||Cs(i.nodeCount)!==void 0&&s.has(C(i.status)))))return;if(e==="tasks"?Cs(t.omittedCount)===void 0:t.coverage!=="native_window"||typeof t.limitReached!=="boolean")return;return r}function C0(e){let t=new Map,n=new Set;for(let r of Lm("tasks",e,!1)??[]){let s=jo(r.key);if(!s||n.has(s))continue;if(t.delete(s))n.add(s);else t.set(s,x0(r))}return t}function Dm(e){let t=y("div","dag-readout stack stack--tight");return t.append(y("p","small muted",e.status==="not_found"?c("该运行不在当前列表中,请刷新。","This run is no longer in the list. Refresh to try again."):xi(e))),t}function Im(e,t,n={}){let{dag:r,taskJump:s,taskKeys:i,snapshot:o}=n,a=o!==void 0,l=y("ol","inline-list numerical");for(let[u,d]of t.entries()){let h=y("li","stack stack--tight"),p=e==="dag"?a?we(d.nodes).length:Cs(d.nodeCount):void 0,g=a&&e==="tasks"?d.startedAt:d.createdAt,b=a&&e==="tasks"?d.completedAt:d.updatedAt,x=br(C(d.status))??c("状态未知","Unknown status"),k=!a?C(e==="dag"?d.name:d.title):"",E=k||`${e==="tasks"?c("任务","Task"):c("运行","Run")} ${vr.format(u+1)}`,T=`${E} · ${x}`,_=jo(d.key);if(e==="tasks"&&!a){h.append(Cm(d,[E,x],i?.has(_)?{key:_,openDag:s?.(_)}:void 0)),l.append(h);continue}let A=p===void 0?"":c(`${vr.format(p)} 个节点`,`${vr.format(p)} ${p===1?"node":"nodes"}`),D=p!==void 0&&!a?Sm(p,U(d.counts)):[];if(r&&e==="dag"&&!a&&_){let R=y("details","dag-run");R.dataset.dagKey=_;let L=y("div","dag-content"),B=y("p","small muted",c("正在读取波次与依赖…","Loading waves and dependencies…"));B.setAttribute("role","status");let O=y("summary");O.append(y("strong","",E),` · ${[x,A].filter(Boolean).join(" · ")}`,...D),R.append(O,L);let H,K=!1;R.addEventListener("toggle",()=>{if(!R.open){H?.abort(),H=void 0;return}if(H||K||!R.isConnected)return;let G=H=new AbortController,de=()=>H===G&&R.isConnected&&R.open;L.replaceChildren(B),r.read(_,G.signal).then((ne)=>{if(!de())return;let ae=ne.status==="ok"?Mm(ne,r.links,k):void 0;L.replaceChildren(ae?.root??Dm(ne)),K=ne.status==="ok",r.settled(_,ae?.nodes??[],L)},(ne)=>{if(ne instanceof DOMException&&ne.name==="AbortError")return;if(de())L.replaceChildren(Dm({status:"unavailable",reason:"read_failed"})),r.settled(_,[],L)}).finally(()=>{if(H===G)H=void 0})}),h.append(R)}else{if(h.append(y("p","metric-label small",T)),A)h.append(y("p","small muted",A));if(D.length){let R=y("p","break numerical");R.append(...D),h.append(R)}}if(Ce(g)!==void 0)h.append(y("p","small muted",a&&e==="tasks"?c(`开始:${ft(g)}`,`Started: ${ft(g)}`):c(`创建:${ft(g)}`,`Created: ${ft(g)}`)));if(Ce(b)!==void 0&&b!==g)h.append(y("p","small muted",a&&e==="tasks"?c(`结束:${ft(b)}`,`Ended: ${ft(b)}`):c(`更新:${ft(b)}`,`Updated: ${ft(b)}`)));l.append(h)}return l}function W5(e,t){let n=y("section","subpanel stack stack--tight");if(n.append(y("h4","",c("磁盘快照 · 只读","Saved snapshot · Read-only"))),t==="waiting"){let r=y("p","small muted",c("正在查找已保存的快照…","Looking for a saved snapshot…"));r.setAttribute("role","status"),n.append(r)}else if(t.status==="ok"){let r=we(e==="tasks"?t.tasks:t.runs).map(U);n.append(y("p","small muted",c(`保存时间:${ft(t.updatedAt)} · 非实时`,`Saved: ${ft(t.updatedAt)} · Not live`))),n.append(r.length?Im(e,r,{snapshot:t}):y("p","small muted",c("快照没有此类记录,不代表当前没有。","No matching records in the snapshot. There may still be live activity.")))}else n.append(y("p","small muted",c("没有可读取的快照。","No readable snapshot.")));return n}function wn(e,t,{snapshot:n,dag:r,taskJump:s,history:i=!1}={}){let o=y("section","subpanel stack stack--tight");if(!i)o.append(y("h3","",e==="tasks"?c("子代理任务","Subagent tasks"):c("当前 DAG 运行","Current DAG runs")),y("p","metric-label small",c("实时宿主 · 只读","Live host · Read-only")));let a=y("p","small muted");if(a.setAttribute("role","status"),o.append(a),!t)a.textContent=i?c("正在读取已结束的 DAG 运行…","Loading finished DAG runs…"):c("正在读取宿主摘要…","Loading host summary…");else if(t.status==="empty"&&e==="tasks")a.textContent=c("宿主报告当前没有子代理任务。","The host reports no current subagent tasks.");else if(t.status==="ok"){let l=Lm(e,t,i),u=Cs(t.omittedCount);if(l){if(a.textContent=c(`读到 ${vr.format(l.length)} 条摘要。`,`${vr.format(l.length)} ${l.length===1?"summary":"summaries"} loaded.`),o.append(Im(e,l,{dag:r,taskJump:s,taskKeys:e==="tasks"?C0(t):void 0})),e==="tasks"&&u)o.append(y("p","small muted",c(`宿主另有 ${vr.format(u)} 条未返回。`,`The host omitted ${vr.format(u)} ${u===1?"additional entry":"additional entries"}.`)));if(e==="dag")o.append(y("p","small muted",c("宿主最多检查最近 256 次运行再筛选,更早的匹配可能未显示。","The host checks up to 256 recent runs before filtering. Older matches may not appear.")))}else a.textContent=xi({})}else a.textContent=xi(t);return[o,...t&&n&&Vo(t)?[W5(e,n)]:[]]}function Nm(e){let t=y("section","subpanel stack stack--tight");t.id="runtime-journal",t.append(y("h3","",c("本会话记忆计数","Session memory counts")));let n=y("p","small muted");if(n.setAttribute("role","status"),t.append(n),!e)n.textContent=c("正在读取会话记忆…","Loading session memory…");else if(e.status==="ok"){let r=Cs(e.totalSteps),s=Cs(e.reflectedSteps);if(r!==void 0&&s!==void 0){n.textContent=c("仅当前会话的原生日志计数,不含共享记忆或原文。","Native journal counts for this session only. Shared memory and original text are not shown.");let i=y("dl","capability-list small numerical");for(let[o,a]of[[c("记录步数","Recorded steps"),r],[c("已反思步数","Reflected steps"),s]]){let l=y("div");l.append(y("dt","",o),y("dd","",vr.format(a))),i.append(l)}t.append(i)}else n.textContent=xi({})}else n.textContent=xi(e);return t}var tt=(e)=>ve(e,HTMLElement),Gr=(e)=>ve(e,HTMLButtonElement),j5=new Intl.DateTimeFormat(me,{dateStyle:"medium",timeStyle:"short"}),Bm=(e)=>Number.isFinite(new Date(e).getTime())?j5.format(e):"";function Om(e,t){let n=ve("cli-history-dialog",HTMLDialogElement),r=ve("cli-history-directory",HTMLSelectElement),s=tt("cli-history-directory-hint"),i=Gr("cli-history-browse"),o=ve("cli-history-search",HTMLInputElement),a=tt("cli-history-list"),l=tt("cli-history-list-status"),u=tt("cli-history-list-error"),d=tt("cli-history-index"),h=tt("cli-history-record"),p=tt("cli-history-record-title"),g=tt("cli-history-activity"),b=Gr("cli-history-refresh"),x=Gr("cli-history-refresh-activity"),k=Gr("cli-history-branch"),E=Gr("cli-history-resume"),T=tt("cli-history-resume-status"),_=tt("cli-history-resume-error"),A=new Wn(tt("cli-history-messages"),n,tt("cli-history-empty")),D=[],R,L,B,O,H,K=!1,G=!1,de=new Set,ne=()=>!r.disabled?r:!i.hidden?i:Gr("cli-history-title-close");function ae(){let q=t.resumeUnavailable(),Y=L!==void 0&&de.has(L.id);k.disabled=!K||Y,E.disabled=!L||Y||Boolean(q),x.disabled=!K||H!==void 0,re(T,Y?c("正在尝试打开同一会话…","Opening the same session in Web…"):L?q:"")}function z(){if(!n.open||d.hidden)return;let q=o.value.trim().toLocaleLowerCase(),Y=[...t.bookmarks()].filter((Ae)=>Ae.cwd===r.value&&Ae.name.toLocaleLowerCase().includes(q)).sort((Ae,He)=>He.updatedAt-Ae.updatedAt),ue=tt("cli-history-web-list"),le=JSON.stringify(Y.map(({id:Ae,name:He,archived:Ne})=>[Ae,He,Ne]));if(ue.dataset.rows===le)return;ue.dataset.rows=le;let be=document.activeElement instanceof HTMLButtonElement&&ue.contains(document.activeElement)?document.activeElement.dataset.session:void 0;if(ue.replaceChildren(...Y.map((Ae)=>{let He=y("li"),Ne=Ue("",()=>t.openBookmark(Ae),"button--quiet session-link");if(Ne.dataset.session=Ae.id,Ne.append(y("span","",Ae.name)),Ae.archived)Ne.append(y("small","",c("已归档","Archived")));return He.append(Ne),He})),tt("cli-history-bookmarks").hidden=!Y.length,be)([...ue.querySelectorAll("button")].find((Ae)=>Ae.dataset.session===be)??o).focus({preventScroll:!0})}function j(){let q=o.value.trim().toLocaleLowerCase(),Y=D.filter((le)=>le.name.toLocaleLowerCase().includes(q)),ue=document.activeElement instanceof HTMLButtonElement&&a.contains(document.activeElement)?document.activeElement.dataset.history:void 0;a.replaceChildren();for(let le of Y){let be=y("li"),Ae=Ue("",()=>W(le),"button--quiet session-link");Ae.dataset.history=le.id,Ae.append(y("span","",le.name),y("small","numerical",Bm(le.updatedAt))),be.append(Ae),a.append(be)}if(a.hidden=!Y.length,ue)([...a.querySelectorAll("button")].find((le)=>le.dataset.history===ue)??o).focus({preventScroll:!0});re(l,B?c("正在读取此目录的 CLI 历史…","Loading CLI history for this directory…"):R===!1?c("CLI 历史不可用:未启用或未找到本地历史记录。","CLI history is disabled or no local history records were found."):R&&!Y.length?q?c("没有匹配的 CLI 历史。","No matching CLI history."):c("此目录没有未在 Web 打开的 CLI 会话。","No CLI sessions to add from this directory."):""),z()}async function Z(){let q=r.value;if(!q||B)return;let Y=B=new AbortController,ue=()=>B===Y&&q===r.value;b.setAttribute("aria-disabled","true"),re(u),re(l,c("正在读取此目录的 CLI 历史…","Loading CLI history for this directory…"));try{let le=await e.request(`/api/cli-history?${new URLSearchParams({cwd:q})}`,void 0,AbortSignal.any([Y.signal,AbortSignal.timeout(15000)]));if(!ue())return;if(typeof le.available!=="boolean"||!Array.isArray(le.sessions))throw Error(c("无法核验目录会话列表。","Could not verify the directory session list."));R=le.available,D=we(le.sessions).map(U).flatMap((be)=>{let Ae=C(be.id);return R&&/^[a-f0-9]{64}$/u.test(Ae)&&be.cwd===q&&be.adopted===!1?[{id:Ae,name:C(be.name)||c("未命名 CLI 会话","Untitled CLI session"),cwd:q,updatedAt:Ce(be.updatedAt)??0}]:[]})}catch(le){if(!ue())return;D=[],R=void 0,re(u,c(`无法读取 CLI 历史:${Re(le)}`,`Could not load CLI history: ${Re(le)}`))}finally{if(ue())B=void 0,b.removeAttribute("aria-disabled"),j()}}function Q(q){if(B?.abort(),B=void 0,r.value=q,o.value="",D=[],R=void 0,b.removeAttribute("aria-disabled"),re(u),re(tt("cli-history-directory-path"),r.value),s.hidden=Boolean(r.value),tt("cli-history-results").hidden=!r.value,j(),r.value)t.onDirectory(r.value),Z()}function oe(q=!1){if(!n.open&&!G)return;let{paths:Y,browse:ue}=t.scope(),le=r.value;i.hidden=!ue,r.disabled=!Y.length;let be=JSON.stringify(Y);if(r.dataset.paths!==be)r.dataset.paths=be,r.replaceChildren(ot(c("选择已授权目录","Choose an authorized directory"),""),...Y.map((Ae)=>ot(t.directoryLabel(Ae),Ae))),r.value=Y.includes(le)?le:"";if(q||le&&!r.value){if(xe(),h.hidden=!0,d.hidden=!1,Q(""),n.open)ne().focus()}s.textContent=Y.length?c("先选目录查看会话,不会直接打开。","Choose a directory to list its sessions. This won’t open a session."):ue?c("还没有获准目录。可浏览或输入一个绝对路径。","No directories are authorized. Browse or enter an absolute path."):c("没有获准目录。请检查 Web 服务启动设置。","No directories are authorized. Check the Web server startup settings.")}let F=(q)=>Ki(q.id);async function X(q){H?.abort();let Y=H=new AbortController;ae(),g.querySelector("[data-activity-status]")?.remove();let le=y("p","small muted",c("正在读取原生快照…","Loading native snapshot…"));le.dataset.activityStatus="",le.setAttribute("role","status"),g.append(le);try{let be=await e.request(`${F(q)}/activity`,void 0,AbortSignal.any([Y.signal,AbortSignal.timeout(15000)]));if(Y.signal.aborted||!n.open||L!==q)return;cm(g,be)}catch(be){if(!Y.signal.aborted&&n.open&&L===q)le.textContent=c(`无法读取原生快照:${Re(be)}`,`Could not load the native snapshot: ${Re(be)}`),le.className="notice error small",le.setAttribute("role","alert")}finally{if(H===Y)H=void 0,ae()}}async function te(q){O?.abort();let Y=O=new AbortController,ue=tt("cli-history-record-status");re(ue,c("正在读取对话记录…","Loading conversation…")),re(tt("cli-history-record-error"));try{let le=await e.request(F(q),void 0,AbortSignal.any([Y.signal,AbortSignal.timeout(15000)]));if(Y.signal.aborted||!n.open||L!==q)return;let be=U(le.session);p.textContent=C(be.name)||q.name,K=!0,ae();let Ae=Bm(Ce(be.updatedAt)??q.updatedAt);re(tt("cli-history-record-updated"),Ae&&c(`记录更新:${Ae}`,`Record updated: ${Ae}`));let He=we(le.messages).map(U).map((Ne,Pe)=>{let mt=on(Ne)==="toolResult"&&C(Ne.toolCallId);return{key:mt?`result:${mt}`:`history-${Pe}`,message:Ne}});A.render(He,"",new Map),requestAnimationFrame(()=>{if(!Y.signal.aborted&&n.open&&L===q)n.scrollTop=0})}catch(le){if(Y.signal.aborted||!n.open||L!==q)return;if(le instanceof Be&&(le.code==="history_too_large"||le.code==="history_preview_too_large")){re(tt("cli-history-record-error"),c("这条 CLI 记录过大,无法预览。仍可尝试在 Web 继续。","This CLI record is too large to preview. You can still try to continue in Web."));return}re(tt("cli-history-record-error"),c(`无法读取这条记录:${Re(le)}`,`Could not load this record: ${Re(le)}`))}finally{if(O===Y)O=void 0,re(ue)}}function xe(){O?.abort(),O=void 0,H?.abort(),H=void 0,L=void 0,K=!1,re(_),ae(),A.reset(),g.replaceChildren()}function W(q){if(r.value!==q.cwd)return;xe();let Y=L={...q};d.hidden=!0,h.hidden=!1,p.textContent=Y.name,tt("cli-history-record-meta").textContent=Y.cwd,re(tt("cli-history-record-updated")),tt("cli-history-empty").hidden=!0,p.focus({preventScroll:!0}),n.scrollTop=0,ae(),te(Y)}r.addEventListener("change",()=>Q(r.value)),i.addEventListener("click",()=>{if(G=!0,n.close(),!t.browse(()=>{ge(),i.focus()}))ge()}),o.addEventListener("input",j),b.addEventListener("click",()=>void Z()),x.addEventListener("click",()=>{if(L&&K)X(L)}),k.addEventListener("click",()=>{if(L&&K)t.openBranch({kind:"history",id:L.id,name:L.name})}),E.addEventListener("click",async()=>{let q=L;if(!q||E.disabled)return;let Y=e.token;de.add(q.id);let ue=()=>n.open&&L===q;re(_),ae(),T.focus();try{let le=await e.resumeHistory(q.id);if(Y!==e.token)return;if(le.cwd!==q.cwd)throw Error(c("返回的会话不属于所选目录。","The returned session does not belong to the selected directory."));if(D=D.filter((be)=>be.id!==q.id),t.onResumed(le,ue()),n.open&&!d.hidden)j()}catch(le){if(ue()){if(re(_,c(`无法在 Web 继续:${Re(le)}`,`Could not continue in Web: ${Re(le)}`)),document.activeElement===T)_.focus()}}finally{de.delete(q.id),ae()}}),Gr("cli-history-back").addEventListener("click",()=>{let q=L?.id;xe(),h.hidden=!0,d.hidden=!1,j(),([...a.querySelectorAll("button")].find((Y)=>Y.dataset.history===q)??o).focus()}),n.querySelector("[data-close]")?.addEventListener("click",()=>n.close()),n.addEventListener("close",()=>{if(n.open||G)return;xe(),Q(""),t.onClose()});function ge(q){if(n.open)return;if(!G)xe(),h.hidden=!0,d.hidden=!1,Q("");if(oe(),n.showModal(),oe(),G=!1,q&&t.scope().paths.includes(q))Q(q);else z();ne().focus()}return{open:ge,update:ae,scopeChanged:oe,renderBookmarks:z}}var bt=(e)=>ve(e,HTMLElement),kt=(e)=>ve(e,HTMLButtonElement),_0=c("仅普通文字。命令、权限审批及私密交互请回到 CLI 处理。","Plain text only. Use the CLI for commands, permission approvals, and private interactions."),$m=new Set(["terminal_not_attached","terminal_not_found","terminal_offline"]);function zm(e,t,n,r){let s=ve("cli-live-dialog",HTMLDialogElement),i=ve("cli-live-session",HTMLSelectElement),o=ve("cli-live-input",HTMLTextAreaElement),a=new Wn(bt("cli-live-messages"),bt("cli-live-transcript"),bt("cli-live-empty")),l=new Map,u=new Map,d=new Map,h=[],p=[],g,b="",x="",k,E,T,_,A=!1,D=500,R="waiting",L=!1,B={},O=[],H,K=!0;function G(){let F=p.find((be)=>be.id===i.value),X=F!==void 0&&b===F.id,te=X&&L&&R==="open"&&!T,xe=B.running===!0||B.compacting===!0,W=X||Boolean(F&&x===F.id),ge=Boolean(F&&d.get(F.id)===o.value);i.disabled=Boolean(b||T||k||!p.length),kt("cli-live-close").disabled=Boolean(T),kt("cli-live-connect").hidden=X,kt("cli-live-connect").disabled=!F||!g||!e.token||R!=="open"||Boolean(T||k),kt("cli-live-disconnect").hidden=!X,kt("cli-live-disconnect").disabled=Boolean(T),kt("cli-live-refresh").disabled=Boolean(T||k),kt("cli-live-branch").hidden=!X,kt("cli-live-branch").disabled=!te||xe,kt("cli-live-send").disabled=!te||xe||ge||!o.value.trim();let q=kt("cli-live-stop"),Y=X&&B.running===!0&&Boolean(C(B.turnId));if(!Y&&document.activeElement===q)o.focus({preventScroll:!0});q.hidden=!Y,q.disabled=!te,o.readOnly=T==="input",bt("cli-live-conversation").hidden=!W&&!o.value,re(bt("cli-live-workspace"),F?.cwd);let ue=T==="connect"?c("正在连接 CLI…","Connecting to CLI…"):T==="disconnect"?c("正在释放 Web 连接…","Disconnecting Web…"):R==="lost"?c("实时更新已离线,草稿会保留。连接恢复后只刷新消息,不会重发。","Live updates are offline. Your draft is kept. Reconnecting refreshes messages without resending them."):k?c("正在查找本地 CLI 会话…","Looking for local CLI sessions…"):X?!L?c("正在同步 CLI 对话…","Syncing the CLI conversation…"):B.compacting===!0?c("CLI 正在压缩上下文。","CLI is compacting context."):B.running===!0?c("已连接 · CLI 正在运行","Connected · CLI is running"):c("已连接 · 等待输入","Connected · Waiting for input"):g===!1?c("CLI 实时不可用:未启用或找不到本地终端控制服务。","Live CLI is unavailable. The local terminal service is disabled or could not be found."):!p.length?c("没有发现可连接的 CLI 会话。","No CLI sessions are available to connect."):R==="waiting"?c("正在等待 Web 实时连接…","Waiting for the Web connection…"):x===F?.id?O.length?c("已断开;显示最后一次同步的消息。","Disconnected. Showing the last synced messages."):c("已断开。","Disconnected."):c("选择会话后,点击「连接」读取对话。","Select a session and choose “Connect” to read the conversation."),le=x===F?.id&&(X?L:!T)?H==="unavailable"?c(" · 对话记录暂不可读"," · Conversation history is unavailable"):H==="truncated"?c(" · 仅显示部分近期消息"," · Showing a limited set of recent messages"):"":"";re(bt("cli-live-status"),ue+le),bt("cli-live-hint").textContent=ge?c(`上一次发送的结果未知,请先核对 CLI,不要重发这条消息。${_0}`,`Delivery of your last message is unknown. Check the CLI before trying again. Do not resend this message. ${_0}`):_0}function de(){x="",B={},O=[],H=void 0,a.reset(),o.value=u.get(i.value)??"",re(bt("cli-live-error")),re(bt("cli-live-receipt")),G()}function ne(){let F=i.value,X=b||(T==="connect"?F:"");if(p=h.filter((te)=>te.id===X||r(te.cwd)),i.replaceChildren(ot(c("选择可用会话","Choose a session"),""),...p.map((te)=>ot(te.name,te.id))),i.value=p.some((te)=>te.id===F)?F:p.length===1?p[0]?.id??"":"",i.value!==F)de()}async function ae(){if(b||k||!s.open)return;let F=k=new AbortController;re(bt("cli-live-error")),G();try{let X=await e.request("/api/cli-live",void 0,F.signal);if(!s.open||F.signal.aborted)return;g=X.available===!0,h=we(X.sessions).map(U).flatMap((te)=>{let xe=C(te.id);return xe?[{id:xe,name:C(te.name)||c("未命名 CLI 会话","Untitled CLI session"),cwd:C(te.cwd)}]:[]}),ne()}catch(X){if(!F.signal.aborted&&s.open)g=!1,re(bt("cli-live-error"),c(`无法发现 CLI 会话:${Re(X)}`,`Could not find CLI sessions: ${Re(X)}`))}finally{if(k===F)k=void 0;G()}}function z(F,X){B=U(X.state);let te=U(X.transcript).status;H=te==="truncated"||te==="unavailable"?te:void 0;let xe=O;O=we(X.messages).map(U).map((ge,q)=>({key:`cli-live:${q}`,message:JSON.stringify(xe[q]?.message)===JSON.stringify(ge)?xe[q]?.message??ge:ge}));let W=O.at(-1);if(!W&&H)a.reset();else a.render(O,W?.message.streaming===!0?W.key:"",l,x!==F);bt("cli-live-empty").hidden=Boolean(H)||O.length>0,x=F,L=!0,D=500}function j(){clearTimeout(_),_=void 0,E?.abort(),E=void 0,A=!1}function Z(F=50){if(!s.open||!b||R!=="open")return;if(E||T){A=!0;return}if(_!==void 0&&F!==0)return;clearTimeout(_),_=window.setTimeout(()=>{_=void 0,Q()},F)}async function Q(){let F=b;if(!F||E||!s.open||R!=="open")return;if(T){A=!0;return}let X=E=new AbortController,te=()=>b===F&&s.open&&!X.signal.aborted,xe=0;A=!1;try{let W=await e.request(Vi(F),void 0,AbortSignal.any([X.signal,AbortSignal.timeout(1e4)]));if(te()){if(z(F,W),bt("cli-live-error").dataset.read==="true")re(bt("cli-live-error"))}}catch(W){if(te()){if(L=!1,W instanceof Be&&$m.has(W.code))b="";else xe=D,D=Math.min(D*2,5000);let ge=bt("cli-live-error");if(ge.hidden||ge.dataset.read==="true")ge.dataset.read="true",re(ge,c(`无法同步 CLI 对话:${Re(W)}`,`Could not sync the CLI conversation: ${Re(W)}`))}}finally{if(E===X)E=void 0;if(te()&&(xe||A))Z(xe||50);G()}}async function oe(F,X){if(!F||T)return;T=X.action;let te=bt("cli-live-error");if(delete te.dataset.read,re(te),X.action!=="disconnect")re(bt("cli-live-receipt"));if(X.action==="disconnect")j();G();let xe;try{let W=await e.cliLiveAction(F,X);switch(X.action){case"connect":b=F,z(F,W),xe=o;break;case"disconnect":b="",L=!1,xe=kt("cli-live-connect");break;case"input":u.delete(F),d.delete(F),o.value="",re(bt("cli-live-receipt"),W.disposition==="held"?c("CLI 已暂存消息;请在 CLI 查看,勿重发。","The CLI is holding the message. Check the CLI and do not resend it."):W.disposition==="queued"?c("CLI 已将消息加入队列。","The CLI queued the message."):c("CLI 已接收消息。","The CLI accepted the message."));break;case"stop":re(bt("cli-live-receipt"),c("当前回合已停止。","The current turn stopped.")),xe=o;break}}catch(W){if(X.action==="input"&&(!(W instanceof Be)||W.status>=500||W.code==="terminal_outcome_unknown"))d.set(F,X.message);if(W instanceof Be&&$m.has(W.code))b="",L=!1;re(te,Re(W))}finally{if(T=void 0,!b&&(X.action==="disconnect"||X.action==="connect"))ne();if(G(),s.open)xe?.focus({preventScroll:!0});if(b)Z(0)}}return i.addEventListener("change",de),o.addEventListener("input",()=>{u.set(i.value,o.value),G()}),kt("cli-live-connect").addEventListener("click",()=>void oe(i.value,{action:"connect"})),kt("cli-live-disconnect").addEventListener("click",()=>void oe(b,{action:"disconnect"})),kt("cli-live-refresh").addEventListener("click",()=>{if(b)Z(0);else ae()}),kt("cli-live-stop").addEventListener("click",()=>{let F=C(B.turnId);if(F)oe(b,{action:"stop",expectedTurnId:F})}),kt("cli-live-branch").addEventListener("click",()=>{let F=p.find((X)=>X.id===b);if(F)n({...F,kind:"live"})}),ve("cli-live-form",HTMLFormElement).addEventListener("submit",(F)=>{if(F.preventDefault(),!kt("cli-live-send").disabled)oe(b,{action:"input",mode:"prompt",clientMessageId:crypto.randomUUID(),message:o.value})}),kt("cli-live-close").addEventListener("click",()=>s.close()),s.addEventListener("cancel",(F)=>{if(T)F.preventDefault()}),s.addEventListener("close",()=>{if(s.open)return;if(k?.abort(),k=void 0,j(),b)oe(b,{action:"disconnect"});if(K)t();K=!0}),{open(){if(s.open)return;if(s.showModal(),G(),!b)ae()},scopeChanged(){ne(),G()},closeAfterBranch(){K=!1,s.close()},invalidate(F){if(b&&b===F)Z()},setTransport(F){if(F===R)return;if(R=F,F!=="open")L=!1,j();else if(b)Z(0);else if(!g)ae();G()}}}var G5=2000,Fm=8000,K5={pending:c("正在查找 CLI 会话…","Looking for a CLI session…"),none:c("未发现可跟随的 CLI 会话。","No CLI session to follow."),ambiguous:c("有多个 CLI 会话,无法确认跟随哪一个。","Multiple CLI sessions were found. Could not determine which one to follow."),unavailable:c("无法核验 CLI 会话,暂不显示对话。","Could not verify the CLI session. The conversation is hidden.")};function V5(e,t){switch(e.status){case"none":return{status:"none"};case"ambiguous":return{status:"ambiguous"};case"ok":{let n=U(e.session),r=C(n.id),s=C(n.cwd),i=C(n.name);if(!r||!s||!t(s)||typeof n.name!=="string"||typeof n.running!=="boolean"||!Array.isArray(e.messages))return{status:"unavailable"};let o=U(e.transcript).status,a=[];for(let l of o==="unavailable"?[]:e.messages){let{role:u,content:d,timestamp:h,streaming:p}=U(l);if(u!=="user"&&u!=="assistant"&&u!=="custom"||typeof d!=="string")return{status:"unavailable"};a.push({role:u,content:d,timestamp:Ce(h),streaming:u==="assistant"&&p===!0})}return{status:"ok",target:{id:r,name:i||c("未命名 CLI 会话","Untitled CLI session"),cwd:s,running:n.running},messages:a,...o==="truncated"||o==="unavailable"?{history:o}:{}}}default:return{status:"unavailable"}}}function qm(e,t,n){let r=ve("cli-follow-view",HTMLElement),s=ve("cli-follow-status",HTMLElement),i=ve("cli-follow-empty",HTMLElement),o=new Wn(ve("cli-follow-messages",HTMLElement),r,i),a=new Map,l=!1,u,d="",h,p,g=[];function b(){g=[],o.reset(),i.hidden=!0}function x(A,D=!1,R){let L=A==="ok"?c(`只读跟随 · ${D?"CLI 正在运行":"CLI 未在运行"}`,`Following · Read-only · ${D?"CLI is running":"CLI is idle"}`):K5[A],B=R==="unavailable"?c(" · 对话记录暂不可读"," · Conversation history is unavailable"):R==="truncated"?c(" · 仅显示部分近期消息"," · Showing a limited set of recent messages"):"";if(s.dataset.state!==A)s.dataset.state=A;if(s.textContent!==L+B)s.textContent=L+B}function k(A){let D=u;if(A.status!=="ok"){if(u)b();if(u=void 0,x(A.status),D)n();return}u=A.target,d=u.cwd;let R=!D||D.id!==u.id||D.cwd!==u.cwd;if(R)b();x("ok",u.running,A.history);let L=new Map(g.map((H)=>[H.key,H])),B=new Set,O=A.messages.map((H,K)=>{let G=Pr(H)||`follow:${K}`,de=B.has(G)?`${G}:${K}`:G;B.add(de);let ne=L.get(de);return ne&&JSON.stringify(ne.message)===JSON.stringify(H)?ne:{key:de,message:H}});if(A.history&&O.length===0)b();else if(R||g.length!==O.length||O.some((H,K)=>H!==g[K])){g=O;let H=g.at(-1);o.render(g,H?.message.streaming===!0?H.key:"",a,R)}if(i.hidden=Boolean(A.history)||g.length>0,R||D?.name!==u.name)n()}function E(){clearTimeout(p),p=void 0,h?.abort(),h=void 0}async function T(){if(!l||document.hidden||h)return;let A=h=new AbortController,D=AbortSignal.any([A.signal,AbortSignal.timeout(Fm)]),R=performance.now()+Fm,L=()=>l&&!document.hidden&&h===A;try{let B=await e.request("/api/cli-follow",void 0,D).catch(()=>{return});if(L())k(!B||D.aborted||performance.now()>=R?{status:"unavailable"}:V5(B,t))}finally{if(h===A){if(h=void 0,l&&!document.hidden)p=window.setTimeout(()=>{p=void 0,T()},G5)}}}function _(){if(!l)return;l=!1,E(),u=void 0,d="",b(),n()}return document.addEventListener("visibilitychange",()=>{if(!l)return;if(document.hidden){if(E(),u)b(),u=void 0,n();x("pending")}else T()}),window.addEventListener("pagehide",_),{get active(){return l},get target(){return u},get workspace(){return d},start(){if(l)return;l=!0,x("pending"),n(),T()},stop:_,recheckWorkspace(){if(!d||t(d))return;d="",k({status:"unavailable"})}}}var Hm=1e4,Pm=(e)=>e instanceof DOMException&&e.name==="TimeoutError";function S0(e){return Array.isArray(e)?[...new Set(e.filter((t)=>typeof t==="string"&&Boolean(t)))]:[]}function Um(e,t,n,r){let s=ve("workspace-browser-button",HTMLButtonElement),i=ve("workspace-browser-dialog",HTMLDialogElement),o=ve("workspace-browser-close",HTMLButtonElement),a=ve("workspace-browser-form",HTMLFormElement),l=ve("workspace-browser-path",HTMLInputElement),u=ve("workspace-browser-use",HTMLButtonElement),d=ve("workspace-browser-navigation",HTMLElement),h=ve("workspace-browser-root-field",HTMLElement),p=ve("workspace-browser-root",HTMLSelectElement),g=ve("workspace-browser-up",HTMLButtonElement),b=ve("workspace-browser-current",HTMLElement),x=ve("workspace-browser-status",HTMLElement),k=ve("workspace-browser-entries",HTMLUListElement),E=ve("workspace-browser-feedback",HTMLElement),T=ve("workspace-browser-approval",HTMLElement),_=ve("workspace-browser-approval-title",HTMLElement),A=ve("workspace-browser-approval-path",HTMLElement),D=ve("workspace-browser-confirm",HTMLButtonElement),R=ve("workspace-browser-deny",HTMLButtonElement),L,B,O,H=0,K="",G;function de(q="",Y=!1){E.classList.toggle("error",Y),re(E,q)}function ne(){let q=B?.kind==="decision",Y=B?.kind==="prepare";d.hidden=Boolean(O),T.hidden=!O,A.textContent=O?.path??"",u.disabled=!l.value||Y||q,p.disabled=Y,g.disabled=!K||Y,o.setAttribute("aria-disabled",String(q)),D.setAttribute("aria-disabled",String(q)),R.setAttribute("aria-disabled",String(q))}function ae(q){if(clearTimeout(H),O=q,q)H=window.setTimeout(()=>{if(O===q&&B?.kind!=="decision")z()},q.expiresAt-Date.now());ne()}function z(){ae(),de(c("审批已过期。请重新选择「使用此目录」,发起新的审批。","Approval expired. Choose “Use this directory” to request approval again."),!0),u.focus()}function j(){let q=B;B=void 0,q?.controller.abort()}async function Z(q,Y,ue,le,be){if(!i.open||B?.kind==="decision"||!L)return;j();let Ae={kind:q,controller:new AbortController};B=Ae,ne();let He=performance.now()+Hm,Ne=AbortSignal.any([Ae.controller.signal,AbortSignal.timeout(Hm)]),Pe;try{let mt=new Promise((Te,Mr)=>{Pe=()=>Mr(Ne.reason),Ne.addEventListener("abort",Pe,{once:!0})}),Dn=await Promise.race([e.request(`/api/workspaces/${Y}`,ue,Ne),mt]);if(B!==Ae||!i.open||Ae.controller.signal.aborted)return;if(Ne.throwIfAborted(),performance.now()>=He)throw new DOMException("Workspace request timed out","TimeoutError");B=void 0,ne(),le(Dn)}catch(mt){if(B!==Ae&&B!==void 0||!i.open||Ae.controller.signal.aborted)return;B=void 0,ne(),be(mt)}finally{if(Pe)Ne.removeEventListener("abort",Pe)}}function Q(q=""){K="",b.textContent=q,b.hidden=!q,k.replaceChildren(),k.hidden=!0}function oe(q,Y=!0){if(!q||O||B?.kind==="prepare"||!i.open)return;if(l.value=q,Y)b.textContent=q,b.hidden=!1,b.focus({preventScroll:!0});Q(q),de(),x.textContent=c("正在读取目录…","Reading directory…"),Z("browse","browse",{path:q},(ue)=>{let le=C(ue.path);if(!le||!Array.isArray(ue.entries))throw Error("Invalid browse response");K=C(ue.parent),b.textContent=le,l.value=le,p.value=t().roots.includes(le)?le:"";for(let be of ue.entries){let{name:Ae,path:He,kind:Ne}=U(be);if(typeof Ae!=="string"||!Ae||typeof He!=="string"||!He)continue;if(Ne!=="directory"&&Ne!=="file")continue;let Pe=y("li"),mt=Ne==="directory"?Ue("",()=>oe(He),"button--quiet workspace-entry"):y("div","workspace-entry");mt.append(y("bdi","break",Ae),y("span","small muted",Ne==="directory"?c("目录 ›","Folder ›"):c("文件","File"))),Pe.append(mt),k.append(Pe)}k.hidden=!k.childElementCount,x.textContent=ue.truncated===!0?c("目录条目太多,仅显示部分名称。","This directory has too many entries to show them all."):k.hidden?c("没有可显示的条目。","No entries to show."):"",ne()},(ue)=>{x.textContent="",p.value="",de(Pm(ue)?c("读取目录超时。请重新选择一个已授权工作区。","Reading the directory timed out. Choose an authorized directory and try again."):c("无法读取该目录。只能浏览已授权范围内仍可访问的目录。","Could not read this directory. You can only browse accessible directories within authorized locations."),!0)})}function F(q){let Y=C(q.path),ue=S0(q.workspaces);if(!Y||!ue.includes(Y))throw Error("Invalid workspace selection receipt");let le=G===void 0;G=void 0,i.close(),n(Y,ue,le)}function X(q){if(!q||O||B?.kind==="prepare")return;if(B?.kind==="browse")x.textContent=c("目录读取已取消。","Directory read canceled.");de(c("正在核验目录…","Verifying directory…")),Z("prepare","prepare",{path:q},(Y)=>{if(Y.status==="authorized"){F(Y);return}let ue=C(Y.path),le=C(Y.confirmation),be=Ce(Y.expiresAt);if(Y.status!=="confirmation_required"||!ue||!le||be===void 0)throw Error("Invalid approval response");if(l.value=ue,be<=Date.now()){z();return}de(),ae({token:le,path:ue,expiresAt:be}),_.focus()},(Y)=>{de(Pm(Y)?c("核验目录超时。路径已保留,请重试。","Directory verification timed out. The path is still in the field. Try again."):c("无法核验目录。请检查绝对路径、目录是否仍存在及本机 Web 服务是否可用。","Could not verify the directory. Check the absolute path, whether the directory still exists, and whether the local Web server is running."),!0)})}function te(q,Y=!1){if(!O||B?.kind==="decision")return;let{token:ue,expiresAt:le}=O;if(le<=Date.now()){z();return}clearTimeout(H),de(q?c("正在提交允许决定…","Granting access…"):c("正在提交拒绝决定…","Denying access…")),Z("decision","confirm",{confirmation:ue,allow:q},(be)=>{if(q){F(be);return}if(be.status!=="cancelled")throw Error("Invalid denial receipt");if(ae(),Y)i.close();else de(c("已拒绝。工作区未切换。","Access denied. The selected directory did not change.")),u.focus()},(be)=>{ae();let Ae=be instanceof Be&&(be.code==="workspace_confirmation_stale"||be.status===410);de(Ae?c("审批已失效:可能已过期或目录已变更。请重新核验路径。","Approval expired or the directory changed. Verify the path again."):c("未能确认审批结果,未切换工作区。请重新核验路径。","Could not confirm the approval result. The selected directory did not change. Verify the path again."),!0),u.focus()})}function xe(){if(B?.kind==="decision")return;if(O)te(!1,!0);else j(),i.close()}function W(){let{roots:q}=t(),Y=p.value;p.replaceChildren(ot(c("选择已授权工作区","Choose an authorized directory"),""),...q.map((ue)=>ot(ue,ue))),p.value=q.includes(Y)?Y:"",h.hidden=!q.length}function ge(q){if(!L||document.querySelector("dialog:modal"))return!1;G=q,j(),ae(),de();let{roots:Y,selected:ue}=t(),le=Y.includes(ue)?ue:Y[0]??"";if(W(),p.value=le,l.value=le,x.textContent=le?"":c("没有已授权目录。可手动输入目录的绝对路径。","No directories are authorized. Enter an absolute directory path."),Q(),ne(),i.showModal(),le)oe(le,!1);return!0}return s.addEventListener("click",()=>ge()),a.addEventListener("submit",(q)=>{q.preventDefault(),X(l.value)}),l.addEventListener("input",()=>{if(B?.kind==="browse"||B?.kind==="prepare"){if(B.kind==="browse")x.textContent=c("目录读取已取消。","Directory read canceled.");j()}de(),ne()}),p.addEventListener("change",()=>oe(p.value)),g.addEventListener("click",()=>oe(K)),D.addEventListener("click",()=>te(!0)),R.addEventListener("click",()=>te(!1)),o.addEventListener("click",xe),i.addEventListener("cancel",(q)=>{q.preventDefault(),xe()}),i.addEventListener("close",()=>{if(i.open)return;j(),ae(),de(),Q();let q=G??r;if(G=void 0,!document.querySelector("dialog:modal"))q?.()}),{open:ge,update(q,Y){let ue=U(q).platform,le=ue==="win32"||ue==="posix"?ue:void 0,be=L!==le||Y;if(L=le,s.hidden=!L,l.placeholder=L==="win32"?"C:\\Projects\\OmO":"/home/me/projects/OmO",!i.open)return;if(!L)j(),i.close();else{if(W(),!be)return;j(),ae(),Q(),x.textContent="",de(c("本机 Web 服务连接已更新。请重新选择或核验目录。","The local Web server connection changed. Choose a directory or verify the path again."),!0),l.focus()}}}}var Wm=["scoped-models","favorite-models","task-kill","login","logout","trust","export","import","share","reload","keybindings","changelog","quit","exit","bug","debug"];var Km=120,Vm=6000,Jo=Km.toLocaleString(me),Zo=Vm.toLocaleString(me),T0=[{name:"new",invocation:"/new",label:c("新会话","New session"),description:c("开始一个新会话。","Start a new session.")},{name:"resume",invocation:"/resume",label:c("继续会话","Resume session"),description:c("从历史会话中选择一个继续。","Choose a past session to resume.")},{name:"sessions",invocation:"/sessions",label:c("会话列表","Session list"),description:c("列出历史会话并继续其中一个。","Browse and resume past sessions.")},{name:"rename",invocation:"/rename",label:c("重命名","Rename"),description:c(`重命名当前会话(名称可选,最长 ${Jo} 字)。`,`Rename the current session. The name is optional and can be up to ${Jo} characters.`)},{name:"name",invocation:"/name",label:c("重命名(别名)","Rename (alias)"),description:c("与 /rename 相同:设置会话显示名。","Alias for /rename. Set the session's display name.")},{name:"session",invocation:"/session",label:c("会话信息","Session info"),description:c("查看当前会话的信息与统计。","View details and statistics for this session.")},{name:"tree",invocation:"/tree",label:c("会话树","Session tree"),description:c("查看会话分支树并跳到任意点继续。","Browse session branches and resume from any point.")},{name:"todo",invocation:"/todo",label:c("本会话待办","Session Todo"),description:c("查看当前分支的待办。","View the Todo list for the current branch.")},{name:"tasks",invocation:"/tasks",label:c("本会话任务","Session tasks"),description:c("查看当前会话的原生子代理任务。","View native subagent tasks for this session.")},{name:"dag",invocation:"/dag",label:c("本会话 DAG","Session DAG"),description:c("查看本会话的运行,展开读取波次和依赖。","View workflow runs and expand them to inspect execution waves and dependencies.")},{name:"help",invocation:"/help",label:c("命令帮助","Command help"),description:c("查看 Web 可用的命令和快捷键。","See which commands and keyboard shortcuts are available on the web.")},{name:"hotkeys",invocation:"/hotkeys",label:c("快捷键","Keyboard shortcuts"),description:c("查看此工作台的键盘操作。","View keyboard shortcuts for the workbench.")},{name:"fork",invocation:"/fork",label:c("分支","Fork"),description:c("选择一条用户消息,从该消息之前创建分支。","Choose a user message and start a branch from just before it.")},{name:"clone",invocation:"/clone",label:c("副本","Clone"),description:c("复制当前会话为新会话并切换过去。","Copy the current session and switch to the copy.")},{name:"compact",invocation:"/compact",label:c("压缩上下文","Compact context"),description:c(`手动压缩上下文(指示可选,最长 ${Zo} 字)。`,`Compact context manually. Optional instructions can be up to ${Zo} characters.`)},{name:"settings",invocation:"/settings",label:c("会话设置","Session settings"),description:c("打开当前会话的运行设置;全局配置请在本机终端修改。","Open this session's run settings. Change global configuration in the local terminal.")},{name:"setting",invocation:"/setting",label:c("会话设置(别名)","Session settings (alias)"),description:c("与 /settings 相同。","Alias for /settings.")},{name:"model",invocation:"/model",label:c("模型","Model"),description:c("切换本会话的模型(只对当前会话有效)。","Change the model for this session only.")},{name:"thinking",invocation:"/thinking",label:c("思考档位","Thinking level"),description:c("设置思考档位(可选;档位按实际可选值校验)。","Set a thinking level. If specified, it must be one of the available levels.")},{name:"reasoning",invocation:"/reasoning",label:c("推理状态","Reasoning status"),description:c("查看当前模型是否启用推理。持久设置在本机修改。","Check whether reasoning is enabled for the current model. Change persistent settings in the native client.")},{name:"efforts",invocation:"/efforts",label:c("原生推理档位","Native reasoning levels"),description:c("查看当前档和原生可用档位。持久设置在本机修改。","View the current level and available native levels. Change persistent settings in the native client.")},{name:"fast",invocation:"/fast",label:c("极速模式","Fast mode"),description:c("切换极速模式(开、关或不带参数切换;只影响当前模型)。","Set fast mode to on or off, or omit the argument to toggle it. Applies only to the current model.")},{name:"copy",invocation:"/copy",label:c("复制","Copy"),description:c("复制上一条助手消息。","Copy the last assistant message.")}],J5=T0.map((e)=>e.name);function Jm(e){let t=_s(e);return t.kind==="builtin"&&["session","tree","todo","tasks","dag","help","hotkeys","reasoning","efforts","settings","setting"].includes(t.command.name)}var Z5=/^\/[A-Za-z][A-Za-z0-9_-]*/,jm=/[\0-\b\v\f\x0e-\x1f\x7f]/,Y5=/^[A-Za-z0-9_./:@+-]+$/,Gm=c("命令只能是单行文本,不能包含换行或控制字符。","Commands must be on one line and cannot contain control characters."),Gn=(e)=>({kind:"malformed",message:e});function _s(e){let t=Z5.exec(e)?.[0];if(t===void 0)return{kind:"plain"};let n=e.slice(t.length),r=t.slice(1),s=J5.find((a)=>a===r),i=Wm.find((a)=>a===r);if(s===void 0&&i===void 0)return{kind:"plain"};if(n!==""&&!/^[ \t\r\n]/.test(n))return jm.test(n[0])?Gn(Gm):{kind:"plain"};if(jm.test(e)||e.includes("\r")||e.includes(`
|
|
300
|
-
`))return Gn(Gm);if(i!==void 0)return{kind:"tui-only",name:i};let o=n.trim();switch(s){case"new":case"resume":case"sessions":case"session":case"tree":case"todo":case"tasks":case"dag":case"help":case"hotkeys":case"fork":case"clone":case"copy":case"settings":case"setting":if(o!=="")return Gn(c(`“/${s}”不带参数。`,`/${s} does not take arguments.`));return{kind:"builtin",command:{name:s}};case"reasoning":case"efforts":return o===""?{kind:"builtin",command:{name:s}}:{kind:"tui-only",name:s};case"rename":case"name":if(o.length>Km)return Gn(c(`会话名称不能超过 ${Jo} 字。`,`Session names can be up to ${Jo} characters.`));return{kind:"builtin",command:{name:s,...o===""?{}:{value:o}}};case"compact":if(o.length>Vm)return Gn(c(`压缩指示不能超过 ${Zo} 字。`,`Compaction instructions can be up to ${Zo} characters.`));if(o==="")return{kind:"builtin",command:{name:"compact"}};return{kind:"builtin",command:{name:"compact",instructions:o}};case"model":if(o==="")return{kind:"builtin",command:{name:"model"}};if(/(^|\s)--\S/.test(o))return Gn(c("Web 只接受精确模型引用,不支持 --default 等持久化参数。","The web app accepts exact model references only. Persistent flags such as --default are not supported."));if(!Y5.test(o))return Gn(c("模型引用只能是单个精确引用(如 provider/model)。","Enter one exact model reference, such as provider/model."));return{kind:"builtin",command:{name:"model",reference:o}};case"thinking":if(o==="")return{kind:"builtin",command:{name:"thinking"}};if(!/^[^\s]+$/.test(o))return Gn(c("请输入单个思考档位,例如 high。","Enter a single thinking level, such as high."));return{kind:"builtin",command:{name:"thinking",level:o.toLowerCase()}};case"fast":{if(o==="")return{kind:"builtin",command:{name:"fast"}};let a=o.toLowerCase();return a==="on"||a==="off"?{kind:"builtin",command:{name:s,mode:a}}:Gn(c("“/fast”只接受 on、off 或无参数(切换)。","Use /fast on, /fast off, or /fast to toggle."))}default:return{kind:"plain"}}}var Kr=/^(?:\/(?:[A-Za-z0-9_-]{1,64}|skill:[A-Za-z0-9-]{1,64})|\$[A-Za-z0-9-]{1,64})$/,X5=/^(?:\/(?:[A-Za-z0-9_-]{0,64}|skill:[A-Za-z0-9-]{0,64})|\$[A-Za-z0-9-]{0,64})$/;function Yo(e){return[...T0.map((t)=>({...t,source:"builtin"})),...we(e).map(U).filter((t)=>_s(C(t.invocation)).kind==="plain")]}function Zm(e,t){let n=[],r=-1,s,i=!1;function o(){n=[],r=-1,t.hidden=!0,e.removeAttribute("aria-activedescendant")}function a(l){let u=n[l];if(!u)return;e.value=`${u.invocation} `,e.focus(),e.setSelectionRange(e.value.length,e.value.length),o(),e.dispatchEvent(new Event("input",{bubbles:!0}))}return e.addEventListener("compositionstart",()=>{i=!0,o()}),e.addEventListener("compositionend",()=>{i=!1}),e.addEventListener("blur",o),t.addEventListener("mousedown",(l)=>l.preventDefault()),t.addEventListener("click",(l)=>{let u=l.target;if(!(u instanceof Element))return;let d=Array.from(t.children).findIndex((h)=>h.contains(u));a(d)}),{get composing(){return i},reset(){s=void 0,o()},render(l,u){let d=e.value;if(s!==d)s=void 0;if(!u||i||s===d||document.activeElement!==e||!X5.test(d)||e.selectionStart!==d.length||e.selectionEnd!==d.length){o();return}let h=d.startsWith("$")||d.startsWith("/skill:"),p=d.toLowerCase().replace(/^\/skill:/,"$"),g=new Map;for(let x of Yo(l)){let k=C(x.invocation);if(!Kr.test(k)||k.startsWith("$")!==h)continue;if(k.toLowerCase().startsWith(p)&&!g.has(k))g.set(k,{invocation:k,description:C(x.description)})}let b=[...g.values()].sort((x,k)=>Number(k.invocation===p)-Number(x.invocation===p)||x.invocation.localeCompare(k.invocation));if(!b.length){o();return}if(b.length===n.length&&b.every((x,k)=>x.invocation===n[k]?.invocation&&x.description===n[k]?.description))return;n=b,r=-1,e.removeAttribute("aria-activedescendant"),t.replaceChildren(...b.map((x,k)=>{let E=y("li");return E.id=`inline-command-${k}`,E.setAttribute("role","option"),E.setAttribute("aria-selected","false"),E.append(y("code","",x.invocation),y("span","small muted",x.description)),E})),t.hidden=!1,t.scrollTop=0},key(l){if(i||t.hidden||!vi(l))return!1;switch(l.key){case"Escape":s=e.value,o();break;case"ArrowDown":case"ArrowUp":case"PageDown":case"PageUp":{let u=yi(l.key,r,t.children,t);if(u===void 0)return!1;t.children[r]?.setAttribute("aria-selected","false"),r=u;let d=t.children[r];d.setAttribute("aria-selected","true"),e.setAttribute("aria-activedescendant",d.id),ki(t,d);break}case"Enter":case"Tab":if(r<0)return!1;a(r);break;default:return!1}return l.preventDefault(),!0}}}uc();var P=(e)=>ve(e,HTMLElement),V=(e)=>ve(e,HTMLButtonElement),Ge=(e)=>ve(e,HTMLSelectElement),Ut=(e)=>ve(e,HTMLInputElement),Qo=(e)=>ve(e,HTMLFormElement),Rn=(e)=>ve(e,HTMLDialogElement),Fe=new Aa,zs=new Wn(P("messages"),P("transcript"),P("no-messages")),yr=y("p","notice small");yr.id="transcript-status";yr.setAttribute("role","status");yr.hidden=!0;Qo("composer").prepend(yr);var Di=new Ca(P("interactions")),sa=P("session-trace"),Ss={user:V("trace-jump-user"),assistant:V("trace-jump-assistant"),tool:V("trace-jump-tool"),request:V("jump-to-request")},Ts=new Map,Ke=ve("prompt",HTMLTextAreaElement),Ci=Zm(Ke,P("inline-commands")),Vn=Ge("prompt-mode"),Jn=Ge("model"),ea=Ge("thinking"),Xn=y("button","button button--quiet",c("应用模型","Apply model"));Xn.id="apply-model";Xn.type="button";Xn.hidden=!0;var Sn=y("p","small muted sr-only");Sn.id="model-preview";Sn.setAttribute("role","status");Sn.hidden=!0;Jn.setAttribute("aria-describedby",Sn.id);ea.setAttribute("aria-describedby",Sn.id);Jn.parentElement?.after(Xn);var Ds=P("compose-options"),B0=Ds.parentElement,kr=V("compose-options-button"),op=y("div","row compose-selectors");op.append(...Ds.children);var ap=y("div","stack stack--tight");ap.append(op,Sn);Ds.append(ap);var Ls=Rn("new-dialog"),Ye=Rn("manage-dialog"),Ee=Rn("details-dialog"),jt=Rn("command-dialog"),_i=Rn("branch-dialog"),an=gi,R0={explicit:c("显式指定","Selected"),session:c("会话内记录","Session"),global:c("设备记忆","Saved on this device"),"model-default":c("模型默认","Model default"),default:c("默认设置","Default"),fallback:c("回退档位","Fallback"),clamped:c("按模型能力调整","Adjusted for this model")},M0={ask:c("审批:询问","Ask first"),auto:c("审批:Auto","Auto"),"full-access":c("审批:无审批","No approval")},Ym=[["ask",M0.ask],["auto",M0.auto],["full-access",M0["full-access"]]],N,V0=Zh(Fe,()=>Ee.open&&N?.status==="ready"?N.session.id:void 0),wt={},Li={},it="connecting",Xt="waiting",Tt=!1,Ii=!1,ia=!1,Yr="",Ni="",_r=new Map,yt=[],O0=0,ta=!1,Gt="",Er="",tn=(e)=>yt.includes(e),Q5=(e)=>tn(e)&&(!Gt||e===Gt),Si="omo-web-language-return-session",Tn=!1,En,Ti=0,e6=2000,t6=2000,Zr=0,Ar,D0=0,Bi=0,$0=0,Cn,Ri=!1,An=!1,Xm="omo-web-navigation-collapsed",J0="omo-web-desktop-inspector",wr=!1,Oi=!0,Ot=new Set,nr=new Set,z0=new Map,Oe=new Map,Is=matchMedia("(max-width: 760px)"),Ns=matchMedia("(max-width: 1000px)"),Qm=matchMedia("(prefers-color-scheme: dark)"),L0=new Intl.NumberFormat(me),n6=new Intl.NumberFormat(me,{maximumFractionDigits:2}),Z0=(e)=>V(Is.matches?"open-navigation":wr?"rail-toggle":e).focus(),r6=um(Fe,up),Y0=(e)=>{if(_i.open)return;_i.dataset.sourceKind=e.kind,r6(e)},ht=qm(Fe,tn,()=>{if(ht.active)N?.history?.invalidate();if(er(),Me(),N?.history)Bs(N)}),Fs=zm(Fe,()=>Z0("cli-live-button"),Y0,tn),lp=Um(Fe,()=>({roots:yt,selected:Er||N?.session.cwd||Gt}),l6,()=>{if(Is.matches&&!An)V("open-navigation").focus();else if(V("workspace-browser-button").hidden)Ut("search").focus();else V("workspace-browser-button").focus()}),oa=!1,Vr="cli-history-button";function ep(e,t){if(oa=!0,Rn("cli-history-dialog").close(),Tn=e.archived,Gt&&Gt!==e.cwd)hp("");Pi(e.id,t)}var Hi=Om(Fe,{scope:()=>({paths:yt,browse:!V("workspace-browser-button").hidden}),directoryLabel:zi,bookmarks:()=>_r.values(),onDirectory:(e)=>{Er=e},browse:(e)=>lp.open(e),onClose:()=>{if(!oa&&!document.querySelector("dialog:modal"))if(Vr==="prompt"&&Ke.getClientRects().length)Ke.focus();else Z0(Vr==="workspace-browser-button"&&!V(Vr).hidden?Vr:"cli-history-button");Vr="cli-history-button",oa=!1},openBookmark:(e)=>ep(e,!1),openBranch:Y0,resumeUnavailable:s6,onResumed:(e,t)=>{if(!tn(e.cwd))return;if(Oe.get(e.id)?.status==="pending"&&N?.session.id===e.id)ha(N);if(Oe.delete(e.id),sr(e),t)ep(e,!0)}});function Ei(e){switch(e){case"engine_offline":return c("本机引擎未连接。","The local engine is offline.");case"shared_transport":return c("切换到 CLI 需要私有本机连接。","Switching to the CLI requires a private local connection.");case"missing_capability":return c("此 OmO 版本不支持换端。","This version of OmO does not support handoff.");case"profile_mismatch":return c("本机引擎与 CLI 会话使用不同配置。","The local engine and the CLI session use different profiles.");case"session_busy":return c("等本轮结束后再换端。","Wait for this turn to finish before switching.");case"dialog_pending":return c("先处理会话中的待答事项。","Answer the pending request before switching.");default:return c("这个会话暂时无法换端。","This session cannot be switched right now.")}}function s6(){if(it!=="online")return c("连接断开,只能浏览记录。","Offline. You can still browse the history.");return Li.supported===!0?"":Ei(Li.reason)}function cp(e){if(!e.session.active||e.status!=="ready")return c("先恢复此会话。","Resume this session first.");if(it!=="online")return c("连接断开,无法换端。","Reconnect before switching.");if(Li.supported!==!0)return Ei(Li.reason);if(e.running||e.compacting)return Ei("session_busy");if(e.requests.size)return Ei("dialog_pending");if(e.queue)return c("等队列里的消息发送后再换端。","Wait for queued messages to finish before switching.");if(e.handoff.eligible!==!0)return Ei(e.handoff.reason);if(Ot.has(e.session.id)||nr.has(e.session.id))return c("正在提交,请稍候。","Submitting…");return""}function ha(e){if($i(e),e.optionSync++,e.snapshotRequestChanges=void 0,e.status="inactive",e.running=!1,e.compacting=!1,e.workbench=void 0,e.generationSpeed=void 0,e===N)Cn?.abort()}function $i(e){if(ma(e),e.sync++,e.revision++,e.transcriptRefresh=e.stateRefresh=void 0,e.pendingStateUnknown=e.refreshScheduled=void 0,e.messages=[],e.liveKey="",e.liveMessageKeys.clear(),e.tools.clear(),e.transcript="unavailable",e===N)zs.reset()}function ma(e){e.historyEpoch++,e.history?.invalidate(),e.history=void 0}function pa(e){let t=Boolean(e.history);if(ma(e),e===N)E6();if(t)e.messages=[],e.liveMessageKeys.clear(),e.transcript="unavailable",zs.reset()}function up(e,t,n){if(!yt.includes(e.cwd))return;if(n.kind==="live")Fs.closeAfterBranch();if(n.kind==="history")oa=!0,Rn("cli-history-dialog").close();Tn=!1,Ve(e.id).text=t,sr(e),Pi(e.id,!0)}function Ve(e){let t=z0.get(e);if(!t)t={text:"",mode:"prompt",images:[],reading:0,error:"",commandMode:!1,commandText:"",commandError:""},z0.set(e,t);return t}function dp(e){return _s(e).kind!=="plain"||Kr.test(e.split(/\s/,1)[0]??"")}function i6(){let e=Ge("theme");try{let n=localStorage.getItem("omo-web-theme");if(n==="dark"||n==="light")e.value=n}catch(n){if(!(n instanceof DOMException))throw n}let t=()=>{document.documentElement.dataset.theme=e.value==="system"?Qm.matches?"dark":"light":e.value};e.addEventListener("change",()=>{t();try{localStorage.setItem("omo-web-theme",e.value)}catch(n){if(!(n instanceof DOMException))throw n}}),Qm.addEventListener("change",t),t()}function o6(){let e=Ge("language-select"),t=P("language-feedback");e.value=me,e.addEventListener("change",()=>{let n=e.value;if(n!=="en"&&n!=="zh-CN"||n===me)return;let r=(i)=>{e.value=me,re(t,i)};if([...z0.values()].some((i)=>i.text||i.commandText||i.images.length||i.reading)){r(c("发送或清空草稿后,再切换语言。","Send or clear your drafts before changing the language."));return}if(Ri||nr.size||Ot.size||N?.requests.size){r(c("先完成当前操作,再切换语言。","Finish the current action before changing the language."));return}if(ht.active){r(c("退出 CLI 跟随后,再切换语言。","Stop following the CLI before changing the language."));return}let s=N?.session.id;try{if(s)sessionStorage.setItem(Si,s);else sessionStorage.removeItem(Si)}catch{if(s){r(c("浏览器无法保留当前会话。关闭此会话页面后再切换语言。","The browser could not preserve this session. Change the language from the start screen."));return}}if(!cc(n)){try{sessionStorage.removeItem(Si)}catch{}r(c("浏览器无法保存语言设置。","The browser could not save your language setting."));return}location.reload()})}function a6(){let e;try{e=sessionStorage.getItem(Si),sessionStorage.removeItem(Si)}catch{return}let t=e?_r.get(e):void 0;if(!t||!tn(t.cwd))return;Tn=t.archived,Pi(t.id,!1,!1)}function tp(e){try{return localStorage.getItem(e)}catch(t){if(!(t instanceof DOMException))throw t;return null}}function X0(e,t){try{localStorage.setItem(e,t)}catch(n){if(!(n instanceof DOMException))throw n}}function np(){P("workspace-shell").toggleAttribute("data-rail-collapsed",wr);let e=V("rail-toggle");e.setAttribute("aria-expanded",String(!wr));let t=wr?c("展开会话导航","Expand sessions"):c("收起会话导航","Collapse sessions");e.setAttribute("aria-label",t),e.title=t}function xn(e,t=!1){if(An=e&&Is.matches,P("navigation").classList.toggle("is-open",An),P("nav-scrim").hidden=!An,P("conversation").inert=An,P("skip-link").inert=An,V("open-navigation").setAttribute("aria-expanded",String(An)),An)Ut("search").focus();else if(t&&Is.matches)V("open-navigation").focus()}function rr(){Fs.setTransport(Xt);let e=it==="online";it=Yr||wt.online===!1||Xt==="lost"?"offline":Ii&&Xt==="open"&&!Tt&&wt.online===!0?"online":"connecting",P("connection").dataset.state=it,P("connection-label").textContent={online:c("本机已连接","Connected"),offline:c("连接不可用","Offline"),connecting:c("正在连接","Connecting")}[it];let t=C(wt.version);re(P("engine-version"),t&&c(`引擎 ${t}`,`Engine ${t}`));let n=Yr||(wt.online===!1?C(wt.error)||c("Senpi 引擎未连接。检查引擎后再重连。","The Senpi engine is offline. Check it and reconnect."):Xt==="lost"?c("实时连接已断开。正在重连,草稿会保留。","Connection lost. Reconnecting; your drafts are kept."):Ni);P("banner").toggleAttribute("data-unprotected",ia),P("access-warning").hidden=!ia,V("retry").hidden=!n,re(P("banner-text"),n);let r=it==="online"&&Boolean(yt.length);if(V("new-sidebar").disabled=!r,V("new-welcome").disabled=!r,P("welcome-copy").textContent=Ii&&!yt.length?V("workspace-browser-button").hidden?c("没有可用目录。请检查 OmO Web 的启动配置。","No directories are available. Check your OmO Web startup settings."):c("还没有可用目录。打开侧栏的「目录」添加。","No directories yet. Open Directories in the sidebar to add one."):c("从列表打开会话,或选个目录开始新会话。","Open a session from the list, or choose a directory to start a new one."),V("create").disabled=!r||Ri,Hi.update(),er(),Me(),N?.history)Bs(N);if(!e&&it==="online"&&N&&(N.stateRefresh||N.transcriptRefresh))vt(N)}function fp(e){if(_r=new Map(e.map((t)=>[t.id,t])),N){let t=_r.get(N.session.id);if(t&&t.cwd!==N.session.cwd)$i(N);if(N.session=t??N.session,!yt.includes(N.session.cwd))ec();else if(!N.session.active&&N.status==="ready"&&Oe.get(N.session.id)?.status!=="pending"){if(ha(N),Ye.open)Ye.close()}}er(),Me()}function sr(e){if(Bi++,_r.set(e.id,e),N?.session.id===e.id)N.session=e;er()}async function Xr(){let e=++D0,t=Bi;try{let n=await Fe.request("/api/sessions");if(e!==D0||t!==Bi)return;Ni="",fp(xa(n))}catch(n){if(e===D0)Ni=c(`无法读取会话列表:${Re(n)}`,`Couldn't load sessions: ${Re(n)}`)}rr()}function zi(e){let t=(r)=>ta?r.replaceAll("\\","/"):r,n=t(e).split("/").filter(Boolean);if(ta&&n.length===1)return e;for(let r=1;r<=n.length;r++){let s=n.slice(-r).join("/");if(!yt.some((i)=>i!==e&&t(i).endsWith(`/${s}`)))return ta?s.replaceAll("/","\\"):s}return e}function Q0(){let e=Ge("workspace-select"),t=c("所有目录","All directories");aa(e,yt.map((n)=>[n,zi(n)]),Gt,t),e.title=Gt||t,P("workspace-field").hidden=yt.length<2}function ec(){if(N)ma(N);if(N=void 0,Ar?.(),clearTimeout($0),zs.reset(),Di.reset(),Ke.value="",qs(),Ye.open)Ye.close();if(Rr(!1),Yn(!1),jt.open)xr?.abort(),jt.close();if(_i.open&&_i.dataset.sourceKind==="web")_i.close()}function hp(e){if(e&&!tn(e))return;Gt=e,Q0(),er()}function l6(e,t,n){if(O0++,yt=t,Er=tn(e)?e:"",Gt&&!tn(Gt))Gt="";if(N&&!tn(N.session.cwd))ec();if(ht.recheckWorkspace(),Q0(),Fs.scopeChanged(),Hi.scopeChanged(),n)Vr="workspace-browser-button";oc(e),Xr(),rr()}async function Qn(e=!1){let t=++Zr;Ar?.();let n=Bi,r=O0;try{let s=await Fe.request("/api/bootstrap");if(t!==Zr)return;let i=C(s.token),o=i!==Fe.token;if(o&&N)pa(N);Fe.token=i,wt=U(s.engine),ia=s.unprotected===!0,Li=U(s.handoff);let a=U(s.fileBrowser);if(ta=a.platform==="win32",r===O0||o)yt=S0(s.workspaces);let l=!Ii;if(Gt&&!tn(Gt))Gt="";if(Er&&!tn(Er))Er="";if(lp.update(a,o),Hi.scopeChanged(o),N&&!yt.includes(N.session.cwd))ec();if(ht.recheckWorkspace(),Q0(),Fs.scopeChanged(),Ii=!0,Yr="",Ni="",n===Bi)fp(xa(s));if(!En)pp();if(l)a6();let u=N&&Oe.get(N.session.id);if(e&&Tt==="transport"){if(it==="offline"&&Xt==="open"&&wt.online===!0)rr();await c6(t)}else if(e&&N&&(!u||u.status==="failed")){if(!N.session.active&&N.status!=="loading"&&wt.online===!0)N.status="inactive",N.error="";else if(N.session.active&&wt.online===!0){let d=N;if(await rs(d),d===N)Sr(d)}}}catch(s){if(t===Zr)Yr=c(`无法连接本机 Web 服务:${Re(s)}`,`Couldn't connect to OmO Web: ${Re(s)}`)}if(t!==Zr)return;if(Tt!=="transport"||Xt==="open"&&wt.online===!0&&!Yr)Tt=!1;rr()}async function c6(e){let t=()=>e===Zr&&Tt==="transport"&&Xt==="open"&&wt.online===!0;while(t()){let n=N;if(!n?.session.active)return;let r=Oe.get(n.session.id);if(r&&r.status!=="failed")return;let s=Promise.withResolvers();Ar=s.resolve;let i;try{let o=await Promise.race([n.pendingSnapshot??rs(n,!1,!0),s.promise]);if(t()&&n===N&&Oe.get(n.session.id)===r&&o===n.sync){Sr(n);return}}catch(o){if(!(o instanceof Be||o instanceof TypeError))throw o;if(t()&&n===N&&Oe.get(n.session.id)===r)i=window.setTimeout(s.resolve,t6),await s.promise}finally{if(clearTimeout(i),Ar===s.resolve)Ar=void 0}}}function er(){let e=Ut("search").value.trim().toLocaleLowerCase(),t=P("session-list"),n=document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)?document.activeElement.dataset.session:void 0,r=[..._r.values()].filter((l)=>Q5(l.cwd)&&l.archived===Tn&&(!e||`${l.name} ${l.cwd}`.toLocaleLowerCase().includes(e))).sort((l,u)=>u.updatedAt-l.updatedAt),s=new Map;for(let l of r){let u=s.get(l.cwd);if(u)u.push(l);else s.set(l.cwd,[l])}let i=new Map([...t.querySelectorAll(":scope > .session-group")].map((l)=>[l.dataset.cwd,l])),o=new Map([...t.querySelectorAll("li[data-session]")].map((l)=>[l.dataset.session,l])),a=t.firstElementChild;for(let[l,u]of[...s].sort(([d],[h])=>d.localeCompare(h))){let d=i.get(l)??y("section","session-group"),h=d.querySelector("h2")??y("h2","session-group-heading"),p=d.querySelector("p")??y("p","small muted path session-group-path",l),g=d.querySelector("ul")??y("ul"),b=zi(l);if(h.textContent!==b)h.textContent=b;if(p.hidden=b===l,!d.isConnected)d.dataset.cwd=l,p.dir="ltr",p.title=l,d.append(h,p,g);if(d!==a)t.insertBefore(d,a);a=d.nextElementSibling,i.delete(l);let x=g.firstElementChild;for(let k of u){let E=o.get(k.id)??y("li"),T=E.querySelector("button")??Ue("",()=>Pi(k.id),"button--quiet session-link");if(!T.parentElement)E.dataset.session=T.dataset.session=k.id,T.append(y("span"),y("small")),E.append(T);let _=T.firstElementChild;if(_&&_.textContent!==k.name)_.textContent=T.title=k.name;let A=T.lastElementChild,D=Oe.get(k.id)?.status==="released"?c("已释放","Released"):k.running?c("运行中","Running"):k.settled?c("已结清","Done"):k.active?c("已打开","Open"):c("待恢复","Resume");if(A&&A.textContent!==D)A.textContent=D;if(!ht.active&&k.id===N?.session.id)T.setAttribute("aria-current","true");else T.removeAttribute("aria-current");if(E!==x)g.insertBefore(E,x);x=E.nextElementSibling,o.delete(k.id)}}for(let l of i.values())l.remove();for(let l of o.values())l.remove();if(n&&document.activeElement===document.body)([...t.querySelectorAll("button")].find((l)=>l.dataset.session===n)??Ut("search")).focus({preventScroll:!0});re(P("list-empty"),r.length?"":e?c("没有匹配的会话","No matching sessions"):!Ii?Yr?c("暂时无法读取会话","Couldn't load sessions"):c("正在读取会话…","Loading sessions…"):Tn?c("没有已归档的会话","No archived sessions"):c("还没有最近会话","No recent sessions")),V("recent").setAttribute("aria-pressed",String(!Tn)),V("archived").setAttribute("aria-pressed",String(Tn)),Hi.renderBookmarks()}function Pi(e,t=!1,n=!0){let r=_r.get(e);if(!r||!yt.includes(r.cwd))return;if(ht.stop(),n)xn(!1),P("conversation").focus();if(e===N?.session.id){if(!t)return;if(N.status==="ready"){Ke.focus();return}}if(N)ma(N);if(Ye.open)Ye.close();if(Rr(!1),Yn(!1),jt.open)xr?.abort(),jt.close();if(Cn?.abort(),n)P("conversation").focus({preventScroll:!0});let s=Oe.get(e),i=r.active&&s?.status!=="released"&&s?.status!=="uncertain",o={session:r,status:i?"loading":"inactive",error:"",state:{},messages:[],liveKey:"",liveMessageKeys:new Set,tools:new Map,requests:new Map,options:{},optionsError:"",handoff:{},queue:void 0,revision:0,serial:0,sync:0,optionSync:0,historyEpoch:0,running:r.running,compacting:!1};N=o,Ar?.(),zs.reset(),Di.reset();let a=Ve(e);if(Ke.value=a.commandMode?a.commandText:a.text,Vn.value=a.mode,qs(),er(),Me(),i)rs(o,!0).then(()=>{if(t&&o===N&&o.status==="ready"&&document.activeElement===P("conversation"))Ke.focus()}),Sr(o);else if(n&&s?.status==="released"&&!document.querySelector("dialog:modal"))P("handoff-title").focus()}function Pt(e){return C(e.id)?JSON.stringify([C(e.provider),C(e.id)]):""}function u6(e){let t=C(e.name)||C(e.id);return t?[C(e.provider),t].filter(Boolean).join(" · "):""}function aa(e,t,n,r){let s=JSON.stringify(t);if(e.dataset.options!==s)e.replaceChildren(ot(r,""),...t.map(([i,o])=>ot(o,i))),e.dataset.options=s;if(e.value=n,e.selectedIndex<0)e.value=""}function d6(e,t,n){let r=U(e.state.model),s=Pt(r),i=we(e.options.models).map(U).filter((x)=>Boolean(Pt(x))),o=e.state.pendingModelSwitch!=null;if(!n||o||e.modelSelection===s)e.modelSelection=void 0;let a=i.find((x)=>Pt(x)===e.modelSelection),l=a??i.find((x)=>Pt(x)===s);if(s&&!i.some((x)=>Pt(x)===s))i.unshift(r);aa(Jn,i.map((x)=>[Pt(x),u6(x)]),Pt(a??r),c("模型","Model")),Jn.disabled=t||o||!we(e.options.models).length,Xn.hidden=!a,Xn.disabled=t||o;let u=o?c("正在切换模型。","Changing model…"):"",d;if(n&&!o&&l){let x=JSON.stringify([s,Pt(l),e.state.thinkingLevel]);if(e.modelPreview?.key!==x&&!Ot.has(e.session.id)){let _={key:x,result:void 0};e.modelPreview=_;let A=new URLSearchParams({provider:C(l.provider),modelId:C(l.id)});Fe.request(`${Ze(e.session.id)}/model-preview?${A}`).catch(()=>({})).then((D)=>{if(N!==e||e.modelPreview!==_)return;_.result=D,Me()})}let k=e.modelPreview?.key===x?e.modelPreview.result:void 0,E=C(k?.source),T=C(k?.level);if(k?.status==="ok"&&Object.hasOwn(R0,E)&&Object.hasOwn(an,T)){d=k;let _=we(d.availableLevels).map(C).filter((R)=>Object.hasOwn(an,R)),A=a?c("切换后","After switching"):c("当前","Current"),D=_.map((R)=>an[R]).join(c("、",", "));u=c(`${A}:${an[T]}(来源:${R0[E]}) · 可用:${D}`,`${A}: ${an[T]} (${R0[E]}) · Available: ${D}`)}else u=k?c("无法预览此模型的思考档。","Thinking preview is unavailable for this model."):c("正在读取模型档位…","Loading thinking levels…")}else if(e.modelPreview=void 0,n&&!o&&s&&!e.optionsError&&we(e.options.models).length)u=c("此模型不在可用列表里。","The current model is not available.");if(Sn.textContent!==u)Sn.textContent=u;Sn.classList.toggle("sr-only",!a),Sn.hidden=!u,Jn.title=!a&&u?u:c("模型","Model"),ea.title=!a&&u?u:c("思考档","Thinking level");let h=a?void 0:d,p=C(h?.level??e.state.thinkingLevel),g=we(h?.availableLevels??e.options.levels).map(C).filter((x)=>Object.hasOwn(an,x)),b=g.length>0;if(Object.hasOwn(an,p)&&!g.includes(p))g.unshift(p);aa(ea,g.map((x)=>[x,c(`思考:${an[x]}`,`Thinking: ${an[x]}`)]),p,c("思考档","Thinking")),ea.disabled=t||o||Boolean(a)||!b}function mp(e,t){if(!t||t===Pt(U(e.state.model)))return;e.modelSelection=void 0,e.modelPreview=void 0,e.options={...e.options,levels:[]},Sr(e)}function Mi(e,t){let n=Ts.get(e);if(n===t)return;if(n?.removeAttribute("id"),t){let r=e.getAttribute("aria-controls");if(r)t.id=r;Ts.set(e,t)}else Ts.delete(e);e.hidden=!t,sa.hidden=P("active-session").hidden||!Ts.size}function f6(e){let t=V("sidebar-question"),n=0;for(let i of e.values())if(i.method==="question"&&++n===100)break;if(!n){if(t===document.activeElement)Ee.querySelector('[aria-selected="true"]')?.focus();t.hidden=!0;return}let r=n===100?"99+":String(n),s=c(`Agent 提问 · ${r}`,`Agent questions · ${r}`);if(t.textContent!==s)t.textContent=s,t.setAttribute("aria-label",c(`跳至首个 Agent 提问(${n===100?"超过 99":r} 个待答)`,`Jump to first Agent question (${n===100?"over 99":r} pending)`));t.hidden=!1}function Me(){let e=ht.active;if(P("cli-follow-view").hidden=!e,P("transcript").hidden=e,V("cli-follow-stop").hidden=!e,V("cli-follow-button").setAttribute("aria-pressed",String(e)),P("banner").hidden=!ia&&(e||!P("banner-text").textContent),e){if(N)N.consideredDesktopDock=!1;Ci.reset(),sa.hidden=!0,P("composer-shell").hidden=!0,V("details-button").hidden=!0,V("web-branch-button").hidden=!0,V("manage-button").hidden=!0,rp(ht.target?.name??c("跟随 CLI","Follow CLI"),ht.target?.cwd??"");return}let t=N,n=t?.session,r=n&&Oe.get(n.id),s=r?.status==="pending",i=r?.status==="released"?r:void 0,o=Boolean(t&&t.status==="ready"),a=o?t?.transcript??t?.history?.status:void 0;if(a)yr.dataset.status=a,P("transcript").setAttribute("aria-describedby",yr.id);else delete yr.dataset.status,P("transcript").removeAttribute("aria-describedby");if(P("no-messages").style.display=a?"none":"",re(yr,a==="truncated"?c("部分聊天记录未包含在快照中。","Some chat history was omitted from this snapshot."):a==="unavailable"?c("暂时无法读取聊天记录。新消息仍会显示在这里。","Chat history is unavailable. New messages will still appear here."):""),P("welcome").hidden=Boolean(t),P("inactive-session").hidden=!t||o,P("active-session").hidden=!o,sa.hidden=!o||!Ts.size,!o){Ci.reset();for(let W of Object.values(Ss))Mi(W)}if(P("composer-shell").hidden=!o,Ke.disabled=!o||n?.active!==!0,rp(n?.name??c("会话工作台","Workbench"),n?.cwd??""),V("details-button").hidden=!o,!o)Rr(!1);if(V("web-branch-button").hidden=!n,V("web-branch-button").disabled=s,V("manage-button").hidden=!o,!t)return;let l=Ve(t.session.id);if(Ye.open){let W=s?c("正在释放会话…","Releasing session…"):cp(t);V("manage-handoff").disabled=Boolean(W),re(P("manage-handoff-status"),W),re(P("manage-handoff-error"),r?.status==="failed"?r.error:"")}for(let W of[Ye,Ee])if(W.open)W.querySelectorAll("[data-write]").forEach((ge)=>{ge.disabled=it!=="online"||s||Ot.has(t.session.id)||ge.hasAttribute("data-unavailable")||ge.hasAttribute("data-idle")&&(t.running||t.compacting||nr.has(t.session.id))});$t?.syncWrites();let u=t.status!=="inactive";P("inactive-title").textContent=t.status==="loading"?c("正在读取会话…","Loading session…"):t.status==="failed"?c("无法读取会话","Couldn't load session"):c("继续此会话","Continue this session");let d=Boolean(i&&t.status!=="loading");P("inactive-title").hidden=d,P("inactive-copy").hidden=d,P("inactive-copy").textContent=s?c("等本机引擎确认释放。","Waiting for the local engine to release the session."):t.status==="loading"?"":t.status==="failed"?c("检查连接后重试。","Check the connection and try again."):t.session.archived?c("恢复已归档的会话,继续之前的对话。","Restore this archived session to continue the conversation."):c("恢复后可继续之前的对话。","Resume to pick up where you left off."),P("handoff-receipt").hidden=!d;let h=P("handoff-command").firstElementChild;if(h&&h.textContent!==(i?.command??""))h.textContent=i?.command??"";re(P("handoff-copy-status"),i?.copyStatus),re(P("handoff-draft-note"),!o&&(i||s||r?.status==="uncertain")&&(l.text||l.commandText||l.images.length||l.reading)?c("草稿仍在这页。","Your draft is still on this page."):""),re(P("session-error"),t.error||(r?.status==="uncertain"&&t.status!=="loading"?r.error:""));let p=V("resume");if(p.hidden=o||t.status==="loading",p.disabled=it!=="online"||s||Ot.has(t.session.id),p.classList.toggle("button--primary",!i),p.textContent=!i&&r?.status!=="uncertain"&&u&&t.session.active?c("重试读取","Retry"):c("恢复会话","Resume session"),!o){t.modelSelection=void 0,t.modelPreview=void 0;return}let g=it==="online",b=s||Ot.has(t.session.id),x=nr.has(t.session.id),k=t.session.archived,E=g&&t.session.active&&!k&&!t.compacting,T=Vn.value,_=l.commandMode,A=_||dp(l.text),D=t.running&&(T==="prompt"||k||A);V("stop").hidden=!t.running,V("stop").disabled=!g||b,V("stop").classList.toggle("button--primary",D),V("stop").classList.toggle("button--danger",!D);let R=V("send");R.hidden=A||t.running&&(T==="prompt"||k),R.disabled=!E||b||x||l.reading>0||!l.text.trim()&&!l.images.length;let L=T==="follow_up"?c("排队","Queue"):T==="steer"?c("发送引导","Steer"):c("发送","Send");P("send-label").textContent=R.title=L;let B=V("send-command");B.hidden=!A;let O=_?l.commandText:l.text,H=Jm(O);B.disabled=!g||!t.session.active||b||k&&!H||!H&&(t.running||t.compacting||Boolean(t.queue)||x)||!O.trim(),V("command-mode").setAttribute("aria-pressed",String(_)),V("command-picker").hidden=!_,V("command-picker").disabled=!g||k,P("prompt-label").textContent=_?c("命令及参数","Command and arguments"):c("消息","Message"),Ke.placeholder=_?c("输入 /命令 或 $技能,可加参数…","Enter a /command or $skill…"):c("输入消息…","Write a message…"),V("attach").disabled=_||k||l.images.length+l.reading>=4||b,V("attach").hidden=_,(Vn.closest("label")??Vn).hidden=_,Vn.disabled=k||b,d6(t,!E||t.running||b||x,g&&u&&!s);let K=C(t.state.effectivePermissionPreset)||C(t.state.permissionPreset)||"ask";aa(Ge("approval"),[...Ym],Ym.some(([W])=>W===K)?K:"ask",c("审批","Approval")),Ge("approval").dataset.preset=Ge("approval").value,Ge("approval").disabled=!E||b||x,Ge("approval").title=K==="full-access"?c("无审批:工具默认放行。原生权限规则仍有效,用户问题仍需回答。","Off: Tools are allowed by default. Native permission rules and user questions still apply."):K==="auto"?c("Auto:原生确认安全的项目内操作自动放行,其余询问。","Auto: OmO allows safe project operations and asks about the rest."):c("询问:未被原生权限规则处理的工具操作需要批准。恢复会话会回到此模式。","Ask: Approve tool calls not covered by native rules. Resuming a session returns to Ask.");let G=As(t.state.contextUsage),de=c("上下文","Context");re(P("context-usage"),G.status!=="ok"?"":G.percent!==void 0?`${de} ${L0.format(G.percent)}%`:G.tokens!==void 0&&G.window?`${de} ${L0.format(G.tokens)} / ${L0.format(G.window)}`:"");let ne=Uo(t.state.usageTotals),ae=ne.status==="ok"&&ne.latest!==void 0?n6.format(ne.latest*100):"";re(P("cache-usage"),g&&ae?c(`最新缓存 ${ae}%`,`Latest cache ${ae}%`):"");let z=s?c("正在换端,草稿不会发送。","Switching clients. Your draft won't be sent."):!g?c("离线时可以编辑,重连后再发送。","You can edit offline and send when reconnected."):k?c("先在会话管理里取消归档。","Unarchive this session in Manage session."):l.commandStatus||(A?!H&&(t.running||t.compacting||t.queue)?c("等本轮和队列结束后再执行命令。","Wait for this turn and queue to finish before running a command."):c("Ctrl / ⌘ + Enter 执行命令;开头加空格就按文字发送。","Ctrl / ⌘ + Enter runs the command. Add a leading space to send it as text."):t.compacting?c("等压缩完成后再发送。","Send after compaction finishes."):l.reading?c("正在读取图片…","Loading images…"):t.running&&T==="prompt"?c("停止本轮,或选引导或排队。","Stop this turn, or choose Steer or Queue."):!t.running&&T!=="prompt"?c("当前空闲,这条消息会在下一轮处理。","No turn is running. This message will be handled in the next turn."):c("Ctrl / ⌘ + Enter 发送","Ctrl / ⌘ + Enter to send"));P("composer-hint").textContent=z,P("composer-hint").classList.toggle("sr-only",!l.commandStatus&&g&&!s&&!k&&!l.reading&&!t.compacting&&!A&&(T==="prompt"||t.running));let j=[t.requests.size?c(`待答 ${t.requests.size}`,`Pending ${t.requests.size}`):"",t.running?c("生成中","Generating"):"",t.compacting?c("压缩中","Compacting"):"",t.queue?c(`排队 ${t.queue}`,`Queued ${t.queue}`):""].filter(Boolean).join(" · ");if(P("activity-row").hidden=!j,P("activity-row").dataset.pending=String(t.requests.size>0),P("activity").textContent!==j)P("activity").textContent=j;let Z=V("current-todo"),Q=t.workbench,oe=Q?.status==="ok"?C(Q.currentTodo):"",F=Q?.status==="ok"?Ce(Q.pendingTodo):void 0,X=c("待办","Todo"),te=oe?`${X} · ${oe}`:F?`${X} ${F}`:"";Z.hidden=!g||!te;let xe=P("current-todo-label");if(xe.textContent!==te)xe.textContent=te;Z.title=oe&&F?c(`${te};另有 ${F} 项待处理`,`${te} · ${F} more pending`):te,re(P("compose-error"),(_?l.commandError:l.error)||t.optionsError||(!Ye.open&&r?.status==="failed"?r.error:"")),Di.render(t.requests,g&&!s,(W,ge)=>b6(t,W,ge)),f6(t.requests),Mi(Ss.request,Di.first),Ci.render(t.options.commands,g&&!k&&!s),Ap(t)}function rp(e,t){let n=P("session-title");if(n.textContent!==e)n.textContent=e;n.title=e;let r=P("session-path");if(re(r,t),r.title=t,re(P("session-path-short"),t?zi(t):""),V("session-path-trigger").hidden=!t,ht.active&&t)r.dataset.workspaceLabel=zi(t);else delete r.dataset.workspaceLabel}function h6(e){let t=new Map;for(let n of[...we(e.pendingDialogs),...we(e.pendingQuestions)]){let r=U(n);if(Ji(r))t.set(Hs(r),r)}return t}function Bs(e,t=!1){if(e!==N||e.status!=="ready")return;na(e,t)}function na(e,t=!1,n){let r=e.history,s=r?.entries.length?[...r.entries,...e.messages]:e.messages;zs.render(s,e.liveKey,e.tools,t,r?.render(),n,e.session.id)}function m6(e,t){let n=e.history;if(t&&n?.id===t.id&&!n.reloading)return;if(n?.invalidate(),e.history=void 0,!t)return;let{id:r,cwd:s}=e.session,i=()=>e===N&&e.history===a&&e.session.id===r&&e.session.cwd===s&&tn(s)&&e.session.active&&!ht.active&&(!Oe.has(r)||Oe.get(r)?.status==="failed"),o=()=>i()&&e.status==="ready"&&it==="online"&&!ht.active,a=new o0(t,Fe,r,i,o,()=>e.messages,(l)=>{if(!i())return;Me(),na(e,!1,l)},()=>{if(!o()||a.reloading)return;a.reloading=!0,a.clearExpansion(),Me(),na(e),rs(e).finally(()=>{if(a.reloading=!1,i())na(e)})});e.history=a}async function rs(e,t=!1,n=!1){let r=Oe.get(e.session.id),s=r?.status==="released"||r?.status==="uncertain";if(s&&(e.status!=="loading"||!Ot.has(e.session.id)))return;let i=++e.sync,{historyEpoch:o,session:a,transcriptRefresh:l,stateRefresh:u}=e,d=e.status==="ready"&&e.running&&Boolean(l||u),h=Promise.withResolvers();e.pendingSnapshot=h.promise;let p=e.revision,g=new Set(e.messages),{state:b,generationSpeed:x}=e,k=[];e.snapshotRequestChanges=k;let E=e.liveKey,T=new Set([...e.tools].filter(([,_])=>_.stage==="running").map(([_])=>_));try{let _=await Fe.request(Ze(e.session.id));if(N!==e||i!==e.sync||Oe.get(e.session.id)!==r)return;let A=un(_.session),D=s0(_.page);if(D&&!A||A&&(A.id!==a.id||A.cwd!==a.cwd))throw new Be(c("会话读取响应已失效。","The session read no longer matches this conversation."),409,"stale_session_read");if(e.historyEpoch!==o&&D)return;if(s&&!A?.active)throw Error(c("本机服务未确认已恢复此会话。","The local engine did not confirm the session resumed."));let R=A??e.session;if(s)Oe.delete(R.id);sr(R);let L=U(_.state),B=e.pendingStateUnknown?{...e.state,...L}:L;if(wt.online!==!1)if(_.generationSpeed===void 0&&e.generationSpeed===x)e.generationSpeed=void 0;else tc(e,_.generationSpeed);let O=Pt(U(e.state.model));e.handoff=U(_.handoff);let H=n||!d&&(!e.transcriptRefresh||e.transcriptRefresh===l&&!e.running),K=i0(_.transcript);if(H){if(e.transcript=K,m6(e,K==="unavailable"?void 0:D),e.transcriptRefresh===l)e.transcriptRefresh=void 0}let G=K==="unavailable"?[]:we(_.messages).map(U),de=p!==e.revision,ne=new Map(e.messages.map((Q)=>[Q.key,Q.message])),ae=new Set,z=G.filter((Q)=>Boolean(on(Q))).map((Q,oe)=>{let F=Pr(Q)||`snapshot:${oe}`,X=ae.has(F)?`${F}:${oe}`:F;ae.add(X);let te=ne.get(X);return{key:X,message:te&&JSON.stringify(te)===JSON.stringify(Q)?te:Q}});if(H&&K==="unavailable")e.messages=e.messages.filter((Q)=>e.liveMessageKeys.has(Q.key));if(de){if(H&&K!=="unavailable"){let oe=K==="truncated"||Boolean(l),F=e.messages.filter((te)=>e.liveMessageKeys.has(te.key)&&(!oe||!g.has(te)||e.running&&te.key===e.liveKey)),X=new Map(F.map((te)=>[te.key,te]));e.messages=[...z.map((te)=>X.get(te.key)??te),...F.filter((te)=>!ae.has(te.key))]}if(e.state={...B,...Object.fromEntries(Object.entries(e.state).filter(([oe,F])=>F!==b[oe]))},!(R.running||B.isStreaming===!0)&&!e.running){if(e.liveKey="",H&&K!=="unavailable"&&E&&!ae.has(E))e.messages=e.messages.filter((oe)=>oe.key!==E);for(let oe of T)if(e.tools.get(oe)?.stage==="running")e.tools.delete(oe)}}else{if(H&&K!=="unavailable")e.messages=z;if(e.state=B,!e.pendingStateUnknown||typeof L.isStreaming==="boolean"||R.running)e.running=R.running||B.isStreaming===!0;if(!e.pendingStateUnknown||typeof L.isCompacting==="boolean")e.compacting=B.isCompacting===!0;if(!e.pendingStateUnknown||Ce(L.pendingMessageCount)!==void 0)e.queue=Ce(B.pendingMessageCount);if(!e.running){e.liveKey="";for(let[Q,oe]of e.tools)if(oe.stage==="running")e.tools.delete(Q)}else if(H&&K!=="unavailable"&&e.liveKey&&!ae.has(e.liveKey)){let Q=ne.get(e.liveKey);if(Q)e.messages.push({key:e.liveKey,message:Q})}}e.liveMessageKeys=new Set(e.messages.flatMap((Q)=>e.liveMessageKeys.has(Q.key)?[Q.key]:[]));let j=h6(L);if(e.pendingStateUnknown){let Q=Array.isArray(L.pendingDialogs),oe=Array.isArray(L.pendingQuestions);for(let[F,X]of e.requests)if(!(X.method==="question"?oe:Q)&&!j.has(F))j.set(F,X);if(Q&&oe&&e.stateRefresh===u)e.pendingStateUnknown=void 0}if(e.stateRefresh===u)e.stateRefresh=void 0;if(!H&&!e.running&&e.transcriptRefresh)vt(e);for(let Q of k)gp(j,Q);e.requests=j,mp(e,O);let Z=e.status!=="ready";if(e.status="ready",e.error="",Me(),Bs(e,t),Ai(e),Z||!e.workbench)la(e);return i}catch(_){if(N!==e||i!==e.sync||Oe.get(e.session.id)!==r)return;if(Oe.get(e.session.id)?.status==="pending")return;if(n)throw _;if(e.status!=="ready"||!e.session.active)e.status="failed",e.error=Re(_);else Ve(e.session.id).error=c(`无法刷新会话:${Re(_)}`,`Couldn't refresh the session: ${Re(_)}`);Me()}finally{if(e.pendingSnapshot===h.promise)e.pendingSnapshot=void 0;if(h.resolve(),e.snapshotRequestChanges===k)e.snapshotRequestChanges=void 0;if(e===N&&!e.pendingSnapshot&&e.refreshScheduled)e.refreshScheduled=void 0,vt(e)}}async function la(e){if(e!==N||e.status!=="ready"||!e.session.active||e.session.archived||it!=="online"||ht.active||Oe.get(e.session.id)?.status==="pending")return;Cn?.abort();let t=Cn=new AbortController,n=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);try{let r=await Fe.request(`${Ze(e.session.id)}/workbench-status`,void 0,n);if(t.signal.aborted||Cn!==t||e!==N||e.status!=="ready")return;e.workbench=r}catch(r){if(!(r instanceof Error))throw r;if(t.signal.aborted||Cn!==t||e!==N)return;e.workbench={status:"unavailable"}}finally{if(Cn===t)Cn=void 0}Me()}async function Sr(e){let t=++e.optionSync;try{let n=await Fe.request(`${Ze(e.session.id)}/options`);if(N!==e||t!==e.optionSync)return;e.options=n,e.optionsError=""}catch(n){if(N!==e||t!==e.optionSync)return;e.optionsError=c(`无法读取模型和运行选项:${Re(n)}`,`Couldn't load models and settings: ${Re(n)}`)}Me()}function pp(){if(En)return;let e=new EventSource("/api/events");En=e,e.addEventListener("open",()=>{if(e!==En)return;let t=Xt==="lost";if(t)Tt="transport";if(Xt="open",rr(),t)if(wt.online===!1)Xr();else Qn(!0)}),e.addEventListener("error",()=>{if(e!==En)return;if(Xt!=="lost"&&N)pa(N),N.liveMessageKeys.clear(),N.liveKey="",N.tools.clear();if(Xt="lost",Tt==="transport")Zr++,Ar?.();if(rr(),e.readyState!==EventSource.CLOSED||Ti)return;Ti=window.setTimeout(()=>{if(Ti=0,e!==En)return;En=void 0,pp()},e6)}),e.addEventListener("omo",(t)=>{if(!(t instanceof MessageEvent)||typeof t.data!=="string"||e!==En)return;try{let n=JSON.parse(t.data);g6(U(n))}catch(n){if(!(n instanceof SyntaxError))throw n;if(N?.session.active)vt(N)}})}function p6(e,t,n){let r=U(t.message),s=on(r);if(!s)return;if(s==="toolResult"&&r.toolName==="send_file"&&n!=="message_end")return;let i=e.messages[e.messages.length-1],o=Pr(r),a=s==="assistant"&&e.liveKey,l=n!=="message_start"&&a||o||"";if(!l&&n!=="message_start"&&i&&s===on(i.message))l=i.key;if(!l)l=`live:${++e.serial}`;let u=e.messages.findIndex((d)=>d.key===l);if(u<0)e.messages.push({key:l,message:r});else e.messages[u]={key:l,message:r};if(e.liveMessageKeys.add(l),s==="assistant"){if(e.liveKey=n==="message_end"?"":l,n!=="message_end")e.running=!0}}function vt(e){clearTimeout($0),$0=window.setTimeout(()=>{if(N!==e||!e.session.active||Xt!=="open"||Tt==="transport"||Oe.get(e.session.id)?.status==="pending")return;if(e.transcriptRefresh&&e.running&&!e.stateRefresh)return;if(e.pendingSnapshot){e.refreshScheduled=!0;return}rs(e)},120)}function gp(e,t){if(t.type==="upsert"){e.set(Hs(t.request),t.request);return}for(let[n,r]of e){if(!t.ids.includes(n)&&!t.ids.includes(C(r.requestId)))continue;if(t.type==="resolve")e.delete(n);else if(r.method==="question")e.set(n,{...r,...t.timing})}}function ca(e,t){gp(e.requests,t),e.snapshotRequestChanges?.push(t)}function I0(e,t){let n=U(t);if(Ji(n))ca(e,{type:"upsert",request:n})}function tc(e,t){let n=Jh(t);if(!n||e.generationSpeed&&e.generationSpeed.measuredAt>=n.measuredAt)return!1;return e.generationSpeed=n,!0}function Ai(e){if(Ee.open&&e.detailData)am(e.detailData,e.state,e.generationSpeed)}function g6(e){let t=C(e.type);if(t==="cli-live"){Fs.invalidate(C(e.id));return}if(t==="ready"||t==="engine"){if(t==="engine"){let r=U(e.engine);if(typeof r.online!=="boolean")return;if(Tt!=="transport")Tt=r.online&&wt.online===!1?"engine":!1;if(wt=r,!r.online&&Tt==="transport")Zr++,Ar?.();if(!r.online&&N)pa(N),N.liveMessageKeys.clear(),N.liveKey="",N.tools.clear(),N.generationSpeed=void 0,Ai(N);if(rr(),r.online)Qn(!0);else Xr()}else if(Tt==="transport"){if(wt.online===!1&&U(e.engine).online===!0)Qn(!0)}else if(Tt)return;else if(N&&wt.online!==!1)Qn(!0);else Xr();return}if(t==="sessions"){Xr();return}let n=N;if(!n||e.sessionId!==n.session.id)return;if(n.status!=="ready"&&n.status!=="loading")return;if(t==="generation_speed"){if(tc(n,e.generationSpeed))Ai(n);return}switch(n.revision++,t){case"transcript_refresh_required":if(n.transcriptRefresh={},!n.running)vt(n);return;case"state_refresh_required":n.stateRefresh={},n.pendingStateUnknown=!0,vt(n);return;case"agent_start":n.running=!0;break;case"turn_start":{let r=C(e.turnId);if(r)n.state={...n.state,currentTurnId:r};break}case"agent_end":if(e.willRetry===!0)break;n.liveKey="",vt(n);break;case"agent_settled":if(n.running=!1,n.liveKey="",n.state={...n.state,currentTurnId:void 0},vt(n),la(n),n.status==="ready"&&Ee.open)$t?.invalidate(),ra(n);break;case"agent_idle":if(n.transcriptRefresh)n.running=!1,n.liveKey="";vt(n);break;case"message_start":case"message_update":case"message_end":p6(n,e,t);break;case"tool_execution_start":case"tool_execution_update":case"tool_execution_end":{let r=C(e.toolCallId);if(!r)break;let s=n.tools.get(r),i=U(e.result??e.partialResult);if(n.tools.set(r,{id:r,name:C(e.toolName)||s?.name||"",args:e.args??s?.args,output:i.content??s?.output,stage:e.isError===!0?"error":t==="tool_execution_end"?"done":"running"}),t==="tool_execution_end"&&e.isError!==!0&&/^(?:todo|todowrite)$/u.test(C(e.toolName)||s?.name||""))la(n);break}case"extension_ui_request":I0(n,e);break;case"ui_request_pending":I0(n,e.request);break;case"question_updated":{if(Ji(e))I0(n,e);else{let r=[C(e.id),C(e.requestId)].filter(Boolean),s=Ce(e.deadlineAtMs),i=Ce(e.remainingMs);if(!r.length||s===void 0&&i===void 0)return;ca(n,{type:"timing",ids:r,timing:{...s===void 0?{}:{deadlineAtMs:s},...i===void 0?{}:{remainingMs:i}}})}break}case"question_resolved":case"ui_request_resolved":case"extension_ui_resolved":case"extension_ui_request_resolved":{let r=[e.id,e.requestId,e.uiRequestId].map(C).filter(Boolean);if(r.length)ca(n,{type:"resolve",ids:r});vt(n);break}case"compaction_start":n.compacting=!0;break;case"compaction_end":if(n.compacting=!1,e.aborted!==!0&&C(e.errorMessage))Ve(n.session.id).error=C(e.errorMessage);if(e.aborted!==!0&&e.success!==!1&&!e.errorMessage&&!e.error)$i(n);if(e.aborted!==!0&&!C(e.errorMessage)&&Ee.open)$t?.invalidate(),ra(n);vt(n);break;case"queue_update":if(n.queue=we(e.steering).length+we(e.followUp).length,Ee.open&&ns())G0(n);else Os=!0;Tr?.activate(!0);break;case"pending_input_update":if(vt(n),Ee.open&&ns())G0(n);else Os=!0;Tr?.activate(!0);break;case"model_changed":case"service_tier_changed":{let r=Pt(U(n.state.model));if(e.model)n.state={...n.state,model:e.model};if(typeof e.thinkingLevel==="string")n.state={...n.state,thinkingLevel:e.thinkingLevel};if(typeof e.fastMode==="boolean")n.state={...n.state,fastMode:e.fastMode};if(Ai(n),!r||r===Pt(U(n.state.model)))n.modelPreview=void 0,Sr(n);else mp(n,r);vt(n);break}case"commands_changed":case"loaded_surfaces_changed":Sr(n);break;case"auto_retry_start":n.running=!0;break;case"auto_retry_end":vt(n);break;case"session_replaced":if(ya(),$i(n),n.status="loading",n.running=!1,n.compacting=!1,n.state={},n.requests.clear(),n.queue=void 0,Cn?.abort(),n.workbench=void 0,n.generationSpeed=void 0,V0(),Ai(n),Ee.open)$t?.invalidate(),ra(n);vt(n);break;case"transcript_write_failed":case"extension_error":case"retry_fallback_exhausted":Ve(n.session.id).error=C(e.errorMessage)||C(e.error)||C(e.lastError)||c("本机引擎报告会话错误","The local engine reported a session error.");break;case"session_closed":case"session_parked":case"session_released":if(Oe.get(n.session.id)?.status!=="pending")ha(n);sr({...n.session,active:!1,running:!1});break;default:return}Me(),Bs(n)}async function ga(e,t){if(it!=="online")throw Error(c("连接断开。重连后重试。","Offline. Reconnect and try again."));if(t.action!=="resume"&&(e!==N||e.status!=="ready"||!e.session.active||Oe.get(e.session.id)?.status==="pending"))throw Error(c("恢复会话后再试。","Resume the session and try again."));try{let n=await Fe.action(e.session.id,t),r=un(n.session);if(r)sr(r);return n}catch(n){if(n instanceof Be&&(n.status===401||n.status===403))Qn(!0);throw n}}async function b6(e,t,n){let r=[t,C(e.requests.get(t)?.requestId)].filter(Boolean);if(await ga(e,{action:"answer",requestId:t,...n}),ca(e,{type:"resolve",ids:r}),e===N)Me();vt(e)}function qs(){let e=N,t=P("attachments"),n=e&&Ve(e.session.id);if(t.hidden=!n?.images.length||n.commandMode,t.replaceChildren(),!n)return;for(let r of n.images){let s=y("div","attachment"),i=y("img");i.alt=r.name,i.src=r.url;let o=Ue(c("移除","Remove"),()=>{n.images=n.images.filter((a)=>a!==r),qs(),Me(),(t.querySelector("button")??V("attach")).focus()},"button--quiet");o.setAttribute("aria-label",c(`移除图片:${r.name}`,`Remove image: ${r.name}`)),s.append(i,o),t.append(s)}}async function sp(e){let t=N;if(!t||t.status!=="ready"||t.session.archived||Ve(t.session.id).commandMode)return;let n=Ve(t.session.id),r=[],s=[];for(let o of e){let a=o.type;if(!Gi(a)){r.push(c(`不支持图片格式:${o.name}`,`Unsupported image format: ${o.name}`));continue}if(!o.size||o.size>2100000){r.push(c(`图片为空或超过 2.1 MB:${o.name}`,`Image is empty or larger than 2.1 MB: ${o.name}`));continue}if(n.images.length+n.reading>=4){r.push(c("最多可添加 4 张图片。","You can attach up to 4 images."));break}n.reading++,s.push(new Promise((l,u)=>{let d=new FileReader;d.addEventListener("error",()=>u(Error(c(`无法读取图片:${o.name}`,`Couldn't read image: ${o.name}`))),{once:!0}),d.addEventListener("load",()=>{let h=typeof d.result==="string"?d.result:"",p=h.slice(h.indexOf(",")+1);if(!p||!h.startsWith(`data:${a};base64,`)){u(Error(c(`图片编码无效:${o.name}`,`Invalid image data: ${o.name}`)));return}l({type:"image",mimeType:a,data:p,name:o.name||c("粘贴的图片","Pasted image"),url:h})},{once:!0}),d.readAsDataURL(o)}))}if(t===N)Me();let i=await Promise.allSettled(s);n.reading-=s.length;for(let o of i)if(o.status==="fulfilled")n.images=[...n.images,o.value];else r.push(Re(o.reason));if(n.error=[...new Set(r)].join(" "),t===N)qs(),Me()}async function v6(){let e=N;if(!e||V("send").disabled||V("send").hidden)return;let t=e.session.id,n=Ve(t),{text:r,mode:s,images:i}=n,o=s==="prompt"?"":C(e.state.currentTurnId),a=n.admission,l=a&&a.text===r&&a.mode===s&&a.turn===o&&a.imageList===i?a.id:crypto.randomUUID();n.admission={id:l,text:r,mode:s,turn:o,imageList:i},n.error="",nr.add(t),Me();try{if(await ga(e,{action:"prompt",message:r,mode:s,clientMessageId:l,...o?{expectedTurnId:o}:{},...i.length?{images:i.map(({type:u,mimeType:d,data:h})=>({type:u,mimeType:d,data:h}))}:{}}),n.admission=void 0,n.text===r){if(n.text="",e===N&&!n.commandMode)Ke.value=""}if(n.images=n.images.filter((u)=>!i.includes(u)),e===N)qs();vt(e)}catch(u){if(n.error=c(`未能发送:${Re(u)}`,`Couldn't send: ${Re(u)}`),u instanceof Be&&u.status>=400&&u.status<500)n.admission=void 0;vt(e)}finally{if(nr.delete(t),e===N)Me()}}async function y6(e){if(V("send-command").disabled||V("send-command").hidden)return;let t=e.session.id,n=Ve(t),r=n.commandMode?"commandText":"text",s=n.commandMode?"commandError":"error",i=n[r],o=(p)=>{n[s]=p},a=()=>{if(n[r]!==i)return;if(n[r]="",N?.session.id===t&&n.commandMode===(r==="commandText"))Ke.value=""};n.commandStatus=void 0;let l=_s(i);if(l.kind==="malformed"||l.kind==="tui-only"){o(l.kind==="malformed"?l.message:c(`“/${l.name}”请在本机 OmO 终端重新发起。Web 没有转交输入,也没有发送给模型。`,`Run /${l.name} in the local OmO terminal. The Web app did not forward your input or send it to the model.`)),Me();return}if(l.kind==="builtin"){o("");try{if(await k6(e,l.command,o))a()}catch(p){o(c(`命令失败:${Re(p)}`,`Command failed: ${Re(p)}`))}if(N?.session.id===t)Me();return}let[,u,d]=/^(\S+)(?:[ \t]+([^\r\n]*))?$/.exec(i)??[];if(!u||!Kr.test(u)||/[\r\n]/.test(i)){o(c("请输入单行 /命令 或 $技能,可附加参数。","Enter a /command or $skill on one line. Arguments are optional.")),Me();return}let h=n.commandAdmission?.text===i?n.commandAdmission.id:crypto.randomUUID();n.commandAdmission={text:i,id:h},o(""),nr.add(t),Me();try{await ga(e,{action:"command",invocation:u,...d?{arguments:d}:{},clientMessageId:h}),n.commandAdmission=void 0,a()}catch(p){if(p instanceof Be&&p.status>=400&&p.status<500)n.commandAdmission=void 0;let g=p instanceof Be?p.code:"",b=g==="unknown_command"?c("未知命令","Unknown command"):g==="session_busy"||g==="bridge_busy"?c("会话忙","Session is busy"):g==="invalid_arguments"||g==="invalid_request"?c("命令输入无效","Invalid command input"):c("原生命令失败","Native command failed");o(c(`${b}:${Re(p)}`,`${b}: ${Re(p)}`))}finally{if(nr.delete(t),N?.session.id===t)Me(),vt(N)}}async function k6(e,t,n){let r=e.session.id,s=(i,o)=>ln(e,i,o,n);switch(t.name){case"new":return F0(),Ls.open;case"resume":case"sessions":return Vr="prompt",oc(),Rn("cli-history-dialog").open;case"name":case"rename":if(t.value!==void 0)return s({action:"rename",name:t.value},c("重命名","Rename"));return V("manage-button").click(),Ye.querySelector('[data-key="name"]')?.focus(),Ye.open;case"session":return Jr(),Ee.open;case"settings":case"setting":return V("manage-button").click(),Ye.querySelector('[data-key="run-settings"]')?.focus(),Ye.open;case"tree":return Jr("overview",Ke,"tree"),Ee.open;case"todo":return Jr("todo",Ke,"todo"),Ee.open;case"tasks":return Jr("subagents",Ke),Ee.open;case"dag":return Jr("dag",Ke),Ee.open;case"help":case"hotkeys":return await kp(e,!0),jt.open;case"reasoning":case"efforts":{let i=U(e.state.model),o=C(e.state.thinkingLevel);if(!Pt(i))return n(c("没有已确认的模型。","No model is selected yet.")),!1;if(!o||!Object.hasOwn(an,o))return n(c("当前思考档未知。","The current thinking level is unknown.")),!1;if(t.name==="reasoning")return Ve(r).commandStatus=o==="off"?c("当前模型推理:关闭。","Model reasoning: off."):c(`当前模型推理:开启(${o})。`,`Model reasoning: on (${o}).`),!0;let a=we(e.options.levels).map(C).filter((u)=>Object.hasOwn(an,u)),l=a.filter((u)=>u!=="off");if(!a.length)return n(c("暂时无法读取可用思考档。","Thinking levels are unavailable.")),!1;if(i.reasoning===!1||!l.length)return n(c("当前模型不支持推理。","This model does not support reasoning.")),!1;if(a.includes("off")&&l.length===1)return n(c("此模型只能开启或关闭推理。","This model can only turn reasoning on or off.")),!1;return Ve(r).commandStatus=c(`当前档位:${o}。可用推理档:${l.join("、")}。`,`Thinking: ${o}. Available levels: ${l.join(", ")}.`),!0}case"fork":return V("web-branch-button").click(),Rn("branch-dialog").open;case"compact":{let i=await s({action:"compact",...t.instructions?{instructions:t.instructions}:{}},c("压缩上下文","Compact context"));if(i)Ve(r).commandStatus=c("上下文已压缩。","Context compaction completed.");return i}case"model":{if(!t.reference){if(j0()&&!Ge("model").disabled)Yn(!0);if(Ge("model").focus(),document.activeElement===Ge("model")){try{Ge("model").showPicker?.()}catch(o){if(!(o instanceof DOMException))throw o}return!0}return n(c("没有可选模型。","No models available.")),!1}let i=we(e.options.models).map(U).filter((o)=>[C(o.id),`${C(o.provider)}/${C(o.id)}`].includes(t.reference??""));if(i.length===1)return s({action:"model",provider:C(i[0].provider),modelId:C(i[0].id)},c("切换模型","Change model"));return n(i.length?c("多个模型同名,请用 provider/model。","Multiple models have that name. Use provider/model."):c("找不到此模型。用 /model 查看列表。","Model not found. Use /model to list available models.")),!1}case"thinking":{if(!t.level){if(j0()&&!Ge("thinking").disabled)Yn(!0);if(Ge("thinking").focus(),document.activeElement===Ge("thinking")){try{Ge("thinking").showPicker?.()}catch(i){if(!(i instanceof DOMException))throw i}return!0}return n(c("没有可选思考档。","No thinking levels available.")),!1}if(!we(e.options.levels).includes(t.level))return n(c("此模型不支持这个思考档。","This model does not support that thinking level.")),!1;return s({action:"thinking",level:t.level},c("切换思考档","Change thinking level"))}case"fast":if(typeof e.state.fastMode!=="boolean")return n(c("此模型没有快速模式。","Fast mode is unavailable for this model.")),!1;return s({action:"fast",enabled:t.mode?t.mode==="on":!e.state.fastMode},c("切换快速模式","Change fast mode"));case"clone":case"copy":Ot.add(r),Me();try{if(t.name==="copy"){let{text:a}=await Fe.request(`${Ze(r)}/last-assistant`);if(typeof a!=="string"||!a)return n(c("没有可复制的助手消息。","No assistant message to copy.")),!1;if(!navigator.clipboard)return n(c("浏览器无法访问剪贴板。","The browser can't access the clipboard.")),!1;return await navigator.clipboard.writeText(a),Ve(r).commandStatus=c("已复制上一条助手消息。","Copied the last assistant message."),!0}let i=await Fe.request(`${Ze(r)}/branches`,{kind:"clone"});if(i.cancelled===!0)return n(c("原生引擎取消了复制。","OmO cancelled the clone.")),!1;let o=un(i.session);if(!o)throw Error(c("本机服务没有返回新会话。","The local service did not return a new session."));if(e===N)up(o,"",{kind:"web",id:r,name:e.session.name});else sr(o);return!0}finally{Ot.delete(r)}}}function ip(){if(!N||N.status!=="ready"||!N.session.active||Oe.get(N.session.id)?.status==="pending")return;let e=Ve(N.session.id);if(e.commandMode||dp(e.text))y6(N);else v6()}async function ln(e,t,n,r,s){let i=e.session.id;if(Ot.has(i)||Oe.get(i)?.status==="pending")return!1;Ot.add(i),r(""),Me(),Ye.setAttribute("aria-busy","true"),Ee.setAttribute("aria-busy","true");try{let o=await ga(e,t);if(e!==N)return!0;if(s?.(o),t.action==="navigate"){if(U(o.result).cancelled===!0)return!1;ya(),Bt?.abort(),Bt=void 0,tr=void 0,$s=void 0,$t?.invalidate(),$i(e),Cn?.abort(),e.workbench=void 0;let a=C(U(o.result).editorText);if(a){let l=Ve(i);if(l.text=a,!l.commandMode)Ke.value=a}}if(t.action==="resume")e.status="loading";if(t.action==="model"||t.action==="thinking")e.modelPreview=void 0;if(await rs(e,t.action==="resume"||t.action==="navigate"),e!==N)return!0;if(t.action==="resume")Sr(e);if(Ye.open)bp(e);if(Ee.open&&t.action!=="abort")ra(e);return!0}catch(o){if(e===N)r(c(`${n}失败:${Re(o)}`,`${n} failed: ${Re(o)}`),o);return!1}finally{if(Ot.delete(i),Ye.removeAttribute("aria-busy"),Ee.removeAttribute("aria-busy"),e===N)Me()}}function F0(){if(it!=="online"||!yt.length||Ls.open)return;ht.stop();let e=Ge("new-cwd");e.replaceChildren(...yt.map((n)=>ot(n,n))),e.value=Er||N?.session.cwd||yt[0]||"";let t=yt.length>1;if(P("new-cwd-field").hidden=!t,P("new-cwd-fixed").hidden=t,P("new-cwd-path").textContent=e.value,Ut("new-name").value="",re(P("new-error")),Ls.showModal(),!t)Ut("new-name").focus()}async function w6(){if(Ri||it!=="online")return;let e=Ge("new-cwd").value;if(!yt.includes(e))return;let t=Ut("new-name").value.trim();if(t.length>120){re(P("new-error"),c("会话名称不能超过 120 个字符。","Keep the session name to 120 characters or fewer."));return}Ri=!0,V("create").disabled=!0,re(P("new-error"));try{let n=await Fe.request("/api/sessions",{cwd:e,...t?{name:t}:{}}),r=un(n.session);if(!r)throw Error(c("本机服务没有返回会话。","The local service did not return a session."));if(Er="",sr(r),!ht.active){if(Tn=r.archived,Ls.open)Ls.close();Pi(r.id)}}catch(n){if(re(P("new-error"),c(`创建失败:${Re(n)}`,`Couldn't create session: ${Re(n)}`)),n instanceof Be&&(n.status===401||n.status===403))Qn(!0)}finally{Ri=!1,rr()}}async function x6(e){let t=e.session.id;if(e!==N||!Ye.open||Oe.get(t)?.status==="pending"||cp(e))return;let n={status:"pending"};Oe.set(t,n),e.history?.invalidate(),Me(),Bs(e),P("manage-handoff-status").focus();let r=()=>N?.session.id===t?N:void 0,s=()=>Ye.open||document.activeElement===V("manage-button")||P("composer-shell").contains(document.activeElement),i=(o,a)=>{let l=s();if(ha(o),o.error="",Ye.open)Ye.close();if(Me(),l&&!document.querySelector("dialog:modal"))P(a).focus()};try{let{session:o,command:a}=await Fe.handoff(t);if(Oe.get(t)!==n)return;Oe.set(t,{status:"released",command:a}),sr(o);let l=r();if(l)i(l,"handoff-title")}catch(o){if(Oe.get(t)!==n)return;let a=!(o instanceof Be)||o.status>=500||o.code==="session_not_open",l=c(`无法转到 CLI:${Re(o)}`,`Couldn't switch to the CLI: ${Re(o)}`),u=r();if(a||u&&!u.session.active){Oe.set(t,{status:"uncertain",error:l});let d=u?.session??_r.get(t);if(d)sr({...d,active:!1,running:!1});if(u)i(u,"session-error");Xr()}else if(Oe.set(t,{status:"failed",error:l}),u){if(Me(),Bs(u),Ye.open&&document.activeElement===P("manage-handoff-status"))P("manage-handoff-error").focus()}if(o instanceof Be&&(o.status===401||o.status===403))Qn(!0)}}function bp(e){let t=P("manage-body"),n=document.activeElement,r=n instanceof HTMLElement&&t.contains(n)?n.dataset.key:void 0,s=e.session.id,i=(R)=>re(P("manage-error"),R),o=y("input");o.type="text",o.required=!0,o.maxLength=120,o.value=e.session.name,o.dataset.key="name";let a=y("form","stack stack--tight"),l=y("button","button",c("保存名称","Save name"));l.type="submit",l.dataset.write="",l.dataset.key="save";let u=y("div","row");u.append(l),a.append(ir(c("会话名称","Session name"),o),u),a.addEventListener("submit",(R)=>{R.preventDefault();let L=o.value.trim();if(!L){i(c("请输入会话名称。","Enter a session name."));return}if(L!==e.session.name)ln(e,{action:"rename",name:L},c("重命名","Rename"),i)});let d=(R,L,B,O=!1)=>{let H=Ue(R,()=>void ln(e,B,R,i));return H.dataset.key=L,H.dataset.write="",H.disabled=O||it!=="online",H},h=y("section","subpanel stack stack--tight"),p=y("div","row");p.append(d(e.session.archived?c("取消归档","Unarchive"):c("归档","Archive"),"archive",{action:"archive",enabled:!e.session.archived}),d(e.session.settled?c("重新标为未结清","Mark as open"):c("标为已结清","Mark as done"),"settle",{action:"settle",enabled:!e.session.settled})),h.append(y("h3","",c("会话状态","Session status")),y("p","small muted",e.session.archived?c("已归档","Archived"):c("未归档","Not archived")),p);let g=y("section","subpanel stack stack--tight"),b=y("div","row"),x=e.state.fastMode,k=e.state.autoCompactionEnabled;if(typeof x==="boolean")b.append(d(x?c("关闭快速模式","Turn off fast mode"):c("开启快速模式","Turn on fast mode"),"fast",{action:"fast",enabled:!x}));if(typeof k==="boolean")b.append(d(k?c("关闭自动压缩","Turn off auto-compaction"):c("开启自动压缩","Turn on auto-compaction"),"auto",{action:"autoCompaction",enabled:!k}));let E=y("h3","",c("运行设置","Run settings"));if(E.dataset.key="run-settings",E.tabIndex=-1,g.append(E),b.childElementCount)g.append(b);let T=y("form","stack stack--tight"),_=y("input");_.type="text",_.maxLength=6000,_.dataset.key="instructions";let A=y("button","button",c("压缩上下文","Compact context"));A.type="submit",A.dataset.write="",A.dataset.idle="",A.dataset.key="compact",A.disabled=it!=="online"||e.running||e.compacting;let D=y("div","row");if(D.append(A),T.append(ir(c("压缩说明(选填)","Compaction instructions (optional)"),_),D),T.addEventListener("submit",(R)=>{if(R.preventDefault(),e.running||e.compacting||Ot.has(s)){i(c("等本轮结束后再压缩。","Wait for this turn to finish before compacting."));return}let L=_.value.trim();ln(e,{action:"compact",...L?{instructions:L}:{}},c("压缩上下文","Compact context"),i)}),g.append(T),l.disabled=it!=="online",t.replaceChildren(a,h,g),r)[...t.querySelectorAll("[data-key]")].find((R)=>R.dataset.key===r)?.focus()}var xr,q0=[];function vp(e,t){if(e!==N)return;let n=Ve(e.session.id);n.commandMode=t,Ke.value=t?n.commandText:n.text,qs(),Me(),Ke.focus()}function yp(e,t){if(e!==N||!Kr.test(t))return;let n=Ve(e.session.id),[r=""]=n.commandText.split(/\s/,1),s=Kr.test(r)?n.commandText.slice(r.length):"";if(n.commandText=`${t}${s||" "}`,n.commandError="",jt.open)jt.close();if(Ee.matches(":modal"))Rr(!1);vp(e,!0),Ke.setSelectionRange(t.length+1,t.length+1)}function H0(e){let t=P("command-list"),n=document.activeElement,r=n instanceof HTMLButtonElement&&t.contains(n)?n.dataset.invocation:void 0,s,i=Ut("command-search").value.trim().toLocaleLowerCase(),o=q0.flatMap((a)=>{let l=C(a.invocation),u=C(a.description),d=C(a.source),h=d==="builtin"?c("内置命令","Built-in"):d==="skill"?c("技能","Skill"):d==="prompt"?c("提示模板","Prompt template"):c("扩展","Extension");if(!Kr.test(l)||!`${l} ${u} ${h} ${d}`.toLocaleLowerCase().includes(i))return[];let p=y("li","stack stack--tight"),g=Ue(l,()=>yp(e,l),"button--quiet path");if(g.dataset.invocation=l,l===r)s=g;return g.setAttribute("aria-label",c(`插入命令:${l}`,`Insert command: ${l}`)),p.append(g,y("p","small muted break",[h,u].filter(Boolean).join(" · "))),[p]});t.replaceChildren(...o),t.hidden=!o.length,s?.focus({preventScroll:!0}),re(P("command-status"),o.length?"":i?c("没有匹配的命令。","No matching commands."):c("此会话没有可用命令。","This session has no listed commands."))}async function kp(e,t=!1){if(jt.open||V("command-picker").disabled)return;xr?.abort();let n=xr=new AbortController;q0=Yo([]);let r=Ut("command-search"),s=ve("command-shortcuts",HTMLDetailsElement);if(s.open=t,r.value="",P("command-list").replaceChildren(),P("command-list").hidden=!0,re(P("command-error")),jt.showModal(),H0(e),t)s.querySelector("summary")?.focus();let i=()=>!n.signal.aborted&&jt.open&&e===N;try{let o=await Fe.request(`${Ze(e.session.id)}/options`,void 0,n.signal);if(!i())return;q0=Yo(o.commands),H0(e)}catch(o){if(!i())return;re(P("command-error"),c(`无法读取扩展命令:${Re(o)}。内置命令仍可用。`,`Couldn't load extension commands: ${Re(o)}. Built-in commands remain available.`))}finally{if(xr===n)xr=void 0}}var Zn,Wt,Bt,_n,Mn,Yt,$t,Tr,Os=!1,tr,$s,Rt,Cr={current:new Map,history:new Map},nn,Fi=!1,P0,Rs,Kn,ba=!1,U0=()=>[...Ee.querySelectorAll('[role="tab"]')],nc=()=>!P("runtime-capabilities").hidden,ns=()=>!P("runtime-metrics").hidden,Ui=()=>!P("runtime-todo").hidden,ua=()=>ve("runtime-memory-branch",HTMLDetailsElement),cn=()=>!P("runtime-subagent").hidden?"tasks":!P("runtime-dag").hidden?"dag":Ui()&&ua().open?"memory":void 0,rc=["todo","dag"],Qr={},Wi=(e)=>ve(`runtime-${e}-history`,HTMLDetailsElement),W0=(e)=>Wi(e).querySelector(".fold-body"),qi=(e)=>Ee.open&&!P(`runtime-${e}`).hidden&&Wi(e).open;function va(e){if(e==="dag"&&nn?.scope==="history")nn=void 0;Qr[e]?.abort(),delete Qr[e];let t=Wi(e),n=t.querySelector("summary");if(W0(e).contains(document.activeElement)&&n?.getClientRects().length)n.focus({preventScroll:!0});t.open=!1,W0(e).replaceChildren()}function wp(){if(Cr.current.clear(),Cr.history.clear(),nn=void 0,Fi)re(P("details-error")),Fi=!1}function ya(){for(let e of rc)va(e);wp()}function E6(){if(Wt?.abort(),Mn?.abort(),Yt?.abort(),Wt=Mn=Yt=void 0,Rt=void 0,wp(),!Ee.open)return;va("dag");let e={status:"unavailable",reason:"binding_unverified"};ts(P("runtime-dag-current"),wn("dag",e)),ts(P("runtime-subagent"),wn("tasks",e))}function da(){let e=V("details-refresh");if(nc()&&Kn)e.setAttribute("aria-disabled","true");else e.removeAttribute("aria-disabled")}function xp(){Kn?.abort(),Kn=void 0,ba=!1;let e=P("capabilities-status");e.textContent="",e.className="sr-only",P("capabilities-content").replaceChildren(),da()}function A6(e){if(Kn)return;let t=Kn=new AbortController,n=()=>Kn===t&&Ee.open&&N===e,r=P("capabilities-status"),s=P("capabilities-content"),i=b0();ba=!0,s.replaceChildren(i),r.className="small muted",r.textContent=c("正在读取能力清单…","Loading capabilities…"),da();let o=AbortSignal.any([t.signal,AbortSignal.timeout(1e4)]);Fe.request(`${Ze(e.session.id)}/capabilities`,void 0,o).then((a)=>{if(!n())return;s.replaceChildren(...bm(a)),r.className="sr-only",r.textContent=c("能力清单已加载。","Capabilities loaded.")},(a)=>{if(!n())return;if(r.className="notice error small",a instanceof Be&&a.status===404&&a.code==="not_found")r.textContent=c("此版本的 Web 服务不提供能力清单。","This Web server does not list capabilities.");else if(a instanceof Be&&(a.code==="session_changed"||a.code==="session_not_open"||a.code==="session_not_found"))r.textContent=c("会话已断开。打开会话后重试。","Session disconnected. Open it and try again.");else r.textContent=c("无法读取能力清单。刷新重试。","Couldn't load capabilities. Refresh to try again.")}).finally(()=>{if(Kn!==t)return;Kn=void 0,da()})}function es(e,t=!0){if(e.getAttribute("aria-selected")==="true")return;if(nn=void 0,Fi)re(P("details-error")),Fi=!1;for(let n of U0()){let r=n===e;n.setAttribute("aria-selected",String(r)),n.tabIndex=r?0:-1;let s=n.getAttribute("aria-controls");if(s)P(s).hidden=!r;if(s==="runtime-todo"&&!r)V0()}for(let n of rc)if(P(`runtime-${n}`).hidden)va(n);if(P("details-scroll").scrollTop=0,Rs=void 0,t&&Ee.open&&N?.status==="ready")Ms(N);da()}function ka(){if(!Rs)return;let e=Rs==="todo"?"#runtime-todo [data-runtime-branch]":"#runtime-tree",t=Ee.querySelector(`${e} details`);if(!t)return;Rs=void 0,t.open=!0;let n=t.querySelector("summary");if(document.activeElement===V(e==="#runtime-tree"?"runtime-open-overview":"runtime-open-todo"))n?.focus({preventScroll:!0}),n?.scrollIntoView({block:"start"})}function Jr(e="overview",t=V("details-button"),n){if(N?.status!=="ready")return;let r=V(`runtime-open-${e}`);if(es(r),P0=t,Rs=n,!Ns.matches&&!Oi)Oi=!0,X0(J0,"open");if(!Ee.open)Ep(N);r.focus({preventScroll:!0}),ka()}function Ep(e){re(P("details-error")),Os=!1;for(let s of Ee.querySelectorAll('[role="tabpanel"]:not(#runtime-capabilities, #runtime-todo, #runtime-dag)'))s.replaceChildren();P("runtime-dag-current").replaceChildren(),P("runtime-todo").querySelector("[data-runtime-branch]")?.remove(),P("runtime-memory-journal").replaceChildren(),P("runtime-memory-branch-content").replaceChildren(),ua().open=!1;let t=()=>N===e&&Ee.open&&ns();Tr=im(Fe,Ze(e.session.id),()=>t()&&e.status==="ready",()=>e.session.active&&it==="online"&&!Ot.has(e.session.id)&&Oe.get(e.session.id)?.status!=="pending",()=>{if(window.confirm(c("清空所有尚未发送的排队输入?","Remove all unsent messages from the queue?")))ln(e,{action:"clearQueue"},c("清空队列","Clear queue"),(s)=>re(P("details-error"),s))});let n=()=>e.session.active&&it==="online"&&!e.running&&!e.compacting&&!e.requests.size&&!(e.queue&&e.queue>0)&&!nr.has(e.session.id)&&!Ot.has(e.session.id)&&Oe.get(e.session.id)?.status!=="pending",r=hm(Fe,Ze(e.session.id),t,n,(s,i)=>{let a=Ve(e.session.id).text.trim()?c("切换上下文位置?选中的消息可能替换当前草稿。","Switch context? The selected message may replace your draft."):c("切换上下文位置?原有分支仍会保留。","Switch context? Existing branches are kept."),l=(u,d)=>{if($t!==r)return;let h=m0(d);if(h)r.invalidate();re(P("details-error"),h?"":u)};if(window.confirm(a))ln(e,{action:"navigate",targetId:s,expectedLeafId:i},c("切换上下文","Switch context"),l,(d)=>{if(U(d.result).cancelled===!0)l(c("本次切换已取消。","Context switch cancelled."))})});if($t=r,P("runtime-metrics").append($t.root),Ns.matches)Ee.showModal();else Ee.open=!0;V("details-button").setAttribute("aria-expanded","true"),P("details-scroll").scrollTop=0,Ms(e)}function Ap(e,t=!1){if(!e||e.status!=="ready"||ht.active||e.consideredDesktopDock&&!t)return;if(e.consideredDesktopDock=!0,!Oi||Ns.matches||Ee.open)return;es(V("runtime-open-overview")),Ep(e)}function Rr(e=!0){if(!Ee.open)return;if(Ee.close(),Zn?.abort(),Zn=void 0,Wt?.abort(),Wt=void 0,Bt?.abort(),Bt=void 0,_n?.abort(),_n=void 0,Mn?.abort(),Mn=void 0,Yt?.abort(),Yt=void 0,$t?.abort(),$t=void 0,Tr?.deactivate(),Tr=void 0,tr=void 0,$s=void 0,Rt=void 0,ya(),V0(),N)N.detailData=void 0;Rs=void 0,xp();let t=V("details-button");t.setAttribute("aria-expanded","false");let n=P0??t;if(P0=void 0,e)(n.getClientRects().length?n:t.hidden?P("conversation"):t).focus({preventScroll:!0})}function Xo(){if(!Ee.matches(":modal"))Oi=!1,X0(J0,"closed");Rr()}function N0(){let e=V("details-button");if(Ns.matches){if(e.setAttribute("aria-haspopup","dialog"),Ee.open&&!Ee.matches(":modal"))Rr(Ee.contains(document.activeElement));return}if(e.removeAttribute("aria-haspopup"),!Ee.matches(":modal")||document.querySelector("dialog:modal:not(#details-dialog)"))return;let t=P("details-scroll"),n=t.scrollTop,r=document.activeElement;if(Ee.close(),Ee.open=!0,r instanceof HTMLElement&&Ee.contains(r))r.focus({preventScroll:!0});t.scrollTop=n}function Yn(e){kr.setAttribute("aria-expanded",String(e))}function j0(){return getComputedStyle(B0).getPropertyValue("--compact-options").trim()==="1"}function C6(){let e=j0();if(e===B0.hasAttribute("data-compact"))return;let t=document.activeElement;if(!e)Yn(!1);if(B0.toggleAttribute("data-compact",e),e&&Ds.contains(t)&&kr.getAttribute("aria-expanded")!=="true")kr.focus({preventScroll:!0});else if(!e&&t===kr)(Ds.querySelector("select:enabled:not([hidden] *)")??Ke).focus({preventScroll:!0})}function G0(e){Zn?.abort();let t=Zn=new AbortController,n=$t?.root,r=Tr,s=()=>!t.signal.aborted&&Ee.open&&ns()&&e===N,i=P("runtime-metrics"),o=(l)=>re(P("details-error"),l),a=!i.querySelector(".runtime-metrics")&&!i.querySelector(":scope > p")?y("p","muted",c("正在读取运行详情…","Loading run details…")):void 0;if(a)i.prepend(a);o(""),Fe.request(`${Ze(e.session.id)}/details`,void 0,t.signal).then((l)=>{if(!s()||!n||!r)return;if(e.detailData=l,Os=!1,wt.online!==!1)tc(e,l.generationSpeed);r.update(Ce(U(l.state).pendingMessageCount)),lm(l,e.state,e.options,{insertCommand:(u)=>yp(e,u)},n,r.root,e.generationSpeed),ka()}).catch((l)=>{if(!s())return;i.querySelector(":scope > p")?.remove(),o(c(`无法读取运行详情:${Re(l)}`,`Couldn't load run details: ${Re(l)}`))}).finally(()=>{if(Zn===t)Zn=void 0})}function _6(e){Bt?.abort();let t=Bt=new AbortController;Qr.todo?.abort(),delete Qr.todo;let n=()=>t===Bt&&Ee.open&&Ui()&&N===e;if(!tr)f0({status:"loading"});let r=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);Fe.request(`${Ze(e.session.id)}/branch-runtime?scope=todo`,void 0,r).catch(()=>({status:"unavailable",reason:"read_failed"})).then((s)=>{if(!n())return;Bt=void 0;let i=fa(tr),o=fa(s);if(i!==void 0&&o!==void 0&&i!==o)ya();if(tr=s,o!==void 0)$t?.checkLeaf(o);if(f0(s),ka(),qi("todo"))ic(e,"todo")}).finally(()=>{if(Bt===t)Bt=void 0})}function fa(e){if(e?.status==="ok"&&(typeof e.leafId==="string"||e.leafId===null))return e.leafId}function S6(e){_n?.abort();let t=_n=new AbortController;if(!$s)h0({status:"loading"});let n=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);Fe.request(`${Ze(e.session.id)}/branch-runtime`,void 0,n).catch(()=>({status:"unavailable",reason:"read_failed"})).then((r)=>{if(t!==_n||!Ee.open||cn()!=="memory"||N!==e)return;$s=r,h0(r)}).finally(()=>{if(_n===t)_n=void 0})}function ts(e,t,n=!0){let s=(d)=>d.dataset.dagKey??d.dataset.taskKey,i=new Set([...e.querySelectorAll(".dag-run, .task-run")].filter((d)=>d.open).flatMap((d)=>s(d)||[])),o=document.activeElement,a=e.contains(o)?o?.closest(".dag-run, .task-run"):void 0,l=a&&s(a);e.replaceChildren(...t);let u=null;for(let d of e.querySelectorAll(".dag-run, .task-run")){let h=s(d);if(h&&n&&i.has(h))d.open=!0;if(h&&h===l)u=d.querySelector("summary")}if(a&&document.activeElement===document.body)(u??e.closest("details")?.querySelector("summary")??e.closest('[role="tabpanel"]'))?.focus({preventScroll:!0})}function sc(){nn=void 0,Fi=!0;let e=P("details-error");if(re(e,c("该 DAG 节点关联已无法核验。可打开相应运行查看最新详情。","This DAG node link is no longer verified. Open the run to see its latest details.")),document.activeElement===V("runtime-open-dag"))e.scrollIntoView({block:"start"})}function Cp(e,t){let n=nn;if(!n||n.scope!==t)return;let r=e.querySelector(`.dag-run[data-dag-key="${n.key}"]`);if(!r){sc();return}if(r.open=!0,document.activeElement===V("runtime-open-dag"))r.scrollIntoView({block:"start"})}function T6(e,t){if(N!==e||!Ee.open||cn()!=="tasks"||!Rt?.taskIndex.has(t.taskKey)||!Cr[t.scope].get(t.key)?.includes(t))return;let n=V("runtime-open-dag");if(es(n,!1),nn=t,n.focus({preventScroll:!0}),ji(e),t.scope==="history"){let r=Wi("dag");r.open=!0,r.scrollIntoView({block:"start"})}}function R6(){let e=new Map;for(let t of Object.values(Cr))for(let n of t.values())for(let r of n)e.set(r.taskKey,e.has(r.taskKey)?null:r);return e}function _p(e,t,n){return{read:async(r,s)=>{let i=AbortSignal.any([n,s,AbortSignal.timeout(28000)]);i.throwIfAborted();let o=await Fe.request(`${Ze(e.session.id)}/native-runtime/dag/${r}?scope=${t}`,void 0,i);return i.throwIfAborted(),o},links:{task:(r)=>Rt?.taskIndex.get(r),openTask:(r)=>{if(e!==N||!Ee.open||cn()!=="dag"||!Rt?.taskIndex.has(r))return;if(es(V("runtime-open-subagents")),Wt)ji(e);let s=P("runtime-subagent").querySelector(`.task-run[data-task-key="${r}"]`),i=s?.querySelector("summary");if(s&&i)s.open=!0,E0(i)}},settled:(r,s,i)=>{if(e!==N||!Ee.open||cn()!=="dag"||n.aborted)return;let o=s.flatMap((l)=>l.taskKey&&Rt?.taskIndex.has(l.taskKey)?[{scope:t,key:r,node:l.id,taskKey:l.taskKey}]:[]);if(s.length)Cr[t==="current"?"history":"current"].delete(r);if(o.length)Cr[t].set(r,o);else Cr[t].delete(r);let a=nn;if(a?.scope!==t||a.key!==r)return;if(o.some((l)=>l.node===a.node&&l.taskKey===a.taskKey)){nn=void 0;let l=document.activeElement;A0(i,a.node,l===V("runtime-open-dag")||l===i.previousElementSibling)}else sc()}}}function Sp(e,t){let n=new Set(t.status==="ok"?we(t.rows).map((s)=>U(s).key):[]),r=Cr[e];for(let[s,i]of r){if(!n.has(s)){r.delete(s);continue}let o=i.filter((a)=>Rt?.taskIndex.has(a.taskKey));if(o.length)r.set(s,o);else r.delete(s)}}function K0(e){return{status:"unavailable",reason:e instanceof Be&&e.status===404&&e.code==="not_found"?"web_unsupported":e instanceof Be&&e.status>=400&&e.status<500?"read_refused":"read_failed"}}function ic(e,t){if(e!==N||!qi(t))return;let n=W0(t),r=fa(tr);if(t==="todo"&&(Bt||r===void 0)){n.replaceChildren(...Wo(Bt?void 0:{status:"ownership_changed"}));return}Qr[t]?.abort();let s=Qr[t]=new AbortController,i=()=>Qr[t]===s&&qi(t)&&N===e,o=Ze(e.session.id);if(t==="todo")n.replaceChildren(...Wo());else if(!n.childElementCount)n.replaceChildren(...wn("dag",void 0,{history:!0}));let a=AbortSignal.any([s.signal,AbortSignal.timeout(20000)]),l=t==="todo"?"/todo-history":"/native-runtime/dag-history";Fe.request(`${o}${l}`,void 0,a).catch(K0).then(async(u)=>{if(!i())return;if(t==="todo"){let p=u.status!=="ok"||r===u.leafId&&r===fa(tr);n.replaceChildren(...Wo(p?u:{status:"ownership_changed"}));return}if(Sp("history",u),!Vo(u)){let p=_p(e,"history",s.signal);ts(n,wn("dag",u,{history:!0,dag:p}),nn?.scope!=="history"),Cp(n,"history");return}if(nn?.scope==="history"){ts(n,wn("dag",u,{history:!0})),sc();return}ts(n,wn("dag",u,{history:!0,snapshot:"waiting"}));let d=AbortSignal.any([s.signal,AbortSignal.timeout(8000)]),h=await Fe.request(`${o}/activity`,void 0,d).catch(K0);if(i())n.replaceChildren(...wn("dag",u,{history:!0,snapshot:h}))})}function ji(e){let t=cn();if(!t||!Rt)return;if(t==="memory"){P("runtime-memory-journal").replaceChildren(Nm(Rt.memory));return}let n=Rt;if(t==="dag"){Mn?.abort();let l=Mn=new AbortController,u=P("runtime-dag-current"),d=_p(e,"current",l.signal);ts(u,wn("dag",n.dag,{dag:d}),!nn),Cp(u,"current");return}let r=Vo(n.tasks),s=r?n.snapshot??"waiting":void 0,i=R6();if(ts(P("runtime-subagent"),wn("tasks",n.tasks,{snapshot:s,taskJump:(l)=>{let u=i.get(l);return u?()=>T6(e,u):void 0}})),!r||n.snapshot||Yt)return;let o=Yt=new AbortController,a=AbortSignal.any([o.signal,AbortSignal.timeout(8000)]);Fe.request(`${Ze(e.session.id)}/activity`,void 0,a).catch(()=>({status:"unavailable"})).then((l)=>{if(Yt!==o||!Ee.open||N!==e||Rt!==n)return;if(n.snapshot=l,cn()==="tasks")ji(e)}).finally(()=>{if(Yt===o)Yt=void 0})}function M6(e){Wt?.abort(),Yt?.abort(),Yt=void 0;let t=Wt=new AbortController,n=()=>Wt===t&&Ee.open&&N===e&&Boolean(cn()),r=cn();if(r==="dag")Mn?.abort(),Mn=void 0;let s=P(r==="memory"?"runtime-memory-journal":r==="dag"?"runtime-dag-current":"runtime-subagent");if(!s.childElementCount){let o=y("p","small muted",c("正在读取原生运行信息…","Loading native runtime…"));o.setAttribute("role","status"),s.append(o)}let i=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);Fe.request(`${Ze(e.session.id)}/native-runtime`,void 0,i).catch((o)=>{let a=K0(o);return{tasks:a,dag:a,memory:a}}).then((o)=>{if(!n())return;let a=U(o.tasks);Rt={tasks:a,dag:U(o.dag),memory:U(o.memory),taskIndex:C0(a)},Sp("current",Rt.dag),ji(e)}).finally(()=>{if(Wt===t)Wt=void 0})}function Ms(e,t=!1){if(e!==N||e.status!=="ready"||!Ee.open)return;if(ns()){if(t||!Zn&&(Os||!e.detailData))G0(e);$t?.activate(),Tr?.activate(t)}else Zn?.abort(),Zn=void 0,$t?.abort(),Tr?.deactivate();if(Ui())if(t||!tr&&!Bt)_6(e);else ka();else Bt?.abort(),Bt=void 0;let n=cn();if(n==="memory"){if(t||!$s&&!_n)S6(e)}else _n?.abort(),_n=void 0;if(n){if(t||!Rt&&!Wt)M6(e);else if(Rt&&!Wt)ji(e)}else Wt?.abort(),Wt=void 0;if(n!=="dag")Mn?.abort(),Mn=void 0;if(n!=="tasks")Yt?.abort(),Yt=void 0;if(t&&qi("dag"))ic(e,"dag");if(nc()){if(t||!ba)A6(e)}else if(Kn)xp()}function ra(e){if(!ns())Os=!0;if(!Ui())tr=void 0;if(cn()!=="memory")$s=void 0;if(!cn())Rt=void 0;if(!nc())ba=!1;Ms(e,!0)}function oc(e){xn(!1),Hi.open(e)}function D6(){let e=()=>{ht.stop(),xn(!1),Z0("cli-follow-button")};V("cli-follow-button").addEventListener("click",()=>{if(ht.active){e();return}xn(!1),Rr(!1),Yn(!1),ht.start(),V("cli-follow-stop").focus({preventScroll:!0})}),V("cli-follow-stop").addEventListener("click",e),V("cli-history-button").addEventListener("click",()=>oc()),V("cli-live-button").addEventListener("click",()=>{ht.stop(),xn(!1),Fs.open()}),V("web-branch-button").addEventListener("click",()=>{if(N&&Oe.get(N.session.id)?.status!=="pending")Y0({kind:"web",id:N.session.id,name:N.session.name})}),V("open-navigation").addEventListener("click",()=>xn(!0)),V("close-navigation").addEventListener("click",()=>xn(!1,!0)),V("nav-scrim").addEventListener("click",()=>xn(!1,!0)),wr=tp(Xm)==="true",Oi=tp(J0)!=="closed",np(),V("rail-toggle").addEventListener("click",()=>{wr=!wr,X0(Xm,String(wr)),np()}),Is.addEventListener("change",()=>{let l=document.activeElement,u=An||l===V("open-navigation")||l===V("rail-toggle")||P("navigation").contains(l);if(xn(!1),u&&!document.querySelector("dialog:modal"))V(Is.matches?"open-navigation":"rail-toggle").focus({preventScroll:!0})}),N0(),Ns.addEventListener("change",()=>{if(N0(),!Ns.matches)Ap(N,!0)}),document.addEventListener("close",(l)=>{if(l.target!==Ee)N0()},!0),new ResizeObserver(C6).observe(Qo("composer"));let t=()=>kr.getAttribute("aria-expanded")==="true";kr.addEventListener("click",()=>Yn(!t()));let n=(l)=>{if(t()&&l.target instanceof Node&&!kr.contains(l.target)&&!Ds.contains(l.target))Yn(!1)};document.addEventListener("click",n),document.addEventListener("focusin",n),document.addEventListener("keydown",(l)=>{if(l.key!=="Escape"||l.defaultPrevented||l.isComposing||document.querySelector("dialog:modal"))return;if(An)xn(!1,!0);else if(t())Yn(!1),kr.focus({preventScroll:!0});else if(Ee.open)Xo()}),Ut("search").addEventListener("input",er),Ge("workspace-select").addEventListener("change",()=>hp(Ge("workspace-select").value)),V("recent").addEventListener("click",()=>{Tn=!1,er()}),V("archived").addEventListener("click",()=>{Tn=!0,er()}),document.addEventListener("visibilitychange",()=>{if(document.hidden)return;if(Xr(),N)la(N);if(N&&Ee.open)Ms(N,!0)}),V("new-welcome").addEventListener("click",F0),V("new-sidebar").addEventListener("click",F0),Qo("new-form").addEventListener("submit",(l)=>{l.preventDefault(),w6()});let r=Rn("session-path-dialog");for(let l of[Ls,Ye,jt,r])for(let u of l.querySelectorAll("[data-close]"))u.addEventListener("click",()=>l.close());V("session-path-trigger").addEventListener("click",()=>{let l=P("session-path").textContent;if(!l||r.open)return;P("session-path-full").textContent=l,re(P("session-path-status")),r.showModal()}),V("session-path-copy").addEventListener("click",async()=>{let l=P("session-path-full"),u=l.textContent;if(!u)return;let d=c("已复制路径。","Path copied.");try{await navigator.clipboard.writeText(u)}catch{d=c("剪贴板不可用。可选中路径手动复制。","Clipboard unavailable. Select and copy the path.")}if(r.open&&l.textContent===u)re(P("session-path-status"),d)}),V("manage-button").addEventListener("click",()=>{if(!N||Ye.open)return;re(P("manage-error")),bp(N),Ye.showModal(),Me()}),Ye.addEventListener("close",Me),V("manage-handoff").addEventListener("click",()=>{if(N)x6(N)}),V("handoff-copy").addEventListener("click",async()=>{let l=N;if(!l)return;let u=Oe.get(l.session.id);if(u?.status!=="released")return;try{await navigator.clipboard.writeText(u.command),u.copyStatus=c("已复制命令。","Command copied.")}catch{u.copyStatus=c("剪贴板不可用。可选中命令手动复制。","Clipboard unavailable. Select and copy the command.")}if(N?.session.id===l.session.id&&Oe.get(l.session.id)===u)Me()}),V("details-button").addEventListener("click",()=>{if(Ee.open)Xo();else Jr()}),V("current-todo").addEventListener("click",()=>Jr("todo",V("current-todo"),"todo"));let s=P("runtime-memory-journal");s.classList.add("fold-body"),P("runtime-memory-branch-content").before(s),ua().addEventListener("toggle",()=>{if(N&&Ee.open&&Ui())Ms(N)});for(let l of rc)Wi(l).addEventListener("toggle",()=>{if(N&&qi(l))ic(N,l);else va(l)});P("runtime-metrics").addEventListener("click",(l)=>{if(!(l.target instanceof Element)||!l.target.closest("#runtime-open-resources"))return;es(V("runtime-open-todo")),ua().open=!0;let u=P("runtime-resources-title");u.focus({preventScroll:!0}),u.scrollIntoView({block:"start"})});for(let l of U0())l.addEventListener("click",()=>es(l));P("runtime-shortcuts").addEventListener("keydown",(l)=>{let u=U0(),d=u.findIndex((p)=>p===l.target);if(d<0)return;let h=l.key==="Home"?u[0]:l.key==="End"?u.at(-1):l.key==="ArrowLeft"?u[(d+u.length-1)%u.length]:l.key==="ArrowRight"?u[(d+1)%u.length]:void 0;if(!h)return;l.preventDefault(),es(h),h.focus({preventScroll:!0})}),V("details-refresh").addEventListener("click",()=>{if(!N||!Ee.open)return;if(Ms(N,!0),ns())$t?.refresh()}),Ee.querySelector("[data-close]")?.addEventListener("click",Xo),Ee.addEventListener("cancel",(l)=>{l.preventDefault(),Xo()}),V("command-mode").addEventListener("click",()=>{if(N)vp(N,!Ve(N.session.id).commandMode)}),V("command-picker").addEventListener("click",()=>{if(N)kp(N)}),mm(jt,Ut("command-search"),P("command-list")),jt.addEventListener("close",()=>{if(!jt.open)xr?.abort()}),Ut("command-search").addEventListener("input",()=>{if(N&&!xr&&P("command-error").hidden)H0(N)}),V("retry").addEventListener("click",()=>{if(clearTimeout(Ti),Ti=0,En?.close(),En=void 0,N)pa(N);if(Xt=Tt==="transport"?"lost":"waiting",Tt!=="transport")Tt=!1;Yr="",Ni="",rr(),Qn(!0)}),V("resume").addEventListener("click",()=>{let l=N;if(!l||V("resume").disabled)return;let u=Oe.get(l.session.id),d=u?.status==="released"||u?.status==="uncertain";if(l.session.active&&!d){l.status="loading",l.error="",Me(),rs(l,!0),Sr(l);return}let h=P("conversation");h.focus(),ln(l,{action:"resume"},c("恢复会话","Resume session"),(p)=>{l.error=p,Me()}).then(()=>{if(l!==N||document.activeElement!==h||document.querySelector("dialog:modal"))return;if(l.status==="ready")Ke.focus();else if(!P("session-error").hidden)P("session-error").focus()})}),Qo("composer").addEventListener("submit",(l)=>{l.preventDefault(),ip()}),Ke.addEventListener("input",()=>{if(!N)return;let l=Ve(N.session.id);if(l.commandStatus=void 0,l.commandMode)l.commandText=Ke.value,l.commandError="";else l.text=Ke.value,l.error="";Me()}),Ke.addEventListener("keydown",(l)=>{if(Ci.key(l))return;if(l.key==="Enter"&&!l.isComposing&&!Ci.composing&&(l.ctrlKey||l.metaKey))l.preventDefault(),ip()}),Ke.addEventListener("focus",Me),Ke.maxLength=200000,Ke.addEventListener("paste",(l)=>{let u=[...l.clipboardData?.files??[]].filter((d)=>d.type.startsWith("image/"));if(u.length)sp(u)}),V("attach").addEventListener("click",()=>Ut("files").click()),Ut("files").addEventListener("change",(l)=>{let u=l.currentTarget;if(u instanceof HTMLInputElement)sp([...u.files??[]]),u.value=""}),Vn.addEventListener("change",()=>{if(!N)return;Ve(N.session.id).mode=Vn.value==="steer"||Vn.value==="follow_up"?Vn.value:"prompt",Me()}),V("stop").addEventListener("click",()=>{let l=N;if(l)ln(l,{action:"abort"},c("停止","Stop"),(u)=>{Ve(l.session.id).error=u,Me()})}),zs.observeTrace(({user:l,assistant:u,tool:d})=>{Mi(Ss.user,l),Mi(Ss.assistant,u),Mi(Ss.tool,d)});let i=matchMedia("(prefers-reduced-motion: no-preference) and (forced-colors: none)"),o;i.addEventListener("change",()=>o?.cancel());let a=(l)=>{if(l.tagName!=="SUMMARY")l.tabIndex=-1;if(l.focus({preventScroll:!0}),l.scrollIntoView({block:"nearest",inline:"nearest"}),o?.cancel(),!i.matches)return;let u=l.animate([{backgroundColor:"var(--trace-arrival)"},{}],{duration:460,easing:"ease-out"});o=u,u.onfinish=u.oncancel=()=>{if(o===u)o=void 0}};for(let l of Object.values(Ss))l.addEventListener("click",()=>{let u=Ts.get(l);if(!sa.hidden&&u?.isConnected)a(u)});V("sidebar-question").addEventListener("click",()=>{let l=Di.firstQuestion;if(!l?.isConnected)return;if(Ee.matches(":modal"))Rr(!1);a(l)}),Jn.addEventListener("change",()=>{let l=N;if(!l||Jn.disabled)return;l.modelSelection=Jn.value||void 0,Me()}),Xn.addEventListener("click",async()=>{let l=N,u=we(l?.options.models).map(U).find((d)=>Pt(d)===l?.modelSelection);if(!l||!u||Xn.disabled)return;if(await ln(l,{action:"model",provider:C(u.provider),modelId:C(u.id)},c("切换模型","Change model"),(d)=>{Ve(l.session.id).error=d,Me()}),N!==l)return;if(l.modelSelection=void 0,Me(),document.activeElement===document.body||document.activeElement===Xn)Jn.focus()}),Ge("thinking").addEventListener("change",()=>{let l=N,u=Ge("thinking").value;if(l&&u&&!Ge("thinking").disabled)ln(l,{action:"thinking",level:u},c("切换思考档","Change thinking level"),(d)=>{Ve(l.session.id).error=d,Me()});else Me()}),Ge("approval").addEventListener("change",()=>{let l=N,u=Ge("approval").value;if(!l||u!=="ask"&&u!=="auto"&&u!=="full-access"){Me();return}if(u==="full-access"&&!window.confirm(c("关闭此会话的审批?工具默认放行,包括删除文件或对外发送数据。原生权限规则仍有效,用户问题仍需回答。","Turn off approval for this session? Tools can delete files or send data without asking. Native rules and user questions still apply."))){Me();return}ln(l,{action:"preset",preset:u},c("切换审批模式","Change approval mode"),(d)=>{Ve(l.session.id).error=d,Me()})})}i6();o6();D6();Qn();
|
|
298
|
+
`)}var Uh=/^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/u,j5=new Intl.NumberFormat(me,{style:"unit",unit:"byte"}),G5=new Intl.NumberFormat(me,{maximumFractionDigits:1}),K5=["KiB","MiB","GiB","TiB","PiB"];function Wh(e,t){if(!e||!Uh.test(e)||!Array.isArray(t)||t.length!==1)return;let n=H(t[0]),r=C(n.text);if(n.type!=="text"||!r||r.length>2048)return;let s;try{s=H(JSON.parse(r))}catch(g){if(g instanceof SyntaxError)return;throw g}let{omoWebAttachment:i,id:o,name:a,size:l}=s;if(Object.keys(s).length!==4||i!==1||typeof o!=="string"||!Uh.test(o)||typeof a!=="string"||!a||a.length>255||/[\\/\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u.test(a)||typeof l!=="number"||!Number.isSafeInteger(l)||l<0)return;let u=l,d;for(let g of K5){if(u<1024)break;u/=1024,d=g}let h=d?`${G5.format(u)} ${d}`:j5.format(u),p=v("a","tool-attachment");return p.href=`/api/sessions/${e}/attachments/${o}`,p.download=a,p.append(`${c("下载","Download")} `,v("bdi","tool-attachment-name",a),` · ${h}`),p}var Si=32768,Gh=160,V5=2048,f0=(e)=>new TextEncoder().encode(e).length,jr=(e)=>e.length<=Si&&f0(e)<=Si,h0=(e)=>{let t=e.replace(/\r\n?/gu,`
|
|
299
|
+
`).split(`
|
|
300
|
+
`);if(t.at(-1)==="")t.pop();return t},Ci=(e)=>e.startsWith("+")?"add":e.startsWith("-")?"remove":"text",gn={},Wr={tooLarge:!0};function _i(e,t){let n=0,r=0;while(n<Gh&&n<t.length){let s=t[n]?.[1].length??0;if(r+=s+1,s>V5||r>Si)break;n++}return{source:e,lines:t.slice(0,n),shortened:n<t.length}}function m0(e){let t=H(e);return C(e)||C(t.input)||C(t.patch)||C(t.patchText)}function J5(e){if(!jr(e))return Wr;let t=h0(e.trim());if(t.shift()!=="*** Begin Patch"||t.pop()!=="*** End Patch")return gn;let n=[],r="",s=!0,i=!1,o=!1,a=!1,l=!1,u=!1;for(let d of t){let h=/^\*\*\* (Add|Update|Delete) File: (\S.*)$/u.exec(r==="Update"&&!o?d.trimEnd():d.trim());if(h){if(!s||l)return gn;if(r=h[1]??"",s=r!=="Update",i=r==="Update",a=o=!1,r==="Delete")u=!0;n.push(["mark",d]);continue}if(i&&/^\*\*\* Move to: \S/u.test(d)){n.push(["mark",d]),i=!1,s=!0;continue}if(i=!1,r==="Add"&&d.startsWith("+"))n.push(["add",d]);else if(r==="Update"&&/^@@(?: |$)/u.test(d))n.push(["mark",d]),o=!1,l=!0,a=!1;else if(r==="Update"&&d==="*** End of File"&&a&&!o)n.push(["mark",d]),o=!0;else if(r==="Update"&&!o&&/^[ +\-]/u.test(d))n.push([Ci(d),d]),a=s=!0,l=!1;else if(d!=="")return gn;else if(r==="Update"&&a&&!o)n.push(["text"," "])}return n.length&&s&&!l?{..._i("patch",n),deletedContentsMissing:u}:gn}function Z5(e,t){let n=e||t;if(!n||!jr(n))return gn;let r=h0(n);if(e){if(!r[0]?.startsWith("--- ")||!r[1]?.startsWith("+++ ")||!r[2]?.startsWith("@@ ")||r.slice(2).some((s)=>!/^(?:@@ |[ +\-]|\$)/u.test(s)))return gn;return _i("native",r.map((s,i)=>[i<2||/^(?:@@ |\\)/u.test(s)?"mark":Ci(s),s]))}if(!r.every((s)=>/^(?:[ +\-]\s*\d+ | +\.\.\.$)/u.test(s))||!r.some((s)=>Ci(s)!=="text"))return gn;return _i("native",r.map((s)=>[Ci(s),s]))}function jh(e){return e.replace(/\r\n?/gu,`
|
|
301
|
+
`).match(/[^\n]*\n|[^\n]+$/gu)??[]}function Y5(e,t){let n=jh(e),r=jh(t);if(n.length+r.length>Gh*2)return;let s=Array.from({length:n.length+1},()=>new Uint16Array(r.length+1));for(let a=n.length-1;a>=0;a--){let l=s[a],u=s[a+1];if(!l||!u)continue;for(let d=r.length-1;d>=0;d--)l[d]=n[a]===r[d]?(u[d+1]??0)+1:Math.max(u[d]??0,l[d+1]??0)}let i=[],o=(a,l)=>{if(i.push([Ci(a),a+l.replace(/\n$/u,"")]),a!==" "&&!l.endsWith(`
|
|
302
|
+
`))i.push(["mark","\\ No newline at end of excerpt"])};for(let a=0,l=0;a<n.length||l<r.length;){let u=n[a],d=r[l];if(u!==void 0&&u===d)o(" ",u),a++,l++;else if(u!==void 0&&(d===void 0||(s[a+1]?.[l]??0)>=(s[a]?.[l+1]??0)))o("-",u),a++;else if(d!==void 0)o("+",d),l++}return i}function X5(e,t){let n=H(t);if(e==="apply_patch")return J5(m0(t));if(e==="delete"||e==="delete_file")return{source:"delete",deletedContentsMissing:!0};if(e==="write"||e==="write_file")return typeof n.content!=="string"?gn:jr(n.content)?_i("text",h0(n.content).map((u)=>["text",u])):Wr;let r=n.edits;if(typeof r==="string"){if(!jr(r))return Wr;try{r=JSON.parse(r)}catch(u){if(u instanceof SyntaxError)return gn;throw u}}let s=Array.isArray(r)?r:r===void 0?[]:[r];if(s.length>24)return Wr;let o=typeof(n.oldText??n.old_string)==="string"||typeof(n.newText??n.new_string)==="string"?[...s,n]:s;if(!o.length)return gn;let a=Si,l=[];for(let[u,d]of o.entries()){let h=H(d),p=h.oldText??h.old_string,g=h.newText??h.new_string;if(typeof p!=="string"||typeof g!=="string")return gn;if(p.length+g.length>a)return Wr;if(a-=f0(p)+f0(g),a<0)return Wr;let b=Y5(p,g);if(!b)return Wr;if(o.length>1)l.push(["mark",`@@ ${u+1} @@`]);l.push(...b)}return _i("excerpts",l)}function Kh(e,t,n){let r=H(n),s=C(r.patch),i=C(r.diff),o=Z5(s,i);if(o.source)return o;return{...X5(e.toLowerCase(),t),missingReceipt:r.omitted===!0||!jr(s||i)}}function Qo(e){if(typeof e==="string")return jr(e)?e:void 0;let t=Si,n=(s,i)=>{if(t-=(typeof s==="string"?s.length:0)+i*2+4,t<0||i>24)return!1;if(Array.isArray(s))return s.length<=t/4&&s.every((a)=>n(a,i+1));let o=H(s);for(let a in o)if(Object.hasOwn(o,a)){if(t-=a.length,!n(o[a],i+1))return!1}return!0};if(!n(e,0))return;let r=JSON.stringify(e,null,2)??"";return jr(r)?r:void 0}var Q5=new Map([["init",c("初始化","Set up list")],["start",c("请求开始","Request to start")],["done",c("请求完成","Request to complete")],["drop",c("请求放弃","Request to drop")],["rm",c("请求移除","Request to remove")],["append",c("追加","Append")],["view",c("查看","View")]]),Vh=24,p0=(e,t)=>typeof e==="string"&&e.length<=t&&Boolean(e.trim())&&!/[\p{Cc}\p{Cf}]/u.test(e);function e6(e){if(e.op!=="init"&&e.op!=="append")return;let t=e.list!==void 0;if(t&&(e.op!=="init"||e.items!==void 0))return;let n=t?e.list:[{items:e.items,phase:e.op==="append"?e.phase:void 0}];if(!Array.isArray(n)||n.length>Vh)return;let r=[],s=0;for(let i of n){let{phase:o,items:a}=H(i);if((t||o!==void 0)&&!p0(o,96))return;if(!Array.isArray(a)||s+a.length>Vh||!a.every((l)=>p0(l,240)))return;if(s+=a.length,a.length)r.push({phase:C(o)||void 0,items:a})}return r}function Jh(e){return e.length<=48&&/^[\p{L}][\p{L}\p{M}\p{N}]*(?: [\p{L}\p{N}][\p{L}\p{M}\p{N}]*)*$/u.test(e)&&(e.includes(" ")||/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u.test(e))&&!/[a-z0-9]{21,}|\d{6,}|\b(?:password|passwd|secret|credential|token|authorization|bearer|api key|private key)\b|凭据|密钥|口令|令牌|密码/iu.test(e)&&!/^(?:bash|sh|zsh|fish|pwsh|powershell|sudo|env|git|cd|ls|cat|printf|echo|rm|cp|mv|mkdir|touch|curl|wget|ssh|scp|chmod|chown|find|grep|rg|node|bun|npm|npx|python3?|pip|uv|docker|kubectl|kubectx|systemctl|make|sed|awk|head|tail|dd|export|set)\b/iu.test(e)}function Zh(e){let t=C(e.op),n=Q5.get(t),r=e6(e),s=r?.flatMap((p)=>p.items)??[],i=s.map((p)=>p.trim()).filter(Jh),a=(t==="start"||t==="done"||t==="drop"||t==="rm")&&e.phase===void 0&&e.list===void 0&&e.items===void 0&&p0(e.task,240)?e.task.trim():void 0,l=a&&Jh(a)?a:void 0,u=l??i[0],d=s.length.toLocaleString(me),h=(s.length-1).toLocaleString(me);return{operation:n&&r!==void 0?c(`${n} · ${d} 项`,`${n} · ${d} ${s.length===1?"task":"tasks"}`):n,preview:u&&s.length>1?c(`${u} · 另 ${h} 项`,`${u} · ${h} more`):u,batches:r??[],card:l?{heading:c("待办变更","Task changes"),titles:[l],total:1}:i.length?{heading:t==="append"?c("新增待办","Add tasks"):c("提交的待办","Tasks submitted"),titles:i,total:s.length}:void 0}}var b0={inspect:"M7 3h6l4 4v6l-4 4H7l-4-4V7Zm8 12 6 6",modify:"m3 15 12-12h3l3 3v3L9 21H3Zm10-10 6 6",terminal:"M3 5h14l4 4v10H7l-4-4Zm4 4 3 3-3 3m6 0h4",memory:"M8 5V3m8 2V3M8 21v-2m8 2v-2M5 5h11l3 3v11H8l-3-3Zm4 4h4m-4 5h6",todo:"M6 3h10l3 3v12l-3 3H5V4Zm2 6 2 2 4-4m-6 9h7",execution:"m8 6-6 6 6 6m8-12 6 6-6 6m-3-14-2 16",context:"M8 4H6L3 7v10l3 3h2m8-16h2l3 3v10l-3 3h-2M8 9h8m-8 6h8",agent:"M8 3h4l3 3v4l-3 3H8l-3-3V6ZM2 21v-3l3-3h10l3 3v3m0-18 4 4v5",web:"M8 3h8l5 5v8l-5 5H8l-5-5V8Zm-5 9h18m-9-9-3 5v8l3 5 3-5V8Z",unknown:"M7 3h10l4 4v10l-4 4H7l-4-4V7Zm2 5 2-1h2l2 2v2l-3 2v1m0 3v.1"},t6=new Map([["create",[c("新建","Create"),c("记忆条目","Memory entry")]],["str_replace",[c("替换","Replace"),c("正文","Content")]],["insert",[c("插入","Insert"),c("正文","Content")]],["delete",[c("删除","Delete"),c("记忆条目","Memory entry")]],["rename",[c("重命名","Rename"),c("名称","Name")]],["update_description",[c("更新描述","Update description"),c("描述","Description")]],["apply_patch",[c("应用补丁","Apply patch"),c("记忆补丁","Memory patch")]]]),n6=new Map([["js","JavaScript"],["javascript","JavaScript"],["ts","TypeScript"],["typescript","TypeScript"],["py","Python"],["python","Python"],["shell","Shell"],["bash","Bash"],["powershell","PowerShell"]]);function Yh(e,t){if(e==="eval"&&t.action!==void 0&&t.action!=="run")return{};let n=e==="eval"?t.language==="js"?"JavaScript":t.language==="py"?"Python":void 0:n6.get(C(t.language).toLowerCase());return{preview:n,source:C(t.code)||void 0,facts:n?[[c("语言","Language"),n]]:void 0}}var ta=/^(?:sk-|gh[pousr]_|github_pat_|xox[baprs]-|AKIA[A-Z0-9]{16}$)/iu,g0=(e)=>typeof e==="string"&&/^[a-z][a-z0-9_-]{0,47}$/u.test(e)&&!ta.test(e);function r6(e){let t=[];for(let[n,r]of[[c("类别","Category"),e.category],[c("角色","Role"),e.subagent_type]])if(g0(r))t.push(`${n} ${r}`);if(typeof e.run_in_background==="boolean")t.push(e.run_in_background?c("后台","Background"):c("前台","Foreground"));return t}var em=24,s6=16384,Gr=(e)=>typeof e==="string"&&e.length<=s6&&/\S/u.test(e);function ea(e,t){if(Array.isArray(e)&&e.length>0&&e.length<=em&&e.every(t))return e.length}function tm(e,t){if(e===void 0&&g0(t))return c(`角色 ${t}`,`Role ${t}`);if(t===void 0&&g0(e))return c(`类别 ${e}`,`Category ${e}`)}function i6(e){if(e.prompt!==void 0||!Array.isArray(e.tasks)||!e.tasks.length||e.tasks.length>em)return;let t=[];for(let n of e.tasks){let r=H(n),s=r.category===void 0?e.category:r.category,i=r.subagent_type===void 0?e.subagent_type:r.subagent_type,o=tm(s,i);if(!o||!Gr(r.prompt))return;t.push({route:o,prompt:r.prompt})}return t}var o6=new Map([["status",c("状态","Status")],["tail",c("最近输出","Recent output")],["full",c("完整输出","Full output")]]);function Kr(e){if(typeof e!=="string"||e.length>65536)return;if(!e.length)return 0;return(e.match(/\r\n|[\n\r]/gu)?.length??0)+(e.endsWith(`
|
|
303
|
+
`)||e.endsWith("\r")?0:1)}function Ti(e){let t=e.toLocaleString(me);return c(`${t} 行`,`${t} ${e===1?"line":"lines"}`)}function Xh(e,t,n){if(e==="apply_patch"){let o=m0(n);if(o.length>65536)return[];let a=o.trim();if(!/^\*\*\* Begin Patch\r?\n/u.test(a)||!/\n\*\*\* End Patch$/u.test(a))return[];let l=[];for(let[u,d]of[["Add",c("提交新增","Add")],["Update",c("提交更新","Update")],["Delete",c("提交删除","Delete")]]){let h=[...a.matchAll(new RegExp(`^\\*\\*\\* ${u} File: [^\\r\\n]+`,"gmu"))].length,p=h.toLocaleString(me);if(h)l.push([d,c(`${p} 个文件`,`${p} ${h===1?"file":"files"}`)])}return l}if(e==="write"||e==="write_file"){let o=Kr(t.content);return o===void 0?[]:[[c("提交文本","Submitted text"),Ti(o)]]}let r=Kr(t.oldText??t.old_string),s=Kr(t.newText??t.new_string),i=[];if(r!==void 0)i.push([c("替换前","Before replacement"),Ti(r)]);if(s!==void 0)i.push([r===void 0?c("提交文本","Submitted text"):c("替换后","After replacement"),Ti(s)]);return i}function Qh(e){let t=C(e),n=/^https?:\/\/([^/?#\\]+)/iu.exec(t)?.[1];if(!n||n.includes("@")||/[\s\\\p{Cc}\p{Cf}]/u.test(t))return;let r=URL.parse(t);if(!r||r.username||r.password)return;let s=r.hostname.replace(/\.$/u,"");if(s.length>253||!/[a-z]/iu.test(s))return;if(!s.split(".").every((i)=>/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/iu.test(i)&&!ta.test(i)))return;return s}function Xn(e){let t=C(e);if(!t||t.length>512||!/^[\p{L}\p{M}\p{N}_.~ /\\-]+$/u.test(t)||t.startsWith("-"))return"";if(t==="."||t===".."||t==="~")return t;let n=t.split(/[/\\]/).filter(Boolean);if(n.some((r)=>ta.test(r)))return"";if(!/[/\\]/.test(t)&&!/^(?:[\p{L}_][\p{L}\p{M}\p{N}_-]{0,23}|[\p{L}\p{N}_-]*\.[\p{L}\p{N}]{1,10})$/u.test(t))return"";return n.length>3?`…/${n.slice(-3).join("/")}`:`${t.startsWith("/")?"/":""}${n.join("/")}`}function v0(e,t){let n=H(t),{path:r,file_path:s,filePath:i}=n,o=e.toLowerCase();switch(o){case"read":case"read_file":return{kind:"inspect",label:c("读取文件","Read file"),group:"Read",target:Xn(r??s??i)};case"grep":return{kind:"inspect",label:c("搜索内容","Search contents"),group:"Grep",target:Xn(r)};case"search":return{kind:"inspect",label:c("搜索内容","Search contents"),target:Xn(r)};case"find":return{kind:"inspect",label:c("查找文件","Find files"),group:"Find",target:Xn(r)};case"glob":return{kind:"inspect",label:c("查找文件","Find files"),group:"Glob",target:Xn(r)};case"ls":case"list":case"list_dir":case"list_directory":case"list_files":return{kind:"inspect",label:c("列出目录","List directory"),group:"List",target:Xn(r)};case"tool_search":return{kind:"inspect",label:c("查找工具","Find tools"),group:"Tool Search"};case"edit":case"edit_file":case"multiedit":case"apply_patch":return{kind:"modify",label:c("编辑文件","Edit file"),target:Xn(r??s??i),facts:Xh(o,n,t)};case"write":case"write_file":return{kind:"modify",label:c("写入文件","Write file"),target:Xn(r??s??i),facts:Xh(o,n,t)};case"delete":case"delete_file":return{kind:"modify",label:c("删除文件","Delete file"),target:Xn(r??s??i)};case"bash":case"shell":case"powershell":return{kind:"terminal",label:o==="powershell"?"PowerShell":o==="shell"?"Shell":"Bash",operation:c("运行命令","Run command"),command:C(n.command)};case"bash_output":return{kind:"terminal",label:"Bash",operation:c("读取输出","Read output")};case"kill_bash":return{kind:"terminal",label:"Bash",operation:c("终止命令","Stop command")};case"memory":{let[a,l]=t6.get(C(n.command))??[];return{kind:"memory",label:"Memory",operation:a,facts:l?[[c("变更对象","Change target"),l]]:void 0}}case"todo":case"todowrite":{let a=Zh(n);return{kind:"todo",label:"Todo",operation:a.operation,preview:a.preview,todo:a}}case"eval":{let a=C(n.action),l=a==="peek"?c("查看执行","View run"):a==="list"?c("列出执行","List runs"):a==="stop"?c("停止执行","Stop run"):a==="run"||n.action===void 0?c("执行脚本","Run script"):void 0;return{kind:"execution",label:"Eval",operation:l,...Yh(o,n),group:l&&a!=="stop"&&(n.reset===void 0||n.reset===!1)?"Eval":void 0}}case"ctx_execute":case"ctx_execute_file":return{kind:"context",label:"Ctx Execute",operation:c("执行脚本","Run script"),group:"Ctx Execute",...Yh(o,n)};case"ctx_search":{let a=ea(n.queries,Gr);return{kind:"context",label:"Ctx Search",operation:c("搜索上下文","Search context"),group:"Ctx Search",facts:a===void 0?void 0:[[c("查询","Queries"),c(`${a.toLocaleString(me)} 条`,a.toLocaleString(me))]]}}case"ctx_batch":{let a=ea(n.commands,Gr),l=ea(n.queries,Gr),u=a!==void 0&&l!==void 0?{preview:c(`提交 ${a.toLocaleString(me)} 条命令 · ${l.toLocaleString(me)} 条查询`,`Submitted ${a.toLocaleString(me)} ${a===1?"command":"commands"} · ${l.toLocaleString(me)} ${l===1?"query":"queries"}`),facts:[[c("命令","Commands"),c(`${a.toLocaleString(me)} 条`,a.toLocaleString(me))],[c("查询","Queries"),c(`${l.toLocaleString(me)} 条`,l.toLocaleString(me))]]}:void 0;return{kind:"context",label:"Ctx Batch",operation:c("批量查询","Batch search"),group:"Ctx Batch",...u}}case"ctx_index":{let a=[[n.path,c("本机文件","Local file")],[n.content,c("提交文本","Submitted text")],[n.url,c("网页地址","Web address")]].filter(([u])=>Gr(u)),l=a.length===1?C(a[0]?.[1]):"";return{kind:"context",label:"Ctx Index",operation:c("收录上下文","Index context"),facts:l?[[c("来源类型","Source type"),l]]:void 0}}case"ctx_purge":{let a=[n.project===!0&&c("项目","Project"),C(n.session)&&c("指定会话","Selected session"),C(n.source)&&c("指定来源","Selected source")].filter(Boolean),l=a.length===1?C(a[0]):"";return{kind:"context",label:"Ctx Purge",operation:c("清除上下文","Clear context"),facts:l?[[c("清除范围","Scope"),l]]:void 0}}case"task":{let a=i6(n),l=a?.map((p)=>p.route),u=n.tasks===void 0?r6(n):void 0,d=n.tasks===void 0&&tm(n.category,n.subagent_type)?C(n.prompt):"",h=l?.length.toLocaleString(me);return{kind:"agent",label:"Agent",operation:c("派发任务","Dispatch tasks"),preview:u?.join(" · ")??(l&&c(`提交 ${h} 项任务`,`Submitted ${h} ${l.length===1?"task":"tasks"}`)),dispatchRoutes:l,agentRouting:u,agentPrompts:a?.map((p)=>p.prompt)??(d.trim()?[d]:void 0)}}case"task_output":return{kind:"agent",label:"Agent",operation:c("查看任务","View task"),scope:o6.get(C(n.mode))};case"task_send":return{kind:"agent",label:"Agent",operation:c("发送消息","Send message")};case"web_search":case"mcp_tinyfish_search":return{kind:"web",label:"Web",operation:c("网页搜索","Search the web"),group:"Web Search",facts:Gr(n.query)?[[c("查询","Queries"),c("1 条","1")]]:void 0};case"webfetch":case"mcp_tinyfish_fetch_content":{let a=Qh(n.url),l=ea(n.urls,Gr),u=l===1&&Array.isArray(n.urls)?Qh(n.urls[0]):void 0,d=a??u;return{kind:"web",label:"Web",operation:c("读取网页","Read webpage"),group:"Web Fetch",preview:d,facts:[...d?[[c("主机","Host"),d]]:[],...l===void 0?[]:[[c("地址","Addresses"),c(`${l.toLocaleString(me)} 个`,l.toLocaleString(me))]]]}}default:return{kind:"unknown",label:/^[\p{L}\p{N}_.:-]{1,80}$/u.test(e)&&/\p{L}/u.test(e)&&!e.split(/[.:]/u).some((l)=>ta.test(l)||/^(?:token|password|authorization|bearer|api[_-]?key)$/iu.test(l))?e:c("工具调用","Tool call")}}}var a6=4;function nm(e,t,n=t.length,r){let s=t.slice(0,a6),i=n-s.length,o=i.toLocaleString(me);return{heading:e,rows:s,note:[r,i>0&&c(`其余 ${o} 项见详情`,`${o} more in details`)].filter(Boolean).join(" · ")}}function rm(e,t){if(!t)return[];let n=Kr(t);return[[e,n===void 0?c("已附","Included"):Ti(n)]]}function sm(e){let t=e.toLocaleString(me);return c(`${t} 行文本`,`${t} ${e===1?"line":"lines"} of text`)}function y0(e){let t=c("可见输出","Visible output"),n=c("已收到文本","Text received");if(typeof e==="string"){let a=Kr(e);return e.length?[[t,a===void 0?n:sm(a)]]:[]}let r=0,s=0;for(let a of ve(e)){let l=H(a);if(l.type==="text"&&typeof l.text==="string"){let u=Kr(l.text);if(u===void 0)return[[t,n]];r+=u}else if(l.type==="image"||l.type==="image_placeholder"||l.type==="imagePlaceholder")s++}let i=s.toLocaleString(me),o=[r&&sm(r),s&&c(`${i} 项图片`,`${i} ${s===1?"image":"images"}`)].filter(Boolean).join(" · ");return o?[[t,o]]:[]}function Ts(e,t,n){if(t.length)return{heading:e,facts:t,note:n}}function l6(e){let t=e.trim().replace(/\s+/gu," "),n=/^[\s\S]{1,140}/u.exec(t)?.[0]??"";return n.length<t.length?`${n}…`:n}function im(e,t){let n=e.facts??[];switch(e.kind){case"todo":{let r=e.todo?.card;if(r)return nm(r.heading,r.titles,r.total);return}case"agent":{let r=e.dispatchRoutes??e.agentRouting;if(r?.length){let s=e.agentPrompts;return{...nm(c("派发配置","Dispatch settings"),r),prompts:s&&{previews:s.slice(0,2).map(l6),count:s.length}}}if(e.scope)return Ts(c("任务读取","Task lookup"),[[c("范围","Scope"),e.scope]]);return}case"terminal":return Ts(c("终端记录","Terminal log"),[...rm(c("命令","Command"),e.command),...y0(t)]);case"execution":case"context":return Ts(e.kind==="execution"?c("脚本记录","Script run"):c("上下文请求","Context request"),[...n,...rm(c("源码","Source code"),e.source),...y0(t)]);case"modify":return Ts(c("提交内容","Submitted changes"),n);case"memory":return Ts(c("记忆变更","Memory changes"),n,c("路径与内容按需查看","Open details to inspect paths and content"));case"web":return Ts(c("网页请求","Web request"),[...n,...y0(t)]);case"inspect":case"unknown":return;default:return e.kind}}function k0(e){let t=v("ul","tool-card-rows");return t.append(...e.map((n)=>v("li","",n))),t}function w0(e,t){let n=(e+1).toLocaleString(me);return t>1?c(`任务 ${n} · 提示词`,`Task ${n} prompt`):c("提示词","Prompt")}function om(e){let t=v("div","tool-card-content");if(t.append(v("p","tool-card-heading",e.heading)),"rows"in e)t.append(k0(e.rows));else{let n=v("dl","tool-card-facts");for(let[r,s]of e.facts){let i=v("div","tool-card-fact");i.append(v("dt","",r),v("dd","",s)),n.append(i)}t.append(n)}if(e.prompts){let{previews:n,count:r}=e.prompts,s=v("div","tool-card-prompts");if(n.forEach((i,o)=>{let a=v("div");a.append(v("p","tool-card-note",w0(o,r)),v("p","tool-card-prompt",i)),s.append(a)}),r>n.length){let i=r-n.length,o=i.toLocaleString(me);s.append(v("p","tool-card-note",c(`其余 ${o} 条提示词见详情`,`${o} more ${i===1?"prompt":"prompts"} in details`)))}t.append(s)}if(e.note)t.append(v("p","tool-card-note",e.note));return t}class x0{node=v("details","tool-group");body=v("ol","tool-group-body");count=v("span","tool-group-count");kinds=v("span","tool-group-kinds");paths=v("span","tool-group-paths");rows=new WeakMap;constructor(){let e=v("summary","tool-group-summary");e.append(this.count," ",this.kinds," ",this.paths),this.node.append(e,this.body)}update(e){let t=new Map,n=new Set,r=!0,s=this.body.firstElementChild;for(let u of e){let d=u.firstElementChild;if(d instanceof HTMLDetailsElement){let p=d.dataset.groupTool;if(p)t.set(p,(t.get(p)??0)+1);r&&=d.dataset.toolKind==="inspect";let g=d.querySelector(":scope > .tool-summary .tool-target:not([hidden])")?.textContent;if(g&&n.size<2)n.add(g)}let h=this.rows.get(u);if(!h)h=v("li","tool-group-row"),this.rows.set(u,h);if(u.parentElement!==h||h.parentElement!==this.body){if(u.contains(document.activeElement)||d instanceof HTMLDetailsElement&&d.open)this.node.open=!0}if(u.parentElement!==h)h.append(u);if(h!==s)this.body.insertBefore(h,s);s=h.nextElementSibling}while(s){let u=s.nextElementSibling;s.remove(),s=u}let i=r?c("探查工具","File and tool lookups"):c("工具调用","Tool calls"),o=e.length.toLocaleString(me),a=c(`${i} · ${o} 项成功`,`${i} · ${o} succeeded`);if(this.count.textContent!==a)this.count.textContent=a;let l=[...t].map(([u,d])=>`${u} ×${d.toLocaleString(me)}`);if(this.kinds.textContent!==l.join(" "))this.kinds.replaceChildren(...l.flatMap((u,d)=>[...d?[" "]:[],v("span","tool-group-kind",u)]));if(this.paths.textContent!==[...n].join(" "))this.paths.replaceChildren(...[...n].flatMap((u,d)=>[...d?[" "]:[],v("code","tool-group-path path",u)]));return this.paths.hidden=!n.size,this.node}}var E0={inspect:c("探查结果","Inspection results"),modify:c("文件变更回执","File change receipt"),terminal:c("终端输出","Terminal output"),todo:c("待办工具回执","Todo receipt"),memory:c("记忆工具回执","Memory receipt"),execution:c("执行结果","Execution results"),context:c("上下文结果","Context results"),agent:c("任务工具输出","Agent tool output"),web:c("网页输出","Web output"),unknown:c("输出","Output")};function c6(e){let t=v("div","tool-scene tool-terminal"),n=hn(""),r=n.querySelector("code"),s=v("div","tool-terminal-input");return n.classList.add("tool-command-preview"),n.setAttribute("aria-label",c("提交的命令","Submitted command")),s.append(v("span","tool-scene-key",c("命令","Command")),n),t.append(s,e),{node:t,update(i){if(s.hidden=!i.command,r)Q(r,i.command)}}}function A0(e,t){let n=v("details",`tool-receipt tool-${e}-receipt`);return n.append(v("summary","",c("查看原始回执","View raw receipt")),t),n}var u6={native:c("Native 回执差异","Native result diff"),excerpts:c("提交的替换片段","Submitted excerpts"),patch:c("提交的补丁","Submitted patch"),text:c("提交的文本","Submitted text"),delete:c("提交的删除请求","Submitted deletion")};function d6(e){let t=v("div","tool-scene tool-file tool-file--modify"),n=A0("file",e),r=v("section","tool-file-change stack stack--tight"),s=v("p","tool-scene-key"),i=hn("");i.classList.add("tool-diff");let o=i.querySelector("code"),a=v("p","small muted tool-diff-notes");return r.append(s,i,a),t.append(n),{node:t,file:{receipt:n,render(l){if(!l){r.remove(),o?.replaceChildren();return}let u=l.source?u6[l.source]:c("文件改动预览","File change preview");s.textContent=u,i.setAttribute("aria-label",u),i.hidden=!l.lines?.length;let d=document.createDocumentFragment();if(l.lines?.forEach(([h,p],g)=>{if(g)d.append(`
|
|
304
|
+
`);d.append(v("span",`tool-diff-line tool-diff-line--${h}`,p))}),o?.replaceChildren(d),Q(a,[l.source==="text"&&c("没有可比较的原文。","No before text available for comparison."),l.deletedContentsMissing&&c("未提供被删内容。","Deleted contents not supplied."),l.tooLarge&&c("内容过大,未生成预览。","Content too large to preview."),l.missingReceipt&&c("回执差异超出大小限制,未提供。","Native result diff omitted: too large."),l.shortened&&c("预览已缩短;可查看原始记录。","Preview shortened; see the raw record."),!l.source&&!l.tooLarge&&!l.missingReceipt&&c("没有可用的改动证据。","Change evidence unavailable."),l.source==="excerpts"&&!l.shortened&&!l.lines?.some(([h])=>h==="add"||h==="remove")&&c("片段未显示文本差异。","No displayed text difference in the excerpts.")].filter(Boolean).join(" ")),!r.parentNode)t.prepend(r)}}}}function f6(e){let t=v("div","tool-scene tool-todo"),n=v("div","tool-todo-list"),r=v("div","tool-todo-board");return n.append(v("p","tool-scene-key",c("提交的待办","Tasks submitted")),r),t.append(n,A0("todo",e)),{node:t,update(s){let i=s.todo?.batches??[];n.hidden=!i.length;let o=1;r.replaceChildren(...i.map((a)=>{let l=v("div","tool-todo-lane stack stack--tight"),u=v("ol");if(u.start=o,o+=a.items.length,u.append(...a.items.map((d)=>v("li","",d))),a.phase)l.append(v("p","small",a.phase));return l.append(u),l}))}}}function am(e,t){let n=v("div",`tool-scene tool-code-desk tool-code-desk--${t?"context":"execution"}`),r=v("details","tool-source"),s=hn(""),i=s.querySelector("code");return r.append(v("summary","",c("查看原始代码","View source code")),s),n.append(r,e),{node:n,update(o){if(r.hidden=!o.source,i)Q(i,o.source)}}}function lm(e,t){switch(e){case"terminal":return c6(t);case"todo":return f6(t);case"memory":{let n=v("div","tool-scene tool-memory-audit");return n.append(v("p","tool-memory-note small muted",c("记忆路径与内容默认隐藏。","Memory paths and content are hidden by default.")),A0("memory",t)),{node:n}}case"execution":return am(t,!1);case"context":return am(t,!0);case"modify":return d6(t);case"inspect":{let n=v("div",`tool-scene tool-file tool-file--${e}`);return n.append(t),{node:n}}case"agent":{let n=v("div","tool-scene tool-agent"),r=v("p","tool-agent-scope small muted"),s=v("div","stack stack--tight"),i=v("div","stack stack--tight"),o=[];return i.hidden=!0,n.append(r,s,i,t),{node:n,update(a){if(Q(r,a.scope&&c(`范围:${a.scope}`,`Scope: ${a.scope}`)),s.hidden=!a.dispatchRoutes,a.dispatchRoutes)s.replaceChildren(v("p","tool-scene-key",c("派发配置","Dispatch settings")),k0(a.dispatchRoutes));let l=a.agentPrompts??[];if(l.length===o.length&&l.every((u,d)=>u===o[d]))return;o=l,i.hidden=!l.length,i.replaceChildren(...l.flatMap((u,d)=>{let h=w0(d,l.length),p=hn(u);return p.classList.add("tool-agent-prompt"),p.setAttribute("aria-label",h),[v("p","tool-scene-key",h),p]}))}}}case"web":{let n=v("div","tool-scene tool-web");return n.append(t),{node:n}}case"unknown":return;default:return e}}var cm={running:{label:c("运行中","Running"),icon:"M12 4a8 8 0 1 0 8 8"},success:{label:c("成功","Succeeded"),icon:"m5 12 4 4L19 6"},error:{label:c("失败","Failed"),icon:"m6 6 12 12M18 6 6 18"},unknown:{label:c("未见结果","No result"),icon:"M6 12h12"},incomplete:{label:c("结果不完整","Incomplete result"),icon:"M12 4v10m0 5v1"}},um=c("工具输出","Tool output"),Rs=(e)=>e?.truncated===!0||e?.partial===!0,dm=(e)=>typeof e.content==="string"||Array.isArray(e.content);function h6(e,t,n){if(n?.isError===!0||C(n?.errorMessage)||t?.stage==="error")return"error";if(Rs(e)||Rs(n)||n?.isError===!1&&!dm(n))return"incomplete";if(n?.isError===!1||t?.stage==="done")return"success";return!n&&t?.stage==="running"?"running":"unknown"}function C0(e,t="16"){let n=document.createElementNS("http://www.w3.org/2000/svg","svg");for(let[r,s]of Object.entries({viewBox:"0 0 24 24",width:t,height:t,"aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))n.setAttribute(r,s);return n.append(e),n}class S0{renderOutputPart;node=v("article","message message--tool");details=v("details","tool-details");label=v("span","tool-label");target=v("span","tool-target path");operation=v("span","tool-operation small muted");preview=v("span","tool-preview small muted");compactFacts=v("span","tool-card-inline small muted");status=v("span","tool-state-text");icon=document.createElementNS("http://www.w3.org/2000/svg","path");kindIcon=document.createElementNS("http://www.w3.org/2000/svg","path");identity=v("p","tool-name small muted",c("工具名:","Tool name: "));name=v("code");args=hn("");argsSection=v("div","stack stack--tight");rawArgs=v("details","tool-raw-args");output=v("div","tool-output stack stack--tight");outputLabel=v("p","small muted",E0.unknown);empty=v("p","muted small");outputSection=v("div","tool-result stack stack--tight");body=v("div","fold-body stack stack--tight");card;cardKey;scene;lastName;lastArgs;lastOutput;lastRawDiff="";renderFileBody;fileKey;fileRawArgs;group;attachment;constructor(e){this.renderOutputPart=e;let t=v("summary","tool-summary"),n=v("span","tool-chevron");n.setAttribute("aria-hidden","true");let r=v("span","tool-subject"),s=C0(this.kindIcon);s.classList.add("tool-kind-icon"),this.compactFacts.hidden=!0,r.append(s,this.label,this.operation,this.target,this.preview,this.compactFacts);let i=v("span","tool-state");i.append(C0(this.icon),this.status),t.append(n,r," ",i),this.identity.append(this.name),this.rawArgs.append(v("summary","",c("原始参数","Raw arguments"))),this.argsSection.append(v("p","small muted",c("调用参数","Call arguments"))),this.output.tabIndex=0,this.output.setAttribute("role","region"),this.output.setAttribute("aria-label",um),this.outputSection.append(this.outputLabel,this.output,this.empty),this.body.append(this.identity),this.details.append(t,this.body),this.node.append(this.details),this.details.addEventListener("toggle",()=>{if(this.details.open)this.renderFileBody?.();else if(this.fileKey)this.scene?.file?.render(),this.fileKey=void 0}),this.rawArgs.addEventListener("toggle",()=>this.renderFileBody?.())}get open(){return this.details.open}set open(e){this.details.open=e}groupWith(e){return this.group??=new x0,this.group.update(e)}updateCard(e,t){let n=im(e,t),r=Boolean(e.preview&&!e.dispatchRoutes),s=n&&JSON.stringify([e.kind,n,r]);if(this.cardKey===s)return;if(this.cardKey=s,this.card?.remove(),this.card=void 0,Q(this.compactFacts,n&&"facts"in n?n.facts.map(([l,u])=>`${l} ${u}`).join(" · "):""),!n)return;let i=v("div","tool-card-preview");if(r)i.dataset.repeatRecap="";let o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("d",e.kind==="todo"?"m3 12 6 6L21 6":b0[e.kind]);let a=C0(o,"0");a.classList.add("tool-card-emblem"),i.append(a,om(n)),this.node.append(i),this.card=i}update(e,t,n,r){let s=C(e?.name)||t?.name||C(n?.toolName),i=e?.arguments===void 0?t?.args:e.arguments,o=n?.content??t?.output,a=v0(s,i),{kind:l,label:u,operation:d,target:h,preview:p,group:g}=a,b=e?C(e.id):t?.id??C(n?.toolCallId),k=Boolean(b&&n?.role==="toolResult"&&n.toolCallId===b&&n.toolName===s),w=h6(e,t,n),A=l==="modify"&&w==="success"&&(!k||n?.isError!==!1)?"unknown":w,_=s==="send_file"&&A==="success"&&n?.role==="toolResult"&&n.toolName===s&&n.isError===!1?Wh(r,n.content):void 0;if(_?.href!==this.attachment?.href||_?.textContent!==this.attachment?.textContent){if(this.attachment?.remove(),this.attachment=_,_)this.node.append(_)}let S=A==="unknown"&&n?c("状态未知","Unknown status"):cm[A].label,E=this.details.dataset.toolKind!==l;if(E){this.details.dataset.toolKind=l,this.kindIcon.setAttribute("d",b0[l]);let F=E0[l];if(this.outputLabel.textContent=F,this.output.setAttribute("aria-label",l==="unknown"?um:F),this.scene?.node.remove(),this.outputSection.remove(),this.argsSection.remove(),this.rawArgs.remove(),this.scene=lm(l,this.outputSection),this.scene?.file?.receipt.addEventListener("toggle",()=>this.renderFileBody?.()),this.fileKey=void 0,this.fileRawArgs=void 0,this.lastOutput=void 0,this.lastRawDiff="",this.output.replaceChildren(),this.body.classList.toggle("tool-generic",!this.scene),this.scene)this.rawArgs.append(this.args),this.body.append(this.scene.node,this.rawArgs);else this.argsSection.append(this.args),this.body.append(this.argsSection,this.outputSection)}if(this.details.dataset.groupTool!==g)if(g)this.details.dataset.groupTool=g;else delete this.details.dataset.groupTool;let R=this.details.dataset.state;if(R!==A)if(this.details.dataset.state=A,this.icon.setAttribute("d",cm[A].icon),A==="running"&&this.scene)this.details.dataset.toolMotion="entry";else if(R==="running"&&(A==="success"||A==="error"))this.details.dataset.toolMotion="settlement";else delete this.details.dataset.toolMotion;if(this.status.textContent!==S)this.status.textContent=S;if(this.label.textContent!==u)this.label.textContent=u;Q(this.operation,d),Q(this.target,h),Q(this.preview,p),Q(this.name,l==="unknown"||s.toLowerCase()===u.toLowerCase()?"":s),this.identity.hidden=this.name.hidden;let L=E||this.lastArgs!==i||this.lastName!==s;if(L||this.lastOutput!==o)this.updateCard(a,o);if(L){if(this.scene?.update?.(a),this.argsSection.hidden=this.rawArgs.hidden=i===void 0,l==="modify")this.args.firstElementChild?.replaceChildren();else this.showArgs($c(i));this.fileRawArgs=void 0,this.lastArgs=i,this.lastName=s}let T=this.scene?.file;if(T){let F=H(A==="success"&&k?n?.fileChange:void 0),I=C(F.patch)||C(F.diff),q=[s,i,I,F.omitted];this.renderFileBody=()=>{if(!this.details.open)return;if(!this.fileKey||q.some((U,j)=>U!==this.fileKey?.[j]))this.fileKey=q,T.render(Kh(s,i,F));if(this.rawArgs.open&&this.fileRawArgs!==i)this.showArgs(Qo(i)??c("原始参数过大,未显示。","Raw arguments omitted: too large.")),this.fileRawArgs=i;if(T.receipt.open)this.showOutput(o,A,n,Qo(I)??"")},this.renderFileBody()}else this.renderFileBody=void 0,this.showOutput(o,A,n)}showArgs(e){let t=this.args.firstElementChild;if(t&&t.textContent!==e)t.textContent=e}showOutput(e,t,n,r){if(this.lastOutput!==e||this.lastRawDiff!==(r??"")){let i=typeof e==="string"?[{type:"text",text:e}]:ve(e),o=r!==void 0&&(i.length>32||Qo(e)===void 0),a=this.output.scrollTop,l=this.output.scrollLeft;if(this.output.replaceChildren(...o?[v("p","small muted",c("原始回执过大,未显示。","Raw receipt omitted: too large."))]:i.flatMap((u)=>{let d=this.renderOutputPart(H(u));if(d?.tagName==="PRE")d.removeAttribute("tabindex");return d??[]})),r){let u=hn(r);u.removeAttribute("tabindex"),u.setAttribute("aria-label",c("原始回执差异","Raw result diff")),this.output.append(u)}this.output.scrollTop=a,this.output.scrollLeft=l,this.lastOutput=e,this.lastRawDiff=r??""}this.output.hidden=!this.output.childElementCount,this.outputLabel.hidden=this.output.hidden,this.empty.hidden=!this.output.hidden;let s=t==="running"?c("等待工具输出…","Waiting for tool output…"):t==="unknown"&&!n?c("没有可见的工具结果。","No tool result is available."):c("无可显示的输出。","No output to display.");if(this.empty.textContent!==s)this.empty.textContent=s}}function fm({entries:e,start:t,liveKey:n,tools:r,calls:s,results:i}){let o=new Map,a=!1,l=[],u=()=>{if(l.length>1)for(let d of l)o.set(C(d.id),l);l=[]};for(let d=t;d<e.length;d++){let h=e[d],p=h?.message;if(!h||!p||p.role!=="assistant"||!a||h.key===n||p.streaming===!0||Rs(p)||C(p.errorMessage)||p.stopReason!==void 0&&p.stopReason!=="toolUse"&&p.stopReason!=="stop"){if(u(),p?.role==="user")a=!Rs(p);continue}let g=ve(p.content).map(H);if(!g.length){u();continue}let b=new Set(g.flatMap((w)=>w.type==="toolCall"?C(w.id)||[]:[])),k=new Map;for(let w=e[d+1]?.message;w?.role==="toolResult";w=e[d+1]?.message){let A=C(w.toolCallId);if(!b.has(A)||k.has(A)||i.get(A)!==d+1)break;k.set(A,w),d++}for(let w of g){let A=C(w.id),_=C(w.name).toLowerCase(),S=k.get(A),E=r.get(A),R=E?.stage,L=w.arguments===void 0?E?.args:w.arguments;if(w.type==="toolCall"&&s.get(A)===1&&v0(_,L).group&&!Rs(w)&&S?.isError===!1&&dm(S)&&!Rs(S)&&!C(S.errorMessage)&&(!C(S.toolName)||C(S.toolName).toLowerCase()===_)&&(R===void 0||R==="done"))l.push(w);else u()}}return u(),o}function na(e){if(!e)return;return e.closest(".tool-group:not([open])")?.querySelector(":scope > summary")??e}function vm(e){return typeof e==="string"?[{type:"text",text:e}]:ve(e)}var ra=Symbol("skill instructions");function m6(e){let t=vm(e.content).map(H);if(e.role!=="user")return t;let n=H(e.historyContent);if(C(n.cursor)){let i=C(n.skillNames);return i?[...t,{type:ra,names:i}]:t}let r=[];return[...t.map((i)=>{let o=i.type==="text"?qh(C(i.text)):void 0;if(!o)return i;return r.push({type:ra,names:Hh(o),text:Ph(o)}),{type:"text",text:o.request}}),...r]}function p6(e,t){let n=t instanceof HTMLDetailsElement?t:Rt("",v("p","plain"));n.classList.add("skill-instructions");let r=C(e.names),s=n.querySelector("summary"),i=c(`Skill 指令 · ${r}`,`Skill instructions · ${r}`);if(s&&s.textContent!==i)s.textContent=i;let o=n.querySelector(":scope > .fold-body > p");if(o){let a=C(e.text);if(o.textContent!==a)o.textContent=a;o.hidden=!a}return n}function ym(e,t,n){if(t==="tool"&&e.type!=="text"&&e.type!=="image"&&e.type!=="image_placeholder"&&e.type!=="imagePlaceholder")return;switch(e.type){case"text":{let r=C(e.text);if(!r)return;return t==="markdown"?d0(r,n):t==="tool"?hn(r):v("p","plain",r)}case"thinking":{let r=C(e.thinking);if(!r)return;let s=n?.querySelector(".plain");if(n&&s)return s.textContent=r,n;return Rt(c("思考过程","Thinking"),v("p","plain muted",r))}case"image":{let r=C(e.data);if(!ao(e.mimeType)||!/^[A-Za-z0-9+/]+={0,2}$/.test(r))return v("p","small muted",c("图片内容不可用","Image unavailable"));let s=v("img");return s.alt=t==="tool"?c("工具输出图片","Tool output image"):c("消息图片","Image attached to message"),s.loading="lazy",s.src=`data:${e.mimeType};base64,${r}`,s}case"image_placeholder":case"imagePlaceholder":return v("p","small muted",c("此图片未包含在会话快照中","This image is not included in the session snapshot."));default:{let r=C(e.type)||c("未知类型","Unknown type");return Object.keys(e).length?v("p","small muted",c(`未展开的内容 · ${r}`,`Content not displayed · ${r}`)):void 0}}}var bn=(e)=>C(e.role),Vr=(e)=>{if(bn(e)==="toolResult"&&C(e.toolCallId))return`result:${C(e.toolCallId)}`;if(C(e.id))return`id:${C(e.id)}`;let t=Ee(e.timestamp);return t===void 0?"":`${bn(e)}:${t}`};function g6(e){let t=Ee(e);if(t===void 0)return;let n=new Date(t);if(!Number.isFinite(n.getTime()))return;let r=v("time","numerical",n.toLocaleTimeString(me,{hour:"2-digit",minute:"2-digit"}));return r.dateTime=n.toISOString(),r.title=n.toLocaleString(me),r}var hm=new IntersectionObserver((e,t)=>{for(let n of e)if(n.target.toggleAttribute("data-in-view",n.isIntersecting),!n.target.isConnected)t.unobserve(n.target)});function b6(e,t,n,r){let s=bn(e),i=r?.role===s?r:void 0,o=s==="user"||s==="assistant",a=i?.node??v("article",o?`message message--${s}`:"message"),l=i?.speaker??v("span","speaker"),u=i?.writing??(s==="assistant"?v("span","message-writing"):void 0),d=s==="assistant"?c("助手","Assistant"):s==="user"?c("你","You"):s==="bashExecution"?c("命令输出","Command output"):c("会话记录","Session record");if(l.textContent!==d)l.textContent=d;let h=i?.body??v("div","message-body"),p=i?.timestamp===e.timestamp?i?.time:g6(e.timestamp),g=i?.header??v("header");if(!i){if(o){let q=document.createElementNS("http://www.w3.org/2000/svg","svg"),U=document.createElementNS("http://www.w3.org/2000/svg","path");q.setAttribute("viewBox","0 0 24 24"),q.setAttribute("fill","currentColor"),q.setAttribute("aria-hidden","true"),q.setAttribute("focusable","false"),U.setAttribute("fill-rule","evenodd"),U.setAttribute("d",s==="user"?"M3 6 6 3h15v15l-3 3H3V6Zm9 1-1.4 1.4 2.6 2.6H7v2h6.2l-2.6 2.6L12 17l5-5-5-5Z":"M12 2 22 12 12 22 2 12 12 2Zm0 3-7 7 7 7 7-7-7-7Zm0 4 3 3-3 3-3-3 3-3Z"),q.append(U);let j=v("span","message-identity");if(l.style.overflowWrap="normal",j.append(q,l),u)u.hidden=!0,u.append(v("span","sr-only",c("正在生成","Writing"))),j.append(u);g.append(j)}else g.append(l);a.append(h)}if(i?.time!==p){if(i?.time?.remove(),p)g.append(p)}let b=m6(e).map((I,q)=>{if(I.type==="toolCall")return{part:I,node:n(I,q)};let U=i?.parts[q];if(U){let re=Object.keys(I);if(U.part===I||re.length===Object.keys(U.part).length&&re.every((ne)=>Object.hasOwn(U.part,ne)&&I[ne]===U.part[ne]))return U}let j=U?.part.type===I.type?U?.node:void 0,J=I.type===ra?p6(I,j):ym(I,s==="assistant"?"markdown":"plain",j);if(J instanceof HTMLDetailsElement&&j instanceof HTMLDetailsElement)J.open=j.open;return{part:I,node:J}}),k=C(e.errorMessage),w=s==="bashExecution"?C(e.output):"",A=C(e.stopReason),_=JSON.stringify([w,k,A]),S=i?.metadata===_?i.notices:[...w?[hn(w)]:[],...k||A==="error"?[v("p","notice error small",k||c("生成失败","Could not generate a response."))]:[],...A==="aborted"?[v("p","muted small",c("已停止生成","Response stopped."))]:[],...A==="length"?[v("p","muted small",c("已达到输出长度限制","Response reached the length limit."))]:[]],E=s==="assistant"&&!S.length&&b.some(({part:I})=>I.type==="toolCall")&&b.every(({part:I,node:q})=>I.type==="toolCall"||!q||I.type==="text"&&!C(I.text).trim());if(a.classList.toggle("message--tool-only",E),E)g.remove();else if(g.parentNode!==a)a.prepend(g);let R=!t||E||Boolean(k)||A==="error"||A==="aborted"||A==="length";if(u&&u.hidden!==R){if(R)hm.unobserve(u),u.removeAttribute("data-in-view");if(u.hidden=R,!R)hm.observe(u)}let L=(E?b.filter(({part:I})=>I.type==="toolCall"):b).flatMap((I)=>I.node??[]),T=new Set(L);for(let I of i?.parts??[])if(I.node?.parentNode===h&&!T.has(I.node))I.node.remove();if(i&&i.notices!==S)for(let I of i.notices)I.remove();let F=h.firstElementChild;for(let I of[...L,...S]){if(I!==F)h.insertBefore(I,F);F=I.nextElementSibling}return{node:a,body:h,header:g,speaker:l,writing:u,time:p,timestamp:e.timestamp,role:s,parts:b,notices:S,metadata:_}}var _0=80,mm=c("加载更早消息","Load older messages"),pm=c("重新加载记录","Reload transcript");function gm(e,t,n){if(e.textContent!==n)e.textContent=n;e.toggleAttribute("data-reload",t?.reload===!0),e.setAttribute("aria-disabled",String(Boolean(t?.busy||t?.disabled))),e.setAttribute("aria-busy",String(t?.busy===!0))}function bm(e){if(e&&!e.busy&&!e.disabled)e.activate()}class Qn{root;scroller;empty;cache=new Map;openFolds=new Map;toolViews=new Map;openTools=new Set;results=new Map;contentViews=new WeakMap;older=Be(mm,()=>{if(this.start)this.flush(!0);else bm(this.latest?.history?.older)},"transcript-load");status=v("span","sr-only");olderError=v("p","notice small");latest;frame;forceBottom=!1;prepended;limit=_0;start=0;first;displayed;indexed;indexedLength=0;constructor(e,t,n){this.root=e;this.scroller=t;this.empty=n;this.status.setAttribute("role","status"),this.olderError.setAttribute("role","status")}reset(){if(this.frame!==void 0)cancelAnimationFrame(this.frame);this.frame=void 0,this.latest=this.displayed=this.indexed=void 0,this.first=void 0,this.forceBottom=!1,this.prepended=void 0,this.limit=_0,this.start=this.indexedLength=0,this.cache.clear(),this.openFolds.clear(),this.toolViews.clear(),this.openTools.clear(),this.results.clear(),this.root.replaceChildren(),this.status.textContent="",this.empty.hidden=!1,this.scroller.scrollTop=0}render(e,t,n,r=!1,s,i,o){if(this.latest={entries:e,liveKey:t,tools:n,history:s,sessionId:o},this.forceBottom||=r,i!==void 0)this.prepended=(this.prepended??0)+i;this.frame??=requestAnimationFrame(()=>{this.frame=void 0,this.flush()})}indexResults(e){if(this.indexed!==e||this.indexedLength>e.length)this.indexed=e,this.indexedLength=0,this.results.clear();for(;this.indexedLength<e.length;this.indexedLength++){let t=e[this.indexedLength]?.message,n=C(t?.toolCallId);if(t?.role==="toolResult"&&n)this.results.set(n,this.indexedLength)}}flush(e=!1){if(!this.latest||e&&!this.start)return;if(this.frame!==void 0)cancelAnimationFrame(this.frame);this.frame=void 0;let{entries:t,liveKey:n,tools:r,history:s,sessionId:i}=this.latest,o=this.prepended;this.prepended=void 0;let a=e||o!==void 0,{scrollTop:l,scrollHeight:u,clientHeight:d}=this.scroller,h=document.activeElement,p=h instanceof HTMLElement&&this.root.contains(h)&&h.closest(".tool-details, .tool-group, .tool-attachment, .transcript-content, .skill-instructions, .prose")?h:void 0,g=p?.matches(".tool-group-summary")?p.parentElement?.querySelector(".tool-summary"):p?.querySelector(".tool-summary"),b=u-d-l<72,k=this.forceBottom||b&&!p&&h!==this.older;this.forceBottom=!1;let w=this.olderError.nextElementSibling,A=a&&w instanceof HTMLElement?w:void 0,_=A?.querySelector(".tool-summary")??void 0,S=a&&p?.closest(".tool-details, .tool-group")&&A?.contains(p)?p:A,E=S?.getBoundingClientRect().top,R=a&&document.activeElement===this.older;this.indexResults(t);let L=[];for(let[N,W]of r)if(!this.results.has(N))L.push({key:`result:${N}`,tool:W});let T=t.length+L.length;if(o!==void 0)this.limit+=o;let F=Math.max(0,T-this.limit);if(!this.displayed||k&&!a)this.start=F;else{if(t!==this.displayed&&this.first){let N=t.findIndex((W)=>W.key===this.first);if(N>=0)this.start=N}this.start=Math.min(this.start,F)}let I=o??0;if(e)I=Math.min(this.start,_0),this.start-=I,this.limit=Math.max(this.limit,T-this.start);else if(o!==void 0)this.start=Math.max(0,this.start-o);this.displayed=t,this.first=t[this.start]?.key;let q=[],U=new Map;for(let N=this.start;N<t.length;N++){let W=t[N];if(!W)continue;let{message:K}=W;if(K.role==="toolResult"){let oe=C(K.toolCallId);if(!oe||this.results.get(oe)===N)q.push({...W,tool:r.get(oe)})}else{let oe=!1;if(K.role==="assistant")for(let ue of vm(K.content)){let Le=H(ue);if(Le.type!=="toolCall")continue;oe=!0;let G=C(Le.id);if(G)U.set(G,(U.get(G)??0)+1)}q.push({...W,live:W.key===n,hasCalls:oe})}}for(let N=Math.max(0,this.start-t.length);N<L.length;N++)q.push(L[N]);let j=fm({entries:t,start:this.start,liveKey:n,tools:r,calls:U,results:this.results}),J=new Set(q.filter((N)=>N.message&&N.message.role!=="toolResult").map((N)=>N.key));for(let[N,W]of this.cache)if(!J.has(N)){let K=[...W.view.body.querySelectorAll(":scope > details:not(.tool-group)")].flatMap((oe,ue)=>oe.open?[ue]:[]);if(K.length)this.openFolds.set(N,K);W.view.node.remove(),this.cache.delete(N)}let re=new Set,ne=(N,W,K,oe)=>{if(re.has(N))return;re.add(N);let ue=this.toolViews.get(N);if(!ue)ue=new S0((G)=>ym(G,"tool")),ue.open=this.openTools.delete(N),this.toolViews.set(N,ue);ue.update(W,K,oe,i);let Le=ue.node.querySelector(":scope > .tool-details > .fold-body");if(Le)this.renderHistoryContent(Le,oe&&s?.content(oe));return ue.node};if(this.older.parentNode!==this.root)this.root.prepend(this.status,this.older,this.olderError);let z=this.start?void 0:s?.older;this.older.hidden=!this.start&&!z;let V=this.start.toLocaleString(me),Z=this.start?c(`加载更早消息(${V} 条)`,`Load older messages (${V})`):z?.reload?pm:z?.busy?c("正在读取…","Loading…"):mm;if(gm(this.older,z,Z),this.olderError.hidden=!z?.error,this.olderError.textContent!==(z?.error??""))this.olderError.textContent=z?.error??"";let de=(N,W)=>{let K=C(W.id),oe=this.results.get(K);return ne(K?`id:${K}`:N,W,r.get(K),oe===void 0?void 0:t[oe]?.message)},te=this.olderError;for(let N of q){let{message:W}=N,K;if(!W||W.role==="toolResult"){let ue=C(W?.toolCallId)||N.tool?.id;if(ue&&U.has(ue))continue;K=ne(ue?`id:${ue}`:`row:${N.key}`,void 0,N.tool,W)}else{let ue=!1;K=this.updateMessage(N,W,(G,ae)=>{let be=C(G.id),ce=j.get(be),xe=`part:${N.key}:${ae}`;if(!ce)return de(xe,G);if(ce[0]!==G){ue=!0;return}let Ce=ce.flatMap((Ve)=>de(xe,Ve)??[]);return this.toolViews.get(`id:${be}`)?.groupWith(Ce)});let Le=this.cache.get(N.key)?.view;if(Le){let G=s?.content(W),ae=Le.parts.filter(({part:Ce})=>Ce.type==="text"),ce=Le.parts.find(({part:Ce})=>Ce.type===ra)?.node?.querySelector(":scope > .fold-body"),xe=ce&&C(H(W.historyContent).skillNames);if(ae.length===1&&ae[0]?.node)ae[0].node.hidden=!xe&&Boolean(G?.chunks.length);if(this.renderHistoryContent(Le.body,xe?void 0:G,W.role==="assistant"&&ae.length===1),ce)this.renderHistoryContent(ce,xe?G:void 0)}if(ue&&K.classList.contains("message--tool-only")&&!this.cache.get(N.key)?.view.body.childElementCount){K.remove();continue}}if(!K)continue;let oe=te.nextElementSibling;if(K!==oe)this.root.insertBefore(K,oe);te=K}for(let[N,W]of this.toolViews)if(!re.has(N)){if(W.open)this.openTools.add(N);W.node.remove(),this.toolViews.delete(N)}if(p&&document.activeElement===document.body){let N=this.root.contains(p)?p:g;if(N&&this.root.contains(N))na(N)?.focus({preventScroll:!0})}if(this.empty.hidden=T>0,a){if(I){let W=I.toLocaleString(me);this.status.textContent=c(`已加载 ${W} 条更早消息。`,`Loaded ${W} older ${I===1?"message":"messages"}.`)}let N=S&&this.root.contains(S)?na(S):na(_);if(N&&this.root.contains(N)&&E!==void 0){if(R&&(I||this.older.hidden)){if(N.tagName!=="SUMMARY")N.tabIndex=-1;N.focus({preventScroll:!0})}this.scroller.scrollTop+=N.getBoundingClientRect().top-E}else if(R&&this.older.hidden)this.scroller.focus({preventScroll:!0})}else if(k)this.scroller.scrollTop=this.scroller.scrollHeight;if(!a&&h===this.older&&this.older.hidden)this.scroller.focus({preventScroll:!0})}renderHistoryContent(e,t,n=!1){let r=this.contentViews.get(e);if(r&&(!t||r.key!==t.key)){let u=r.node.contains(document.activeElement);if(r.node.remove(),this.contentViews.delete(e),r=void 0,u)this.scroller.focus({preventScroll:!0})}if(!t)return;if(!r){let u=v("div","transcript-content stack stack--tight"),d=v("div",n?"prose":"plain break"),h=v("p","small muted");h.setAttribute("role","status");let p=Be("",()=>bm(this.contentViews.get(e)?.control),"button--quiet");u.append(d,h,p),e.append(u),r={key:t.key,node:u,output:d,status:h,button:p,count:0,length:0},this.contentViews.set(e,r)}if(r.control=t.control,t.chunks.length<r.count)r.count=r.length=0,r.output.replaceChildren(),r.output.className=n?"prose":"plain break";let s=t.chunks.slice(r.count),i;if(s.length){let u=r.length;if(r.length+=s.reduce((d,h)=>d+h.length,0),n&&r.length<=Xo)d0(t.chunks.join(""),r.output),i=r.output;else{let d=n&&u<=Xo;if(d)r.output.className="plain break",r.output.replaceChildren(v("p","small muted",c("正文过长,已按纯文本显示。","This long message is displayed as plain text.")));let h=(d?t.chunks:s).map((p)=>v("span","",p));r.output.append(...h),i=h.find((p)=>p.textContent)}}r.count=t.chunks.length,r.output.hidden=!r.count;let o=t.control?.reload?pm:t.control?.busy?c("正在读取…","Loading…"):r.count?c("加载下一段正文","Load next content chunk"):c("加载正文","Load message content");gm(r.button,t.control,o);let a=t.control?.reload?c("记录版本已失效。","This transcript page expired."):t.control?.error??(s.length?c("已加载正文。","Message content loaded."):t.control?.busy||!r.count?"":r.status.textContent);if(r.status.textContent!==a)r.status.textContent=a;if(r.status.hidden=!a,i&&document.activeElement===r.button)i.tabIndex=-1,i.focus({preventScroll:!0});let l=!t.control&&document.activeElement===r.button;if(r.button.hidden=!t.control,l)this.scroller.focus({preventScroll:!0})}updateMessage(e,t,n){let{key:r,hasCalls:s}=e,i=Boolean(e.live),o=this.cache.get(r);if(!s&&o&&o.message===t&&o.live===i)return o.view.node;let a=b6(t,i,n,o?.view);if(o&&a.node!==o.view.node)o.view.node.remove();if(!o){let l=this.openFolds.get(r);if(l){let u=a.body.querySelectorAll(":scope > details:not(.tool-group)");for(let d of l)if(u[d])u[d].open=!0;this.openFolds.delete(r)}}return this.cache.set(r,{message:t,live:i,view:a}),a.node}}function T0(e){let t=H(e),n=C(t.id);if(n)return{id:n,olderCursor:C(t.olderCursor)}}function R0(e){let t=H(e).status;if(t==="truncated"||t==="unavailable")return t}class M0{api;sessionId;current;enabled;tail;changed;reload;id;entries=[];status;stale=!1;reloading=!1;olderCursor;olderError;requests=new Map;contents=new Map;constructor(e,t,n,r,s,i,o,a){this.api=t;this.sessionId=n;this.current=r;this.enabled=s;this.tail=i;this.changed=o;this.reload=a;this.id=e.id,this.olderCursor=e.olderCursor}invalidate(){for(let e of this.requests.values())e.abort();this.requests.clear()}clearExpansion(){this.invalidate(),this.entries=[],this.status=void 0,this.contents.clear()}render(){let e=(t,n,r)=>({activate:this.stale?this.reload:t,disabled:!this.enabled(),busy:this.reloading||this.requests.has(n),reload:this.stale,error:r});return{older:this.olderCursor||this.stale?e(()=>{this.loadOlder()},this.olderCursor,this.olderError):void 0,content:(t)=>{let n=C(H(t.historyContent).cursor);if(!n)return;let r=this.contents.get(n),s=r?.next??n;return{key:n,chunks:r?.chunks??[],control:s?e(()=>{this.loadContent(n,s)},s,r?.error):void 0}}}}async read(e,t,n,r){if(!e||this.stale||!this.current()||!this.enabled()||this.requests.has(e))return;let s=new AbortController,i=()=>this.current()&&this.requests.get(e)===s&&!s.signal.aborted;this.requests.set(e,s),this.changed();let o;try{let a=`${Ge(this.sessionId)}/transcript${t?"/content":""}`,l=await this.api.request(`${a}?${new URLSearchParams({cursor:e})}`,void 0,AbortSignal.any([s.signal,AbortSignal.timeout(20000)]));if(i())o=n(l)}catch(a){if(!i())return;if(a instanceof Ie&&(a.code.includes("cursor")||[400,401,403,404,409,410].includes(a.status)))this.expire();else r(c("读取失败,请重试。","Couldn't load this part. Try again."))}finally{if(i())this.requests.delete(e),this.changed(o)}}expire(){this.stale=!0,this.olderError=c("记录版本已失效,请重新加载。","This transcript page expired. Reload the transcript."),this.invalidate(),this.changed()}async loadOlder(){let e=this.olderCursor;await this.read(e,!1,(t)=>{let n=T0(t.page);if(!n||n.id!==this.id||n.olderCursor===e||!Array.isArray(t.messages)){this.expire();return}let r=new Set([...this.entries,...this.tail()].map((i)=>i.key)),s=ve(t.messages).map(H).filter((i)=>Boolean(bn(i))).flatMap((i,o)=>{let a=Vr(i),l=r.has(a);if(l&&(a.startsWith("id:")||a.startsWith("result:")))return[];let u=a&&!l?a:`older:${this.entries.length}:${o}`;return r.add(u),[{key:u,message:i}]});return this.entries=[...s,...this.entries],this.olderCursor=n.olderCursor,this.olderError=void 0,this.status=R0(t.transcript)??this.status,s.length},(t)=>{this.olderError=t})}async loadContent(e,t){let n=this.contents.get(e)??{next:e,chunks:[]};if(this.contents.set(e,n),n.next!==t)return;await this.read(t,!0,(r)=>{let s=C(r.nextCursor);if(typeof r.text!=="string"||s===t||s&&s===e){this.expire();return}n.chunks.push(r.text),n.next=s,n.error=void 0;return},(r)=>{n.error=r})}}var km={pending:c("等待中","Pending"),queued:c("排队中","Queued"),scheduled:c("已调度","Scheduled"),blocked:c("被依赖阻塞","Blocked by dependencies"),paused:c("已暂停","Paused"),running:c("运行中","Running"),completed:c("已完成","Completed"),done:c("已完成","Completed"),success:c("成功","Succeeded"),failed:c("失败","Failed"),error:c("出错","Error"),cancelled:c("已取消","Canceled"),skipped:c("已跳过","Skipped"),interrupted:c("已中断","Interrupted"),lost:c("已失联","Lost contact")},D0=c("未知时间","Unknown time"),It=new Intl.NumberFormat(me),Dn=(e)=>Object.hasOwn(km,e)?km[e]:void 0,sa=(e)=>Dn(e)??e;function ft(e){let t=Ee(e);if(t===void 0)return D0;let n=new Date(t);return Number.isNaN(n.getTime())?D0:n.toLocaleString(me,{hour12:!1})}function v6(e,t){let n=Ee(e),r=Ee(t);if(n===void 0||r===void 0||r<n)return"";let s=Math.round((r-n)/1000);if(s<60)return c(`${It.format(s)} 秒`,`${It.format(s)} sec`);let i=Math.floor(s/60);if(i<60)return c(`${It.format(i)} 分钟`,`${It.format(i)} min`);let o=It.format(Math.floor(i/60)),a=It.format(i%60);return c(`${o} 小时 ${a} 分钟`,`${o} hr ${a} min`)}function y6(e){let t=v("dl","details-list small numerical");for(let[n,r]of e)if(r)t.append(v("dt","",n),v("dd","",r));return t.childElementCount?t:v("p","small muted",c("当前没有可用数据。","No data available."))}function k6(e,t){let n=ve(e.nodes).map(H),r=ve(e.edges).map(H),s=(o)=>{if(!o)return"";let a=t.get(o),l=a?C(a.description):"";return l?c(`${l}(${o})`,`${l} (${o})`):c(`子任务 ${o}`,`Subtask ${o}`)},i=[];if(n.length)i.push(y6(n.map((o)=>{let a=C(H(o).taskId),l=ve(H(o).upstream).map(C).filter(Boolean),u=It.format(Ee(H(o).attempt)??0);return[C(H(o).label)||C(H(o).id)||c("节点","Node"),[`${sa(C(H(o).state))}`,c(`尝试 ${u} 次`,`Attempts: ${u}`),a?c(`关联:${s(a)}`,`Task: ${s(a)}`):"",l.length?c(`上游:${l.join("、")}`,`Upstream: ${l.join(", ")}`):""].filter(Boolean).join(" · ")]})));else i.push(v("p","small muted",c("这次运行还没有节点记录。","No nodes were recorded for this run.")));if(r.length){let o=v("ul","inline-list");for(let a of r){let l=C(a.fromLabel)||C(a.from),u=C(a.toLabel)||C(a.to);if(l&&u){let d=v("li","stack stack--tight");d.append(v("p","plain",`${l} → ${u}`)),o.append(d)}}if(o.childElementCount)i.push(Rt(c(`依赖边(${It.format(o.childElementCount)})`,`Dependencies (${It.format(o.childElementCount)})`),o))}return Rt(`${C(e.name)||c("运行","Run")} · ${sa(C(e.status))}`,...i)}function w6(e){let t=v("ul","inline-list");for(let n of e){let r=H(n),s=[ft(r.startedAt),r.completedAt===void 0?"":ft(r.completedAt)].filter((u)=>u&&u!==D0),i=v6(r.startedAt,r.completedAt),o=Ee(r.turns),a=Ee(r.toolCalls),l=v("li","stack stack--tight");l.append(v("p","plain",C(r.description)||c("子任务","Subtask"))),l.append(v("p","small muted break",[C(r.id)?c(`任务 ID:${C(r.id)}`,`Task ID: ${C(r.id)}`):"",C(r.parentTaskId)?c(`父任务:${C(r.parentTaskId)}`,`Parent task: ${C(r.parentTaskId)}`):"",C(r.agent)?c(`智能体:${C(r.agent)}`,`Agent: ${C(r.agent)}`):"",C(r.model)?c(`模型:${C(r.model)}`,`Model: ${C(r.model)}`):"",C(r.status)?c(`状态:${sa(C(r.status))}`,`Status: ${sa(C(r.status))}`):"",s.length?c(`时间:${s.join(" → ")}${i?`(耗时 ${i})`:""}`,`Time: ${s.join(" → ")}${i?` (${i} elapsed)`:""}`):"",o!==void 0?c(`轮次:${It.format(o)}`,`Turns: ${It.format(o)}`):"",a!==void 0?c(`工具调用:${It.format(a)}`,`Tool calls: ${It.format(a)}`):""].filter(Boolean).join(" · "))),t.append(l)}return Rt(c(`子任务(${It.format(t.childElementCount)})`,`Subtasks (${It.format(t.childElementCount)})`),t)}var x6={"no-agent-dir":c("原生任务快照不可用:未配置原生配置目录,快照入口已关闭。","Native task snapshots are disabled because no native configuration directory is set."),"invalid-id":c("原生任务快照不可用:会话标识无效,无法定位快照。","Could not locate the native task snapshot: the session ID is invalid."),"session-unavailable":c("原生任务快照不可用:会话尚未接入引擎,请先恢复会话。","Resume the session to connect it to the engine before reading its native task snapshot."),"missing-projection":c("原生任务快照不可用:原生暂无此会话的任务快照,并非读取失败。","The native host has no task snapshot for this session. The read did not fail.")};function wm(e){let t=v("div","stack stack--tight"),n=v("section","subpanel stack stack--tight"),r=v("section","subpanel stack stack--tight");if(n.id="runtime-dag",n.tabIndex=-1,r.id="runtime-subagent",r.tabIndex=-1,n.append(v("h3","",c("DAG 快照","DAG snapshot"))),r.append(v("h3","",c("子代理","Subagents"))),t.append(r,n),C(e.status)!=="ok"){let l=C(e.reason),u=x6[l]??c("原生任务快照不可用。","Native task snapshot unavailable.");return n.append(v("p","small muted",u)),r.append(v("p","small muted",u)),t}let s=[c(`快照时间:${ft(e.updatedAt)}`,`Snapshot time: ${ft(e.updatedAt)}`),e.connected===void 0?c("工作区记录,非实时","Workspace record · Not live"):c(`Herdr 快照,记录时${e.connected===!0?"已连接":"未连接"},非实时`,`Herdr snapshot · ${e.connected===!0?"Connected":"Not connected"} at capture · Not live`)].join(" · ");n.append(v("p","small muted",s)),r.append(v("p","small muted",s));let i=ve(e.runs).map(H),o=ve(e.tasks).map(H);if(!i.length)n.append(v("p","small muted",c("快照中没有 DAG 记录。","No DAG runs in this snapshot.")));let a=new Map(o.map((l)=>[C(l.id),l]));for(let l of i)n.append(k6(l,a));if(o.length)r.append(w6(o));else r.append(v("p","small muted",c("快照中没有子代理记录。","No subagents in this snapshot.")));return t}function xm(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)?e:{}}function Em(e){return typeof e==="number"&&Number.isFinite(e)?e:void 0}function Ms(e){let t=Em(e);return t===void 0||t<0?void 0:t}function Ds(e){let t=xm(e),n=Ms(t.tokens),r=Ms(t.contextWindow??t.window??t.context_window),s=Ms(t.percent??t.percentUsed??t.usagePercent);if(n===void 0&&r===void 0&&s===void 0)return{status:"unavailable",reason:"no-data"};return{status:"ok",...n===void 0?{}:{tokens:n},...r===void 0?{}:{window:r},...s===void 0?{}:{percent:s}}}function ia(e){let t=xm(e),n=Em(t.latestCacheHitRate),r=Ms(t.input),s=Ms(t.cacheRead),i=Ms(t.cacheWrite);if(!((s??0)>0||(i??0)>0||(n??0)>0))return{status:"unavailable",reason:"no-data"};let a=n===void 0||n<0||n>100?void 0:n/100,l;if(r!==void 0&&s!==void 0&&i!==void 0){let u=r+i+s;if(u>0&&Number.isFinite(u))l=s/u}if(a===void 0&&l===void 0)return{status:"unavailable",reason:"no-data"};return{status:"ok",...a===void 0?{}:{latest:a},...l===void 0?{}:{cumulative:l}}}var Ri={off:c("关闭","Off"),minimal:c("极低","Minimal"),low:c("低","Low"),medium:c("中","Medium"),high:c("高","High"),xhigh:c("极高","Extra high"),max:c("最高","Maximum")};function Am(e){let t=H(e),n=Ee(t.tokensPerSecond),r=Ee(t.measuredAt);return n!==void 0&&n>0&&r!==void 0&&r>=0?{tokensPerSecond:n,measuredAt:r}:void 0}function Cm(e,t){let n=ge("runtime-instructions",HTMLDetailsElement),r=ge("runtime-instructions-status",HTMLElement),s=ge("runtime-instructions-text",HTMLPreElement),i=c("当前无法读取 AGENTS.md。关闭后可展开重试。","Could not read AGENTS.md. Close and reopen this section to try again."),o;function a(){o?.abort(),o=void 0,s.hidden=!0,s.textContent="",r.textContent=""}return n.addEventListener("toggle",async()=>{a();let l=t();if(!n.open||!l)return;let u=o=new AbortController,d=()=>o===u&&n.open&&t()===l;r.textContent=c("正在读取工作目录中的 AGENTS.md…","Reading AGENTS.md in the working directory…");try{let h=await e.request(`${Ge(l)}/instructions`,void 0,AbortSignal.any([u.signal,AbortSignal.timeout(18000)]));if(!d())return;switch(h.status){case"ok":if(h.file!=="AGENTS.md"||typeof h.content!=="string"){r.textContent=c("未能验证 AGENTS.md 原文。","Could not verify the contents of AGENTS.md.");break}s.textContent=h.content,s.hidden=!h.content,r.textContent=h.content?c("已读取 AGENTS.md 原文。","Showing AGENTS.md as written."):c("AGENTS.md 是空文件。","AGENTS.md is empty.");break;case"missing":r.textContent=c("当前工作目录没有 AGENTS.md。","There is no AGENTS.md in the working directory.");break;case"unsupported":r.textContent=c("当前宿主或连接方式不支持读取项目规则。","The current host or connection does not support reading project rules.");break;case"refused":r.textContent=c("宿主拒绝读取,或无法确认文件属于当前会话。","The host refused the read or could not verify that the file belongs to this session.");break;case"too_large":r.textContent=c("AGENTS.md 超过读取上限,未显示内容。","AGENTS.md exceeds the read limit. Its contents are not shown.");break;case"unavailable":default:r.textContent=i}}catch(h){if(!d())return;r.textContent=h instanceof Ie&&[401,403,409].includes(h.status)?c("读取被拒绝,或当前会话连接已变化。","The read was refused or the session connection changed."):h instanceof Ie&&h.status===404&&h.code==="not_found"?c("当前 Web 服务不支持读取项目规则。","This Web server does not support reading project rules."):i}finally{if(o===u)o=void 0}}),()=>{n.open=!1,a()}}var _t=new Intl.NumberFormat(me,{maximumFractionDigits:2}),E6=new Intl.NumberFormat(me,{style:"currency",currency:"USD",maximumFractionDigits:5}),ct=(e)=>{let t=Ee(e);return t===void 0?"":_t.format(t)},Sm=(e)=>typeof e==="boolean"?e?c("开启","On"):c("关闭","Off"):"";function Mm(e){let t=v("span","","—");t.setAttribute("aria-hidden","true"),e.append(t,v("span","sr-only",St))}function Dm(e,t=!1){let n=v("dl","details-list small numerical");for(let[r,s]of e)if(s){let o=v("dd",s===St||s===I0||s===N0?"metric-unreported":"");if(t&&s===St)Mm(o);else o.textContent=s;n.append(v("dt","",r),o)}return n.childElementCount?n:v("p","small muted",c("当前没有可用数据。","No data available."))}function Lm(e,...t){let n=v("section","subpanel stack stack--tight");return n.append(v("h3","",e),...t),n}function B0(e,t,...n){let r=Rt(t,...n);return r.dataset.overviewDisclosure=e,r.querySelector("summary")?.setAttribute("data-overview-focus",e),r}function Mi(e,t){let n=v("div","metric-group stack");return n.append(v("p","metric-label small",e),Dm(t,!0)),n}var St=c("尚无数据(原生未报告)","Not reported by the native host"),I0=c("未报告","Not reported"),N0=c("已报告,无数值","Reported without a value"),_m=c("— 表示原生未报告","— means the native host did not report a value");function Tm(e){let t=Ee(e);if(t===void 0)return"";if(t>=1048576)return`${_t.format(t/1048576)} MB`;if(t>=1024)return`${_t.format(t/1024)} KB`;return`${_t.format(t)} B`}function Rm(e){return e===void 0?"":`${_t.format(e*100)}%`}function Jr(e){let t=Ee(e);if(t===void 0)return"";let n=new Date(t);return Number.isNaN(n.getTime())?"":n.toLocaleString(me,{hour12:!1})}function A6(e,t,n){let r=Ds(e.contextUsage);if(r.status==="ok"&&(r.tokens!==void 0||r.window!==void 0||r.percent===0))return r;if(r.status!=="ok"&&Object.hasOwn(e,"contextUsage"))return r;let s=Ds(t.contextUsage);if(s.status==="ok")return s;let i=Ds(n.contextUsage);if(i.status==="ok"&&(!Object.hasOwn(e,"contextUsage")||r.status==="ok"&&i.tokens!==void 0&&i.window!==void 0))return i;return r}function Im(e,t,n){let r=H(e.stats),s=H(e.state),i={...s,...t},o=H(e.sessionMemory),a=H(i.model),l=H(r.tokens??i.usageTotals),u=A6(t,s,r),d=u.status==="ok"?ct(u.tokens):"",h=u.status==="ok"?ct(u.window):"",p=u.status==="ok"?ct(u.percent):"",g=ia(i.usageTotals),b=g.status==="ok"?g.latest:void 0,k=g.status==="ok"?g.cumulative:void 0,w=Ee(l.input),A=Ee(l.cacheRead),_=Ee(l.cacheWrite),S=(N)=>N!==void 0&&N>=0,E=S(w)&&S(A)&&S(_),R=Ee(r.cost),L=H(r.failures),T=Ee(o.mainHeapBytes),F=Ee(o.kernelHeapBytes),I=Ee(o.kernelCount),q=T!==void 0||F!==void 0||I!==void 0,U=p?d?`${d} (${p}%)`:`${p}%`:d,j=Rm(b),J=ct(r.toolCalls),re=R===void 0?"":E6.format(R),ne=v("dl","metric-highlights numerical");for(let[N,W,K]of[["context",c("上下文已用","Context used"),p?`${p}%`:d?c(`${d} token`,`${d} tokens`):""],["cache",c("最新缓存命中率","Latest cache hit rate"),j],["tools",c("工具调用","Tool calls"),J],["cost",c("估算费用","Estimated cost"),re]]){let oe=v("div","metric-tile");oe.dataset.tone=N;let ue=v("dd",K?"":"metric-unreported",K);if(!K)Mm(ue);oe.append(v("dt","",W),ue),ne.append(oe)}let z=C(i.thinkingLevel),V=v("div","row row--between"),Z=v("button","button button--quiet small",c("规则与记忆","Rules and memory"));Z.type="button",Z.id="runtime-open-resources",Z.dataset.overviewFocus="resources",Z.setAttribute("aria-controls","runtime-resources"),V.append(v("h3","",c("运行状态与用量","Runtime and usage")),Z);let de=v("section","subpanel stack stack--tight runtime-metrics");de.append(V,ne,Mi(c("会话设置","Session settings"),[[c("模型","Model"),[C(a.provider),C(a.name)||C(a.id)].filter(Boolean).join(" · ")||St],[c("生效思考档","Active thinking level"),(Object.hasOwn(Ri,z)?Ri[z]:z)||St],[c("快速模式","Fast mode"),Sm(i.fastMode)||St],[c("最近流式 · Web 观测","Latest streaming speed (Web)"),n?`${n.tokensPerSecond<0.01?`<${_t.format(0.01)}`:_t.format(n.tokensPerSecond)} token/s`:c("未测得","Not measured")]]));let te=B0("metrics",c("完整运行明细","Full runtime details"),Mi(c("上下文与缓存","Context and cache"),[[c("上下文已用(原生)","Context used (native)"),U||St],[c("上下文窗口","Context window"),h?c(`${h} token`,`${h} tokens`):St],[c("缓存命中率(原生最新)","Latest cache hit rate (native)"),j||(g.status==="ok"?N0:St)],[c("缓存累计命中率","Cumulative cache hit rate"),Rm(k)||(g.status==="ok"?N0:St)]]),Mi(c("其他设置","Other settings"),[[c("权限预设","Permission preset"),C(i.effectivePermissionPreset)||C(i.permissionPreset)||St],[c("自动压缩","Auto-compaction"),Sm(i.autoCompactionEnabled)||St]]),Mi(c("流量与费用","Usage and cost"),[[c("用户消息","User messages"),ct(r.userMessages)],[c("助手消息","Assistant messages"),ct(r.assistantMessages)],[c("工具调用","Tool calls"),J],[c("输入 token(含缓存)","Input tokens (including cache)"),E?ct(w+A+_):St],[c("未缓存输入 token","Uncached input tokens"),E?ct(w+_):ct(w)],[c("输出 token","Output tokens"),ct(l.output)],[c("缓存读取 token","Cache read tokens"),ct(l.cacheRead)],[c("缓存写入 token","Cache write tokens"),ct(l.cacheWrite)],[c("总 token","Total tokens"),ct(l.total??l.totalTokens)],[c("估算费用","Estimated cost"),re],[c("失败请求","Failed requests"),ct(L.erroredRequests)]]),Mi(c("原生内存","Native memory"),[[c("OmO 宿主主堆(引擎共享)","OmO host heap (shared by the engine)"),T!==void 0?Tm(T):St],[c("本会话内核堆","Session kernel heap"),F!==void 0?Tm(F):q?I0:St],[c("本会话内核数","Session kernel count"),I!==void 0?ct(I):q?I0:St]]));if(te.classList.add("metric-breakdown"),de.append(te),ne.querySelector(".metric-unreported"))ne.after(v("p","metric-key small",_m));else if(te.querySelector(".metric-unreported [aria-hidden='true']"))te.querySelector(".fold-body")?.append(v("p","metric-key small",_m));return de}function C6(e){let t=v("ul","inline-list");for(let n of e){let r=H(n),s=C(r.requestedMode),i={queued:c("排队中","Queued"),sending:c("正在发送","Sending"),held:c("等待中","Waiting"),pending:c("等待中","Waiting"),accepted:c("已接收","Accepted")}[C(r.state)]||"",o=[s==="steer"?c("引导","Steer"):s==="followUp"||s==="follow_up"?c("后续","Follow-up"):"",i].filter(Boolean).join(" · "),a=v("li","stack stack--tight");if(o)a.append(v("span","small muted",o));a.append(v("p","plain",C(r.text)||c("(无文本)","(No text)"))),t.append(a)}return t}function Nm(e,t,n,r,s){let i=v("p","small muted"),o=v("p","small muted");o.setAttribute("role","status");let a=v("div","stack stack--tight"),l=B0("queue",c("预览待处理输入","Preview pending inputs"),o,a),u=Be(c("清空队列","Clear queue"),s,"button--danger");u.dataset.overviewFocus="queue:clear",u.dataset.write="";let d=v("div","row");d.append(u);let h=Lm(c("输入队列","Input queue"),i,d,l),p,g,b=!1,k=!1,w=()=>{let R=!(p!==void 0&&p>0)&&!k;u.toggleAttribute("data-unavailable",R),u.disabled=R||!r()},A=(R="",...L)=>{if(a.contains(document.activeElement))l.querySelector("summary")?.focus({preventScroll:!0});Q(o,R),a.replaceChildren(...L)},_=()=>{if(!b)return;g?.abort(),g=void 0,b=k=!1,A(),w()},S=()=>h.isConnected&&l.open&&n(),E=(R=!1)=>{if(!S())return;if(b&&!R)return;g?.abort();let L=g=new AbortController;b=!0,k=!1,w(),A(c("正在读取待处理输入…","Loading pending inputs…"));let T=()=>g===L&&S(),F=(I=!1)=>{A(I?c("队列响应超出读取上限。","The queue response exceeded the read limit."):c("无法读取待处理输入。","Couldn't load pending inputs."),Be(c("重试队列预览","Retry queue preview"),()=>E(!0),"button--quiet"))};e.request(`${t}/queue`,void 0,L.signal).then((I)=>{if(!T())return;if(!Array.isArray(I.inputs)){F();return}k=I.inputs.length>0,w(),A(I.truncated===!0?c("预览已截断,仅显示部分队列内容。","Preview truncated. Only part of the queue is shown."):k?"":c("没有可预览的待处理输入。","No pending inputs to preview."),...k?[C6(I.inputs)]:[])},(I)=>{if(T())F(I instanceof Ie&&I.code==="queue_too_large")}).finally(()=>{if(g===L)g=void 0})};return l.addEventListener("toggle",()=>{if(l.open)E();else _()}),{root:h,activate:E,deactivate:_,update(R){p=R,i.textContent=R===void 0?c("待处理输入数量未知。","Pending input count unknown."):R>0?c(`${_t.format(R)} 条待处理输入`,`${_t.format(R)} pending ${R===1?"input":"inputs"}`):c("没有排队的输入。","No queued inputs."),w()}}}function S6(e,t){let n=ve(e.commands).map(H).filter((i)=>Boolean(C(i.invocation))),r=Lm(c("可用命令","Available commands"));if(!n.length)return r.append(v("p","muted small",c("未读取到可用命令。","No commands were returned."))),r;let s=v("ul","command-list");for(let i of n){let o=C(i.invocation),a=Be(o,()=>t.insertCommand(o),"button--quiet path");a.title=c("插入输入框,不会立即发送","Insert in the input box without sending"),a.setAttribute("aria-label",c(`插入命令:${o}`,`Insert command: ${o}`)),a.dataset.overviewFocus=`command:${o}`;let l=v("li","stack stack--tight");if(l.append(a),C(i.description))l.append(v("p","small muted break",C(i.description)));s.append(l)}return r.append(B0("commands",c(`${_t.format(n.length)} 项 · 展开后可插入输入框`,`${_t.format(n.length)} ${n.length===1?"command":"commands"} · Expand to insert`),s)),r}var _6={pending:c("待办","Pending"),in_progress:c("进行中","In progress"),completed:c("已完成","Completed"),abandoned:c("已放弃","Abandoned")},L0={"missing-tree":c("快照缺少会话树","The snapshot has no session tree."),"invalid-leaf":c("活动分支标识无效","The active branch ID is invalid."),"unknown-leaf":c("活动分支不在会话树中","The active branch is not in the session tree."),"duplicate-id":c("会话树有重复标识","The session tree contains duplicate IDs."),"broken-ancestry":c("分支链断裂或指向其他分支","The branch chain is broken or points to another branch."),"tree-budget":c("会话树超出读取上限,可能不完整","The session tree exceeds the read limit and may be incomplete."),incomplete:c("分支记录超出读取上限","The branch records exceed the read limit."),ownership_changed:c("会话或活动分支已变化","The session or active branch changed."),binding_unverified:c("无法确认会话归属","The session binding could not be verified."),unsupported:c("当前宿主不支持有界分支读取","The current host does not support bounded branch reads."),malformed:c("原生返回的分支数据格式无效","The native host returned invalid branch data.")};function T6(e){let t=v("section","subpanel stack stack--tight");if(t.append(v("h3","",c("当前待办","Current Todo"))),e.status==="loading"){let s=v("p","small muted",c("正在读取当前分支…","Loading the active branch…"));return s.setAttribute("role","status"),t.append(s),t}if(C(e.status)==="invalid"){let s=L0[C(e.reason)]??c("未知原因","Unknown reason.");return t.append(v("p","small muted",c(`当前分支未确认 · ${s}`,`Current branch unverified · ${s}`))),t}if(C(e.status)!=="ok"){let s=L0[C(e.reason)];return t.append(v("p","small muted",s?c(`分支不可用 · ${s}`,`Branch unavailable · ${s}`):c("分支不可用。可刷新重试。","Branch unavailable. Refresh to retry."))),t}let n=C(e.leafId);t.append(v("p","small muted",n?c(`活动分支:${n}`,`Active branch: ${n}`):c("当前没有活动分支。","No branch is active.")));let r=H(e.todo);if(C(r.status)==="ok"){let s=Bm(r),i=s.childElementCount;if(i){let o=Rt(c(`待办(${_t.format(i)} 组)`,`Todo (${_t.format(i)} ${i===1?"group":"groups"})`),s);o.open=!0,t.append(o)}}else if(r.status==="none")t.append(v("p","small muted",c("所选分支没有当前待办。","No current Todo on the selected branch.")));else{let s=L0[C(r.reason)]??"";t.append(v("p","small muted",[c("当前待办不可用,数量未知。可刷新重试。","Current Todo is unavailable. The task count is unknown. Refresh to try again."),s].filter(Boolean).join(" ")))}return t}function Bm(e){let t=v("ul","inline-list");for(let n of ve(e.phases).map(H)){let r=v("li","stack stack--tight");r.append(v("p","plain break",C(n.name)||c("待办","Todo")));let s=v("ul","inline-list");for(let i of ve(n.tasks).map(H)){let o=v("li");o.append(v("p","small break",`${_6[C(i.status)]??C(i.status)} · ${C(i.content)}`)),s.append(o)}if(s.childElementCount)r.append(s);t.append(r)}return t}function oa(e){let t=v("p","small muted");if(t.setAttribute("role","status"),!e)return t.textContent=c("正在读取已记录的待办列表…","Loading recorded Todo lists…"),[t];if(e.status!=="ok"||!Array.isArray(e.snapshots)||typeof e.limitReached!=="boolean")return t.textContent=e.status==="ownership_changed"?c("无法核验历史所属分支。可刷新重试。","The branch for this history could not be verified. Refresh to try again."):c("无法读取已记录的待办列表。可刷新重试。","Recorded Todo lists are unavailable. Refresh to try again."),[t];let n=ve(e.snapshots).map(H);t.textContent=n.length?c("所选分支已记录的列表,按新到旧排列。","Recorded lists for the selected branch, newest first."):e.limitReached?c("在读取范围内未找到已记录的列表,更早的记录未知。","No recorded lists in the read window. Older records are unknown."):c("所选分支没有已记录的历史列表。","No recorded lists for the selected branch.");let r=v("ol","inline-list");for(let[s,i]of n.entries()){let o=v("li","stack stack--tight");o.append(v("h4","",c(`记录 ${_t.format(s+1)}`,`Recorded list ${_t.format(s+1)}`)),Bm(i)),r.append(o)}return[t,...n.length?[r]:[],...n.length&&e.limitReached?[v("p","small muted",c("已达历史读取上限,更早的记录可能未显示。","The read limit was reached. Older records may not appear."))]:[]]}function R6(e){if(e.status==="loading")return[v("p","small muted",c("正在读取当前分支…","Loading the active branch…"))];if(e.status!=="ok")return[v("p","small muted",c("当前分支未确认","Current branch unverified"))];let t=H(e.memory);if(C(t.status)!=="ok")return[v("p","small muted",c("当前分支没有召回记录;不代表未启用长期记忆。","No recall record for this branch. Long-term memory may still be enabled."))];let n=Ee(t.recalledCount),r=Jr(t.recentRecalledAt),s=H(t.gate),i=H(t.unavailable),o=s.status==="failed"||s.status==="skipped"?c(`${s.status==="failed"?"失败":"跳过"} · 连续 ${ct(s.consecutiveFailures)} 次 · 候选 ${ct(s.candidateCount)}${Jr(s.at)?` · ${Jr(s.at)}`:""}`,`${s.status==="failed"?"Failed":"Skipped"} · Consecutive failures: ${ct(s.consecutiveFailures)} · Candidates: ${ct(s.candidateCount)}${Jr(s.at)?` · ${Jr(s.at)}`:""}`):"",a=Ee(i.count),u=[[c("长期记忆召回条目(累计,仅计数)","Long-term memory recalls (total count)"),n!==void 0?ct(n):""],[c("最近召回时间","Last recall"),r],[c("召回门控","Recall gate"),o],[c("记忆不可用记录(仅计数)","Memory unavailability records (count only)"),a!==void 0?`${ct(a)}${Jr(i.at)?` · ${Jr(i.at)}`:""}`:""]].filter(([,d])=>Boolean(d));return[v("p","small muted",c("当前分支 · 召回计数与状态","Current branch · Recall counts and status")),u.length?Dm(u):v("p","small muted",c("有记忆聚合记录,但暂无可显示的数值。","Memory records exist, but there are no values to show."))]}function Om(e,t,n){let r=ge("runtime-metrics",HTMLElement).querySelector(".runtime-metrics");if(!r)return;let s=Im(e,t,n),i=r.querySelector("details"),o=s.querySelector("details"),a=document.activeElement,l=a instanceof HTMLElement&&r.contains(a)?a.dataset.overviewFocus:void 0;if(i&&o)o.open=i.open;if(r.replaceWith(s),l)s.querySelector(`[data-overview-focus="${CSS.escape(l)}"]`)?.focus({preventScroll:!0})}function $m(e,t,n,r,s,i,o){let a=ge("runtime-metrics",HTMLElement),l=document.activeElement,u=l instanceof HTMLElement&&a.contains(l)?l.dataset.overviewFocus:void 0,d=new Set([...a.querySelectorAll("details[open]")].map((h)=>h.dataset.overviewDisclosure));for(let h of[...a.children])if(h!==s&&h!==i)h.remove();if(i.parentElement!==a)a.prepend(i);if(a.prepend(Im(e,t,o)),i.after(S6(n,r)),a.querySelectorAll("details[data-overview-disclosure]").forEach((h)=>{h.open=d.has(h.dataset.overviewDisclosure)}),u!==void 0&&document.activeElement!==l){let h=a.querySelector(`[data-overview-focus="${CSS.escape(u)}"]:not(:disabled)`);((h?.getClientRects().length)?h:a).focus({preventScroll:!0})}}function O0(e){let t=ge("runtime-todo",HTMLElement),n=document.activeElement,r=T6(e),s=t.querySelector("[data-runtime-branch]"),i=s?.querySelector("details"),o=r.querySelector("details");if(i&&o)o.open=i.open;let a=i?.querySelector("summary")===n;if(r.dataset.runtimeBranch="",s)s.replaceWith(r);else t.prepend(r);if(a)(o?.querySelector("summary")??t).focus({preventScroll:!0})}function $0(e){ge("runtime-memory-branch-content",HTMLElement).replaceChildren(...R6(e))}function Fm(e,t){let n=new Set([...e.querySelectorAll("details[open]")].map((i)=>i.firstElementChild?.textContent)),r=wm(t);r.querySelectorAll("details").forEach((i)=>{i.open=n.has(i.firstElementChild?.textContent)});let s=e.querySelectorAll('[role="tabpanel"]');if(!s.length){for(let i of r.children)i.removeAttribute("id");e.replaceChildren(r)}for(let i of s){let o=[...r.children].find((a)=>a.id===i.id);if(!o)continue;o.removeAttribute("id"),o.removeAttribute("tabindex"),i.replaceChildren(o)}}function zm(e,t){let n=ge("branch-dialog",HTMLDialogElement),r=ge("branch-message",HTMLSelectElement),s=(k)=>ge(k,HTMLElement),i=(k)=>ge(k,HTMLButtonElement),o={web:c("来源:Web 会话。新会话和原会话可分别继续。","Source: Web session. You can continue the original and the new session separately."),history:c("来源:CLI 最后保存的上下文,不修改 CLI 记录。","Source: Last saved CLI context. The CLI record will not change."),live:c("来源:CLI 当前上下文。无法校验实时位置时不会改用历史记录。","Source: Current CLI context. If the live position cannot be verified, history will not be used instead.")},a,l,u=!1,d=!1,h=new Map;function p(){let k=u||Boolean(l),w=h.get(r.value);r.disabled=k||!h.size,i("branch-fork").disabled=k||w===void 0,i("branch-clone").disabled=k||!d,i("branch-refresh").disabled=k,i("branch-close").disabled=u,Q(s("branch-message-preview"),w)}async function g(k){if(u||l)return;let w=l=new AbortController,A=s("branch-status");Q(A,c("正在读取可用分支与复制选项…","Loading branch and clone options…")),Q(s("branch-error")),p();try{let _=await e.request(`${Ua(k)}/branch-options`,void 0,w.signal);if(w.signal.aborted||!n.open||a!==k)return;d=_.canClone===!0,h=new Map(ve(_.forkMessages).map(H).flatMap((E)=>{let R=C(E.entryId);return R&&typeof E.text==="string"?[[R,E.text]]:[]}));let S=r.value;if(r.replaceChildren(ot(c("选择一条用户消息","Choose a user message"),""),...Array.from(h,([E,R],L)=>{let T=R.trim().replace(/\s+/g," ");return ot(`${_t.format(L+1)} · ${T.slice(0,100)}${T.length>100?"…":""}`,E)})),h.has(S))r.value=S;Q(A,!d&&!h.size?c("此来源没有可分支或复制的上下文。","This source has no context to branch or clone."):"")}catch(_){if(!w.signal.aborted&&n.open&&a===k)d=!1,h.clear(),r.replaceChildren(ot(c("未读取到选项","No options loaded"),"")),Q(A),Q(s("branch-error"),c(`无法读取分支选项:${_e(_)}`,`Could not load branch options: ${_e(_)}`))}finally{if(l===w)l=void 0;p()}}async function b(k){let w=a;if(!w||u||l)return;u=!0,Q(s("branch-error")),Q(s("branch-status"),c("正在创建独立的 Web 会话…","Creating a separate Web session…")),p();try{let A=await e.request(`${Ua(w)}/branches`,k);if(A.cancelled===!0){Q(s("branch-status"),c("已取消,原会话没有修改。","Canceled. The original session did not change."));return}let _=mn(A.session);if(!_?.active)throw new Ie(c("没有收到可继续的 Web 会话。请检查会话列表。","No active Web session was returned. Check the session list."),502,"");n.close(),t(_,C(A.editorText),w)}catch(A){Q(s("branch-status")),Q(s("branch-error"),c(`无法确认新会话:${_e(A)}`,`Could not confirm the new session: ${_e(A)}`))}finally{u=!1,p()}}return r.addEventListener("change",p),ge("branch-form",HTMLFormElement).addEventListener("submit",(k)=>{if(k.preventDefault(),!i("branch-fork").disabled)b({kind:"fork",entryId:r.value})}),i("branch-clone").addEventListener("click",()=>void b({kind:"clone"})),i("branch-close").addEventListener("click",()=>n.close()),i("branch-refresh").addEventListener("click",()=>{if(a)g(a)}),n.addEventListener("cancel",(k)=>{if(u)k.preventDefault()}),n.addEventListener("close",()=>{if(n.open)return;l?.abort(),l=void 0,a=void 0}),(k)=>{if(n.open)return;a=k,d=!1,h.clear(),r.replaceChildren(ot(c("选择一条用户消息","Choose a user message"),"")),s("branch-source").textContent=k.name,s("branch-context").textContent=o[k.kind],n.showModal(),g(k)}}var F0=(e)=>e instanceof Ie&&e.status===409&&(e.code==="tree_stale"||e.code==="session_changed"||e.code==="stale_leaf");function M6(e){let{leafId:t,nextCursor:n}=e,r=(a)=>typeof a==="string"&&a.length>0,s=(a)=>a===void 0||typeof a==="string";if(!Array.isArray(e.nodes)||e.nodes.length>40||t!==null&&!r(t)||n!==void 0&&(!r(n)||!e.nodes.length))throw Error("Invalid tree page");let i=new Set;return{nodes:e.nodes.map((a)=>{let{id:l,parentId:u,type:d,role:h,label:p,summary:g}=H(a);if(!r(l)||i.has(l)||u!==null&&!r(u)||!r(d)||!s(h)||!s(p)||!s(g))throw Error("Invalid tree node");return i.add(l),{id:l,parentId:u,type:d,role:h,label:p,summary:g}}),leafId:t,nextCursor:n}}var qm={user:c("你","You"),assistant:c("助手","Assistant"),toolResult:c("工具结果","Tool result"),bashExecution:c("命令输出","Command output"),message:c("消息","Message"),compaction:c("上下文压缩","Context compaction"),branch_summary:c("分支摘要","Branch summary"),model_change:c("模型变更","Model change"),thinking_level_change:c("思考档变更","Thinking level change"),custom:c("会话记录","Session entry"),session_info:c("会话信息","Session info")},Hm=c("会话位置已变化,请重新读取会话树。","The session position changed. Reload the session tree.");function Pm(e,t,n,r,s){let i=v("section","subpanel stack stack--tight");i.id="runtime-tree";let o=v("p","small muted");o.setAttribute("role","status");let a=v("p","small muted",c("仅显示已加载的节点(最新记录在前),不代表完整的分支结构。选择历史用户消息可将其载入输入框;不会自动发送。","Shows loaded entries (newest first), not the complete branch structure. Select a past user message to load it into the input box without sending it.")),l=v("ul","tree"),u=v("div","row"),d=Be(c("加载更早节点","Load older"),()=>{if(A)J(A)});d.dataset.treeOlder="";let h=Be(c("重新读取会话树","Reload session tree"),()=>{J()});h.dataset.treeReload="";let p=Be(c("切换到空上下文","Switch to an empty context"),()=>I(null));u.append(d,h,p);let g=Rt(c("查看会话节点","View session nodes"),o,a,l,u),b=g.querySelector("summary");i.append(v("h3","",c("会话树","Session tree")),g);let k,w,A,_=[],S=!1,E=!1,R="",L=new Map,T=()=>n()&&g.open;function F(){let z=!r();p.disabled=z;for(let V of L.values())V.disabled=z}function I(z){if(T()&&!S&&w!==void 0&&r())s(z,w)}function q(){let z=document.activeElement;if(o.textContent=R||(w!==void 0&&!L.size?w===null?c("没有可导航的会话节点。","No session nodes to navigate."):c("这一页没有列出活动节点。","This page does not include the active node."):L.size&&w!==null&&w!==void 0&&!L.has(w)?c("活动节点不在已加载的记录中。","The active node is not among the loaded entries."):""),o.classList.toggle("error",S||E),o.hidden=!o.textContent,a.hidden=!L.size,l.hidden=!L.size,d.hidden=S||!A&&z!==d,d.textContent=A?c("加载更早节点","Load older"):c("没有更早的可加载节点","No older entries to load"),h.hidden=!S&&!E&&z!==h,p.hidden=w===void 0||w===null||S,u.hidden=d.hidden&&h.hidden&&p.hidden,d.setAttribute("aria-disabled",String(Boolean(k)||!A)),h.setAttribute("aria-disabled",String(Boolean(k))),F(),T()&&(z===d&&d.hidden||z===p&&p.hidden))(S?h:b).focus({preventScroll:!0})}function U(z,V){let Z=z.nodes.map((N)=>N.id),de=!V&&w===z.leafId&&Z.length===_.length&&Z.every((N,W)=>N===_[W]);if(!V&&!de){let N=new Set(Z);for(let[W,K]of L)if(!N.has(W)){if(document.activeElement===K)b.focus({preventScroll:!0});K.parentElement?.remove(),L.delete(W)}}if(w=z.leafId,!de||L.size===_.length)A=z.nextCursor;if(!V)_=Z;let te=[];for(let N of[...z.nodes].reverse()){let W=L.get(N.id);if(!W){W=Be("",()=>I(N.id),"button--quiet break"),L.set(N.id,W);let ue=v("li");ue.append(W),l.append(ue)}let K=N.role||N.type,oe=N.label||(Object.hasOwn(qm,K)?qm[K]:K);if(W.textContent=`${oe} · ${C(N.summary)||N.id.slice(0,12)}`,N.id===w)W.setAttribute("aria-current","true");else W.removeAttribute("aria-current");te.push(W.parentElement)}if(!V&&!de){let N=null;for(let W of te.reverse()){if(W.nextElementSibling!==N&&!W.contains(document.activeElement))l.insertBefore(W,N);N=W}}}function j(){if(re(),!g.open&&w===void 0)return;if(l.contains(document.activeElement))b.focus({preventScroll:!0});l.replaceChildren(),L.clear(),w=void 0,A=void 0,_=[],S=!0,E=!1,R=Hm,q()}async function J(z){if(!T()||k||z!==void 0&&S)return;let V=k=new AbortController,Z=()=>k===V&&T(),de=z===void 0?"":`?${new URLSearchParams({cursor:z})}`;E=!1,R=z===void 0?c("正在读取会话节点…","Loading session entries…"):c("正在读取更早的节点…","Loading older entries…");let te=!1;q();try{let N=AbortSignal.any([V.signal,AbortSignal.timeout(12000)]),W=await e.request(`${t}/tree${de}`,void 0,N);if(!Z())return;let K=M6(W);if(z!==void 0&&K.leafId!==w){j();return}if(z!==void 0&&(K.nextCursor===z||K.nodes.some((oe)=>L.has(oe.id))))throw Error("Overlapping tree page");if(S=!1,R="",U(K,z!==void 0),te=z!==void 0,document.activeElement===h)b.focus({preventScroll:!0})}catch(N){if(!Z())return;if(F0(N)){j();return}E=!0,R=z===void 0?c("读取会话树失败。请重试。","Could not load the session tree. Try again."):c("读取更早的节点失败。已保留之前的节点。","Could not load older entries. The loaded entries are kept.")}finally{if(k===V){if(k=void 0,T()){if(q(),te&&document.activeElement===d)d.scrollIntoView({block:"nearest",behavior:"instant"})}}}}function re(){if(!k)return;k.abort(),k=void 0,R=S?Hm:"",q()}let ne=()=>{if(w===void 0&&!S&&!E)J()};return g.addEventListener("toggle",()=>{if(T())ne();else re()}),q(),{root:i,activate:ne,abort:re,invalidate:j,syncWrites:F,checkLeaf:(z)=>{if(w!==void 0&&w!==z)j()},refresh:()=>{J()}}}function Di(e){return!(e.defaultPrevented||e.isComposing||e.keyCode===229||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)}function Li(e,t,n,r){let s=n.length-1;if(s<0)return;switch(e){case"ArrowDown":return t===s?0:t+1;case"ArrowUp":return t<=0?s:t-1;case"PageUp":case"PageDown":{let i=e==="PageUp"?-1:1;if(t<0)return i<0?s:0;let o=i<0?0:s;if(t===o)return t;let a=n[t].getBoundingClientRect().top,l=t+i;while(l!==o&&Math.abs(n[l+i].getBoundingClientRect().top-a)<=r.clientHeight)l+=i;return l}}}function Ii(e,t){let n=e.getBoundingClientRect().top+e.clientTop,r=n+e.clientHeight,s=t.getBoundingClientRect();if(s.top<n)e.scrollTop-=n-s.top;else if(s.bottom>r)e.scrollTop+=Math.min(s.bottom-r,s.top-n)}function Um(e,t,n){let r=!1;t.addEventListener("compositionstart",()=>{r=!0}),t.addEventListener("compositionend",()=>{r=!1}),t.addEventListener("blur",()=>{r=!1}),e.addEventListener("keydown",(s)=>{if(!e.open||r||!Di(s)||n.hidden)return;let i=s.target===t;if(!i&&!(s.target instanceof Element&&n.contains(s.target)))return;let o=Array.from(n.querySelectorAll("button[data-invocation]:enabled")),a=o.findIndex((u)=>u===s.target);if(!i&&a<0)return;if(i&&s.key==="Enter"&&o[0]){s.preventDefault(),o[0].click();return}let l=Li(s.key,a,o,e);if(l===void 0)return;s.preventDefault(),o[l].focus({preventScroll:!0}),Ii(e,o[l])})}var jm=/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/,D6=new Map([["extension",c("扩展","Extension")],["prompt",c("提示模板","Prompt template")],["skill",c("技能","Skill")]]),L6=new Map([["enabled",c("已启用","Enabled")],["disabled",c("已停用","Disabled")],["untrusted",c("不受信任","Untrusted")],["idle",c("空闲","Idle")],["connecting",c("连接中","Connecting")],["connected",c("已连接","Connected")],["degraded",c("降级","Degraded")],["suspended",c("已挂起","Suspended")],["needs_auth",c("需要认证","Authentication required")],["needs_client_registration",c("需要注册客户端","Client registration required")]]),Wm=new Intl.NumberFormat(me);function I6(e){let t=C(e.invocation),n=C(e.source),r=D6.get(n);if(!r)return;if(n==="skill"?/^\$[A-Za-z0-9-]{1,64}$/.test(t):/^\/[A-Za-z0-9_-]{1,64}$/.test(t))return{name:t,detail:r}}function N6({name:e,enabled:t,origin:n}){if(typeof e!=="string"||!jm.test(e)||typeof t!=="boolean")return;let r=n==="package"?c(" · 包来源"," · From package"):n==="top-level"?c(" · 顶层来源"," · Top-level"):"";return{name:e,detail:(t?c("已启用","Enabled"):c("已停用","Disabled"))+r}}function B6({name:e,status:t,toolCount:n}){let r=L6.get(C(t));if(!r||typeof e!=="string"||!jm.test(e)||typeof n!=="number"||!Number.isSafeInteger(n)||n<0)return;return{name:e,detail:c(`${r} · ${Wm.format(n)} 个工具`,`${r} · ${Wm.format(n)} ${n===1?"tool":"tools"}`)}}function z0(e,t){let n=H(e);if(n.status!=="ok"||!Array.isArray(n.rows)||typeof n.incomplete!=="boolean")return{status:"unavailable",reason:n.status==="unavailable"&&n.reason==="rpc-failed"?"rpc-failed":"invalid-response"};let r=n.rows.slice(0,128).flatMap((s)=>t(H(s))??[]);return{status:"ok",rows:r,incomplete:n.incomplete||r.length!==n.rows.length}}function q0(e,t,n){let r=v("section","subpanel stack stack--tight");if(r.append(v("h3","",e)),n.status==="unavailable")return r.append(v("p","small muted",n.reason==="rpc-failed"?c("宿主读取失败。","Host read failed."):c("宿主响应无效。","Invalid host response."))),r;if(t)r.append(v("p","small muted",t));if(n.rows.length){let s=v("dl","capability-list small numerical");s.tabIndex=0,s.setAttribute("aria-label",e);for(let i of n.rows){let o=v("div");o.tabIndex=-1;let a=v("dt");a.append(v("code","",i.name)),o.append(a,v("dd","muted",i.detail)),s.append(o)}s.addEventListener("keydown",(i)=>{if(!Di(i))return;let o=s.closest(".details-scroll");if(!o)return;let a=Array.from(s.children),l=a.findIndex((d)=>d===i.target),u=Li(i.key,l,a,o);if(u===void 0)return;i.preventDefault(),a[u].focus({preventScroll:!0}),Ii(o,a[u])}),r.append(s)}if(n.incomplete)r.append(v("p","small muted",n.rows.length?c("部分条目未显示。","Some entries omitted."):c("清单不完整,无可显示条目。","Incomplete list, no visible entries.")));else if(!n.rows.length)r.append(v("p","small muted",c("原生未报告任何条目。","The native host did not report any entries.")));return r}function Gm(e){return[q0(c("已加载扩展","Loaded extensions"),"",z0(e.extensions,N6)),q0(c("MCP 服务","MCP servers"),c("工具可能尚不可用。","Tools may not be ready."),z0(e.mcpServers,B6)),H0(),q0(c("注册命令与技能","Registered commands and skills"),c("注册不等于可运行。","Registration does not guarantee availability."),z0(e.commands,I6))]}function H0(){let e=v("section","subpanel stack stack--tight");return e.id="runtime-compatibility",e.append(v("h3","",c("浏览器原生兼容未启用","Native terminal unavailable in browser")),v("p","small muted",c("账户登录、凭据、私密授权(含 MCP)、直接 shell 或外部编辑器,请在本机 OmO 终端完成。","Use the local OmO terminal for sign-in, credentials, private approvals (including MCP), direct shell access, and external editors.")),v("p","small muted",c("要在本机继续空闲会话,可用「会话管理 → 转到 CLI」。","To continue an idle session locally, use “Manage session → Move to CLI”."))),e}var Yr=64,Ni="http://www.w3.org/2000/svg",O6=0,$6=/^[0-9a-f]{64}$/u,aa=(e)=>typeof e==="string"&&$6.test(e)?e:"",Zr=(e)=>{let t=Ee(e);return t!==void 0&&Number.isSafeInteger(t)&&Math.abs(t)<=8640000000000000?t:void 0};function P0(e){return{createdAt:Zr(e.createdAt),startedAt:Zr(e.startedAt),completedAt:Zr(e.completedAt),lastActivityAt:Zr(e.lastActivityAt)}}var Km=new Intl.NumberFormat(me);function U0({createdAt:e,startedAt:t,completedAt:n,lastActivityAt:r}){let s=[];for(let[i,o]of[[c("创建","Created"),e],[c("开始","Started"),t],[c("完成","Completed"),n],[c("最近活动","Last activity"),r]])if(o!==void 0)s.push([i,ft(o)]);if(t!==void 0&&n!==void 0&&n>=t){let i=Math.floor((n-t)/1000),o=Km.format(Math.floor(i/60)),a=Km.format(i%60);s.push([c("耗时","Elapsed"),i<60?c(`${a} 秒`,`${a}s`):c(`${o} 分 ${a} 秒`,`${o}m ${a}s`)])}return s}var kr=(e)=>e.label||c(`节点 ${e.id+1}`,`Node ${e.id+1}`);function Vm(e){if(!Array.isArray(e.nodes)||!e.nodes.length||e.nodes.length>Yr||!Array.isArray(e.waves)||!e.waves.length||e.waves.length>e.nodes.length)return;let t=e.nodes.length,n=new Map,r=(o)=>typeof o==="number"&&Number.isInteger(o)&&o>=0&&o<t;for(let o of e.nodes){let a=H(o),{id:l,state:u,upstream:d,attempt:h,agent:p,category:g,label:b,configuredModel:k,taskKey:w}=a;if(!r(l)||n.has(l)||!Array.isArray(d)||d.length>=t||!d.every(r)||new Set(d).size!==d.length)return;n.set(l,{id:l,state:C(u),upstream:d,agent:C(p),category:C(g),label:C(b),configuredModel:C(k),taskKey:aa(w),times:P0(a),attempt:typeof h==="number"&&Number.isSafeInteger(h)&&h>=0?h:void 0})}let s=new Map,i=[];for(let[o,a]of e.waves.entries()){let l=H(a);if(l.index!==o||!Array.isArray(l.nodes)||!l.nodes.length||l.nodes.length>n.size)return;let u=[];for(let d of l.nodes){if(!r(d)||s.has(d))return;let h=n.get(d);if(!h)return;s.set(d,o),u.push(h)}i.push(u)}if(s.size!==n.size)return;for(let[o,a]of i.entries())for(let l of a)if(!l.upstream.every((u)=>(s.get(u)??1/0)<o))return;return i}function Jm(e,t){let l=(T)=>T*104-16,u=l(Math.max(...e.map((T)=>T.length))),d=Math.min(u,l(2)),h=new Map,p=new Map,g=v("div","dag-graph-map");g.tabIndex=0,g.setAttribute("role","region"),g.setAttribute("aria-label",c("可滚动的有向依赖图,完整依赖见节点详情。","Scrollable directed dependency graph. See node details for all dependencies."));let b=v("div","dag-graph-canvas"),k=(T)=>`${T/16}rem`;for(let[T,F]of e.entries()){let I=12+T*96,q=v("div","dag-graph-wave",c(`第 ${T+1} 波`,`Wave ${T+1}`));q.style.top=k(I),b.append(q);for(let[U,j]of F.entries()){let J=12+Math.max(0,(d-l(F.length))/2)+U*104;h.set(j.id,{x:J+44,y:I+21,wave:T});let re=v("button","dag-graph-node");re.type="button",re.dataset.node=String(j.id),re.setAttribute("aria-pressed","false");let ne=Dn(j.state);if(ne)re.dataset.state=j.state;re.style.left=k(J),re.style.top=k(I+21),re.style.width=k(88),re.style.height=k(46),re.title=kr(j),re.addEventListener("click",()=>t(j.id)),re.append(v("strong","",kr(j)),v("span","",j.state==="blocked"?c("被依赖阻塞","Blocked"):ne??c("状态未知","Unknown"))),b.append(re)}}let w=document.createElementNS(Ni,"svg");w.setAttribute("class","dag-graph-edges"),w.setAttribute("aria-hidden","true"),w.setAttribute("focusable","false");let A=document.createElementNS(Ni,"defs"),_=document.createElementNS(Ni,"marker"),S=`dag-arrow-${++O6}`;_.setAttribute("id",S),_.setAttribute("viewBox","0 0 6 8"),_.setAttribute("markerWidth","6"),_.setAttribute("markerHeight","8"),_.setAttribute("markerUnits","userSpaceOnUse"),_.setAttribute("refX","6"),_.setAttribute("refY","4"),_.setAttribute("orient","auto");let E=document.createElementNS(Ni,"path");E.setAttribute("d","M0 0 L6 4 L0 8 Z"),_.append(E),A.append(_),w.append(A);for(let T of e)for(let F of T){let I=h.get(F.id);for(let q of F.upstream){let U=h.get(q),j=U.y+46,J=I.y-2,re=document.createElementNS(Ni,"path");if(re.dataset.from=String(q),re.dataset.to=String(F.id),re.setAttribute("marker-end",`url(#${S})`),I.wave===U.wave+1){let ne=(j+J)/2;re.setAttribute("d",`M${U.x} ${j} C${U.x} ${ne} ${I.x} ${ne} ${I.x} ${J}`)}else{let ne=p.get(q)??p.size;p.set(q,ne);let z=12+u+8+5*ne;re.setAttribute("d",`M${U.x} ${j} V${j+6} H${z} V${J-9} H${I.x} V${J}`)}w.append(re)}}let R=24+u+p.size*5,L=24+(e.length-1)*96+21+46;return b.style.width=k(R),b.style.height=k(L),w.setAttribute("viewBox",`0 0 ${R} ${L}`),b.prepend(w),g.append(b),g}var Yt=new Intl.NumberFormat(me),Xm=[["pending",c("等待","Pending")],["scheduled",c("已调度","Scheduled")],["running",c("运行中","Running")],["paused",c("已暂停","Paused")],["blocked",c("阻塞","Blocked")],["completed",c("已完成","Completed")],["failed",c("失败","Failed")],["cancelled",c("已取消","Canceled")],["skipped",c("已跳过","Skipped")]],Zm=new Set(["pending","scheduled","running","paused","blocked"]),F6=new Set(["scheduled","running","paused","blocked","failed"]),da=(e)=>Dn(e)??c("状态未知","Unknown status");function W0(e){let t=v("dl","capability-list small numerical break");for(let[n,r]of e){let s=v("div");s.append(v("dt","",n),v("dd",r?"":"muted",r||c("未报告","Not reported"))),t.append(s)}return t}function Qm(e){return[[c("生效模型","Effective model"),e?.effectiveModel??""],...e?.reasoning?[[c("推理档位","Reasoning"),e.reasoning]]:[]]}function fa(e){let t=H(e.effectiveModel),n=C(t.provider),r=C(t.modelId);return{description:C(e.description),configuredModel:C(e.configuredModel),effectiveModel:n&&r?`${n}/${r}`:"",reasoning:n&&r?C(t.reasoning):""}}function ep(e,t,n){let r=fa(e),s=C(e.agent),i=C(e.category),o=[s?c(`代理:${s}`,`Agent: ${s}`):"",i?c(`类别:${i}`,`Category: ${i}`):""].filter(Boolean),a=n?.openDag?Be(c("打开 DAG 节点","Open DAG node"),n.openDag,"task-dag-jump"):v("p","small muted",c("没有已核验的 DAG 节点关联。","No verified DAG node link.")),l=v("p","small break",r.description||c("未报告任务描述。","Task description not reported.")),u=(g)=>W0([[c("路由","Route"),o.join(" · ")],[c("执行方式","Execution mode"),C(e.executionMode)],[c("请求模型","Requested model"),r.configuredModel],...Qm(g),[c("创建","Created"),ft(e.createdAt)],[c("更新","Updated"),ft(e.updatedAt)]]),d=u(r),h=n?.bindOutput?v("div","task-output-host"):void 0,p=Rt("",l,a,...h?[h,d]:[d]);if(p.querySelector("summary")?.append(v("strong","",t[0]),` · ${t[1]}`),p.className="task-run",p.name="native-subagent-task",n)p.dataset.taskKey=n.key;if(h)n?.bindOutput?.(p,h,(g)=>{let b=fa({effectiveModel:g}),k=u(b.effectiveModel?b:r);d.replaceWith(k),d=k});return p}function Bi(e,t=e){e.focus({preventScroll:!0}),t.scrollIntoView({block:"start",inline:"nearest"})}var la=new WeakMap;function tp(e,t,n){let r=e.querySelector(".dag-graph-view");if(r)la.get(r)?.select(t,n)}function ca(e){let t=Ee(e);return t!==void 0&&Number.isSafeInteger(t)&&t>=0?t:void 0}function np(e,t){return c(`已完成 ${Yt.format(e)} / ${Yt.format(t)} 个节点`,`${Yt.format(e)} of ${Yt.format(t)} completed`)}function ua(e){return Xm.flatMap(([t,n])=>{let r=e(t);return r===void 0?[]:[`${n} ${Yt.format(r)}`]})}function rp(e,t){let n=(a)=>{let l=ca(t[a]);return l!==void 0&&l<=e?l:void 0},r=n("completed"),s=ua((a)=>a==="completed"?void 0:n(a)),i=s.length+Number(r!==void 0),o=[...r===void 0?[]:[v("span","dag-roster-progress",np(r,e))],...s.length?[v("span","dag-roster-counts",s.join(" · "))]:[]];if(i<Xm.length)o.push(v("span","dag-roster-counts",i?c("仅显示宿主报告的状态。","Only reported states are shown."):c("宿主未报告节点状态计数。","The host did not report node status counts.")));return o}function Ym(e){let t=new Map;for(let n of e)t.set(n.state,(t.get(n.state)??0)+1);return t}function sp(e){return c(`第 ${Yt.format(e+1)} 波`,`Wave ${Yt.format(e+1)}`)}function ip(e){let t=v("section","dag-wave stack stack--tight");return t.append(v("h4","",sp(e))),t}function z6(e,t,n){let r=v("div","stack stack--tight"),s=e.agent?c(`代理:${e.agent}`,`Agent: ${e.agent}`):e.category?c(`类别:${e.category}`,`Category: ${e.category}`):"",i=e.attempt===void 0?"":c(`尝试次数:${Yt.format(e.attempt)}`,`Attempts: ${Yt.format(e.attempt)}`);if(s||i)r.append(v("p","small muted break",[s,i].filter(Boolean).join(" · ")));let o=e.upstream.flatMap((k)=>{let w=t.get(k);return w?[w]:[]}),a=(k)=>`${kr(k)} (${da(k.state)})`,l=o.map(kr);r.append(v("p","small muted break",l.length?c(`依赖:${l.join("、")}`,`Depends on: ${l.join(", ")}`):c("无上游依赖","No upstream dependencies")));let u=[[o.filter((k)=>k.state==="failed"),c("失败上游","Failed upstream")],[o.filter((k)=>Zm.has(k.state)),c("未结束上游","Unfinished upstream")],[o.filter((k)=>k.state!=="failed"&&!Zm.has(k.state)),c("其他上游","Other upstream")]];for(let[k,w]of u)if(k.length)r.append(v("p","small break",`${w}${c(":",": ")}${k.map(a).join(c("、",", "))}`));let d=e.taskKey?n?.task(e.taskKey):void 0,h=W0([[c("配置模型","Configured model"),e.configuredModel],...d?.configuredModel?[[c("任务请求模型","Task requested model"),d.configuredModel]]:[],...Qm(d),...U0(e.times)]),p=d&&n?Be(c("打开子代理任务","Open subagent task"),()=>n.openTask(e.taskKey),"node-task-jump"):v("p","small muted",c("没有已核验的子代理任务关联。","No verified subagent task link.")),g=v("p","small break",d?.description||c("未报告任务描述。","Task description not reported.")),b=Rt(`${kr(e)} · ${da(e.state)}`,r,g,...d?[p,h]:[h,p]);return b.className="runtime-execution",b.dataset.selectedNode=String(e.id),b.open=!0,b}function q6(e,t){let n=new Map;for(let r of ve(e.nodes).slice(0,Yr)){let s=H(r),i=ca(s.id);if(i!==void 0&&i<Yr)n.set(i,C(s.state))}for(let r of ve(e.waves).slice(0,Yr)){let s=H(r),i=ca(s.index);if(i===void 0||i>=Yr)continue;let o=ip(i),a=v("ol","inline-list numerical");for(let l of ve(s.nodes).slice(0,Yr)){let u=ca(l),d=u===void 0?void 0:n.get(u);if(u===void 0||d===void 0)continue;n.delete(u);let h=v("li");h.append(v("p","small",`${kr({id:u,label:""})} · ${da(d)}`)),a.append(h)}if(a.childElementCount)o.append(a),t.append(o)}if(!t.childElementCount)t.append(v("p","small muted",c("运行未提供可显示的波次。","This run did not report any waves to display.")))}function op(e,t,n=""){let r=v("div","dag-graph-view stack stack--tight"),s=v("details","dag-graph-text"),i=v("summary","small",c("按波次查看节点","Nodes by wave")),o=v("div","dag-readout stack stack--tight"),a=v("div","dag-selected-node"),l=Vm(e),u=l?.flat()??[];if(l){let d=new Map(u.map((S)=>[S.id,S])),h=()=>{a.replaceChildren();for(let S of r.querySelectorAll('[aria-pressed="true"]'))S.setAttribute("aria-pressed","false")},p=(S,E,R)=>{let L=d.get(S);if(!L)return;let T=r.querySelector(`.dag-graph-node[data-node="${S}"]`);for(let q of r.closest('[role="tabpanel"]')?.querySelectorAll(".dag-graph-view")??[])if(q!==r&&q.querySelector(".runtime-execution"))la.get(q)?.clear();if(a.firstElementChild?.getAttribute("data-selected-node")===String(S)){let q=a.querySelector("summary");if(E&&q)Bi(q);return}h(),T?.setAttribute("aria-pressed","true"),o.querySelector(`[data-node-select="${S}"]`)?.setAttribute("aria-pressed","true");let F=z6(L,d,t),I=F.querySelector("summary");if(I?.addEventListener("click",(q)=>{q.preventDefault(),h();let U=R?.getClientRects().length?R:T;if(U)Bi(U)}),a.append(F),E&&I)Bi(I)};la.set(r,{select:p,clear:h});let g=Ym(u),b=c(`${Yt.format(l.length)} 个波次`,`${Yt.format(l.length)} ${l.length===1?"wave":"waves"}`);r.append(v("p","small break dag-verified-roster",[c("已核验快照","Verified snapshot"),b,np(g.get("completed")??0,u.length)].join(" · ")));let k=ua((S)=>S==="completed"?void 0:g.get(S));if(k.length)r.append(v("p","small muted break",k.join(" · ")));let w=C(e.name);if(w&&w!==n)r.append(v("p","small metric-label break",w));let A=U0(P0(e));if(A.length)r.append(W0(A));let _=[];for(let[S,E]of l.entries()){let R=ip(S),L=v("ol","dag-wave-nodes numerical"),T=Ym(E),F=ua((I)=>F6.has(I)?T.get(I):void 0);if(F.length)_.push(`${sp(S)}${c(":",": ")}${F.join(" · ")}`);for(let I of E){let q=v("li"),U=Be("",()=>p(I.id,!0,U),"dag-node-choice");U.dataset.nodeSelect=String(I.id),U.setAttribute("aria-pressed","false"),U.append(v("strong","",kr(I)),v("span","muted",da(I.state))),q.append(U),L.append(q)}R.append(v("p","small muted break",ua((I)=>T.get(I)).join(" · ")),L),o.append(R)}if(_.length){let S=v("span","dag-wave-preview");for(let E of _.slice(0,3))S.append(v("span","dag-roster-counts",E));if(_.length>3)S.append(v("span","dag-roster-counts",c(`另有 ${Yt.format(_.length-3)} 个波次,展开查看`,`${Yt.format(_.length-3)} more waves`)));i.append(S)}}else r.append(v("p","small muted",c("无法验证完整拓扑;仅显示可识别的节点,不显示依赖连线。","Could not verify the full graph. Only recognized nodes are shown, without dependency lines."))),q6(e,o);if(s.open=!l,s.append(i,o),r.append(s,a),l)r.append(Jm(l,(d)=>la.get(r)?.select(d,!0)));return{root:r,nodes:u}}var ap=new Map([["inactive",c("会话尚未接入,或正在交接。","The session is not connected or is being handed off.")],["binding_unverified",c("无法验证当前会话的宿主绑定。","Could not verify which host owns the current session.")],["unsupported",c("当前宿主或连接方式不支持此读取。","The current host or connection does not support this read.")],["native_unavailable",c("宿主未能提供摘要。","The host could not provide a summary.")],["native_window_unverified",c("最近 256 次无匹配","No match in the last 256 runs")],["engine_unavailable",c("宿主连接忙碌、已断开或读取超时。","The host is busy, disconnected, or did not respond in time.")],["web_unsupported",c("当前 Web 服务没有实时摘要入口。","This Web server does not support live summaries.")],["read_refused",c("Web 服务未允许此读取,请确认当前会话仍可用。","The Web server refused this read. Check that the session is still available.")],["read_failed",c("读取失败或超时,可手动刷新。","The read failed or timed out. Refresh to try again.")]]),Ls=new Intl.NumberFormat(me),H6=new Set(["pending","running","paused"]),P6=new Set(["completed","failed","cancelled"]);function Is(e){let t=Ee(e);return t!==void 0&&Number.isSafeInteger(t)&&t>=0?t:void 0}function Oi(e){switch(e.status){case"unavailable":{if(e.reason==="native_window_unverified")return ap.get(e.reason)??"";let t=ap.get(C(e.reason))??c("没有可用的读取结果。","No results are available.");return c(`不可用:${t}`,`Unavailable: ${t}`)}case"ownership_changed":return c("会话归属已变化,未显示任何宿主数据。","Session ownership changed. No host data is shown.");default:return c("摘要格式无效,未显示宿主数据。","The summary is invalid. No host data is shown.")}}function ha(e){return e.status==="unavailable"&&e.reason==="unsupported"}function cp(e,t,n){if(t.status!=="ok")return;let r=ve(t.rows).map(H),s=n?P6:H6;if(!r.length||r.length>256||!r.every((i)=>Dn(C(i.status))&&Zr(i.createdAt)!==void 0&&Zr(i.updatedAt)!==void 0&&(e==="tasks"||Is(i.nodeCount)!==void 0&&s.has(C(i.status)))))return;if(e==="tasks"?Is(t.omittedCount)===void 0:t.coverage!=="native_window"||typeof t.limitReached!=="boolean")return;return r}function j0(e){let t=new Map,n=new Set;for(let r of cp("tasks",e,!1)??[]){let s=aa(r.key);if(!s||n.has(s))continue;if(t.delete(s))n.add(s);else t.set(s,fa(r))}return t}function lp(e){let t=v("div","dag-readout stack stack--tight");return t.append(v("p","small muted",e.status==="not_found"?c("该运行不在当前列表中,请刷新。","This run is no longer in the list. Refresh to try again."):Oi(e))),t}function up(e,t,n={}){let{dag:r,taskJump:s,taskOutput:i,taskKeys:o,snapshot:a}=n,l=a!==void 0,u=v("ol","inline-list numerical");for(let[d,h]of t.entries()){let p=v("li","stack stack--tight"),g=e==="dag"?l?ve(h.nodes).length:Is(h.nodeCount):void 0,b=l&&e==="tasks"?h.startedAt:h.createdAt,k=l&&e==="tasks"?h.completedAt:h.updatedAt,w=Dn(C(h.status))??c("状态未知","Unknown status"),A=!l?C(e==="dag"?h.name:h.title):"",_=A||`${e==="tasks"?c("任务","Task"):c("运行","Run")} ${Ls.format(d+1)}`,S=`${_} · ${w}`,E=aa(h.key);if(e==="tasks"&&!l){p.append(ep(h,[_,w],o?.has(E)?{key:E,openDag:s?.(E),bindOutput:i?.(E)}:void 0)),u.append(p);continue}let R=g===void 0?"":c(`${Ls.format(g)} 个节点`,`${Ls.format(g)} ${g===1?"node":"nodes"}`),L=g!==void 0&&!l?rp(g,H(h.counts)):[];if(r&&e==="dag"&&!l&&E){let T=v("details","dag-run");T.dataset.dagKey=E;let F=v("div","dag-content"),I=v("p","small muted",c("正在读取波次与依赖…","Loading waves and dependencies…"));I.setAttribute("role","status");let q=v("summary");q.append(v("strong","",_),` · ${[w,R].filter(Boolean).join(" · ")}`,...L),T.append(q,F);let U,j=!1;T.addEventListener("toggle",()=>{if(!T.open){U?.abort(),U=void 0;return}if(U||j||!T.isConnected)return;let J=U=new AbortController,re=()=>U===J&&T.isConnected&&T.open;F.replaceChildren(I),r.read(E,J.signal).then((ne)=>{if(!re())return;let z=ne.status==="ok"?op(ne,r.links,A):void 0;F.replaceChildren(z?.root??lp(ne)),j=ne.status==="ok",r.settled(E,z?.nodes??[],F)},(ne)=>{if(ne instanceof DOMException&&ne.name==="AbortError")return;if(re())F.replaceChildren(lp({status:"unavailable",reason:"read_failed"})),r.settled(E,[],F)}).finally(()=>{if(U===J)U=void 0})}),p.append(T)}else{if(p.append(v("p","metric-label small",S)),R)p.append(v("p","small muted",R));if(L.length){let T=v("p","break numerical");T.append(...L),p.append(T)}}if(Ee(b)!==void 0)p.append(v("p","small muted",l&&e==="tasks"?c(`开始:${ft(b)}`,`Started: ${ft(b)}`):c(`创建:${ft(b)}`,`Created: ${ft(b)}`)));if(Ee(k)!==void 0&&k!==b)p.append(v("p","small muted",l&&e==="tasks"?c(`结束:${ft(k)}`,`Ended: ${ft(k)}`):c(`更新:${ft(k)}`,`Updated: ${ft(k)}`)));u.append(p)}return u}function U6(e,t){let n=v("section","subpanel stack stack--tight");if(n.append(v("h4","",c("磁盘快照 · 只读","Saved snapshot · Read-only"))),t==="waiting"){let r=v("p","small muted",c("正在查找已保存的快照…","Looking for a saved snapshot…"));r.setAttribute("role","status"),n.append(r)}else if(t.status==="ok"){let r=ve(e==="tasks"?t.tasks:t.runs).map(H);n.append(v("p","small muted",c(`保存时间:${ft(t.updatedAt)} · 非实时`,`Saved: ${ft(t.updatedAt)} · Not live`))),n.append(r.length?up(e,r,{snapshot:t}):v("p","small muted",c("快照没有此类记录,不代表当前没有。","No matching records in the snapshot. There may still be live activity.")))}else n.append(v("p","small muted",c("没有可读取的快照。","No readable snapshot.")));return n}function Ln(e,t,{snapshot:n,dag:r,taskJump:s,taskOutput:i,history:o=!1}={}){let a=v("section","subpanel stack stack--tight");if(!o)a.append(v("h3","",e==="tasks"?c("子代理任务","Subagent tasks"):c("当前 DAG 运行","Current DAG runs")));if(e==="tasks")a.append(v("p","metric-label small",c("实时宿主 · 只读","Live host · Read-only")));let l=v("p","small muted");if(l.setAttribute("role","status"),a.append(l),!t)l.textContent=o?c("正在读取已结束的 DAG 运行…","Loading finished DAG runs…"):c("正在读取宿主摘要…","Loading host summary…");else if(t.status==="empty"&&e==="tasks")l.textContent=c("宿主报告当前没有子代理任务。","The host reports no current subagent tasks.");else if(t.status==="ok"){let u=cp(e,t,o),d=Is(t.omittedCount);if(u){if(l.textContent=e==="dag"?c("最近 256 次运行","Last 256 runs"):"",l.hidden=!l.textContent,a.append(up(e,u,{dag:r,taskJump:s,taskOutput:i,taskKeys:e==="tasks"?j0(t):void 0})),e==="tasks"&&d)a.append(v("p","small muted",c(`宿主另有 ${Ls.format(d)} 条未返回。`,`The host omitted ${Ls.format(d)} ${d===1?"additional entry":"additional entries"}.`)))}else l.textContent=Oi({})}else l.textContent=Oi(t);return[a,...t&&n&&ha(t)?[U6(e,n)]:[]]}function dp(e){let t=v("section","subpanel stack stack--tight");t.id="runtime-journal",t.append(v("h3","",c("本会话记忆","Session memory")));let n=v("p","small muted");if(n.setAttribute("role","status"),t.append(n),!e)n.textContent=c("正在读取会话记忆…","Loading session memory…");else if(e.status==="ok"){let r=Is(e.totalSteps),s=Is(e.reflectedSteps);if(r!==void 0&&s!==void 0){n.hidden=!0;let i=v("dl","capability-list small numerical");for(let[o,a]of[[c("记录步数","Recorded steps"),r],[c("已反思步数","Reflected steps"),s]]){let l=v("div");l.append(v("dt","",o),v("dd","",Ls.format(a))),i.append(l)}t.append(i)}else n.textContent=Oi({})}else n.textContent=Oi(e);return t}var fp=new Map([["assistant",c("助手","Assistant")],["tool",c("工具","Tool")],["final",c("最终答复","Final answer")]]),hp=/^(?:0|[1-9]\d{0,3})\.[a-f0-9]{64}$/u;function mp(){let e;function t(){let n=e;e=void 0,n?.cancel(),n?.setModel(),n?.root.remove()}return{reset:t,keep:(n)=>{if(e&&!n(e.key))t()},refresh:()=>e?.refresh(),bind(n,r,s,i,o){if(e?.key===n)s.append(e.root),e.host=s,e.setModel=i,i(e.model);r.addEventListener("toggle",()=>{if(!r.isConnected||r.closest("[hidden]"))return;if(!r.open){if(e?.host===s)t();return}if(e?.host===s)return;t();let a=v("section","task-output stack stack--tight"),l=v("p","small muted break");l.setAttribute("role","status");let u=v("ol","task-output-rows");u.tabIndex=0,u.setAttribute("aria-label",c("子代理可见输出","Visible subagent output")),u.hidden=!0;let d=v("div","task-output-actions"),h,p,g,b=Be(c("刷新输出","Refresh output"),()=>{if(!g)_()},"button--quiet"),k=Be(c("上一页","Previous"),()=>{if(!g&&p)_(p)},"button--quiet"),w=Be(c("下一页","Next"),()=>{if(!g&&h)_(h)},"button--quiet");k.setAttribute("aria-label",c("上一页","Previous page")),w.setAttribute("aria-label",c("下一页","Next page"));let A=()=>{b.setAttribute("aria-disabled",String(Boolean(g))),k.setAttribute("aria-disabled",String(Boolean(g)||!p)),w.setAttribute("aria-disabled",String(Boolean(g)||!h))};d.append(b,k,w),a.append(v("h4","",c("任务进度与输出","Task progress and output")),l,d,u);function _(S){g?.abort();let E=g=new AbortController;l.textContent=c("正在读取任务输出…","Loading task output…"),u.replaceChildren(),u.hidden=!0,h=p=void 0,A();let R=()=>e?.root===a&&g===E&&!E.signal.aborted&&a.isConnected&&!a.closest("[hidden]")&&a.closest("details")?.open===!0,L=(T=c("无法读取任务输出。可刷新重试。","Could not read task output. Refresh to retry."))=>{l.textContent=T};o(n,S,E.signal).then((T)=>{if(!R())return;if(T.status==="stale")return L(c("输出已更新。刷新后从第一页查看。","Output changed. Refresh to start from the first page."));if(T.status==="ownership_changed"||T.status==="not_found"){if(e)e.model=void 0,e.setModel();return L(c("任务归属未确认。","Task ownership unverified."))}if(T.status==="unavailable"&&T.reason==="unsupported")return L(c("宿主不支持读取任务输出。","The host does not support task output."));let F=Dn(C(T.taskStatus)),I=ve(T.rows).map(H);if(T.status!=="ok"||!F||T.coverage!=="recent"&&T.coverage!=="full"||!Array.isArray(T.rows)||I.length>6||!I.every((q)=>fp.has(C(q.kind))&&typeof q.text==="string"&&q.text.length<=480))return L();if(e)e.model=T.effectiveModel===void 0?void 0:H(T.effectiveModel),e.setModel(e.model);l.textContent=[F,T.coverage==="recent"&&c("近期输出","Recent output"),!I.length&&c("无可显示的输出","No visible output"),T.hostTruncated===!0&&c("宿主已截断","Host truncated output"),T.filtered===!0&&c("部分内容已省略","Some content omitted")].filter(Boolean).join(" · "),u.replaceChildren(...I.map((q)=>{let U=v("li","task-output-row");return U.append(v("span","small metric-label",fp.get(C(q.kind))),v("p","small",C(q.text))),U})),u.hidden=!I.length,h=hp.test(C(T.next))?C(T.next):void 0,p=hp.test(C(T.previous))?C(T.previous):void 0,u.scrollTop=0},()=>{if(R())L()}).finally(()=>{if(g===E)g=void 0,A()})}e={key:n,host:s,root:a,setModel:i,cancel:()=>g?.abort(),refresh:()=>_()},s.append(a),_()})}}}var Qe=(e)=>ge(e,HTMLElement),Xr=(e)=>ge(e,HTMLButtonElement),W6=new Intl.DateTimeFormat(me,{dateStyle:"medium",timeStyle:"short"}),pp=(e)=>Number.isFinite(new Date(e).getTime())?W6.format(e):"";function gp(e,t){let n=ge("cli-history-dialog",HTMLDialogElement),r=ge("cli-history-directory",HTMLSelectElement),s=Qe("cli-history-directory-hint"),i=Xr("cli-history-browse"),o=ge("cli-history-search",HTMLInputElement),a=Qe("cli-history-list"),l=Qe("cli-history-list-status"),u=Qe("cli-history-list-error"),d=Qe("cli-history-index"),h=Qe("cli-history-record"),p=Qe("cli-history-record-title"),g=Qe("cli-history-activity"),b=Xr("cli-history-refresh"),k=Xr("cli-history-refresh-activity"),w=Xr("cli-history-branch"),A=Xr("cli-history-resume"),_=Qe("cli-history-resume-status"),S=Qe("cli-history-resume-error"),E=new Qn(Qe("cli-history-messages"),n,Qe("cli-history-empty")),R=[],L,T,F,I,q,U=!1,j=!1,J=new Set,re=()=>!r.disabled?r:!i.hidden?i:Xr("cli-history-title-close");function ne(){let G=t.resumeUnavailable(),ae=T!==void 0&&J.has(T.id);w.disabled=!U||ae,A.disabled=!T||ae||Boolean(G),k.disabled=!U||q!==void 0,Q(_,ae?c("正在尝试打开同一会话…","Opening the same session in Web…"):T?G:"")}function z(){if(!n.open||d.hidden)return;let G=o.value.trim().toLocaleLowerCase(),ae=[...t.bookmarks()].filter((Ce)=>Ce.cwd===r.value&&Ce.name.toLocaleLowerCase().includes(G)).sort((Ce,Ve)=>Ve.updatedAt-Ce.updatedAt),be=Qe("cli-history-web-list"),ce=JSON.stringify(ae.map(({id:Ce,name:Ve,archived:qe})=>[Ce,Ve,qe]));if(be.dataset.rows===ce)return;be.dataset.rows=ce;let xe=document.activeElement instanceof HTMLButtonElement&&be.contains(document.activeElement)?document.activeElement.dataset.session:void 0;if(be.replaceChildren(...ae.map((Ce)=>{let Ve=v("li"),qe=Be("",()=>t.openBookmark(Ce),"button--quiet session-link");if(qe.dataset.session=Ce.id,qe.append(v("span","",Ce.name)),Ce.archived)qe.append(v("small","",c("已归档","Archived")));return Ve.append(qe),Ve})),Qe("cli-history-bookmarks").hidden=!ae.length,xe)([...be.querySelectorAll("button")].find((Ce)=>Ce.dataset.session===xe)??o).focus({preventScroll:!0})}function V(){let G=o.value.trim().toLocaleLowerCase(),ae=R.filter((ce)=>ce.name.toLocaleLowerCase().includes(G)),be=document.activeElement instanceof HTMLButtonElement&&a.contains(document.activeElement)?document.activeElement.dataset.history:void 0;a.replaceChildren();for(let ce of ae){let xe=v("li"),Ce=Be("",()=>ue(ce),"button--quiet session-link");Ce.dataset.history=ce.id,Ce.append(v("span","",ce.name),v("small","numerical",pp(ce.updatedAt))),xe.append(Ce),a.append(xe)}if(a.hidden=!ae.length,be)([...a.querySelectorAll("button")].find((ce)=>ce.dataset.history===be)??o).focus({preventScroll:!0});Q(l,F?c("正在读取此目录的 CLI 历史…","Loading CLI history for this directory…"):L===!1?c("CLI 历史不可用:未启用或未找到本地历史记录。","CLI history is disabled or no local history records were found."):L&&!ae.length?G?c("没有匹配的 CLI 历史。","No matching CLI history."):c("此目录没有未在 Web 打开的 CLI 会话。","No CLI sessions to add from this directory."):""),z()}async function Z(){let G=r.value;if(!G||F)return;let ae=F=new AbortController,be=()=>F===ae&&G===r.value;b.setAttribute("aria-disabled","true"),Q(u),Q(l,c("正在读取此目录的 CLI 历史…","Loading CLI history for this directory…"));try{let ce=await e.request(`/api/cli-history?${new URLSearchParams({cwd:G})}`,void 0,AbortSignal.any([ae.signal,AbortSignal.timeout(15000)]));if(!be())return;if(typeof ce.available!=="boolean"||!Array.isArray(ce.sessions))throw Error(c("无法核验目录会话列表。","Could not verify the directory session list."));L=ce.available,R=ve(ce.sessions).map(H).flatMap((xe)=>{let Ce=C(xe.id);return L&&/^[a-f0-9]{64}$/u.test(Ce)&&xe.cwd===G&&xe.adopted===!1?[{id:Ce,name:C(xe.name)||c("未命名 CLI 会话","Untitled CLI session"),cwd:G,updatedAt:Ee(xe.updatedAt)??0}]:[]})}catch(ce){if(!be())return;R=[],L=void 0,Q(u,c(`无法读取 CLI 历史:${_e(ce)}`,`Could not load CLI history: ${_e(ce)}`))}finally{if(be())F=void 0,b.removeAttribute("aria-disabled"),V()}}function de(G){if(F?.abort(),F=void 0,r.value=G,o.value="",R=[],L=void 0,b.removeAttribute("aria-disabled"),Q(u),Q(Qe("cli-history-directory-path"),r.value),s.hidden=Boolean(r.value),Qe("cli-history-results").hidden=!r.value,V(),r.value)t.onDirectory(r.value),Z()}function te(G=!1){if(!n.open&&!j)return;let{paths:ae,browse:be}=t.scope(),ce=r.value;i.hidden=!be,r.disabled=!ae.length;let xe=JSON.stringify(ae);if(r.dataset.paths!==xe)r.dataset.paths=xe,r.replaceChildren(ot(c("选择已授权目录","Choose an authorized directory"),""),...ae.map((Ce)=>ot(t.directoryLabel(Ce),Ce))),r.value=ae.includes(ce)?ce:"";if(G||ce&&!r.value){if(oe(),h.hidden=!0,d.hidden=!1,de(""),n.open)re().focus()}s.textContent=ae.length?c("先选目录查看会话,不会直接打开。","Choose a directory to list its sessions. This won’t open a session."):be?c("还没有获准目录。可浏览或输入一个绝对路径。","No directories are authorized. Browse or enter an absolute path."):c("没有获准目录。请检查 Web 服务启动设置。","No directories are authorized. Check the Web server startup settings.")}let N=(G)=>lo(G.id);async function W(G){q?.abort();let ae=q=new AbortController;ne(),g.querySelector("[data-activity-status]")?.remove();let ce=v("p","small muted",c("正在读取原生快照…","Loading native snapshot…"));ce.dataset.activityStatus="",ce.setAttribute("role","status"),g.append(ce);try{let xe=await e.request(`${N(G)}/activity`,void 0,AbortSignal.any([ae.signal,AbortSignal.timeout(15000)]));if(ae.signal.aborted||!n.open||T!==G)return;Fm(g,xe)}catch(xe){if(!ae.signal.aborted&&n.open&&T===G)ce.textContent=c(`无法读取原生快照:${_e(xe)}`,`Could not load the native snapshot: ${_e(xe)}`),ce.className="notice error small",ce.setAttribute("role","alert")}finally{if(q===ae)q=void 0,ne()}}async function K(G){I?.abort();let ae=I=new AbortController,be=Qe("cli-history-record-status");Q(be,c("正在读取对话记录…","Loading conversation…")),Q(Qe("cli-history-record-error"));try{let ce=await e.request(N(G),void 0,AbortSignal.any([ae.signal,AbortSignal.timeout(15000)]));if(ae.signal.aborted||!n.open||T!==G)return;let xe=H(ce.session);p.textContent=C(xe.name)||G.name,U=!0,ne();let Ce=pp(Ee(xe.updatedAt)??G.updatedAt);Q(Qe("cli-history-record-updated"),Ce&&c(`记录更新:${Ce}`,`Record updated: ${Ce}`));let Ve=ve(ce.messages).map(H).map((qe,st)=>{let Kt=bn(qe)==="toolResult"&&C(qe.toolCallId);return{key:Kt?`result:${Kt}`:`history-${st}`,message:qe}});E.render(Ve,"",new Map),requestAnimationFrame(()=>{if(!ae.signal.aborted&&n.open&&T===G)n.scrollTop=0})}catch(ce){if(ae.signal.aborted||!n.open||T!==G)return;if(ce instanceof Ie&&(ce.code==="history_too_large"||ce.code==="history_preview_too_large")){Q(Qe("cli-history-record-error"),c("这条 CLI 记录过大,无法预览。仍可尝试在 Web 继续。","This CLI record is too large to preview. You can still try to continue in Web."));return}Q(Qe("cli-history-record-error"),c(`无法读取这条记录:${_e(ce)}`,`Could not load this record: ${_e(ce)}`))}finally{if(I===ae)I=void 0,Q(be)}}function oe(){I?.abort(),I=void 0,q?.abort(),q=void 0,T=void 0,U=!1,Q(S),ne(),E.reset(),g.replaceChildren()}function ue(G){if(r.value!==G.cwd)return;oe();let ae=T={...G};d.hidden=!0,h.hidden=!1,p.textContent=ae.name,Qe("cli-history-record-meta").textContent=ae.cwd,Q(Qe("cli-history-record-updated")),Qe("cli-history-empty").hidden=!0,p.focus({preventScroll:!0}),n.scrollTop=0,ne(),K(ae)}r.addEventListener("change",()=>de(r.value)),i.addEventListener("click",()=>{if(j=!0,n.close(),!t.browse(()=>{Le(),i.focus()}))Le()}),o.addEventListener("input",V),b.addEventListener("click",()=>void Z()),k.addEventListener("click",()=>{if(T&&U)W(T)}),w.addEventListener("click",()=>{if(T&&U)t.openBranch({kind:"history",id:T.id,name:T.name})}),A.addEventListener("click",async()=>{let G=T;if(!G||A.disabled)return;let ae=e.token;J.add(G.id);let be=()=>n.open&&T===G;Q(S),ne(),_.focus();try{let ce=await e.resumeHistory(G.id);if(ae!==e.token)return;if(ce.cwd!==G.cwd)throw Error(c("返回的会话不属于所选目录。","The returned session does not belong to the selected directory."));if(R=R.filter((xe)=>xe.id!==G.id),t.onResumed(ce,be()),n.open&&!d.hidden)V()}catch(ce){if(be()){if(Q(S,c(`无法在 Web 继续:${_e(ce)}`,`Could not continue in Web: ${_e(ce)}`)),document.activeElement===_)S.focus()}}finally{J.delete(G.id),ne()}}),Xr("cli-history-back").addEventListener("click",()=>{let G=T?.id;oe(),h.hidden=!0,d.hidden=!1,V(),([...a.querySelectorAll("button")].find((ae)=>ae.dataset.history===G)??o).focus()}),n.querySelector("[data-close]")?.addEventListener("click",()=>n.close()),n.addEventListener("close",()=>{if(n.open||j)return;oe(),de(""),t.onClose()});function Le(G){if(n.open)return;if(!j)oe(),h.hidden=!0,d.hidden=!1,de("");if(te(),n.showModal(),te(),j=!1,G&&t.scope().paths.includes(G))de(G);else z();re().focus()}return{open:Le,update:ne,scopeChanged:te,renderBookmarks:z}}var bt=(e)=>ge(e,HTMLElement),yt=(e)=>ge(e,HTMLButtonElement),G0=c("仅普通文字。命令、权限审批及私密交互请回到 CLI 处理。","Plain text only. Use the CLI for commands, permission approvals, and private interactions."),bp=new Set(["terminal_not_attached","terminal_not_found","terminal_offline"]);function vp(e,t,n,r){let s=ge("cli-live-dialog",HTMLDialogElement),i=ge("cli-live-session",HTMLSelectElement),o=ge("cli-live-input",HTMLTextAreaElement),a=new Qn(bt("cli-live-messages"),bt("cli-live-transcript"),bt("cli-live-empty")),l=new Map,u=new Map,d=new Map,h=[],p=[],g,b="",k="",w,A,_,S,E=!1,R=500,L="waiting",T=!1,F={},I=[],q,U=!0;function j(){let N=p.find((xe)=>xe.id===i.value),W=N!==void 0&&b===N.id,K=W&&T&&L==="open"&&!_,oe=F.running===!0||F.compacting===!0,ue=W||Boolean(N&&k===N.id),Le=Boolean(N&&d.get(N.id)===o.value);i.disabled=Boolean(b||_||w||!p.length),yt("cli-live-close").disabled=Boolean(_),yt("cli-live-connect").hidden=W,yt("cli-live-connect").disabled=!N||!g||!e.token||L!=="open"||Boolean(_||w),yt("cli-live-disconnect").hidden=!W,yt("cli-live-disconnect").disabled=Boolean(_),yt("cli-live-refresh").disabled=Boolean(_||w),yt("cli-live-branch").hidden=!W,yt("cli-live-branch").disabled=!K||oe,yt("cli-live-send").disabled=!K||oe||Le||!o.value.trim();let G=yt("cli-live-stop"),ae=W&&F.running===!0&&Boolean(C(F.turnId));if(!ae&&document.activeElement===G)o.focus({preventScroll:!0});G.hidden=!ae,G.disabled=!K,o.readOnly=_==="input",bt("cli-live-conversation").hidden=!ue&&!o.value,Q(bt("cli-live-workspace"),N?.cwd);let be=_==="connect"?c("正在连接 CLI…","Connecting to CLI…"):_==="disconnect"?c("正在释放 Web 连接…","Disconnecting Web…"):L==="lost"?c("实时更新已离线,草稿会保留。连接恢复后只刷新消息,不会重发。","Live updates are offline. Your draft is kept. Reconnecting refreshes messages without resending them."):w?c("正在查找本地 CLI 会话…","Looking for local CLI sessions…"):W?!T?c("正在同步 CLI 对话…","Syncing the CLI conversation…"):F.compacting===!0?c("CLI 正在压缩上下文。","CLI is compacting context."):F.running===!0?c("已连接 · CLI 正在运行","Connected · CLI is running"):c("已连接 · 等待输入","Connected · Waiting for input"):g===!1?c("CLI 实时不可用:未启用或找不到本地终端控制服务。","Live CLI is unavailable. The local terminal service is disabled or could not be found."):!p.length?c("没有发现可连接的 CLI 会话。","No CLI sessions are available to connect."):L==="waiting"?c("正在等待 Web 实时连接…","Waiting for the Web connection…"):k===N?.id?I.length?c("已断开;显示最后一次同步的消息。","Disconnected. Showing the last synced messages."):c("已断开。","Disconnected."):c("选择会话后,点击「连接」读取对话。","Select a session and choose “Connect” to read the conversation."),ce=k===N?.id&&(W?T:!_)?q==="unavailable"?c(" · 对话记录暂不可读"," · Conversation history is unavailable"):q==="truncated"?c(" · 仅显示部分近期消息"," · Showing a limited set of recent messages"):"":"";Q(bt("cli-live-status"),be+ce),bt("cli-live-hint").textContent=Le?c(`上一次发送的结果未知,请先核对 CLI,不要重发这条消息。${G0}`,`Delivery of your last message is unknown. Check the CLI before trying again. Do not resend this message. ${G0}`):G0}function J(){k="",F={},I=[],q=void 0,a.reset(),o.value=u.get(i.value)??"",Q(bt("cli-live-error")),Q(bt("cli-live-receipt")),j()}function re(){let N=i.value,W=b||(_==="connect"?N:"");if(p=h.filter((K)=>K.id===W||r(K.cwd)),i.replaceChildren(ot(c("选择可用会话","Choose a session"),""),...p.map((K)=>ot(K.name,K.id))),i.value=p.some((K)=>K.id===N)?N:p.length===1?p[0]?.id??"":"",i.value!==N)J()}async function ne(){if(b||w||!s.open)return;let N=w=new AbortController;Q(bt("cli-live-error")),j();try{let W=await e.request("/api/cli-live",void 0,N.signal);if(!s.open||N.signal.aborted)return;g=W.available===!0,h=ve(W.sessions).map(H).flatMap((K)=>{let oe=C(K.id);return oe?[{id:oe,name:C(K.name)||c("未命名 CLI 会话","Untitled CLI session"),cwd:C(K.cwd)}]:[]}),re()}catch(W){if(!N.signal.aborted&&s.open)g=!1,Q(bt("cli-live-error"),c(`无法发现 CLI 会话:${_e(W)}`,`Could not find CLI sessions: ${_e(W)}`))}finally{if(w===N)w=void 0;j()}}function z(N,W){F=H(W.state);let K=H(W.transcript).status;q=K==="truncated"||K==="unavailable"?K:void 0;let oe=I;I=ve(W.messages).map(H).map((Le,G)=>({key:`cli-live:${G}`,message:JSON.stringify(oe[G]?.message)===JSON.stringify(Le)?oe[G]?.message??Le:Le}));let ue=I.at(-1);if(!ue&&q)a.reset();else a.render(I,ue?.message.streaming===!0?ue.key:"",l,k!==N);bt("cli-live-empty").hidden=Boolean(q)||I.length>0,k=N,T=!0,R=500}function V(){clearTimeout(S),S=void 0,A?.abort(),A=void 0,E=!1}function Z(N=50){if(!s.open||!b||L!=="open")return;if(A||_){E=!0;return}if(S!==void 0&&N!==0)return;clearTimeout(S),S=window.setTimeout(()=>{S=void 0,de()},N)}async function de(){let N=b;if(!N||A||!s.open||L!=="open")return;if(_){E=!0;return}let W=A=new AbortController,K=()=>b===N&&s.open&&!W.signal.aborted,oe=0;E=!1;try{let ue=await e.request(co(N),void 0,AbortSignal.any([W.signal,AbortSignal.timeout(1e4)]));if(K()){if(z(N,ue),bt("cli-live-error").dataset.read==="true")Q(bt("cli-live-error"))}}catch(ue){if(K()){if(T=!1,ue instanceof Ie&&bp.has(ue.code))b="";else oe=R,R=Math.min(R*2,5000);let Le=bt("cli-live-error");if(Le.hidden||Le.dataset.read==="true")Le.dataset.read="true",Q(Le,c(`无法同步 CLI 对话:${_e(ue)}`,`Could not sync the CLI conversation: ${_e(ue)}`))}}finally{if(A===W)A=void 0;if(K()&&(oe||E))Z(oe||50);j()}}async function te(N,W){if(!N||_)return;_=W.action;let K=bt("cli-live-error");if(delete K.dataset.read,Q(K),W.action!=="disconnect")Q(bt("cli-live-receipt"));if(W.action==="disconnect")V();j();let oe;try{let ue=await e.cliLiveAction(N,W);switch(W.action){case"connect":b=N,z(N,ue),oe=o;break;case"disconnect":b="",T=!1,oe=yt("cli-live-connect");break;case"input":u.delete(N),d.delete(N),o.value="",Q(bt("cli-live-receipt"),ue.disposition==="held"?c("CLI 已暂存消息;请在 CLI 查看,勿重发。","The CLI is holding the message. Check the CLI and do not resend it."):ue.disposition==="queued"?c("CLI 已将消息加入队列。","The CLI queued the message."):c("CLI 已接收消息。","The CLI accepted the message."));break;case"stop":Q(bt("cli-live-receipt"),c("当前回合已停止。","The current turn stopped.")),oe=o;break}}catch(ue){if(W.action==="input"&&(!(ue instanceof Ie)||ue.status>=500||ue.code==="terminal_outcome_unknown"))d.set(N,W.message);if(ue instanceof Ie&&bp.has(ue.code))b="",T=!1;Q(K,_e(ue))}finally{if(_=void 0,!b&&(W.action==="disconnect"||W.action==="connect"))re();if(j(),s.open)oe?.focus({preventScroll:!0});if(b)Z(0)}}return i.addEventListener("change",J),o.addEventListener("input",()=>{u.set(i.value,o.value),j()}),yt("cli-live-connect").addEventListener("click",()=>void te(i.value,{action:"connect"})),yt("cli-live-disconnect").addEventListener("click",()=>void te(b,{action:"disconnect"})),yt("cli-live-refresh").addEventListener("click",()=>{if(b)Z(0);else ne()}),yt("cli-live-stop").addEventListener("click",()=>{let N=C(F.turnId);if(N)te(b,{action:"stop",expectedTurnId:N})}),yt("cli-live-branch").addEventListener("click",()=>{let N=p.find((W)=>W.id===b);if(N)n({...N,kind:"live"})}),ge("cli-live-form",HTMLFormElement).addEventListener("submit",(N)=>{if(N.preventDefault(),!yt("cli-live-send").disabled)te(b,{action:"input",mode:"prompt",clientMessageId:crypto.randomUUID(),message:o.value})}),yt("cli-live-close").addEventListener("click",()=>s.close()),s.addEventListener("cancel",(N)=>{if(_)N.preventDefault()}),s.addEventListener("close",()=>{if(s.open)return;if(w?.abort(),w=void 0,V(),b)te(b,{action:"disconnect"});if(U)t();U=!0}),{open(){if(s.open)return;if(s.showModal(),j(),!b)ne()},scopeChanged(){re(),j()},closeAfterBranch(){U=!1,s.close()},invalidate(N){if(b&&b===N)Z()},setTransport(N){if(N===L)return;if(L=N,N!=="open")T=!1,V();else if(b)Z(0);else if(!g)ne();j()}}}var j6=2000,yp=8000,G6={pending:c("正在查找 CLI 会话…","Looking for a CLI session…"),none:c("未发现可跟随的 CLI 会话。","No CLI session to follow."),ambiguous:c("有多个 CLI 会话,无法确认跟随哪一个。","Multiple CLI sessions were found. Could not determine which one to follow."),unavailable:c("无法核验 CLI 会话,暂不显示对话。","Could not verify the CLI session. The conversation is hidden.")};function K6(e,t){switch(e.status){case"none":return{status:"none"};case"ambiguous":return{status:"ambiguous"};case"ok":{let n=H(e.session),r=C(n.id),s=C(n.cwd),i=C(n.name);if(!r||!s||!t(s)||typeof n.name!=="string"||typeof n.running!=="boolean"||!Array.isArray(e.messages))return{status:"unavailable"};let o=H(e.transcript).status,a=[];for(let l of o==="unavailable"?[]:e.messages){let{role:u,content:d,timestamp:h,streaming:p}=H(l);if(u!=="user"&&u!=="assistant"&&u!=="custom"||typeof d!=="string")return{status:"unavailable"};a.push({role:u,content:d,timestamp:Ee(h),streaming:u==="assistant"&&p===!0})}return{status:"ok",target:{id:r,name:i||c("未命名 CLI 会话","Untitled CLI session"),cwd:s,running:n.running},messages:a,...o==="truncated"||o==="unavailable"?{history:o}:{}}}default:return{status:"unavailable"}}}function kp(e,t,n){let r=ge("cli-follow-view",HTMLElement),s=ge("cli-follow-status",HTMLElement),i=ge("cli-follow-empty",HTMLElement),o=new Qn(ge("cli-follow-messages",HTMLElement),r,i),a=new Map,l=!1,u,d="",h,p,g=[];function b(){g=[],o.reset(),i.hidden=!0}function k(E,R=!1,L){let T=E==="ok"?c(`只读跟随 · ${R?"CLI 正在运行":"CLI 未在运行"}`,`Following · Read-only · ${R?"CLI is running":"CLI is idle"}`):G6[E],F=L==="unavailable"?c(" · 对话记录暂不可读"," · Conversation history is unavailable"):L==="truncated"?c(" · 仅显示部分近期消息"," · Showing a limited set of recent messages"):"";if(s.dataset.state!==E)s.dataset.state=E;if(s.textContent!==T+F)s.textContent=T+F}function w(E){let R=u;if(E.status!=="ok"){if(u)b();if(u=void 0,k(E.status),R)n();return}u=E.target,d=u.cwd;let L=!R||R.id!==u.id||R.cwd!==u.cwd;if(L)b();k("ok",u.running,E.history);let T=new Map(g.map((q)=>[q.key,q])),F=new Set,I=E.messages.map((q,U)=>{let j=Vr(q)||`follow:${U}`,J=F.has(j)?`${j}:${U}`:j;F.add(J);let re=T.get(J);return re&&JSON.stringify(re.message)===JSON.stringify(q)?re:{key:J,message:q}});if(E.history&&I.length===0)b();else if(L||g.length!==I.length||I.some((q,U)=>q!==g[U])){g=I;let q=g.at(-1);o.render(g,q?.message.streaming===!0?q.key:"",a,L)}if(i.hidden=Boolean(E.history)||g.length>0,L||R?.name!==u.name)n()}function A(){clearTimeout(p),p=void 0,h?.abort(),h=void 0}async function _(){if(!l||document.hidden||h)return;let E=h=new AbortController,R=AbortSignal.any([E.signal,AbortSignal.timeout(yp)]),L=performance.now()+yp,T=()=>l&&!document.hidden&&h===E;try{let F=await e.request("/api/cli-follow",void 0,R).catch(()=>{return});if(T())w(!F||R.aborted||performance.now()>=L?{status:"unavailable"}:K6(F,t))}finally{if(h===E){if(h=void 0,l&&!document.hidden)p=window.setTimeout(()=>{p=void 0,_()},j6)}}}function S(){if(!l)return;l=!1,A(),u=void 0,d="",b(),n()}return document.addEventListener("visibilitychange",()=>{if(!l)return;if(document.hidden){if(A(),u)b(),u=void 0,n();k("pending")}else _()}),window.addEventListener("pagehide",S),{get active(){return l},get target(){return u},get workspace(){return d},start(){if(l)return;l=!0,k("pending"),n(),_()},stop:S,recheckWorkspace(){if(!d||t(d))return;d="",w({status:"unavailable"})}}}var wp=1e4,xp=(e)=>e instanceof DOMException&&e.name==="TimeoutError";function K0(e){return Array.isArray(e)?[...new Set(e.filter((t)=>typeof t==="string"&&Boolean(t)))]:[]}function Ep(e,t,n,r){let s=ge("workspace-browser-button",HTMLButtonElement),i=ge("workspace-browser-dialog",HTMLDialogElement),o=ge("workspace-browser-close",HTMLButtonElement),a=ge("workspace-browser-form",HTMLFormElement),l=ge("workspace-browser-path",HTMLInputElement),u=ge("workspace-browser-use",HTMLButtonElement),d=ge("workspace-browser-navigation",HTMLElement),h=ge("workspace-browser-root-field",HTMLElement),p=ge("workspace-browser-root",HTMLSelectElement),g=ge("workspace-browser-up",HTMLButtonElement),b=ge("workspace-browser-current",HTMLElement),k=ge("workspace-browser-status",HTMLElement),w=ge("workspace-browser-entries",HTMLUListElement),A=ge("workspace-browser-feedback",HTMLElement),_=ge("workspace-browser-approval",HTMLElement),S=ge("workspace-browser-approval-title",HTMLElement),E=ge("workspace-browser-approval-path",HTMLElement),R=ge("workspace-browser-confirm",HTMLButtonElement),L=ge("workspace-browser-deny",HTMLButtonElement),T,F,I,q=0,U="",j;function J(G="",ae=!1){A.classList.toggle("error",ae),Q(A,G)}function re(){let G=F?.kind==="decision",ae=F?.kind==="prepare";d.hidden=Boolean(I),_.hidden=!I,E.textContent=I?.path??"",u.disabled=!l.value||ae||G,p.disabled=ae,g.disabled=!U||ae,o.setAttribute("aria-disabled",String(G)),R.setAttribute("aria-disabled",String(G)),L.setAttribute("aria-disabled",String(G))}function ne(G){if(clearTimeout(q),I=G,G)q=window.setTimeout(()=>{if(I===G&&F?.kind!=="decision")z()},G.expiresAt-Date.now());re()}function z(){ne(),J(c("审批已过期。请重新选择「使用此目录」,发起新的审批。","Approval expired. Choose “Use this directory” to request approval again."),!0),u.focus()}function V(){let G=F;F=void 0,G?.controller.abort()}async function Z(G,ae,be,ce,xe){if(!i.open||F?.kind==="decision"||!T)return;V();let Ce={kind:G,controller:new AbortController};F=Ce,re();let Ve=performance.now()+wp,qe=AbortSignal.any([Ce.controller.signal,AbortSignal.timeout(wp)]),st;try{let Kt=new Promise((Re,Nr)=>{st=()=>Nr(qe.reason),qe.addEventListener("abort",st,{once:!0})}),Ir=await Promise.race([e.request(`/api/workspaces/${ae}`,be,qe),Kt]);if(F!==Ce||!i.open||Ce.controller.signal.aborted)return;if(qe.throwIfAborted(),performance.now()>=Ve)throw new DOMException("Workspace request timed out","TimeoutError");F=void 0,re(),ce(Ir)}catch(Kt){if(F!==Ce&&F!==void 0||!i.open||Ce.controller.signal.aborted)return;F=void 0,re(),xe(Kt)}finally{if(st)qe.removeEventListener("abort",st)}}function de(G=""){U="",b.textContent=G,b.hidden=!G,w.replaceChildren(),w.hidden=!0}function te(G,ae=!0){if(!G||I||F?.kind==="prepare"||!i.open)return;if(l.value=G,ae)b.textContent=G,b.hidden=!1,b.focus({preventScroll:!0});de(G),J(),k.textContent=c("正在读取目录…","Reading directory…"),Z("browse","browse",{path:G},(be)=>{let ce=C(be.path);if(!ce||!Array.isArray(be.entries))throw Error("Invalid browse response");U=C(be.parent),b.textContent=ce,l.value=ce,p.value=t().roots.includes(ce)?ce:"";for(let xe of be.entries){let{name:Ce,path:Ve,kind:qe}=H(xe);if(typeof Ce!=="string"||!Ce||typeof Ve!=="string"||!Ve)continue;if(qe!=="directory"&&qe!=="file")continue;let st=v("li"),Kt=qe==="directory"?Be("",()=>te(Ve),"button--quiet workspace-entry"):v("div","workspace-entry");Kt.append(v("bdi","break",Ce),v("span","small muted",qe==="directory"?c("目录 ›","Folder ›"):c("文件","File"))),st.append(Kt),w.append(st)}w.hidden=!w.childElementCount,k.textContent=be.truncated===!0?c("目录条目太多,仅显示部分名称。","This directory has too many entries to show them all."):w.hidden?c("没有可显示的条目。","No entries to show."):"",re()},(be)=>{k.textContent="",p.value="",J(xp(be)?c("读取目录超时。请重新选择一个已授权工作区。","Reading the directory timed out. Choose an authorized directory and try again."):c("无法读取该目录。只能浏览已授权范围内仍可访问的目录。","Could not read this directory. You can only browse accessible directories within authorized locations."),!0)})}function N(G){let ae=C(G.path),be=K0(G.workspaces);if(!ae||!be.includes(ae))throw Error("Invalid workspace selection receipt");let ce=j===void 0;j=void 0,i.close(),n(ae,be,ce)}function W(G){if(!G||I||F?.kind==="prepare")return;if(F?.kind==="browse")k.textContent=c("目录读取已取消。","Directory read canceled.");J(c("正在核验目录…","Verifying directory…")),Z("prepare","prepare",{path:G},(ae)=>{if(ae.status==="authorized"){N(ae);return}let be=C(ae.path),ce=C(ae.confirmation),xe=Ee(ae.expiresAt);if(ae.status!=="confirmation_required"||!be||!ce||xe===void 0)throw Error("Invalid approval response");if(l.value=be,xe<=Date.now()){z();return}J(),ne({token:ce,path:be,expiresAt:xe}),S.focus()},(ae)=>{J(xp(ae)?c("核验目录超时。路径已保留,请重试。","Directory verification timed out. The path is still in the field. Try again."):c("无法核验目录。请检查绝对路径、目录是否仍存在及本机 Web 服务是否可用。","Could not verify the directory. Check the absolute path, whether the directory still exists, and whether the local Web server is running."),!0)})}function K(G,ae=!1){if(!I||F?.kind==="decision")return;let{token:be,expiresAt:ce}=I;if(ce<=Date.now()){z();return}clearTimeout(q),J(G?c("正在提交允许决定…","Granting access…"):c("正在提交拒绝决定…","Denying access…")),Z("decision","confirm",{confirmation:be,allow:G},(xe)=>{if(G){N(xe);return}if(xe.status!=="cancelled")throw Error("Invalid denial receipt");if(ne(),ae)i.close();else J(c("已拒绝。工作区未切换。","Access denied. The selected directory did not change.")),u.focus()},(xe)=>{ne();let Ce=xe instanceof Ie&&(xe.code==="workspace_confirmation_stale"||xe.status===410);J(Ce?c("审批已失效:可能已过期或目录已变更。请重新核验路径。","Approval expired or the directory changed. Verify the path again."):c("未能确认审批结果,未切换工作区。请重新核验路径。","Could not confirm the approval result. The selected directory did not change. Verify the path again."),!0),u.focus()})}function oe(){if(F?.kind==="decision")return;if(I)K(!1,!0);else V(),i.close()}function ue(){let{roots:G}=t(),ae=p.value;p.replaceChildren(ot(c("选择已授权工作区","Choose an authorized directory"),""),...G.map((be)=>ot(be,be))),p.value=G.includes(ae)?ae:"",h.hidden=!G.length}function Le(G){if(!T||document.querySelector("dialog:modal"))return!1;j=G,V(),ne(),J();let{roots:ae,selected:be}=t(),ce=ae.includes(be)?be:ae[0]??"";if(ue(),p.value=ce,l.value=ce,k.textContent=ce?"":c("没有已授权目录。可手动输入目录的绝对路径。","No directories are authorized. Enter an absolute directory path."),de(),re(),i.showModal(),ce)te(ce,!1);return!0}return s.addEventListener("click",()=>Le()),a.addEventListener("submit",(G)=>{G.preventDefault(),W(l.value)}),l.addEventListener("input",()=>{if(F?.kind==="browse"||F?.kind==="prepare"){if(F.kind==="browse")k.textContent=c("目录读取已取消。","Directory read canceled.");V()}J(),re()}),p.addEventListener("change",()=>te(p.value)),g.addEventListener("click",()=>te(U)),R.addEventListener("click",()=>K(!0)),L.addEventListener("click",()=>K(!1)),o.addEventListener("click",oe),i.addEventListener("cancel",(G)=>{G.preventDefault(),oe()}),i.addEventListener("close",()=>{if(i.open)return;V(),ne(),J(),de();let G=j??r;if(j=void 0,!document.querySelector("dialog:modal"))G?.()}),{open:Le,update(G,ae){let be=H(G).platform,ce=be==="win32"||be==="posix"?be:void 0,xe=T!==ce||ae;if(T=ce,s.hidden=!T,l.placeholder=T==="win32"?"C:\\Projects\\OmO":"/home/me/projects/OmO",!i.open)return;if(!T)V(),i.close();else{if(ue(),!xe)return;V(),ne(),de(),k.textContent="",J(c("本机 Web 服务连接已更新。请重新选择或核验目录。","The local Web server connection changed. Choose a directory or verify the path again."),!0),l.focus()}}}}var V0={account:["login","logout","account","gpt-account","claude-account","cursor-account"],settings:["scoped-models","favorite-models","trust","reload","keybindings","fallback","lookat","nested-agents","reload-rules"],terminal:["tui","hooks","websearch","ttsr","changelog","files","diff","quit","exit","debug","answer"],history:["history","search"],transfer:["export","import","share","ir","remote"],task:["task-kill"],memory:["palace","memory","memfs","remember","init","doctor","recompile","memory-repository","sleeptime","reflect","dream","people","facts","agreements"],runtime:["mcp","computer","goal","loop","handoff","btw"],support:["bug","feedback"]},ma=Object.values(V0).flat();var Sp=120,_p=6000,pa=Sp.toLocaleString(me),ga=_p.toLocaleString(me),Z0=[{name:"new",invocation:"/new",label:c("新会话","New session"),description:c("开始一个新会话。","Start a new session.")},{name:"resume",invocation:"/resume",label:c("继续会话","Resume session"),description:c("从历史会话中选择一个继续。","Choose a past session to resume.")},{name:"sessions",invocation:"/sessions",label:c("会话列表","Session list"),description:c("列出历史会话并继续其中一个。","Browse and resume past sessions.")},{name:"rename",invocation:"/rename",label:c("重命名","Rename"),description:c(`重命名当前会话(名称可选,最长 ${pa} 字)。`,`Rename the current session. The name is optional and can be up to ${pa} characters.`)},{name:"name",invocation:"/name",label:c("重命名(别名)","Rename (alias)"),description:c("与 /rename 相同:设置会话显示名。","Alias for /rename. Set the session's display name.")},{name:"session",invocation:"/session",label:c("会话信息","Session info"),description:c("查看当前会话的信息与统计。","View details and statistics for this session.")},{name:"tree",invocation:"/tree",label:c("会话树","Session tree"),description:c("查看会话分支树并跳到任意点继续。","Browse session branches and resume from any point.")},{name:"todo",invocation:"/todo",label:c("本会话待办","Session Todo"),description:c("查看当前分支的待办。","View the Todo list for the current branch.")},{name:"rules",invocation:"/rules",label:c("项目规则","Project rules"),description:c("只读查看本会话工作目录中的 AGENTS.md。","Read AGENTS.md in this session’s working directory.")},{name:"tasks",invocation:"/tasks",label:c("本会话任务","Session tasks"),description:c("查看当前会话的原生子代理任务。","View native subagent tasks for this session.")},{name:"dag",invocation:"/dag",label:c("本会话 DAG","Session DAG"),description:c("查看本会话的运行,展开读取波次和依赖。","View workflow runs and expand them to inspect execution waves and dependencies.")},{name:"help",invocation:"/help",label:c("命令帮助","Command help"),description:c("查看 Web 可用的命令和快捷键。","See which commands and keyboard shortcuts are available on the web.")},{name:"hotkeys",invocation:"/hotkeys",label:c("快捷键","Keyboard shortcuts"),description:c("查看此工作台的键盘操作。","View keyboard shortcuts for the workbench.")},{name:"fork",invocation:"/fork",label:c("分支","Fork"),description:c("选择一条用户消息,从该消息之前创建分支。","Choose a user message and start a branch from just before it.")},{name:"clone",invocation:"/clone",label:c("副本","Clone"),description:c("复制当前会话为新会话并切换过去。","Copy the current session and switch to the copy.")},{name:"compact",invocation:"/compact",label:c("压缩上下文","Compact context"),description:c(`手动压缩上下文(指示可选,最长 ${ga} 字)。`,`Compact context manually. Optional instructions can be up to ${ga} characters.`)},{name:"settings",invocation:"/settings",label:c("会话设置","Session settings"),description:c("打开当前会话的运行设置;全局配置请在本机终端修改。","Open this session's run settings. Change global configuration in the local terminal.")},{name:"setting",invocation:"/setting",label:c("会话设置(别名)","Session settings (alias)"),description:c("与 /settings 相同。","Alias for /settings.")},{name:"model",invocation:"/model",label:c("模型","Model"),description:c("切换本会话的模型(只对当前会话有效)。","Change the model for this session only.")},{name:"thinking",invocation:"/thinking",label:c("思考档位","Thinking level"),description:c("设置思考档位(可选;档位按实际可选值校验)。","Set a thinking level. If specified, it must be one of the available levels.")},{name:"reasoning",invocation:"/reasoning",label:c("推理状态","Reasoning status"),description:c("查看当前模型是否启用推理。持久设置在本机修改。","Check whether reasoning is enabled for the current model. Change persistent settings in the native client.")},{name:"efforts",invocation:"/efforts",label:c("原生推理档位","Native reasoning levels"),description:c("查看当前档和原生可用档位。持久设置在本机修改。","View the current level and available native levels. Change persistent settings in the native client.")},{name:"fast",invocation:"/fast",label:c("极速模式","Fast mode"),description:c("切换极速模式(开、关或不带参数切换;只影响当前模型)。","Set fast mode to on or off, or omit the argument to toggle it. Applies only to the current model.")},{name:"copy",invocation:"/copy",label:c("复制","Copy"),description:c("复制上一条助手消息。","Copy the last assistant message.")}],V6=Z0.map((e)=>e.name),J0={account:c("涉及本机 OmO 的账号或凭据。","Uses local OmO accounts or credentials."),settings:c("涉及 Native 配置或重载,不由 Web 命令入口处理。","Uses native configuration or reload controls not handled by Web commands."),terminal:c("依赖原生终端界面或命令上下文。","Needs the native terminal UI or command context."),history:c("搜索跨会话历史,不限于当前会话。","Searches history across sessions, outside the current session."),transfer:c("涉及会话导入、导出、分享或跨设备访问。","Imports, exports, shares, or accesses sessions across devices."),task:c("会取消原生子代理任务;Web 仅提供查看。","Cancels a native subagent task; Web only provides inspection."),memory:c("访问或更改原生长期记忆仓库或编译状态。","Accesses or changes native long-term memory or its compilation state."),runtime:c("涉及原生运行控制或主机工具,不是会话内只读操作。","Uses native runtime controls or host tools, not a session-local read."),support:c("需要 Native 的反馈提交界面。","Needs the native feedback interface.")};function Y0(e){if(e==="reasoning"||e==="efforts")return J0.settings;for(let[t,n]of Object.entries(V0))if(n.includes(e))return J0[t];return J0.terminal}function Tp(e){let t=Ns(e);return t.kind==="builtin"&&["session","tree","todo","rules","tasks","dag","help","hotkeys","reasoning","efforts","settings","setting"].includes(t.command.name)}var J6=/^\/[A-Za-z][A-Za-z0-9_-]*/,Ap=/[\0-\b\v\f\x0e-\x1f\x7f]/,Z6=/^[A-Za-z0-9_./:@+-]+$/,Cp=c("命令只能是单行文本,不能包含换行或控制字符。","Commands must be on one line and cannot contain control characters."),er=(e)=>({kind:"malformed",message:e});function Ns(e){let t=J6.exec(e)?.[0];if(t===void 0)return{kind:"plain"};let n=e.slice(t.length),r=t.slice(1),s=V6.find((a)=>a===r),i=ma.find((a)=>a===r);if(s===void 0&&i===void 0)return{kind:"plain"};if(n!==""&&!/^[ \t\r\n]/.test(n))return Ap.test(n[0])?er(Cp):{kind:"plain"};if(Ap.test(e)||e.includes("\r")||e.includes(`
|
|
305
|
+
`))return er(Cp);if(i!==void 0)return{kind:"tui-only",name:i};let o=n.trim();switch(s){case"new":case"resume":case"sessions":case"session":case"tree":case"todo":case"rules":case"tasks":case"dag":case"help":case"hotkeys":case"fork":case"clone":case"copy":case"settings":case"setting":if(o!=="")return er(c(`“/${s}”不带参数。`,`/${s} does not take arguments.`));return{kind:"builtin",command:{name:s}};case"reasoning":case"efforts":return o===""?{kind:"builtin",command:{name:s}}:{kind:"tui-only",name:s};case"rename":case"name":if(o.length>Sp)return er(c(`会话名称不能超过 ${pa} 字。`,`Session names can be up to ${pa} characters.`));return{kind:"builtin",command:{name:s,...o===""?{}:{value:o}}};case"compact":if(o.length>_p)return er(c(`压缩指示不能超过 ${ga} 字。`,`Compaction instructions can be up to ${ga} characters.`));if(o==="")return{kind:"builtin",command:{name:"compact"}};return{kind:"builtin",command:{name:"compact",instructions:o}};case"model":if(o==="")return{kind:"builtin",command:{name:"model"}};if(/(^|\s)--\S/.test(o))return er(c("Web 只接受精确模型引用,不支持 --default 等持久化参数。","The web app accepts exact model references only. Persistent flags such as --default are not supported."));if(!Z6.test(o))return er(c("模型引用只能是单个精确引用(如 provider/model)。","Enter one exact model reference, such as provider/model."));return{kind:"builtin",command:{name:"model",reference:o}};case"thinking":if(o==="")return{kind:"builtin",command:{name:"thinking"}};if(!/^[^\s]+$/.test(o))return er(c("请输入单个思考档位,例如 high。","Enter a single thinking level, such as high."));return{kind:"builtin",command:{name:"thinking",level:o.toLowerCase()}};case"fast":{if(o==="")return{kind:"builtin",command:{name:"fast"}};let a=o.toLowerCase();return a==="on"||a==="off"?{kind:"builtin",command:{name:s,mode:a}}:er(c("“/fast”只接受 on、off 或无参数(切换)。","Use /fast on, /fast off, or /fast to toggle."))}default:return{kind:"plain"}}}var Qr=/^(?:\/(?:[A-Za-z0-9_-]{1,64}|skill:[A-Za-z0-9-]{1,64})|\$[A-Za-z0-9-]{1,64})$/,Y6=/^(?:\/(?:[A-Za-z0-9_-]{0,64}|skill:[A-Za-z0-9-]{0,64})|\$[A-Za-z0-9-]{0,64})$/;function ba(e){return[...Z0.map((t)=>({...t,source:"builtin"})),...ve(e).map(H).filter((t)=>Ns(C(t.invocation)).kind==="plain")]}function Rp(e,t){let n=[],r=-1,s,i=!1;function o(){n=[],r=-1,t.hidden=!0,e.removeAttribute("aria-activedescendant")}function a(l){let u=n[l];if(!u)return;e.value=`${u.invocation} `,e.focus(),e.setSelectionRange(e.value.length,e.value.length),o(),e.dispatchEvent(new Event("input",{bubbles:!0}))}return e.addEventListener("compositionstart",()=>{i=!0,o()}),e.addEventListener("compositionend",()=>{i=!1}),e.addEventListener("blur",o),t.addEventListener("mousedown",(l)=>l.preventDefault()),t.addEventListener("click",(l)=>{let u=l.target;if(!(u instanceof Element))return;let d=Array.from(t.children).findIndex((h)=>h.contains(u));a(d)}),{get composing(){return i},reset(){s=void 0,o()},render(l,u){let d=e.value;if(s!==d)s=void 0;if(!u||i||s===d||document.activeElement!==e||!Y6.test(d)||e.selectionStart!==d.length||e.selectionEnd!==d.length){o();return}let h=d.startsWith("$")||d.startsWith("/skill:"),p=d.toLowerCase().replace(/^\/skill:/,"$"),g=new Map;for(let k of ba(l)){let w=C(k.invocation);if(!Qr.test(w)||w.startsWith("$")!==h)continue;if(w.toLowerCase().startsWith(p)&&!g.has(w))g.set(w,{invocation:w,description:C(k.description)})}let b=[...g.values()].sort((k,w)=>Number(w.invocation===p)-Number(k.invocation===p)||k.invocation.localeCompare(w.invocation));if(!b.length){o();return}if(b.length===n.length&&b.every((k,w)=>k.invocation===n[w]?.invocation&&k.description===n[w]?.description))return;n=b,r=-1,e.removeAttribute("aria-activedescendant"),t.replaceChildren(...b.map((k,w)=>{let A=v("li");return A.id=`inline-command-${w}`,A.setAttribute("role","option"),A.setAttribute("aria-selected","false"),A.append(v("code","",k.invocation),v("span","small muted",k.description)),A})),t.hidden=!1,t.scrollTop=0},key(l){if(i||t.hidden||!Di(l))return!1;switch(l.key){case"Escape":s=e.value,o();break;case"ArrowDown":case"ArrowUp":case"PageDown":case"PageUp":{let u=Li(l.key,r,t.children,t);if(u===void 0)return!1;t.children[r]?.setAttribute("aria-selected","false"),r=u;let d=t.children[r];d.setAttribute("aria-selected","true"),e.setAttribute("aria-activedescendant",d.id),Ii(t,d);break}case"Enter":case"Tab":if(r<0)return!1;a(r);break;default:return!1}return l.preventDefault(),!0}}}var Dp="omo-web-open-sessions";function X6(){try{let e=sessionStorage.getItem(Dp),t=e?JSON.parse(e):[];return new Set(ve(t).filter((n)=>typeof n==="string"&&n.length>0))}catch(e){if(!(e instanceof DOMException||e instanceof SyntaxError))throw e;return new Set}}function Mp(e){let n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("fill","currentColor"),n.setAttribute("aria-hidden","true"),n.setAttribute("focusable","false");let r=document.createElementNS("http://www.w3.org/2000/svg","use");return r.setAttribute("href",`/icons.svg#${e}`),n.append(r),n}function Lp(e,t){let n=X6(),r=new Set,s=new Map,i=new Map,o=0;function a(){try{sessionStorage.setItem(Dp,JSON.stringify([...n]))}catch(p){if(!(p instanceof DOMException))throw p}}function l(p,g){p.toggle.setAttribute("aria-expanded",String(!g)),p.rows.hidden=g}function u(p){let g=v("section","session-group"),b=v("h2","session-group-heading"),k=Be("",()=>{if(r.delete(p))l(R,!1);else r.add(p),l(R,!0)},"button--quiet session-group-toggle"),w=v("span","session-group-label"),A=v("span","path session-group-path",p),_=v("span","session-group-chevron"),S=v("ul","session-group-rows"),E=`rail-directory-${++o}`;w.id=`${E}-label`,A.id=`${E}-path`,S.id=`${E}-rows`,A.dir="ltr",_.setAttribute("aria-hidden","true"),k.setAttribute("aria-controls",S.id),k.setAttribute("aria-labelledby",w.id),g.dataset.cwd=p,k.append(Mp("browse"),w,_,A),b.append(k),g.append(b,S);let R={section:g,toggle:k,label:w,path:A,rows:S};return s.set(p,R),R}function d(p){let g=v("li","session-rail-row"),b=Be("",()=>t.open(p),"button--quiet session-link"),k=Be("",()=>{if(!k.hasAttribute("aria-disabled"))t.close(p)},"button--quiet session-rail-close"),w=v("span"),A=v("small"),_=v("p","notice error small session-rail-close-error");_.id=`rail-close-error-${++o}`,_.hidden=!0,g.dataset.sessionRow=p,b.dataset.session=p,k.dataset.closeSession=p,b.append(w,A),k.append(Mp("close")),g.append(b,k,_);let S={item:g,open:b,close:k,name:w,status:A,error:_};return i.set(p,S),S}function h(p,g,b){let k=document.activeElement,w=k instanceof HTMLButtonElement&&e.contains(k)?k:void 0,A=w?.closest("[data-cwd]")?.dataset.cwd,_=w?.closest(".session-rail-row"),S=[_?.nextElementSibling,_?.previousElementSibling].map((T)=>T?.querySelector(".session-link")),E=new Set(s.keys()),R=new Set(i.keys()),L=e.firstElementChild;for(let{cwd:T,label:F,sessions:I}of p){let q=s.get(T)??u(T);if(q.label.textContent!==F)q.label.textContent=F;if(q.path.hidden=F===T,q.path.hidden)q.toggle.removeAttribute("aria-describedby");else q.toggle.setAttribute("aria-describedby",q.path.id);if(l(q,r.has(T)),q.section!==L)e.insertBefore(q.section,L);L=q.section.nextElementSibling,E.delete(T);let U=q.rows.firstElementChild;for(let j of I){let J=i.get(j.id)??d(j.id);if(J.name.textContent!==j.name){J.name.textContent=J.open.title=j.name;let Z=c(`关闭会话:${j.name}`,`Close session: ${j.name}`);J.close.setAttribute("aria-label",Z),J.close.title=Z}let{label:re,close:ne}=b(j),z=ne?.status==="pending",V=z?c("正在关闭…","Closing…"):re;if(J.status.textContent!==V)J.status.textContent=V;if(z)J.close.setAttribute("aria-disabled","true");else J.close.removeAttribute("aria-disabled");if(Q(J.error,ne?.status==="failed"?ne.error:""),J.error.hidden)J.close.removeAttribute("aria-describedby");else J.close.setAttribute("aria-describedby",J.error.id);if(j.id===g)J.open.setAttribute("aria-current","true");else J.open.removeAttribute("aria-current");if(J.item!==U)q.rows.insertBefore(J.item,U);U=J.item.nextElementSibling,R.delete(j.id)}}for(let T of R)i.get(T)?.item.remove(),i.delete(T);for(let T of E)s.get(T)?.section.remove(),s.delete(T);if(w&&document.activeElement===document.body){let T=A?s.get(A):void 0;[w,...S,T?.toggle,t.fallback].find((F)=>F?.getClientRects().length)?.focus({preventScroll:!0})}}return{has:(p)=>n.has(p),open(p){if(r.delete(p.cwd),!n.has(p.id))n.add(p.id),a()},remove(p){if(!n.delete(p))return!1;return a(),!0},retain(p){let g=n.size;for(let b of n)if(!p(b))n.delete(b);if(n.size!==g)a()},render:h}}Oc();var P=(e)=>ge(e,HTMLElement),Y=(e)=>ge(e,HTMLButtonElement),je=(e)=>ge(e,HTMLSelectElement),jt=(e)=>ge(e,HTMLInputElement),ka=(e)=>ge(e,HTMLFormElement),kn=(e)=>ge(e,HTMLDialogElement),Oe=new Wa(lv),eo=new Qn(P("messages"),P("transcript"),P("no-messages")),xr=v("p","notice small");xr.id="transcript-status";xr.setAttribute("role","status");xr.hidden=!0;ka("composer").prepend(xr);var Ia=new ja(P("interactions")),va=P("activity-row"),Ip=P("activity"),He=ge("prompt",HTMLTextAreaElement),zi=Rp(He,P("inline-commands")),nr=je("prompt-mode"),rr=je("model"),wa=je("thinking"),ir=v("button","button button--quiet",c("应用模型","Apply model"));ir.id="apply-model";ir.type="button";ir.hidden=!0;var On=v("p","small muted sr-only");On.id="model-preview";On.setAttribute("role","status");On.hidden=!0;rr.setAttribute("aria-describedby",On.id);wa.setAttribute("aria-describedby",On.id);rr.parentElement?.after(ir);var qs=P("compose-options"),sc=qs.parentElement,Er=Y("compose-options-button"),Wp=v("div","row compose-selectors");Wp.append(...qs.children);var jp=v("div","stack stack--tight");jp.append(Wp,On);qs.append(jp);var Hs=kn("new-dialog"),rt=kn("manage-dialog"),we=kn("details-dialog"),sn=kn("command-dialog"),qi=kn("branch-dialog"),vn=Ri,X0={explicit:c("显式指定","Selected"),session:c("会话内记录","Session"),global:c("设备记忆","Saved on this device"),"model-default":c("模型默认","Model default"),default:c("默认设置","Default"),fallback:c("回退档位","Fallback"),clamped:c("按模型能力调整","Adjusted for this model")},Q0={ask:c("审批:询问","Ask first"),auto:c("审批:Auto","Auto"),"full-access":c("审批:无审批","No approval")},Np=[["ask",Q0.ask],["auto",Q0.auto],["full-access",Q0["full-access"]]],O,vc=Cm(Oe,()=>we.open&&O?.status==="ready"?O.session.id:void 0),kt={},ji={},et="connecting",Bt="waiting",Xt=!1,Rr=!1,Ca=!1,lr="",Gi="",on=new Map,Et=[],ic=0,xa=!1,Ot="",_r="",vt=(e)=>Et.includes(e),Hi="omo-web-language-return-session",Ar=!1,Wt,$s=0,Pi=2000,oc=0,yc=2000,Gp=30000,Kp=20000,Q6=45000,$n=!1,Ui,Os=0,rs,ec=0,Ki=0,ac=0,Nn,Wi=!1,rn=!1,Bp="omo-web-navigation-collapsed",kc="omo-web-desktop-inspector",Cr=!1,Vi=!0,$t=new Set,Fn=new Set,lc=new Map,Pe=new Map,ts=new Map,Lr=(e)=>ts.get(e)?.status==="pending",zn=(e)=>Lr(e)||Pe.get(e)?.status==="pending",Ps=matchMedia("(max-width: 760px)"),Us=matchMedia("(max-width: 1000px)"),Op=matchMedia("(prefers-color-scheme: dark)"),tc=new Intl.NumberFormat(me),ev=new Intl.NumberFormat(me,{maximumFractionDigits:2}),wc=(e)=>Y(Ps.matches?"open-navigation":Cr?"rail-toggle":e).focus(),or=Lp(P("session-list"),{open:Ba,close:dv,fallback:jt("search")}),Vp=new WeakMap,tv=zm(Oe,(e,t,n)=>{if(n.kind==="web"&&Vp.get(n)!==O){if(vt(e.cwd))cn(e);return}Yp(e,t,n)}),xc=(e)=>{if(qi.open)return;if(e.kind==="web"&&O)Vp.set(e,O);qi.dataset.sourceKind=e.kind,tv(e)},mt=kp(Oe,vt,()=>{if(mt.active)O?.history?.invalidate();if(en(),Se(),O?.history)Ws(O)}),Js=vp(Oe,()=>wc("cli-live-button"),xc,vt),Jp=Ep(Oe,()=>({roots:Et,selected:_r||O?.session.cwd||Ot}),av,()=>{if(Ps.matches&&!rn)Y("open-navigation").focus();else if(Y("workspace-browser-button").hidden)jt("search").focus();else Y("workspace-browser-button").focus()}),Sa=!1,es="cli-history-button";function $p(e,t){Sa=!0,kn("cli-history-dialog").close(),Ba(e.id,t)}var to=gp(Oe,{scope:()=>({paths:Et,browse:!Y("workspace-browser-button").hidden}),directoryLabel:Zi,bookmarks:()=>on.values(),onDirectory:(e)=>{_r=e},browse:(e)=>Jp.open(e),onClose:()=>{if(!Sa&&!document.querySelector("dialog:modal"))if(es==="prompt"&&He.getClientRects().length)He.focus();else wc(es==="workspace-browser-button"&&!Y(es).hidden?es:"cli-history-button");es="cli-history-button",Sa=!1},openBookmark:(e)=>$p(e,!1),openBranch:xc,resumeUnavailable:nv,onResumed:(e,t)=>{if(!vt(e.cwd))return;if(Pe.get(e.id)?.status==="pending"&&O?.session.id===e.id)no(O);if(Pe.delete(e.id),cn(e),t)$p(e,!0)}});function $i(e){switch(e){case"engine_offline":return c("本机引擎未连接。","The local engine is offline.");case"shared_transport":return c("切换到 CLI 需要私有本机连接。","Switching to the CLI requires a private local connection.");case"missing_capability":return c("此 OmO 版本不支持换端。","This version of OmO does not support handoff.");case"profile_mismatch":return c("本机引擎与 CLI 会话使用不同配置。","The local engine and the CLI session use different profiles.");case"session_busy":return c("等本轮结束后再换端。","Wait for this turn to finish before switching.");case"dialog_pending":return c("先处理会话中的待答事项。","Answer the pending request before switching.");default:return c("这个会话暂时无法换端。","This session cannot be switched right now.")}}function nv(){if(et!=="online")return c("连接断开,只能浏览记录。","Offline. You can still browse the history.");return ji.supported===!0?"":$i(ji.reason)}function Zp(e){if(Lr(e.session.id))return c("正在关闭会话…","Closing session…");if(!e.session.active||e.status!=="ready")return c("先恢复此会话。","Resume this session first.");if(et!=="online")return c("连接断开,无法换端。","Reconnect before switching.");if(ji.supported!==!0)return $i(ji.reason);if(e.running||e.compacting)return $i("session_busy");if(e.requests.size)return $i("dialog_pending");if(e.queue)return c("等队列里的消息发送后再换端。","Wait for queued messages to finish before switching.");if(e.handoff.eligible!==!0)return $i(e.handoff.reason);if($t.has(e.session.id)||Fn.has(e.session.id))return c("正在提交,请稍候。","Submitting…");return""}function no(e){if(Ji(e),e.optionSync++,e.snapshotRequestChanges=void 0,e.status="inactive",e.running=!1,e.compacting=!1,e.workbench=void 0,e.generationSpeed=void 0,e===O)Nn?.abort()}function Ji(e){if(Ec(e),e.sync++,e.revision++,e.transcriptRefresh=e.stateRefresh=void 0,e.pendingStateUnknown=e.refreshScheduled=void 0,e.messages=[],e.liveKey="",e.replyStreaming=!1,e.liveMessageKeys.clear(),e.tools.clear(),e.transcript="unavailable",e===O)eo.reset()}function Ec(e){e.historyEpoch++,e.history?.invalidate(),e.history=void 0}function Ac(e){let t=Boolean(e.history);if(Ec(e),e===O)Cv();if(t)e.messages=[],e.liveMessageKeys.clear(),e.transcript="unavailable",eo.reset()}function Yp(e,t,n){if(!Et.includes(e.cwd))return;if(n.kind==="live")Js.closeAfterBranch();if(n.kind==="history")Sa=!0,kn("cli-history-dialog").close();Ke(e.id).text=t,cn(e),Ba(e.id,!0)}function Ke(e){let t=lc.get(e);if(!t)t={text:"",mode:"prompt",images:[],reading:0,error:"",commandMode:!1,commandText:"",commandError:""},lc.set(e,t);return t}function Xp(e){return Ns(e).kind!=="plain"||Qr.test(e.split(/\s/,1)[0]??"")}function rv(){let e=je("theme");try{let n=localStorage.getItem("omo-web-theme");if(n==="dark"||n==="light")e.value=n}catch(n){if(!(n instanceof DOMException))throw n}let t=()=>{document.documentElement.dataset.theme=e.value==="system"?Op.matches?"dark":"light":e.value};e.addEventListener("change",()=>{t();try{localStorage.setItem("omo-web-theme",e.value)}catch(n){if(!(n instanceof DOMException))throw n}}),Op.addEventListener("change",t),t()}function sv(){let e=je("language-select"),t=P("language-feedback");e.value=me,e.addEventListener("change",()=>{let n=e.value;if(n!=="en"&&n!=="zh-CN"||n===me)return;let r=(i)=>{e.value=me,Q(t,i)};if([...lc.values()].some((i)=>i.text||i.commandText||i.images.length||i.reading)){r(c("发送或清空草稿后,再切换语言。","Send or clear your drafts before changing the language."));return}if(Wi||Fn.size||$t.size||O?.requests.size||[...ts.values()].some((i)=>i.status==="pending")){r(c("先完成当前操作,再切换语言。","Finish the current action before changing the language."));return}if(mt.active){r(c("退出 CLI 跟随后,再切换语言。","Stop following the CLI before changing the language."));return}let s=O?.session.id;try{if(s)sessionStorage.setItem(Hi,s);else sessionStorage.removeItem(Hi)}catch{if(s){r(c("浏览器无法保留当前会话。关闭此会话页面后再切换语言。","The browser could not preserve this session. Change the language from the start screen."));return}}if(!Bc(n)){try{sessionStorage.removeItem(Hi)}catch{}r(c("浏览器无法保存语言设置。","The browser could not save your language setting."));return}location.reload()})}function iv(){let e;try{e=sessionStorage.getItem(Hi),sessionStorage.removeItem(Hi)}catch{return}let t=e?on.get(e):void 0;if(!t||!vt(t.cwd)||!or.has(t.id))return;Ar=t.archived,o1(t,!1,!1)}function Fp(e){try{return localStorage.getItem(e)}catch(t){if(!(t instanceof DOMException))throw t;return null}}function Cc(e,t){try{localStorage.setItem(e,t)}catch(n){if(!(n instanceof DOMException))throw n}}function zp(){P("workspace-shell").toggleAttribute("data-rail-collapsed",Cr);let e=Y("rail-toggle");e.setAttribute("aria-expanded",String(!Cr));let t=Cr?c("展开会话导航","Expand sessions"):c("收起会话导航","Collapse sessions");e.setAttribute("aria-label",t),e.title=t}function In(e,t=!1){let n=rn;if(rn=e&&Ps.matches,P("navigation").classList.toggle("is-open",rn),P("nav-scrim").hidden=!rn,P("conversation").inert=rn,P("skip-link").inert=rn,Y("open-navigation").setAttribute("aria-expanded",String(rn)),rn&&!n)Y("close-navigation").focus();else if(!rn&&n&&t&&Ps.matches)Y("open-navigation").focus({preventScroll:!0})}function an(){Js.setTransport(Bt);let e=et==="online";et=$n||!navigator.onLine||kt.online===!1||Bt==="lost"?"offline":Rr&&Bt==="open"&&!Xt&&!lr&&kt.online===!0?"online":"connecting",P("connection").dataset.state=et,P("connection-label").textContent={online:c("本机已连接","Connected"),offline:c("连接不可用","Offline"),connecting:c("正在连接","Connecting")}[et];let t=C(kt.version);Q(P("engine-version"),t&&c(`引擎 ${t}`,`Engine ${t}`));let n=lr||(!navigator.onLine?c("浏览器已离线。恢复网络后会自动重连。","Your browser is offline. Reconnecting when the network returns."):kt.online===!1?C(kt.error)||c("Senpi 引擎未连接。检查引擎后再重连。","The Senpi engine is offline. Check it and reconnect."):Bt==="lost"?c("实时连接已断开。正在重连,草稿会保留。","Connection lost. Reconnecting; your drafts are kept."):Gi);P("banner").toggleAttribute("data-unprotected",Ca),P("access-warning").hidden=!Ca,Y("retry").hidden=!n,Q(P("banner-text"),n);let r=et==="online"&&Boolean(Et.length);if(Y("new-sidebar").disabled=!r,Y("new-welcome").disabled=!r,P("welcome-copy").textContent=Rr&&!Et.length?Y("workspace-browser-button").hidden?c("没有可用目录。请检查 OmO Web 的启动配置。","No directories are available. Check your OmO Web startup settings."):c("还没有可用目录。打开侧栏的「目录」添加。","No directories yet. Open Directories in the sidebar to add one."):c("从侧栏打开既有会话,或选个目录开始新会话。","Open an existing session from the sidebar, or choose a directory to start a new one."),Y("create").disabled=!r||Wi,to.update(),en(),Se(),O?.history)Ws(O);if(!e&&et==="online"&&O&&(O.stateRefresh||O.transcriptRefresh))ht(O)}function Qp(e){if(on=new Map(e.map((t)=>[t.id,t])),or.retain((t)=>{let n=on.get(t);return Boolean(n&&vt(n.cwd))}),O){let t=on.get(O.session.id);if(!t||!vt(t.cwd))Sc();else{if(t.cwd!==O.session.cwd)Ji(O);if(O.session=t,!t.active&&O.status==="ready"&&!zn(t.id)){if(no(O),rt.open)rt.close()}}}en(),Se()}function cn(e){if(Ki++,on.set(e.id,e),O?.session.id===e.id)O.session=e;en()}async function ss(){let e=++ec,t=Ki;try{let n=await Oe.request("/api/sessions");if(e!==ec||t!==Ki)return;Gi="",Qp(Pa(n))}catch(n){if(e===ec)Gi=c(`无法读取会话列表:${_e(n)}`,`Couldn't load sessions: ${_e(n)}`)}an()}function Zi(e){let t=(r)=>xa?r.replaceAll("\\","/"):r,n=t(e).split("/").filter(Boolean);if(xa&&n.length===1)return e;for(let r=1;r<=n.length;r++){let s=n.slice(-r).join("/");if(!Et.some((i)=>i!==e&&t(i).endsWith(`/${s}`)))return xa?s.replaceAll("/","\\"):s}return e}function Na(){let e=je("workspace-select"),t=c("所有目录","All directories");_a(e,Et.map((n)=>[n,Zi(n)]),Ot,t),e.title=Ot||t,P("workspace-field").hidden=Et.length<2}function e1(){if(O)O.reads.abort(),Ec(O);if(O=void 0,rs?.(),clearTimeout(ac),Nn?.abort(),rt.open)rt.close();if(cs(!1),Sr(!1),ns?.abort(),sn.open)sn.close();if(qi.open&&qi.dataset.sourceKind==="web")qi.close();let e=kn("session-path-dialog");if(e.open)e.close()}function Sc(){e1(),eo.reset(),Ia.reset(),He.value="",Zs()}function t1(){if(or.retain((e)=>{let t=on.get(e);return!t||vt(t.cwd)}),O&&!vt(O.session.cwd))Sc()}function ov(e){if(e&&!vt(e))return;Ot=e,Na(),en()}function av(e,t,n){if(ic++,Et=t,_r=vt(e)?e:"",Ot&&!vt(Ot))Ot="";if(t1(),mt.recheckWorkspace(),Na(),Js.scopeChanged(),to.scopeChanged(),n)es="workspace-browser-button";Lc(e),ss(),an()}function ro(){clearTimeout($s),$s=0,Os++,Ui?.abort(),rs?.()}function lv(){let e=ge("auth-recovery",HTMLDialogElement);if(e.open)return;let t=ge("auth-recovery-frame",HTMLIFrameElement);Yi(),$n=!0,ro(),js(),lr=c("登录已失效。","Your sign-in expired."),an(),t.onload=()=>{let n=t.contentDocument;if(n?.location.pathname!=="/auth/complete"){n?.querySelector("#password")?.focus();return}Oe.authGeneration++,t.onload=null,e.close(),t.removeAttribute("src"),$n=!1,ln(!0)},t.src=c("/auth/reauth?lang=zh","/auth/reauth?lang=en"),e.showModal()}ge("auth-recovery",HTMLDialogElement).addEventListener("cancel",(e)=>e.preventDefault());Y("auth-sign-out").addEventListener("click",async()=>{let e=Y("auth-sign-out"),t=P("auth-sign-out-error");e.disabled=!0,Q(t,"");try{await Oe.request("/auth/logout",{}),location.replace("/")}catch(n){Q(t,c(`无法退出登录:${_e(n)}`,`Couldn't sign out: ${_e(n)}`)),e.disabled=!1}});function n1(e){if(e instanceof Ie)return e.status===408||e.status===429||e.status>=500&&e.status<600;return e instanceof TypeError||e instanceof DOMException&&e.name==="TimeoutError"}function cv(e){if(lr=e instanceof Ie&&(e.status===401||e.status===403)?c("需要认证。恢复访问后请重试。","Authentication required. Restore access and retry."):c(`无法连接本机 Web 服务:${_e(e)}`,`Couldn't connect to OmO Web: ${_e(e)}`),n1(e))return;$n=!0,Bt="lost",js()}function r1(e){if($s||$n||!navigator.onLine)return;$s=window.setTimeout(()=>{if($s=0,Wt?.readyState===EventSource.CLOSED)js();ln(e)},Pi),Pi=Math.min(Pi*2,Gp)}async function ln(e=!1){if($n||!navigator.onLine){an();return}ro();let t=Os,n=Ui=new AbortController,r=Ki,s=ic;try{let i=AbortSignal.any([n.signal,AbortSignal.timeout(Kp)]),o=await Oe.request("/api/bootstrap",void 0,i);if(t!==Os)return;if(Bt==="open"||!e)Pi=yc;let a=C(o.token),l=a!==Oe.token;if(l&&O)Ac(O);Oe.token=a,kt=H(o.engine),Ca=o.unprotected===!0,Y("auth-sign-out").hidden=o.cookieSignIn!==!0,ji=H(o.handoff);let u=H(o.fileBrowser);if(xa=u.platform==="win32",s===ic||l)Et=K0(o.workspaces);let d=!Rr;if(Ot&&!vt(Ot))Ot="";if(_r&&!vt(_r))_r="";if(Jp.update(u,l),to.scopeChanged(l),t1(),mt.recheckWorkspace(),Na(),Js.scopeChanged(),Rr=!0,lr="",Gi="",r===Ki)Qp(Pa(o));if(!Wt)l1();if(d)iv();let h=O&&Pe.get(O.session.id);if(e&&Xt==="transport"){if(et==="offline"&&Bt==="open"&&kt.online===!0)an();await uv(t)}else if(e&&O&&!Lr(O.session.id)&&(!h||h.status==="failed")){if(!O.session.active&&O.status!=="loading"&&kt.online===!0)O.status="inactive",O.error="";else if(O.session.active&&kt.online===!0){let p=O;if(await us(p),p===O)Mr(p)}}}catch(i){if(t!==Os)return;cv(i),r1(e)}finally{if(Ui===n)Ui=void 0}if(t!==Os)return;if(Xt!=="transport"||Bt==="open"&&kt.online===!0&&!lr)Xt=!1;an()}async function uv(e){let t=()=>e===Os&&Xt==="transport"&&Bt==="open"&&kt.online===!0,n=yc;while(t()){let r=O;if(!r?.session.active||Lr(r.session.id))return;let s=Pe.get(r.session.id);if(s&&s.status!=="failed")return;let i=Promise.withResolvers();rs=i.resolve;let o;try{let a=await Promise.race([r.pendingSnapshot??us(r,!1,!0),i.promise]);if(t()&&r===O&&Pe.get(r.session.id)===s&&a===r.sync){Mr(r);return}}catch(a){if(t()&&r===O&&Pe.get(r.session.id)===s){if(!n1(a)&&!(a instanceof Ie&&a.status===409&&a.code==="session_changed"))throw a;o=window.setTimeout(i.resolve,n),n=Math.min(n*2,Gp),await i.promise}}finally{if(clearTimeout(o),rs===i.resolve)rs=void 0}}}var s1=()=>jt("search").value.trim().toLocaleLowerCase();function en(){let e=s1(),t=new Map;for(let s of[...Et].sort((i,o)=>i.localeCompare(o)))if(!Ot||s===Ot)t.set(s,[]);let n=!1;for(let s of on.values()){if(!or.has(s.id)||!vt(s.cwd))continue;if(n=!0,s.archived!==Ar||e&&!i1(s,e))continue;t.get(s.cwd)?.push(s)}let r=[...t].flatMap(([s,i])=>i.length||!e||s.toLocaleLowerCase().includes(e)?[{cwd:s,label:Zi(s),sessions:i.sort((o,a)=>a.updatedAt-o.updatedAt)}]:[]);or.render(r,mt.active?void 0:O?.session.id,(s)=>({close:ts.get(s.id),label:Pe.get(s.id)?.status==="released"?c("已释放","Released"):s.running?c("运行中","Running"):s.settled?c("已结清","Done"):s.active?c("可继续","Ready"):c("待恢复","Resume")})),Q(P("list-empty"),r.some((s)=>s.sessions.length)?"":!Rr?lr?c("暂时无法读取会话","Couldn't load sessions"):c("正在读取会话…","Loading sessions…"):e?c("没有匹配的已打开会话","No matching opened sessions"):!n?c("还没有打开的会话。可打开既有会话,或新建会话。","No sessions open yet. Open an existing session or start a new one."):Ar?c("没有已打开的归档会话","No archived sessions open"):c("此筛选下没有打开的会话","No opened sessions in this filter")),Y("recent").setAttribute("aria-pressed",String(!Ar)),Y("archived").setAttribute("aria-pressed",String(Ar)),to.renderBookmarks()}function i1(e,t){return[e.name,e.cwd].some((n)=>n.toLocaleLowerCase().includes(t))}async function dv(e){let t=on.get(e);if(!t||!vt(t.cwd)||!or.has(e)||zn(e))return;ts.set(e,{status:"pending"});let n=P("rail-close-announcement");if(n.textContent=c(`正在关闭 ${t.name}…`,`Closing ${t.name}…`),en(),O?.session.id===e)rs?.(),Se();let r;try{r=await Oe.closeSession(t)}catch{let i=c("无法确认会话已关闭,请重试。","Couldn't confirm the session closed. Try again.");if(or.has(e))ts.set(e,{status:"failed",error:i});else ts.delete(e);if(n.textContent=c(`${t.name}:${i}`,`${t.name}: ${i}`),en(),O?.session.id===e){if(!O.session.active&&O.status==="ready")no(O);else if(O.transcriptRefresh||O.stateRefresh)ht(O);Se()}return}if(ts.delete(e),on.get(e)?.cwd!==r.cwd||!vt(r.cwd)){en();return}or.remove(e),Pe.delete(e);let s=O?.session.id===e;if(s)Sc();if(cn(r),s)Se();n.textContent=c(`已关闭 ${r.name}。`,`Closed ${r.name}.`)}function Ba(e,t=!1){let n=on.get(e);if(!n||!vt(n.cwd))return;if(or.open(n),Ar=n.archived,Ot&&Ot!==n.cwd)Ot="",Na();if(!i1(n,s1()))jt("search").value="";o1(n,t,!0)}function o1(e,t,n){mt.stop();let{id:r}=e;if(n)In(!1),P("conversation").focus();if(r===O?.session.id){if(en(),!t)return;if(O.status==="ready"){He.focus();return}}if(e1(),n)P("conversation").focus({preventScroll:!0});let s=Pe.get(r),i=e.active&&s?.status!=="released"&&s?.status!=="uncertain",o={session:e,status:i?"loading":"inactive",error:"",state:{},messages:[],liveKey:"",liveMessageKeys:new Set,reads:new AbortController,tools:new Map,requests:new Map,options:{},optionsError:"",handoff:{},queue:void 0,revision:0,serial:0,sync:0,optionSync:0,historyEpoch:0,running:e.running,compacting:!1};O=o,rs?.(),eo.reset(),Ia.reset();let a=Ke(r);if(He.value=a.commandMode?a.commandText:a.text,nr.value=a.mode,Zs(),en(),Se(),i)us(o,!0).then(()=>{if(t&&o===O&&o.status==="ready"&&document.activeElement===P("conversation"))He.focus()}),Mr(o);else if(n&&s?.status==="released"&&!document.querySelector("dialog:modal"))P("handoff-title").focus()}function Ut(e){return C(e.id)?JSON.stringify([C(e.provider),C(e.id)]):""}function fv(e){let t=C(e.name)||C(e.id);return t?[C(e.provider),t].filter(Boolean).join(" · "):""}function _a(e,t,n,r){let s=JSON.stringify(t);if(e.dataset.options!==s)e.replaceChildren(ot(r,""),...t.map(([i,o])=>ot(o,i))),e.dataset.options=s;if(e.value=n,e.selectedIndex<0)e.value=""}function hv(e,t,n){let r=H(e.state.model),s=Ut(r),i=ve(e.options.models).map(H).filter((k)=>Boolean(Ut(k))),o=e.state.pendingModelSwitch!=null;if(!n||o||e.modelSelection===s)e.modelSelection=void 0;let a=i.find((k)=>Ut(k)===e.modelSelection),l=a??i.find((k)=>Ut(k)===s);if(s&&!i.some((k)=>Ut(k)===s))i.unshift(r);_a(rr,i.map((k)=>[Ut(k),fv(k)]),Ut(a??r),c("模型","Model")),rr.disabled=t||o||!ve(e.options.models).length,ir.hidden=!a,ir.disabled=t||o;let u=o?c("正在切换模型。","Changing model…"):"",d;if(n&&!o&&l){let k=JSON.stringify([s,Ut(l),e.state.thinkingLevel]);if(e.modelPreview?.key!==k&&!$t.has(e.session.id)){let S={key:k,result:void 0};e.modelPreview=S;let E=new URLSearchParams({provider:C(l.provider),modelId:C(l.id)});Oe.request(`${Ge(e.session.id)}/model-preview?${E}`,void 0,e.reads.signal).catch(()=>({})).then((R)=>{if(O!==e||e.modelPreview!==S)return;S.result=R,Se()})}let w=e.modelPreview?.key===k?e.modelPreview.result:void 0,A=C(w?.source),_=C(w?.level);if(w?.status==="ok"&&Object.hasOwn(X0,A)&&Object.hasOwn(vn,_)){d=w;let S=ve(d.availableLevels).map(C).filter((L)=>Object.hasOwn(vn,L)),E=a?c("切换后","After switching"):c("当前","Current"),R=S.map((L)=>vn[L]).join(c("、",", "));u=c(`${E}:${vn[_]}(来源:${X0[A]}) · 可用:${R}`,`${E}: ${vn[_]} (${X0[A]}) · Available: ${R}`)}else u=w?c("无法预览此模型的思考档。","Thinking preview is unavailable for this model."):c("正在读取模型档位…","Loading thinking levels…")}else if(e.modelPreview=void 0,n&&!o&&s&&!e.optionsError&&ve(e.options.models).length)u=c("此模型不在可用列表里。","The current model is not available.");if(On.textContent!==u)On.textContent=u;On.classList.toggle("sr-only",!a),On.hidden=!u,rr.title=!a&&u?u:c("模型","Model"),wa.title=!a&&u?u:c("思考档","Thinking level");let h=a?void 0:d,p=C(h?.level??e.state.thinkingLevel),g=ve(h?.availableLevels??e.options.levels).map(C).filter((k)=>Object.hasOwn(vn,k)),b=g.length>0;if(Object.hasOwn(vn,p)&&!g.includes(p))g.unshift(p);_a(wa,g.map((k)=>[k,c(`思考:${vn[k]}`,`Thinking: ${vn[k]}`)]),p,c("思考档","Thinking")),wa.disabled=t||o||Boolean(a)||!b}function a1(e,t){if(!t||t===Ut(H(e.state.model)))return;e.modelSelection=void 0,e.modelPreview=void 0,e.options={...e.options,levels:[]},Mr(e)}function qp(e){let t="",n="";if(e){let r=[...e.requests.values()].some((o)=>o.method!=="question"||o.waitForAnswer!==!1),s=!e.activitySettled&&[...e.tools.values()].find((o)=>o.stage==="running"),i=s&&/^[a-z\d_.:-]{1,64}$/i.test(s.name)?s.name:"";if(r)t="waiting",n=c("等待输入","Waiting for input");else if(e.compacting)t="active",n=c("正在压缩上下文","Compacting context");else if(s)t="active",n=i?c(`工具:${i}`,`Tool: ${i}`):c("工具运行中","Running tool");else if(!e.activitySettled&&e.running)t="active",n=e.replyStreaming?c("正在输出回复","Streaming reply"):c("执行中","Turn running");else if(Fn.has(e.session.id))t="pending",n=c("正在提交","Submitting");else if(e.requests.size)t="waiting",n=c(`待答 ${e.requests.size}`,`Pending answers: ${e.requests.size}`);if(e.queue){let o=c(`排队 ${e.queue}`,`Queued: ${e.queue}`);if(!t)t="pending";n=n?`${n} · ${o}`:o}}if(va.classList.toggle("sr-only",!t),t)va.dataset.phase=t;else delete va.dataset.phase;if(Ip.textContent!==n)Ip.textContent=n,va.title=n}function mv(e){let t=Y("sidebar-question"),n=0;for(let i of e.values())if(i.method==="question"&&++n===100)break;if(!n){if(t===document.activeElement)we.querySelector('[aria-selected="true"]')?.focus();t.hidden=!0;return}let r=n===100?"99+":String(n),s=c(`Agent 提问 · ${r}`,`Agent questions · ${r}`);if(t.textContent!==s)t.textContent=s,t.setAttribute("aria-label",c(`跳至首个 Agent 提问(${n===100?"超过 99":r} 个待答)`,`Jump to first Agent question (${n===100?"over 99":r} pending)`));t.hidden=!1}function Se(){let e=mt.active;if(P("cli-follow-view").hidden=!e,P("transcript").hidden=e,Y("cli-follow-stop").hidden=!e,Y("cli-follow-button").setAttribute("aria-pressed",String(e)),P("banner").hidden=!Ca&&(e||!P("banner-text").textContent),e){if(O)O.consideredDesktopDock=!1;zi.reset(),qp(),P("composer-shell").hidden=!0,Y("details-button").hidden=!0,Y("web-branch-button").hidden=!0,Y("manage-button").hidden=!0,Hp(mt.target?.name??c("跟随 CLI","Follow CLI"),mt.target?.cwd??"");return}let t=O,n=t?.session,r=n&&Pe.get(n.id),s=n!==void 0&&Lr(n.id),i=s||r?.status==="pending",o=r?.status==="released"?r:void 0,a=Boolean(t&&t.status==="ready");qp(a&&n?.active&&et==="online"&&!i?t:void 0);let l=a?t?.transcript??t?.history?.status:void 0;if(l)xr.dataset.status=l,P("transcript").setAttribute("aria-describedby",xr.id);else delete xr.dataset.status,P("transcript").removeAttribute("aria-describedby");if(P("no-messages").style.display=l?"none":"",Q(xr,l==="truncated"?c("部分聊天记录未包含在快照中。","Some chat history was omitted from this snapshot."):l==="unavailable"?c("暂时无法读取聊天记录。新消息仍会显示在这里。","Chat history is unavailable. New messages will still appear here."):""),P("welcome").hidden=Boolean(t),P("inactive-session").hidden=!t||a,P("active-session").hidden=!a,!a)zi.reset();if(P("composer-shell").hidden=!a,He.disabled=!a||n?.active!==!0||s,Hp(n?.name??c("会话工作台","Workbench"),n?.cwd??""),Y("details-button").hidden=!a,!a)cs(!1);if(Y("web-branch-button").hidden=!n,Y("web-branch-button").disabled=i,Y("manage-button").hidden=!a,!t)return;let u=Ke(t.session.id);if(rt.open){let ue=r?.status==="pending"?c("正在释放会话…","Releasing session…"):Zp(t);Y("manage-handoff").disabled=Boolean(ue),Q(P("manage-handoff-status"),ue),Q(P("manage-handoff-error"),r?.status==="failed"?r.error:"")}for(let ue of[rt,we])if(ue.open)ue.querySelectorAll("[data-write]").forEach((Le)=>{Le.disabled=et!=="online"||i||$t.has(t.session.id)||Le.hasAttribute("data-unavailable")||Le.hasAttribute("data-idle")&&(t.running||t.compacting||Fn.has(t.session.id))});Ft?.syncWrites();let d=t.status!=="inactive";P("inactive-title").textContent=t.status==="loading"?c("正在读取会话…","Loading session…"):t.status==="failed"?c("无法读取会话","Couldn't load session"):c("继续此会话","Continue this session");let h=Boolean(o&&t.status!=="loading");P("inactive-title").hidden=h,P("inactive-copy").hidden=h,P("inactive-copy").textContent=s?c("等本机引擎确认关闭。","Waiting for the local engine to close the session."):i?c("等本机引擎确认释放。","Waiting for the local engine to release the session."):t.status==="loading"?"":t.status==="failed"?c("检查连接后重试。","Check the connection and try again."):t.session.archived?c("恢复已归档的会话,继续之前的对话。","Restore this archived session to continue the conversation."):c("恢复后可继续之前的对话。","Resume to pick up where you left off."),P("handoff-receipt").hidden=!h;let p=P("handoff-command").firstElementChild;if(p&&p.textContent!==(o?.command??""))p.textContent=o?.command??"";Q(P("handoff-copy-status"),o?.copyStatus),Q(P("handoff-draft-note"),!a&&(o||i||r?.status==="uncertain")&&(u.text||u.commandText||u.images.length||u.reading)?c("草稿仍在这页。","Your draft is still on this page."):""),Q(P("session-error"),t.error||(r?.status==="uncertain"&&t.status!=="loading"?r.error:""));let g=Y("resume");if(g.hidden=a||t.status==="loading",g.disabled=et!=="online"||i||$t.has(t.session.id),g.classList.toggle("button--primary",!o),g.textContent=!o&&r?.status!=="uncertain"&&d&&t.session.active?c("重试读取","Retry"):c("恢复会话","Resume session"),!a){t.modelSelection=void 0,t.modelPreview=void 0;return}let b=et==="online",k=i||$t.has(t.session.id),w=Fn.has(t.session.id),A=t.session.archived,_=b&&t.session.active&&!A&&!t.compacting,S=nr.value,E=u.commandMode,R=E||Xp(u.text),L=t.running&&(S==="prompt"||A||R);Y("stop").hidden=!t.running,Y("stop").disabled=!b||k,Y("stop").classList.toggle("button--primary",L),Y("stop").classList.toggle("button--danger",!L);let T=Y("send");T.hidden=R||t.running&&(S==="prompt"||A),T.disabled=!_||k||w||u.reading>0||!u.text.trim()&&!u.images.length;let F=S==="follow_up"?c("排队","Queue"):S==="steer"?c("发送引导","Steer"):c("发送","Send");P("send-label").textContent=T.title=F;let I=Y("send-command");I.hidden=!R;let q=E?u.commandText:u.text,U=Tp(q);I.disabled=!b||!t.session.active||k||A&&!U||!U&&(t.running||t.compacting||Boolean(t.queue)||w)||!q.trim(),Y("command-mode").setAttribute("aria-pressed",String(E)),Y("command-mode").disabled=s,Y("command-picker").hidden=!E,Y("command-picker").disabled=!b||A||s,P("prompt-label").textContent=E?c("命令及参数","Command and arguments"):c("消息","Message"),He.placeholder=E?c("输入 /命令 或 $技能,可加参数…","Enter a /command or $skill…"):c("输入消息…","Write a message…"),Y("attach").disabled=E||A||u.images.length+u.reading>=4||k,Y("attach").hidden=E,(nr.closest("label")??nr).hidden=E,nr.disabled=A||k,hv(t,!_||t.running||k||w,b&&d&&!i);let j=C(t.state.effectivePermissionPreset)||C(t.state.permissionPreset)||"ask";_a(je("approval"),[...Np],Np.some(([ue])=>ue===j)?j:"ask",c("审批","Approval")),je("approval").dataset.preset=je("approval").value,je("approval").disabled=!_||k||w,je("approval").title=j==="full-access"?c("无审批:工具默认放行。原生权限规则仍有效,用户问题仍需回答。","Off: Tools are allowed by default. Native permission rules and user questions still apply."):j==="auto"?c("Auto:原生确认安全的项目内操作自动放行,其余询问。","Auto: OmO allows safe project operations and asks about the rest."):c("询问:未被原生权限规则处理的工具操作需要批准。恢复会话会回到此模式。","Ask: Approve tool calls not covered by native rules. Resuming a session returns to Ask.");let J=Ds(t.state.contextUsage),re=c("上下文","Context");Q(P("context-usage"),J.status!=="ok"?"":J.percent!==void 0?`${re} ${tc.format(J.percent)}%`:J.tokens!==void 0&&J.window?`${re} ${tc.format(J.tokens)} / ${tc.format(J.window)}`:"");let ne=ia(t.state.usageTotals),z=ne.status==="ok"&&ne.latest!==void 0?ev.format(ne.latest*100):"";Q(P("cache-usage"),b&&z?c(`最新缓存 ${z}%`,`Latest cache ${z}%`):"");let V=s?c("正在关闭会话,草稿仍保留在此页。","Closing session. Your draft stays on this page."):i?c("正在换端,草稿不会发送。","Switching clients. Your draft won't be sent."):!b?c("离线时可以编辑,重连后再发送。","You can edit offline and send when reconnected."):A?c("先在会话管理里取消归档。","Unarchive this session in Manage session."):u.commandStatus||(R?!U&&(t.running||t.compacting||t.queue)?c("等本轮和队列结束后再执行命令。","Wait for this turn and queue to finish before running a command."):c("Shift + Enter 执行命令;开头加空格就按文字发送。","Shift + Enter runs the command. Add a leading space to send it as text."):t.compacting?c("等压缩完成后再发送。","Send after compaction finishes."):u.reading?c("正在读取图片…","Loading images…"):t.running&&S==="prompt"?c("停止本轮,或选引导或排队。","Stop this turn, or choose Steer or Queue."):!t.running&&S!=="prompt"?c("当前空闲,这条消息会在下一轮处理。","No turn is running. This message will be handled in the next turn."):c("Shift + Enter 发送","Shift + Enter to send"));P("composer-hint").textContent=V,P("composer-hint").classList.toggle("sr-only",!u.commandStatus&&b&&!i&&!A&&!u.reading&&!t.compacting&&!R&&(S==="prompt"||t.running));let Z=Y("current-todo"),de=t.workbench,te=de?.status==="ok"?C(de.currentTodo):"",N=de?.status==="ok"?Ee(de.pendingTodo):void 0,W=c("待办","Todo"),K=te?`${W} · ${te}`:N?`${W} ${N}`:"";Z.hidden=!b||!K;let oe=P("current-todo-label");if(oe.textContent!==K)oe.textContent=K;Z.title=te&&N?c(`${K};另有 ${N} 项待处理`,`${K} · ${N} more pending`):K,Q(P("compose-error"),(E?u.commandError:u.error)||t.optionsError||(!rt.open&&r?.status==="failed"?r.error:"")),Ia.render(t.requests,b&&!i,(ue,Le)=>yv(t,ue,Le)),mv(t.requests),zi.render(t.options.commands,b&&!A&&!i),b1(t)}function Hp(e,t){let n=P("session-title");if(n.textContent!==e)n.textContent=e;n.title=e;let r=P("session-path");if(Q(r,t),r.title=t,Q(P("session-path-short"),t?Zi(t):""),Y("session-path-trigger").hidden=!t,mt.active&&t)r.dataset.workspaceLabel=Zi(t);else delete r.dataset.workspaceLabel}function pv(e){let t=new Map;for(let n of[...ve(e.pendingDialogs),...ve(e.pendingQuestions)]){let r=H(n);if(uo(r))t.set(Ys(r),r)}return t}function Ws(e,t=!1){if(e!==O||e.status!=="ready")return;Ea(e,t)}function Ea(e,t=!1,n){let r=e.history,s=r?.entries.length?[...r.entries,...e.messages]:e.messages;eo.render(s,e.liveKey,e.tools,t,r?.render(),n,e.session.id)}function gv(e,t){let n=e.history;if(t&&n?.id===t.id&&!n.reloading)return;if(n?.invalidate(),e.history=void 0,!t)return;let{id:r,cwd:s}=e.session,i=()=>e===O&&e.history===a&&e.session.id===r&&e.session.cwd===s&&vt(s)&&e.session.active&&!mt.active&&(!Pe.has(r)||Pe.get(r)?.status==="failed"),o=()=>i()&&e.status==="ready"&&et==="online"&&!mt.active,a=new M0(t,Oe,r,i,o,()=>e.messages,(l)=>{if(!i())return;Se(),Ea(e,!1,l)},()=>{if(!o()||a.reloading)return;a.reloading=!0,a.clearExpansion(),Se(),Ea(e),us(e).finally(()=>{if(a.reloading=!1,i())Ea(e)})});e.history=a}async function us(e,t=!1,n=!1){if(e!==O)return;let r=Pe.get(e.session.id),s=r?.status==="released"||r?.status==="uncertain";if(s&&(e.status!=="loading"||!$t.has(e.session.id)))return;let i=++e.sync,{historyEpoch:o,session:a,transcriptRefresh:l,stateRefresh:u}=e,d=e.status==="ready"&&e.running&&Boolean(l||u),h=Promise.withResolvers();e.pendingSnapshot=h.promise;let p=e.revision,g=new Set(e.messages),{state:b,generationSpeed:k}=e,w=[];e.snapshotRequestChanges=w;let A=e.liveKey,_=new Set([...e.tools].filter(([,S])=>S.stage==="running").map(([S])=>S));try{let S=AbortSignal.any([e.reads.signal,AbortSignal.timeout(Kp)]),E=await Oe.request(Ge(e.session.id),void 0,S);if(O!==e||i!==e.sync||Pe.get(e.session.id)!==r)return;let R=mn(E.session),L=T0(E.page);if(L&&!R||R&&(R.id!==a.id||R.cwd!==a.cwd))throw new Ie(c("会话读取响应已失效。","The session read no longer matches this conversation."),409,"stale_session_read");if(e.historyEpoch!==o&&L)return;if(s&&!R?.active)throw Error(c("本机服务未确认已恢复此会话。","The local engine did not confirm the session resumed."));let T=R??e.session;if(!T.active&&e.status==="ready"&&Lr(T.id)){cn(T);return}if(s)Pe.delete(T.id);cn(T);let F=H(E.state),I=e.pendingStateUnknown?{...e.state,...F}:F;if(kt.online!==!1)if(E.generationSpeed===void 0&&e.generationSpeed===k)e.generationSpeed=void 0;else _c(e,E.generationSpeed);let q=Ut(H(e.state.model));e.handoff=H(E.handoff);let U=n||!d&&(!e.transcriptRefresh||e.transcriptRefresh===l&&!e.running),j=R0(E.transcript);if(U){if(e.transcript=j,gv(e,j==="unavailable"?void 0:L),e.transcriptRefresh===l)e.transcriptRefresh=void 0}let J=j==="unavailable"?[]:ve(E.messages).map(H),re=p!==e.revision,ne=new Map(e.messages.map((te)=>[te.key,te.message])),z=new Set,V=J.filter((te)=>Boolean(bn(te))).map((te,N)=>{let W=Vr(te)||`snapshot:${N}`,K=z.has(W)?`${W}:${N}`:W;z.add(K);let oe=ne.get(K);return{key:K,message:oe&&JSON.stringify(oe)===JSON.stringify(te)?oe:te}});if(U&&j==="unavailable")e.messages=e.messages.filter((te)=>e.liveMessageKeys.has(te.key));if(re){if(U&&j!=="unavailable"){let N=j==="truncated"||Boolean(l),W=e.messages.filter((oe)=>e.liveMessageKeys.has(oe.key)&&(!N||!g.has(oe)||e.running&&oe.key===e.liveKey)),K=new Map(W.map((oe)=>[oe.key,oe]));e.messages=[...V.map((oe)=>K.get(oe.key)??oe),...W.filter((oe)=>!z.has(oe.key))]}if(e.state={...I,...Object.fromEntries(Object.entries(e.state).filter(([N,W])=>W!==b[N]))},!(T.running||I.isStreaming===!0)&&!e.running){if(e.liveKey="",e.replyStreaming=!1,U&&j!=="unavailable"&&A&&!z.has(A))e.messages=e.messages.filter((N)=>N.key!==A);for(let N of _)if(e.tools.get(N)?.stage==="running")e.tools.delete(N)}}else{if(U&&j!=="unavailable")e.messages=V;if(e.state=I,!e.pendingStateUnknown||typeof F.isStreaming==="boolean"||T.running)e.running=T.running||I.isStreaming===!0;if(!e.pendingStateUnknown||typeof F.isCompacting==="boolean")e.compacting=I.isCompacting===!0;if(!e.pendingStateUnknown||Ee(F.pendingMessageCount)!==void 0)e.queue=Ee(I.pendingMessageCount);if(!e.running){e.liveKey="",e.replyStreaming=!1;for(let[te,N]of e.tools)if(N.stage==="running")e.tools.delete(te)}else if(U&&j!=="unavailable"&&e.liveKey&&!z.has(e.liveKey)){let te=ne.get(e.liveKey);if(te)e.messages.push({key:e.liveKey,message:te})}}e.liveMessageKeys=new Set(e.messages.flatMap((te)=>e.liveMessageKeys.has(te.key)?[te.key]:[]));let Z=pv(F);if(e.pendingStateUnknown){let te=Array.isArray(F.pendingDialogs),N=Array.isArray(F.pendingQuestions);for(let[W,K]of e.requests)if(!(K.method==="question"?N:te)&&!Z.has(W))Z.set(W,K);if(te&&N&&e.stateRefresh===u)e.pendingStateUnknown=void 0}if(e.stateRefresh===u)e.stateRefresh=void 0;if(!U&&!e.running&&e.transcriptRefresh)ht(e);for(let te of w)c1(Z,te);e.requests=Z,a1(e,q);let de=e.status!=="ready";if(e.status="ready",e.error="",Se(),Ws(e,t),Fi(e),de||!e.workbench)Ta(e);return i}catch(S){if(O!==e||i!==e.sync||Pe.get(e.session.id)!==r)return;if(zn(e.session.id))return;if(n)throw S;if(e.status!=="ready"||!e.session.active)e.status="failed",e.error=_e(S);else Ke(e.session.id).error=c(`无法刷新会话:${_e(S)}`,`Couldn't refresh the session: ${_e(S)}`);Se()}finally{if(e.pendingSnapshot===h.promise)e.pendingSnapshot=void 0;if(h.resolve(),e.snapshotRequestChanges===w)e.snapshotRequestChanges=void 0;if(e===O&&!e.pendingSnapshot&&e.refreshScheduled)e.refreshScheduled=void 0,ht(e)}}async function Ta(e){if(e!==O||e.status!=="ready"||!e.session.active||e.session.archived||et!=="online"||mt.active||Pe.get(e.session.id)?.status==="pending")return;Nn?.abort();let t=Nn=new AbortController,n=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);try{let r=await Oe.request(`${Ge(e.session.id)}/workbench-status`,void 0,n);if(t.signal.aborted||Nn!==t||e!==O||e.status!=="ready")return;e.workbench=r}catch(r){if(!(r instanceof Error))throw r;if(t.signal.aborted||Nn!==t||e!==O)return;e.workbench={status:"unavailable"}}finally{if(Nn===t)Nn=void 0}Se()}async function Mr(e){if(e!==O)return;let t=++e.optionSync;try{let n=await Oe.request(`${Ge(e.session.id)}/options`,void 0,e.reads.signal);if(O!==e||t!==e.optionSync)return;e.options=n,e.optionsError=""}catch(n){if(O!==e||t!==e.optionSync)return;e.optionsError=c(`无法读取模型和运行选项:${_e(n)}`,`Couldn't load models and settings: ${_e(n)}`)}Se()}function js(){clearTimeout(oc);let e=Wt;Wt=void 0,e?.close()}function Yi(){if(Bt==="lost")return;if(Bt="lost",Rr)Xt="transport";if(ro(),O)Ac(O),O.liveMessageKeys.clear(),O.liveKey="",O.replyStreaming=!1,O.activitySettled=void 0,O.tools.clear();an()}function Bs(e){if(clearTimeout(oc),document.hidden||!navigator.onLine||e.readyState===EventSource.CLOSED)return;oc=window.setTimeout(()=>{if(e!==Wt||document.hidden||!navigator.onLine)return;Yi(),js(),l1()},Q6)}function l1(){if(Wt||$n||!navigator.onLine)return;let e=new EventSource("/api/events");Wt=e,Bs(e),e.addEventListener("open",()=>{if(e!==Wt)return;Bs(e);let t=Bt==="lost";if(t)Xt="transport";if(Bt="open",an(),t)if(kt.online===!1)ss();else ln(!0)}),e.addEventListener("error",()=>{if(e!==Wt)return;if(Yi(),Bs(e),e.readyState===EventSource.CLOSED)r1(!0)}),e.addEventListener("heartbeat",()=>{if(e===Wt)Bs(e)}),e.addEventListener("omo",(t)=>{if(!(t instanceof MessageEvent)||typeof t.data!=="string"||e!==Wt)return;Bs(e);try{let n=JSON.parse(t.data);vv(H(n))}catch(n){if(!(n instanceof SyntaxError))throw n;if(O?.session.active)ht(O)}})}function bv(e,t,n){let r=H(t.message),s=bn(r);if(!s)return;if(s==="toolResult"&&r.toolName==="send_file"&&n!=="message_end")return;let i=e.messages[e.messages.length-1],o=Vr(r),a=s==="assistant"&&e.liveKey,l=n!=="message_start"&&a||o||"";if(!l&&n!=="message_start"&&i&&s===bn(i.message))l=i.key;if(!l)l=`live:${++e.serial}`;let u=e.messages.findIndex((d)=>d.key===l);if(u<0)e.messages.push({key:l,message:r});else e.messages[u]={key:l,message:r};if(e.liveMessageKeys.add(l),s==="assistant"){if(e.liveKey=n==="message_end"?"":l,n!=="message_end")e.running=!0;if(n==="message_start"||n==="message_end")e.replyStreaming=!1;else if(n==="message_update"&&!e.replyStreaming){let d=r.content;e.replyStreaming=typeof d==="string"?Boolean(d.trim()):ve(d).some((h)=>H(h).type==="text"&&Boolean(C(H(h).text).trim()))}}}function ht(e){if(O!==e)return;clearTimeout(ac),ac=window.setTimeout(()=>{if(O!==e||!e.session.active||Bt!=="open"||Xt==="transport"||zn(e.session.id))return;if(e.transcriptRefresh&&e.running&&!e.stateRefresh)return;if(e.pendingSnapshot){e.refreshScheduled=!0;return}us(e)},120)}function c1(e,t){if(t.type==="upsert"){e.set(Ys(t.request),t.request);return}for(let[n,r]of e){if(!t.ids.includes(n)&&!t.ids.includes(C(r.requestId)))continue;if(t.type==="resolve")e.delete(n);else if(r.method==="question")e.set(n,{...r,...t.timing})}}function Ra(e,t){c1(e.requests,t),e.snapshotRequestChanges?.push(t)}function nc(e,t){let n=H(t);if(uo(n))Ra(e,{type:"upsert",request:n})}function _c(e,t){let n=Am(t);if(!n||e.generationSpeed&&e.generationSpeed.measuredAt>=n.measuredAt)return!1;return e.generationSpeed=n,!0}function Fi(e){if(we.open&&e.detailData)Om(e.detailData,e.state,e.generationSpeed)}function vv(e){let t=C(e.type);if(t==="cli-live"){Js.invalidate(C(e.id));return}if(t==="ready"||t==="engine"){if(t==="engine"){let r=H(e.engine);if(typeof r.online!=="boolean")return;if(Xt!=="transport")Xt=r.online&&kt.online===!1?"engine":!1;if(kt=r,!r.online&&Xt==="transport")ro(),lr="";if(!r.online&&O)Ac(O),O.liveMessageKeys.clear(),O.liveKey="",O.replyStreaming=!1,O.activitySettled=void 0,O.tools.clear(),O.generationSpeed=void 0,Fi(O);if(an(),r.online)ln(!0);else ss()}else if(Xt==="transport"){if(kt.online===!1&&H(e.engine).online===!0)ln(!0)}else if(Xt)return;else if(O&&kt.online!==!1)ln(!0);else ss();return}if(t==="sessions"){ss();return}let n=O;if(!n||e.sessionId!==n.session.id)return;if(n.status!=="ready"&&n.status!=="loading")return;if(t==="generation_speed"){if(_c(n,e.generationSpeed))Fi(n);return}switch(n.revision++,t){case"transcript_refresh_required":if(n.transcriptRefresh={},!n.running)ht(n);return;case"state_refresh_required":n.stateRefresh={},n.pendingStateUnknown=!0,ht(n);return;case"agent_start":case"turn_start":{if(n.activitySettled){for(let[s,i]of n.tools)if(i.stage==="running")n.tools.delete(s)}n.activitySettled=!1,n.replyStreaming=!1,n.running=!0;let r=t==="turn_start"&&C(e.turnId);if(r)n.state={...n.state,currentTurnId:r};break}case"agent_end":if(n.replyStreaming=!1,e.willRetry===!0)break;n.liveKey="",n.activitySettled=!0,ht(n);break;case"agent_settled":if(n.running=!1,n.liveKey="",n.activitySettled=!0,n.replyStreaming=!1,n.state={...n.state,currentTurnId:void 0},ht(n),Ta(n),n.status==="ready"&&we.open)Ft?.invalidate(),Aa(n);break;case"agent_idle":if(n.activitySettled=!0,n.replyStreaming=!1,n.transcriptRefresh)n.running=!1,n.liveKey="";ht(n);break;case"message_start":case"message_update":case"message_end":bv(n,e,t);break;case"tool_execution_start":case"tool_execution_update":case"tool_execution_end":{let r=C(e.toolCallId);if(!r)break;let s=n.tools.get(r),i=H(e.result??e.partialResult);if(n.tools.set(r,{id:r,name:C(e.toolName)||s?.name||"",args:e.args??s?.args,output:i.content??s?.output,stage:e.isError===!0?"error":t==="tool_execution_end"?"done":"running"}),t==="tool_execution_end"&&e.isError!==!0&&/^(?:todo|todowrite)$/u.test(C(e.toolName)||s?.name||""))Ta(n);break}case"extension_ui_request":nc(n,e);break;case"ui_request_pending":nc(n,e.request);break;case"question_updated":{if(uo(e))nc(n,e);else{let r=[C(e.id),C(e.requestId)].filter(Boolean),s=Ee(e.deadlineAtMs),i=Ee(e.remainingMs);if(!r.length||s===void 0&&i===void 0)return;Ra(n,{type:"timing",ids:r,timing:{...s===void 0?{}:{deadlineAtMs:s},...i===void 0?{}:{remainingMs:i}}})}break}case"question_resolved":case"ui_request_resolved":case"extension_ui_resolved":case"extension_ui_request_resolved":{let r=[e.id,e.requestId,e.uiRequestId].map(C).filter(Boolean);if(r.length)Ra(n,{type:"resolve",ids:r});ht(n);break}case"compaction_start":n.compacting=!0;break;case"compaction_end":if(n.compacting=!1,e.aborted!==!0&&C(e.errorMessage))Ke(n.session.id).error=C(e.errorMessage);if(e.aborted!==!0&&e.success!==!1&&!e.errorMessage&&!e.error)Ji(n);if(e.aborted!==!0&&!C(e.errorMessage)&&we.open)Ft?.invalidate(),Aa(n);ht(n);break;case"queue_update":if(n.queue=ve(e.steering).length+ve(e.followUp).length,we.open&&ls())gc(n);else Gs=!0;Dr?.activate(!0);break;case"pending_input_update":if(ht(n),we.open&&ls())gc(n);else Gs=!0;Dr?.activate(!0);break;case"model_changed":case"service_tier_changed":{let r=Ut(H(n.state.model));if(e.model)n.state={...n.state,model:e.model};if(typeof e.thinkingLevel==="string")n.state={...n.state,thinkingLevel:e.thinkingLevel};if(typeof e.fastMode==="boolean")n.state={...n.state,fastMode:e.fastMode};if(Fi(n),!r||r===Ut(H(n.state.model)))n.modelPreview=void 0,Mr(n);else a1(n,r);ht(n);break}case"commands_changed":case"loaded_surfaces_changed":Mr(n);break;case"auto_retry_start":n.activitySettled=!1,n.replyStreaming=!1,n.running=!0;break;case"auto_retry_end":ht(n);break;case"session_replaced":if(za(),Ji(n),n.status="loading",n.running=!1,n.compacting=!1,n.activitySettled=void 0,n.state={},n.requests.clear(),n.queue=void 0,Nn?.abort(),n.workbench=void 0,n.generationSpeed=void 0,vc(),Fi(n),we.open)Ft?.invalidate(),Aa(n);ht(n);break;case"transcript_write_failed":case"extension_error":case"retry_fallback_exhausted":Ke(n.session.id).error=C(e.errorMessage)||C(e.error)||C(e.lastError)||c("本机引擎报告会话错误","The local engine reported a session error.");break;case"session_closed":case"session_parked":case"session_released":if(!zn(n.session.id))no(n);cn({...n.session,active:!1,running:!1});break;default:return}Se(),Ws(n)}async function Oa(e,t){if(et!=="online")throw Error(c("连接断开。重连后重试。","Offline. Reconnect and try again."));if(Lr(e.session.id))throw Error(c("正在关闭会话,请稍候。","The session is closing. Wait for it to finish."));if(t.action!=="resume"&&(e!==O||e.status!=="ready"||!e.session.active||Pe.get(e.session.id)?.status==="pending"))throw Error(c("恢复会话后再试。","Resume the session and try again."));try{let n=await Oe.action(e.session.id,t),r=mn(n.session);if(r)cn(r);return n}catch(n){if(n instanceof Ie&&(n.status===401||n.status===403))ln(!0);throw n}}async function yv(e,t,n){let r=[t,C(e.requests.get(t)?.requestId)].filter(Boolean);if(await Oa(e,{action:"answer",requestId:t,...n}),Ra(e,{type:"resolve",ids:r}),e===O)Se();ht(e)}function Zs(){let e=O,t=P("attachments"),n=e&&Ke(e.session.id);if(t.hidden=!n?.images.length||n.commandMode,t.replaceChildren(),!n)return;for(let r of n.images){let s=v("div","attachment"),i=v("img");i.alt=r.name,i.src=r.url;let o=Be(c("移除","Remove"),()=>{n.images=n.images.filter((a)=>a!==r),Zs(),Se(),(t.querySelector("button")??Y("attach")).focus()},"button--quiet");o.setAttribute("aria-label",c(`移除图片:${r.name}`,`Remove image: ${r.name}`)),s.append(i,o),t.append(s)}}async function Pp(e){let t=O;if(!t||t.status!=="ready"||t.session.archived||Lr(t.session.id)||Ke(t.session.id).commandMode)return;let n=Ke(t.session.id),r=[],s=[];for(let o of e){let a=o.type;if(!ao(a)){r.push(c(`不支持图片格式:${o.name}`,`Unsupported image format: ${o.name}`));continue}if(!o.size||o.size>2100000){r.push(c(`图片为空或超过 2.1 MB:${o.name}`,`Image is empty or larger than 2.1 MB: ${o.name}`));continue}if(n.images.length+n.reading>=4){r.push(c("最多可添加 4 张图片。","You can attach up to 4 images."));break}n.reading++,s.push(new Promise((l,u)=>{let d=new FileReader;d.addEventListener("error",()=>u(Error(c(`无法读取图片:${o.name}`,`Couldn't read image: ${o.name}`))),{once:!0}),d.addEventListener("load",()=>{let h=typeof d.result==="string"?d.result:"",p=h.slice(h.indexOf(",")+1);if(!p||!h.startsWith(`data:${a};base64,`)){u(Error(c(`图片编码无效:${o.name}`,`Invalid image data: ${o.name}`)));return}l({type:"image",mimeType:a,data:p,name:o.name||c("粘贴的图片","Pasted image"),url:h})},{once:!0}),d.readAsDataURL(o)}))}if(t===O)Se();let i=await Promise.allSettled(s);n.reading-=s.length;for(let o of i)if(o.status==="fulfilled")n.images=[...n.images,o.value];else r.push(_e(o.reason));if(n.error=[...new Set(r)].join(" "),t===O)Zs(),Se()}async function kv(){let e=O;if(!e||Y("send").disabled||Y("send").hidden)return;let t=e.session.id,n=Ke(t),{text:r,mode:s,images:i}=n,o=s==="prompt"?"":C(e.state.currentTurnId),a=n.admission,l=a&&a.text===r&&a.mode===s&&a.turn===o&&a.imageList===i?a.id:crypto.randomUUID();n.admission={id:l,text:r,mode:s,turn:o,imageList:i},n.error="",Fn.add(t),Se();try{if(await Oa(e,{action:"prompt",message:r,mode:s,clientMessageId:l,...o?{expectedTurnId:o}:{},...i.length?{images:i.map(({type:u,mimeType:d,data:h})=>({type:u,mimeType:d,data:h}))}:{}}),n.admission=void 0,n.text===r){if(n.text="",e===O&&!n.commandMode)He.value=""}if(n.images=n.images.filter((u)=>!i.includes(u)),e===O)Zs();ht(e)}catch(u){if(n.error=c(`未能发送:${_e(u)}`,`Couldn't send: ${_e(u)}`),u instanceof Ie&&u.status>=400&&u.status<500)n.admission=void 0;ht(e)}finally{if(Fn.delete(t),e===O)Se()}}async function wv(e){if(Y("send-command").disabled||Y("send-command").hidden)return;let t=e.session.id,n=Ke(t),r=n.commandMode?"commandText":"text",s=n.commandMode?"commandError":"error",i=n[r],o=(p)=>{n[s]=p},a=()=>{if(n[r]!==i)return;if(n[r]="",O?.session.id===t&&n.commandMode===(r==="commandText"))He.value=""};n.commandStatus=void 0;let l=Ns(i);if(l.kind==="malformed"||l.kind==="tui-only"){o(l.kind==="malformed"?l.message:`${c(`“/${l.name}”仅限本机 OmO 终端。`,`/${l.name} is available only in the local OmO terminal.`)} ${Y0(l.name)} ${c("输入未发送。","Input was not sent.")}`),Se();return}if(l.kind==="builtin"){o("");try{if(await xv(e,l.command,o))a()}catch(p){o(c(`命令失败:${_e(p)}`,`Command failed: ${_e(p)}`))}if(O?.session.id===t)Se();return}let[,u,d]=/^(\S+)(?:[ \t]+([^\r\n]*))?$/.exec(i)??[];if(!u||!Qr.test(u)||/[\r\n]/.test(i)){o(c("请输入单行 /命令 或 $技能,可附加参数。","Enter a /command or $skill on one line. Arguments are optional.")),Se();return}let h=n.commandAdmission?.text===i?n.commandAdmission.id:crypto.randomUUID();n.commandAdmission={text:i,id:h},o(""),Fn.add(t),Se();try{await Oa(e,{action:"command",invocation:u,...d?{arguments:d}:{},clientMessageId:h}),n.commandAdmission=void 0,a()}catch(p){if(p instanceof Ie&&p.status>=400&&p.status<500)n.commandAdmission=void 0;let g=p instanceof Ie?p.code:"",b=g==="unknown_command"?c("未知命令","Unknown command"):g==="session_busy"||g==="bridge_busy"?c("会话忙","Session is busy"):g==="invalid_arguments"||g==="invalid_request"?c("命令输入无效","Invalid command input"):c("原生命令失败","Native command failed");o(c(`${b}:${_e(p)}`,`${b}: ${_e(p)}`))}finally{if(Fn.delete(t),O?.session.id===t)Se(),ht(O)}}async function xv(e,t,n){let r=e.session.id,s=(i,o)=>yn(e,i,o,n);switch(t.name){case"new":return cc(),Hs.open;case"resume":case"sessions":return es="prompt",Lc(),kn("cli-history-dialog").open;case"name":case"rename":if(t.value!==void 0)return s({action:"rename",name:t.value},c("重命名","Rename"));return Y("manage-button").click(),rt.querySelector('[data-key="name"]')?.focus(),rt.open;case"session":return wr(),we.open;case"settings":case"setting":return Y("manage-button").click(),rt.querySelector('[data-key="run-settings"]')?.focus(),rt.open;case"tree":return wr("overview",He,"tree"),we.open;case"todo":return wr("todo",He,"todo"),we.open;case"rules":{wr("todo",He);let i=ge("runtime-instructions",HTMLDetailsElement);i.open=!0;let o=i.querySelector("summary");return o?.focus({preventScroll:!0}),o?.scrollIntoView({block:"nearest"}),we.open}case"tasks":return wr("subagents",He),we.open;case"dag":return wr("dag",He),we.open;case"help":case"hotkeys":return await h1(e,!0),sn.open;case"reasoning":case"efforts":{let i=H(e.state.model),o=C(e.state.thinkingLevel);if(!Ut(i))return n(c("没有已确认的模型。","No model is selected yet.")),!1;if(!o||!Object.hasOwn(vn,o))return n(c("当前思考档未知。","The current thinking level is unknown.")),!1;if(t.name==="reasoning")return Ke(r).commandStatus=o==="off"?c("当前模型推理:关闭。","Model reasoning: off."):c(`当前模型推理:开启(${o})。`,`Model reasoning: on (${o}).`),!0;let a=ve(e.options.levels).map(C).filter((u)=>Object.hasOwn(vn,u)),l=a.filter((u)=>u!=="off");if(!a.length)return n(c("暂时无法读取可用思考档。","Thinking levels are unavailable.")),!1;if(i.reasoning===!1||!l.length)return n(c("当前模型不支持推理。","This model does not support reasoning.")),!1;if(a.includes("off")&&l.length===1)return n(c("此模型只能开启或关闭推理。","This model can only turn reasoning on or off.")),!1;return Ke(r).commandStatus=c(`当前档位:${o}。可用推理档:${l.join("、")}。`,`Thinking: ${o}. Available levels: ${l.join(", ")}.`),!0}case"fork":return Y("web-branch-button").click(),kn("branch-dialog").open;case"compact":{let i=await s({action:"compact",...t.instructions?{instructions:t.instructions}:{}},c("压缩上下文","Compact context"));if(i)Ke(r).commandStatus=c("上下文已压缩。","Context compaction completed.");return i}case"model":{if(!t.reference){if(pc()&&!je("model").disabled)Sr(!0);if(je("model").focus(),document.activeElement===je("model")){try{je("model").showPicker?.()}catch(o){if(!(o instanceof DOMException))throw o}return!0}return n(c("没有可选模型。","No models available.")),!1}let i=ve(e.options.models).map(H).filter((o)=>[C(o.id),`${C(o.provider)}/${C(o.id)}`].includes(t.reference??""));if(i.length===1)return s({action:"model",provider:C(i[0].provider),modelId:C(i[0].id)},c("切换模型","Change model"));return n(i.length?c("多个模型同名,请用 provider/model。","Multiple models have that name. Use provider/model."):c("找不到此模型。用 /model 查看列表。","Model not found. Use /model to list available models.")),!1}case"thinking":{if(!t.level){if(pc()&&!je("thinking").disabled)Sr(!0);if(je("thinking").focus(),document.activeElement===je("thinking")){try{je("thinking").showPicker?.()}catch(i){if(!(i instanceof DOMException))throw i}return!0}return n(c("没有可选思考档。","No thinking levels available.")),!1}if(!ve(e.options.levels).includes(t.level))return n(c("此模型不支持这个思考档。","This model does not support that thinking level.")),!1;return s({action:"thinking",level:t.level},c("切换思考档","Change thinking level"))}case"fast":if(typeof e.state.fastMode!=="boolean")return n(c("此模型没有快速模式。","Fast mode is unavailable for this model.")),!1;return s({action:"fast",enabled:t.mode?t.mode==="on":!e.state.fastMode},c("切换快速模式","Change fast mode"));case"clone":case"copy":$t.add(r),Se();try{if(t.name==="copy"){let{text:a}=await Oe.request(`${Ge(r)}/last-assistant`,void 0,e.reads.signal);if(e!==O)return!1;if(typeof a!=="string"||!a)return n(c("没有可复制的助手消息。","No assistant message to copy.")),!1;if(!navigator.clipboard)return n(c("浏览器无法访问剪贴板。","The browser can't access the clipboard.")),!1;return await navigator.clipboard.writeText(a),Ke(r).commandStatus=c("已复制上一条助手消息。","Copied the last assistant message."),!0}let i=await Oe.request(`${Ge(r)}/branches`,{kind:"clone"});if(i.cancelled===!0)return n(c("原生引擎取消了复制。","OmO cancelled the clone.")),!1;let o=mn(i.session);if(!o)throw Error(c("本机服务没有返回新会话。","The local service did not return a new session."));if(e===O)Yp(o,"",{kind:"web",id:r,name:e.session.name});else cn(o);return!0}finally{$t.delete(r)}}}function Up(){if(!O||O.status!=="ready"||!O.session.active||zn(O.session.id))return;let e=Ke(O.session.id);if(e.commandMode||Xp(e.text))wv(O);else kv()}async function yn(e,t,n,r,s){let i=e.session.id;if($t.has(i)||zn(i))return!1;$t.add(i),r(""),Se(),rt.setAttribute("aria-busy","true"),we.setAttribute("aria-busy","true");try{let o=await Oa(e,t);if(e!==O)return!0;if(s?.(o),t.action==="navigate"){if(H(o.result).cancelled===!0)return!1;za(),Nt?.abort(),Nt=void 0,ar=void 0,Ks=void 0,Ft?.invalidate(),Ji(e),Nn?.abort(),e.workbench=void 0;let a=C(H(o.result).editorText);if(a){let l=Ke(i);if(l.text=a,!l.commandMode)He.value=a}}if(t.action==="resume")e.status="loading";if(t.action==="model"||t.action==="thinking")e.modelPreview=void 0;if(await us(e,t.action==="resume"||t.action==="navigate"),e!==O)return!0;if(t.action==="resume")Mr(e);if(rt.open)u1(e);if(we.open&&t.action!=="abort")Aa(e);return!0}catch(o){if(e===O)r(c(`${n}失败:${_e(o)}`,`${n} failed: ${_e(o)}`),o);return!1}finally{if($t.delete(i),rt.removeAttribute("aria-busy"),we.removeAttribute("aria-busy"),e===O)Se()}}function cc(){if(et!=="online"||!Et.length||Hs.open)return;mt.stop();let e=je("new-cwd");e.replaceChildren(...Et.map((n)=>ot(n,n))),e.value=_r||O?.session.cwd||Et[0]||"";let t=Et.length>1;if(P("new-cwd-field").hidden=!t,P("new-cwd-fixed").hidden=t,P("new-cwd-path").textContent=e.value,jt("new-name").value="",Q(P("new-error")),Hs.showModal(),!t)jt("new-name").focus()}async function Ev(){if(Wi||et!=="online")return;let e=je("new-cwd").value;if(!Et.includes(e))return;let t=jt("new-name").value.trim();if(t.length>120){Q(P("new-error"),c("会话名称不能超过 120 个字符。","Keep the session name to 120 characters or fewer."));return}Wi=!0,Y("create").disabled=!0,Q(P("new-error"));try{let n=await Oe.request("/api/sessions",{cwd:e,...t?{name:t}:{}}),r=mn(n.session);if(!r)throw Error(c("本机服务没有返回会话。","The local service did not return a session."));if(_r="",cn(r),!mt.active){if(Hs.open)Hs.close();Ba(r.id)}}catch(n){if(Q(P("new-error"),c(`创建失败:${_e(n)}`,`Couldn't create session: ${_e(n)}`)),n instanceof Ie&&(n.status===401||n.status===403))ln(!0)}finally{Wi=!1,an()}}async function Av(e){let t=e.session.id;if(e!==O||!rt.open||Pe.get(t)?.status==="pending"||Zp(e))return;let n={status:"pending"};Pe.set(t,n),e.history?.invalidate(),Se(),Ws(e),P("manage-handoff-status").focus();let r=()=>O?.session.id===t?O:void 0,s=()=>rt.open||document.activeElement===Y("manage-button")||P("composer-shell").contains(document.activeElement),i=(o,a)=>{let l=s();if(no(o),o.error="",rt.open)rt.close();if(Se(),l&&!document.querySelector("dialog:modal"))P(a).focus()};try{let{session:o,command:a}=await Oe.handoff(t);if(Pe.get(t)!==n)return;Pe.set(t,{status:"released",command:a}),cn(o);let l=r();if(l)i(l,"handoff-title")}catch(o){if(Pe.get(t)!==n)return;let a=!(o instanceof Ie)||o.status>=500||o.code==="session_not_open",l=c(`无法转到 CLI:${_e(o)}`,`Couldn't switch to the CLI: ${_e(o)}`),u=r();if(a||u&&!u.session.active){Pe.set(t,{status:"uncertain",error:l});let d=u?.session??on.get(t);if(d)cn({...d,active:!1,running:!1});if(u)i(u,"session-error");ss()}else if(Pe.set(t,{status:"failed",error:l}),u){if(Se(),Ws(u),rt.open&&document.activeElement===P("manage-handoff-status"))P("manage-handoff-error").focus()}if(o instanceof Ie&&(o.status===401||o.status===403))ln(!0)}}function u1(e){let t=P("manage-body"),n=document.activeElement,r=n instanceof HTMLElement&&t.contains(n)?n.dataset.key:void 0,s=e.session.id,i=(L)=>Q(P("manage-error"),L),o=v("input");o.type="text",o.required=!0,o.maxLength=120,o.value=e.session.name,o.dataset.key="name";let a=v("form","stack stack--tight"),l=v("button","button",c("保存名称","Save name"));l.type="submit",l.dataset.write="",l.dataset.key="save";let u=v("div","row");u.append(l),a.append(cr(c("会话名称","Session name"),o),u),a.addEventListener("submit",(L)=>{L.preventDefault();let T=o.value.trim();if(!T){i(c("请输入会话名称。","Enter a session name."));return}if(T!==e.session.name)yn(e,{action:"rename",name:T},c("重命名","Rename"),i)});let d=(L,T,F,I=!1)=>{let q=Be(L,()=>void yn(e,F,L,i));return q.dataset.key=T,q.dataset.write="",q.disabled=I||et!=="online",q},h=v("section","subpanel stack stack--tight"),p=v("div","row");p.append(d(e.session.archived?c("取消归档","Unarchive"):c("归档","Archive"),"archive",{action:"archive",enabled:!e.session.archived}),d(e.session.settled?c("重新标为未结清","Mark as open"):c("标为已结清","Mark as done"),"settle",{action:"settle",enabled:!e.session.settled})),h.append(v("h3","",c("会话状态","Session status")),v("p","small muted",e.session.archived?c("已归档","Archived"):c("未归档","Not archived")),p);let g=v("section","subpanel stack stack--tight"),b=v("div","row"),k=e.state.fastMode,w=e.state.autoCompactionEnabled;if(typeof k==="boolean")b.append(d(k?c("关闭快速模式","Turn off fast mode"):c("开启快速模式","Turn on fast mode"),"fast",{action:"fast",enabled:!k}));if(typeof w==="boolean")b.append(d(w?c("关闭自动压缩","Turn off auto-compaction"):c("开启自动压缩","Turn on auto-compaction"),"auto",{action:"autoCompaction",enabled:!w}));let A=v("h3","",c("运行设置","Run settings"));if(A.dataset.key="run-settings",A.tabIndex=-1,g.append(A),b.childElementCount)g.append(b);let _=v("form","stack stack--tight"),S=v("input");S.type="text",S.maxLength=6000,S.dataset.key="instructions";let E=v("button","button",c("压缩上下文","Compact context"));E.type="submit",E.dataset.write="",E.dataset.idle="",E.dataset.key="compact",E.disabled=et!=="online"||e.running||e.compacting;let R=v("div","row");if(R.append(E),_.append(cr(c("压缩说明(选填)","Compaction instructions (optional)"),S),R),_.addEventListener("submit",(L)=>{if(L.preventDefault(),e.running||e.compacting||$t.has(s)){i(c("等本轮结束后再压缩。","Wait for this turn to finish before compacting."));return}let T=S.value.trim();yn(e,{action:"compact",...T?{instructions:T}:{}},c("压缩上下文","Compact context"),i)}),g.append(_),l.disabled=et!=="online",t.replaceChildren(a,h,g),r)[...t.querySelectorAll("[data-key]")].find((L)=>L.dataset.key===r)?.focus()}var ns,uc=[];function d1(e,t){if(e!==O)return;let n=Ke(e.session.id);n.commandMode=t,He.value=t?n.commandText:n.text,Zs(),Se(),He.focus()}function f1(e,t){if(e!==O||!Qr.test(t))return;let n=Ke(e.session.id),[r=""]=n.commandText.split(/\s/,1),s=Qr.test(r)?n.commandText.slice(r.length):"";if(n.commandText=`${t}${s||" "}`,n.commandError="",sn.open)sn.close();if(we.matches(":modal"))cs(!1);d1(e,!0),He.setSelectionRange(t.length+1,t.length+1)}function dc(e){let t=P("command-list"),n=document.activeElement,r=n instanceof HTMLButtonElement&&t.contains(n)?n.dataset.invocation:void 0,s,i=jt("command-search").value.trim().toLocaleLowerCase(),o=uc.flatMap((l)=>{let u=C(l.invocation),d=C(l.description),h=C(l.source),p=h==="builtin"?c("内置命令","Built-in"):h==="skill"?c("技能","Skill"):h==="prompt"?c("提示模板","Prompt template"):c("扩展","Extension");if(!Qr.test(u)||!`${u} ${d} ${p} ${h}`.toLocaleLowerCase().includes(i))return[];let g=v("li","stack stack--tight"),b=Be(u,()=>f1(e,u),"button--quiet path");if(b.dataset.invocation=u,u===r)s=b;return b.setAttribute("aria-label",c(`插入命令:${u}`,`Insert command: ${u}`)),g.append(b,v("p","small muted break",[p,d].filter(Boolean).join(" · "))),[g]}),a=c("仅限本机终端","Native terminal only");for(let l of ma){let u=`/${l}`,d=Y0(l);if(!`${u} ${a} ${d}`.toLocaleLowerCase().includes(i))continue;let h=v("li","stack stack--tight");h.append(v("code","path",u),v("p","small muted break",`${a} · ${d}`)),o.push(h)}t.replaceChildren(...o),t.hidden=!o.length,s?.focus({preventScroll:!0}),Q(P("command-status"),o.length?"":i?c("没有匹配的命令。","No matching commands."):c("此会话没有可用命令。","This session has no listed commands."))}async function h1(e,t=!1){if(sn.open||Y("command-picker").disabled)return;ns?.abort();let n=ns=new AbortController;uc=ba([]);let r=jt("command-search"),s=ge("command-shortcuts",HTMLDetailsElement);if(s.open=t,r.value="",P("command-list").replaceChildren(),P("command-list").hidden=!0,Q(P("command-error")),sn.showModal(),dc(e),t)s.querySelector("summary")?.focus();let i=()=>!n.signal.aborted&&sn.open&&e===O;try{let o=await Oe.request(`${Ge(e.session.id)}/options`,void 0,n.signal);if(!i())return;uc=ba(o.commands),dc(e)}catch(o){if(!i())return;Q(P("command-error"),c(`无法读取扩展命令:${_e(o)}。内置命令仍可用。`,`Couldn't load extension commands: ${_e(o)}. Built-in commands remain available.`))}finally{if(ns===n)ns=void 0}}var sr,Gt,Nt,Bn,qn,Qt,Ft,Dr,Gs=!1,ar,Ks,Tt,Vs=mp(),Tr={current:new Map,history:new Map},un,Xi=!1,fc,Fs,tr,$a=!1,hc=()=>[...we.querySelectorAll('[role="tab"]')],Tc=()=>!P("runtime-capabilities").hidden,ls=()=>!P("runtime-metrics").hidden,so=()=>!P("runtime-todo").hidden,Ma=()=>ge("runtime-memory-branch",HTMLDetailsElement),dn=()=>!P("runtime-subagent").hidden?"tasks":!P("runtime-dag").hidden?"dag":so()&&Ma().open?"memory":void 0,Rc=["todo","dag"],is={},io=(e)=>ge(`runtime-${e}-history`,HTMLDetailsElement),mc=(e)=>io(e).querySelector(".fold-body"),Qi=(e)=>we.open&&!P(`runtime-${e}`).hidden&&io(e).open;function Fa(e){if(e==="dag"&&un?.scope==="history")un=void 0;is[e]?.abort(),delete is[e];let t=io(e),n=t.querySelector("summary");if(mc(e).contains(document.activeElement)&&n?.getClientRects().length)n.focus({preventScroll:!0});t.open=!1,mc(e).replaceChildren()}function m1(){if(Tr.current.clear(),Tr.history.clear(),un=void 0,Xi)Q(P("details-error")),Xi=!1}function za(){for(let e of Rc)Fa(e);m1()}function Cv(){if(Vs.reset(),Gt?.abort(),qn?.abort(),Qt?.abort(),Gt=qn=Qt=void 0,Tt=void 0,m1(),!we.open)return;Fa("dag");let e={status:"unavailable",reason:"binding_unverified"};as(P("runtime-dag-current"),Ln("dag",e)),as(P("runtime-subagent"),Ln("tasks",e))}function Da(){let e=Y("details-refresh");if(Tc()&&tr)e.setAttribute("aria-disabled","true");else e.removeAttribute("aria-disabled")}function p1(){tr?.abort(),tr=void 0,$a=!1;let e=P("capabilities-status");e.textContent="",e.className="sr-only",P("capabilities-content").replaceChildren(),Da()}function Sv(e){if(tr)return;let t=tr=new AbortController,n=()=>tr===t&&we.open&&O===e,r=P("capabilities-status"),s=P("capabilities-content"),i=H0();$a=!0,s.replaceChildren(i),r.className="small muted",r.textContent=c("正在读取能力清单…","Loading capabilities…"),Da();let o=AbortSignal.any([t.signal,AbortSignal.timeout(1e4)]);Oe.request(`${Ge(e.session.id)}/capabilities`,void 0,o).then((a)=>{if(!n())return;s.replaceChildren(...Gm(a)),r.className="sr-only",r.textContent=c("能力清单已加载。","Capabilities loaded.")},(a)=>{if(!n())return;if(r.className="notice error small",a instanceof Ie&&a.status===404&&a.code==="not_found")r.textContent=c("此版本的 Web 服务不提供能力清单。","This Web server does not list capabilities.");else if(a instanceof Ie&&(a.code==="session_changed"||a.code==="session_not_open"||a.code==="session_not_found"))r.textContent=c("会话已断开。打开会话后重试。","Session disconnected. Open it and try again.");else r.textContent=c("无法读取能力清单。刷新重试。","Couldn't load capabilities. Refresh to try again.")}).finally(()=>{if(tr!==t)return;tr=void 0,Da()})}function os(e,t=!0){if(e.getAttribute("aria-selected")==="true")return;if(e.id!=="runtime-open-subagents"){Vs.reset();let n=P("runtime-subagent").querySelector(".task-run[open]");if(n)n.open=!1}if(un=void 0,Xi)Q(P("details-error")),Xi=!1;for(let n of hc()){let r=n===e;n.setAttribute("aria-selected",String(r)),n.tabIndex=r?0:-1;let s=n.getAttribute("aria-controls");if(s)P(s).hidden=!r;if(s==="runtime-todo"&&!r)vc()}for(let n of Rc)if(P(`runtime-${n}`).hidden)Fa(n);if(P("details-scroll").scrollTop=0,Fs=void 0,t&&we.open&&O?.status==="ready")zs(O);Da()}function qa(){if(!Fs)return;let e=Fs==="todo"?"#runtime-todo [data-runtime-branch]":"#runtime-tree",t=we.querySelector(`${e} details`);if(!t)return;Fs=void 0,t.open=!0;let n=t.querySelector("summary");if(document.activeElement===Y(e==="#runtime-tree"?"runtime-open-overview":"runtime-open-todo"))n?.focus({preventScroll:!0}),n?.scrollIntoView({block:"start"})}function wr(e="overview",t=Y("details-button"),n){if(O?.status!=="ready")return;let r=Y(`runtime-open-${e}`);if(os(r),fc=t,Fs=n,!Us.matches&&!Vi)Vi=!0,Cc(kc,"open");if(!we.open)g1(O);r.focus({preventScroll:!0}),qa()}function g1(e){Q(P("details-error")),Gs=!1;for(let s of we.querySelectorAll('[role="tabpanel"]:not(#runtime-capabilities, #runtime-todo, #runtime-dag)'))s.replaceChildren();P("runtime-dag-current").replaceChildren(),P("runtime-todo").querySelector("[data-runtime-branch]")?.remove(),P("runtime-memory-journal").replaceChildren(),P("runtime-memory-branch-content").replaceChildren(),Ma().open=!1;let t=()=>O===e&&we.open&&ls();Dr=Nm(Oe,Ge(e.session.id),()=>t()&&e.status==="ready",()=>e.session.active&&et==="online"&&!$t.has(e.session.id)&&!zn(e.session.id),()=>{if(window.confirm(c("清空所有尚未发送的排队输入?","Remove all unsent messages from the queue?")))yn(e,{action:"clearQueue"},c("清空队列","Clear queue"),(s)=>Q(P("details-error"),s))});let n=()=>e.session.active&&et==="online"&&!e.running&&!e.compacting&&!e.requests.size&&!(e.queue&&e.queue>0)&&!Fn.has(e.session.id)&&!$t.has(e.session.id)&&!zn(e.session.id),r=Pm(Oe,Ge(e.session.id),t,n,(s,i)=>{let a=Ke(e.session.id).text.trim()?c("切换上下文位置?选中的消息可能替换当前草稿。","Switch context? The selected message may replace your draft."):c("切换上下文位置?原有分支仍会保留。","Switch context? Existing branches are kept."),l=(u,d)=>{if(Ft!==r)return;let h=F0(d);if(h)r.invalidate();Q(P("details-error"),h?"":u)};if(window.confirm(a))yn(e,{action:"navigate",targetId:s,expectedLeafId:i},c("切换上下文","Switch context"),l,(d)=>{if(H(d.result).cancelled===!0)l(c("本次切换已取消。","Context switch cancelled."))})});if(Ft=r,P("runtime-metrics").append(Ft.root),Us.matches)we.showModal();else we.open=!0;Y("details-button").setAttribute("aria-expanded","true"),P("details-scroll").scrollTop=0,zs(e)}function b1(e,t=!1){if(!e||e.status!=="ready"||mt.active||e.consideredDesktopDock&&!t)return;if(e.consideredDesktopDock=!0,!Vi||Us.matches||we.open)return;os(Y("runtime-open-overview")),g1(e)}function cs(e=!0){if(!we.open)return;if(we.close(),Vs.reset(),sr?.abort(),sr=void 0,Gt?.abort(),Gt=void 0,Nt?.abort(),Nt=void 0,Bn?.abort(),Bn=void 0,qn?.abort(),qn=void 0,Qt?.abort(),Qt=void 0,Ft?.abort(),Ft=void 0,Dr?.deactivate(),Dr=void 0,ar=void 0,Ks=void 0,Tt=void 0,za(),vc(),O)O.detailData=void 0;Fs=void 0,p1();let t=Y("details-button");t.setAttribute("aria-expanded","false");let n=fc??t;if(fc=void 0,e)(n.getClientRects().length?n:t.hidden?P("conversation"):t).focus({preventScroll:!0})}function ya(){if(!we.matches(":modal"))Vi=!1,Cc(kc,"closed");cs()}function rc(){let e=Y("details-button");if(Us.matches){if(e.setAttribute("aria-haspopup","dialog"),we.open&&!we.matches(":modal"))cs(we.contains(document.activeElement));return}if(e.removeAttribute("aria-haspopup"),!we.matches(":modal")||document.querySelector("dialog:modal:not(#details-dialog)"))return;let t=P("details-scroll"),n=t.scrollTop,r=document.activeElement;if(we.close(),we.open=!0,r instanceof HTMLElement&&we.contains(r))r.focus({preventScroll:!0});t.scrollTop=n}function Sr(e){Er.setAttribute("aria-expanded",String(e))}function pc(){return getComputedStyle(sc).getPropertyValue("--compact-options").trim()==="1"}function _v(){let e=pc();if(e===sc.hasAttribute("data-compact"))return;let t=document.activeElement;if(!e)Sr(!1);if(sc.toggleAttribute("data-compact",e),e&&qs.contains(t)&&Er.getAttribute("aria-expanded")!=="true")Er.focus({preventScroll:!0});else if(!e&&t===Er)(qs.querySelector("select:enabled:not([hidden] *)")??He).focus({preventScroll:!0})}function gc(e){sr?.abort();let t=sr=new AbortController,n=Ft?.root,r=Dr,s=()=>!t.signal.aborted&&we.open&&ls()&&e===O,i=P("runtime-metrics"),o=(l)=>Q(P("details-error"),l),a=!i.querySelector(".runtime-metrics")&&!i.querySelector(":scope > p")?v("p","muted",c("正在读取运行详情…","Loading run details…")):void 0;if(a)i.prepend(a);o(""),Oe.request(`${Ge(e.session.id)}/details`,void 0,t.signal).then((l)=>{if(!s()||!n||!r)return;if(e.detailData=l,Gs=!1,kt.online!==!1)_c(e,l.generationSpeed);r.update(Ee(H(l.state).pendingMessageCount)),$m(l,e.state,e.options,{insertCommand:(u)=>f1(e,u)},n,r.root,e.generationSpeed),qa()}).catch((l)=>{if(!s())return;i.querySelector(":scope > p")?.remove(),o(c(`无法读取运行详情:${_e(l)}`,`Couldn't load run details: ${_e(l)}`))}).finally(()=>{if(sr===t)sr=void 0})}function Tv(e){Nt?.abort();let t=Nt=new AbortController;is.todo?.abort(),delete is.todo;let n=()=>t===Nt&&we.open&&so()&&O===e;if(!ar)O0({status:"loading"});let r=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);Oe.request(`${Ge(e.session.id)}/branch-runtime?scope=todo`,void 0,r).catch(()=>({status:"unavailable",reason:"read_failed"})).then((s)=>{if(!n())return;Nt=void 0;let i=La(ar),o=La(s);if(i!==void 0&&o!==void 0&&i!==o)za();if(ar=s,o!==void 0)Ft?.checkLeaf(o);if(O0(s),qa(),Qi("todo"))Dc(e,"todo")}).finally(()=>{if(Nt===t)Nt=void 0})}function La(e){if(e?.status==="ok"&&(typeof e.leafId==="string"||e.leafId===null))return e.leafId}function Rv(e){Bn?.abort();let t=Bn=new AbortController;if(!Ks)$0({status:"loading"});let n=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);Oe.request(`${Ge(e.session.id)}/branch-runtime`,void 0,n).catch(()=>({status:"unavailable",reason:"read_failed"})).then((r)=>{if(t!==Bn||!we.open||dn()!=="memory"||O!==e)return;Ks=r,$0(r)}).finally(()=>{if(Bn===t)Bn=void 0})}function as(e,t,n=!0){let s=(d)=>d.dataset.dagKey??d.dataset.taskKey,i=new Set([...e.querySelectorAll(".dag-run, .task-run")].filter((d)=>d.open).flatMap((d)=>s(d)||[])),o=document.activeElement,a=e.contains(o)?o?.closest(".dag-run, .task-run"):void 0,l=a&&s(a);e.replaceChildren(...t);let u=null;for(let d of e.querySelectorAll(".dag-run, .task-run")){let h=s(d);if(h&&n&&i.has(h))d.open=!0;if(h&&h===l)u=d.querySelector("summary")}if(a&&document.activeElement===document.body)(u??e.closest("details")?.querySelector("summary")??e.closest('[role="tabpanel"]'))?.focus({preventScroll:!0})}function Mc(){un=void 0,Xi=!0;let e=P("details-error");if(Q(e,c("该 DAG 节点关联已无法核验。可打开相应运行查看最新详情。","This DAG node link is no longer verified. Open the run to see its latest details.")),document.activeElement===Y("runtime-open-dag"))e.scrollIntoView({block:"start"})}function v1(e,t){let n=un;if(!n||n.scope!==t)return;let r=e.querySelector(`.dag-run[data-dag-key="${n.key}"]`);if(!r){Mc();return}if(r.open=!0,document.activeElement===Y("runtime-open-dag"))r.scrollIntoView({block:"start"})}function Mv(e,t){if(O!==e||!we.open||dn()!=="tasks"||!Tt?.taskIndex.has(t.taskKey)||!Tr[t.scope].get(t.key)?.includes(t))return;let n=Y("runtime-open-dag");if(os(n,!1),un=t,n.focus({preventScroll:!0}),oo(e),t.scope==="history"){let r=io("dag");r.open=!0,r.scrollIntoView({block:"start"})}}function Dv(){let e=new Map;for(let t of Object.values(Tr))for(let n of t.values())for(let r of n)e.set(r.taskKey,e.has(r.taskKey)?null:r);return e}function y1(e,t,n){return{read:async(r,s)=>{let i=AbortSignal.any([n,s,AbortSignal.timeout(28000)]);i.throwIfAborted();let o=await Oe.request(`${Ge(e.session.id)}/native-runtime/dag/${r}?scope=${t}`,void 0,i);return i.throwIfAborted(),o},links:{task:(r)=>Tt?.taskIndex.get(r),openTask:(r)=>{if(e!==O||!we.open||dn()!=="dag"||!Tt?.taskIndex.has(r))return;if(os(Y("runtime-open-subagents")),Gt)oo(e);let s=P("runtime-subagent").querySelector(`.task-run[data-task-key="${r}"]`),i=s?.querySelector("summary");if(s&&i)s.open=!0,Bi(i)}},settled:(r,s,i)=>{if(e!==O||!we.open||dn()!=="dag"||n.aborted)return;let o=s.flatMap((l)=>l.taskKey&&Tt?.taskIndex.has(l.taskKey)?[{scope:t,key:r,node:l.id,taskKey:l.taskKey}]:[]);if(s.length)Tr[t==="current"?"history":"current"].delete(r);if(o.length)Tr[t].set(r,o);else Tr[t].delete(r);let a=un;if(a?.scope!==t||a.key!==r)return;if(o.some((l)=>l.node===a.node&&l.taskKey===a.taskKey)){un=void 0;let l=document.activeElement;tp(i,a.node,l===Y("runtime-open-dag")||l===i.previousElementSibling)}else Mc()}}}function k1(e,t){let n=new Set(t.status==="ok"?ve(t.rows).map((s)=>H(s).key):[]),r=Tr[e];for(let[s,i]of r){if(!n.has(s)){r.delete(s);continue}let o=i.filter((a)=>Tt?.taskIndex.has(a.taskKey));if(o.length)r.set(s,o);else r.delete(s)}}function bc(e){return{status:"unavailable",reason:e instanceof Ie&&e.status===404&&e.code==="not_found"?"web_unsupported":e instanceof Ie&&e.status>=400&&e.status<500?"read_refused":"read_failed"}}function Dc(e,t){if(e!==O||!Qi(t))return;let n=mc(t),r=La(ar);if(t==="todo"&&(Nt||r===void 0)){n.replaceChildren(...oa(Nt?void 0:{status:"ownership_changed"}));return}is[t]?.abort();let s=is[t]=new AbortController,i=()=>is[t]===s&&Qi(t)&&O===e,o=Ge(e.session.id);if(t==="todo")n.replaceChildren(...oa());else if(!n.childElementCount)n.replaceChildren(...Ln("dag",void 0,{history:!0}));let a=AbortSignal.any([s.signal,AbortSignal.timeout(20000)]),l=t==="todo"?"/todo-history":"/native-runtime/dag-history";Oe.request(`${o}${l}`,void 0,a).catch(bc).then(async(u)=>{if(!i())return;if(t==="todo"){let p=u.status!=="ok"||r===u.leafId&&r===La(ar);n.replaceChildren(...oa(p?u:{status:"ownership_changed"}));return}if(k1("history",u),!ha(u)){let p=y1(e,"history",s.signal);as(n,Ln("dag",u,{history:!0,dag:p}),un?.scope!=="history"),v1(n,"history");return}if(un?.scope==="history"){as(n,Ln("dag",u,{history:!0})),Mc();return}as(n,Ln("dag",u,{history:!0,snapshot:"waiting"}));let d=AbortSignal.any([s.signal,AbortSignal.timeout(8000)]),h=await Oe.request(`${o}/activity`,void 0,d).catch(bc);if(i())n.replaceChildren(...Ln("dag",u,{history:!0,snapshot:h}))})}function oo(e){let t=dn();if(!t||!Tt)return;if(t==="memory"){P("runtime-memory-journal").replaceChildren(dp(Tt.memory));return}let n=Tt;if(t==="dag"){qn?.abort();let d=qn=new AbortController,h=P("runtime-dag-current"),p=y1(e,"current",d.signal);as(h,Ln("dag",n.dag,{dag:p}),!un),v1(h,"current");return}let r=ha(n.tasks),s=r?n.snapshot??"waiting":void 0,i=Dv();Vs.keep((d)=>n.taskIndex.has(d));let o=document.activeElement,a=o instanceof HTMLElement&&o.closest("#runtime-subagent .task-output")?o:void 0;if(as(P("runtime-subagent"),Ln("tasks",n.tasks,{snapshot:s,taskJump:(d)=>{let h=i.get(d);return h?()=>Mv(e,h):void 0},taskOutput:(d)=>(h,p,g)=>{Vs.bind(d,h,p,g,async(b,k,w)=>{let A=AbortSignal.any([w,AbortSignal.timeout(28000)]),_=k?`?${new URLSearchParams({cursor:k})}`:"";return Oe.request(`${Ge(e.session.id)}/native-runtime/task/${b}/output${_}`,void 0,A)})}})),a?.getClientRects().length&&document.activeElement===document.body)a.focus({preventScroll:!0});if(!r||n.snapshot||Qt)return;let l=Qt=new AbortController,u=AbortSignal.any([l.signal,AbortSignal.timeout(8000)]);Oe.request(`${Ge(e.session.id)}/activity`,void 0,u).catch(()=>({status:"unavailable"})).then((d)=>{if(Qt!==l||!we.open||O!==e||Tt!==n)return;if(n.snapshot=d,dn()==="tasks")oo(e)}).finally(()=>{if(Qt===l)Qt=void 0})}function Lv(e){Gt?.abort(),Qt?.abort(),Qt=void 0;let t=Gt=new AbortController,n=()=>Gt===t&&we.open&&O===e&&Boolean(dn()),r=dn();if(r==="dag")qn?.abort(),qn=void 0;let s=P(r==="memory"?"runtime-memory-journal":r==="dag"?"runtime-dag-current":"runtime-subagent");if(!s.childElementCount){let o=v("p","small muted",c("正在读取原生运行信息…","Loading native runtime…"));o.setAttribute("role","status"),s.append(o)}let i=AbortSignal.any([t.signal,AbortSignal.timeout(20000)]);Oe.request(`${Ge(e.session.id)}/native-runtime`,void 0,i).catch((o)=>{let a=bc(o);return{tasks:a,dag:a,memory:a}}).then((o)=>{if(!n())return;let a=H(o.tasks);Tt={tasks:a,dag:H(o.dag),memory:H(o.memory),taskIndex:j0(a)},k1("current",Tt.dag),oo(e)}).finally(()=>{if(Gt===t)Gt=void 0})}function zs(e,t=!1){if(e!==O||e.status!=="ready"||!we.open)return;if(ls()){if(t||!sr&&(Gs||!e.detailData))gc(e);Ft?.activate(),Dr?.activate(t)}else sr?.abort(),sr=void 0,Ft?.abort(),Dr?.deactivate();if(so())if(t||!ar&&!Nt)Tv(e);else qa();else Nt?.abort(),Nt=void 0;let n=dn();if(n==="memory"){if(t||!Ks&&!Bn)Rv(e)}else Bn?.abort(),Bn=void 0;if(n){if(t||!Tt&&!Gt)Lv(e);else if(Tt&&!Gt)oo(e)}else Gt?.abort(),Gt=void 0;if(n!=="dag")qn?.abort(),qn=void 0;if(n!=="tasks")Qt?.abort(),Qt=void 0;if(t&&Qi("dag"))Dc(e,"dag");if(Tc()){if(t||!$a)Sv(e)}else if(tr)p1()}function Aa(e){if(!ls())Gs=!0;if(!so())ar=void 0;if(dn()!=="memory")Ks=void 0;if(!dn())Tt=void 0;if(!Tc())$a=!1;zs(e,!0)}function Lc(e){In(!1),to.open(e)}function Iv(){let e=()=>{mt.stop(),In(!1),wc("cli-follow-button")};Y("cli-follow-button").addEventListener("click",()=>{if(mt.active){e();return}In(!1),cs(!1),Sr(!1),mt.start(),Y("cli-follow-stop").focus({preventScroll:!0})}),Y("cli-follow-stop").addEventListener("click",e),Y("cli-history-button").addEventListener("click",()=>Lc()),Y("cli-live-button").addEventListener("click",()=>{mt.stop(),In(!1),Js.open()}),Y("web-branch-button").addEventListener("click",()=>{if(O&&!zn(O.session.id))xc({kind:"web",id:O.session.id,name:O.session.name})}),Y("open-navigation").addEventListener("click",()=>In(!0)),Y("close-navigation").addEventListener("click",()=>In(!1,!0)),Y("nav-scrim").addEventListener("click",()=>In(!1,!0)),Cr=Fp(Bp)==="true",Vi=Fp(kc)!=="closed",zp(),Y("rail-toggle").addEventListener("click",()=>{Cr=!Cr,Cc(Bp,String(Cr)),zp()}),Ps.addEventListener("change",()=>{let i=document.activeElement,o=rn||i===Y("open-navigation")||i===Y("rail-toggle")||P("navigation").contains(i);if(In(!1),o&&!document.querySelector("dialog:modal"))Y(Ps.matches?"open-navigation":"rail-toggle").focus({preventScroll:!0})}),rc(),Us.addEventListener("change",()=>{if(rc(),!Us.matches)b1(O,!0)}),document.addEventListener("close",(i)=>{if(i.target!==we)rc()},!0),new ResizeObserver(_v).observe(ka("composer"));let t=()=>Er.getAttribute("aria-expanded")==="true";Er.addEventListener("click",()=>Sr(!t()));let n=(i)=>{if(t()&&i.target instanceof Node&&!Er.contains(i.target)&&!qs.contains(i.target))Sr(!1)};document.addEventListener("click",n),document.addEventListener("focusin",n),document.addEventListener("keydown",(i)=>{if(i.key!=="Escape"||i.defaultPrevented||i.isComposing||document.querySelector("dialog:modal"))return;if(rn)In(!1,!0);else if(t())Sr(!1),Er.focus({preventScroll:!0});else if(we.open)ya()}),jt("search").addEventListener("input",en),je("workspace-select").addEventListener("change",()=>ov(je("workspace-select").value)),Y("recent").addEventListener("click",()=>{Ar=!1,en()}),Y("archived").addEventListener("click",()=>{Ar=!0,en()}),document.addEventListener("visibilitychange",()=>{if(Wt)Bs(Wt);if(document.hidden||!navigator.onLine||$n||et!=="online")return;if(ss(),O)Ta(O);if(O&&we.open)zs(O,!0)}),window.addEventListener("offline",()=>{js(),ro(),Yi(),an()}),window.addEventListener("online",()=>{if(!$n&&!Wt&&!Ui&&!$s)ln(Rr)}),Y("new-welcome").addEventListener("click",cc),Y("new-sidebar").addEventListener("click",cc),ka("new-form").addEventListener("submit",(i)=>{i.preventDefault(),Ev()});let r=kn("session-path-dialog");for(let i of[Hs,rt,sn,r])for(let o of i.querySelectorAll("[data-close]"))o.addEventListener("click",()=>i.close());Y("session-path-trigger").addEventListener("click",()=>{let i=P("session-path").textContent;if(!i||r.open)return;P("session-path-full").textContent=i,Q(P("session-path-status")),r.showModal()}),Y("session-path-copy").addEventListener("click",async()=>{let i=P("session-path-full"),o=i.textContent;if(!o)return;let a=c("已复制路径。","Path copied.");try{await navigator.clipboard.writeText(o)}catch{a=c("剪贴板不可用。可选中路径手动复制。","Clipboard unavailable. Select and copy the path.")}if(r.open&&i.textContent===o)Q(P("session-path-status"),a)}),Y("manage-button").addEventListener("click",()=>{if(!O||rt.open)return;Q(P("manage-error")),u1(O),rt.showModal(),Se()}),rt.addEventListener("close",Se),Y("manage-handoff").addEventListener("click",()=>{if(O)Av(O)}),Y("handoff-copy").addEventListener("click",async()=>{let i=O;if(!i)return;let o=Pe.get(i.session.id);if(o?.status!=="released")return;try{await navigator.clipboard.writeText(o.command),o.copyStatus=c("已复制命令。","Command copied.")}catch{o.copyStatus=c("剪贴板不可用。可选中命令手动复制。","Clipboard unavailable. Select and copy the command.")}if(O?.session.id===i.session.id&&Pe.get(i.session.id)===o)Se()}),Y("details-button").addEventListener("click",()=>{if(we.open)ya();else wr()}),Y("current-todo").addEventListener("click",()=>wr("todo",Y("current-todo"),"todo"));let s=P("runtime-memory-journal");s.classList.add("fold-body"),P("runtime-memory-branch-content").before(s),Ma().addEventListener("toggle",()=>{if(O&&we.open&&so())zs(O)});for(let i of Rc)io(i).addEventListener("toggle",()=>{if(O&&Qi(i))Dc(O,i);else Fa(i)});P("runtime-metrics").addEventListener("click",(i)=>{if(!(i.target instanceof Element)||!i.target.closest("#runtime-open-resources"))return;os(Y("runtime-open-todo")),Ma().open=!0;let o=P("runtime-resources-title");o.focus({preventScroll:!0}),o.scrollIntoView({block:"start"})});for(let i of hc())i.addEventListener("click",()=>os(i));P("runtime-shortcuts").addEventListener("keydown",(i)=>{let o=hc(),a=o.findIndex((u)=>u===i.target);if(a<0)return;let l=i.key==="Home"?o[0]:i.key==="End"?o.at(-1):i.key==="ArrowLeft"?o[(a+o.length-1)%o.length]:i.key==="ArrowRight"?o[(a+1)%o.length]:void 0;if(!l)return;i.preventDefault(),os(l),l.focus({preventScroll:!0})}),Y("details-refresh").addEventListener("click",()=>{if(!O||!we.open)return;if(dn()==="tasks")Vs.refresh();if(zs(O,!0),ls())Ft?.refresh()}),we.querySelector("[data-close]")?.addEventListener("click",ya),we.addEventListener("cancel",(i)=>{i.preventDefault(),ya()}),Y("command-mode").addEventListener("click",()=>{if(O)d1(O,!Ke(O.session.id).commandMode)}),Y("command-picker").addEventListener("click",()=>{if(O)h1(O)}),Um(sn,jt("command-search"),P("command-list")),sn.addEventListener("close",()=>{if(!sn.open)ns?.abort()}),jt("command-search").addEventListener("input",()=>{if(O&&!ns&&P("command-error").hidden)dc(O)}),Y("retry").addEventListener("click",()=>{if(js(),Yi(),!Rr)Bt="waiting";$n=!1,Pi=yc,lr="",Gi="",an(),ln(!0)}),Y("resume").addEventListener("click",()=>{let i=O;if(!i||Y("resume").disabled)return;let o=Pe.get(i.session.id),a=o?.status==="released"||o?.status==="uncertain";if(i.session.active&&!a){i.status="loading",i.error="",Se(),us(i,!0),Mr(i);return}let l=P("conversation");l.focus(),yn(i,{action:"resume"},c("恢复会话","Resume session"),(u)=>{i.error=u,Se()}).then(()=>{if(i!==O||document.activeElement!==l||document.querySelector("dialog:modal"))return;if(i.status==="ready")He.focus();else if(!P("session-error").hidden)P("session-error").focus()})}),ka("composer").addEventListener("submit",(i)=>{i.preventDefault(),Up()}),He.addEventListener("input",()=>{if(!O)return;let i=Ke(O.session.id);if(i.commandStatus=void 0,i.commandMode)i.commandText=He.value,i.commandError="";else i.text=He.value,i.error="";Se()}),He.addEventListener("keydown",(i)=>{if(zi.key(i))return;if(i.defaultPrevented||i.key!=="Enter"||i.isComposing||i.keyCode===229||zi.composing||i.altKey||!(i.shiftKey||i.ctrlKey||i.metaKey))return;if(i.preventDefault(),!i.repeat)Up()}),He.addEventListener("focus",Se),He.maxLength=200000,He.addEventListener("paste",(i)=>{let o=[...i.clipboardData?.files??[]].filter((a)=>a.type.startsWith("image/"));if(o.length)Pp(o)}),Y("attach").addEventListener("click",()=>jt("files").click()),jt("files").addEventListener("change",(i)=>{let o=i.currentTarget;if(o instanceof HTMLInputElement)Pp([...o.files??[]]),o.value=""}),nr.addEventListener("change",()=>{if(!O)return;Ke(O.session.id).mode=nr.value==="steer"||nr.value==="follow_up"?nr.value:"prompt",Se()}),Y("stop").addEventListener("click",()=>{let i=O;if(i)yn(i,{action:"abort"},c("停止","Stop"),(o)=>{Ke(i.session.id).error=o,Se()})}),Y("sidebar-question").addEventListener("click",()=>{let i=Ia.firstQuestion;if(!i?.isConnected)return;if(we.matches(":modal"))cs(!1);i.tabIndex=-1,i.focus({preventScroll:!0}),i.scrollIntoView({block:"nearest",inline:"nearest"})}),rr.addEventListener("change",()=>{let i=O;if(!i||rr.disabled)return;i.modelSelection=rr.value||void 0,Se()}),ir.addEventListener("click",async()=>{let i=O,o=ve(i?.options.models).map(H).find((a)=>Ut(a)===i?.modelSelection);if(!i||!o||ir.disabled)return;if(await yn(i,{action:"model",provider:C(o.provider),modelId:C(o.id)},c("切换模型","Change model"),(a)=>{Ke(i.session.id).error=a,Se()}),O!==i)return;if(i.modelSelection=void 0,Se(),document.activeElement===document.body||document.activeElement===ir)rr.focus()}),je("thinking").addEventListener("change",()=>{let i=O,o=je("thinking").value;if(i&&o&&!je("thinking").disabled)yn(i,{action:"thinking",level:o},c("切换思考档","Change thinking level"),(a)=>{Ke(i.session.id).error=a,Se()});else Se()}),je("approval").addEventListener("change",()=>{let i=O,o=je("approval").value;if(!i||o!=="ask"&&o!=="auto"&&o!=="full-access"){Se();return}if(o==="full-access"&&!window.confirm(c("关闭此会话的审批?工具默认放行,包括删除文件或对外发送数据。原生权限规则仍有效,用户问题仍需回答。","Turn off approval for this session? Tools can delete files or send data without asking. Native rules and user questions still apply."))){Se();return}yn(i,{action:"preset",preset:o},c("切换审批模式","Change approval mode"),(a)=>{Ke(i.session.id).error=a,Se()})})}rv();sv();Iv();ln();
|