const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DgL0RwuR.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-DtEQuh-b.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-UfJy6YNI.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-Dm6A9KJ5.js","assets/ruby-DyJCeAvU.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-DbPARsA_.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-D7OTSIA_.js","assets/r-Dspwwk_N.js","assets/just-CUsbIsdP.js","assets/perl-B9cMNwum.js","assets/latex-CaSxy8MP.js","assets/tex-idrVyKtj.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/php-Csjmro_R.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/csharp-DSvCPggb.js","assets/rst-CpCqk9r5.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/go-C27-OAKa.js","assets/ts-tags-D351s5mN.js","assets/twig-CW1WmMYd.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js","assets/dialog-select-directory-v2-C8_xnnf1.js","assets/dialog-select-directory-v2-BLfZvzPV.css","assets/index-gjtUcZNI.js","assets/row-CdsZrN-0.js","assets/LROKH5N7-C1bXvYhT.js","assets/row-4laMsQTM.css","assets/settings-keybinds-C1AyOOxR.js","assets/list-CzCy_GSj.js","assets/dialog-connect-provider-xuWHcYrf.js","assets/index-Bd5IF--R.css","assets/dialog-settings-BNF4kY0-.js","assets/switch-CFXzCjEu.js","assets/dialog-edit-project-CSekpgh4.js","assets/edit-project-DDqlmVg7.js","assets/status-popover-body-q-Kf3s4V.js","assets/mcp-BI0ph9mP.js","assets/dialog-manage-models-BE1s1Jzj.js","assets/dialog-select-file-BvUjcpTa.js","assets/dialog-command-palette-v2-BCwV_yb5.js","assets/dialog-command-palette-v2-CTGIdC2q.css","assets/dialog-select-mcp-CXZmLMBh.js","assets/dialog-edit-project-v2-DIDOubx3.js","assets/dialog-edit-project-v2-D9qNnyx9.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const tn={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return hD(this.context.count)},getNextContextId(){return hD(this.context.count++)}};function hD(e){const t=String(e),n=t.length-1;return tn.context.id+(n?String.fromCharCode(96+n):"")+t}function Mc(e){tn.context=e}const $V=!1,Hie=(e,t)=>e===t,gl=Symbol("solid-proxy"),PV=typeof Proxy=="function",Wp=Symbol("solid-track"),W2={equals:Hie};let xp=null,OV=VV;const Va=1,Kp=2,RV={owned:null,cleanups:null,context:null,owner:null},o3={};var $n=null;let Pt=null,jie=null,yr=null,zs=null,fs=null,Ox=0;function Kr(e,t){const n=yr,r=$n,i=e.length===0,s=t===void 0?r:t,o=i?RV:{owned:null,cleanups:null,context:s?s.context:null,owner:s},a=i?e:()=>e(()=>jt(()=>rd(o)));$n=o,yr=null;try{return Uo(a,!0)}finally{yr=n,$n=r}}function De(e,t){t=t?Object.assign({},W2,t):W2;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(Pt&&Pt.running&&Pt.sources.has(n)?i=i(n.tValue):i=i(n.value)),NV(n,i));return[FV.bind(n),r]}function Hs(e,t,n){const r=o1(e,t,!0,Va);gg(r)}function ge(e,t,n){const r=o1(e,t,!1,Va);gg(r)}function ae(e,t,n){OV=Gie;const r=o1(e,t,!1,Va),i=$f&&hn($f);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),fs?fs.push(r):gg(r)}function I(e,t,n){n=n?Object.assign({},W2,n):W2;const r=o1(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,gg(r),FV.bind(r)}function Bie(e){return e&&typeof e=="object"&&"then"in e}function wi(e,t,n){let r,i,s;typeof t=="function"?(r=e,i=t,s=n||{}):(r=!0,i=e,s=t||{});let o=null,a=o3,l=null,c=!1,u=!1,d="initialValue"in s,f=typeof r=="function"&&I(r);const m=new Set,[g,p]=(s.storage||De)(s.initialValue),[y,v]=De(void 0),[b,w]=De(void 0,{equals:!1}),[x,k]=De(d?"ready":"unresolved");tn.context&&(l=tn.getNextContextId(),s.ssrLoadFrom==="initial"?a=s.initialValue:tn.load&&tn.has(l)&&(a=tn.load(l)));function _(V,F,D,T){return o===V&&(o=null,T!==void 0&&(d=!0),(V===a||F===a)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(T,{value:F})),a=o3,Pt&&V&&c?(Pt.promises.delete(V),c=!1,Uo(()=>{Pt.running=!0,E(F,D)},!1)):E(F,D)),F}function E(V,F){Uo(()=>{F===void 0&&p(()=>V),k(F!==void 0?"errored":d?"ready":"unresolved"),v(F);for(const D of m.keys())D.decrement();m.clear()},!1)}function C(){const V=$f&&hn($f),F=g(),D=y();if(D!==void 0&&!o)throw D;return yr&&!yr.user&&V&&Hs(()=>{b(),o&&(V.resolved&&Pt&&c?Pt.promises.add(o):m.has(V)||(V.increment(),m.add(V)))}),F}function L(V=!0){if(V!==!1&&u)return;u=!1;const F=f?f():r;if(c=Pt&&Pt.running,F==null||F===!1){_(o,jt(g));return}Pt&&o&&Pt.promises.delete(o);let D;const T=a!==o3?a:jt(()=>{try{return i(F,{value:g(),refetching:V})}catch(M){D=M}});if(D!==void 0){_(o,void 0,e2(D),F);return}else if(!Bie(T))return _(o,T,void 0,F),T;return o=T,"v"in T?(T.s===1?_(o,T.v,void 0,F):_(o,void 0,e2(T.v),F),T):(u=!0,queueMicrotask(()=>u=!1),Uo(()=>{k(d?"refreshing":"pending"),w()},!1),T.then(M=>_(T,M,void 0,F),M=>_(T,void 0,e2(M),F)))}Object.defineProperties(C,{state:{get:()=>x()},error:{get:()=>y()},loading:{get(){const V=x();return V==="pending"||V==="refreshing"}},latest:{get(){if(!d)return C();const V=y();if(V&&!o)throw V;return g()}}});let O=$n;return f?Hs(()=>(O=$n,L(!1))):L(!1),[C,{refetch:V=>$c(O,()=>L(V)),mutate:p}]}function Ut(e){return Uo(e,!1)}function jt(e){if(yr===null)return e();const t=yr;yr=null;try{return e()}finally{yr=t}}function pt(e,t,n){const r=Array.isArray(e);let i,s=n&&n.defer;return o=>{let a;if(r){a=Array(e.length);for(let c=0;ct(a,i,o));return i=a,l}}function sn(e){ae(()=>jt(e))}function _e(e){return $n===null||($n.cleanups===null?$n.cleanups=[e]:$n.cleanups.push(e)),e}function qie(e,t){xp||(xp=Symbol("error")),$n=o1(void 0,void 0,!0),$n.context={...$n.context,[xp]:[t]},Pt&&Pt.running&&Pt.sources.add($n);try{return e()}catch(n){a1(n)}finally{$n=$n.owner}}function tS(){return yr}function Bs(){return $n}function $c(e,t){const n=$n,r=yr;$n=e,yr=null;try{return Uo(t,!0)}catch(i){a1(i)}finally{$n=n,yr=r}}function Xs(e){if(Pt&&Pt.running)return e(),Pt.done;const t=yr,n=$n;return Promise.resolve().then(()=>{yr=t,$n=n;let r;return $f&&(r=Pt||(Pt={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(i=>r.resolve=i)),r.running=!0),Uo(e,!1),yr=$n=null,r?r.done:void 0})}const[Edt,mD]=De(!1);function Uie(e){fs.push.apply(fs,e),e.length=0}function kn(e,t){const n=Symbol("context");return{id:n,Provider:Zie(n),defaultValue:e}}function hn(e){let t;return $n&&$n.context&&(t=$n.context[e.id])!==void 0?t:e.defaultValue}function Yl(e){const t=I(e),n=I(()=>nS(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let $f;function Wie(){return $f||($f=kn())}function FV(){const e=Pt&&Pt.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Va)gg(this);else{const t=zs;zs=null,Uo(()=>G2(this),!1),zs=t}if(yr){const t=this.observers?this.observers.length:0;yr.sources?(yr.sources.push(this),yr.sourceSlots.push(t)):(yr.sources=[this],yr.sourceSlots=[t]),this.observers?(this.observers.push(yr),this.observerSlots.push(yr.sources.length-1)):(this.observers=[yr],this.observerSlots=[yr.sources.length-1])}return e&&Pt.sources.has(this)?this.tValue:this.value}function NV(e,t,n){let r=Pt&&Pt.running&&Pt.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(Pt){const i=Pt.running;(i||!n&&Pt.sources.has(e))&&(Pt.sources.add(e),e.tValue=t),i||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&Uo(()=>{for(let i=0;i1e6)throw zs=[],new Error},!1)}return t}function gg(e){if(!e.fn)return;rd(e);const t=Ox;gD(e,Pt&&Pt.running&&Pt.sources.has(e)?e.tValue:e.value,t),Pt&&!Pt.running&&Pt.sources.has(e)&&queueMicrotask(()=>{Uo(()=>{Pt&&(Pt.running=!0),yr=$n=e,gD(e,e.tValue,t),yr=$n=null},!1)})}function gD(e,t,n){let r;const i=$n,s=yr;yr=$n=e;try{r=e.fn(t)}catch(o){return e.pure&&(Pt&&Pt.running?(e.tState=Va,e.tOwned&&e.tOwned.forEach(rd),e.tOwned=void 0):(e.state=Va,e.owned&&e.owned.forEach(rd),e.owned=null)),e.updatedAt=n+1,a1(o)}finally{yr=s,$n=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?NV(e,r,!0):Pt&&Pt.running&&e.pure?(Pt.sources.has(e)||(e.value=r),Pt.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function o1(e,t,n,r=Va,i){const s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:$n,context:$n?$n.context:null,pure:n};return Pt&&Pt.running&&(s.state=0,s.tState=r),$n===null||$n!==RV&&(Pt&&Pt.running&&$n.pure?$n.tOwned?$n.tOwned.push(s):$n.tOwned=[s]:$n.owned?$n.owned.push(s):$n.owned=[s]),s}function K2(e){const t=Pt&&Pt.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Kp)return G2(e);if(e.suspense&&jt(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;r--){if(e=n[r],t){let i=e,s=n[r+1];for(;(i=i.owner)&&i!==s;)if(Pt.disposed.has(i))return}if((t?e.tState:e.state)===Va)gg(e);else if((t?e.tState:e.state)===Kp){const i=zs;zs=null,Uo(()=>G2(e,n[0]),!1),zs=i}}}function Uo(e,t){if(zs)return e();let n=!1;t||(zs=[]),fs?n=!0:fs=[],Ox++;try{const r=e();return Kie(n),r}catch(r){n||(fs=null),zs=null,a1(r)}}function Kie(e){if(zs&&(VV(zs),zs=null),e)return;let t;if(Pt){if(!Pt.promises.size&&!Pt.queue.size){const r=Pt.sources,i=Pt.disposed;fs.push.apply(fs,Pt.effects),t=Pt.resolve;for(const s of fs)"tState"in s&&(s.state=s.tState),delete s.tState;Pt=null,Uo(()=>{for(const s of i)rd(s);for(const s of r){if(s.value=s.tValue,s.owned)for(let o=0,a=s.owned.length;oOV(n),!1),t&&t()}function VV(e){for(let t=0;t=0;t--)rd(e.tOwned[t]);delete e.tOwned}if(Pt&&Pt.running&&e.pure)HV(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)rd(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}Pt&&Pt.running?e.tState=0:e.state=0}function HV(e,t){if(t||(e.tState=0,Pt.disposed.add(e)),e.owned)for(let n=0;ni=jt(()=>($n.context={...$n.context,[e]:r.value},Yl(()=>r.children))),void 0),i}}const rS=Symbol("fallback");function Z2(e){for(let t=0;t1?[]:null;return _e(()=>Z2(s)),()=>{let l=e()||[],c=l.length,u,d;return l[Wp],jt(()=>{let m,g,p,y,v,b,w,x,k;if(c===0)o!==0&&(Z2(s),s=[],r=[],i=[],o=0,a&&(a=[])),n.fallback&&(r=[rS],i[0]=Kr(_=>(s[0]=_,n.fallback())),o=1);else if(o===0){for(i=new Array(c),d=0;d=b&&x>=b&&r[w]===l[x];w--,x--)p[x]=i[w],y[x]=s[w],a&&(v[x]=a[w]);for(m=new Map,g=new Array(x+1),d=x;d>=b;d--)k=l[d],u=m.get(k),g[d]=u===void 0?-1:u,m.set(k,d);for(u=b;u<=w;u++)k=r[u],d=m.get(k),d!==void 0&&d!==-1?(p[d]=i[u],y[d]=s[u],a&&(v[d]=a[u]),d=g[d],m.set(k,d)):s[u]();for(d=b;dZ2(s)),()=>{const c=e()||[],u=c.length;return c[Wp],jt(()=>{if(u===0)return a!==0&&(Z2(s),s=[],r=[],i=[],a=0,o=[]),n.fallback&&(r=[rS],i[0]=Kr(f=>(s[0]=f,n.fallback())),a=1),i;for(r[0]===rS&&(s[0](),s=[],r=[],i=[],a=0),l=0;lc[l]):l>=r.length&&(i[l]=Kr(d));for(;le(t||{}))}function gy(){return!0}const iS={get(e,t,n){return t===gl?n:e.get(t)},has(e,t){return t===gl?!0:e.has(t)},set:gy,deleteProperty:gy,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:gy,deleteProperty:gy}},ownKeys(e){return e.keys()}};function a3(e){return(e=typeof e=="function"?e():e)?e:{}}function Xie(){for(let e=0,t=this.length;e=0;a--){const l=a3(e[a])[o];if(l!==void 0)return l}},has(o){for(let a=e.length-1;a>=0;a--)if(o in a3(e[a]))return!0;return!1},keys(){const o=[];for(let a=0;a=0;o--){const a=e[o];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let c=l.length-1;c>=0;c--){const u=l[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,u);if(!r[u])r[u]=d.get?{enumerable:!0,configurable:!0,get:Xie.bind(n[u]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[u];f&&(d.get?f.push(d.get.bind(a)):d.value!==void 0&&f.push(()=>d.value))}}}const i={},s=Object.keys(r);for(let o=s.length-1;o>=0;o--){const a=s[o],l=r[a];l&&l.get?Object.defineProperty(i,a,l):i[a]=l?l.value:void 0}return i}function Se(e,...t){const n=t.length;if(PV&&gl in e){const i=n>1?t.flat():t[0],s=t.map(o=>new Proxy({get(a){return o.includes(a)?e[a]:void 0},has(a){return o.includes(a)&&a in e},keys(){return o.filter(a=>a in e)}},iS));return s.push(new Proxy({get(o){return i.includes(o)?void 0:e[o]},has(o){return i.includes(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!i.includes(o))}},iS)),s}const r=[];for(let i=0;i<=n;i++)r[i]={};for(const i of Object.getOwnPropertyNames(e)){let s=n;for(let l=0;l{const s=tn.context;if(s){const[a,l]=De();tn.count||(tn.count=0),tn.count++,(n||(n=e())).then(c=>{!tn.done&&Mc(s),tn.count--,l(()=>c.default),Mc()}),t=a}else if(!t){const[a]=wi(()=>(n||(n=e())).then(l=>l.default));t=a}let o;return I(()=>(o=t())?jt(()=>{if(!s||tn.done)return o(i);const a=tn.context;Mc(s);const l=o(i);return Mc(a),l}):"")};return r.preload=()=>n||((n=e()).then(i=>t=()=>i.default),n),r}let Qie=0;function er(){return tn.context?tn.getNextContextId():`cl-${Qie++}`}const BV=e=>`Stale read from <${e}>.`;function Dt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return I(jV(()=>e.each,e.children,t||void 0))}function eh(e){const t="fallback"in e&&{fallback:()=>e.fallback};return I(Yie(()=>e.each,e.children,t||void 0))}function j(e){const t=e.keyed,n=I(()=>e.when,void 0,void 0),r=t?n:I(n,void 0,{equals:(i,s)=>!i==!s});return I(()=>{const i=r();if(i){const s=e.children;return typeof s=="function"&&s.length>0?jt(()=>s(t?i:()=>{if(!jt(r))throw BV("Show");return n()})):s}return e.fallback},void 0,void 0)}function Vr(e){const t=Yl(()=>e.children),n=I(()=>{const r=t(),i=Array.isArray(r)?r:[r];let s=()=>{};for(let o=0;oc()?void 0:l.when,void 0,void 0),d=l.keyed?u:I(u,void 0,{equals:(f,m)=>!f==!m});s=()=>c()||(d()?[a,u,l]:void 0)}return s});return I(()=>{const r=n()();if(!r)return e.fallback;const[i,s,o]=r,a=o.children;return typeof a=="function"&&a.length>0?jt(()=>a(o.keyed?s():()=>{if(jt(n)()?.[0]!==i)throw BV("Match");return s()})):a},void 0,void 0)}function Vt(e){return e}let mm;function Jie(){mm&&[...mm].forEach(e=>e())}function K8(e){let t;tn.context&&tn.load&&(t=tn.load(tn.getContextId()));const[n,r]=De(t,void 0);return mm||(mm=new Set),mm.add(r),_e(()=>mm.delete(r)),I(()=>{let i;if(i=n()){const s=e.fallback;return typeof s=="function"&&s.length?jt(()=>s(i,()=>r())):s}return qie(()=>e.children,r)},void 0,void 0)}const ese=kn();function G8(e){let t=0,n,r,i,s,o;const[a,l]=De(!1),c=Wie(),u={increment:()=>{++t===1&&l(!0)},decrement:()=>{--t===0&&l(!1)},inFallback:a,effects:[],resolved:!1},d=Bs();if(tn.context&&tn.load){const g=tn.getContextId();let p=tn.load(g);if(p&&(typeof p!="object"||p.s!==1?i=p:tn.gather(g)),i&&i!=="$$f"){const[y,v]=De(void 0,{equals:!1});s=y,i.then(()=>{if(tn.done)return v();tn.gather(g),Mc(r),v(),Mc()},b=>{o=b,v()})}}const f=hn(ese);f&&(n=f.register(u.inFallback));let m;return _e(()=>m&&m()),h(c.Provider,{value:u,get children(){return I(()=>{if(o)throw o;if(r=tn.context,s)return s(),s=void 0;r&&i==="$$f"&&Mc();const g=I(()=>e.children);return I(p=>{const y=u.inFallback(),{showContent:v=!0,showFallback:b=!0}=n?n():{};if((!y||i&&i!=="$$f")&&v)return u.resolved=!0,m&&m(),m=r=i=void 0,Uie(u.effects),g();if(b)return m?p:Kr(w=>(m=w,r&&(Mc({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const tse=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],nse=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...tse]),rse=new Set(["innerHTML","textContent","innerText","children"]),ise=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),sse=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function ose(e,t){const n=sse[e];return typeof n=="object"?n[t]?n.$:void 0:n}const ase=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),lse=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),cse={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},we=e=>I(()=>e());function use(e,t,n){let r=n.length,i=t.length,s=r,o=0,a=0,l=t[i-1].nextSibling,c=null;for(;ou-a){const g=t[o];for(;a{i=s,t===document?e():S(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function $(e,t,n,r){let i;const s=()=>{const a=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return a.innerHTML=e,n?a.content.firstChild.firstChild:r?a.firstChild:a.content.firstChild},o=t?()=>jt(()=>document.importNode(i||(i=s()),!0)):()=>(i||(i=s())).cloneNode(!0);return o.cloneNode=o,o}function mn(e,t=window.document){const n=t[vD]||(t[vD]=new Set);for(let r=0,i=e.length;ri.call(e,n[1],s))}else e.addEventListener(t,n,typeof n!="function"&&n)}function ct(e,t,n={}){const r=Object.keys(t||{}),i=Object.keys(n);let s,o;for(s=0,o=i.length;si.children=Gp(e,t.children,i.children)),ge(()=>typeof t.ref=="function"&>(t.ref,e)),ge(()=>hse(e,t,n,!0,i,!0)),i}function gt(e,t,n){return jt(()=>e(t,n))}function S(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Gp(e,t,r,n);ge(i=>Gp(e,t(),i,n),r)}function hse(e,t,n,r,i={},s=!1){t||(t={});for(const o in i)if(!(o in t)){if(o==="children")continue;i[o]=bD(e,o,null,i[o],n,s,t)}for(const o in t){if(o==="children")continue;const a=t[o];i[o]=bD(e,o,a,i[o],n,s,t)}}function mse(e){let t,n;return!th()||!(t=tn.registry.get(n=vse()))?e():(tn.completed&&tn.completed.add(t),tn.registry.delete(n),t)}function th(e){return!!tn.context&&!tn.done&&(!e||e.isConnected)}function gse(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function yD(e,t,n){const r=t.trim().split(/\s+/);for(let i=0,s=r.length;i-1&&cse[t.split(":")[0]];f?dse(e,f,t,n):pe(e,ise[t]||t,n)}return n}function pse(e){if(tn.registry&&tn.events&&tn.events.find(([l,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,i=e.currentTarget,s=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),o=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},a=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),tn.registry&&!tn.done&&(tn.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();s(l[0]);for(let c=0;c{let l=t();for(;typeof l=="function";)l=l();n=Gp(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],c=n&&Array.isArray(n);if(sS(l,t,n,i))return ge(()=>n=Gp(e,l,n,r,!0)),()=>n;if(s){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let u=l[0];if(u.parentNode!==e)return n;const d=[u];for(;(u=u.nextSibling)!==r;)d.push(u);return n=d}if(l.length===0){if(n=Dh(e,n,r),a)return n}else c?n.length===0?wD(e,l,r):use(e,n,l):(n&&Dh(e),wD(e,l));n=l}else if(t.nodeType){if(s&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=Dh(e,n,r,t);Dh(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function sS(e,t,n,r){let i=!1;for(let s=0,o=t.length;s=0;o--){const a=t[o];if(i!==a){const l=a.parentNode===e;!s&&!o?l?e.replaceChild(i,a):e.insertBefore(i,n):l&&a.remove()}else s=!0}}else e.insertBefore(i,n);return[i]}function vse(){return tn.getNextContextId()}const oS=!1,yse="http://www.w3.org/2000/svg";function qV(e,t=!1,n=void 0){return t?document.createElementNS(yse,e):document.createElement(e,{is:n})}function To(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,i=Bs();let s,o=!!tn.context;return ae(()=>{o&&(Bs().user=o=!1),s||(s=$c(i,()=>I(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,c]=De(!1),u=()=>c(!0);Kr(d=>S(a,()=>l()?d():s(),null)),_e(u)}else{const l=qV(e.isSVG?"g":"div",e.isSVG),c=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),S(c,s),a.appendChild(l),e.ref&&e.ref(l),_e(()=>a.removeChild(l))}},void 0,{render:!o}),n}function bse(e,t){const n=I(e);return I(()=>{const r=n();switch(typeof r){case"function":return jt(()=>r(t));case"string":const i=lse.has(r),s=tn.context?mse():qV(r,i,jt(()=>t.is));return Pn(s,t,i),s}})}function Qi(e){const[,t]=Se(e,["component"]);return bse(()=>e.component,t)}const zn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ir=globalThis,Ef="10.36.0";function Fx(){return Nx(Ir),Ir}function Nx(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ef,t[Ef]=t[Ef]||{}}function pg(e,t,n=Ir){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[Ef]=r[Ef]||{};return i[e]||(i[e]=t())}const wse=["debug","info","warn","error","log","assert","trace"],xse="Sentry Logger ",Y2={};function vg(e){if(!("console"in Ir))return e();const t=Ir.console,n={},r=Object.keys(Y2);r.forEach(i=>{const s=Y2[i];n[i]=t[i],t[i]=s});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function kse(){X8().enabled=!0}function Sse(){X8().enabled=!1}function UV(){return X8().enabled}function _se(...e){Y8("log",...e)}function Cse(...e){Y8("warn",...e)}function Tse(...e){Y8("error",...e)}function Y8(e,...t){zn&&UV()&&vg(()=>{Ir.console[e](`${xse}[${e}]:`,...t)})}function X8(){return zn?pg("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const En={enable:kse,disable:Sse,isEnabled:UV,log:_se,warn:Cse,error:Tse},WV=50,Pf="?",xD=/\(error: (.*)\)/,kD=/captureMessage|captureException/;function KV(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{const s=[],o=n.split(` `);for(let a=r;a1024&&(l=l.slice(0,1024));const c=xD.test(l)?l.replace(xD,"$1"):l;if(!c.match(/\S*Error: /)){for(const u of t){const d=u(c);if(d){s.push(d);break}}if(s.length>=WV+i)break}}return Ise(s.slice(i))}}function Ese(e){return Array.isArray(e)?KV(...e):e}function Ise(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(py(t).function||"")&&t.pop(),t.reverse(),kD.test(py(t).function||"")&&(t.pop(),kD.test(py(t).function||"")&&t.pop()),t.slice(0,WV).map(n=>({...n,filename:n.filename||py(t).filename,function:n.function||Pf}))}function py(e){return e[e.length-1]||{}}const l3="";function id(e){try{return!e||typeof e!="function"?l3:e.name||l3}catch{return l3}}function SD(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function GV(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const t2={},_D={};function nh(e,t){t2[e]=t2[e]||[],t2[e].push(t)}function rh(e,t){if(!_D[e]){_D[e]=!0;try{t()}catch(n){zn&&En.error(`Error while instrumenting ${e}`,n)}}}function ll(e,t){const n=e&&t2[e];if(n)for(const r of n)try{r(t)}catch(i){zn&&En.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${id(r)} Error:`,i)}}let c3=null;function Dse(e){const t="error";nh(t,e),rh(t,Ase)}function Ase(){c3=Ir.onerror,Ir.onerror=function(e,t,n,r,i){return ll("error",{column:r,error:i,line:n,msg:e,url:t}),c3?c3.apply(this,arguments):!1},Ir.onerror.__SENTRY_INSTRUMENTED__=!0}let u3=null;function Lse(e){const t="unhandledrejection";nh(t,e),rh(t,Mse)}function Mse(){u3=Ir.onunhandledrejection,Ir.onunhandledrejection=function(e){return ll("unhandledrejection",e),u3?u3.apply(this,arguments):!0},Ir.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const ZV=Object.prototype.toString;function Vx(e){switch(ZV.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return sd(e,Error)}}function yg(e,t){return ZV.call(e)===`[object ${t}]`}function YV(e){return yg(e,"ErrorEvent")}function CD(e){return yg(e,"DOMError")}function $se(e){return yg(e,"DOMException")}function jc(e){return yg(e,"String")}function Q8(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function zx(e){return e===null||Q8(e)||typeof e!="object"&&typeof e!="function"}function Zp(e){return yg(e,"Object")}function Hx(e){return typeof Event<"u"&&sd(e,Event)}function Pse(e){return typeof Element<"u"&&sd(e,Element)}function Ose(e){return yg(e,"RegExp")}function l1(e){return!!(e?.then&&typeof e.then=="function")}function Rse(e){return Zp(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function sd(e,t){try{return e instanceof t}catch{return!1}}function XV(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function QV(e){return typeof Request<"u"&&sd(e,Request)}const J8=Ir,Fse=80;function JV(e,t={}){if(!e)return"";try{let n=e;const r=5,i=[];let s=0,o=0;const a=" > ",l=a.length;let c;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||Fse;for(;n&&s++1&&o+i.length*l+c.length>=d));)i.push(c),o+=c.length,n=n.parentNode;return i.reverse().join(a)}catch{return""}}function Nse(e,t){const n=e,r=[];if(!n?.tagName)return"";if(J8.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t?.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(i?.length)i.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&jc(o)){const a=o.split(/\s+/);for(const l of a)r.push(`.${l}`)}}const s=["aria-label","type","name","title","alt"];for(const o of s){const a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function eC(){try{return J8.document.location.href}catch{return""}}function Vse(e){if(!J8.HTMLElement)return null;let t=e;const n=5;for(let r=0;r"}}function ED(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function zse(e){const t=Object.keys(tz(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let Ah;function jx(e){if(Ah!==void 0)return Ah?Ah(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=Ir;return t in n&&typeof n[t]=="function"?(Ah=n[t],Ah(e)):(Ah=null,e())}function X2(){return jx(()=>Math.random())}function Bx(){return jx(()=>Date.now())}function aS(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ID(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;rn2(e,r,n))}function Hse(){const e=Ir;return e.crypto||e.msCrypto}let d3;function jse(){return X2()*16}function Pa(e=Hse()){try{if(e?.randomUUID)return jx(()=>e.randomUUID()).replace(/-/g,"")}catch{}return d3||(d3="10000000100040008000"+1e11),d3.replace(/[018]/g,t=>(t^(jse()&15)>>t/4).toString(16))}function nz(e){return e.exception?.values?.[0]}function hf(e){const{message:t,event_id:n}=e;if(t)return t;const r=nz(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function lS(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function Bm(e,t){const n=nz(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const s={...i?.data,...t.data};n.mechanism.data=s}}function DD(e){if(Bse(e))return!0;try{od(e,"__sentry_captured__",!0)}catch{}return!1}function Bse(e){try{return e.__sentry_captured__}catch{}}const rz=1e3;function c1(){return Bx()/rz}function qse(){const{performance:e}=Ir;if(!e?.now||!e.timeOrigin)return c1;const t=e.timeOrigin;return()=>(t+jx(()=>e.now()))/rz}let AD;function Bc(){return(AD??(AD=qse()))()}function Use(e){const t=Bc(),n={sid:Pa(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Kse(n)};return e&&qm(n,e),n}function qm(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Bc(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Pa()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Wse(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),qm(e,n)}function Kse(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function u1(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=u1(r[i],t[i],n-1));return r}function LD(){return Pa()}function iz(){return Pa().substring(16)}const cS="_sentrySpan";function MD(e,t){t?od(e,cS,t):delete e[cS]}function $D(e){return e[cS]}const Gse=100;class Yc{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:LD(),sampleRand:X2()}}clone(){const t=new Yc;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,MD(t,$D(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&qm(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof Yc?n.getScopeData():Zp(n)?t:void 0,{tags:i,attributes:s,extra:o,user:a,contexts:l,level:c,fingerprint:u=[],propagationContext:d}=r||{};return this._tags={...this._tags,...i},this._attributes={...this._attributes,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,MD(this,void 0),this._attachments=[],this.setPropagationContext({traceId:LD(),sampleRand:X2()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Gse;if(r<=0)return this;const i={timestamp:c1(),...t,message:t.message?aS(t.message,2048):t.message};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:$D(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=u1(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||Pa();if(!this._client)return zn&&En.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r?.event_id||Pa();if(!this._client)return zn&&En.warn("No client configured on scope - will not capture message!"),i;const s=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:i},this),i}captureEvent(t,n){const r=n?.event_id||Pa();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(zn&&En.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function Zse(){return pg("defaultCurrentScope",()=>new Yc)}function Yse(){return pg("defaultIsolationScope",()=>new Yc)}class Xse{constructor(t,n){let r;t?r=t:r=new Yc;let i;n?i=n:i=new Yc,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return l1(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Um(){const e=Fx(),t=Nx(e);return t.stack=t.stack||new Xse(Zse(),Yse())}function Qse(e){return Um().withScope(e)}function Jse(e,t){const n=Um();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function PD(e){return Um().withScope(()=>e(Um().getIsolationScope()))}function eoe(){return{withIsolationScope:PD,withScope:Qse,withSetScope:Jse,withSetIsolationScope:(e,t)=>PD(t),getCurrentScope:()=>Um().getScope(),getIsolationScope:()=>Um().getIsolationScope()}}function nC(e){const t=Nx(e);return t.acs?t.acs:eoe()}function Cd(){const e=Fx();return nC(e).getCurrentScope()}function d1(){const e=Fx();return nC(e).getIsolationScope()}function toe(){return pg("globalScope",()=>new Yc)}function noe(...e){const t=Fx(),n=nC(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Es(){return Cd().getClient()}function roe(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,s={trace_id:n,span_id:i||iz()};return r&&(s.parent_span_id=r),s}const ioe="sentry.source",soe="sentry.sample_rate",ooe="sentry.previous_trace_sample_rate",aoe="sentry.op",loe="sentry.origin",sz="sentry.profile_id",oz="sentry.exclusive_time",coe=0,uoe=1,doe="_sentryScope",foe="_sentryIsolationScope";function hoe(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function az(e){const t=e;return{scope:t[doe],isolationScope:hoe(t[foe])}}const moe="sentry-",goe=/^sentry-/;function poe(e){const t=voe(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,s])=>{if(i.match(goe)){const o=i.slice(moe.length);r[o]=s}return r},{});if(Object.keys(n).length>0)return n}function voe(e){if(!(!e||!jc(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=OD(n);return Object.entries(r).forEach(([i,s])=>{t[i]=s}),t},{}):OD(e)}function OD(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),i=t.slice(n+1);return[r,i].map(s=>{try{return decodeURIComponent(s.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}const yoe=/^o(\d+)\./,boe=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function woe(e){return e==="http"||e==="https"}function f1(e,t=!1){const{host:n,path:r,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${o}`}function xoe(e){const t=boe.exec(e);if(!t){vg(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",s="",o="",a=""]=t.slice(1);let l="",c=a;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const d=c.match(/^\d+/);d&&(c=d[0])}return lz({host:s,pass:i,path:l,projectId:c,port:o,protocol:n,publicKey:r})}function lz(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function koe(e){if(!zn)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(En.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?woe(r)?t&&isNaN(parseInt(t,10))?(En.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(En.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(En.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Soe(e){return e.match(yoe)?.[1]}function _oe(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=Soe(n)),r}function Coe(e){const t=typeof e=="string"?xoe(e):lz(e);if(!(!t||!koe(t)))return t}function Toe(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const cz=1;let RD=!1;function Eoe(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:rC(e).parent_span_id,s=az(e).scope,o=r?s?.getPropagationContext().propagationSpanId||iz():t;return{parent_span_id:i,span_id:o,trace_id:n}}function Ioe(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...i},attributes:s})=>({span_id:t,trace_id:n,sampled:r===cz,attributes:s,...i}))}function FD(e){return typeof e=="number"?ND(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ND(e.getTime()):Bc()}function ND(e){return e>9999999999?e/1e3:e}function rC(e){if(Aoe(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(Doe(e)){const{attributes:r,startTime:i,name:s,endTime:o,status:a,links:l}=e,c="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:c,start_timestamp:FD(i),timestamp:FD(o)||void 0,status:Moe(a),op:r[aoe],origin:r[loe],links:Ioe(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Doe(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Aoe(e){return typeof e.getSpanJSON=="function"}function Loe(e){const{traceFlags:t}=e.spanContext();return t===cz}function Moe(e){if(!(!e||e.code===coe))return e.code===uoe?"ok":e.message||"internal_error"}const $oe="_sentryRootSpan";function uz(e){return e[$oe]||e}function VD(){RD||(vg(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),RD=!0)}function Poe(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Es()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function zD(e){En.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function HD(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(Roe(n)){if(n2(e.description,n))return zn&&zD(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?n2(e.description,n.name):!0,i=n.op?e.op&&n2(e.op,n.op):!0;if(r&&i)return zn&&zD(e),!0}return!1}function Ooe(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const i of e)i.parent_span_id===r&&(i.parent_span_id=n)}function Roe(e){return typeof e=="string"||e instanceof RegExp}const iC="production",Foe="_frozenDsc";function dz(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||iC,release:n.release,public_key:r,trace_id:e,org_id:_oe(t)};return t.emit("createDsc",i),i}function Noe(e,t){const n=t.getPropagationContext();return n.dsc||dz(n.traceId,e)}function Voe(e){const t=Es();if(!t)return{};const n=uz(e),r=rC(n),i=r.data,s=n.spanContext().traceState,o=s?.get("sentry.sample_rate")??i[soe]??i[ooe];function a(g){return(typeof o=="number"||typeof o=="string")&&(g.sample_rate=`${o}`),g}const l=n[Foe];if(l)return a(l);const c=s?.get("sentry.dsc"),u=c&&poe(c);if(u)return a(u);const d=dz(e.spanContext().traceId,t),f=i[ioe],m=r.description;return f!=="url"&&m&&(d.transaction=m),Poe()&&(d.sampled=String(Loe(n)),d.sample_rand=s?.get("sentry.sample_rand")??az(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}function Tc(e,t=100,n=1/0){try{return uS("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function fz(e,t=3,n=100*1024){const r=Tc(e,t);return Boe(r)>n?fz(e,t-1,n):r}function uS(e,t,n=1/0,r=1/0,i=qoe()){const[s,o]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=zoe(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(s(t))return"[Circular ~]";const c=t;if(c&&typeof c.toJSON=="function")try{const m=c.toJSON();return uS("",m,l-1,r,i)}catch{}const u=Array.isArray(t)?[]:{};let d=0;const f=tz(t);for(const m in f){if(!Object.prototype.hasOwnProperty.call(f,m))continue;if(d>=r){u[m]="[MaxProperties ~]";break}const g=f[m];u[m]=uS(m,g,l-1,r,i),d++}return o(t),u}function zoe(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(XV(t))return GV(t);if(Rse(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${id(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=Hoe(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Hoe(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function joe(e){return~-encodeURI(e).split(/%..|./).length}function Boe(e){return joe(JSON.stringify(e))}function qoe(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function bg(e,t=[]){return[e,t]}function Uoe(e,t){const[n,r]=e;return[n,[...r,t]]}function dS(e,t){const n=e[1];for(const r of n){const i=r[0].type;if(t(r,i))return!0}return!1}function Woe(e,t){return dS(e,(n,r)=>t.includes(r))}function fS(e){const t=Nx(Ir);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Koe(e){const[t,n]=e;let r=JSON.stringify(t);function i(s){typeof r=="string"?r=typeof s=="string"?r+s:[fS(r),s]:r.push(typeof s=="string"?fS(s):s)}for(const s of n){const[o,a]=s;if(i(` ${JSON.stringify(o)} `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(Tc(a))}i(l)}}return typeof r=="string"?r:Goe(r)}function Goe(e){const t=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function Zoe(e){const t=typeof e.data=="string"?fS(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Yoe={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function jD(e){return Yoe[e]}function hz(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Xoe(e,t,n,r){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:f1(r)},...i&&{trace:i}}}function Qoe(e,t){if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Joe(e,t,n,r){const i=hz(n),s={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:f1(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return bg(s,[o])}function eae(e,t,n,r){const i=hz(n),s=e.type&&e.type!=="replay_event"?e.type:"event";Qoe(e,n?.sdk);const o=Xoe(e,i,r,t);return delete e.sdkProcessingMetadata,bg(o,[[{type:s},e]])}const f3=0,BD=1,qD=2;function Ux(e){return new Yp(t=>{t(e)})}function sC(e){return new Yp((t,n)=>{n(e)})}class Yp{constructor(t){this._state=f3,this._handlers=[],this._runExecutor(t)}then(t,n){return new Yp((r,i)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(o){i(o)}},s=>{if(!n)i(s);else try{r(n(s))}catch(o){i(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Yp((n,r)=>{let i,s;return this.then(o=>{s=!1,i=o,t&&t()},o=>{s=!0,i=o,t&&t()}).then(()=>{if(s){r(i);return}n(i)})})}_executeHandlers(){if(this._state===f3)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===BD&&n[1](this._value),this._state===qD&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,o)=>{if(this._state===f3){if(l1(o)){o.then(r,i);return}this._state=s,this._value=o,this._executeHandlers()}},r=s=>{n(BD,s)},i=s=>{n(qD,s)};try{t(r,i)}catch(s){i(s)}}}function tae(e,t,n,r=0){try{const i=hS(t,n,e,r);return l1(i)?i:Ux(i)}catch(i){return sC(i)}}function hS(e,t,n,r){const i=n[r];if(!e||!i)return e;const s=i({...e},t);return zn&&s===null&&En.log(`Event processor "${i.id||"?"}" dropped event`),l1(s)?s.then(o=>hS(o,t,n,r+1)):hS(s,t,n,r+1)}let Hd,UD,WD,bu;function nae(e){const t=Ir._sentryDebugIds,n=Ir._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(bu&&r.length===UD&&i.length===WD)return bu;UD=r.length,WD=i.length,bu={},Hd||(Hd={});const s=(o,a)=>{for(const l of o){const c=a[l],u=Hd?.[l];if(u&&bu&&c)bu[u[0]]=c,Hd&&(Hd[l]=[u[0],c]);else if(c){const d=e(l);for(let f=d.length-1;f>=0;f--){const g=d[f]?.filename;if(g&&bu&&Hd){bu[g]=c,Hd[l]=[g,c];break}}}}};return t&&s(r,t),n&&s(i,n),bu}function rae(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=t;sae(e,t),r&&lae(e,r),cae(e,n),oae(e,i),aae(e,s)}function KD(e,t){const{extra:n,tags:r,attributes:i,user:s,contexts:o,level:a,sdkProcessingMetadata:l,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:m,transactionName:g,span:p}=t;s0(e,"extra",n),s0(e,"tags",r),s0(e,"attributes",i),s0(e,"user",s),s0(e,"contexts",o),e.sdkProcessingMetadata=u1(e.sdkProcessingMetadata,l,2),a&&(e.level=a),g&&(e.transactionName=g),p&&(e.span=p),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...m}}function s0(e,t,n){e[t]=u1(e[t],n,1)}function iae(e,t){const n=toe().getScopeData();return e&&KD(n,e.getScopeData()),t&&KD(n,t.getScopeData()),n}function sae(e,t){const{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function oae(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function aae(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function lae(e,t){e.contexts={trace:Eoe(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Voe(t),...e.sdkProcessingMetadata};const n=uz(t),r=rC(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function cae(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function uae(e,t,n,r,i,s){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Pa(),timestamp:t.timestamp||c1()},c=n.integrations||e.integrations.map(y=>y.name);dae(l,e),mae(l,c),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&fae(l,e.stackParser);const u=pae(r,n.captureContext);n.mechanism&&Bm(l,n.mechanism);const d=i?i.getEventProcessors():[],f=iae(s,u),m=[...n.attachments||[],...f.attachments];m.length&&(n.attachments=m),rae(l,f);const g=[...d,...f.eventProcessors];return tae(g,l,n).then(y=>(y&&hae(y),typeof o=="number"&&o>0?gae(y,o,a):y))}function dae(e,t){const{environment:n,release:r,dist:i,maxValueLength:s}=t;e.environment=e.environment||n||iC,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);const o=e.request;o?.url&&s&&(o.url=aS(o.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=aS(a.value,s))})}function fae(e,t){const n=nae(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function hae(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function mae(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function gae(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Tc(i.data,t,n)}}))},...e.user&&{user:Tc(e.user,t,n)},...e.contexts&&{contexts:Tc(e.contexts,t,n)},...e.extra&&{extra:Tc(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Tc(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:Tc(i.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Tc(e.contexts.flags,3,n)),r}function pae(e,t){if(!t)return e;const n=e?e.clone():new Yc;return n.update(t),n}function oC(e,t){return Cd().captureException(e,void 0)}function mz(e,t){return Cd().captureEvent(e,t)}function vae(){const e=Es();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function GD(e){const t=d1(),n=Cd(),{userAgent:r}=Ir.navigator||{},i=Use({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),s=t.getSession();return s?.status==="ok"&&qm(s,{status:"exited"}),gz(),t.setSession(i),i}function gz(){const e=d1(),n=Cd().getSession()||e.getSession();n&&Wse(n),pz(),e.setSession()}function pz(){const e=d1(),t=Es(),n=e.getSession();n&&t&&t.captureSession(n)}function ZD(e=!1){if(e){gz();return}pz()}const yae="7";function bae(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function wae(e){return`${bae(e)}${e.projectId}/envelope/`}function xae(e,t){const n={sentry_version:yae};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function kae(e,t,n){return t||`${wae(e)}?${xae(e,n)}`}const YD=[];function Sae(e){const t={};return e.forEach(n=>{const{name:r}=n,i=t[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function _ae(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const i=n(t);r=Array.isArray(i)?i:[i]}else r=t;return Sae(r)}function Cae(e,t){const n={};return t.forEach(r=>{r&&vz(e,r,n)}),n}function XD(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function vz(e,t,n){if(n[t.name]){zn&&En.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!YD.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),YD.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,s)=>r(i,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((s,o)=>r(s,o,e),{id:t.name});e.addEventProcessor(i)}zn&&En.log(`Integration installed: ${t.name}`)}function Tae(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function Eae(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=f1(r)),bg(i,[Tae(e)])}function yz(e,t){const n=t??Iae(e)??[];if(n.length===0)return;const r=e.getOptions(),i=Eae(n,r._metadata,r.tunnel,e.getDsn());bz().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function Iae(e){return bz().get(e)}function bz(){return pg("clientToLogBufferMap",()=>new WeakMap)}function Dae(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function Aae(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=f1(r)),bg(i,[Dae(e)])}function wz(e,t){const n=t??Lae(e)??[];if(n.length===0)return;const r=e.getOptions(),i=Aae(n,r._metadata,r.tunnel,e.getDsn());xz().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(i)}function Lae(e){return xz().get(e)}function xz(){return pg("clientToMetricBufferMap",()=>new WeakMap)}const aC=Symbol.for("SentryBufferFullError");function lC(e=100){const t=new Set;function n(){return t.sizer(a),()=>r(a)),a}function s(o){if(!t.size)return Ux(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!o)return a;const l=[a,new Promise(c=>setTimeout(()=>c(!1),o))];return Promise.race(l)}return{get $(){return Array.from(t)},add:i,drain:s}}const Mae=60*1e3;function $ae(e,t=Bx()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Mae:r-t}function Pae(e,t){return e[t]||e.all||0}function Oae(e,t,n=Bx()){return Pae(e,t)>n}function Rae(e,{statusCode:t,headers:n},r=Bx()){const i={...e},s=n?.["x-sentry-rate-limits"],o=n?.["retry-after"];if(s)for(const a of s.trim().split(",")){const[l,c,,,u]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!c)i.all=r+f;else for(const m of c.split(";"))m==="metric_bucket"?(!u||u.split(";").includes("custom"))&&(i[m]=r+f):i[m]=r+f}else o?i.all=r+$ae(o,r):t===429&&(i.all=r+60*1e3);return i}const kz=64;function Fae(e,t,n=lC(e.bufferSize||kz)){let r={};const i=o=>n.drain(o);function s(o){const a=[];if(dS(o,(d,f)=>{const m=jD(f);Oae(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):a.push(d)}),a.length===0)return Promise.resolve({});const l=bg(o[0],a),c=d=>{if(Woe(l,["client_report"])){zn&&En.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}dS(l,(f,m)=>{e.recordDroppedEvent(d,jD(m))})},u=()=>t({body:Koe(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&zn&&En.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Rae(r,d),d),d=>{throw c("network_error"),zn&&En.error("Encountered error running transport request:",d),d});return n.add(u).then(d=>d,d=>{if(d===aC)return zn&&En.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw d})}return{send:s,flush:i}}function Nae(e,t,n){const r=[{type:"client_report"},{timestamp:c1(),discarded_events:e}];return bg(t?{dsn:t}:{},[r])}function Sz(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Vae(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:s,data:o,op:a}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:o?.[sz],exclusive_time:o?.[oz],measurements:e.measurements,is_segment:!0}}function zae(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[sz]:e.profile_id},...e.exclusive_time&&{[oz]:e.exclusive_time}}}},measurements:e.measurements}}const QD="Not capturing exception because it's already been captured.",JD="Discarded session because of missing or non-string release",_z=Symbol.for("SentryInternalError"),Cz=Symbol.for("SentryDoNotSendEventError"),Hae=5e3;function r2(e){return{message:e,[_z]:!0}}function h3(e){return{message:e,[Cz]:!0}}function eA(e){return!!e&&typeof e=="object"&&_z in e}function tA(e){return!!e&&typeof e=="object"&&Cz in e}function nA(e,t,n,r,i){let s=0,o,a=!1;e.on(n,()=>{s=0,clearTimeout(o),a=!1}),e.on(t,l=>{s+=r(l),s>=8e5?i(e):a||(a=!0,o=setTimeout(()=>{i(e)},Hae))}),e.on("flush",()=>{i(e)})}class jae{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=lC(t.transportOptions?.bufferSize??kz),t.dsn?this._dsn=Coe(t.dsn):zn&&En.warn("No DSN provided, client will not send events."),this._dsn){const r=kae(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&nA(this,"afterCaptureLog","flushLogs",Wae,yz),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&nA(this,"afterCaptureMetric","flushMetrics",Uae,wz)}captureException(t,n,r){const i=Pa();if(DD(t))return zn&&En.log(QD),i;const s={event_id:i,...n};return this._process(()=>this.eventFromException(t,s).then(o=>this._captureEvent(o,s,r)).then(o=>o),"error"),s.event_id}captureMessage(t,n,r,i){const s={event_id:Pa(),...r},o=Q8(t)?t:String(t),a=zx(t),l=a?this.eventFromMessage(o,n,s):this.eventFromException(t,s);return this._process(()=>l.then(c=>this._captureEvent(c,s,i)),a?"unknown":"error"),s.event_id}captureEvent(t,n,r){const i=Pa();if(n?.originalException&&DD(n.originalException))return zn&&En.log(QD),i;const s={event_id:i,...n},o=t.sdkProcessingMetadata||{},a=o.capturedSpanScope,l=o.capturedSpanIsolationScope,c=rA(t.type);return this._process(()=>this._captureEvent(t,s,a||r,l),c),s.event_id}captureSession(t){this.sendSession(t),qm(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),i=await n.flush(t);return r&&i}async close(t){const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];vz(this,t,this._integrations),n||XD(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=eae(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Uoe(r,Zoe(i));this.sendEnvelope(r).then(i=>this.emit("afterSendEvent",t,i))}sendSession(t){const{release:n,environment:r=iC}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){zn&&En.warn(JD);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){zn&&En.warn(JD);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const i=Joe(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const i=`${t}:${n}`;zn&&En.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,i=(...s)=>n(...s);return r.add(i),()=>{r.delete(i)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(i=>i(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return zn&&En.error("Error while sending envelope:",n),{}}return zn&&En.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Cae(this,t),XD(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",i=!1;const s=n.exception?.values;if(s){i=!0,r=!1;for(const l of s)if(l.mechanism?.handled===!1){r=!0;break}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(qm(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||nsetTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i){const s=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o?.length&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),uae(s,t,n,r,this,i).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:roe(r),...a.contexts};const l=Noe(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=Cd(),i=d1()){return zn&&mS(t)&&En.log(`Captured error event \`${Sz(t)[0]||""}\``),this._processEvent(t,n,r,i).then(s=>s.event_id,s=>{zn&&(tA(s)?En.log(s.message):eA(s)?En.warn(s.message):En.warn(s))})}_processEvent(t,n,r,i){const s=this.getOptions(),{sampleRate:o}=s,a=Tz(t),l=mS(t),u=`before send for type \`${t.type||"error"}\``,d=typeof o>"u"?void 0:Toe(o);if(l&&typeof d=="number"&&X2()>d)return this.recordDroppedEvent("sample_rate","error"),sC(h3(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const f=rA(t.type);return this._prepareEvent(t,n,r,i).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",f),h3("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return m;const p=qae(this,s,m,n);return Bae(p,u)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",f),a){const v=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",v)}throw h3(`${u} returned \`null\`, will not send event.`)}const g=r.getSession()||i.getSession();if(l&&g&&this._updateSessionFromEvent(g,m),a){const y=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,v=m.spans?m.spans.length:0,b=y-v;b>0&&this.recordDroppedEvent("before_send","span",b)}const p=m.transaction_info;if(a&&p&&m.transaction!==t.transaction){const y="custom";m.transaction_info={...p,source:y}}return this.sendEvent(m,n),m}).then(null,m=>{throw tA(m)||eA(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),r2(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${m}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===aC&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[i,s]=n.split(":");return{reason:i,category:s,quantity:r}})}_flushOutcomes(){zn&&En.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){zn&&En.log("No outcomes to send");return}if(!this._dsn){zn&&En.log("No dsn provided, will not send outcomes");return}zn&&En.log("Sending outcomes:",t);const n=Nae(t,this._options.tunnel&&f1(this._dsn));this.sendEnvelope(n)}}function rA(e){return e==="replay_event"?"replay":e||"error"}function Bae(e,t){const n=`${t} must return \`null\` or a valid event.`;if(l1(e))return e.then(r=>{if(!Zp(r)&&r!==null)throw r2(n);return r},r=>{throw r2(`${t} rejected with ${r}`)});if(!Zp(e)&&e!==null)throw r2(n);return e}function qae(e,t,n,r){const{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o,ignoreSpans:a}=t;let l=n;if(mS(l)&&i)return i(l,r);if(Tz(l)){if(o||a){const c=Vae(l);if(a?.length&&HD(c,a))return null;if(o){const u=o(c);u?l=u1(n,zae(u)):VD()}if(l.spans){const u=[],d=l.spans;for(const m of d){if(a?.length&&HD(m,a)){Ooe(d,m);continue}if(o){const g=o(m);g?u.push(g):(VD(),u.push(m))}else u.push(m)}const f=l.spans.length-u.length;f&&e.recordDroppedEvent("before_send","span",f),l.spans=u}}if(s){if(l.spans){const c=l.spans.length;l.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return s(l,r)}}return l}function mS(e){return e.type===void 0}function Tz(e){return e.type==="transaction"}function Uae(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Ez(e.attributes)}function Wae(e){let t=0;return e.message&&(t+=e.message.length*2),t+Ez(e.attributes)}function Ez(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*iA(n[0]):zx(n)?t+=iA(n):t+=100}),t}function iA(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Kae(e){return Vx(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function sA(e){return Kae(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function Gae(e,t){t.debug===!0&&(zn?En.enable():vg(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Cd().update(t.initialScope);const r=new e(t);return Zae(r),r.init(),r}function Zae(e){Cd().setClient(e)}function m3(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Yae(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",i=e.includes(";base64,"),s=e.indexOf(",");let o="";if(t&&s!==-1){const a=e.slice(s+1);o=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${i?",base64":""}${o?`,${o}`:""}`}return e}function Xae(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Iz(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:Ef})),version:Ef}),e._metadata=i}const Qae=100;function Of(e,t){const n=Es(),r=d1();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=Qae}=n.getOptions();if(s<=0)return;const a={timestamp:c1(),...e},l=i?vg(()=>i(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,s))}let oA;const Jae="FunctionToString",aA=new WeakMap,ele=(()=>({name:Jae,setupOnce(){oA=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=tC(this),n=aA.has(Es())&&t!==void 0?t:this;return oA.apply(n,e)}}catch{}},setup(e){aA.set(e,!0)}})),tle=ele,nle=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],rle="EventFilters",ile=(e={})=>{let t;return{name:rle,setup(n){const r=n.getOptions();t=lA(e,r)},processEvent(n,r,i){if(!t){const s=i.getOptions();t=lA(e,s)}return ole(n,t)?null:n}}},sle=((e={})=>({...ile(e),name:"InboundFilters"}));function lA(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:nle],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function ole(e,t){if(e.type){if(e.type==="transaction"&&lle(e,t.ignoreTransactions))return zn&&En.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. Event: ${hf(e)}`),!0}else{if(ale(e,t.ignoreErrors))return zn&&En.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${hf(e)}`),!0;if(fle(e))return zn&&En.warn(`Event dropped due to not having an error message, error type or stacktrace. Event: ${hf(e)}`),!0;if(cle(e,t.denyUrls))return zn&&En.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${hf(e)}. Url: ${Q2(e)}`),!0;if(!ule(e,t.allowUrls))return zn&&En.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${hf(e)}. Url: ${Q2(e)}`),!0}return!1}function ale(e,t){return t?.length?Sz(e).some(n=>qx(n,t)):!1}function lle(e,t){if(!t?.length)return!1;const n=e.transaction;return n?qx(n,t):!1}function cle(e,t){if(!t?.length)return!1;const n=Q2(e);return n?qx(n,t):!1}function ule(e,t){if(!t?.length)return!0;const n=Q2(e);return n?qx(n,t):!0}function dle(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function Q2(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?dle(n):null}catch{return zn&&En.error(`Cannot extract url for event ${hf(e)}`),null}}function fle(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function hle(e,t,n,r,i,s){if(!i.exception?.values||!s||!sd(s.originalException,Error))return;const o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=gS(e,t,r,s.originalException,n,i.exception.values,o,0))}function gS(e,t,n,r,i,s,o,a){if(s.length>=n+1)return s;let l=[...s];if(sd(r[i],Error)){cA(o,a);const c=e(t,r[i]),u=l.length;uA(c,i,u,a),l=gS(e,t,n,r[i],i,[c,...l],c,u)}return Array.isArray(r.errors)&&r.errors.forEach((c,u)=>{if(sd(c,Error)){cA(o,a);const d=e(t,c),f=l.length;uA(d,`errors[${u}]`,f,a),l=gS(e,t,n,c,i,[d,...l],d,f)}}),l}function cA(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function uA(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function mle(e){const t="console";nh(t,e),rh(t,gle)}function gle(){"console"in Ir&&wse.forEach(function(e){e in Ir.console&&zo(Ir.console,e,function(t){return Y2[e]=t,function(...n){ll("console",{args:n,level:e}),Y2[e]?.apply(Ir.console,n)}})})}function ple(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const vle="Dedupe",yle=(()=>{let e;return{name:vle,processEvent(t){if(t.type)return t;try{if(wle(t,e))return zn&&En.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),ble=yle;function wle(e,t){return t?!!(xle(e,t)||kle(e,t)):!1}function xle(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Az(e,t)||!Dz(e,t))}function kle(e,t){const n=dA(t),r=dA(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Az(e,t)||!Dz(e,t))}function Dz(e,t){let n=SD(e),r=SD(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i=400&&e<500?"warning":e>=500?"error":void 0}const Xp=Ir;function Sle(){return"history"in Xp&&!!Xp.history}function _le(){if(!("fetch"in Xp))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function pS(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Cle(){if(typeof EdgeRuntime=="string")return!0;if(!_le())return!1;if(pS(Xp.fetch))return!0;let e=!1;const t=Xp.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=pS(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){zn&&En.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Tle(e,t){const n="fetch";nh(n,e),rh(n,()=>Ele(void 0,t))}function Ele(e,t=!1){t&&!Cle()||zo(Ir,"fetch",function(n){return function(...r){const i=new Error,{method:s,url:o}=Ile(r),a={args:r,fetchData:{method:s,url:o},startTimestamp:Bc()*1e3,virtualError:i,headers:Dle(r)};return ll("fetch",{...a}),n.apply(Ir,r).then(async l=>(ll("fetch",{...a,endTimestamp:Bc()*1e3,response:l}),l),l=>{ll("fetch",{...a,endTimestamp:Bc()*1e3,error:l}),Vx(l)&&l.stack===void 0&&(l.stack=i.stack,od(l,"framesToPop",1));const u=Es()?.getOptions().enhanceFetchErrorMessages??"always";if(u!==!1&&l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{const m=new URL(a.fetchData.url).host;u==="always"?l.message=`${l.message} (${m})`:od(l,"__sentry_fetch_url_host__",m)}catch{}throw l})}})}function i2(e,t){return!!e&&typeof e=="object"&&!!e[t]}function fA(e){return typeof e=="string"?e:e?i2(e,"url")?e.url:e.toString?e.toString():"":""}function Ile(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:fA(n),method:i2(r,"method")?String(r.method).toUpperCase():QV(n)&&i2(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:fA(t),method:i2(t,"method")?String(t.method).toUpperCase():"GET"}}function Dle(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(QV(t))return new Headers(t.headers)}catch{}}function Ale(){return"npm"}const Ci=Ir;let vS=0;function Mz(){return vS>0}function Lle(){vS++,setTimeout(()=>{vS--})}function Wm(e,t={}){function n(i){return typeof i=="function"}if(!n(e))return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(tC(e))return e}catch{return e}const r=function(...i){try{const s=i.map(o=>Wm(o,t));return e.apply(this,s)}catch(s){throw Lle(),noe(o=>{o.addEventProcessor(a=>(t.mechanism&&(lS(a,void 0),Bm(a,t.mechanism)),a.extra={...a.extra,arguments:i},a)),oC(s)}),s}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}ez(r,e),od(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Mle(){const e=eC(),{referrer:t}=Ci.document||{},{userAgent:n}=Ci.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function cC(e,t){const n=uC(e,t),r={type:Fle(t),value:Nle(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function $le(e,t,n,r){const s=Es()?.getOptions().normalizeDepth,o=Ble(t),a={__serialized__:fz(t,s)};if(o)return{exception:{values:[cC(e,o)]},extra:a};const l={exception:{values:[{type:Hx(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Hle(t,{isUnhandledRejection:r})}]},extra:a};if(n){const c=uC(e,n);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function g3(e,t){return{exception:{values:[cC(e,t)]}}}function uC(e,t){const n=t.stacktrace||t.stack||"",r=Ole(t),i=Rle(t);try{return e(n,r,i)}catch{}return[]}const Ple=/Minified React error #\d+;/i;function Ole(e){return e&&Ple.test(e.message)?1:0}function Rle(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function $z(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Fle(e){const t=e?.name;return!t&&$z(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Nle(e){const t=e?.message;return $z(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?sA(t.error):sA(e):"No error message"}function Vle(e,t,n,r){const i=n?.syntheticException||void 0,s=dC(e,t,i,r);return Bm(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),Ux(s)}function zle(e,t,n="info",r,i){const s=r?.syntheticException||void 0,o=yS(e,t,s,i);return o.level=n,r?.event_id&&(o.event_id=r.event_id),Ux(o)}function dC(e,t,n,r,i){let s;if(YV(t)&&t.error)return g3(e,t.error);if(CD(t)||$se(t)){const o=t;if("stack"in t)s=g3(e,t);else{const a=o.name||(CD(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=yS(e,l,n,r),lS(s,l)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return Vx(t)?g3(e,t):Zp(t)||Hx(t)?(s=$le(e,t,n,i),Bm(s,{synthetic:!0}),s):(s=yS(e,t,n,r),lS(s,`${t}`),Bm(s,{synthetic:!0}),s)}function yS(e,t,n,r){const i={};if(r&&n){const s=uC(e,n);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]}),Bm(i,{synthetic:!0})}if(Q8(t)){const{__sentry_template_string__:s,__sentry_template_values__:o}=t;return i.logentry={message:s,params:o},i}return i.message=t,i}function Hle(e,{isUnhandledRejection:t}){const n=zse(e),r=t?"promise rejection":"exception";return YV(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Hx(e)?`Event \`${jle(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function jle(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Ble(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class qle extends jae{constructor(t){const n=Ule(t),r=Ci.SENTRY_SDK_SOURCE||Ale();Iz(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:i,sendClientReports:s,enableLogs:o,_experiments:a,enableMetrics:l}=this._options,c=l??a?.enableMetrics??!0;Ci.document&&(s||o||c)&&Ci.document.addEventListener("visibilitychange",()=>{Ci.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),o&&yz(this),c&&wz(this))}),i&&this.on("beforeSendSession",Xae)}eventFromException(t,n){return Vle(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return zle(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,i){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,i)}}function Ule(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Ci.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const Wle=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,eo=Ir,Kle=1e3;let hA,bS,wS;function Gle(e){nh("dom",e),rh("dom",Zle)}function Zle(){if(!eo.document)return;const e=ll.bind(null,"dom"),t=mA(e,!0);eo.document.addEventListener("click",t,!1),eo.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const i=eo[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(zo(i,"addEventListener",function(s){return function(o,a,l){if(o==="click"||o=="keypress")try{const c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},u=c[o]=c[o]||{refCount:0};if(!u.handler){const d=mA(e);u.handler=d,s.call(this,o,d,l)}u.refCount++}catch{}return s.call(this,o,a,l)}}),zo(i,"removeEventListener",function(s){return function(o,a,l){if(o==="click"||o=="keypress")try{const c=this.__sentry_instrumentation_handlers__||{},u=c[o];u&&(u.refCount--,u.refCount<=0&&(s.call(this,o,u.handler,l),u.handler=void 0,delete c[o]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,o,a,l)}}))})}function Yle(e){if(e.type!==bS)return!1;try{if(!e.target||e.target._sentryId!==wS)return!1}catch{}return!0}function Xle(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function mA(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Qle(n);if(Xle(n.type,r))return;od(n,"_sentryCaptured",!0),r&&!r._sentryId&&od(r,"_sentryId",Pa());const i=n.type==="keypress"?"input":n.type;Yle(n)||(e({event:n,name:i,global:t}),bS=n.type,wS=r?r._sentryId:void 0),clearTimeout(hA),hA=eo.setTimeout(()=>{wS=void 0,bS=void 0},Kle)}}function Qle(e){try{return e.target}catch{return null}}let vy;function Pz(e){const t="history";nh(t,e),rh(t,Jle)}function Jle(){if(eo.addEventListener("popstate",()=>{const t=eo.location.href,n=vy;if(vy=t,n===t)return;ll("history",{from:n,to:t})}),!Sle())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const i=vy,s=ece(String(r));if(vy=s,i===s)return t.apply(this,n);ll("history",{from:i,to:s})}return t.apply(this,n)}}zo(eo.history,"pushState",e),zo(eo.history,"replaceState",e)}function ece(e){try{return new URL(e,eo.location.origin).toString()}catch{return e}}const s2={};function tce(e){const t=s2[e];if(t)return t;let n=eo[e];if(pS(n))return s2[e]=n.bind(eo);const r=eo.document;if(r&&typeof r.createElement=="function")try{const i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);const s=i.contentWindow;s?.[e]&&(n=s[e]),r.head.removeChild(i)}catch(i){Wle&&En.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(s2[e]=n.bind(eo))}function nce(e){s2[e]=void 0}const z0="__sentry_xhr_v3__";function rce(e){nh("xhr",e),rh("xhr",ice)}function ice(){if(!eo.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,s=Bc()*1e3,o=jc(r[0])?r[0].toUpperCase():void 0,a=sce(r[1]);if(!o||!a)return t.apply(n,r);n[z0]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const c=n[z0];if(c&&n.readyState===4){try{c.status_code=n.status}catch{}const u={endTimestamp:Bc()*1e3,startTimestamp:s,xhr:n,virtualError:i};ll("xhr",u)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(c,u,d){return l(),c.apply(u,d)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(c,u,d){const[f,m]=d,g=u[z0];return g&&jc(f)&&jc(m)&&(g.request_headers[f.toLowerCase()]=m),c.apply(u,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[z0];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const s={startTimestamp:Bc()*1e3,xhr:n};return ll("xhr",s),t.apply(n,r)}})}function sce(e){if(jc(e))return e;try{return e.toString()}catch{}}const oce=40;function ace(e,t=tce("fetch")){let n=0,r=0;async function i(s){const o=s.body.length;n+=o,r++;const a={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const l=await t(e.url,a);return{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}}catch(l){throw nce("fetch"),l}finally{n-=o,r--}}return Fae(e,i,lC(e.bufferSize||oce))}const Wx=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,lce=30,cce=50;function xS(e,t,n,r){const i={filename:e,function:t===""?Pf:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const uce=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,dce=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,fce=/\((\S*)(?::(\d+))(?::(\d+))\)/,hce=/at (.+?) ?\(data:(.+?),/,mce=e=>{const t=e.match(hce);if(t)return{filename:``,function:t[1]};const n=uce.exec(e);if(n){const[,i,s,o]=n;return xS(i,Pf,+s,+o)}const r=dce.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const a=fce.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[s,o]=Oz(r[1]||Pf,r[2]);return xS(o,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},gce=[lce,mce],pce=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,vce=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,yce=e=>{const t=pce.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=vce.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],i=t[1]||Pf;return[i,r]=Oz(i,r),xS(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},bce=[cce,yce],wce=[gce,bce],xce=KV(...wce),Oz=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Pf,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},yy=1024,kce="Breadcrumbs",Sce=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:kce,setup(n){t.console&&mle(Ece(n)),t.dom&&Gle(Tce(n,t.dom)),t.xhr&&rce(Ice(n)),t.fetch&&Tle(Dce(n)),t.history&&Pz(Ace(n)),t.sentry&&n.on("beforeSendEvent",Cce(n))}}}),_ce=Sce;function Cce(e){return function(n){Es()===e&&Of({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:hf(n)},{event:n})}}function Tce(e,t){return function(r){if(Es()!==e)return;let i,s,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>yy&&(Wx&&En.warn(`\`dom.maxStringLength\` cannot exceed ${yy}, but a value of ${a} was configured. Sentry will use ${yy} instead.`),a=yy),typeof o=="string"&&(o=[o]);try{const c=r.event,u=Lce(c)?c.target:c;i=JV(u,{keyAttrs:o,maxStringLength:a}),s=Vse(u)}catch{i=""}if(i.length===0)return;const l={category:`ui.${r.name}`,message:i};s&&(l.data={"ui.component_name":s}),Of(l,{event:r.event,name:r.name,global:r.global})}}function Ece(e){return function(n){if(Es()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:ple(n.level),message:ID(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${ID(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Of(r,{input:n.args,level:n.level})}}function Ice(e){return function(n){if(Es()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,s=n.xhr[z0];if(!r||!i||!s)return;const{method:o,url:a,status_code:l,body:c}=s,u={method:o,url:a,status_code:l},d={xhr:n.xhr,input:c,startTimestamp:r,endTimestamp:i},f={category:"xhr",data:u,type:"http",level:Lz(l)};e.emit("beforeOutgoingRequestBreadcrumb",f,d),Of(f,d)}}function Dce(e){return function(n){if(Es()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const s=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},a={category:"fetch",data:s,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,o),Of(a,o)}else{const s=n.response,o={...n.fetchData,status_code:s?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,s?.status;const a={input:n.args,response:s,startTimestamp:r,endTimestamp:i},l={category:"fetch",data:o,type:"http",level:Lz(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),Of(l,a)}}}function Ace(e){return function(n){if(Es()!==e)return;let r=n.from,i=n.to;const s=m3(Ci.location.href);let o=r?m3(r):void 0;const a=m3(i);o?.path||(o=s),s.protocol===a.protocol&&s.host===a.host&&(i=a.relative),s.protocol===o.protocol&&s.host===o.host&&(r=o.relative),Of({category:"navigation",data:{from:r,to:i}})}}function Lce(e){return!!e&&!!e.target}const Mce=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],$ce="BrowserApiErrors",Pce=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:$ce,setupOnce(){t.setTimeout&&zo(Ci,"setTimeout",gA),t.setInterval&&zo(Ci,"setInterval",gA),t.requestAnimationFrame&&zo(Ci,"requestAnimationFrame",Rce),t.XMLHttpRequest&&"XMLHttpRequest"in Ci&&zo(XMLHttpRequest.prototype,"send",Fce);const n=t.eventTarget;n&&(Array.isArray(n)?n:Mce).forEach(i=>Nce(i,t))}}}),Oce=Pce;function gA(e){return function(...t){const n=t[0];return t[0]=Wm(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${id(e)}`}}),e.apply(this,t)}}function Rce(e){return function(t){return e.apply(this,[Wm(t,{mechanism:{data:{handler:id(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Fce(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&zo(n,i,function(s){const o={mechanism:{data:{handler:id(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${i}`}},a=tC(s);return a&&(o.mechanism.data.handler=id(a)),Wm(s,o)})}),e.apply(this,t)}}function Nce(e,t){const r=Ci[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(zo(r,"addEventListener",function(i){return function(s,o,a){try{Vce(o)&&(o.handleEvent=Wm(o.handleEvent,{mechanism:{data:{handler:id(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&zce(this,s,o),i.apply(this,[s,Wm(o,{mechanism:{data:{handler:id(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),zo(r,"removeEventListener",function(i){return function(s,o,a){try{const l=o.__sentry_wrapped__;l&&i.call(this,s,l,a)}catch{}return i.call(this,s,o,a)}}))}function Vce(e){return typeof e.handleEvent=="function"}function zce(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const Hce=()=>({name:"BrowserSession",setupOnce(){if(typeof Ci.document>"u"){Wx&&En.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}GD({ignoreDuration:!0}),ZD(),Pz(({from:e,to:t})=>{e!==void 0&&e!==t&&(GD({ignoreDuration:!0}),ZD())})}}),jce="GlobalHandlers",Bce=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:jce,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Uce(n),pA("onerror")),t.onunhandledrejection&&(Wce(n),pA("onunhandledrejection"))}}}),qce=Bce;function Uce(e){Dse(t=>{const{stackParser:n,attachStacktrace:r}=Rz();if(Es()!==e||Mz())return;const{msg:i,url:s,line:o,column:a,error:l}=t,c=Zce(dC(n,l||i,void 0,r,!1),s,o,a);c.level="error",mz(c,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function Wce(e){Lse(t=>{const{stackParser:n,attachStacktrace:r}=Rz();if(Es()!==e||Mz())return;const i=Kce(t),s=zx(i)?Gce(i):dC(n,i,void 0,r,!0);s.level="error",mz(s,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function Kce(e){if(zx(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function Gce(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Zce(e,t,n,r){const i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],c=r,u=n,d=Yce(t)??eC();return l.length===0&&l.push({colno:c,filename:d,function:Pf,in_app:!0,lineno:u}),e}function pA(e){Wx&&En.log(`Global Handler attached: ${e}`)}function Rz(){return Es()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Yce(e){if(!(!jc(e)||e.length===0))return e.startsWith("data:")?`<${Yae(e,!1)}>`:e}const Xce=()=>({name:"HttpContext",preprocessEvent(e){if(!Ci.navigator&&!Ci.location&&!Ci.document)return;const t=Mle(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),Qce="cause",Jce=5,eue="LinkedErrors",tue=((e={})=>{const t=e.limit||Jce,n=e.key||Qce;return{name:eue,preprocessEvent(r,i,s){const o=s.getOptions();hle(cC,o.stackParser,n,t,r,i)}}}),nue=tue;function rue(){return iue()?(Wx&&vg(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function iue(){if(typeof Ci.window>"u")return!1;const e=Ci;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=eC(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Ci===Ci.top&&r.some(s=>n.startsWith(`${s}://`)))}function sue(e){return[sle(),tle(),Oce(),_ce(),qce(),nue(),ble(),Xce(),Hce()]}function oue(e={}){const t=!e.skipBrowserExtensionCheck&&rue();let n=e.defaultIntegrations==null?sue():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:Ese(e.stackParser||xce),integrations:_ae({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||ace};return Gae(qle,r)}function aue(e){const t={...e};return Iz(t,"solid"),oue(t)}const lue="modulepreload",cue=function(e){return"/"+e},vA={},B=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let l=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=o?.nonce||o?.getAttribute("nonce");i=l(n.map(c=>{if(c=cue(c),c in vA)return;vA[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":lue,u||(f.as="script"),f.crossOrigin="",f.href=c,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((m,g)=>{f.addEventListener("load",m),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};function Xr(e){const t=kn();return{provider:n=>{const r=e.init(n);if(!(e.gate??!0))return h(t.Provider,{value:r,get children(){return n.children}});const s=I(()=>{const o=r.ready;return o===void 0||(typeof o=="function"?o():o)});return h(j,{get when(){return s()},get children(){return h(t.Provider,{value:r,get children(){return n.children}})}})},use(){const n=hn(t);if(!n)throw new Error(`${e.name} context must be used within a context provider`);return n}}}const Fz=Xr({name:"FileComponent",init:e=>e.component}),uue=Fz.provider,Td=Fz.use,kS={equals:!1},due=e=>e!=null,Nz=e=>e.filter(due);function fue(e){return(...t)=>{for(const n of e)n&&n(...t)}}const Be=e=>typeof e=="function"&&!e.length?e():e,J2=e=>Array.isArray(e)?e:e?[e]:[];function hue(e,...t){return typeof e=="function"?e(...t):e}const fC=_e;function mue(e,t,n){if(tn.context){const[r,i]=De(e,n);return sn(()=>i(()=>t())),[r,i]}return De(t(),n)}function Vz(e,t,n,r){const i=e.length,s=t.length;let o=0;if(!s){for(;o{J2(Be(e)).forEach(s=>{s&&J2(Be(t)).forEach(o=>on(s,o,n,r))})};typeof e=="function"?ae(i):ge(i)}const p3=Symbol("fallback");function yA(e){for(const t of e)t.dispose()}function gue(e,t,n,r={}){const i=new Map;return _e(()=>yA(i.values())),()=>{const o=e()||[];return o[Wp],jt(()=>{if(!o.length)return yA(i.values()),i.clear(),r.fallback?[Kr(d=>(i.set(p3,{dispose:d}),r.fallback()))]:[];const a=new Array(o.length),l=i.get(p3);if(!i.size||l){l?.dispose(),i.delete(p3);for(let u=0;ud)):s(a,d,u,f)}for(const u of c)i.get(u)?.dispose(),i.delete(u);return a})};function s(o,a,l,c){Kr(u=>{const[d,f]=De(a),m={setItem:f,dispose:u};if(n.length>1){const[g,p]=De(l);m.setIndex=p,m.mapped=n(d,g)}else m.mapped=n(d);i.set(c,m),o[l]=m.mapped})}}function pue(e){const{by:t}=e;return I(gue(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function vue(e,t=Bs()){let n=0,r,i;return()=>(n++,_e(()=>{n--,queueMicrotask(()=>{!n&&i&&(i(),i=r=void 0)})}),i||Kr(s=>r=e(i=s),t),r)}function yue(e){const t=Bs(),n=vue(e,t);return()=>tn.context?Kr(e,t):n()}function ou(e,t=!1){const n=window.matchMedia(e),[r,i]=mue(t,()=>n.matches);return on(n,"change",()=>i(n.matches)),r}function bue(e){return ou("(prefers-color-scheme: dark)",e)}bue.bind(void 0,!1);const wue=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function bA(e){const t={};let n;for(;n=wue.exec(e);)t[n[1]]=n[2];return t}function gs(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=bA(e)}else typeof t=="string"&&(t=bA(t));return{...e,...t}}function Cn(...e){return fue(e)}function xue(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function SS(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kue(e){return typeof e=="number"}function Qh(e){return Object.prototype.toString.call(e)==="[object String]"}function h1(e){return typeof e=="function"}function ps(e){return t=>`${e()}-${t}`}function Sue(){const e=new Map,t=(i,s,o,a)=>{const l=a?.once?(...c)=>{e.delete(o),o(...c)}:o;e.set(o,{type:s,eventTarget:i,fn:l,options:a}),i.addEventListener(s,o,a)},n=(i,s,o,a)=>{const l=e.get(o)?.fn||o;i.removeEventListener(s,l,a),e.delete(o)},r=()=>{e.forEach((i,s)=>{n(i.eventTarget,i.type,s,i.options)})};return _e(()=>{r()}),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Ti(e,t){return e?e===t||e.contains(t):!1}function H0(e,t=!1){const{activeElement:n}=co(e);if(!n?.nodeName)return null;if(zz(n)&&n.contentDocument)return H0(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=co(n).getElementById(r);if(i)return i}}return n}function mC(e){return co(e).defaultView||window}function co(e){return e?e.ownerDocument||e:document}function zz(e){return e.tagName==="IFRAME"}var Kx=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(Kx||{});function Hz(e){return typeof window>"u"||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function gC(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function m1(){return gC(/^Mac/i)}function _ue(){return gC(/^iPhone/i)}function Cue(){return gC(/^iPad/i)||m1()&&navigator.maxTouchPoints>1}function Tue(){return _ue()||Cue()}function Eue(){return m1()||Tue()}function jz(){return Hz(/AppleWebKit/i)&&!Iue()}function Iue(){return Hz(/Chrome/i)}function Ft(e,t){return t&&(h1(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function _n(e){return t=>{for(const n of e)Ft(t,n)}}function Due(e){return m1()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function Yr(e){if(e)if(Aue())e.focus({preventScroll:!0});else{const t=Lue(e);e.focus(),Mue(t)}}var by=null;function Aue(){if(by==null){by=!1;try{document.createElement("div").focus({get preventScroll(){return by=!0,!0}})}catch{}}return by}function Lue(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight{if(zz(i)&&i.contentDocument){const o=i.contentDocument.body,a=qz(o,!1);r.splice(s,1,...a)}}),r}function wA(e){return Uz(e)&&!Oue(e)}function Uz(e){return e.matches(pC)&&vC(e)}function Oue(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function vC(e,t){return e.nodeName!=="#comment"&&Rue(e)&&Fue(e,t)&&(!e.parentElement||vC(e.parentElement,e))}function Rue(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:i}=e.ownerDocument.defaultView,{display:s,visibility:o}=i(e);r=s!=="none"&&o!=="hidden"&&o!=="collapse"}return r}function Fue(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Wz(e,t,n){const r=t?.tabbable?Pue:pC,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){return t?.from?.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&vC(s)&&(!t?.accept||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(i.currentNode=t.from),i}function xA(e){let t=e;for(;t&&!Nue(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function Nue(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Vue(){}function Kz(e){return[e.clientX,e.clientY]}function yC(e,t){const[n,r]=e;let i=!1;const s=t.length;for(let o=s,a=0,l=o-1;a=f&&r0&&(r===f?r>m&&(i=!i):i=!i)}}else if(uu&&r<=f){if(g===0)return!0;g<0&&(r===f?r=d&&n<=c||n>=c&&n<=d))return!0}return i}function Ot(e,t){return fe(e,t)}var o0=new Map,kA=new Set;function SA(){if(typeof window>"u")return;const e=n=>{if(!n.target)return;let r=o0.get(n.target);r||(r=new Set,o0.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=o0.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),o0.delete(n.target)),o0.size===0)){for(const i of kA)i();kA.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?SA():document.addEventListener("DOMContentLoaded",SA));function _S(e,t){const n=_A(e,t,"left"),r=_A(e,t,"top"),i=t.offsetWidth,s=t.offsetHeight;let o=e.scrollLeft,a=e.scrollTop;const l=o+e.offsetWidth,c=a+e.offsetHeight;n<=o?o=n:n+i>l&&(o+=n+i-l),r<=a?a=r:r+s>c&&(a+=r+s-c),e.scrollLeft=o,e.scrollTop=a}function _A(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function zue(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let i=xA(e);for(;e&&i&&e!==n&&i!==n;)_S(i,e),e=i,i=xA(e)}else{const{left:i,top:s}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});const{left:o,top:a}=e.getBoundingClientRect();(Math.abs(i-o)>1||Math.abs(s-a)>1)&&e.scrollIntoView?.({block:"nearest"})}}}var Gx={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"},Qp="data-kb-top-layer",Gz,CS=!1,Xc=[];function Jp(e){return Xc.findIndex(t=>t.node===e)}function Hue(e){return Xc[Jp(e)]}function jue(e){return Xc[Xc.length-1].node===e}function Zz(){return Xc.filter(e=>e.isPointerBlocking)}function Bue(){return[...Zz()].slice(-1)[0]}function bC(){return Zz().length>0}function Yz(e){const t=Jp(Bue()?.node);return Jp(e)e.onMountAutoFocus?.(g),a=g=>e.onUnmountAutoFocus?.(g),l=()=>co(t()),c=()=>{const g=l().createElement("span");return g.setAttribute("data-focus-trap",""),g.tabIndex=0,Object.assign(g.style,Gx),g},u=()=>{const g=t();return g?qz(g,!0).filter(p=>!p.hasAttribute("data-focus-trap")):[]},d=()=>{const g=u();return g.length>0?g[0]:null},f=()=>{const g=u();return g.length>0?g[g.length-1]:null},m=()=>{const g=t();if(!g)return!1;const p=H0(g);return!p||Ti(g,p)?!1:Uz(p)};ae(()=>{const g=t();if(!g)return;TA.add(i);const p=H0(g);if(!Ti(g,p)){const v=new CustomEvent(v3,CA);g.addEventListener(v3,o),g.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{Yr(d()),H0(g)===p&&Yr(g)},0)}_e(()=>{g.removeEventListener(v3,o),setTimeout(()=>{const v=new CustomEvent(y3,CA);m()&&v.preventDefault(),g.addEventListener(y3,a),g.dispatchEvent(v),v.defaultPrevented||Yr(p??l().body),g.removeEventListener(y3,a),TA.remove(i)},0)})}),ae(()=>{const g=t();if(!g||!Be(e.trapFocus)||n())return;const p=v=>{const b=v.target;b?.closest(`[${Qp}]`)||(Ti(g,b)?s=b:Yr(s))},y=v=>{const w=v.relatedTarget??H0(g);w?.closest(`[${Qp}]`)||Ti(g,w)||Yr(s)};l().addEventListener("focusin",p),l().addEventListener("focusout",y),_e(()=>{l().removeEventListener("focusin",p),l().removeEventListener("focusout",y)})}),ae(()=>{const g=t();if(!g||!Be(e.trapFocus)||n())return;const p=c();g.insertAdjacentElement("afterbegin",p);const y=c();g.insertAdjacentElement("beforeend",y);function v(w){const x=d(),k=f();w.relatedTarget===x?Yr(k):Yr(x)}p.addEventListener("focusin",v),y.addEventListener("focusin",v);const b=new MutationObserver(w=>{for(const x of w)x.previousSibling===y&&(y.remove(),g.insertAdjacentElement("beforeend",y)),x.nextSibling===p&&(p.remove(),g.insertAdjacentElement("afterbegin",p))});b.observe(g,{childList:!0,subtree:!1}),_e(()=>{p.removeEventListener("focusin",v),y.removeEventListener("focusin",v),p.remove(),y.remove(),b.disconnect()})})}var Zue="data-live-announcer";function Yx(e){ae(()=>{Be(e.isDisabled)||_e(Yue(Be(e.targets),Be(e.root)))})}var a0=new WeakMap,ya=[];function Yue(e,t=document.body){const n=new Set(e),r=new Set,i=l=>{for(const f of l.querySelectorAll(`[${Zue}], [${Qp}]`))n.add(f);const c=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const m of n)if(f.contains(m))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},u=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(l);if(d===NodeFilter.FILTER_ACCEPT&&s(l),d!==NodeFilter.FILTER_REJECT){let f=u.nextNode();for(;f!=null;)s(f),f=u.nextNode()}},s=l=>{const c=a0.get(l)??0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),a0.set(l,c+1))};ya.length&&ya[ya.length-1].disconnect(),i(t);const o=new MutationObserver(l=>{for(const c of l)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(u=>u.contains(c.target))){for(const u of c.removedNodes)u instanceof Element&&(n.delete(u),r.delete(u));for(const u of c.addedNodes)(u instanceof HTMLElement||u instanceof SVGElement)&&(u.dataset.liveAnnouncer==="true"||u.dataset.reactAriaTopLayer==="true")?n.add(u):u instanceof Element&&i(u)}});o.observe(t,{childList:!0,subtree:!0});const a={observe(){o.observe(t,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return ya.push(a),()=>{o.disconnect();for(const l of r){const c=a0.get(l);if(c==null)return;c===1?(l.removeAttribute("aria-hidden"),a0.delete(l)):a0.set(l,c-1)}a===ya[ya.length-1]?(ya.pop(),ya.length&&ya[ya.length-1].observe()):ya.splice(ya.indexOf(a),1)}}var EA="interactOutside.pointerDownOutside",IA="interactOutside.focusOutside";function Xue(e,t){let n,r=Vue;const i=()=>co(t()),s=d=>e.onPointerDownOutside?.(d),o=d=>e.onFocusOutside?.(d),a=d=>e.onInteractOutside?.(d),l=d=>{const f=d.target;return!(f instanceof Element)||f.closest(`[${Qp}]`)||!Ti(i(),f)||Ti(t(),f)?!1:!e.shouldExcludeElement?.(f)},c=d=>{function f(){const m=t(),g=d.target;if(!m||!g||!l(d))return;const p=_n([s,a]);g.addEventListener(EA,p,{once:!0});const y=new CustomEvent(EA,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||Due(d)&&d.button===0}});g.dispatchEvent(y)}d.pointerType==="touch"?(i().removeEventListener("click",f),r=f,i().addEventListener("click",f,{once:!0})):f()},u=d=>{const f=t(),m=d.target;if(!f||!m||!l(d))return;const g=_n([o,a]);m.addEventListener(IA,g,{once:!0});const p=new CustomEvent(IA,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});m.dispatchEvent(p)};ae(()=>{Be(e.isDisabled)||(n=window.setTimeout(()=>{i().addEventListener("pointerdown",c,!0)},0),i().addEventListener("focusin",u,!0),_e(()=>{window.clearTimeout(n),i().removeEventListener("click",r),i().removeEventListener("pointerdown",c,!0),i().removeEventListener("focusin",u,!0)}))})}function Que(e){const t=n=>{n.key===Kx.Escape&&e.onEscapeKeyDown?.(n)};ae(()=>{if(Be(e.isDisabled))return;const n=e.ownerDocument?.()??co();n.addEventListener("keydown",t),_e(()=>{n.removeEventListener("keydown",t)})})}function Yt(e){const[t,n]=Se(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return h(Qi,fe(n,{get component(){return t.as}}))}var Xz=kn();function Jue(){return hn(Xz)}function wg(e){let t;const n=Jue(),[r,i]=Se(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),s=new Set([]),o=d=>{s.add(d);const f=n?.registerNestedLayer(d);return()=>{s.delete(d),f?.()}};Xue({shouldExcludeElement:d=>t?r.excludedElements?.some(f=>Ti(f(),d))||[...s].some(f=>Ti(f,d)):!1,onPointerDownOutside:d=>{!t||Do.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!Do.isTopMostLayer(t)||(r.onPointerDownOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.())},onFocusOutside:d=>{r.onFocusOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.()}},()=>t),Que({ownerDocument:()=>co(t),onEscapeKeyDown:d=>{!t||!Do.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),sn(()=>{if(!t)return;Do.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);Do.assignPointerEventToLayers(),Do.disableBodyPointerEvents(t),_e(()=>{t&&(Do.removeLayer(t),d?.(),Do.assignPointerEventToLayers(),Do.restoreBodyPointerEvents(t))})}),ae(pt([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const m=Do.find(d);m&&m.isPointerBlocking!==f&&(m.isPointerBlocking=f,Do.assignPointerEventToLayers()),f&&Do.disableBodyPointerEvents(d),_e(()=>{Do.restoreBodyPointerEvents(d)})},{defer:!0}));const u={registerNestedLayer:o};return h(Xz.Provider,{value:u,get children(){return h(Yt,fe({as:"div",ref(d){var f=Cn(m=>t=m,r.ref);typeof f=="function"&&f(d)}},i))}})}function ih(e){const[t,n]=De(e.defaultValue?.()),r=I(()=>e.value?.()!==void 0),i=I(()=>r()?e.value?.():t());return[i,o=>{jt(()=>{const a=hue(o,i());return Object.is(a,i())||(r()||n(a),e.onChange?.(a)),a})}]}function Qz(e){const[t,n]=ih(e);return[()=>t()??!1,n]}function ede(e){const[t,n]=ih(e);return[()=>t()??[],n]}function au(e={}){const[t,n]=Qz({value:()=>Be(e.open),defaultValue:()=>!!Be(e.defaultOpen),onChange:o=>e.onOpenChange?.(o)}),r=()=>{n(!0)},i=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:i,toggle:()=>{t()?i():r()}}}function g1(e,t){const[n,r]=De(DA(t?.()));return ae(()=>{r(e()?.tagName.toLowerCase()||DA(t?.()))}),n}function DA(e){return Qh(e)?e:void 0}var tde=Object.defineProperty,vs=(e,t)=>{for(var n in t)tde(e,n,{get:t[n],enumerable:!0})},nde={};vs(nde,{Button:()=>p1,Root:()=>nc});var rde=["button","color","file","image","reset","submit"];function ide(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?rde.indexOf(e.type)!==-1:!1}function nc(e){let t;const n=Ot({type:"button"},e),[r,i]=Se(n,["ref","type","disabled"]),s=g1(()=>t,()=>"button"),o=I(()=>{const c=s();return c==null?!1:ide({tagName:c,type:r.type})}),a=I(()=>s()==="input"),l=I(()=>s()==="a"&&t?.getAttribute("href")!=null);return h(Yt,fe({as:"button",ref(c){var u=Cn(d=>t=d,r.ref);typeof u=="function"&&u(c)},get type(){return we(()=>!!(o()||a()))()?r.type:void 0},get role(){return!o()&&!l()?"button":void 0},get tabIndex(){return!o()&&!l()&&!r.disabled?0:void 0},get disabled(){return we(()=>!!(o()||a()))()?r.disabled:void 0},get"aria-disabled"(){return!o()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},i))}var p1=nc;function Dr(e){return t=>(e(t),()=>e(void 0))}var bt=e=>typeof e=="function"?e():e,sde=e=>(...t)=>{for(const n of e)n&&n(...t)},Xx=(...e)=>sde(e),wC=(...e)=>e.some(t=>!!t()),ode=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function ade(e){const t={};let n;for(;n=ode.exec(e);)t[n[1]]=n[2];return t}function xC(e,t){return typeof t=="string"&&(t=ade(t)),{...e,...t}}var kp=e=>requestAnimationFrame(()=>requestAnimationFrame(e)),Jz=(e,t)=>(e&&(typeof e=="function"?e(t):e[0](e[1],t)),t.defaultPrevented),Km=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},wy=new Map,lde=e=>{ae(()=>{const t=bt(e.style)??{},n=bt(e.properties)??[],r={};for(const s in t)r[s]=e.element.style[s];const i=wy.get(e.key);i?i.activeCount++:wy.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(s=>s.key)}),Object.assign(e.element.style,e.style);for(const s of n)e.element.style.setProperty(s.key,s.value);_e(()=>{const s=wy.get(e.key);if(s){if(s.activeCount!==1){s.activeCount--;return}wy.delete(e.key);for(const[o,a]of Object.entries(s.originalStyles))e.element.style[o]=a;for(const o of s.properties)e.element.style.removeProperty(o);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},TS=lde,cde=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},ude=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},eH=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let i=e,s=0,o=0,a=!1;do{const[l,c,u]=cde(i,t),d=u-l-r*c;(c!==0||d!==0)&&ude(i,t)&&(s+=d,o+=c),i===(n??document.documentElement)?a=!0:i=i._$host??i.parentElement}while(i&&!a);return[s,o]},[AA,LA]=De([]),dde=e=>AA().indexOf(e)===AA().length-1,fde=e=>{const t=fe({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=er();let r=[0,0],i=null,s=null;ae(()=>{bt(t.enabled)&&(LA(c=>[...c,n]),_e(()=>{LA(c=>c.filter(u=>u!==n))}))}),ae(()=>{if(!bt(t.enabled)||!bt(t.hideScrollbar))return;const{body:c}=document,u=window.innerWidth-c.offsetWidth;if(bt(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];u>0&&(bt(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${u}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${u}px)`,f.push({key:"--scrollbar-width",value:`${u}px`}));const m=window.scrollY,g=window.scrollX;TS({key:"prevent-scroll",element:c,style:d,properties:f,cleanup:()=>{bt(t.restoreScrollPosition)&&u>0&&window.scrollTo(g,m)}})}else TS({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),ae(()=>{!dde(n)||!bt(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",o,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),_e(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",l)}))});const o=c=>{r=MA(c),i=null,s=null},a=c=>{const u=c.target,d=bt(t.element),f=hde(c),m=Math.abs(f[0])>Math.abs(f[1])?"x":"y",g=m==="x"?f[0]:f[1],p=$A(u,m,g,d);let y;d&&Km(d,u)?y=!p:y=!0,y&&c.cancelable&&c.preventDefault()},l=c=>{const u=bt(t.element),d=c.target;let f;if(c.touches.length===2)f=!bt(t.allowPinchZoom);else{if(i==null||s===null){const m=MA(c).map((p,y)=>r[y]-p),g=Math.abs(m[0])>Math.abs(m[1])?"x":"y";i=g,s=g==="x"?m[0]:m[1]}if(d.type==="range")f=!1;else{const m=$A(d,i,s,u);u&&Km(u,d)?f=!m:f=!0}}f&&c.cancelable&&c.preventDefault()}},hde=e=>[e.deltaX,e.deltaY],MA=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],$A=(e,t,n,r)=>{const i=r!==null&&Km(r,e),[s,o]=eH(e,t,i?r:void 0);return!(n>0&&Math.abs(s)<=1||n<0&&Math.abs(o)<1)},mde=fde,v1=mde,gde=e=>{const t=I(()=>{const o=bt(e.element);if(o)return getComputedStyle(o)}),n=()=>t()?.animationName??"none",[r,i]=De(bt(e.show)?"present":"hidden");let s="none";return ae(o=>{const a=bt(e.show);return jt(()=>{if(o===a)return a;const l=s,c=n();a?i("present"):c==="none"||t()?.display==="none"?i("hidden"):i(o===!0&&l!==c?"hiding":"hidden")}),a}),ae(()=>{const o=bt(e.element);if(!o)return;const a=c=>{c.target===o&&(s=n())},l=c=>{const d=n().includes(c.animationName);c.target===o&&d&&r()==="hiding"&&i("hidden")};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",l),o.addEventListener("animationend",l),_e(()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",l),o.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:i}},pde=gde,za=pde,vde={};vs(vde,{CloseButton:()=>nH,Content:()=>rH,Description:()=>iH,Dialog:()=>to,Overlay:()=>sH,Portal:()=>oH,Root:()=>aH,Title:()=>lH,Trigger:()=>cH,useDialogContext:()=>Ed});var tH=kn();function Ed(){const e=hn(tH);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function nH(e){const t=Ed(),[n,r]=Se(e,["aria-label","onClick"]);return h(nc,fe({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:s=>{Ft(s,n.onClick),t.close()}},r))}function rH(e){let t;const n=Ed(),r=Ot({id:n.generateId("content")},e),[i,s]=Se(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let o=!1,a=!1;const l=f=>{i.onPointerDownOutside?.(f),n.modal()&&f.detail.isContextMenu&&f.preventDefault()},c=f=>{i.onFocusOutside?.(f),n.modal()&&f.preventDefault()},u=f=>{i.onInteractOutside?.(f),!n.modal()&&(f.defaultPrevented||(o=!0,f.detail.originalEvent.type==="pointerdown"&&(a=!0)),Ti(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a&&f.preventDefault())},d=f=>{i.onCloseAutoFocus?.(f),n.modal()?(f.preventDefault(),Yr(n.triggerRef())):(f.defaultPrevented||(o||Yr(n.triggerRef()),f.preventDefault()),o=!1,a=!1)};return Yx({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),v1({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),Zx({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:i.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),ae(()=>_e(n.registerContentId(s.id))),h(j,{get when(){return n.contentPresent()},get children(){return h(wg,fe({ref(f){var m=Cn(g=>{n.setContentRef(g),t=g},i.ref);typeof m=="function"&&m(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return we(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,get onDismiss(){return n.close}},s))}})}function iH(e){const t=Ed(),n=Ot({id:t.generateId("description")},e),[r,i]=Se(n,["id"]);return ae(()=>_e(t.registerDescriptionId(r.id))),h(Yt,fe({as:"p",get id(){return r.id}},i))}function sH(e){const t=Ed(),[n,r]=Se(e,["ref","style","onPointerDown"]),i=s=>{Ft(s,n.onPointerDown),s.target===s.currentTarget&&s.preventDefault()};return h(j,{get when(){return t.overlayPresent()},get children(){return h(Yt,fe({as:"div",ref(s){var o=Cn(t.setOverlayRef,n.ref);typeof o=="function"&&o(s)},get style(){return gs({"pointer-events":"auto"},n.style)},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:i},r))}})}function oH(e){const t=Ed();return h(j,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return h(To,e)}})}var PA={dismiss:"Dismiss"};function aH(e){const t=`dialog-${er()}`,n=Ot({id:t,modal:!0,translations:PA},e),[r,i]=De(),[s,o]=De(),[a,l]=De(),[c,u]=De(),[d,f]=De(),[m,g]=De(),p=au({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:x=>n.onOpenChange?.(x)}),y=()=>n.forceMount||p.isOpen(),{present:v}=za({show:y,element:()=>c()??null}),{present:b}=za({show:y,element:()=>d()??null}),w={translations:()=>n.translations??PA,isOpen:p.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??w.modal(),contentId:r,titleId:s,descriptionId:a,triggerRef:m,overlayRef:c,setOverlayRef:u,contentRef:d,setContentRef:f,overlayPresent:v,contentPresent:b,close:p.close,toggle:p.toggle,setTriggerRef:g,generateId:ps(()=>n.id),registerContentId:Dr(i),registerTitleId:Dr(o),registerDescriptionId:Dr(l)};return h(tH.Provider,{value:w,get children(){return n.children}})}function lH(e){const t=Ed(),n=Ot({id:t.generateId("title")},e),[r,i]=Se(n,["id"]);return ae(()=>_e(t.registerTitleId(r.id))),h(Yt,fe({as:"h2",get id(){return r.id}},i))}function cH(e){const t=Ed(),[n,r]=Se(e,["ref","onClick"]);return h(nc,fe({ref(s){var o=Cn(t.setTriggerRef,n.ref);typeof o=="function"&&o(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return we(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:s=>{Ft(s,n.onClick),t.toggle()}},r))}var to=Object.assign(aH,{CloseButton:nH,Content:rH,Description:iH,Overlay:sH,Portal:oH,Title:lH,Trigger:cH}),yde=$("
"),bde=$("
");const uH=kn();function wde(){const[e,t]=De([]),n={current:void 0},r={value:!1};_e(()=>{n.current!==void 0&&(clearTimeout(n.current),n.current=void 0)});const i=l=>{const c=e(),u=l?c.find(f=>f.id===l):c.at(-1);if(!u||r.value)return;r.value=!0,u.onClose?.(),u.setClosing(!0);const d=u.id;n.current!==void 0&&(clearTimeout(n.current),n.current=void 0),n.current=setTimeout(()=>{n.current=void 0,u.dispose(),t(f=>f.filter(m=>m.id!==d)),r.value=!1},100)};ae(()=>{if(e().length===0)return;on(window,"keydown",c=>{c.key==="Escape"&&(i(),c.preventDefault(),c.stopPropagation())},{capture:!0})});const s=(l,c,u,d)=>{const f=Math.random().toString(36).slice(2),m=50+d*10;let g,p;const y=$c(c,()=>Kr(b=>{g=b;const[w,x]=De(!1);return p=x,h(to,{modal:!0,get open(){return!w()},onOpenChange:k=>{k||i(f)},get children(){return h(to.Portal,{get children(){return[h(to.Overlay,{"data-component":"dialog-overlay",get style(){return{"z-index":String(m)}},onClick:()=>i(f)}),(()=>{var k=yde();return pe(k,"data-dialog-layer",d),S(k,l),ge(_=>_t(k,"z-index",String(m))),k})()]}})}})}));if(!g||!p)return;const v={id:f,node:y,dispose:g,owner:c,onClose:u,setClosing:p};t(b=>[...b,v])};return{stack:e,close:i,show:(l,c,u)=>{for(const d of e())d.dispose();t([]),n.current!==void 0&&(clearTimeout(n.current),n.current=void 0),r.value=!1,s(l,c,u,0)},push:(l,c,u)=>{n.current!==void 0&&(clearTimeout(n.current),n.current=void 0),r.value=!1,s(l,c,u,e().length)}}}function xde(e){const t=wde();return h(uH.Provider,{value:t,get children(){return[we(()=>e.children),(()=>{var n=bde();return S(n,h(Dt,{get each(){return t.stack()},children:r=>r.node})),n})()]}})}function Rr(){const e=hn(uH),t=Bs();if(!t)throw new Error("useDialog must be used within a DialogProvider");if(!e)throw new Error("useDialog must be used within a DialogProvider");return{get active(){return e.stack().at(-1)},show(n,r){const i=e.stack().at(-1)?.owner??t;return Xs(()=>e.show(n,i,r))},push(n,r){const i=e.stack().at(-1)?.owner??t;return Xs(()=>e.push(n,i,r))},close(){e.close()}}}const dH={"ui.sessionReview.title":"Session changes","ui.sessionReview.title.git":"Git changes","ui.sessionReview.title.branch":"Branch changes","ui.sessionReview.title.lastTurn":"Last turn changes","ui.sessionReview.diffStyle.unified":"Unified","ui.sessionReview.diffStyle.split":"Split","ui.sessionReview.expandAll":"Expand all","ui.sessionReview.collapseAll":"Collapse all","ui.sessionReview.change.added":"Added","ui.sessionReview.change.removed":"Removed","ui.sessionReview.change.modified":"Modified","ui.sessionReview.image.loading":"Loading...","ui.sessionReview.image.placeholder":"Image","ui.sessionReview.largeDiff.title":"Diff too large to render","ui.sessionReview.largeDiff.meta":"Limit: {{limit}} changed lines. Current: {{current}} changed lines.","ui.sessionReview.largeDiff.renderAnyway":"Render anyway","ui.sessionReviewV2.expandMode":"Expand or collapse diff","ui.sessionReviewV2.filterFiles":"Filter files","ui.sessionReviewV2.toggleSidebar":"Toggle file tree","ui.sessionReviewV2.showAllLines":"Show all lines","ui.sessionReviewV2.hideNonDiffLines":"Hide non-diff lines","ui.sessionReviewV2.unifiedDiff":"Unified diff","ui.sessionReviewV2.splitDiff":"Split diff","ui.sessionReviewV2.previousFile":"Previous file","ui.sessionReviewV2.nextFile":"Next file","ui.sessionReviewV2.diffView":"Diff view","ui.sessionReviewV2.empty.noGit.title":"No tracked changes","ui.sessionReviewV2.empty.noGit.description":"Track, review, and undo changes in this project","ui.sessionReviewV2.empty.noGit.action":"Create Git repository","ui.sessionReviewV2.empty.noGit.actionLoading":"Creating Git repository...","ui.sessionReviewV2.empty.changes.title":"No file changes yet","ui.sessionReviewV2.empty.changes.description":"Project changes will appear here","ui.sessionReview.openFile":"Open file","ui.sessionReview.selection.line":"line {{line}}","ui.sessionReview.selection.lines":"lines {{start}}-{{end}}","ui.fileMedia.kind.image":"image","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"Removed {{kind}} file.","ui.fileMedia.state.loading":"Loading {{kind}}...","ui.fileMedia.state.error":"Unable to load {{kind}}.","ui.fileMedia.state.unavailable":"{{kind}} preview unavailable.","ui.fileMedia.binary.title":"Binary file","ui.fileMedia.binary.description.path":"{{path}} is binary.","ui.fileMedia.binary.description.default":"Binary content","ui.lineComment.label.prefix":"Comment on ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Commenting on ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Add comment","ui.lineComment.submit":"Comment","ui.lineComment.cancel":"Cancel","ui.sessionTurn.steps.show":"Show steps","ui.sessionTurn.steps.hide":"Hide steps","ui.sessionTurn.summary.response":"Response","ui.sessionTurn.diff.showMore":"Show more changes ({{count}})","ui.sessionTurn.diffs.changed.one":"{{count}} Changed file","ui.sessionTurn.diffs.changed.other":"{{count}} Changed files","ui.sessionTurn.diffs.showAll":"Show all","ui.sessionTurn.diffs.showLess":"Show less","ui.sessionTurn.diffs.more":"+{{count}} more files","ui.sessionTurn.retry.retrying":"retrying","ui.sessionTurn.retry.inSeconds":"in {{seconds}}s","ui.sessionTurn.retry.attempt":"attempt #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - attempt #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini is way too hot right now","ui.sessionTurn.error.freeUsageExceeded":"Free usage exceeded","ui.sessionTurn.error.addCredits":"Add credits","dialog.usageExceeded.freeTier.title":"Free limit reached","dialog.usageExceeded.freeTier.description":"Subscribe to OpenCode Go for reliable access to the best open-source models, starting at $5/month.","dialog.usageExceeded.freeTier.actionLabel":"Subscribe","dialog.usageExceeded.accountRateLimit.title":"Go limit reached","dialog.usageExceeded.accountRateLimit.description":"Usage limit reached. To continue using this model now, enable usage from your available balance","dialog.usageExceeded.accountRateLimit.actionLabel":"Open settings","ui.sessionTurn.status.delegating":"Delegating work","ui.sessionTurn.status.planning":"Planning next steps","ui.sessionTurn.status.gatheringContext":"Exploring","ui.sessionTurn.status.gatheredContext":"Explored","ui.sessionTurn.status.searchingCodebase":"Searching the codebase","ui.sessionTurn.status.searchingWeb":"Searching the web","ui.sessionTurn.status.makingEdits":"Making edits","ui.sessionTurn.status.runningCommands":"Running commands","ui.sessionTurn.status.thinking":"Thinking","ui.sessionTurn.status.thinkingWithTopic":"Thinking - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Gathering thoughts","ui.sessionTurn.status.consideringNextSteps":"Considering next steps","ui.messagePart.diagnostic.error":"Error","ui.messagePart.title.edit":"Edit","ui.messagePart.title.write":"Write","ui.messagePart.option.typeOwnAnswer":"Type your own answer","ui.messagePart.review.title":"Review your answers","ui.messagePart.questions.dismissed":"Questions dismissed","ui.messagePart.compaction":"Session compacted","ui.messagePart.context.read.one":"{{count}} read","ui.messagePart.context.read.other":"{{count}} reads","ui.messagePart.context.search.one":"{{count}} search","ui.messagePart.context.search.other":"{{count}} searches","ui.messagePart.context.list.one":"{{count}} list","ui.messagePart.context.list.other":"{{count}} lists","ui.list.loading":"Loading","ui.list.empty":"No results","ui.list.clearFilter":"Clear filter","ui.list.emptyWithFilter.prefix":"No results for","ui.list.emptyWithFilter.suffix":"","ui.fileSearch.placeholder":"Find","ui.fileSearch.previousMatch":"Previous match","ui.fileSearch.nextMatch":"Next match","ui.fileSearch.close":"Close search","ui.messageNav.newMessage":"New message","ui.textField.copyToClipboard":"Copy to clipboard","ui.textField.copyLink":"Copy link","ui.textField.copied":"Copied","ui.imagePreview.alt":"Image preview","ui.scrollView.ariaLabel":"scrollable content","ui.tool.read":"Read","ui.tool.loaded":"Loaded","ui.tool.list":"List","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.task":"Task","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Web Search","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"To-dos","ui.tool.todos.read":"Read to-dos","ui.tool.questions":"Questions","ui.tool.agent":"{{type}} Agent","ui.tool.agent.default":"Agent","ui.tool.skill":"Skill","ui.basicTool.called":"Called `{{tool}}`","ui.toolErrorCard.failed":"Failed","ui.toolErrorCard.copyError":"Copy error","ui.common.file.one":"file","ui.common.file.other":"files","ui.common.question.one":"question","ui.common.question.other":"questions","ui.common.add":"Add","ui.common.back":"Back","ui.common.cancel":"Cancel","ui.common.confirm":"Confirm","ui.common.dismiss":"Dismiss","ui.common.close":"Close","ui.common.next":"Next","ui.common.submit":"Submit","ui.common.showMore":"Show more","ui.permission.deny":"Deny","ui.permission.allowAlways":"Allow always","ui.permission.allowOnce":"Allow once","ui.message.expand":"Expand message","ui.message.collapse":"Collapse message","ui.message.copy":"Copy","ui.message.copyMessage":"Copy message","ui.message.forkMessage":"Fork to new session","ui.message.revertMessage":"Revert message","ui.message.copyResponse":"Copy response","ui.message.copied":"Copied","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s","ui.message.interrupted":"Interrupted","ui.message.queued":"Queued","ui.message.attachment.alt":"attachment","ui.patch.action.deleted":"Deleted","ui.patch.action.created":"Created","ui.patch.action.moved":"Moved","ui.patch.action.patched":"Patched","ui.question.subtitle.answered":"{{count}} answered","ui.question.answer.none":"(no answer)","ui.question.review.notAnswered":"(not answered)","ui.question.multiHint":"Select all answers that apply","ui.question.singleHint":"Select one answer","ui.question.custom.placeholder":"Type your answer..."};function kde(e,t){return t?e.replace(/{{\s*([^}]+?)\s*}}/g,(n,r)=>{const i=String(r),s=t[i];return s===void 0?"":String(s)}):e}const Sde={locale:()=>"en",t:(e,t)=>{const n=dH[e]??String(e);return kde(n,t)}},fH=kn(Sde);function _de(e){return h(fH.Provider,{get value(){return e.value},get children(){return e.children}})}function Mn(){return hn(fH)}function kC(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var sh=kC();function hH(e){sh=e}var mf={exec:()=>null};function rr(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(no.caret,"$1"),n=n.replace(i,o),r},getRegex:()=>new RegExp(n,t)};return r}var Cde=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Tde=/^(?:[ \t]*(?:\n|$))+/,Ede=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ide=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,y1=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Dde=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,SC=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,mH=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,gH=rr(mH).replace(/bull/g,SC).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ade=rr(mH).replace(/bull/g,SC).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_C=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Lde=/^[^\n]+/,CC=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Mde=rr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",CC).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$de=rr(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,SC).getRegex(),Qx="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",TC=/|$))/,Pde=rr("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",TC).replace("tag",Qx).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pH=rr(_C).replace("hr",y1).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Qx).getRegex(),Ode=rr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pH).getRegex(),EC={blockquote:Ode,code:Ede,def:Mde,fences:Ide,heading:Dde,hr:y1,html:Pde,lheading:gH,list:$de,newline:Tde,paragraph:pH,table:mf,text:Lde},OA=rr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",y1).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Qx).getRegex(),Rde={...EC,lheading:Ade,table:OA,paragraph:rr(_C).replace("hr",y1).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",OA).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Qx).getRegex()},Fde={...EC,html:rr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",TC).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:mf,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:rr(_C).replace("hr",y1).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",gH).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Nde=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Vde=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vH=/^( {2,}|\\)\n(?!\s*$)/,zde=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Cde?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),bH=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Ude=rr(bH,"u").replace(/punct/g,xg).getRegex(),Wde=rr(bH,"u").replace(/punct/g,yH).getRegex(),wH="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Kde=rr(wH,"gu").replace(/notPunctSpace/g,IC).replace(/punctSpace/g,Jx).replace(/punct/g,xg).getRegex(),Gde=rr(wH,"gu").replace(/notPunctSpace/g,Bde).replace(/punctSpace/g,jde).replace(/punct/g,yH).getRegex(),Zde=rr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,IC).replace(/punctSpace/g,Jx).replace(/punct/g,xg).getRegex(),Yde=rr(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,xg).getRegex(),Xde="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Qde=rr(Xde,"gu").replace(/notPunctSpace/g,IC).replace(/punctSpace/g,Jx).replace(/punct/g,xg).getRegex(),Jde=rr(/\\(punct)/,"gu").replace(/punct/g,xg).getRegex(),efe=rr(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),tfe=rr(TC).replace("(?:-->|$)","-->").getRegex(),nfe=rr("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",tfe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ew=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,rfe=rr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ew).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xH=rr(/^!?\[(label)\]\[(ref)\]/).replace("label",ew).replace("ref",CC).getRegex(),kH=rr(/^!?\[(ref)\](?:\[\])?/).replace("ref",CC).getRegex(),ife=rr("reflink|nolink(?!\\()","g").replace("reflink",xH).replace("nolink",kH).getRegex(),RA=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,DC={_backpedal:mf,anyPunctuation:Jde,autolink:efe,blockSkip:qde,br:vH,code:Vde,del:mf,delLDelim:mf,delRDelim:mf,emStrongLDelim:Ude,emStrongRDelimAst:Kde,emStrongRDelimUnd:Zde,escape:Nde,link:rfe,nolink:kH,punctuation:Hde,reflink:xH,reflinkSearch:ife,tag:nfe,text:zde,url:mf},sfe={...DC,link:rr(/^!?\[(label)\]\((.*?)\)/).replace("label",ew).getRegex(),reflink:rr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ew).getRegex()},ES={...DC,emStrongRDelimAst:Gde,emStrongLDelim:Wde,delLDelim:Yde,delRDelim:Qde,url:rr(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",RA).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:rr(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},FA=e=>afe[e];function Al(e,t){if(t){if(no.escapeTest.test(e))return e.replace(no.escapeReplace,FA)}else if(no.escapeTestNoEncode.test(e))return e.replace(no.escapeReplaceNoEncode,FA);return e}function NA(e){try{e=encodeURI(e).replace(no.percentDecode,"%")}catch{return null}return e}function VA(e,t){let n=e.replace(no.findPipe,(s,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(no.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length0?-2:-1}function cfe(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let s=4-n%4;r+=" ".repeat(s),n+=s}else r+=i,n++;return r}function zA(e,t,n,r,i){let s=t.href,o=t.title||null,a=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}function ufe(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` `).map(s=>{let o=s.match(n.other.beginningSpace);if(o===null)return s;let[a]=o;return a.length>=i.length?s.slice(i.length):s}).join(` `)}var tw=class{options;rules;lexer;constructor(t){this.options=t||sh}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:c0(r,` `)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],i=ufe(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){let i=c0(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:c0(n[0],` `)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=c0(n[0],` `).split(` `),i="",s="",o=[];for(;r.length>0;){let a=!1,l=[],c;for(c=0;c1,s={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let o=this.rules.other.listItemRegex(r),a=!1;for(;t;){let c=!1,u="",d="";if(!(n=o.exec(t))||this.rules.block.hr.test(t))break;u=n[0],t=t.substring(u.length);let f=cfe(n[2].split(` `,1)[0],n[1].length),m=t.split(` `,1)[0],g=!f.trim(),p=0;if(this.options.pedantic?(p=2,d=f.trimStart()):g?p=n[1].length+1:(p=f.search(this.rules.other.nonSpaceChar),p=p>4?1:p,d=f.slice(p),p+=n[1].length),g&&this.rules.other.blankLine.test(m)&&(u+=m+` `,t=t.substring(m.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(p),v=this.rules.other.hrRegex(p),b=this.rules.other.fencesBeginRegex(p),w=this.rules.other.headingBeginRegex(p),x=this.rules.other.htmlBeginRegex(p),k=this.rules.other.blockquoteBeginRegex(p);for(;t;){let _=t.split(` `,1)[0],E;if(m=_,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),E=m):E=m.replace(this.rules.other.tabCharGlobal," "),b.test(m)||w.test(m)||x.test(m)||k.test(m)||y.test(m)||v.test(m))break;if(E.search(this.rules.other.nonSpaceChar)>=p||!m.trim())d+=` `+E.slice(p);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(f)||w.test(f)||v.test(f))break;d+=` `+m}g=!m.trim(),u+=_+` `,t=t.substring(_.length+1),f=E.slice(p)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0)),s.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),s.raw+=u}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c of s.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),c.tokens[0]?.type==="text"||c.tokens[0]?.type==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}}let u=this.rules.other.listTaskCheckbox.exec(c.raw);if(u){let d={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};c.checked=d.checked,s.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=d.raw+c.tokens[0].raw,c.tokens[0].text=d.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(d)):c.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):c.tokens.unshift(d)}}if(!s.loose){let u=c.tokens.filter(f=>f.type==="space"),d=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}}if(s.loose)for(let c of s.items){c.loose=!0;for(let u of c.tokens)u.type==="text"&&(u.type="paragraph")}return s}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let r=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:s}}}table(t){let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=VA(n[1]),i=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=n[3]?.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(` `):[],o={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?o.align.push("right"):this.rules.other.tableAlignCenter.test(a)?o.align.push("center"):this.rules.other.tableAlignLeft.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n){let r=n[1].trim();return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let r=n[1].charAt(n[1].length-1)===` `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let o=c0(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{let o=lfe(n[2],"()");if(o===-2)return;if(o>-1){let a=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],s=o[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),zA(n,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=n[i.toLowerCase()];if(!s){let o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return zA(r,s,r[0],this.lexer,this.rules)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!r||this.rules.inline.punctuation.exec(r))){let s=[...i[0]].length-1,o,a,l=s,c=0,u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,n=n.slice(-1*t.length+s);(i=u.exec(n))!==null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(a=[...o].length,i[3]||i[4]){l+=a;continue}else if((i[5]||i[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let d=[...i[0]][0].length,f=t.slice(0,s+i.index+d+a);if(Math.min(s,a)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let m=f.slice(2,-2);return{type:"strong",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t,n,r=""){let i=this.rules.inline.delLDelim.exec(t);if(i&&(!i[1]||!r||this.rules.inline.punctuation.exec(r))){let s=[...i[0]].length-1,o,a,l=s,c=this.rules.inline.delRDelim;for(c.lastIndex=0,n=n.slice(-1*t.length+s);(i=c.exec(n))!==null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o||(a=[...o].length,a!==s))continue;if(i[3]||i[4]){l+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l);let u=[...i[0]][0].length,d=t.slice(0,s+i.index+u+a),f=d.slice(s,-s);return{type:"del",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let r,i;return n[2]==="@"?(r=n[1],i="mailto:"+r):(r=n[1],i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,i;if(n[2]==="@")r=n[0],i="mailto:"+r;else{let s;do s=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(s!==n[0]);r=n[0],n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}},el=class IS{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||sh,this.options.tokenizer=this.options.tokenizer||new tw,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:no,block:xy.normal,inline:l0.normal};this.options.pedantic?(n.block=xy.pedantic,n.inline=l0.pedantic):this.options.gfm&&(n.block=xy.gfm,this.options.breaks?n.inline=l0.breaks:n.inline=l0.gfm),this.tokenizer.rules=n}static get rules(){return{block:xy,inline:l0}}static lex(t,n){return new IS(n).lex(t)}static lexInline(t,n){return new IS(n).inlineTokens(t)}lex(t){t=t.replace(no.carriageReturn,` `),this.blockTokens(t,this.tokens);for(let n=0;n(i=o.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let o=n.at(-1);i.raw.length===1&&o!==void 0?o.raw+=` `:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+i.raw,o.text+=` `+i.text,this.inlineQueue.at(-1).src=o.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+i.raw,o.text+=` `+i.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let s=t;if(this.options.extensions?.startBlock){let o=1/0,a=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},a),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(s=t.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let o=n.at(-1);r&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+i.raw,o.text+=` `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(i),r=s.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let o=n.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+i.raw,o.text+=` `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(i);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let r=t,i=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)l.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)s=i[2]?i[2].length:0,r=r.slice(0,i.index+s)+"["+"a".repeat(i[0].length-s-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let o=!1,a="";for(;t;){o||(a=""),o=!1;let l;if(this.options.extensions?.inline?.some(u=>(l=u.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let u=n.at(-1);l.type==="text"&&u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):n.push(l);continue}if(l=this.tokenizer.emStrong(t,r,a)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.del(t,r,a)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),n.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),n.push(l);continue}let c=t;if(this.options.extensions?.startInline){let u=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(m=>{f=m.call({lexer:this},d),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(c=t.substring(0,u+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(a=l.raw.slice(-1)),o=!0;let u=n.at(-1);u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):n.push(l);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return n}},nw=class{options;parser;constructor(t){this.options=t||sh}space(t){return""}code({text:t,lang:n,escaped:r}){let i=(n||"").match(no.notSpaceStart)?.[0],s=t.replace(no.endingNewline,"")+` `;return i?'
'+(r?s:Al(s,!0))+`
`:"
"+(r?s:Al(s,!0))+`
`}blockquote({tokens:t}){return`
${this.parser.parse(t)}
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`${this.parser.parseInline(t)} `}hr(t){return`
`}list(t){let n=t.ordered,r=t.start,i="";for(let a=0;a `+i+" `}listitem(t){return`
  • ${this.parser.parse(t.tokens)}
  • `}checkbox({checked:t}){return" '}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    `}table(t){let n="",r="";for(let s=0;s${i}`),` `+n+` `+i+`
    `}tablerow({text:t}){return` ${t} `}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+` `}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${Al(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:n,tokens:r}){let i=this.parser.parseInline(r),s=NA(t);if(s===null)return i;t=s;let o='
    ",o}image({href:t,title:n,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let s=NA(t);if(s===null)return Al(r);t=s;let o=`${Al(r)}{let a=s[o].flat(1/0);r=r.concat(this.walkTokens(a,n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=n.renderers[s.name];o?n.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=n[s.level];o?o.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),i.extensions=n),r.renderer){let s=this.defaults.renderer||new nw(this.defaults);for(let o in r.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let a=o,l=r.renderer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d||""}}i.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new tw(this.defaults);for(let o in r.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let a=o,l=r.tokenizer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}i.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new j0;for(let o in r.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let a=o,l=r.hooks[a],c=s[a];j0.passThroughHooks.has(o)?s[a]=u=>{if(this.defaults.async&&j0.passThroughHooksRespectAsync.has(o))return(async()=>{let f=await l.call(s,u);return c.call(s,f)})();let d=l.call(s,u);return c.call(s,d)}:s[a]=(...u)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(s,u);return f===!1&&(f=await c.apply(s,u)),f})();let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}i.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,o=r.walkTokens;i.walkTokens=function(a){let l=[];return l.push(o.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return el.lex(t,n??this.defaults)}parser(t,n){return tl.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},s={...this.defaults,...i},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let a=s.hooks?await s.hooks.preprocess(n):n,l=await(s.hooks?await s.hooks.provideLexer(t):t?el.lex:el.lexInline)(a,s),c=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let u=await(s.hooks?await s.hooks.provideParser(t):t?tl.parse:tl.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(u):u})().catch(o);try{s.hooks&&(n=s.hooks.preprocess(n));let a=(s.hooks?s.hooks.provideLexer(t):t?el.lex:el.lexInline)(n,s);s.hooks&&(a=s.hooks.processAllTokens(a)),s.walkTokens&&this.walkTokens(a,s.walkTokens);let l=(s.hooks?s.hooks.provideParser(t):t?tl.parse:tl.parseInline)(a,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(a){return o(a)}}}onError(t,n){return r=>{if(r.message+=` Please report this to https://github.com/markedjs/marked.`,t){let i="

    An error occurred:

    "+Al(r.message+"",!0)+"
    ";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},Rf=new dfe;function Sr(e,t){return Rf.parse(e,t)}Sr.options=Sr.setOptions=function(e){return Rf.setOptions(e),Sr.defaults=Rf.defaults,hH(Sr.defaults),Sr};Sr.getDefaults=kC;Sr.defaults=sh;Sr.use=function(...e){return Rf.use(...e),Sr.defaults=Rf.defaults,hH(Sr.defaults),Sr};Sr.walkTokens=function(e,t){return Rf.walkTokens(e,t)};Sr.parseInline=Rf.parseInline;Sr.Parser=tl;Sr.parser=tl.parse;Sr.Renderer=nw;Sr.TextRenderer=AC;Sr.Lexer=el;Sr.lexer=el.lex;Sr.Tokenizer=tw;Sr.Hooks=j0;Sr.parse=Sr;Sr.options;Sr.setOptions;Sr.use;Sr.walkTokens;Sr.parseInline;tl.parse;el.lex;function ffe(e={}){const{highlight:t,container:n}=e;return{async:!0,async walkTokens(r){var i;if(r.type!=="code"||typeof t!="function")return;const[s="text",...o]=((i=r.lang)==null?void 0:i.split(" "))??[],{text:a}=r,l=await t(a,s,o),c=n?n.replace("%l",String(s).toUpperCase()).replace("%s",l).replace("%t",a):l;Object.assign(r,{type:"html",block:!0,text:`${c} `})}}}class ko{constructor(t,n,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=n,this.end=r}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new ko(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}}class Wo{constructor(t,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=n}range(t,n){return new Wo(n,ko.range(this,t))}}class ft{constructor(t,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+t,i,s,o=n&&n.loc;if(o&&o.start<=o.end){var a=o.lexer.input;i=o.start,s=o.end,i===a.length?r+=" at end of input: ":r+=" at position "+(i+1)+": ";var l=a.slice(i,s).replace(/[^]/g,"$&̲"),c;i>15?c="…"+a.slice(i-15,i):c=a.slice(0,i);var u;s+15":">","<":"<",'"':""","'":"'"},vfe=/[&><"']/g;function yfe(e){return String(e).replace(vfe,t=>pfe[t])}var SH=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},bfe=function(t){var n=SH(t);return n.type==="mathord"||n.type==="textord"||n.type==="atom"},wfe=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},xfe=function(t){var n=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},hr={deflt:hfe,escape:yfe,hyphenate:gfe,getBaseElem:SH,isCharacterBox:bfe,protocolFromUrl:xfe},o2={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,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 ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function kfe(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if(typeof n!="string")return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}let LC=class{constructor(t){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,t=t||{};for(var n in o2)if(o2.hasOwnProperty(n)){var r=o2[n];this[n]=t[n]!==void 0?r.processor?r.processor(t[n]):t[n]:kfe(r)}}reportNonstrict(t,n,r){var i=this.strict;if(typeof i=="function"&&(i=i(t,n,r)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new ft("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),r);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,r){var i=this.strict;if(typeof i=="function")try{i=i(t,n,r)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+n+" ["+t+"]")),!1)}isTrusted(t){if(t.url&&!t.protocol){var n=hr.protocolFromUrl(t.url);if(n==null)return!1;t.protocol=n}var r=typeof this.trust=="function"?this.trust(t):this.trust;return!!r}};class wu{constructor(t,n,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=n,this.cramped=r}sup(){return Fl[Sfe[this.id]]}sub(){return Fl[_fe[this.id]]}fracNum(){return Fl[Cfe[this.id]]}fracDen(){return Fl[Tfe[this.id]]}cramp(){return Fl[Efe[this.id]]}text(){return Fl[Ife[this.id]]}isTight(){return this.size>=2}}var MC=0,rw=1,Cm=2,qc=3,ev=4,Ia=5,Gm=6,ro=7,Fl=[new wu(MC,0,!1),new wu(rw,0,!0),new wu(Cm,1,!1),new wu(qc,1,!0),new wu(ev,2,!1),new wu(Ia,2,!0),new wu(Gm,3,!1),new wu(ro,3,!0)],Sfe=[ev,Ia,ev,Ia,Gm,ro,Gm,ro],_fe=[Ia,Ia,Ia,Ia,ro,ro,ro,ro],Cfe=[Cm,qc,ev,Ia,Gm,ro,Gm,ro],Tfe=[qc,qc,Ia,Ia,ro,ro,ro,ro],Efe=[rw,rw,qc,qc,Ia,Ia,ro,ro],Ife=[MC,rw,Cm,qc,Cm,qc,Cm,qc],yn={DISPLAY:Fl[MC],TEXT:Fl[Cm],SCRIPT:Fl[ev],SCRIPTSCRIPT:Fl[Gm]},AS=[{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 Dfe(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}var a2=[];AS.forEach(e=>e.blocks.forEach(t=>a2.push(...t)));function _H(e){for(var t=0;t=a2[t]&&e<=a2[t+1])return!0;return!1}var Lh=80,Afe=function(t,n){return"M95,"+(622+t+n)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 c69,-144,104.5,-217.7,106.5,-221 l`+t/2.075+" -"+t+` c5.3,-9.3,12,-14,20,-14 H400000v`+(40+t)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Lfe=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+t/2.084+" -"+t+` c4.7,-7.3,11,-11,19,-11 H40000v`+(40+t)+`H1012.3 s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Mfe=function(t,n){return"M983 "+(10+t+n)+` l`+t/3.13+" -"+t+` c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},$fe=function(t,n){return"M424,"+(2398+t+n)+` c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 v`+(40+t)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+` h400000v`+(40+t)+"h-400000z"},Pfe=function(t,n){return"M473,"+(2713+t+n)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},Ofe=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},Rfe=function(t,n,r){var i=r-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+` H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},Ffe=function(t,n,r){n=1e3*n;var i="";switch(t){case"sqrtMain":i=Afe(n,Lh);break;case"sqrtSize1":i=Lfe(n,Lh);break;case"sqrtSize2":i=Mfe(n,Lh);break;case"sqrtSize3":i=$fe(n,Lh);break;case"sqrtSize4":i=Pfe(n,Lh);break;case"sqrtTall":i=Rfe(n,Lh,r)}return i},Nfe=function(t,n){switch(t){case"⎜":return"M291 0 H417 V"+n+" H291z M291 0 H417 V"+n+" H291z";case"∣":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z";case"∥":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z"+("M367 0 H410 V"+n+" H367z M367 0 H410 V"+n+" H367z");case"⎟":return"M457 0 H583 V"+n+" H457z M457 0 H583 V"+n+" H457z";case"⎢":return"M319 0 H403 V"+n+" H319z M319 0 H403 V"+n+" H319z";case"⎥":return"M263 0 H347 V"+n+" H263z M263 0 H347 V"+n+" H263z";case"⎪":return"M384 0 H504 V"+n+" H384z M384 0 H504 V"+n+" H384z";case"⏐":return"M312 0 H355 V"+n+" H312z M312 0 H355 V"+n+" H312z";case"‖":return"M257 0 H300 V"+n+" H257z M257 0 H300 V"+n+" H257z"+("M478 0 H521 V"+n+" H478z M478 0 H521 V"+n+" H478z");default:return""}},HA={doubleleftarrow:`M262 157 l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 435 0h399565z`,leftgroupunder:`M400000 262 H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Vfe=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+n+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z 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 c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, -36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+` c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class b1{constructor(t){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=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),n=0;nn.toText();return this.children.map(t).join("")}}var Hl={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},ky={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},jA={Å:"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 zfe(e,t){Hl[e]=t}function $C(e,t,n){if(!Hl[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=Hl[t][r];if(!i&&e[0]in jA&&(r=jA[e[0]].charCodeAt(0),i=Hl[t][r]),!i&&n==="text"&&_H(r)&&(i=Hl[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var b3={};function Hfe(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!b3[t]){var n=b3[t]={cssEmPerMu:ky.quad[t]/18};for(var r in ky)ky.hasOwnProperty(r)&&(n[r]=ky[r][t])}return b3[t]}var jfe=[[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]],BA=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],qA=function(t,n){return n.size<2?t:jfe[t-1][n.size-1]};class Ic{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||Ic.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=BA[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={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};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return new Ic(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:qA(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:BA[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=qA(Ic.BASESIZE,t);return this.size===n&&this.textSize===Ic.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Ic.BASESIZE?["sizing","reset-size"+this.size,"size"+Ic.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Hfe(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Ic.BASESIZE=6;var LS={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Bfe={ex:!0,em:!0,mu:!0},CH=function(t){return typeof t!="string"&&(t=t.unit),t in LS||t in Bfe||t==="ex"},oi=function(t,n){var r;if(t.unit in LS)r=LS[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var i;if(n.style.isTight()?i=n.havingStyle(n.style.text()):i=n,t.unit==="ex")r=i.fontMetrics().xHeight;else if(t.unit==="em")r=i.fontMetrics().quad;else throw new ft("Invalid unit: '"+t.unit+"'");i!==n&&(r*=i.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*r,n.maxSize)},St=function(t){return+t.toFixed(4)+"em"},ad=function(t){return t.filter(n=>n).join(" ")},TH=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){n.style.isTight()&&this.classes.push("mtight");var i=n.getColor();i&&(this.style.color=i)}},EH=function(t){var n=document.createElement(t);n.className=ad(this.classes);for(var r in this.style)this.style.hasOwnProperty(r)&&(n.style[r]=this.style[r]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&n.setAttribute(i,this.attributes[i]);for(var s=0;s/=\x00-\x1f]/,IH=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+hr.escape(ad(this.classes))+'"');var r="";for(var i in this.style)this.style.hasOwnProperty(i)&&(r+=hr.hyphenate(i)+":"+this.style[i]+";");r&&(n+=' style="'+hr.escape(r)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if(qfe.test(s))throw new ft("Invalid attribute name '"+s+"'");n+=" "+s+'="'+hr.escape(this.attributes[s])+'"'}n+=">";for(var o=0;o",n};class w1{constructor(t,n,r,i){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,TH.call(this,t,r,i),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return EH.call(this,"span")}toMarkup(){return IH.call(this,"span")}}class PC{constructor(t,n,r,i){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,TH.call(this,n,i),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return EH.call(this,"a")}toMarkup(){return IH.call(this,"a")}}class Ufe{constructor(t,n,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var n in this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);return t}toMarkup(){var t=''+hr.escape(this.alt)+'0&&(n=document.createElement("span"),n.style.marginRight=St(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=ad(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&(n=n||document.createElement("span"),n.style[r]=this.style[r]);return n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="0&&(r+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(r+=hr.hyphenate(i)+":"+this.style[i]+";");r&&(t=!0,n+=' style="'+hr.escape(r)+'"');var s=hr.escape(this.text);return t?(n+=">",n+=s,n+="",n):s}}class Qc{constructor(t,n){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i':''}}class MS{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var t=" but got "+String(e)+".")}var Gfe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Zfe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Gr={math:{},text:{}};function R(e,t,n,r,i,s){Gr[e][i]={font:t,group:n,replace:r},s&&r&&(Gr[e][r]=Gr[e][i])}var H="math",rt="text",Q="main",be="ams",ei="accent-token",Bt="bin",po="close",kg="inner",pn="mathord",Vi="op-token",ea="open",e4="punct",xe="rel",lu="spacing",Me="textord";R(H,Q,xe,"≡","\\equiv",!0);R(H,Q,xe,"≺","\\prec",!0);R(H,Q,xe,"≻","\\succ",!0);R(H,Q,xe,"∼","\\sim",!0);R(H,Q,xe,"⊥","\\perp");R(H,Q,xe,"⪯","\\preceq",!0);R(H,Q,xe,"⪰","\\succeq",!0);R(H,Q,xe,"≃","\\simeq",!0);R(H,Q,xe,"∣","\\mid",!0);R(H,Q,xe,"≪","\\ll",!0);R(H,Q,xe,"≫","\\gg",!0);R(H,Q,xe,"≍","\\asymp",!0);R(H,Q,xe,"∥","\\parallel");R(H,Q,xe,"⋈","\\bowtie",!0);R(H,Q,xe,"⌣","\\smile",!0);R(H,Q,xe,"⊑","\\sqsubseteq",!0);R(H,Q,xe,"⊒","\\sqsupseteq",!0);R(H,Q,xe,"≐","\\doteq",!0);R(H,Q,xe,"⌢","\\frown",!0);R(H,Q,xe,"∋","\\ni",!0);R(H,Q,xe,"∝","\\propto",!0);R(H,Q,xe,"⊢","\\vdash",!0);R(H,Q,xe,"⊣","\\dashv",!0);R(H,Q,xe,"∋","\\owns");R(H,Q,e4,".","\\ldotp");R(H,Q,e4,"⋅","\\cdotp");R(H,Q,Me,"#","\\#");R(rt,Q,Me,"#","\\#");R(H,Q,Me,"&","\\&");R(rt,Q,Me,"&","\\&");R(H,Q,Me,"ℵ","\\aleph",!0);R(H,Q,Me,"∀","\\forall",!0);R(H,Q,Me,"ℏ","\\hbar",!0);R(H,Q,Me,"∃","\\exists",!0);R(H,Q,Me,"∇","\\nabla",!0);R(H,Q,Me,"♭","\\flat",!0);R(H,Q,Me,"ℓ","\\ell",!0);R(H,Q,Me,"♮","\\natural",!0);R(H,Q,Me,"♣","\\clubsuit",!0);R(H,Q,Me,"℘","\\wp",!0);R(H,Q,Me,"♯","\\sharp",!0);R(H,Q,Me,"♢","\\diamondsuit",!0);R(H,Q,Me,"ℜ","\\Re",!0);R(H,Q,Me,"♡","\\heartsuit",!0);R(H,Q,Me,"ℑ","\\Im",!0);R(H,Q,Me,"♠","\\spadesuit",!0);R(H,Q,Me,"§","\\S",!0);R(rt,Q,Me,"§","\\S");R(H,Q,Me,"¶","\\P",!0);R(rt,Q,Me,"¶","\\P");R(H,Q,Me,"†","\\dag");R(rt,Q,Me,"†","\\dag");R(rt,Q,Me,"†","\\textdagger");R(H,Q,Me,"‡","\\ddag");R(rt,Q,Me,"‡","\\ddag");R(rt,Q,Me,"‡","\\textdaggerdbl");R(H,Q,po,"⎱","\\rmoustache",!0);R(H,Q,ea,"⎰","\\lmoustache",!0);R(H,Q,po,"⟯","\\rgroup",!0);R(H,Q,ea,"⟮","\\lgroup",!0);R(H,Q,Bt,"∓","\\mp",!0);R(H,Q,Bt,"⊖","\\ominus",!0);R(H,Q,Bt,"⊎","\\uplus",!0);R(H,Q,Bt,"⊓","\\sqcap",!0);R(H,Q,Bt,"∗","\\ast");R(H,Q,Bt,"⊔","\\sqcup",!0);R(H,Q,Bt,"◯","\\bigcirc",!0);R(H,Q,Bt,"∙","\\bullet",!0);R(H,Q,Bt,"‡","\\ddagger");R(H,Q,Bt,"≀","\\wr",!0);R(H,Q,Bt,"⨿","\\amalg");R(H,Q,Bt,"&","\\And");R(H,Q,xe,"⟵","\\longleftarrow",!0);R(H,Q,xe,"⇐","\\Leftarrow",!0);R(H,Q,xe,"⟸","\\Longleftarrow",!0);R(H,Q,xe,"⟶","\\longrightarrow",!0);R(H,Q,xe,"⇒","\\Rightarrow",!0);R(H,Q,xe,"⟹","\\Longrightarrow",!0);R(H,Q,xe,"↔","\\leftrightarrow",!0);R(H,Q,xe,"⟷","\\longleftrightarrow",!0);R(H,Q,xe,"⇔","\\Leftrightarrow",!0);R(H,Q,xe,"⟺","\\Longleftrightarrow",!0);R(H,Q,xe,"↦","\\mapsto",!0);R(H,Q,xe,"⟼","\\longmapsto",!0);R(H,Q,xe,"↗","\\nearrow",!0);R(H,Q,xe,"↩","\\hookleftarrow",!0);R(H,Q,xe,"↪","\\hookrightarrow",!0);R(H,Q,xe,"↘","\\searrow",!0);R(H,Q,xe,"↼","\\leftharpoonup",!0);R(H,Q,xe,"⇀","\\rightharpoonup",!0);R(H,Q,xe,"↙","\\swarrow",!0);R(H,Q,xe,"↽","\\leftharpoondown",!0);R(H,Q,xe,"⇁","\\rightharpoondown",!0);R(H,Q,xe,"↖","\\nwarrow",!0);R(H,Q,xe,"⇌","\\rightleftharpoons",!0);R(H,be,xe,"≮","\\nless",!0);R(H,be,xe,"","\\@nleqslant");R(H,be,xe,"","\\@nleqq");R(H,be,xe,"⪇","\\lneq",!0);R(H,be,xe,"≨","\\lneqq",!0);R(H,be,xe,"","\\@lvertneqq");R(H,be,xe,"⋦","\\lnsim",!0);R(H,be,xe,"⪉","\\lnapprox",!0);R(H,be,xe,"⊀","\\nprec",!0);R(H,be,xe,"⋠","\\npreceq",!0);R(H,be,xe,"⋨","\\precnsim",!0);R(H,be,xe,"⪹","\\precnapprox",!0);R(H,be,xe,"≁","\\nsim",!0);R(H,be,xe,"","\\@nshortmid");R(H,be,xe,"∤","\\nmid",!0);R(H,be,xe,"⊬","\\nvdash",!0);R(H,be,xe,"⊭","\\nvDash",!0);R(H,be,xe,"⋪","\\ntriangleleft");R(H,be,xe,"⋬","\\ntrianglelefteq",!0);R(H,be,xe,"⊊","\\subsetneq",!0);R(H,be,xe,"","\\@varsubsetneq");R(H,be,xe,"⫋","\\subsetneqq",!0);R(H,be,xe,"","\\@varsubsetneqq");R(H,be,xe,"≯","\\ngtr",!0);R(H,be,xe,"","\\@ngeqslant");R(H,be,xe,"","\\@ngeqq");R(H,be,xe,"⪈","\\gneq",!0);R(H,be,xe,"≩","\\gneqq",!0);R(H,be,xe,"","\\@gvertneqq");R(H,be,xe,"⋧","\\gnsim",!0);R(H,be,xe,"⪊","\\gnapprox",!0);R(H,be,xe,"⊁","\\nsucc",!0);R(H,be,xe,"⋡","\\nsucceq",!0);R(H,be,xe,"⋩","\\succnsim",!0);R(H,be,xe,"⪺","\\succnapprox",!0);R(H,be,xe,"≆","\\ncong",!0);R(H,be,xe,"","\\@nshortparallel");R(H,be,xe,"∦","\\nparallel",!0);R(H,be,xe,"⊯","\\nVDash",!0);R(H,be,xe,"⋫","\\ntriangleright");R(H,be,xe,"⋭","\\ntrianglerighteq",!0);R(H,be,xe,"","\\@nsupseteqq");R(H,be,xe,"⊋","\\supsetneq",!0);R(H,be,xe,"","\\@varsupsetneq");R(H,be,xe,"⫌","\\supsetneqq",!0);R(H,be,xe,"","\\@varsupsetneqq");R(H,be,xe,"⊮","\\nVdash",!0);R(H,be,xe,"⪵","\\precneqq",!0);R(H,be,xe,"⪶","\\succneqq",!0);R(H,be,xe,"","\\@nsubseteqq");R(H,be,Bt,"⊴","\\unlhd");R(H,be,Bt,"⊵","\\unrhd");R(H,be,xe,"↚","\\nleftarrow",!0);R(H,be,xe,"↛","\\nrightarrow",!0);R(H,be,xe,"⇍","\\nLeftarrow",!0);R(H,be,xe,"⇏","\\nRightarrow",!0);R(H,be,xe,"↮","\\nleftrightarrow",!0);R(H,be,xe,"⇎","\\nLeftrightarrow",!0);R(H,be,xe,"△","\\vartriangle");R(H,be,Me,"ℏ","\\hslash");R(H,be,Me,"▽","\\triangledown");R(H,be,Me,"◊","\\lozenge");R(H,be,Me,"Ⓢ","\\circledS");R(H,be,Me,"®","\\circledR");R(rt,be,Me,"®","\\circledR");R(H,be,Me,"∡","\\measuredangle",!0);R(H,be,Me,"∄","\\nexists");R(H,be,Me,"℧","\\mho");R(H,be,Me,"Ⅎ","\\Finv",!0);R(H,be,Me,"⅁","\\Game",!0);R(H,be,Me,"‵","\\backprime");R(H,be,Me,"▲","\\blacktriangle");R(H,be,Me,"▼","\\blacktriangledown");R(H,be,Me,"■","\\blacksquare");R(H,be,Me,"⧫","\\blacklozenge");R(H,be,Me,"★","\\bigstar");R(H,be,Me,"∢","\\sphericalangle",!0);R(H,be,Me,"∁","\\complement",!0);R(H,be,Me,"ð","\\eth",!0);R(rt,Q,Me,"ð","ð");R(H,be,Me,"╱","\\diagup");R(H,be,Me,"╲","\\diagdown");R(H,be,Me,"□","\\square");R(H,be,Me,"□","\\Box");R(H,be,Me,"◊","\\Diamond");R(H,be,Me,"¥","\\yen",!0);R(rt,be,Me,"¥","\\yen",!0);R(H,be,Me,"✓","\\checkmark",!0);R(rt,be,Me,"✓","\\checkmark");R(H,be,Me,"ℶ","\\beth",!0);R(H,be,Me,"ℸ","\\daleth",!0);R(H,be,Me,"ℷ","\\gimel",!0);R(H,be,Me,"ϝ","\\digamma",!0);R(H,be,Me,"ϰ","\\varkappa");R(H,be,ea,"┌","\\@ulcorner",!0);R(H,be,po,"┐","\\@urcorner",!0);R(H,be,ea,"└","\\@llcorner",!0);R(H,be,po,"┘","\\@lrcorner",!0);R(H,be,xe,"≦","\\leqq",!0);R(H,be,xe,"⩽","\\leqslant",!0);R(H,be,xe,"⪕","\\eqslantless",!0);R(H,be,xe,"≲","\\lesssim",!0);R(H,be,xe,"⪅","\\lessapprox",!0);R(H,be,xe,"≊","\\approxeq",!0);R(H,be,Bt,"⋖","\\lessdot");R(H,be,xe,"⋘","\\lll",!0);R(H,be,xe,"≶","\\lessgtr",!0);R(H,be,xe,"⋚","\\lesseqgtr",!0);R(H,be,xe,"⪋","\\lesseqqgtr",!0);R(H,be,xe,"≑","\\doteqdot");R(H,be,xe,"≓","\\risingdotseq",!0);R(H,be,xe,"≒","\\fallingdotseq",!0);R(H,be,xe,"∽","\\backsim",!0);R(H,be,xe,"⋍","\\backsimeq",!0);R(H,be,xe,"⫅","\\subseteqq",!0);R(H,be,xe,"⋐","\\Subset",!0);R(H,be,xe,"⊏","\\sqsubset",!0);R(H,be,xe,"≼","\\preccurlyeq",!0);R(H,be,xe,"⋞","\\curlyeqprec",!0);R(H,be,xe,"≾","\\precsim",!0);R(H,be,xe,"⪷","\\precapprox",!0);R(H,be,xe,"⊲","\\vartriangleleft");R(H,be,xe,"⊴","\\trianglelefteq");R(H,be,xe,"⊨","\\vDash",!0);R(H,be,xe,"⊪","\\Vvdash",!0);R(H,be,xe,"⌣","\\smallsmile");R(H,be,xe,"⌢","\\smallfrown");R(H,be,xe,"≏","\\bumpeq",!0);R(H,be,xe,"≎","\\Bumpeq",!0);R(H,be,xe,"≧","\\geqq",!0);R(H,be,xe,"⩾","\\geqslant",!0);R(H,be,xe,"⪖","\\eqslantgtr",!0);R(H,be,xe,"≳","\\gtrsim",!0);R(H,be,xe,"⪆","\\gtrapprox",!0);R(H,be,Bt,"⋗","\\gtrdot");R(H,be,xe,"⋙","\\ggg",!0);R(H,be,xe,"≷","\\gtrless",!0);R(H,be,xe,"⋛","\\gtreqless",!0);R(H,be,xe,"⪌","\\gtreqqless",!0);R(H,be,xe,"≖","\\eqcirc",!0);R(H,be,xe,"≗","\\circeq",!0);R(H,be,xe,"≜","\\triangleq",!0);R(H,be,xe,"∼","\\thicksim");R(H,be,xe,"≈","\\thickapprox");R(H,be,xe,"⫆","\\supseteqq",!0);R(H,be,xe,"⋑","\\Supset",!0);R(H,be,xe,"⊐","\\sqsupset",!0);R(H,be,xe,"≽","\\succcurlyeq",!0);R(H,be,xe,"⋟","\\curlyeqsucc",!0);R(H,be,xe,"≿","\\succsim",!0);R(H,be,xe,"⪸","\\succapprox",!0);R(H,be,xe,"⊳","\\vartriangleright");R(H,be,xe,"⊵","\\trianglerighteq");R(H,be,xe,"⊩","\\Vdash",!0);R(H,be,xe,"∣","\\shortmid");R(H,be,xe,"∥","\\shortparallel");R(H,be,xe,"≬","\\between",!0);R(H,be,xe,"⋔","\\pitchfork",!0);R(H,be,xe,"∝","\\varpropto");R(H,be,xe,"◀","\\blacktriangleleft");R(H,be,xe,"∴","\\therefore",!0);R(H,be,xe,"∍","\\backepsilon");R(H,be,xe,"▶","\\blacktriangleright");R(H,be,xe,"∵","\\because",!0);R(H,be,xe,"⋘","\\llless");R(H,be,xe,"⋙","\\gggtr");R(H,be,Bt,"⊲","\\lhd");R(H,be,Bt,"⊳","\\rhd");R(H,be,xe,"≂","\\eqsim",!0);R(H,Q,xe,"⋈","\\Join");R(H,be,xe,"≑","\\Doteq",!0);R(H,be,Bt,"∔","\\dotplus",!0);R(H,be,Bt,"∖","\\smallsetminus");R(H,be,Bt,"⋒","\\Cap",!0);R(H,be,Bt,"⋓","\\Cup",!0);R(H,be,Bt,"⩞","\\doublebarwedge",!0);R(H,be,Bt,"⊟","\\boxminus",!0);R(H,be,Bt,"⊞","\\boxplus",!0);R(H,be,Bt,"⋇","\\divideontimes",!0);R(H,be,Bt,"⋉","\\ltimes",!0);R(H,be,Bt,"⋊","\\rtimes",!0);R(H,be,Bt,"⋋","\\leftthreetimes",!0);R(H,be,Bt,"⋌","\\rightthreetimes",!0);R(H,be,Bt,"⋏","\\curlywedge",!0);R(H,be,Bt,"⋎","\\curlyvee",!0);R(H,be,Bt,"⊝","\\circleddash",!0);R(H,be,Bt,"⊛","\\circledast",!0);R(H,be,Bt,"⋅","\\centerdot");R(H,be,Bt,"⊺","\\intercal",!0);R(H,be,Bt,"⋒","\\doublecap");R(H,be,Bt,"⋓","\\doublecup");R(H,be,Bt,"⊠","\\boxtimes",!0);R(H,be,xe,"⇢","\\dashrightarrow",!0);R(H,be,xe,"⇠","\\dashleftarrow",!0);R(H,be,xe,"⇇","\\leftleftarrows",!0);R(H,be,xe,"⇆","\\leftrightarrows",!0);R(H,be,xe,"⇚","\\Lleftarrow",!0);R(H,be,xe,"↞","\\twoheadleftarrow",!0);R(H,be,xe,"↢","\\leftarrowtail",!0);R(H,be,xe,"↫","\\looparrowleft",!0);R(H,be,xe,"⇋","\\leftrightharpoons",!0);R(H,be,xe,"↶","\\curvearrowleft",!0);R(H,be,xe,"↺","\\circlearrowleft",!0);R(H,be,xe,"↰","\\Lsh",!0);R(H,be,xe,"⇈","\\upuparrows",!0);R(H,be,xe,"↿","\\upharpoonleft",!0);R(H,be,xe,"⇃","\\downharpoonleft",!0);R(H,Q,xe,"⊶","\\origof",!0);R(H,Q,xe,"⊷","\\imageof",!0);R(H,be,xe,"⊸","\\multimap",!0);R(H,be,xe,"↭","\\leftrightsquigarrow",!0);R(H,be,xe,"⇉","\\rightrightarrows",!0);R(H,be,xe,"⇄","\\rightleftarrows",!0);R(H,be,xe,"↠","\\twoheadrightarrow",!0);R(H,be,xe,"↣","\\rightarrowtail",!0);R(H,be,xe,"↬","\\looparrowright",!0);R(H,be,xe,"↷","\\curvearrowright",!0);R(H,be,xe,"↻","\\circlearrowright",!0);R(H,be,xe,"↱","\\Rsh",!0);R(H,be,xe,"⇊","\\downdownarrows",!0);R(H,be,xe,"↾","\\upharpoonright",!0);R(H,be,xe,"⇂","\\downharpoonright",!0);R(H,be,xe,"⇝","\\rightsquigarrow",!0);R(H,be,xe,"⇝","\\leadsto");R(H,be,xe,"⇛","\\Rrightarrow",!0);R(H,be,xe,"↾","\\restriction");R(H,Q,Me,"‘","`");R(H,Q,Me,"$","\\$");R(rt,Q,Me,"$","\\$");R(rt,Q,Me,"$","\\textdollar");R(H,Q,Me,"%","\\%");R(rt,Q,Me,"%","\\%");R(H,Q,Me,"_","\\_");R(rt,Q,Me,"_","\\_");R(rt,Q,Me,"_","\\textunderscore");R(H,Q,Me,"∠","\\angle",!0);R(H,Q,Me,"∞","\\infty",!0);R(H,Q,Me,"′","\\prime");R(H,Q,Me,"△","\\triangle");R(H,Q,Me,"Γ","\\Gamma",!0);R(H,Q,Me,"Δ","\\Delta",!0);R(H,Q,Me,"Θ","\\Theta",!0);R(H,Q,Me,"Λ","\\Lambda",!0);R(H,Q,Me,"Ξ","\\Xi",!0);R(H,Q,Me,"Π","\\Pi",!0);R(H,Q,Me,"Σ","\\Sigma",!0);R(H,Q,Me,"Υ","\\Upsilon",!0);R(H,Q,Me,"Φ","\\Phi",!0);R(H,Q,Me,"Ψ","\\Psi",!0);R(H,Q,Me,"Ω","\\Omega",!0);R(H,Q,Me,"A","Α");R(H,Q,Me,"B","Β");R(H,Q,Me,"E","Ε");R(H,Q,Me,"Z","Ζ");R(H,Q,Me,"H","Η");R(H,Q,Me,"I","Ι");R(H,Q,Me,"K","Κ");R(H,Q,Me,"M","Μ");R(H,Q,Me,"N","Ν");R(H,Q,Me,"O","Ο");R(H,Q,Me,"P","Ρ");R(H,Q,Me,"T","Τ");R(H,Q,Me,"X","Χ");R(H,Q,Me,"¬","\\neg",!0);R(H,Q,Me,"¬","\\lnot");R(H,Q,Me,"⊤","\\top");R(H,Q,Me,"⊥","\\bot");R(H,Q,Me,"∅","\\emptyset");R(H,be,Me,"∅","\\varnothing");R(H,Q,pn,"α","\\alpha",!0);R(H,Q,pn,"β","\\beta",!0);R(H,Q,pn,"γ","\\gamma",!0);R(H,Q,pn,"δ","\\delta",!0);R(H,Q,pn,"ϵ","\\epsilon",!0);R(H,Q,pn,"ζ","\\zeta",!0);R(H,Q,pn,"η","\\eta",!0);R(H,Q,pn,"θ","\\theta",!0);R(H,Q,pn,"ι","\\iota",!0);R(H,Q,pn,"κ","\\kappa",!0);R(H,Q,pn,"λ","\\lambda",!0);R(H,Q,pn,"μ","\\mu",!0);R(H,Q,pn,"ν","\\nu",!0);R(H,Q,pn,"ξ","\\xi",!0);R(H,Q,pn,"ο","\\omicron",!0);R(H,Q,pn,"π","\\pi",!0);R(H,Q,pn,"ρ","\\rho",!0);R(H,Q,pn,"σ","\\sigma",!0);R(H,Q,pn,"τ","\\tau",!0);R(H,Q,pn,"υ","\\upsilon",!0);R(H,Q,pn,"ϕ","\\phi",!0);R(H,Q,pn,"χ","\\chi",!0);R(H,Q,pn,"ψ","\\psi",!0);R(H,Q,pn,"ω","\\omega",!0);R(H,Q,pn,"ε","\\varepsilon",!0);R(H,Q,pn,"ϑ","\\vartheta",!0);R(H,Q,pn,"ϖ","\\varpi",!0);R(H,Q,pn,"ϱ","\\varrho",!0);R(H,Q,pn,"ς","\\varsigma",!0);R(H,Q,pn,"φ","\\varphi",!0);R(H,Q,Bt,"∗","*",!0);R(H,Q,Bt,"+","+");R(H,Q,Bt,"−","-",!0);R(H,Q,Bt,"⋅","\\cdot",!0);R(H,Q,Bt,"∘","\\circ",!0);R(H,Q,Bt,"÷","\\div",!0);R(H,Q,Bt,"±","\\pm",!0);R(H,Q,Bt,"×","\\times",!0);R(H,Q,Bt,"∩","\\cap",!0);R(H,Q,Bt,"∪","\\cup",!0);R(H,Q,Bt,"∖","\\setminus",!0);R(H,Q,Bt,"∧","\\land");R(H,Q,Bt,"∨","\\lor");R(H,Q,Bt,"∧","\\wedge",!0);R(H,Q,Bt,"∨","\\vee",!0);R(H,Q,Me,"√","\\surd");R(H,Q,ea,"⟨","\\langle",!0);R(H,Q,ea,"∣","\\lvert");R(H,Q,ea,"∥","\\lVert");R(H,Q,po,"?","?");R(H,Q,po,"!","!");R(H,Q,po,"⟩","\\rangle",!0);R(H,Q,po,"∣","\\rvert");R(H,Q,po,"∥","\\rVert");R(H,Q,xe,"=","=");R(H,Q,xe,":",":");R(H,Q,xe,"≈","\\approx",!0);R(H,Q,xe,"≅","\\cong",!0);R(H,Q,xe,"≥","\\ge");R(H,Q,xe,"≥","\\geq",!0);R(H,Q,xe,"←","\\gets");R(H,Q,xe,">","\\gt",!0);R(H,Q,xe,"∈","\\in",!0);R(H,Q,xe,"","\\@not");R(H,Q,xe,"⊂","\\subset",!0);R(H,Q,xe,"⊃","\\supset",!0);R(H,Q,xe,"⊆","\\subseteq",!0);R(H,Q,xe,"⊇","\\supseteq",!0);R(H,be,xe,"⊈","\\nsubseteq",!0);R(H,be,xe,"⊉","\\nsupseteq",!0);R(H,Q,xe,"⊨","\\models");R(H,Q,xe,"←","\\leftarrow",!0);R(H,Q,xe,"≤","\\le");R(H,Q,xe,"≤","\\leq",!0);R(H,Q,xe,"<","\\lt",!0);R(H,Q,xe,"→","\\rightarrow",!0);R(H,Q,xe,"→","\\to");R(H,be,xe,"≱","\\ngeq",!0);R(H,be,xe,"≰","\\nleq",!0);R(H,Q,lu," ","\\ ");R(H,Q,lu," ","\\space");R(H,Q,lu," ","\\nobreakspace");R(rt,Q,lu," ","\\ ");R(rt,Q,lu," "," ");R(rt,Q,lu," ","\\space");R(rt,Q,lu," ","\\nobreakspace");R(H,Q,lu,null,"\\nobreak");R(H,Q,lu,null,"\\allowbreak");R(H,Q,e4,",",",");R(H,Q,e4,";",";");R(H,be,Bt,"⊼","\\barwedge",!0);R(H,be,Bt,"⊻","\\veebar",!0);R(H,Q,Bt,"⊙","\\odot",!0);R(H,Q,Bt,"⊕","\\oplus",!0);R(H,Q,Bt,"⊗","\\otimes",!0);R(H,Q,Me,"∂","\\partial",!0);R(H,Q,Bt,"⊘","\\oslash",!0);R(H,be,Bt,"⊚","\\circledcirc",!0);R(H,be,Bt,"⊡","\\boxdot",!0);R(H,Q,Bt,"△","\\bigtriangleup");R(H,Q,Bt,"▽","\\bigtriangledown");R(H,Q,Bt,"†","\\dagger");R(H,Q,Bt,"⋄","\\diamond");R(H,Q,Bt,"⋆","\\star");R(H,Q,Bt,"◃","\\triangleleft");R(H,Q,Bt,"▹","\\triangleright");R(H,Q,ea,"{","\\{");R(rt,Q,Me,"{","\\{");R(rt,Q,Me,"{","\\textbraceleft");R(H,Q,po,"}","\\}");R(rt,Q,Me,"}","\\}");R(rt,Q,Me,"}","\\textbraceright");R(H,Q,ea,"{","\\lbrace");R(H,Q,po,"}","\\rbrace");R(H,Q,ea,"[","\\lbrack",!0);R(rt,Q,Me,"[","\\lbrack",!0);R(H,Q,po,"]","\\rbrack",!0);R(rt,Q,Me,"]","\\rbrack",!0);R(H,Q,ea,"(","\\lparen",!0);R(H,Q,po,")","\\rparen",!0);R(rt,Q,Me,"<","\\textless",!0);R(rt,Q,Me,">","\\textgreater",!0);R(H,Q,ea,"⌊","\\lfloor",!0);R(H,Q,po,"⌋","\\rfloor",!0);R(H,Q,ea,"⌈","\\lceil",!0);R(H,Q,po,"⌉","\\rceil",!0);R(H,Q,Me,"\\","\\backslash");R(H,Q,Me,"∣","|");R(H,Q,Me,"∣","\\vert");R(rt,Q,Me,"|","\\textbar",!0);R(H,Q,Me,"∥","\\|");R(H,Q,Me,"∥","\\Vert");R(rt,Q,Me,"∥","\\textbardbl");R(rt,Q,Me,"~","\\textasciitilde");R(rt,Q,Me,"\\","\\textbackslash");R(rt,Q,Me,"^","\\textasciicircum");R(H,Q,xe,"↑","\\uparrow",!0);R(H,Q,xe,"⇑","\\Uparrow",!0);R(H,Q,xe,"↓","\\downarrow",!0);R(H,Q,xe,"⇓","\\Downarrow",!0);R(H,Q,xe,"↕","\\updownarrow",!0);R(H,Q,xe,"⇕","\\Updownarrow",!0);R(H,Q,Vi,"∐","\\coprod");R(H,Q,Vi,"⋁","\\bigvee");R(H,Q,Vi,"⋀","\\bigwedge");R(H,Q,Vi,"⨄","\\biguplus");R(H,Q,Vi,"⋂","\\bigcap");R(H,Q,Vi,"⋃","\\bigcup");R(H,Q,Vi,"∫","\\int");R(H,Q,Vi,"∫","\\intop");R(H,Q,Vi,"∬","\\iint");R(H,Q,Vi,"∭","\\iiint");R(H,Q,Vi,"∏","\\prod");R(H,Q,Vi,"∑","\\sum");R(H,Q,Vi,"⨂","\\bigotimes");R(H,Q,Vi,"⨁","\\bigoplus");R(H,Q,Vi,"⨀","\\bigodot");R(H,Q,Vi,"∮","\\oint");R(H,Q,Vi,"∯","\\oiint");R(H,Q,Vi,"∰","\\oiiint");R(H,Q,Vi,"⨆","\\bigsqcup");R(H,Q,Vi,"∫","\\smallint");R(rt,Q,kg,"…","\\textellipsis");R(H,Q,kg,"…","\\mathellipsis");R(rt,Q,kg,"…","\\ldots",!0);R(H,Q,kg,"…","\\ldots",!0);R(H,Q,kg,"⋯","\\@cdots",!0);R(H,Q,kg,"⋱","\\ddots",!0);R(H,Q,Me,"⋮","\\varvdots");R(rt,Q,Me,"⋮","\\varvdots");R(H,Q,ei,"ˊ","\\acute");R(H,Q,ei,"ˋ","\\grave");R(H,Q,ei,"¨","\\ddot");R(H,Q,ei,"~","\\tilde");R(H,Q,ei,"ˉ","\\bar");R(H,Q,ei,"˘","\\breve");R(H,Q,ei,"ˇ","\\check");R(H,Q,ei,"^","\\hat");R(H,Q,ei,"⃗","\\vec");R(H,Q,ei,"˙","\\dot");R(H,Q,ei,"˚","\\mathring");R(H,Q,pn,"","\\@imath");R(H,Q,pn,"","\\@jmath");R(H,Q,Me,"ı","ı");R(H,Q,Me,"ȷ","ȷ");R(rt,Q,Me,"ı","\\i",!0);R(rt,Q,Me,"ȷ","\\j",!0);R(rt,Q,Me,"ß","\\ss",!0);R(rt,Q,Me,"æ","\\ae",!0);R(rt,Q,Me,"œ","\\oe",!0);R(rt,Q,Me,"ø","\\o",!0);R(rt,Q,Me,"Æ","\\AE",!0);R(rt,Q,Me,"Œ","\\OE",!0);R(rt,Q,Me,"Ø","\\O",!0);R(rt,Q,ei,"ˊ","\\'");R(rt,Q,ei,"ˋ","\\`");R(rt,Q,ei,"ˆ","\\^");R(rt,Q,ei,"˜","\\~");R(rt,Q,ei,"ˉ","\\=");R(rt,Q,ei,"˘","\\u");R(rt,Q,ei,"˙","\\.");R(rt,Q,ei,"¸","\\c");R(rt,Q,ei,"˚","\\r");R(rt,Q,ei,"ˇ","\\v");R(rt,Q,ei,"¨",'\\"');R(rt,Q,ei,"˝","\\H");R(rt,Q,ei,"◯","\\textcircled");var DH={"--":!0,"---":!0,"``":!0,"''":!0};R(rt,Q,Me,"–","--",!0);R(rt,Q,Me,"–","\\textendash");R(rt,Q,Me,"—","---",!0);R(rt,Q,Me,"—","\\textemdash");R(rt,Q,Me,"‘","`",!0);R(rt,Q,Me,"‘","\\textquoteleft");R(rt,Q,Me,"’","'",!0);R(rt,Q,Me,"’","\\textquoteright");R(rt,Q,Me,"“","``",!0);R(rt,Q,Me,"“","\\textquotedblleft");R(rt,Q,Me,"”","''",!0);R(rt,Q,Me,"”","\\textquotedblright");R(H,Q,Me,"°","\\degree",!0);R(rt,Q,Me,"°","\\degree");R(rt,Q,Me,"°","\\textdegree",!0);R(H,Q,Me,"£","\\pounds");R(H,Q,Me,"£","\\mathsterling",!0);R(rt,Q,Me,"£","\\pounds");R(rt,Q,Me,"£","\\textsterling",!0);R(H,be,Me,"✠","\\maltese");R(rt,be,Me,"✠","\\maltese");var WA='0123456789/@."';for(var w3=0;w30)return Ja(s,c,i,n,o.concat(u));if(l){var d,f;if(l==="boldsymbol"){var m=Qfe(s,i,n,o,r);d=m.fontName,f=[m.fontClass]}else a?(d=MH[l].fontName,f=[l]):(d=Ty(l,n.fontWeight,n.fontShape),f=[l,n.fontWeight,n.fontShape]);if(t4(s,d,i).metrics)return Ja(s,d,i,n,o.concat(f));if(DH.hasOwnProperty(s)&&d.slice(0,10)==="Typewriter"){for(var g=[],p=0;p{if(ad(e.classes)!==ad(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},the=e=>{for(var t=0;tn&&(n=o.height),o.depth>r&&(r=o.depth),o.maxFontSize>i&&(i=o.maxFontSize)}t.height=n,t.depth=r,t.maxFontSize=i},bo=function(t,n,r,i){var s=new w1(t,n,r,i);return OC(s),s},AH=(e,t,n,r)=>new w1(e,t,n,r),nhe=function(t,n,r){var i=bo([t],[],n);return i.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),i.style.borderBottomWidth=St(i.height),i.maxFontSize=1,i},rhe=function(t,n,r,i){var s=new PC(t,n,r,i);return OC(s),s},LH=function(t){var n=new b1(t);return OC(n),n},ihe=function(t,n){return t instanceof b1?bo([],[t],n):t},she=function(t){if(t.positionType==="individualShift"){for(var n=t.children,r=[n[0]],i=-n[0].shift-n[0].elem.depth,s=i,o=1;o{var n=bo(["mspace"],[],t),r=oi(e,t);return n.style.marginRight=St(r),n},Ty=function(t,n,r){var i="";switch(t){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=t}var s;return n==="textbf"&&r==="textit"?s="BoldItalic":n==="textbf"?s="Bold":n==="textit"?s="Italic":s="Regular",i+"-"+s},MH={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"}},$H={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},lhe=function(t,n){var[r,i,s]=$H[t],o=new ld(r),a=new Qc([o],{width:St(i),height:St(s),style:"width:"+St(i),viewBox:"0 0 "+1e3*i+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=AH(["overlay"],[a],n);return l.height=s,l.style.height=St(s),l.style.width=St(i),l},He={fontMap:MH,makeSymbol:Ja,mathsym:Xfe,makeSpan:bo,makeSvgSpan:AH,makeLineSpan:nhe,makeAnchor:rhe,makeFragment:LH,wrapFragment:ihe,makeVList:ohe,makeOrd:Jfe,makeGlue:ahe,staticSvg:lhe,svgData:$H,tryCombineChars:the},ri={number:3,unit:"mu"},Bd={number:4,unit:"mu"},gc={number:5,unit:"mu"},che={mord:{mop:ri,mbin:Bd,mrel:gc,minner:ri},mop:{mord:ri,mop:ri,mrel:gc,minner:ri},mbin:{mord:Bd,mop:Bd,mopen:Bd,minner:Bd},mrel:{mord:gc,mop:gc,mopen:gc,minner:gc},mopen:{},mclose:{mop:ri,mbin:Bd,mrel:gc,minner:ri},mpunct:{mord:ri,mop:ri,mrel:gc,mopen:ri,mclose:ri,mpunct:ri,minner:ri},minner:{mord:ri,mop:ri,mbin:Bd,mrel:gc,mopen:ri,mpunct:ri,minner:ri}},uhe={mord:{mop:ri},mop:{mord:ri,mop:ri},mbin:{},mrel:{},mopen:{},mclose:{mop:ri},mpunct:{},minner:{mop:ri}},PH={},sw={},ow={};function Nt(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:s,mathmlBuilder:o}=e,a={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l{var y=p.classes[0],v=g.classes[0];y==="mbin"&&fhe.includes(v)?p.classes[0]="mord":v==="mbin"&&dhe.includes(y)&&(g.classes[0]="mord")},{node:d},f,m),XA(s,(g,p)=>{var y=PS(p),v=PS(g),b=y&&v?g.hasClass("mtight")?uhe[y][v]:che[y][v]:null;if(b)return He.makeGlue(b,c)},{node:d},f,m),s},XA=function e(t,n,r,i,s){i&&t.push(i);for(var o=0;of=>{t.splice(d+1,0,f),o++})(o)}i&&t.pop()},OH=function(t){return t instanceof b1||t instanceof PC||t instanceof w1&&t.hasClass("enclosing")?t:null},ghe=function e(t,n){var r=OH(t);if(r){var i=r.children;if(i.length){if(n==="right")return e(i[i.length-1],"right");if(n==="left")return e(i[0],"left")}}return t},PS=function(t,n){return t?(n&&(t=ghe(t,n)),mhe[t.classes[0]]||null):null},tv=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return Jc(n.concat(r))},cr=function(t,n,r){if(!t)return Jc();if(sw[t.type]){var i=sw[t.type](t,n);if(r&&n.size!==r.size){i=Jc(n.sizingClasses(r),[i],n);var s=n.sizeMultiplier/r.sizeMultiplier;i.height*=s,i.depth*=s}return i}else throw new ft("Got group of unknown type: '"+t.type+"'")};function Ey(e,t){var n=Jc(["base"],e,t),r=Jc(["strut"]);return r.style.height=St(n.height+n.depth),n.depth&&(r.style.verticalAlign=St(-n.depth)),n.children.unshift(r),n}function OS(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var r=Ji(e,t,"root"),i;r.length===2&&r[1].hasClass("tag")&&(i=r.pop());for(var s=[],o=[],a=0;a0&&(s.push(Ey(o,t)),o=[]),s.push(r[a]));o.length>0&&s.push(Ey(o,t));var c;n?(c=Ey(Ji(n,t,!0)),c.classes=["tag"],s.push(c)):i&&s.push(i);var u=Jc(["katex-html"],s);if(u.setAttribute("aria-hidden","true"),c){var d=c.children[0];d.style.height=St(u.height+u.depth),u.depth&&(d.style.verticalAlign=St(-u.depth))}return u}function RH(e){return new b1(e)}class No{constructor(t,n,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=n||[],this.classes=r||[]}setAttribute(t,n){this.attributes[t]=n}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);this.classes.length>0&&(t.className=ad(this.classes));for(var r=0;r0&&(t+=' class ="'+hr.escape(ad(this.classes))+'"'),t+=">";for(var r=0;r",t}toText(){return this.children.map(t=>t.toText()).join("")}}class jl{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return hr.escape(this.toText())}toText(){return this.text}}class phe{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character="  ":t>=-.05556&&t<=-.05555?this.character=" ⁣":t>=-.1667&&t<=-.1666?this.character=" ⁣":t>=-.2223&&t<=-.2222?this.character=" ⁣":t>=-.2778&&t<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",St(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var ut={MathNode:No,TextNode:jl,SpaceNode:phe,newDocumentFragment:RH},ja=function(t,n,r){return Gr[n][t]&&Gr[n][t].replace&&t.charCodeAt(0)!==55349&&!(DH.hasOwnProperty(t)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(t=Gr[n][t].replace),new ut.TextNode(t)},RC=function(t){return t.length===1?t[0]:new ut.MathNode("mrow",t)},FC=function(t,n){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold";var r=n.font;if(!r||r==="mathnormal")return null;var i=t.mode;if(r==="mathit")return"italic";if(r==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(r==="mathbf")return"bold";if(r==="mathbb")return"double-struck";if(r==="mathsfit")return"sans-serif-italic";if(r==="mathfrak")return"fraktur";if(r==="mathscr"||r==="mathcal")return"script";if(r==="mathsf")return"sans-serif";if(r==="mathtt")return"monospace";var s=t.text;if(["\\imath","\\jmath"].includes(s))return null;Gr[i][s]&&Gr[i][s].replace&&(s=Gr[i][s].replace);var o=He.fontMap[r].fontName;return $C(s,o,i)?He.fontMap[r].variant:null};function _3(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof jl&&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 jl&&n.text===","}else return!1}var Eo=function(t,n,r){if(t.length===1){var i=zr(t[0],n);return r&&i instanceof No&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var s=[],o,a=0;a=1&&(o.type==="mn"||_3(o))){var c=l.children[0];c instanceof No&&c.type==="mn"&&(c.children=[...o.children,...c.children],s.pop())}else if(o.type==="mi"&&o.children.length===1){var u=o.children[0];if(u instanceof jl&&u.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var d=l.children[0];d instanceof jl&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),s.pop())}}}s.push(l),o=l}return s},cd=function(t,n,r){return RC(Eo(t,n,r))},zr=function(t,n){if(!t)return new ut.MathNode("mrow");if(ow[t.type]){var r=ow[t.type](t,n);return r}else throw new ft("Got group of unknown type: '"+t.type+"'")};function QA(e,t,n,r,i){var s=Eo(e,n),o;s.length===1&&s[0]instanceof No&&["mrow","mtable"].includes(s[0].type)?o=s[0]:o=new ut.MathNode("mrow",s);var a=new ut.MathNode("annotation",[new ut.TextNode(t)]);a.setAttribute("encoding","application/x-tex");var l=new ut.MathNode("semantics",[o,a]),c=new ut.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var u=i?"katex":"katex-mathml";return He.makeSpan([u],[c])}var FH=function(t){return new Ic({style:t.displayMode?yn.DISPLAY:yn.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},NH=function(t,n){if(n.displayMode){var r=["katex-display"];n.leqno&&r.push("leqno"),n.fleqn&&r.push("fleqn"),t=He.makeSpan(r,[t])}return t},vhe=function(t,n,r){var i=FH(r),s;if(r.output==="mathml")return QA(t,n,i,r.displayMode,!0);if(r.output==="html"){var o=OS(t,i);s=He.makeSpan(["katex"],[o])}else{var a=QA(t,n,i,r.displayMode,!1),l=OS(t,i);s=He.makeSpan(["katex"],[a,l])}return NH(s,r)},yhe=function(t,n,r){var i=FH(r),s=OS(t,i),o=He.makeSpan(["katex"],[s]);return NH(o,r)},bhe={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",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":"="},whe=function(t){var n=new ut.MathNode("mo",[new ut.TextNode(bhe[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},xhe={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},khe=function(t){return t.type==="ordgroup"?t.body.length:1},She=function(t,n){function r(){var a=4e5,l=t.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(l)){var c=t,u=khe(c.base),d,f,m;if(u>5)l==="widehat"||l==="widecheck"?(d=420,a=2364,m=.42,f=l+"4"):(d=312,a=2340,m=.34,f="tilde4");else{var g=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(a=[0,1062,2364,2364,2364][g],d=[0,239,300,360,420][g],m=[0,.24,.3,.3,.36,.42][g],f=l+g):(a=[0,600,1033,2339,2340][g],d=[0,260,286,306,312][g],m=[0,.26,.286,.3,.306,.34][g],f="tilde"+g)}var p=new ld(f),y=new Qc([p],{width:"100%",height:St(m),viewBox:"0 0 "+a+" "+d,preserveAspectRatio:"none"});return{span:He.makeSvgSpan([],[y],n),minWidth:0,height:m}}else{var v=[],b=xhe[l],[w,x,k]=b,_=k/1e3,E=w.length,C,L;if(E===1){var O=b[3];C=["hide-tail"],L=[O]}else if(E===2)C=["halfarrow-left","halfarrow-right"],L=["xMinYMin","xMaxYMin"];else if(E===3)C=["brace-left","brace-center","brace-right"],L=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support `+E+" children.");for(var V=0;V0&&(i.style.minWidth=St(s)),i},_he=function(t,n,r,i,s){var o,a=t.height+t.depth+r+i;if(/fbox|color|angl/.test(n)){if(o=He.makeSpan(["stretchy",n],[],s),n==="fbox"){var l=s.color&&s.getColor();l&&(o.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(n)&&c.push(new MS({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&c.push(new MS({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new Qc(c,{width:"100%",height:St(a)});o=He.makeSvgSpan([],[u],s)}return o.height=a,o.style.height=St(a),o},eu={encloseSpan:_he,mathMLnode:whe,svgSpan:She};function qn(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function NC(e){var t=n4(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function n4(e){return e&&(e.type==="atom"||Zfe.hasOwnProperty(e.type))?e:null}var VC=(e,t)=>{var n,r,i;e&&e.type==="supsub"?(r=qn(e.base,"accent"),n=r.base,e.base=n,i=Kfe(cr(e,t)),e.base=r):(r=qn(e,"accent"),n=r.base);var s=cr(n,t.havingCrampedStyle()),o=r.isShifty&&hr.isCharacterBox(n),a=0;if(o){var l=hr.getBaseElem(n),c=cr(l,t.havingCrampedStyle());a=UA(c).skew}var u=r.label==="\\c",d=u?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight),f;if(r.isStretchy)f=eu.svgSpan(r,t),f=He.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:f,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+St(2*a)+")",marginLeft:St(2*a)}:void 0}]},t);else{var m,g;r.label==="\\vec"?(m=He.staticSvg("vec",t),g=He.svgData.vec[1]):(m=He.makeOrd({mode:r.mode,text:r.label},t,"textord"),m=UA(m),m.italic=0,g=m.width,u&&(d+=m.depth)),f=He.makeSpan(["accent-body"],[m]);var p=r.label==="\\textcircled";p&&(f.classes.push("accent-full"),d=s.height);var y=a;p||(y-=g/2),f.style.left=St(y),r.label==="\\textcircled"&&(f.style.top=".2em"),f=He.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-d},{type:"elem",elem:f}]},t)}var v=He.makeSpan(["mord","accent"],[f],t);return i?(i.children[0]=v,i.height=Math.max(v.height,i.height),i.classes[0]="mord",i):v},VH=(e,t)=>{var n=e.isStretchy?eu.mathMLnode(e.label):new ut.MathNode("mo",[ja(e.label,e.mode)]),r=new ut.MathNode("mover",[zr(e.base,t),n]);return r.setAttribute("accent","true"),r},Che=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Nt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=aw(t[0]),r=!Che.test(e.funcName),i=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:VC,mathmlBuilder:VH});Nt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:VC,mathmlBuilder:VH});Nt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=cr(e.base,t),r=eu.svgSpan(e,t),i=e.label==="\\utilde"?.12:0,s=He.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},t);return He.makeSpan(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{var n=eu.mathMLnode(e.label),r=new ut.MathNode("munder",[zr(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Iy=e=>{var t=new ut.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Nt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=He.wrapFragment(cr(e.body,r,t),t),s=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(s+"-arrow-pad");var o;e.below&&(r=t.havingStyle(n.sub()),o=He.wrapFragment(cr(e.below,r,t),t),o.classes.push(s+"-arrow-pad"));var a=eu.svgSpan(e,t),l=-t.fontMetrics().axisHeight+.5*a.height,c=-t.fontMetrics().axisHeight-.5*a.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(c-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*a.height+.111;u=He.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:a,shift:l},{type:"elem",elem:o,shift:d}]},t)}else u=He.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:a,shift:l}]},t);return u.children[0].children[0].children[1].classes.push("svg-align"),He.makeSpan(["mrel","x-arrow"],[u],t)},mathmlBuilder(e,t){var n=eu.mathMLnode(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var i=Iy(zr(e.body,t));if(e.below){var s=Iy(zr(e.below,t));r=new ut.MathNode("munderover",[n,s,i])}else r=new ut.MathNode("mover",[n,i])}else if(e.below){var o=Iy(zr(e.below,t));r=new ut.MathNode("munder",[n,o])}else r=Iy(),r=new ut.MathNode("mover",[n,r]);return r}});var The=He.makeSpan;function zH(e,t){var n=Ji(e.body,t,!0);return The([e.mclass],n,t)}function HH(e,t){var n,r=Eo(e.body,t);return e.mclass==="minner"?n=new ut.MathNode("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(n=r[0],n.type="mi"):n=new ut.MathNode("mi",r):(e.isCharacterBox?(n=r[0],n.type="mo"):n=new ut.MathNode("mo",r),e.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):e.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):e.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}Nt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Ei(i),isCharacterBox:hr.isCharacterBox(i)}},htmlBuilder:zH,mathmlBuilder:HH});var r4=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};Nt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:r4(t[0]),body:Ei(t[1]),isCharacterBox:hr.isCharacterBox(t[1])}}});Nt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],s=t[0],o;r!=="\\stackrel"?o=r4(i):o="mrel";var a={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Ei(i)},l={type:"supsub",mode:s.mode,base:a,sup:r==="\\underset"?null:s,sub:r==="\\underset"?s:null};return{type:"mclass",mode:n.mode,mclass:o,body:[l],isCharacterBox:hr.isCharacterBox(l)}},htmlBuilder:zH,mathmlBuilder:HH});Nt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:r4(t[0]),body:Ei(t[0])}},htmlBuilder(e,t){var n=Ji(e.body,t,!0),r=He.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=Eo(e.body,t),r=new ut.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Ehe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},JA=()=>({type:"styling",body:[],mode:"math",style:"display"}),eL=e=>e.type==="textord"&&e.text==="@",Ihe=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function Dhe(e,t,n){var r=Ehe[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=n.callFunction("\\\\cdleft",[t[0]],[]),s={type:"atom",text:r,mode:"math",family:"rel"},o=n.callFunction("\\Big",[s],[]),a=n.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[i,o,a]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Ahe(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){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"){t[t.length-1].length===0&&t.pop();break}else throw new ft("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],i=[r],s=0;s-1))if("<>AV".indexOf(c)>-1)for(var d=0;d<2;d++){for(var f=!0,m=l+1;mAV=|." after @',o[l]);var g=Dhe(c,u,e),p={type:"styling",body:[g],mode:"math",style:"display"};r.push(p),a=JA()}s%2===0?r.push(a):r.shift(),r=[],i.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var y=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:y,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}Nt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{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=He.wrapFragment(cr(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=St(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new ut.MathNode("mrow",[zr(e.label,t)]);return n=new ut.MathNode("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new ut.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});Nt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=He.wrapFragment(cr(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new ut.MathNode("mrow",[zr(e.fragment,t)])}});Nt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=qn(t[0],"ordgroup"),i=r.body,s="",o=0;o=1114111)throw new ft("\\@char with invalid code point "+s);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:n.mode,text:c}}});var jH=(e,t)=>{var n=Ji(e.body,t.withColor(e.color),!1);return He.makeFragment(n)},BH=(e,t)=>{var n=Eo(e.body,t.withColor(e.color)),r=new ut.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};Nt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=qn(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:Ei(i)}},htmlBuilder:jH,mathmlBuilder:BH});Nt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=qn(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var s=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:s}},htmlBuilder:jH,mathmlBuilder:BH});Nt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,s=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:s,size:i&&qn(i,"size").value}},htmlBuilder(e,t){var n=He.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=St(oi(e.size,t)))),n},mathmlBuilder(e,t){var n=new ut.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",St(oi(e.size,t)))),n}});var RS={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},qH=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new ft("Expected a control sequence",e);return t},Lhe=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},UH=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i==null&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};Nt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(RS[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=RS[r.text]),qn(t.parseFunction(),"internal");throw new ft("Invalid token after macro prefix",r)}});Nt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new ft("Expected a control sequence",r);for(var s=0,o,a=[[]];t.gullet.future().text!=="{";)if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){o=t.gullet.future(),a[s].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new ft('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==s+1)throw new ft('Argument number "'+r.text+'" out of order');s++,a.push([])}else{if(r.text==="EOF")throw new ft("Expected a macro definition");a[s].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return o&&l.unshift(o),(n==="\\edef"||n==="\\xdef")&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(i,{tokens:l,numArgs:s,delimiters:a},n===RS[n]),{type:"internal",mode:t.mode}}});Nt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=qH(t.gullet.popToken());t.gullet.consumeSpaces();var i=Lhe(t);return UH(t,r,i,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});Nt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=qH(t.gullet.popToken()),i=t.gullet.popToken(),s=t.gullet.popToken();return UH(t,r,s,n==="\\\\globalfuture"),t.gullet.pushToken(s),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var B0=function(t,n,r){var i=Gr.math[t]&&Gr.math[t].replace,s=$C(i||t,n,r);if(!s)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return s},zC=function(t,n,r,i){var s=r.havingBaseStyle(n),o=He.makeSpan(i.concat(s.sizingClasses(r)),[t],r),a=s.sizeMultiplier/r.sizeMultiplier;return o.height*=a,o.depth*=a,o.maxFontSize=s.sizeMultiplier,o},WH=function(t,n,r){var i=n.havingBaseStyle(r),s=(1-n.sizeMultiplier/i.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=St(s),t.height-=s,t.depth+=s},Mhe=function(t,n,r,i,s,o){var a=He.makeSymbol(t,"Main-Regular",s,i),l=zC(a,n,i,o);return r&&WH(l,i,n),l},$he=function(t,n,r,i){return He.makeSymbol(t,"Size"+n+"-Regular",r,i)},KH=function(t,n,r,i,s,o){var a=$he(t,n,s,i),l=zC(He.makeSpan(["delimsizing","size"+n],[a],i),yn.TEXT,i,o);return r&&WH(l,i,yn.TEXT),l},C3=function(t,n,r){var i;n==="Size1-Regular"?i="delim-size1":i="delim-size4";var s=He.makeSpan(["delimsizinginner",i],[He.makeSpan([],[He.makeSymbol(t,n,r)])]);return{type:"elem",elem:s}},T3=function(t,n,r){var i=Hl["Size4-Regular"][t.charCodeAt(0)]?Hl["Size4-Regular"][t.charCodeAt(0)][4]:Hl["Size1-Regular"][t.charCodeAt(0)][4],s=new ld("inner",Nfe(t,Math.round(1e3*n))),o=new Qc([s],{width:St(i),height:St(n),style:"width:"+St(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),a=He.makeSvgSpan([],[o],r);return a.height=n,a.style.height=St(n),a.style.width=St(i),{type:"elem",elem:a}},FS=.008,Dy={type:"kern",size:-1*FS},Phe=["|","\\lvert","\\rvert","\\vert"],Ohe=["\\|","\\lVert","\\rVert","\\Vert"],GH=function(t,n,r,i,s,o){var a,l,c,u,d="",f=0;a=c=u=t,l=null;var m="Size1-Regular";t==="\\uparrow"?c=u="⏐":t==="\\Uparrow"?c=u="‖":t==="\\downarrow"?a=c="⏐":t==="\\Downarrow"?a=c="‖":t==="\\updownarrow"?(a="\\uparrow",c="⏐",u="\\downarrow"):t==="\\Updownarrow"?(a="\\Uparrow",c="‖",u="\\Downarrow"):Phe.includes(t)?(c="∣",d="vert",f=333):Ohe.includes(t)?(c="∥",d="doublevert",f=556):t==="["||t==="\\lbrack"?(a="⎡",c="⎢",u="⎣",m="Size4-Regular",d="lbrack",f=667):t==="]"||t==="\\rbrack"?(a="⎤",c="⎥",u="⎦",m="Size4-Regular",d="rbrack",f=667):t==="\\lfloor"||t==="⌊"?(c=a="⎢",u="⎣",m="Size4-Regular",d="lfloor",f=667):t==="\\lceil"||t==="⌈"?(a="⎡",c=u="⎢",m="Size4-Regular",d="lceil",f=667):t==="\\rfloor"||t==="⌋"?(c=a="⎥",u="⎦",m="Size4-Regular",d="rfloor",f=667):t==="\\rceil"||t==="⌉"?(a="⎤",c=u="⎥",m="Size4-Regular",d="rceil",f=667):t==="("||t==="\\lparen"?(a="⎛",c="⎜",u="⎝",m="Size4-Regular",d="lparen",f=875):t===")"||t==="\\rparen"?(a="⎞",c="⎟",u="⎠",m="Size4-Regular",d="rparen",f=875):t==="\\{"||t==="\\lbrace"?(a="⎧",l="⎨",u="⎩",c="⎪",m="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(a="⎫",l="⎬",u="⎭",c="⎪",m="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(a="⎧",u="⎩",c="⎪",m="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(a="⎫",u="⎭",c="⎪",m="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(a="⎧",u="⎭",c="⎪",m="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(a="⎫",u="⎩",c="⎪",m="Size4-Regular");var g=B0(a,m,s),p=g.height+g.depth,y=B0(c,m,s),v=y.height+y.depth,b=B0(u,m,s),w=b.height+b.depth,x=0,k=1;if(l!==null){var _=B0(l,m,s);x=_.height+_.depth,k=2}var E=p+w+x,C=Math.max(0,Math.ceil((n-E)/(k*v))),L=E+C*k*v,O=i.fontMetrics().axisHeight;r&&(O*=i.sizeMultiplier);var V=L/2-O,F=[];if(d.length>0){var D=L-p-w,T=Math.round(L*1e3),M=Vfe(d,Math.round(D*1e3)),P=new ld(d,M),A=(f/1e3).toFixed(3)+"em",N=(T/1e3).toFixed(3)+"em",K=new Qc([P],{width:A,height:N,viewBox:"0 0 "+f+" "+T}),q=He.makeSvgSpan([],[K],i);q.height=T/1e3,q.style.width=A,q.style.height=N,F.push({type:"elem",elem:q})}else{if(F.push(C3(u,m,s)),F.push(Dy),l===null){var X=L-p-w+2*FS;F.push(T3(c,X,i))}else{var re=(L-p-w-x)/2+2*FS;F.push(T3(c,re,i)),F.push(Dy),F.push(C3(l,m,s)),F.push(Dy),F.push(T3(c,re,i))}F.push(Dy),F.push(C3(a,m,s))}var G=i.havingBaseStyle(yn.TEXT),Z=He.makeVList({positionType:"bottom",positionData:V,children:F},G);return zC(He.makeSpan(["delimsizing","mult"],[Z],G),yn.TEXT,i,o)},E3=80,I3=.08,D3=function(t,n,r,i,s){var o=Ffe(t,i,r),a=new ld(t,o),l=new Qc([a],{width:"400em",height:St(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return He.makeSvgSpan(["hide-tail"],[l],s)},Rhe=function(t,n){var r=n.havingBaseSizing(),i=QH("\\surd",t*r.sizeMultiplier,XH,r),s=r.sizeMultiplier,o=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),a,l=0,c=0,u=0,d;return i.type==="small"?(u=1e3+1e3*o+E3,t<1?s=1:t<1.4&&(s=.7),l=(1+o+I3)/s,c=(1+o)/s,a=D3("sqrtMain",l,u,o,n),a.style.minWidth="0.853em",d=.833/s):i.type==="large"?(u=(1e3+E3)*Sp[i.size],c=(Sp[i.size]+o)/s,l=(Sp[i.size]+o+I3)/s,a=D3("sqrtSize"+i.size,l,u,o,n),a.style.minWidth="1.02em",d=1/s):(l=t+o+I3,c=t+o,u=Math.floor(1e3*t+o)+E3,a=D3("sqrtTall",l,u,o,n),a.style.minWidth="0.742em",d=1.056),a.height=c,a.style.height=St(l),{span:a,advanceWidth:d,ruleWidth:(n.fontMetrics().sqrtRuleThickness+o)*s}},ZH=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Fhe=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],YH=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Sp=[0,1.2,1.8,2.4,3],Nhe=function(t,n,r,i,s){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),ZH.includes(t)||YH.includes(t))return KH(t,n,!1,r,i,s);if(Fhe.includes(t))return GH(t,Sp[n],!1,r,i,s);throw new ft("Illegal delimiter: '"+t+"'")},Vhe=[{type:"small",style:yn.SCRIPTSCRIPT},{type:"small",style:yn.SCRIPT},{type:"small",style:yn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],zhe=[{type:"small",style:yn.SCRIPTSCRIPT},{type:"small",style:yn.SCRIPT},{type:"small",style:yn.TEXT},{type:"stack"}],XH=[{type:"small",style:yn.SCRIPTSCRIPT},{type:"small",style:yn.SCRIPT},{type:"small",style:yn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Hhe=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},QH=function(t,n,r,i){for(var s=Math.min(2,3-i.style.size),o=s;on)return r[o]}return r[r.length-1]},JH=function(t,n,r,i,s,o){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var a;YH.includes(t)?a=Vhe:ZH.includes(t)?a=XH:a=zhe;var l=QH(t,n,a,i);return l.type==="small"?Mhe(t,l.style,r,i,s,o):l.type==="large"?KH(t,l.size,r,i,s,o):GH(t,n,r,i,s,o)},jhe=function(t,n,r,i,s,o){var a=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,c=5/i.fontMetrics().ptPerEm,u=Math.max(n-a,r+a),d=Math.max(u/500*l,2*u-c);return JH(t,d,!0,i,s,o)},Uc={sqrtImage:Rhe,sizedDelim:Nhe,sizeToMaxHeight:Sp,customSizedDelim:JH,leftRightDelim:jhe},tL={"\\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}},Bhe=["(","\\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 i4(e,t){var n=n4(e);if(n&&Bhe.includes(n.text))return n;throw n?new ft("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new ft("Invalid delimiter type '"+e.type+"'",e)}Nt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=i4(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:tL[e.funcName].size,mclass:tL[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?He.makeSpan([e.mclass]):Uc.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(ja(e.delim,e.mode));var n=new ut.MathNode("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=St(Uc.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function nL(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Nt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new ft("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:i4(t[0],e).text,color:n}}});Nt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=i4(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var s=qn(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{nL(e);for(var n=Ji(e.body,t,!0,["mopen","mclose"]),r=0,i=0,s=!1,o=0;o{nL(e);var n=Eo(e.body,t);if(e.left!=="."){var r=new ut.MathNode("mo",[ja(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var i=new ut.MathNode("mo",[ja(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return RC(n)}});Nt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=i4(t[0],e);if(!e.parser.leftrightDepth)throw new ft("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===".")n=tv(t,[]);else{n=Uc.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?ja("|","text"):ja(e.delim,e.mode),r=new ut.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var HC=(e,t)=>{var n=He.wrapFragment(cr(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,s,o=0,a=hr.isCharacterBox(e.body);if(r==="sout")s=He.makeSpan(["stretchy","sout"]),s.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r==="phase"){var l=oi({number:.6,unit:"pt"},t),c=oi({number:.35,unit:"ex"},t),u=t.havingBaseSizing();i=i/u.sizeMultiplier;var d=n.height+n.depth+l+c;n.style.paddingLeft=St(d/2+l);var f=Math.floor(1e3*d*i),m=Ofe(f),g=new Qc([new ld("phase",m)],{width:"400em",height:St(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});s=He.makeSvgSpan(["hide-tail"],[g],t),s.style.height=St(d),o=n.depth+l+c}else{/cancel/.test(r)?a||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var p=0,y=0,v=0;/box/.test(r)?(v=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r==="colorbox"?0:v),y=p):r==="angl"?(v=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*v,y=Math.max(0,.25-n.depth)):(p=a?.2:0,y=p),s=eu.encloseSpan(n,r,p,y,t),/fbox|boxed|fcolorbox/.test(r)?(s.style.borderStyle="solid",s.style.borderWidth=St(v)):r==="angl"&&v!==.049&&(s.style.borderTopWidth=St(v),s.style.borderRightWidth=St(v)),o=n.depth+y,e.backgroundColor&&(s.style.backgroundColor=e.backgroundColor,e.borderColor&&(s.style.borderColor=e.borderColor))}var b;if(e.backgroundColor)b=He.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:o},{type:"elem",elem:n,shift:0}]},t);else{var w=/cancel|phase/.test(r)?["svg-align"]:[];b=He.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:s,shift:o,wrapperClasses:w}]},t)}return/cancel/.test(r)&&(b.height=n.height,b.depth=n.depth),/cancel/.test(r)&&!a?He.makeSpan(["mord","cancel-lap"],[b],t):He.makeSpan(["mord"],[b],t)},jC=(e,t)=>{var n=0,r=new ut.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[zr(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 i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};Nt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=qn(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:s,body:o}},htmlBuilder:HC,mathmlBuilder:jC});Nt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=qn(t[0],"color-token").color,o=qn(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:o,borderColor:s,body:a}},htmlBuilder:HC,mathmlBuilder:jC});Nt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});Nt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:HC,mathmlBuilder:jC});Nt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var ej={};function rc(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:s,mathmlBuilder:o}=e,a={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{var t=e.parser.settings;if(!t.displayMode)throw new ft("{"+e.envName+"} can be used only in display mode.")};function BC(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function Id(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:s,arraystretch:o,colSeparationType:a,autoTag:l,singleRow:c,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)o=1;else if(o=parseFloat(m),!o||o<0)throw new ft("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var g=[],p=[g],y=[],v=[],b=l!=null?[]:void 0;function w(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function x(){b&&(e.gullet.macros.get("\\df@tag")?(b.push(e.subparse([new Wo("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):b.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(w(),v.push(rL(e));;){var k=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),k={type:"ordgroup",mode:e.mode,body:k},n&&(k={type:"styling",mode:e.mode,style:n,body:[k]}),g.push(k);var _=e.fetch().text;if(_==="&"){if(d&&g.length===d){if(c||a)throw new ft("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(_==="\\end"){x(),g.length===1&&k.type==="styling"&&k.body[0].body.length===0&&(p.length>1||!u)&&p.pop(),v.length0&&(w+=.25),c.push({pos:w,isDashed:Ae[Te]})}for(x(o[0]),r=0;r0&&(V+=b,EAe))for(r=0;r=a)){var se=void 0;(i>0||t.hskipBeforeAndAfter)&&(se=hr.deflt(re.pregap,f),se!==0&&(M=He.makeSpan(["arraycolsep"],[]),M.style.width=St(se),T.push(M)));var ce=[];for(r=0;r0){for(var ie=He.makeLineSpan("hline",n,u),ne=He.makeLineSpan("hdashline",n,u),z=[{type:"elem",elem:l,shift:0}];c.length>0;){var Ce=c.pop(),$e=Ce.pos-F;Ce.isDashed?z.push({type:"elem",elem:ne,shift:$e}):z.push({type:"elem",elem:ie,shift:$e})}l=He.makeVList({positionType:"individualShift",children:z},n)}if(A.length===0)return He.makeSpan(["mord"],[l],n);var Ne=He.makeVList({positionType:"individualShift",children:A},n);return Ne=He.makeSpan(["tag"],[Ne],n),He.makeFragment([l,Ne])},qhe={c:"center ",l:"left ",r:"right "},sc=function(t,n){for(var r=[],i=new ut.MathNode("mtd",[],["mtr-glue"]),s=new ut.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var g=t.cols,p="",y=!1,v=0,b=g.length;g[0].type==="separator"&&(f+="top ",v=1),g[g.length-1].type==="separator"&&(f+="bottom ",b-=1);for(var w=v;w0?"left ":"",f+=C[C.length-1].length>0?"right ":"";for(var L=1;L-1?"alignat":"align",s=t.envName==="split",o=Id(t.parser,{cols:r,addJot:!0,autoTag:s?void 0:BC(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:s?2:void 0,leqno:t.parser.settings.leqno},"display"),a,l=0,c={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var u="",d=0;d0&&m&&(y=1),r[g]={type:"align",align:p,pregap:y,postgap:0}}return o.colSeparationType=m?"align":"alignat",o};rc({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=n4(t[0]),r=n?[t[0]]:qn(t[0],"ordgroup").body,i=r.map(function(o){var a=NC(o),l=a.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new ft("Unknown column alignment: "+l,o)}),s={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Id(e.parser,s,qC(e.envName))},htmlBuilder:ic,mathmlBuilder:sc});rc({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 i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,"lcr".indexOf(n)===-1)throw new ft("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var s=Id(e.parser,r,qC(e.envName)),o=Math.max(0,...s.body.map(a=>a.length));return s.cols=new Array(o).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:ic,mathmlBuilder:sc});rc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=Id(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:ic,mathmlBuilder:sc});rc({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=n4(t[0]),r=n?[t[0]]:qn(t[0],"ordgroup").body,i=r.map(function(o){var a=NC(o),l=a.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new ft("Unknown column alignment: "+l,o)});if(i.length>1)throw new ft("{subarray} can contain only one column");var s={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=Id(e.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new ft("{subarray} can contain only one column");return s},htmlBuilder:ic,mathmlBuilder:sc});rc({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=Id(e.parser,t,qC(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:ic,mathmlBuilder:sc});rc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:nj,htmlBuilder:ic,mathmlBuilder:sc});rc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){["gather","gather*"].includes(e.envName)&&s4(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:BC(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Id(e.parser,t,"display")},htmlBuilder:ic,mathmlBuilder:sc});rc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:nj,htmlBuilder:ic,mathmlBuilder:sc});rc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){s4(e);var t={autoTag:BC(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Id(e.parser,t,"display")},htmlBuilder:ic,mathmlBuilder:sc});rc({type:"array",names:["CD"],props:{numArgs:0},handler(e){return s4(e),Ahe(e.parser)},htmlBuilder:ic,mathmlBuilder:sc});oe("\\nonumber","\\gdef\\@eqnsw{0}");oe("\\notag","\\nonumber");Nt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new ft(e.funcName+" valid only within array environment")}});var iL=ej;Nt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!=="ordgroup")throw new ft("Invalid environment name",i);for(var s="",o=0;o{var n=e.font,r=t.withFont(n);return cr(e.body,r)},ij=(e,t)=>{var n=e.font,r=t.withFont(n);return zr(e.body,r)},sL={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Nt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=aw(t[0]),s=r;return s in sL&&(s=sL[s]),{type:"font",mode:n.mode,font:s.slice(1),body:i}},htmlBuilder:rj,mathmlBuilder:ij});Nt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=hr.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:r4(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}});Nt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:s}=n,o=n.parseExpression(!0,i),a="math"+r.slice(1);return{type:"font",mode:s,font:a,body:{type:"ordgroup",mode:n.mode,body:o}}},htmlBuilder:rj,mathmlBuilder:ij});var sj=(e,t)=>{var n=t;return e==="display"?n=n.id>=yn.SCRIPT.id?n.text():yn.DISPLAY:e==="text"&&n.size===yn.DISPLAY.size?n=yn.TEXT:e==="script"?n=yn.SCRIPT:e==="scriptscript"&&(n=yn.SCRIPTSCRIPT),n},UC=(e,t)=>{var n=sj(e.size,t.style),r=n.fracNum(),i=n.fracDen(),s;s=t.havingStyle(r);var o=cr(e.numer,s,t);if(e.continued){var a=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?g=3*f:g=7*f,p=t.fontMetrics().denom1):(d>0?(m=t.fontMetrics().num2,g=f):(m=t.fontMetrics().num3,g=3*f),p=t.fontMetrics().denom2);var y;if(u){var b=t.fontMetrics().axisHeight;m-o.depth-(b+.5*d){var n=new ut.MathNode("mfrac",[zr(e.numer,t),zr(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=oi(e.barSize,t);n.setAttribute("linethickness",St(r))}var i=sj(e.size,t.style);if(i.size!==t.style.size){n=new ut.MathNode("mstyle",[n]);var s=i.size===yn.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",s),n.setAttribute("scriptlevel","0")}if(e.leftDelim!=null||e.rightDelim!=null){var o=[];if(e.leftDelim!=null){var a=new ut.MathNode("mo",[new ut.TextNode(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),o.push(a)}if(o.push(n),e.rightDelim!=null){var l=new ut.MathNode("mo",[new ut.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return RC(o)}return n};Nt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=t[1],o,a=null,l=null,c="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,a="(",l=")";break;case"\\\\bracefrac":o=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":o=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:n.mode,continued:!1,numer:i,denom:s,hasBarLine:o,leftDelim:a,rightDelim:l,size:c,barSize:null}},htmlBuilder:UC,mathmlBuilder:WC});Nt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:i,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});Nt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:r}}});var oL=["display","text","script","scriptscript"],aL=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};Nt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],s=aw(t[0]),o=s.type==="atom"&&s.family==="open"?aL(s.text):null,a=aw(t[1]),l=a.type==="atom"&&a.family==="close"?aL(a.text):null,c=qn(t[2],"size"),u,d=null;c.isBlank?u=!0:(d=c.value,u=d.number>0);var f="auto",m=t[3];if(m.type==="ordgroup"){if(m.body.length>0){var g=qn(m.body[0],"textord");f=oL[Number(g.text)]}}else m=qn(m,"textord"),f=oL[Number(m.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:l,size:f}},htmlBuilder:UC,mathmlBuilder:WC});Nt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:qn(t[0],"size").value,token:i}}});Nt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=wfe(qn(t[1],"infix").size),o=t[2],a=s.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:a,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:UC,mathmlBuilder:WC});var oj=(e,t)=>{var n=t.style,r,i;e.type==="supsub"?(r=e.sup?cr(e.sup,t.havingStyle(n.sup()),t):cr(e.sub,t.havingStyle(n.sub()),t),i=qn(e.base,"horizBrace")):i=qn(e,"horizBrace");var s=cr(i.base,t.havingBaseStyle(yn.DISPLAY)),o=eu.svgSpan(i,t),a;if(i.isOver?(a=He.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t),a.children[0].children[0].children[1].classes.push("svg-align")):(a=He.makeVList({positionType:"bottom",positionData:s.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t),a.children[0].children[0].children[0].classes.push("svg-align")),r){var l=He.makeSpan(["mord",i.isOver?"mover":"munder"],[a],t);i.isOver?a=He.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):a=He.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return He.makeSpan(["mord",i.isOver?"mover":"munder"],[a],t)},Uhe=(e,t)=>{var n=eu.mathMLnode(e.label);return new ut.MathNode(e.isOver?"mover":"munder",[zr(e.base,t),n])};Nt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:oj,mathmlBuilder:Uhe});Nt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=qn(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:Ei(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=Ji(e.body,t,!1);return He.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=cd(e.body,t);return n instanceof No||(n=new No("mrow",[n])),n.setAttribute("href",e.href),n}});Nt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=qn(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],s=0;s{var{parser:n,funcName:r,token:i}=e,s=qn(t[0],"raw").string,o=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var a,l={};switch(r){case"\\htmlClass":l.class=s,a={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,a={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,a={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var c=s.split(","),u=0;u{var n=Ji(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=He.makeSpan(r,n,t);for(var s in e.attributes)s!=="class"&&e.attributes.hasOwnProperty(s)&&i.setAttribute(s,e.attributes[s]);return i},mathmlBuilder:(e,t)=>cd(e.body,t)});Nt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Ei(t[0]),mathml:Ei(t[1])}},htmlBuilder:(e,t)=>{var n=Ji(e.html,t,!1);return He.makeFragment(n)},mathmlBuilder:(e,t)=>cd(e.mathml,t)});var A3=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new ft("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!CH(r))throw new ft("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};Nt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},a="";if(n[0])for(var l=qn(n[0],"raw").string,c=l.split(","),u=0;u{var n=oi(e.height,t),r=0;e.totalheight.number>0&&(r=oi(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=oi(e.width,t));var s={height:St(n+r)};i>0&&(s.width=St(i)),r>0&&(s.verticalAlign=St(-r));var o=new Ufe(e.src,e.alt,s);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new ut.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=oi(e.height,t),i=0;if(e.totalheight.number>0&&(i=oi(e.totalheight,t)-r,n.setAttribute("valign",St(-i))),n.setAttribute("height",St(r+i)),e.width.number>0){var s=oi(e.width,t);n.setAttribute("width",St(s))}return n.setAttribute("src",e.src),n}});Nt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=qn(t[0],"size");if(n.settings.strict){var s=r[1]==="m",o=i.value.unit==="mu";s?(o||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+i.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):o&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return He.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var n=oi(e.dimension,t);return new ut.SpaceNode(n)}});Nt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=He.makeSpan([],[cr(e.body,t)]),n=He.makeSpan(["inner"],[n],t)):n=He.makeSpan(["inner"],[cr(e.body,t)]);var r=He.makeSpan(["fix"],[]),i=He.makeSpan([e.alignment],[n,r],t),s=He.makeSpan(["strut"]);return s.style.height=St(i.height+i.depth),i.depth&&(s.style.verticalAlign=St(-i.depth)),i.children.unshift(s),i=He.makeSpan(["thinbox"],[i],t),He.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new ut.MathNode("mpadded",[zr(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}});Nt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode("math");var s=n==="\\("?"\\)":"$",o=r.parseExpression(!1,s);return r.expect(s),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:o}}});Nt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new ft("Mismatched "+e.funcName)}});var lL=(e,t)=>{switch(t.style.size){case yn.DISPLAY.size:return e.display;case yn.TEXT.size:return e.text;case yn.SCRIPT.size:return e.script;case yn.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Nt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Ei(t[0]),text:Ei(t[1]),script:Ei(t[2]),scriptscript:Ei(t[3])}},htmlBuilder:(e,t)=>{var n=lL(e,t),r=Ji(n,t,!1);return He.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=lL(e,t);return cd(n,t)}});var aj=(e,t,n,r,i,s,o)=>{e=He.makeSpan([],[e]);var a=n&&hr.isCharacterBox(n),l,c;if(t){var u=cr(t,r.havingStyle(i.sup()),r);c={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=cr(n,r.havingStyle(i.sub()),r);l={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(c&&l){var m=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o;f=He.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:St(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:St(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(l){var g=e.height-o;f=He.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:St(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},r)}else if(c){var p=e.depth+o;f=He.makeVList({positionType:"bottom",positionData:p,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:St(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return e;var y=[f];if(l&&s!==0&&!a){var v=He.makeSpan(["mspace"],[],r);v.style.marginRight=St(s),y.unshift(v)}return He.makeSpan(["mop","op-limits"],y,r)},lj=["\\smallint"],Sg=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=qn(e.base,"op"),i=!0):s=qn(e,"op");var o=t.style,a=!1;o.size===yn.DISPLAY.size&&s.symbol&&!lj.includes(s.name)&&(a=!0);var l;if(s.symbol){var c=a?"Size2-Regular":"Size1-Regular",u="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(u=s.name.slice(1),s.name=u==="oiint"?"\\iint":"\\iiint"),l=He.makeSymbol(s.name,c,"math",t,["mop","op-symbol",a?"large-op":"small-op"]),u.length>0){var d=l.italic,f=He.staticSvg(u+"Size"+(a?"2":"1"),t);l=He.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:f,shift:a?.08:0}]},t),s.name="\\"+u,l.classes.unshift("mop"),l.italic=d}}else if(s.body){var m=Ji(s.body,t,!0);m.length===1&&m[0]instanceof Ha?(l=m[0],l.classes[0]="mop"):l=He.makeSpan(["mop"],m,t)}else{for(var g=[],p=1;p{var n;if(e.symbol)n=new No("mo",[ja(e.name,e.mode)]),lj.includes(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new No("mo",Eo(e.body,t));else{n=new No("mi",[new jl(e.name.slice(1))]);var r=new No("mo",[ja("⁡","text")]);e.parentIsSupSub?n=new No("mrow",[n,r]):n=RH([n,r])}return n},Whe={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Nt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=Whe[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Sg,mathmlBuilder:x1});Nt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ei(r)}},htmlBuilder:Sg,mathmlBuilder:x1});var Khe={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Nt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Sg,mathmlBuilder:x1});Nt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Sg,mathmlBuilder:x1});Nt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=Khe[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Sg,mathmlBuilder:x1});var cj=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=qn(e.base,"operatorname"),i=!0):s=qn(e,"operatorname");var o;if(s.body.length>0){for(var a=s.body.map(d=>{var f=d.text;return typeof f=="string"?{type:"textord",mode:d.mode,text:f}:d}),l=Ji(a,t.withFont("mathrm"),!0),c=0;c{for(var n=Eo(e.body,t.withFont("mathrm")),r=!0,i=0;iu.toText()).join("");n=[new ut.TextNode(a)]}var l=new ut.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new ut.MathNode("mo",[ja("⁡","text")]);return e.parentIsSupSub?new ut.MathNode("mrow",[l,c]):ut.newDocumentFragment([l,c])};Nt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"operatorname",mode:n.mode,body:Ei(i),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:cj,mathmlBuilder:Ghe});oe("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");oh({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?He.makeFragment(Ji(e.body,t,!1)):He.makeSpan(["mord"],Ji(e.body,t,!0),t)},mathmlBuilder(e,t){return cd(e.body,t,!0)}});Nt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=cr(e.body,t.havingCrampedStyle()),r=He.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,s=He.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return He.makeSpan(["mord","overline"],[s],t)},mathmlBuilder(e,t){var n=new ut.MathNode("mo",[new ut.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new ut.MathNode("mover",[zr(e.body,t),n]);return r.setAttribute("accent","true"),r}});Nt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:Ei(r)}},htmlBuilder:(e,t)=>{var n=Ji(e.body,t.withPhantom(),!1);return He.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=Eo(e.body,t);return new ut.MathNode("mphantom",n)}});Nt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=He.makeSpan([],[cr(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r{var n=Eo(Ei(e.body),t),r=new ut.MathNode("mphantom",n),i=new ut.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});Nt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=He.makeSpan(["inner"],[cr(e.body,t.withPhantom())]),r=He.makeSpan(["fix"],[]);return He.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=Eo(Ei(e.body),t),r=new ut.MathNode("mphantom",n),i=new ut.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}});Nt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=qn(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=cr(e.body,t),r=oi(e.dy,t);return He.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new ut.MathNode("mpadded",[zr(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});Nt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});Nt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,i=n[0],s=qn(t[0],"size"),o=qn(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&qn(i,"size").value,width:s.value,height:o.value}},htmlBuilder(e,t){var n=He.makeSpan(["mord","rule"],[],t),r=oi(e.width,t),i=oi(e.height,t),s=e.shift?oi(e.shift,t):0;return n.style.borderRightWidth=St(r),n.style.borderTopWidth=St(i),n.style.bottom=St(s),n.width=r,n.height=i+s,n.depth=-s,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=oi(e.width,t),r=oi(e.height,t),i=e.shift?oi(e.shift,t):0,s=t.color&&t.getColor()||"black",o=new ut.MathNode("mspace");o.setAttribute("mathbackground",s),o.setAttribute("width",St(n)),o.setAttribute("height",St(r));var a=new ut.MathNode("mpadded",[o]);return i>=0?a.setAttribute("height",St(i)):(a.setAttribute("height",St(i)),a.setAttribute("depth",St(-i))),a.setAttribute("voffset",St(i)),a}});function uj(e,t,n){for(var r=Ji(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,s=0;s{var n=t.havingSize(e.size);return uj(e.body,n,t)};Nt({type:"sizing",names:cL,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,s=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:cL.indexOf(r)+1,body:s}},htmlBuilder:Zhe,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=Eo(e.body,n),i=new ut.MathNode("mstyle",r);return i.setAttribute("mathsize",St(n.sizeMultiplier)),i}});Nt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,s=!1,o=n[0]&&qn(n[0],"ordgroup");if(o)for(var a="",l=0;l{var n=He.makeSpan([],[cr(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r{var n=new ut.MathNode("mpadded",[zr(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});Nt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],s=t[0];return{type:"sqrt",mode:r.mode,body:s,index:i}},htmlBuilder(e,t){var n=cr(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=He.wrapFragment(n,t);var r=t.fontMetrics(),i=r.defaultRuleThickness,s=i;t.style.idn.height+n.depth+o&&(o=(o+d-n.height-n.depth)/2);var f=l.height-n.height-o-c;n.style.paddingLeft=St(u);var m=He.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+f)},{type:"elem",elem:l},{type:"kern",size:c}]},t);if(e.index){var g=t.havingStyle(yn.SCRIPTSCRIPT),p=cr(e.index,g,t),y=.6*(m.height-m.depth),v=He.makeVList({positionType:"shift",positionData:-y,children:[{type:"elem",elem:p}]},t),b=He.makeSpan(["root"],[v]);return He.makeSpan(["mord","sqrt"],[b,m],t)}else return He.makeSpan(["mord","sqrt"],[m],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new ut.MathNode("mroot",[zr(n,t),zr(r,t)]):new ut.MathNode("msqrt",[zr(n,t)])}});var uL={display:yn.DISPLAY,text:yn.TEXT,script:yn.SCRIPT,scriptscript:yn.SCRIPTSCRIPT};Nt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,s=i.parseExpression(!0,n),o=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:o,body:s}},htmlBuilder(e,t){var n=uL[e.style],r=t.havingStyle(n).withFont("");return uj(e.body,r,t)},mathmlBuilder(e,t){var n=uL[e.style],r=t.havingStyle(n),i=Eo(e.body,r),s=new ut.MathNode("mstyle",i),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},a=o[e.style];return s.setAttribute("scriptlevel",a[0]),s.setAttribute("displaystyle",a[1]),s}});var Yhe=function(t,n){var r=t.base;if(r)if(r.type==="op"){var i=r.limits&&(n.style.size===yn.DISPLAY.size||r.alwaysHandleSupSub);return i?Sg:null}else if(r.type==="operatorname"){var s=r.alwaysHandleSupSub&&(n.style.size===yn.DISPLAY.size||r.limits);return s?cj:null}else{if(r.type==="accent")return hr.isCharacterBox(r.base)?VC:null;if(r.type==="horizBrace"){var o=!t.sub;return o===r.isOver?oj:null}else return null}else return null};oh({type:"supsub",htmlBuilder(e,t){var n=Yhe(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:s}=e,o=cr(r,t),a,l,c=t.fontMetrics(),u=0,d=0,f=r&&hr.isCharacterBox(r);if(i){var m=t.havingStyle(t.style.sup());a=cr(i,m,t),f||(u=o.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(s){var g=t.havingStyle(t.style.sub());l=cr(s,g,t),f||(d=o.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}var p;t.style===yn.DISPLAY?p=c.sup1:t.style.cramped?p=c.sup3:p=c.sup2;var y=t.sizeMultiplier,v=St(.5/c.ptPerEm/y),b=null;if(l){var w=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(o instanceof Ha||w)&&(b=St(-o.italic))}var x;if(a&&l){u=Math.max(u,p,a.depth+.25*c.xHeight),d=Math.max(d,c.sub2);var k=c.defaultRuleThickness,_=4*k;if(u-a.depth-(l.height-d)<_){d=_-(u-a.depth)+l.height;var E=.8*c.xHeight-(u-a.depth);E>0&&(u+=E,d-=E)}var C=[{type:"elem",elem:l,shift:d,marginRight:v,marginLeft:b},{type:"elem",elem:a,shift:-u,marginRight:v}];x=He.makeVList({positionType:"individualShift",children:C},t)}else if(l){d=Math.max(d,c.sub1,l.height-.8*c.xHeight);var L=[{type:"elem",elem:l,marginLeft:b,marginRight:v}];x=He.makeVList({positionType:"shift",positionData:d,children:L},t)}else if(a)u=Math.max(u,p,a.depth+.25*c.xHeight),x=He.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:a,marginRight:v}]},t);else throw new Error("supsub must have either sup or sub.");var O=PS(o,"right")||"mord";return He.makeSpan([O],[o,He.makeSpan(["msupsub"],[x])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var s=[zr(e.base,t)];e.sub&&s.push(zr(e.sub,t)),e.sup&&s.push(zr(e.sup,t));var o;if(n)o=r?"mover":"munder";else if(e.sub)if(e.sup){var c=e.base;c&&c.type==="op"&&c.limits&&t.style===yn.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(t.style===yn.DISPLAY||c.limits)?o="munderover":o="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===yn.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===yn.DISPLAY)?o="munder":o="msub"}else{var a=e.base;a&&a.type==="op"&&a.limits&&(t.style===yn.DISPLAY||a.alwaysHandleSupSub)||a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||t.style===yn.DISPLAY)?o="mover":o="msup"}return new ut.MathNode(o,s)}});oh({type:"atom",htmlBuilder(e,t){return He.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new ut.MathNode("mo",[ja(e.text,e.mode)]);if(e.family==="bin"){var r=FC(e,t);r==="bold-italic"&&n.setAttribute("mathvariant",r)}else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var dj={mi:"italic",mn:"normal",mtext:"normal"};oh({type:"mathord",htmlBuilder(e,t){return He.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var n=new ut.MathNode("mi",[ja(e.text,e.mode,t)]),r=FC(e,t)||"italic";return r!==dj[n.type]&&n.setAttribute("mathvariant",r),n}});oh({type:"textord",htmlBuilder(e,t){return He.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var n=ja(e.text,e.mode,t),r=FC(e,t)||"normal",i;return e.mode==="text"?i=new ut.MathNode("mtext",[n]):/[0-9]/.test(e.text)?i=new ut.MathNode("mn",[n]):e.text==="\\prime"?i=new ut.MathNode("mo",[n]):i=new ut.MathNode("mi",[n]),r!==dj[i.type]&&i.setAttribute("mathvariant",r),i}});var L3={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},M3={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};oh({type:"spacing",htmlBuilder(e,t){if(M3.hasOwnProperty(e.text)){var n=M3[e.text].className||"";if(e.mode==="text"){var r=He.makeOrd(e,t,"textord");return r.classes.push(n),r}else return He.makeSpan(["mspace",n],[He.mathsym(e.text,e.mode,t)],t)}else{if(L3.hasOwnProperty(e.text))return He.makeSpan(["mspace",L3[e.text]],[],t);throw new ft('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(M3.hasOwnProperty(e.text))n=new ut.MathNode("mtext",[new ut.TextNode(" ")]);else{if(L3.hasOwnProperty(e.text))return new ut.MathNode("mspace");throw new ft('Unknown type of space "'+e.text+'"')}return n}});var dL=()=>{var e=new ut.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};oh({type:"tag",mathmlBuilder(e,t){var n=new ut.MathNode("mtable",[new ut.MathNode("mtr",[dL(),new ut.MathNode("mtd",[cd(e.body,t)]),dL(),new ut.MathNode("mtd",[cd(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var fL={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},hL={"\\textbf":"textbf","\\textmd":"textmd"},Xhe={"\\textit":"textit","\\textup":"textup"},mL=(e,t)=>{var n=e.font;if(n){if(fL[n])return t.withTextFontFamily(fL[n]);if(hL[n])return t.withTextFontWeight(hL[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(Xhe[n])};Nt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"text",mode:n.mode,body:Ei(i),font:r}},htmlBuilder(e,t){var n=mL(e,t),r=Ji(e.body,n,!0);return He.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=mL(e,t);return cd(e.body,n)}});Nt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=cr(e.body,t),r=He.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,s=He.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},t);return He.makeSpan(["mord","underline"],[s],t)},mathmlBuilder(e,t){var n=new ut.MathNode("mo",[new ut.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new ut.MathNode("munder",[zr(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});Nt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=cr(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return He.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){return new ut.MathNode("mpadded",[zr(e.body,t)],["vcenter"])}});Nt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new ft("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=gL(e),r=[],i=t.havingStyle(t.style.text()),s=0;se.body.replace(/ /g,e.star?"␣":" "),ju=PH,fj=`[ \r ]`,Qhe="\\\\[a-zA-Z@]+",Jhe="\\\\[^\uD800-\uDFFF]",eme="("+Qhe+")"+fj+"*",tme=`\\\\( |[ \r ]+ ?)[ \r ]*`,NS="[̀-ͯ]",nme=new RegExp(NS+"+$"),rme="("+fj+"+)|"+(tme+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(NS+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(NS+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+eme)+("|"+Jhe+")");class pL{constructor(t,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=n,this.tokenRegex=new RegExp(rme,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,n){this.catcodes[t]=n}lex(){var t=this.input,n=this.tokenRegex.lastIndex;if(n===t.length)return new Wo("EOF",new ko(this,n,n));var r=this.tokenRegex.exec(t);if(r===null||r.index!==n)throw new ft("Unexpected character: '"+t[n]+"'",new Wo(t[n],new ko(this,n,n+1)));var i=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[i]===14){var s=t.indexOf(` `,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new Wo(i,new ko(this,n,this.tokenRegex.lastIndex))}}class ime{constructor(t,n){t===void 0&&(t={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new ft("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var n in t)t.hasOwnProperty(n)&&(t[n]==null?delete this.current[n]:this.current[n]=t[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,n,r){if(r===void 0&&(r=!1),r){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][t]=n)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(t)&&(s[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var sme=tj;oe("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});oe("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});oe("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});oe("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});oe("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});oe("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");oe("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var vL={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};oe("\\char",function(e){var t=e.popToken(),n,r="";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 ft("\\char` missing argument");r=t.text.charCodeAt(0)}else n=10;if(n){if(r=vL[t.text],r==null||r>=n)throw new ft("Invalid base-"+n+" digit "+t.text);for(var i;(i=vL[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new ft("\\newcommand's first argument must be a macro name");var s=i[0].text,o=e.isDefined(s);if(o&&!t)throw new ft("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!o&&!n)throw new ft("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var a=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var l="",c=e.expandNextToken();c.text!=="]"&&c.text!=="EOF";)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new ft("Invalid number of arguments: "+l);a=parseInt(l),i=e.consumeArg().tokens}return o&&r||e.macros.set(s,{tokens:i,numArgs:a}),""};oe("\\newcommand",e=>KC(e,!1,!0,!1));oe("\\renewcommand",e=>KC(e,!0,!1,!1));oe("\\providecommand",e=>KC(e,!0,!0,!0));oe("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});oe("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});oe("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),ju[n],Gr.math[n],Gr.text[n]),""});oe("\\bgroup","{");oe("\\egroup","}");oe("~","\\nobreakspace");oe("\\lq","`");oe("\\rq","'");oe("\\aa","\\r a");oe("\\AA","\\r A");oe("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");oe("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");oe("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");oe("ℬ","\\mathscr{B}");oe("ℰ","\\mathscr{E}");oe("ℱ","\\mathscr{F}");oe("ℋ","\\mathscr{H}");oe("ℐ","\\mathscr{I}");oe("ℒ","\\mathscr{L}");oe("ℳ","\\mathscr{M}");oe("ℛ","\\mathscr{R}");oe("ℭ","\\mathfrak{C}");oe("ℌ","\\mathfrak{H}");oe("ℨ","\\mathfrak{Z}");oe("\\Bbbk","\\Bbb{k}");oe("·","\\cdotp");oe("\\llap","\\mathllap{\\textrm{#1}}");oe("\\rlap","\\mathrlap{\\textrm{#1}}");oe("\\clap","\\mathclap{\\textrm{#1}}");oe("\\mathstrut","\\vphantom{(}");oe("\\underbar","\\underline{\\text{#1}}");oe("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');oe("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");oe("\\ne","\\neq");oe("≠","\\neq");oe("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");oe("∉","\\notin");oe("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");oe("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");oe("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");oe("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");oe("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");oe("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");oe("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");oe("⟂","\\perp");oe("‼","\\mathclose{!\\mkern-0.8mu!}");oe("∌","\\notni");oe("⌜","\\ulcorner");oe("⌝","\\urcorner");oe("⌞","\\llcorner");oe("⌟","\\lrcorner");oe("©","\\copyright");oe("®","\\textregistered");oe("️","\\textregistered");oe("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');oe("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');oe("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');oe("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');oe("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");oe("⋮","\\vdots");oe("\\varGamma","\\mathit{\\Gamma}");oe("\\varDelta","\\mathit{\\Delta}");oe("\\varTheta","\\mathit{\\Theta}");oe("\\varLambda","\\mathit{\\Lambda}");oe("\\varXi","\\mathit{\\Xi}");oe("\\varPi","\\mathit{\\Pi}");oe("\\varSigma","\\mathit{\\Sigma}");oe("\\varUpsilon","\\mathit{\\Upsilon}");oe("\\varPhi","\\mathit{\\Phi}");oe("\\varPsi","\\mathit{\\Psi}");oe("\\varOmega","\\mathit{\\Omega}");oe("\\substack","\\begin{subarray}{c}#1\\end{subarray}");oe("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");oe("\\boxed","\\fbox{$\\displaystyle{#1}$}");oe("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");oe("\\implies","\\DOTSB\\;\\Longrightarrow\\;");oe("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");oe("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");oe("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var yL={",":"\\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"};oe("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in yL?t=yL[n]:(n.slice(0,4)==="\\not"||n in Gr.math&&["bin","rel"].includes(Gr.math[n].group))&&(t="\\dotsb"),t});var GC={")":!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};oe("\\dotso",function(e){var t=e.future().text;return t in GC?"\\ldots\\,":"\\ldots"});oe("\\dotsc",function(e){var t=e.future().text;return t in GC&&t!==","?"\\ldots\\,":"\\ldots"});oe("\\cdots",function(e){var t=e.future().text;return t in GC?"\\@cdots\\,":"\\@cdots"});oe("\\dotsb","\\cdots");oe("\\dotsm","\\cdots");oe("\\dotsi","\\!\\cdots");oe("\\dotsx","\\ldots\\,");oe("\\DOTSI","\\relax");oe("\\DOTSB","\\relax");oe("\\DOTSX","\\relax");oe("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");oe("\\,","\\tmspace+{3mu}{.1667em}");oe("\\thinspace","\\,");oe("\\>","\\mskip{4mu}");oe("\\:","\\tmspace+{4mu}{.2222em}");oe("\\medspace","\\:");oe("\\;","\\tmspace+{5mu}{.2777em}");oe("\\thickspace","\\;");oe("\\!","\\tmspace-{3mu}{.1667em}");oe("\\negthinspace","\\!");oe("\\negmedspace","\\tmspace-{4mu}{.2222em}");oe("\\negthickspace","\\tmspace-{5mu}{.277em}");oe("\\enspace","\\kern.5em ");oe("\\enskip","\\hskip.5em\\relax");oe("\\quad","\\hskip1em\\relax");oe("\\qquad","\\hskip2em\\relax");oe("\\tag","\\@ifstar\\tag@literal\\tag@paren");oe("\\tag@paren","\\tag@literal{({#1})}");oe("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new ft("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});oe("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");oe("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");oe("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");oe("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");oe("\\newline","\\\\\\relax");oe("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var hj=St(Hl["Main-Regular"][84][1]-.7*Hl["Main-Regular"][65][1]);oe("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+hj+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");oe("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+hj+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");oe("\\hspace","\\@ifstar\\@hspacer\\@hspace");oe("\\@hspace","\\hskip #1\\relax");oe("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");oe("\\ordinarycolon",":");oe("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");oe("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');oe("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');oe("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');oe("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');oe("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');oe("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');oe("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');oe("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');oe("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');oe("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');oe("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');oe("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');oe("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');oe("∷","\\dblcolon");oe("∹","\\eqcolon");oe("≔","\\coloneqq");oe("≕","\\eqqcolon");oe("⩴","\\Coloneqq");oe("\\ratio","\\vcentcolon");oe("\\coloncolon","\\dblcolon");oe("\\colonequals","\\coloneqq");oe("\\coloncolonequals","\\Coloneqq");oe("\\equalscolon","\\eqqcolon");oe("\\equalscoloncolon","\\Eqqcolon");oe("\\colonminus","\\coloneq");oe("\\coloncolonminus","\\Coloneq");oe("\\minuscolon","\\eqcolon");oe("\\minuscoloncolon","\\Eqcolon");oe("\\coloncolonapprox","\\Colonapprox");oe("\\coloncolonsim","\\Colonsim");oe("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");oe("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");oe("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");oe("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");oe("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");oe("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");oe("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");oe("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");oe("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");oe("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");oe("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");oe("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");oe("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");oe("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");oe("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");oe("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");oe("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");oe("\\nleqq","\\html@mathml{\\@nleqq}{≰}");oe("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");oe("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");oe("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");oe("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");oe("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");oe("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");oe("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");oe("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");oe("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");oe("\\imath","\\html@mathml{\\@imath}{ı}");oe("\\jmath","\\html@mathml{\\@jmath}{ȷ}");oe("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");oe("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");oe("⟦","\\llbracket");oe("⟧","\\rrbracket");oe("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");oe("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");oe("⦃","\\lBrace");oe("⦄","\\rBrace");oe("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");oe("⦵","\\minuso");oe("\\darr","\\downarrow");oe("\\dArr","\\Downarrow");oe("\\Darr","\\Downarrow");oe("\\lang","\\langle");oe("\\rang","\\rangle");oe("\\uarr","\\uparrow");oe("\\uArr","\\Uparrow");oe("\\Uarr","\\Uparrow");oe("\\N","\\mathbb{N}");oe("\\R","\\mathbb{R}");oe("\\Z","\\mathbb{Z}");oe("\\alef","\\aleph");oe("\\alefsym","\\aleph");oe("\\Alpha","\\mathrm{A}");oe("\\Beta","\\mathrm{B}");oe("\\bull","\\bullet");oe("\\Chi","\\mathrm{X}");oe("\\clubs","\\clubsuit");oe("\\cnums","\\mathbb{C}");oe("\\Complex","\\mathbb{C}");oe("\\Dagger","\\ddagger");oe("\\diamonds","\\diamondsuit");oe("\\empty","\\emptyset");oe("\\Epsilon","\\mathrm{E}");oe("\\Eta","\\mathrm{H}");oe("\\exist","\\exists");oe("\\harr","\\leftrightarrow");oe("\\hArr","\\Leftrightarrow");oe("\\Harr","\\Leftrightarrow");oe("\\hearts","\\heartsuit");oe("\\image","\\Im");oe("\\infin","\\infty");oe("\\Iota","\\mathrm{I}");oe("\\isin","\\in");oe("\\Kappa","\\mathrm{K}");oe("\\larr","\\leftarrow");oe("\\lArr","\\Leftarrow");oe("\\Larr","\\Leftarrow");oe("\\lrarr","\\leftrightarrow");oe("\\lrArr","\\Leftrightarrow");oe("\\Lrarr","\\Leftrightarrow");oe("\\Mu","\\mathrm{M}");oe("\\natnums","\\mathbb{N}");oe("\\Nu","\\mathrm{N}");oe("\\Omicron","\\mathrm{O}");oe("\\plusmn","\\pm");oe("\\rarr","\\rightarrow");oe("\\rArr","\\Rightarrow");oe("\\Rarr","\\Rightarrow");oe("\\real","\\Re");oe("\\reals","\\mathbb{R}");oe("\\Reals","\\mathbb{R}");oe("\\Rho","\\mathrm{P}");oe("\\sdot","\\cdot");oe("\\sect","\\S");oe("\\spades","\\spadesuit");oe("\\sub","\\subset");oe("\\sube","\\subseteq");oe("\\supe","\\supseteq");oe("\\Tau","\\mathrm{T}");oe("\\thetasym","\\vartheta");oe("\\weierp","\\wp");oe("\\Zeta","\\mathrm{Z}");oe("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");oe("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");oe("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");oe("\\bra","\\mathinner{\\langle{#1}|}");oe("\\ket","\\mathinner{|{#1}\\rangle}");oe("\\braket","\\mathinner{\\langle{#1}\\rangle}");oe("\\Bra","\\left\\langle#1\\right|");oe("\\Ket","\\left|#1\\right\\rangle");var mj=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,s=t.consumeArg().tokens,o=t.macros.get("|"),a=t.macros.get("\\|");t.macros.beginGroup();var l=d=>f=>{e&&(f.macros.set("|",o),i.length&&f.macros.set("\\|",a));var m=d;if(!d&&i.length){var g=f.future();g.text==="|"&&(f.popToken(),m=!0)}return{tokens:m?i:r,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,u=t.expandTokens([...s,...c,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};oe("\\bra@ket",mj(!1));oe("\\bra@set",mj(!0));oe("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");oe("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");oe("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");oe("\\angln","{\\angl n}");oe("\\blue","\\textcolor{##6495ed}{#1}");oe("\\orange","\\textcolor{##ffa500}{#1}");oe("\\pink","\\textcolor{##ff00af}{#1}");oe("\\red","\\textcolor{##df0030}{#1}");oe("\\green","\\textcolor{##28ae7b}{#1}");oe("\\gray","\\textcolor{gray}{#1}");oe("\\purple","\\textcolor{##9d38bd}{#1}");oe("\\blueA","\\textcolor{##ccfaff}{#1}");oe("\\blueB","\\textcolor{##80f6ff}{#1}");oe("\\blueC","\\textcolor{##63d9ea}{#1}");oe("\\blueD","\\textcolor{##11accd}{#1}");oe("\\blueE","\\textcolor{##0c7f99}{#1}");oe("\\tealA","\\textcolor{##94fff5}{#1}");oe("\\tealB","\\textcolor{##26edd5}{#1}");oe("\\tealC","\\textcolor{##01d1c1}{#1}");oe("\\tealD","\\textcolor{##01a995}{#1}");oe("\\tealE","\\textcolor{##208170}{#1}");oe("\\greenA","\\textcolor{##b6ffb0}{#1}");oe("\\greenB","\\textcolor{##8af281}{#1}");oe("\\greenC","\\textcolor{##74cf70}{#1}");oe("\\greenD","\\textcolor{##1fab54}{#1}");oe("\\greenE","\\textcolor{##0d923f}{#1}");oe("\\goldA","\\textcolor{##ffd0a9}{#1}");oe("\\goldB","\\textcolor{##ffbb71}{#1}");oe("\\goldC","\\textcolor{##ff9c39}{#1}");oe("\\goldD","\\textcolor{##e07d10}{#1}");oe("\\goldE","\\textcolor{##a75a05}{#1}");oe("\\redA","\\textcolor{##fca9a9}{#1}");oe("\\redB","\\textcolor{##ff8482}{#1}");oe("\\redC","\\textcolor{##f9685d}{#1}");oe("\\redD","\\textcolor{##e84d39}{#1}");oe("\\redE","\\textcolor{##bc2612}{#1}");oe("\\maroonA","\\textcolor{##ffbde0}{#1}");oe("\\maroonB","\\textcolor{##ff92c6}{#1}");oe("\\maroonC","\\textcolor{##ed5fa6}{#1}");oe("\\maroonD","\\textcolor{##ca337c}{#1}");oe("\\maroonE","\\textcolor{##9e034e}{#1}");oe("\\purpleA","\\textcolor{##ddd7ff}{#1}");oe("\\purpleB","\\textcolor{##c6b9fc}{#1}");oe("\\purpleC","\\textcolor{##aa87ff}{#1}");oe("\\purpleD","\\textcolor{##7854ab}{#1}");oe("\\purpleE","\\textcolor{##543b78}{#1}");oe("\\mintA","\\textcolor{##f5f9e8}{#1}");oe("\\mintB","\\textcolor{##edf2df}{#1}");oe("\\mintC","\\textcolor{##e0e5cc}{#1}");oe("\\grayA","\\textcolor{##f6f7f7}{#1}");oe("\\grayB","\\textcolor{##f0f1f2}{#1}");oe("\\grayC","\\textcolor{##e3e5e6}{#1}");oe("\\grayD","\\textcolor{##d6d8da}{#1}");oe("\\grayE","\\textcolor{##babec2}{#1}");oe("\\grayF","\\textcolor{##888d93}{#1}");oe("\\grayG","\\textcolor{##626569}{#1}");oe("\\grayH","\\textcolor{##3b3e40}{#1}");oe("\\grayI","\\textcolor{##21242c}{#1}");oe("\\kaBlue","\\textcolor{##314453}{#1}");oe("\\kaGreen","\\textcolor{##71B307}{#1}");var gj={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class ome{constructor(t,n,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=n,this.expansionCount=0,this.feed(t),this.macros=new ime(sme,n.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new pL(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var n,r,i;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:i,end:r}=this.consumeArg(["]"])}else({tokens:i,start:n,end:r}=this.consumeArg());return this.pushToken(new Wo("EOF",r.loc)),this.pushTokens(i),new Wo("",ko.range(n,r))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var n=[],r=t&&t.length>0;r||this.consumeSpaces();var i=this.future(),s,o=0,a=0;do{if(s=this.popToken(),n.push(s),s.text==="{")++o;else if(s.text==="}"){if(--o,o===-1)throw new ft("Extra }",s)}else if(s.text==="EOF")throw new ft("Unexpected end of input in a macro argument, expected '"+(t&&r?t[a]:"}")+"'",s);if(t&&r)if((o===0||o===1&&t[a]==="{")&&s.text===t[a]){if(++a,a===t.length){n.splice(-a,a);break}}else a=0}while(o!==0||r);return i.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:i,end:s}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new ft("The length of delimiters doesn't match the number of args!");for(var r=n[0],i=0;ithis.settings.maxExpand)throw new ft("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var n=this.popToken(),r=n.text,i=n.noexpand?null:this._getExpansion(r);if(i==null||t&&i.unexpandable){if(t&&i==null&&r[0]==="\\"&&!this.isDefined(r))throw new ft("Undefined control sequence: "+r);return this.pushToken(n),!1}this.countExpansion(1);var s=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){s=s.slice();for(var a=s.length-1;a>=0;--a){var l=s[a];if(l.text==="#"){if(a===0)throw new ft("Incomplete placeholder at end of macro body",l);if(l=s[--a],l.text==="#")s.splice(a+1,1);else if(/^[1-9]$/.test(l.text))s.splice(a,2,...o[+l.text-1]);else throw new ft("Not a valid argument number",l)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new Wo(t)]):void 0}expandTokens(t){var n=[],r=this.stack.length;for(this.pushTokens(t);this.stack.length>r;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),n.push(i)}return this.countExpansion(n.length),n}expandMacroAsText(t){var n=this.expandMacro(t);return n&&n.map(r=>r.text).join("")}_getExpansion(t){var n=this.macros.get(t);if(n==null)return n;if(t.length===1){var r=this.lexer.catcodes[t];if(r!=null&&r!==13)return}var i=typeof n=="function"?n(this):n;if(typeof i=="string"){var s=0;if(i.indexOf("#")!==-1)for(var o=i.replace(/##/g,"");o.indexOf("#"+(s+1))!==-1;)++s;for(var a=new pL(i,this.settings),l=[],c=a.lex();c.text!=="EOF";)l.push(c),c=a.lex();l.reverse();var u={tokens:l,numArgs:s};return u}return i}isDefined(t){return this.macros.has(t)||ju.hasOwnProperty(t)||Gr.math.hasOwnProperty(t)||Gr.text.hasOwnProperty(t)||gj.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:ju.hasOwnProperty(t)&&!ju[t].primitive}}var bL=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Ay=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),$3={"́":{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"}},wL={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class o4{constructor(t,n){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 ome(t,n,this.mode),this.settings=n,this.leftrightDepth=0}expect(t,n){if(n===void 0&&(n=!0),this.fetch().text!==t)throw new ft("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var n=this.nextToken;this.consume(),this.gullet.pushToken(new Wo("}")),this.gullet.pushTokens(t);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,r}parseExpression(t,n){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(o4.endOfExpression.indexOf(i.text)!==-1||n&&i.text===n||t&&ju[i.text]&&ju[i.text].infix)break;var s=this.parseAtom(n);if(s){if(s.type==="internal")continue}else break;r.push(s)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var n=-1,r,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var a=Gr[this.mode][n].group,l=ko.range(t),c;if(Gfe.hasOwnProperty(a)){var u=a;c={type:"atom",mode:this.mode,family:u,loc:l,text:n}}else c={type:a,mode:this.mode,loc:l,text:n};o=c}else if(n.charCodeAt(0)>=128)this.settings.strict&&(_H(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),t)),o={type:"textord",mode:"text",loc:ko.range(t),text:n};else return null;if(this.consume(),s)for(var d=0;d{let n={};for(var r in e)zS(n,r,{get:e[r],enumerable:!0});return zS(n,Symbol.toStringTag,{value:"Module"}),n},gme=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=hme(t),s=0,o=i.length,a;st[l]).bind(null,a),enumerable:!(r=fme(t,a))||r.enumerable});return e},yj=(e,t,n)=>(gme(e,t,"default"),n);const k1=[{id:"abap",name:"ABAP",import:(()=>B(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>B(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>B(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>B(()=>import("./angular-html-DgL0RwuR.js").then(e=>e.a),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>B(()=>import("./angular-ts-DtEQuh-b.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>B(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>B(()=>import("./apex-Dqspr-GT.js"),[]))},{id:"apl",name:"APL",import:(()=>B(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>B(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>B(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>B(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>B(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>B(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>B(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>B(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>B(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>B(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>B(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>B(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>B(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>B(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>B(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>B(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>B(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>B(()=>import("./c3-MRO5bC_T.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>B(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>B(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>B(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>B(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>B(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>B(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>B(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>B(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>B(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>B(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>B(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>B(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>B(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>B(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>B(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>B(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>B(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>B(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>B(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>B(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>B(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>B(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>B(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>B(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>B(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>B(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>B(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>B(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>B(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>B(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>B(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>B(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>B(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>B(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>B(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>B(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>B(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>B(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>B(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>B(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>B(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>B(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>B(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>B(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>B(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>B(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>B(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>B(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>B(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>B(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>B(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>B(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>B(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>B(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>B(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>B(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>B(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>B(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>B(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>B(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>B(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>B(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>B(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>B(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>B(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>B(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>B(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>B(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>B(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>B(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>B(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>B(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>B(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>B(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>B(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>B(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>B(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>B(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>B(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>B(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>B(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>B(()=>import("./julia-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>B(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>B(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>B(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>B(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>B(()=>import("./latex-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>B(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>B(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>B(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>B(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>B(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>B(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>B(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>B(()=>import("./luau-KW6xsasC.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>B(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>B(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>B(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>B(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>B(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>B(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>B(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>B(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>B(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>B(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>B(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>B(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>B(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>B(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>B(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>B(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>B(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>B(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>B(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>B(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>B(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>B(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>B(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>B(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>B(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>B(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>B(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>B(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>B(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>B(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>B(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>B(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>B(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>B(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>B(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>B(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>B(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>B(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>B(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>B(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>B(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>B(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>B(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>B(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>B(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>B(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>B(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>B(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>B(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>B(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>B(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>B(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>B(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>B(()=>import("./rst-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>B(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>B(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>B(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>B(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>B(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>B(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>B(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>B(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>B(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>B(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>B(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>B(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>B(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>B(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>B(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>B(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>B(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>B(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>B(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>B(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>B(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>B(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>B(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>B(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>B(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>B(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>B(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>B(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>B(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>B(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>B(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>B(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>B(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>B(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>B(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>B(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>B(()=>import("./twig-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>B(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>B(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>B(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>B(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>B(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>B(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>B(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>B(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>B(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>B(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>B(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>B(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>B(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>B(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>B(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>B(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>B(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>B(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>B(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>B(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>B(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>B(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>B(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>B(()=>import("./zig-VOosw3JB.js"),[]))}],QC=Object.fromEntries(k1.map(e=>[e.id,e.import])),JC=Object.fromEntries(k1.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ud={...QC,...JC},e9=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>B(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>B(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>B(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>B(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>B(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>B(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>B(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>B(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>B(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>B(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>B(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>B(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>B(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>B(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>B(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>B(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>B(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>B(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>B(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>B(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>B(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>B(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>B(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>B(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>B(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>B(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>B(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>B(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>B(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>B(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>B(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>B(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>B(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>B(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>B(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>B(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>B(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>B(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>B(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>B(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>B(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>B(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>B(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>B(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>B(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>B(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>B(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>B(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>B(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>B(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>B(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>B(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>B(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>B(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>B(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>B(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>B(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>B(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>B(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>B(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>B(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>B(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>B(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>B(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>B(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],t9=Object.fromEntries(e9.map(e=>[e.id,e.import]));var n9=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function pme(){return 2147483648}function vme(){return typeof performance<"u"?performance.now():Date.now()}const yme=(e,t)=>e+(t-e%t)%t;async function bme(e){let t,n;const r={};function i(m){n=m,r.HEAPU8=new Uint8Array(m),r.HEAPU32=new Uint32Array(m)}function s(m,g,p){r.HEAPU8.copyWithin(m,g,g+p)}function o(m){try{return t.grow(m-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(m){const g=r.HEAPU8.length;m=m>>>0;const p=pme();if(m>p)return!1;for(let y=1;y<=4;y*=2){let v=g*(1+.2/y);v=Math.min(v,m+100663296);const b=Math.min(p,yme(Math.max(m,v),65536));if(o(b))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(m,g,p=1024){const y=g+p;let v=g;for(;m[v]&&!(v>=y);)++v;if(v-g>16&&m.buffer&&l)return l.decode(m.subarray(g,v));let b="";for(;g>10,56320|_&1023)}}return b}function u(m,g){return m?c(r.HEAPU8,m,g):""}const d={emscripten_get_now:vme,emscripten_memcpy_big:s,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const g=await e({env:d,wasi_snapshot_preview1:d});t=g.memory,i(t.buffer),Object.assign(r,g),r.UTF8ToString=u}return await f(),r}var wme=Object.defineProperty,xme=(e,t,n)=>t in e?wme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ui=(e,t,n)=>xme(e,typeof t!="symbol"?t+"":t,n);let cs=null;function kme(e){throw new n9(e.UTF8ToString(e.getLastOnigError()))}class a4{constructor(t){Ui(this,"utf16Length"),Ui(this,"utf8Length"),Ui(this,"utf16Value"),Ui(this,"utf8Value"),Ui(this,"utf16OffsetToUtf8"),Ui(this,"utf8OffsetToUtf16");const n=t.length,r=a4._utf8ByteLength(t),i=r!==n,s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const o=i?new Uint32Array(r+1):null;i&&(o[r]=n);const a=new Uint8Array(r);let l=0;for(let c=0;c=55296&&u<=56319&&c+1=56320&&m<=57343&&(d=(u-55296<<10)+65536|m-56320,f=!0)}i&&(s[c]=l,f&&(s[c+1]=l),d<=127?o[l+0]=c:d<=2047?(o[l+0]=c,o[l+1]=c):d<=65535?(o[l+0]=c,o[l+1]=c,o[l+2]=c):(o[l+0]=c,o[l+1]=c,o[l+2]=c,o[l+3]=c)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&c++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=o}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r=55296&&s<=56319&&r+1=56320&&l<=57343&&(o=(s-55296<<10)+65536|l-56320,a=!0)}o<=127?n+=1:o<=2047?n+=2:o<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const l4=class Ll{constructor(t){if(Ui(this,"id",++Ll.LAST_ID),Ui(this,"_onigBinding"),Ui(this,"content"),Ui(this,"utf16Length"),Ui(this,"utf8Length"),Ui(this,"utf16OffsetToUtf8"),Ui(this,"utf8OffsetToUtf16"),Ui(this,"ptr"),!cs)throw new n9("Must invoke loadWasm first.");this._onigBinding=cs,this.content=t;const n=new a4(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ll._sharedPtrInUse?(Ll._sharedPtr||(Ll._sharedPtr=cs.omalloc(1e4)),Ll._sharedPtrInUse=!0,cs.HEAPU8.set(n.utf8Value,Ll._sharedPtr),this.ptr=Ll._sharedPtr):this.ptr=n.createString(cs)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Ll._sharedPtr?Ll._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Ui(l4,"LAST_ID",0);Ui(l4,"_sharedPtr",0);Ui(l4,"_sharedPtrInUse",!1);let bj=l4;class Sme{constructor(t){if(Ui(this,"_onigBinding"),Ui(this,"_ptr"),!cs)throw new n9("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),_me(r)?r=await r.instantiator(n):Cme(r)?r=await r.default(n):(Tme(r)&&(r=r.data),Eme(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Dme(r)(n):r=await Ame(r)(n):Ime(r)?r=await P3(r)(n):r instanceof WebAssembly.Module?r=await P3(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await P3(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Ly=t(),Ly}function P3(e){return t=>WebAssembly.instantiate(e,t)}function Dme(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Ame(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let wj;function Lme(e){wj=e}function Mme(){return wj}async function i9(e){return e&&await r9(e),{createScanner(t){return new Sme(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new bj(t)}}}const $me=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:i9,getDefaultWasmLoader:Mme,loadWasm:r9,setDefaultWasmLoader:Lme},Symbol.toStringTag,{value:"Module"}));var xj=XC({});yj(xj,$me);var Ur=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Pme(e){return s9(e)}function s9(e){return Array.isArray(e)?Ome(e):e instanceof RegExp?e:typeof e=="object"?Rme(e):e}function Ome(e){let t=[];for(let n=0,r=e.length;n{for(let r in n)e[r]=n[r]}),e}function Sj(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Sj(e.substring(0,e.length-1)):e.substr(~t+1)}var O3=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,My=class{static hasCaptures(e){return e===null?!1:(O3.lastIndex=0,O3.test(e))}static replaceCaptures(e,t,n){return e.replace(O3,(r,i,s,o)=>{let a=n[parseInt(i||s,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(o){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function _j(e,t){return et?1:0}function Cj(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;ithis._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>Fme(e.parent,i.parentScopes));return r?new Ij(r.fontStyle,r.foreground,r.background):null}},R3=class l2{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new l2(t,r);return t}static from(...t){let n=null;for(let r=0;r"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Nme(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Nme(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Ij=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Vme(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,s=t.length;i1&&(y=g.slice(0,g.length-1),y.reverse()),n[r++]=new zme(p,y,i,l,c,u)}}return n}var zme=class{constructor(e,t,n,r,i,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},Rs=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Rs||{});function Hme(e,t){e.sort((l,c)=>{let u=_j(l.scope,c.scope);return u!==0||(u=Cj(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let s=new jme(t),o=new Ij(n,s.getId(r),s.getId(i)),a=new qme(new HS(0,null,-1,0,0),[]);for(let l=0,c=e.length;lt?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},qme=class jS{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const s=n.parentScopes[i].length-t.parentScopes[r].length;if(s!==0)return s;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,s;if(r===-1?(i=t,s=""):(i=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(jS._cmpBySpecificity),n}insert(t,n,r,i,s,o){if(n===""){this._doInsertHere(t,r,i,s,o);return}let a=n.indexOf("."),l,c;a===-1?(l=n,c=""):(l=n.substring(0,a),c=n.substring(a+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new jS(this._mainRule.clone(),HS.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(t+1,c,r,i,s,o)}_doInsertHere(t,n,r,i,s){if(n===null){this._mainRule.acceptOverwrite(t,r,i,s);return}for(let o=0,a=this._rulesWithParentScopes.length;o>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,s,o,a){let l=wa.getLanguageId(t),c=wa.getTokenType(t),u=wa.containsBalancedBrackets(t)?1:0,d=wa.getFontStyle(t),f=wa.getForeground(t),m=wa.getBackground(t);return n!==0&&(l=n),r!==8&&(c=r),i!==null&&(u=i?1:0),s!==-1&&(d=s),o!==0&&(f=o),a!==0&&(m=a),(l<<0|c<<8|u<<10|d<<11|f<<15|m<<24)>>>0}};function cw(e,t){const n=[],r=Ume(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let c=o();if(n.push({matcher:c,priority:l}),i!==",")break;i=r.next()}return n;function s(){if(i==="-"){i=r.next();const l=s();return c=>!!l&&!l(c)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(kL(i)){const l=[];do l.push(i),i=r.next();while(kL(i));return c=>t(l,c)}return null}function o(){const l=[];let c=s();for(;c;)l.push(c),c=s();return u=>l.every(d=>d(u))}function a(){const l=[];let c=o();for(;c&&(l.push(c),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");c=o()}return u=>l.some(d=>d(u))}}function kL(e){return!!e&&!!e.match(/[\w\.:]+/)}function Ume(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Aj(e){typeof e.dispose=="function"&&e.dispose()}var nv=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Wme=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Kme=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Gme=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new nv(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Kme;for(const n of e)Zme(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof nv){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Zme(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof nv?c2({baseGrammar:s,selfGrammar:i},r):BS(e.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);const o=n.injections(e.scopeName);if(o)for(const a of o)r.add(new nv(a))}function BS(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];uw([r],t,n)}}function c2(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&uw(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&uw(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function uw(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?kj({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&uw(r.patterns,{...t,repository:i},n);const s=r.include;if(!s)continue;const o=Lj(s);switch(o.kind){case 0:c2({...t,selfGrammar:t.baseGrammar},n);break;case 1:c2(t,n);break;case 2:BS(o.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=o.scopeName===t.selfGrammar.scopeName?t.selfGrammar:o.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};o.kind===4?BS(o.ruleName,l,n):c2(l,n)}else o.kind===4?n.add(new Wme(o.scopeName,o.ruleName)):n.add(new nv(o.scopeName));break}}}var Yme=class{kind=0},Xme=class{kind=1},Qme=class{constructor(e){this.ruleName=e}kind=2},Jme=class{constructor(e){this.scopeName=e}kind=3},ege=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Lj(e){if(e==="$base")return new Yme;if(e==="$self")return new Xme;const t=e.indexOf("#");if(t===-1)return new Jme(e);if(t===0)return new Qme(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new ege(n,r)}}var tge=/\\(\d+)/,SL=/\\(\d+)/g,nge=-1,Mj=-2;var S1=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=My.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=My.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Sj(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:My.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:My.replaceCaptures(this._contentName,e,t)}},rge=class extends S1{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},ige=class extends S1{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new rv(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new iv,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},_L=class extends S1{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new iv,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},qS=class extends S1{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,s,o,a,l,c){super(e,t,n,r),this._begin=new rv(i,this.id),this.beginCaptures=s,this._end=new rv(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new iv;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},dw=class extends S1{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,s,o,a,l){super(e,t,n,r),this._begin=new rv(i,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new rv(o,Mj),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new iv;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new iv,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},$j=class Ls{static createCaptureRule(t,n,r,i,s){return t.registerRule(o=>new rge(n,o,r,i,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new ige(t.$vscodeTextmateLocation,t.id,t.name,t.match,Ls._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=kj({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new _L(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Ls._compilePatterns(s,n,r))}return t.while?new dw(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ls._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Ls._compileCaptures(t.whileCaptures||t.captures,n,r),Ls._compilePatterns(t.patterns,n,r)):new qS(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ls._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Ls._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Ls._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let s=0;for(const o in t){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);a>s&&(s=a)}for(let o=0;o<=s;o++)i[o]=null;for(const o in t){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);let l=0;t[o].patterns&&(l=Ls.getCompiledRuleId(t[o],n,r)),i[a]=Ls.createCaptureRule(n,t[o].$vscodeTextmateLocation,t[o].name,t[o].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let s=0,o=t.length;st.substring(i.start,i.end));return SL.lastIndex=0,this.source.replace(SL,(i,s)=>Tj(r[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],s,o,a,l;for(s=0,o=this.source.length;sn.source);this._cached=new CL(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new CL(e,r,this._items.map(i=>i.ruleId))}},CL=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new F3(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(US.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},oge=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>Tj(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},TL=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Oj(e,t,n,r,i,s,o,a){const l=t.content.length;let c=!1,u=-1;if(o){const m=age(e,t,n,r,i,s);i=m.stack,r=m.linePos,n=m.isFirstLine,u=m.anchorPosition}const d=Date.now();for(;!c;){if(a!==0&&Date.now()-d>a)return new TL(i,!0);f()}return new TL(i,!1);function f(){const m=lge(e,t,n,r,i,u);if(!m){s.produce(i,l),c=!0;return}const g=m.captureIndices,p=m.matchedRuleId,y=g&&g.length>0?g[0].end>r:!1;if(p===nge){const v=i.getRule(e);s.produce(i,g[0].start),i=i.withContentNameScopesList(i.nameScopesList),q0(e,t,n,i,s,v.endCaptures,g),s.produce(i,g[0].end);const b=i;if(i=i.parent,u=b.getAnchorPos(),!y&&b.getEnterPos()===r){i=b,s.produce(i,l),c=!0;return}}else{const v=e.getRule(p);s.produce(i,g[0].start);const b=i,w=v.getName(t.content,g),x=i.contentNameScopesList.pushAttributed(w,e);if(i=i.push(p,r,u,g[0].end===l,null,x,x),v instanceof qS){const k=v;q0(e,t,n,i,s,k.beginCaptures,g),s.produce(i,g[0].end),u=g[0].end;const _=k.getContentName(t.content,g),E=x.pushAttributed(_,e);if(i=i.withContentNameScopesList(E),k.endHasBackReferences&&(i=i.withEndRule(k.getEndWithResolvedBackReferences(t.content,g))),!y&&b.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),c=!0;return}}else if(v instanceof dw){const k=v;q0(e,t,n,i,s,k.beginCaptures,g),s.produce(i,g[0].end),u=g[0].end;const _=k.getContentName(t.content,g),E=x.pushAttributed(_,e);if(i=i.withContentNameScopesList(E),k.whileHasBackReferences&&(i=i.withEndRule(k.getWhileWithResolvedBackReferences(t.content,g))),!y&&b.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),c=!0;return}}else if(q0(e,t,n,i,s,v.captures,g),s.produce(i,g[0].end),i=i.pop(),!y){i=i.safePop(),s.produce(i,l),c=!0;return}}g[0].end>r&&(r=g[0].end,n=!1)}}function age(e,t,n,r,i,s){let o=i.beginRuleCapturedEOL?0:-1;const a=[];for(let l=i;l;l=l.pop()){const c=l.getRule(e);c instanceof dw&&a.push({rule:c,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:c,findOptions:u}=dge(l.rule,e,l.stack.endRule,n,r===o),d=c.findNextMatchSync(t,r,u);if(d){if(d.ruleId!==Mj){i=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(s.produce(l.stack,d.captureIndices[0].start),q0(e,t,n,l.stack,s,l.rule.whileCaptures,d.captureIndices),s.produce(l.stack,d.captureIndices[0].end),o=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function lge(e,t,n,r,i,s){const o=cge(e,t,n,r,i,s),a=e.getInjections();if(a.length===0)return o;const l=uge(a,e,t,n,r,i,s);if(!l)return o;if(!o)return l;const c=o.captureIndices[0].start,u=l.captureIndices[0].start;return u=a)&&(a=w,l=b.captureIndices,c=b.ruleId,u=g.priority,a===i))break}return l?{priorityMatch:u===-1,captureIndices:l,matchedRuleId:c}:null}function Rj(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function dge(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function q0(e,t,n,r,i,s,o){if(s.length===0)return;const a=t.content,l=Math.min(s.length,o.length),c=[],u=o[0].end;for(let d=0;du)break;for(;c.length>0&&c[c.length-1].endPos<=m.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,m.start):i.produce(r,m.start),f.retokenizeCapturedWithRuleId){const p=f.getName(a,o),y=r.contentNameScopesList.pushAttributed(p,e),v=f.getContentName(a,o),b=y.pushAttributed(v,e),w=r.push(f.retokenizeCapturedWithRuleId,m.start,-1,!1,null,y,b),x=e.createOnigString(a.substring(0,m.end));Oj(e,x,n&&m.start===0,m.start,w,i,!1,0),Aj(x);continue}const g=f.getName(a,o);if(g!==null){const y=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(g,e);c.push(new fge(y,m.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var fge=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function hge(e,t,n,r,i,s,o,a){return new gge(e,t,n,r,i,s,o,a)}function EL(e,t,n,r,i){const s=cw(t,fw),o=$j.getCompiledRuleId(n,r,i.repository);for(const a of s)e.push({debugSelector:t,matcher:a.matcher,ruleId:o,grammar:i,priority:a.priority})}function fw(e,t){if(t.length{for(let i=n;in&&e.substr(0,n)===t&&e[n]==="."}var gge=class{constructor(e,t,n,r,i,s,o,a){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new sge(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=IL(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const c=cw(l,fw);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:i[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let o in i)EL(t,o,i[o],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(o=>{const a=this.getExternalGrammar(o);if(a){const l=a.injectionSelector;l&&EL(t,l,a,this,a)}})}return t.sort((i,s)=>i.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=IL(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=$j.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===WS.NULL){i=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),d=Zm.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),f=this.getRule(this._rootId).getName(null,null);let m;f?m=_p.createRootAndLookUpScopeName(f,d,this):m=_p.createRoot("unknown",d),t=new WS(null,this._rootId,-1,-1,!1,null,m,m)}else i=!1,t.reset();e=e+` `;const s=this.createOnigString(e),o=s.content.length,a=new vge(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Oj(this,s,i,0,t,a,!0,r);return Aj(s),{lineLength:o,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function IL(e,t){return e=Pme(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var _p=class Ml{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const s of n)i=R3.push(i,s.scopeNames),r=new Ml(r,i,s.encodedTokenAttributes);return r}static createRoot(t,n){return new Ml(null,new R3(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),s=new R3(null,t),o=r.themeProvider.themeMatch(s),a=Ml.mergeAttributes(n,i,o);return new Ml(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Ml.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,s=0,o=0;return r!==null&&(i=r.fontStyle,s=r.foregroundId,o=r.backgroundId),Zm.set(t,n.languageId,n.tokenType,null,i,s,o)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Ml._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const s of r)i=Ml._pushAttributed(i,s,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),s=t.scopePath.push(n),o=r.themeProvider.themeMatch(s),a=Ml.mergeAttributes(t.tokenAttributes,i,o);return new Ml(t,s,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},WS=class tf{constructor(t,n,r,i,s,o,a,l){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new tf(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:tf._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?_p.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){tf._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,s,o,a){return new tf(this,t,n,r,i,s,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new tf(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=_p.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new tf(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,_p.fromExtension(r,n.contentNameScopesList))}},pge=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):cw(n,fw).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>cw(n,fw).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},vge=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=e?.getScopeNames()??[];for(const o of this._tokenTypeOverrides)o.matcher(s)&&(r=Zm.set(r,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(s))}if(i&&(r=Zm.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r0;)o.Q.map(a=>this._loadSingleGrammar(a.scopeName)),o.processQueue();return this._grammarForScopeName(t,n,r,i,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,s)}},KS=WS.NULL;function hw(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?n[i]=s:i===r&&Object.assign(n,s);return n}function Xu(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function wge(e){return Array.isArray(e)?e:[e]}async function Fj(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function c4(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Nj(e){return e==="ansi"||c4(e)}function u4(e){return e==="none"}function Vj(e){return u4(e)}const xge=/(\r?\n)/g;function d4(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(xge);let r=0;const i=[];for(let s=0;s!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?DL.light:DL.dark),n||(n=t.type==="light"?AL.light:AL.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const s=new Map;function o(a){if(s.has(a))return s.get(a);i+=1;const l=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?o(a):(s.set(a,l),l)}t.settings=t.settings.map(a=>{const l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),c=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!c)return a;const u={...a,settings:{...a.settings}};if(l){const d=o(a.settings.foreground);t.colorReplacements[d]=a.settings.foreground,u.settings.foreground=d}if(c){const d=o(a.settings.background);t.colorReplacements[d]=a.settings.background,u.settings.background=d}return u});for(const a of Object.keys(t.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){const l=o(t.colors[a]);t.colorReplacements[l]=t.colors[a],t.colors[a]=l}return Object.defineProperty(t,LL,{enumerable:!1,writable:!1,value:!0}),t}async function zj(e){return[...new Set((await Promise.all(e.filter(t=>!Nj(t)).map(async t=>await Fj(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Hj(e){return(await Promise.all(e.map(async t=>Vj(t)?null:f4(await Fj(t))))).filter(t=>!!t)}function jj(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Ur(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var kge=class extends bge{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=f4(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=lw.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=jj(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const t=[...this._langGraph.entries()],n=t.filter(([r,i])=>!i);if(n.length){const r=t.filter(([i,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(o=>n.map(([a])=>a).includes(o)):!1).filter(i=>!n.includes(i));throw new Ur(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of t)this._resolver.addLanguage(i);for(const[r,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},Sge=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const i=t.slice(0,r).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let u0=0;function _ge(e){u0+=1,e.warnings!==!1&&u0>=10&&u0%10===0&&console.warn(`[Shiki] ${u0} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Ur("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(f4),i=new kge(new Sge(e.engine,n),r,n,e.langAlias);let s;function o(b){return jj(b,e.langAlias)}function a(b){y();const w=i.getGrammar(typeof b=="string"?b:b.name);if(!w)throw new Ur(`Language \`${b}\` not found, you may need to load it first`);return w}function l(b){if(b==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();const w=i.getTheme(b);if(!w)throw new Ur(`Theme \`${b}\` not found, you may need to load it first`);return w}function c(b){y();const w=l(b);return s!==b&&(i.setTheme(w),s=b),{theme:w,colorMap:i.getColorMap()}}function u(){return y(),i.getLoadedThemes()}function d(){return y(),i.getLoadedLanguages()}function f(...b){y(),i.loadLanguages(b.flat(1))}async function m(...b){return f(await zj(b))}function g(...b){y();for(const w of b.flat(1))i.loadTheme(w)}async function p(...b){return y(),g(await Hj(b))}function y(){if(t)throw new Ur("Shiki instance has been disposed")}function v(){t||(t=!0,i.dispose(),u0-=1)}return{setTheme:c,getTheme:l,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:m,loadLanguageSync:f,loadTheme:p,loadThemeSync:g,dispose:v,[Symbol.dispose]:v}}async function Cge(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([Hj(e.themes||[]),zj(e.langs||[]),e.engine]);return _ge({...e,themes:t,langs:n,engine:r})}const Bj=new WeakMap;function h4(e,t){Bj.set(e,t)}function sv(e){return Bj.get(e)}var m4=class qj{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new qj(Object.fromEntries(wge(n).map(r=>[r,KS])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Tge(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Tge(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const s=i?.nameScopesList?.scopeName;s&&t.push(s),i.parent&&r(i.parent)}return r(e),t}function Ege(e,t){if(!(e instanceof m4))throw new Ur("Invalid grammar state");return e.getInternalStack(t)}const Ige=/,/,Dge=/ /;function Uj(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(c4(e.resolveLangAlias(n.lang||"text"))||u4(r))return d4(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:s}=e.setTheme(r),o=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new Ur(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Ur(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Lge(t,o,i,s,n)}function Age(...e){if(e.length===2)return sv(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=r;if(c4(i)||u4(s))throw new Ur("Plain language does not have grammar state");if(i==="ansi")throw new Ur("ANSI language does not have grammar state");const{theme:o,colorMap:a}=t.setTheme(s),l=t.getLanguage(i);return new m4(o9(n,l,o,a,r).stateStack,l.name,o.name)}function Lge(e,t,n,r,i){const s=o9(e,t,n,r,i),o=new m4(s.stateStack,t.name,n.name);return h4(s.tokens,o),s.tokens}function o9(e,t,n,r,i){const s=hw(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500}=i,l=d4(e);let c=i.grammarState?Ege(i.grammarState,n.name)??KS:i.grammarContextCode!=null?o9(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:KS,u=[];const d=[];for(let f=0,m=l.length;f0&&g.length>=o){u=[],d.push([{content:g,offset:p,color:"",fontStyle:0}]);continue}let y,v,b;i.includeExplanation&&(y=t.tokenizeLine(g,c,a),v=y.tokens,b=0);const w=t.tokenizeLine2(g,c,a),x=w.tokens.length/2;for(let k=0;kP.trim());break;case"object":M=T.scope;break;default:continue}F.push({settings:T,selectors:M.map(P=>P.split(Dge))})}V.explanation=[];let D=0;for(;_+D({scopeName:t}))}function $ge(e,t){const n=[];for(let r=0,i=t.length;r=0&&i>=0;)ML(e[r],n[i])&&(r-=1),i-=1;return r===-1}function Oge(e,t,n){const r=[];for(const{selectors:i,settings:s}of e)for(const o of i)if(Pge(o,t,n)){r.push(s);break}return r}function Wj(e,t,n,r=Uj){const i=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),s=i.map(c=>{const u=r(e,t,{...n,theme:c.theme});return{tokens:u,state:sv(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),o=Rge(...s.map(c=>c.tokens)),a=o[0].map((c,u)=>c.map((d,f)=>{const m={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(m.explanation=d.explanation),o.forEach((g,p)=>{const{content:y,explanation:v,offset:b,...w}=g[u][f];m.variants[i[p].color]=w}),m})),l=s[0].state?new m4(Object.fromEntries(s.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),s[0].state.lang):void 0;return l&&h4(a,l),a}function Rge(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;rl[r]),s=t.map(()=>[]);t.forEach((l,c)=>l.push(s[c]));const o=i.map(()=>0),a=i.map(l=>l[0]);for(;a.every(l=>l);){const l=Math.min(...a.map(c=>c.content.length));for(let c=0;c4&&n.slice(0,4)==="data"&&jge.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(PL,Uge);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!PL.test(s)){let o=s.replace(Hge,qge);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=a9}return new i(r,t)}function qge(e){return"-"+e.toLowerCase()}function Uge(e){return e.charAt(1).toUpperCase()}const Wge=Kj([Gj,Vge,Xj,Qj,Jj],"html"),eB=Kj([Gj,zge,Xj,Qj,Jj],"svg"),OL={}.hasOwnProperty;function Kge(e,t){const n=t||{};function r(i,...s){let o=r.invalid;const a=r.handlers;if(i&&OL.call(i,e)){const l=String(i[e]);o=OL.call(a,l)?a[l]:r.unknown}if(o)return o.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Gge=/["&'<>`]/g,Zge=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Yge=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Xge=/[|\\{}()[\]^$+*?.]/g,RL=new WeakMap;function Qge(e,t){if(e=e.replace(t.subset?Jge(t.subset):Gge,r),t.subset||t.escapeOnly)return e;return e.replace(Zge,n).replace(Yge,r);function n(i,s,o){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),t)}function r(i,s,o){return t.format(i.charCodeAt(0),o.charCodeAt(s+1),t)}}function Jge(e){let t=RL.get(e);return t||(t=e0e(e),RL.set(e,t)),t}function e0e(e){const t=[];let n=-1;for(;++n",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},o0e=["cent","copy","divide","gt","lt","not","para","times"],tB={}.hasOwnProperty,XS={};let $y;for($y in V3)tB.call(V3,$y)&&(XS[V3[$y]]=$y);const a0e=/[^\dA-Za-z]/;function l0e(e,t,n,r){const i=String.fromCharCode(e);if(tB.call(XS,i)){const s=XS[i],o="&"+s;return n&&s0e.includes(s)&&!o0e.includes(s)&&(!r||t&&t!==61&&a0e.test(String.fromCharCode(t)))?o:o+";"}return""}function c0e(e,t,n){let r=n0e(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=l0e(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const s=i0e(e,t,n.omitOptionalSemicolons);s.length|^->||--!>|"],f0e=["<",">"];function h0e(e,t,n,r){return r.settings.bogusComments?"":"";function i(s){return Em(s,Object.assign({},r.settings.characterReferences,{subset:f0e}))}}function m0e(e,t,n,r){return""}function FL(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function g0e(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function p0e(e){return e.join(" ").trim()}const v0e=/[ \t\n\f\r]/g;function l9(e){return typeof e=="object"?e.type==="text"?NL(e.value):!1:NL(e)}function NL(e){return e.replace(v0e,"")===""}const es=rB(1),nB=rB(-1),y0e=[];function rB(e){return t;function t(n,r,i){const s=n?n.children:y0e;let o=(r||0)+e,a=s[o];if(!i)for(;a&&l9(a);)o+=e,a=s[o];return a}}const b0e={}.hasOwnProperty;function iB(e){return t;function t(n,r,i){return b0e.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const c9=iB({body:x0e,caption:z3,colgroup:z3,dd:C0e,dt:_0e,head:z3,html:w0e,li:S0e,optgroup:T0e,option:E0e,p:k0e,rp:VL,rt:VL,tbody:D0e,td:zL,tfoot:A0e,th:zL,thead:I0e,tr:L0e});function z3(e,t,n){const r=es(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&l9(r.value.charAt(0)))}function w0e(e,t,n){const r=es(n,t);return!r||r.type!=="comment"}function x0e(e,t,n){const r=es(n,t);return!r||r.type!=="comment"}function k0e(e,t,n){const r=es(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function S0e(e,t,n){const r=es(n,t);return!r||r.type==="element"&&r.tagName==="li"}function _0e(e,t,n){const r=es(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function C0e(e,t,n){const r=es(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function VL(e,t,n){const r=es(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function T0e(e,t,n){const r=es(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function E0e(e,t,n){const r=es(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function I0e(e,t,n){const r=es(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function D0e(e,t,n){const r=es(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function A0e(e,t,n){return!es(n,t)}function L0e(e,t,n){const r=es(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function zL(e,t,n){const r=es(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const M0e=iB({body:O0e,colgroup:R0e,head:P0e,html:$0e,tbody:F0e});function $0e(e){const t=es(e,-1);return!t||t.type!=="comment"}function P0e(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function O0e(e){const t=es(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&l9(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function R0e(e,t,n){const r=nB(n,t),i=es(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&c9(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function F0e(e,t,n){const r=nB(n,t),i=es(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&c9(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Py={name:[[` \f\r &/=>`.split(""),` \f\r "&'/=>\``.split("")],[`\0 \f\r "&'/<=>`.split(""),`\0 \f\r "&'/<=>\``.split("")]],unquoted:[[` \f\r &>`.split(""),`\0 \f\r "&'<=>\``.split("")],[`\0 \f\r "&'<=>\``.split(""),`\0 \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function N0e(e,t,n,r){const i=r.schema,s=i.space==="svg"?!1:r.settings.omitOptionalTags;let o=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const a=[];let l;i.space==="html"&&e.tagName==="svg"&&(r.schema=eB);const c=V0e(r,e.properties),u=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,u&&(o=!1),(c||!s||!M0e(e,t,n))&&(a.push("<",e.tagName,c?" "+c:""),o&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(u),!o&&(!s||!c9(e,t,n))&&a.push(""),a.join("")}function V0e(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const s=z0e(e,i,t[i]);s&&n.push(s)}}for(;++rFL(n,e.alternative)&&(o=e.alternative),a=o+Em(n,Object.assign({},e.settings.characterReferences,{subset:(o==="'"?Py.single:Py.double)[i][s],attribute:!0}))+o),l+(a&&"="+a))}const H0e=["<","&"];function sB(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Em(e.value,Object.assign({},r.settings.characterReferences,{subset:H0e}))}function j0e(e,t,n,r){return r.settings.allowDangerousHtml?e.value:sB(e,t,n,r)}function B0e(e,t,n,r){return r.all(e)}const q0e=Kge("type",{invalid:U0e,unknown:W0e,handlers:{comment:h0e,doctype:m0e,element:N0e,raw:j0e,root:B0e,text:sB}});function U0e(e){throw new Error("Expected node, not `"+e+"`")}function W0e(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const K0e={},G0e={},Z0e=[];function Ul(e,t){const n=t||K0e,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Y0e,all:X0e,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Fge,characterReferences:n.characterReferences||G0e,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?eB:Wge,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Y0e(e,t,n){return q0e(e,t,n,this)}function X0e(e){const t=[],n=e&&e.children||Z0e;let r=-1;for(;++ri);function n(i){if(i===e.length)return{line:t.length-1,character:t.at(-1).length};let s=i,o=0;for(const a of t){if(ss&&i[s])}const ipe=["color","background-color"];function spe(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return nr-i);return n.length?e.map(r=>r.flatMap(i=>{const s=n.filter(o=>i.offseto-i.offset).sort((o,a)=>o-a);return s.length?spe(i,s):i})):e}function ape(e,t,n,r,i="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(u=>mw(e.variants[u])),a=new Set(o.flatMap(u=>Object.keys(u))),l={},c=(u,d)=>{const f=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[u]+(d==="color"?"":f)};return o.forEach((u,d)=>{for(const f of a){const m=u[f]||"inherit";if(d===0&&r&&ipe.includes(f))if(r==="light-dark()"&&o.length>1){const g=t.findIndex(y=>y==="light"),p=t.findIndex(y=>y==="dark");if(g===-1||p===-1)throw new Ur('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');l[f]=`light-dark(${o[g][f]||"inherit"}, ${o[p][f]||"inherit"})`,i==="css-vars"&&(l[c(d,f)]=m)}else l[f]=m;else i==="css-vars"&&(l[c(d,f)]=m)}}),s.htmlStyle=l,s}function mw(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Rs.Italic&&(t["font-style"]="italic"),e.fontStyle&Rs.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Rs.Underline&&n.push("underline"),e.fontStyle&Rs.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function QS(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function lpe(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let i=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new Ur(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...r.indexToPos(o),offset:o}}else{const a=r.lines[o.line];if(a===void 0)throw new Ur(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${r.lines.length}`);let l=o.character;if(l<0&&(l=a.length+l),l<0||l>a.length)throw new Ur(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${a.length}`);return{...o,character:l,offset:r.posToIndex(o.line,l)}}};const r=npe(n.source),s=(n.options.decorations||[]).map(o=>({...o,start:i(o.start),end:i(o.end)}));cpe(s),e.set(n.meta,{decorations:s,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return ope(n,t(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;const r=t(this),i=[...n.children].filter(u=>u.type==="element"&&u.tagName==="span");if(i.length!==r.converter.lines.length)throw new Ur(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(u,d,f,m){const g=i[u];let p="",y=-1,v=-1;if(d===0&&(y=0),f===0&&(v=0),f===Number.POSITIVE_INFINITY&&(v=g.children.length),y===-1||v===-1)for(let w=0;wp);return u.tagName=d.tagName||"span",u.properties={...u.properties,...m,class:u.properties.class},d.properties?.class&&oB(u,d.properties.class),u=g(u,f)||u,u}const l=[],c=r.decorations.sort((u,d)=>d.start.offset-u.start.offset||u.end.offset-d.end.offset);for(const u of c){const{start:d,end:f}=u;if(d.line===f.line)s(d.line,d.character,f.character,u);else if(d.lineo(m,u));s(f.line,0,f.character,u)}}l.forEach(u=>u())}}}function cpe(e){for(let t=0;tn.end.offset)throw new Ur(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;rNumber.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function hpe(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)H3[r]&&t.push({type:"setDecoration",value:H3[r]});else if(r<=29){const i=H3[r-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:bf[r-30]}});else if(r===38){const i=jL(e);i&&t.push({type:"setForegroundColor",value:i})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:bf[r-40]}});else if(r===48){const i=jL(e);i&&t.push({type:"setBackgroundColor",value:i})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:bf[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:bf[r-100+8]}})}return t}function mpe(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let s=0;do{const o=fpe(r,s),a=o.sequence?r.substring(s,o.startPosition):r.substring(s);if(a.length>0&&i.push({value:a,foreground:e,background:t,decorations:new Set(n)}),o.sequence){const l=hpe(o.sequence);for(const c of l)c.type==="resetAll"?(e=null,t=null,n.clear()):c.type==="resetForegroundColor"?e=null:c.type==="resetBackgroundColor"?t=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of l)c.type==="setForegroundColor"?e=c.value:c.type==="setBackgroundColor"?t=c.value:c.type==="setDecoration"&&n.add(c.value)}s=o.position}while(sMath.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let c=0;c{const l=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`;return[a,e.colors?.[l]||bpe[a]]}))),o=mpe();return i.map(a=>o.parse(a[0]).map(l=>{let c,u;l.decorations.has("reverse")?(c=l.background?s.value(l.background):e.bg,u=l.foreground?s.value(l.foreground):e.fg):(c=l.foreground?s.value(l.foreground):e.fg,u=l.background?s.value(l.background):void 0),c=Xu(c,r),u=Xu(u,r),l.decorations.has("dim")&&(c=xpe(c));let d=Rs.None;return l.decorations.has("bold")&&(d|=Rs.Bold),l.decorations.has("italic")&&(d|=Rs.Italic),l.decorations.has("underline")&&(d|=Rs.Underline),l.decorations.has("strikethrough")&&(d|=Rs.Strikethrough),{content:l.value,offset:a[1],color:c,bgColor:u,fontStyle:d}}))}function xpe(e){const t=e.match(vpe);if(t){const r=t[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],s=r[1],o=r[2],a=r[3];return`#${i}${i}${s}${s}${o}${o}${Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const i=r[0],s=r[1],o=r[2];return`#${i}${i}${s}${s}${o}${o}80`}}}const n=e.match(ype);return n?`var(${n[1]}-dim)`:e}function JS(e,t,n={}){const r=e.resolveLangAlias(n.lang||"text"),{theme:i=e.getLoadedThemes()[0]}=n;if(!c4(r)&&!u4(i)&&r==="ansi"){const{theme:s}=e.setTheme(i);return wpe(s,t,n)}return Uj(e,t,n)}function pw(e,t,n){let r,i,s,o,a,l;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:d="css-vars"}=n,f=Object.entries(n.themes).filter(v=>v[1]).map(v=>({color:v[0],theme:v[1]})).sort((v,b)=>v.color===c?-1:b.color===c?1:0);if(f.length===0)throw new Ur("`themes` option must not be empty");const m=Wj(e,t,n,JS);if(l=sv(m),c&&c!=="light-dark()"&&!f.some(v=>v.color===c))throw new Ur(`\`themes\` option must contain the defaultColor key \`${c}\``);const g=f.map(v=>e.getTheme(v.theme)),p=f.map(v=>v.color);s=m.map(v=>v.map(b=>ape(b,p,u,c,d))),l&&h4(s,l);const y=f.map(v=>hw(v.theme,n));i=BL(f,g,y,u,c,"fg",d),r=BL(f,g,y,u,c,"bg",d),o=`shiki-themes ${g.map(v=>v.name).join(" ")}`,a=c?void 0:[i,r].join(";")}else if("theme"in n){const c=hw(n.theme,n);s=JS(e,t,n);const u=e.getTheme(n.theme);r=Xu(u.bg,c),i=Xu(u.fg,c),o=u.name,l=sv(s)}else throw new Ur("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:o,rootStyle:a,grammarState:l}}function BL(e,t,n,r,i,s,o){return e.map((a,l)=>{const c=Xu(t[l][s],n[l])||"inherit",u=`${r+a.color}${s==="bg"?"-bg":""}:${c}`;if(l===0&&i){if(i==="light-dark()"&&e.length>1){const d=e.findIndex(m=>m.color==="light"),f=e.findIndex(m=>m.color==="dark");if(d===-1||f===-1)throw new Ur('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Xu(t[d][s],n[d])||"inherit"}, ${Xu(t[f][s],n[f])||"inherit"});${u}`}return c}return o==="css-vars"?u:null}).filter(a=>!!a).join(";")}const lB=/^\s+$/,kpe=/^(\s*)(.*?)(\s*)$/;function vw(e,t,n,r={meta:{},options:n,codeToHast:(i,s)=>vw(e,i,s),codeToTokens:(i,s)=>pw(e,i,s)}){let i=t;for(const g of gw(n))i=g.preprocess?.call(r,i,n)||i;let{tokens:s,fg:o,bg:a,themeName:l,rootStyle:c,grammarState:u}=pw(e,i,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?s=_pe(s):d==="never"&&(s=Cpe(s)),f&&(s=Tpe(s));const m={...r,get source(){return i}};for(const g of gw(n))s=g.tokens?.call(m,s)||s;return Spe(s,{...n,fg:o,bg:a,themeName:l,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},m,u)}function Spe(e,t,n,r=sv(e)){const i=gw(t),s=[],o={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=t,c={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),l!==!1&&l!=null&&(c.tabindex=l.toString());for(const[p,y]of Object.entries(t.meta||{}))p.startsWith("_")||(c[p]=y);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:s};const f=[],m={...n,structure:a,addClassToHast:oB,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((p,y)=>{y&&(a==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&s.push({type:"text",value:` `}));let v={type:"element",tagName:"span",properties:{class:"line"},children:[]},b=0;for(const w of p){let x={type:"element",tagName:"span",properties:{...w.htmlAttrs},children:[{type:"text",value:w.content}]};const k=QS(w.htmlStyle||mw(w));k&&(x.properties.style=k);for(const _ of i)x=_?.span?.call(m,x,y+1,b,v,w)||x;a==="inline"?o.children.push(x):a==="classic"&&v.children.push(x),b+=w.content.length}if(a==="classic"){for(const w of i)v=w?.line?.call(m,v,y+1)||v;f.push(v),s.push(v)}else a==="inline"&&f.push(v)}),a==="classic"){for(const p of i)d=p?.code?.call(m,d)||d;u.children.push(d);for(const p of i)u=p?.pre?.call(m,u)||u;o.children.push(u)}else if(a==="inline"){const p=[];let y={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const b of o.children)b.type==="element"&&b.tagName==="br"?(p.push(y),y={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(b.type==="element"||b.type==="text")&&y.children.push(b);p.push(y);let v={type:"element",tagName:"code",properties:{},children:p};for(const b of i)v=b?.code?.call(m,v)||v;o.children=[];for(let b=0;b0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});const w=v.children[b];w.type==="element"&&o.children.push(...w.children)}}let g=o;for(const p of i)g=p?.root?.call(m,g)||g;return r&&h4(g,r),g}function _pe(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((s,o)=>{const a=!(s.fontStyle&&(s.fontStyle&Rs.Underline||s.fontStyle&Rs.Strikethrough));a&&lB.test(s.content)&&t[o+1]?(i===void 0&&(i=s.offset),r+=s.content):r?(a?n.push({...s,offset:i,content:r+s.content}):n.push({content:r,offset:i},s),i=void 0,r=""):n.push(s)}),n})}function Cpe(e){return e.map(t=>t.flatMap(n=>{if(lB.test(n.content))return n;const r=n.content.match(kpe);if(!r)return n;const[,i,s,o]=r;if(!i&&!o)return n;const a=[{...n,offset:n.offset+i.length,content:s}];return i&&a.unshift({content:i,offset:n.offset}),o&&a.push({content:o,offset:n.offset+i.length+s.length}),a}))}function Tpe(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const i=n.at(-1),s=QS(i.htmlStyle||mw(i)),o=QS(r.htmlStyle||mw(r)),a=i.fontStyle&&(i.fontStyle&Rs.Underline||i.fontStyle&Rs.Strikethrough),l=r.fontStyle&&(r.fontStyle&Rs.Underline||r.fontStyle&Rs.Strikethrough);!a&&!l&&s===o?i.content+=r.content:n.push({...r})}return n})}const Epe=Ul;function Ipe(e,t,n){const r={meta:{},options:n,codeToHast:(s,o)=>vw(e,s,o),codeToTokens:(s,o)=>pw(e,s,o)};let i=Epe(vw(e,t,n,r));for(const s of gw(n))i=s.postprocess?.call(r,i,n)||i;return i}async function Dpe(e){const t=await Cge(e);return{getLastGrammarState:(...n)=>Age(t,...n),codeToTokensBase:(n,r)=>JS(t,n,r),codeToTokensWithThemes:(n,r)=>Wj(t,n,r),codeToTokens:(n,r)=>pw(t,n,r),codeToHast:(n,r)=>vw(t,n,r),codeToHtml:(n,r)=>Ipe(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Ape(e){const t=e.langs,n=e.themes,r=e.engine;async function i(s){function o(d){if(typeof d=="string"){if(d=s.langAlias?.[d]||d,Nj(d))return[];const f=t[d];if(!f)throw new Ur(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}function a(d){if(Vj(d))return"none";if(typeof d=="string"){const f=n[d];if(!f)throw new Ur(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}const l=(s.themes??[]).map(d=>a(d)),c=(s.langs??[]).map(d=>o(d)),u=await Dpe({engine:s.engine??r(),...s,themes:l,langs:c});return{...u,loadLanguage(...d){return u.loadLanguage(...d.map(o))},loadTheme(...d){return u.loadTheme(...d.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function Lpe(e){let t;async function n(r={}){if(t){const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else{t=e({...r,themes:[],langs:[]});const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}}return n}function Mpe(e,t){const n=Lpe(e);async function r(i,s){const o=await n({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),a=await t?.guessEmbeddedLanguages?.(i,s.lang,o);return a&&await o.loadLanguage(...a),o}return{getSingletonHighlighter(i){return n(i)},async codeToHtml(i,s){return(await r(i,s)).codeToHtml(i,s)},async codeToHast(i,s){return(await r(i,s)).codeToHast(i,s)},async codeToTokens(i,s){return(await r(i,s)).codeToTokens(i,s)},async codeToTokensBase(i,s){return(await r(i,s)).codeToTokensBase(i,s)},async codeToTokensWithThemes(i,s){return(await r(i,s)).codeToTokensWithThemes(i,s)},async getLastGrammarState(i,s){return(await n({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(i,s)}}}var $pe=XC({bundledLanguages:()=>ud,bundledLanguagesAlias:()=>JC,bundledLanguagesBase:()=>QC,bundledLanguagesInfo:()=>k1,bundledThemes:()=>t9,bundledThemesInfo:()=>e9,codeToHast:()=>uB,codeToHtml:()=>cB,codeToTokens:()=>dB,codeToTokensBase:()=>fB,codeToTokensWithThemes:()=>hB,createHighlighter:()=>g4,getLastGrammarState:()=>gB,getSingletonHighlighter:()=>mB});const g4=Ape({langs:ud,themes:t9,engine:()=>(0,xj.createOnigurumaEngine)(B(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:cB,codeToHast:uB,codeToTokens:dB,codeToTokensBase:fB,codeToTokensWithThemes:hB,getSingletonHighlighter:mB,getLastGrammarState:gB}=Mpe(g4,{guessEmbeddedLanguages:rpe}),qL=4294967295;var Ppe=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(s=>{if(typeof s!="string")return s;const o=r?.get(s);if(o){if(o instanceof RegExp)return o;if(n)return null;throw o}try{const a=i(s);return r?.set(s,a),a}catch(a){if(r?.set(s,a),n)return null;throw a}})}findNextMatchSync(e,t,n){const r=typeof e=="string"?e:e.content,i=[];function s(o,a,l=0){return{index:o,captureIndices:a.indices.map(c=>c==null?{start:qL,end:qL,length:0}:{start:c[0]+l,end:c[1]+l,length:c[1]-c[0]})}}for(let o=0;oa[1].index));for(const[a,l,c]of i)if(l.index===o)return s(a,l,c)}return null}};function Cg(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Ope(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const u9=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),hs=String.raw;function Tg(e,t){if(e==null)throw new Error(t??"Value expected");return e}const pB=hs`\[\^?`,vB=`c.? | C(?:-.?)?|${hs`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${hs`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${hs`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${hs`o\{[^\}]*\}?`}|${hs`\d{1,3}`}`,d9=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Oy=new RegExp(hs` \\ (?: ${vB} | [gk]<[^>]*>? | [gk]'[^']*'? | . ) | \( (?: \? (?: [:=!>({] | <[=!] | <[^>]*> | '[^']*' | ~\|? | #(?:[^)\\]|\\.?)* | [^:)]*[:)] )? | \*[^\)]*\)? )? | (?:${d9.source})+ | ${pB} | . `.replace(/\s+/g,""),"gsu"),j3=new RegExp(hs` \\ (?: ${vB} | . ) | \[:(?:\^?\p{Alpha}+|\^):\] | ${pB} | && | . `.replace(/\s+/g,""),"gsu");function Rpe(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=tve(n.flags),i=[r.extended],s={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(d){i.push(d)},replaceCurrentModX(d){i[i.length-1]=d},singleline:n.rules.singleline};let o=[],a;for(Oy.lastIndex=0;a=Oy.exec(e);){const d=Fpe(s,e,a[0],Oy.lastIndex);d.tokens?o.push(...d.tokens):d.token&&o.push(d.token),d.lastIndex!==void 0&&(Oy.lastIndex=d.lastIndex)}const l=[];let c=0;o.filter(d=>d.type==="GroupOpen").forEach(d=>{d.kind==="capturing"?d.number=++c:d.raw==="("&&l.push(d)}),c||l.forEach((d,f)=>{d.kind="capturing",d.number=f+1});const u=c||l.length;return{tokens:o.map(d=>d.type==="EscapedNumber"?rve(d,u):d).flat(),flags:r}}function Fpe(e,t,n,r){const[i,s]=n;if(n==="["||n==="[^"){const o=Npe(t,n,r);return{tokens:o.tokens,lastIndex:o.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(s))return{token:UL(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Gpe(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:bB(n)}}if(s==="K")return{token:wB("keep",n)};if(s==="N"||s==="R")return{token:wf("newline",n,{negate:s==="N"})};if(s==="O")return{token:wf("any",n)};if(s==="X")return{token:wf("text_segment",n)};const o=yB(n,{inCharClass:!1});return Array.isArray(o)?{tokens:o}:{token:o}}if(i==="("){if(s==="*")return{token:Qpe(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:Xpe(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Jh("group",n)};if(n==="(?>")return{token:Jh("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Jh("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Jh("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:Upe(n)}}if(e.getCurrentModX()){if(n==="#"){const o=t.indexOf(` `,r);return{lastIndex:o===-1?t.length:o}}if(/^\s$/.test(n)){const o=/\s+/y;return o.lastIndex=r,{lastIndex:o.exec(t)?o.lastIndex:r}}}if(n===".")return{token:wf("dot",n)};if(n==="^"||n==="$"){const o=e.singleline?{"^":hs`\A`,$:hs`\Z`}[n]:n;return{token:UL(o,n)}}return n==="|"?{token:zpe(n)}:d9.test(n)?{tokens:ive(n)}:{token:Pc(Cg(n),n)}}function Npe(e,t,n){const r=[WL(t[1]==="^",t)];let i=1,s;for(j3.lastIndex=n;s=j3.exec(e);){const o=s[0];if(o[0]==="["&&o[1]!==":")i++,r.push(WL(o[1]==="^",o));else if(o==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Pc(93,o));else if(i--,r.push(Hpe(o)),!i)break}else{const a=Vpe(o);Array.isArray(a)?r.push(...a):r.push(a)}}return{tokens:r,lastIndex:j3.lastIndex||e.length}}function Vpe(e){if(e[0]==="\\")return yB(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?\^?)(?[a-z]+):\]/.exec(e);if(!t||!u9.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return wf("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?jpe(e):e==="&&"?Bpe(e):Pc(Cg(e),e)}function yB(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return Ype(e);if("dDhHsSwW".includes(n))return Jpe(e);if(e.startsWith(hs`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return eve(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{const r=e.split(/\\x/).slice(1).map(o=>parseInt(o,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),s=new TextEncoder;return[...i].map(o=>{const a=[...s.encode(o)].map(l=>`\\x${l.toString(16)}`).join("");return Pc(Cg(o),a)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Pc(nve(e),e);if(KL.has(n))return Pc(KL.get(n),e);if(/\d/.test(n))return qpe(t,e);if(e==="\\")throw new Error(hs`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Pc(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function zpe(e){return{type:"Alternator",raw:e}}function UL(e,t){return{type:"Assertion",kind:e,raw:t}}function bB(e){return{type:"Backreference",raw:e}}function Pc(e,t){return{type:"Character",value:e,raw:t}}function Hpe(e){return{type:"CharacterClassClose",raw:e}}function jpe(e){return{type:"CharacterClassHyphen",raw:e}}function Bpe(e){return{type:"CharacterClassIntersector",raw:e}}function WL(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function wf(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function wB(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Tg(n.flags),raw:t}}function qpe(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function Upe(e){return{type:"GroupClose",raw:e}}function Jh(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function Wpe(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function Kpe(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function Gpe(e){return{type:"Subroutine",raw:e}}const Zpe=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),KL=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Ype(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Pc(Cg(t.toUpperCase())-64,e)}function Xpe(e,t){let{on:n,off:r}=/^\(\?(?[imx]*)(?:-(?[-imx]*))?/.exec(e).groups;r??="";const i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),s=ZL(n),o=ZL(r),a={};if(s&&(a.enable=s),o&&(a.disable=o),e.endsWith(")"))return t.replaceCurrentModX(i),wB("flags",e,{flags:a});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,Jh("group",e,{...(s||o)&&{flags:a}});throw new Error(`Unexpected flag modifier "${e}"`)}function Qpe(e){const t=/\(\*(?[A-Za-z_]\w*)?(?:\[(?(?:[A-Za-z_]\w*)?)\])?(?:\{(?[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:i}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=i?i.split(",").filter(u=>u!=="").map(u=>/^[+-]?\d+$/.test(u)?+u:u):[],[o,a,l]=s,c=Zpe.has(n)?n.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof o=="string")throw new Error(`Named callout argument must be a number "${o}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(s.length===2&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${a}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof a=="number"||!/^(?:[<>!=]=|[<>])$/.test(a))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${a}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return Wpe(c,r??null,i?.split(",")??null,e)}function GL(e){let t=null,n,r;if(e[0]==="{"){const{minStr:i,maxStr:s}=/^\{(?\d*)(?:,(?\d*))?/.exec(e).groups,o=1e5;if(+i>o||s&&+s>o)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+i,r=s===void 0?+i:s===""?1/0:+s,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Kpe(t,n,r,e)}function Jpe(e){const t=e[1].toLowerCase();return wf({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function eve(e){const{p:t,neg:n,value:r}=/^\\(?

    [pP])\{(?\^?)(?[^}]+)/.exec(e).groups;return wf("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function ZL(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function tve(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function rve(e,t){const{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=t))return[bB(n)];const s=[],o=i.match(/^[0-7]+|\d/g);for(let a=0;a127)throw new Error(hs`Octal encoded byte above 177 unsupported "${n}"`)}else c=Cg(l);s.push(Pc(c,(a===0?"\\":"")+l))}return s}function ive(e){const t=[],n=new RegExp(d9,"gy");let r;for(;r=n.exec(e);){const i=r[0];if(i[0]==="{"){const s=/^\{(?\d+),(?\d+)\}\??$/.exec(i);if(s){const{min:o,max:a}=s.groups;if(+o>+a&&i.endsWith("?")){n.lastIndex--,t.push(GL(i.slice(0,-1)));continue}}}t.push(GL(i))}return t}function xB(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function sve(e){return ove.has(e.type)}const ove=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function kB(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=Rpe(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(f,m)=>{const g=r.tokens[s.nextIndex];switch(s.parent=f,s.nextIndex++,g.type){case"Alternator":return Ff();case"Assertion":return ave(g);case"Backreference":return lve(g,s);case"Character":return p4(g.value,{useLastValid:!!m.isCheckingRangeEnd});case"CharacterClassHyphen":return cve(g,s,m);case"CharacterClassOpen":return uve(g,s,m);case"CharacterSet":return dve(g,s);case"Directive":return vve(g.kind,{flags:g.flags});case"GroupOpen":return fve(g,s,m);case"NamedCallout":return bve(g.kind,g.tag,g.arguments);case"Quantifier":return hve(g,s);case"Subroutine":return mve(g,s);default:throw new Error(`Unexpected token type "${g.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=xve(yve(r.flags));let a=o.body[0];for(;s.nextIndexl.length)throw new Error("Subroutine uses a group number that's not defined");f&&(l[f-1].isSubroutined=!0)}else if(u.has(f)){if(u.get(f).length>1)throw new Error(hs`Subroutine uses a duplicate group name "\g<${f}>"`);u.get(f)[0].isSubroutined=!0}else throw new Error(hs`Subroutine uses a group name that's not defined "\g<${f}>"`);return o}function ave({kind:e}){return e7(Tg({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===hs`\B`||e===hs`\Y`})}function lve({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(s,o=!1)=>{const a=t.capturingGroups.length;let l=!1;if(s>a)if(t.skipBackrefValidation)l=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,t7(o?a+1-s:s,{orphan:l})};if(n){const s=/^(?-?)0*(?[1-9]\d*)$/.exec(r);if(s)return i(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return t7(r)}return i(+r)}function cve(e,t,n){const{tokens:r,walk:i}=t,s=t.parent,o=s.body.at(-1),a=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!=="CharacterClass"&&o.type!=="CharacterClassRange"&&a&&a.type!=="CharacterClassOpen"&&a.type!=="CharacterClassClose"&&a.type!=="CharacterClassIntersector"){const l=i(s,{...n,isCheckingRangeEnd:!0});if(o.type==="Character"&&l.type==="Character")return s.body.pop(),pve(o,l);throw new Error("Invalid character class range")}return p4(Cg("-"))}function uve({negate:e},t,n){const{tokens:r,walk:i}=t,s=[u2()],o=r[t.nextIndex];let a=QL(o);for(;a.type!=="CharacterClassClose";){if(a.type==="CharacterClassIntersector")s.push(u2()),t.nextIndex++;else{const c=s.at(-1);c.body.push(i(c,n))}a=QL(r[t.nextIndex],o)}const l=u2({negate:e});return s.length===1?l.body=s[0].body:(l.kind="intersection",l.body=s.map(c=>c.body.length===1?c.body[0]:c)),t.nextIndex++,l}function dve({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:o}=r;if(e==="property"){const a=v4(n);if(u9.has(a)&&!o?.has(a))e="posix",n=a;else return em(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:o})}return e==="posix"?wve(n,{negate:t}):n7(e,{negate:t})}function fve(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:s,skipLookbehindValidation:o,walk:a}=t,l=kve(e),c=l.type==="AbsenceFunction",u=XL(l),d=u&&l.negate;if(l.type==="CapturingGroup"&&(i.push(l),l.name&&Ope(s,l.name,[]).push(l)),c&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let f=JL(r[t.nextIndex]);for(;f.type!=="GroupClose";){if(f.type==="Alternator")l.body.push(Ff()),t.nextIndex++;else{const m=l.body.at(-1),g=a(m,{...n,isInAbsenceFunction:n.isInAbsenceFunction||c,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(m.body.push(g),(u||n.isInLookbehind)&&!o){const p="Lookbehind includes a pattern not allowed by Oniguruma";if(d||n.isInNegLookbehind){if(YL(g)||g.type==="CapturingGroup")throw new Error(p)}else if(YL(g)||XL(g)&&g.negate)throw new Error(p)}}f=JL(r[t.nextIndex])}return t.nextIndex++,l}function hve({kind:e,min:t,max:n},r){const i=r.parent,s=i.body.at(-1);if(!s||!sve(s))throw new Error("Quantifier requires a repeatable token");const o=_B(e,t,n,s);return i.body.pop(),o}function mve({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let i=e.slice(3,-1);const s=/^(?[-+]?)0*(?[1-9]\d*)$/.exec(i);if(s){const a=+s.groups.num,l=n.length;if(t.hasNumberedRef=!0,i={"":a,"+":l+a,"-":l+1-a}[s.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const o=CB(i);return r.push(o),o}function gve(e,t){return{type:"AbsenceFunction",kind:e,body:C1(t?.body)}}function Ff(e){return{type:"Alternative",body:TB(e?.body)}}function e7(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function t7(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function SB(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!Sve(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:C1(t?.body)}}function p4(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function u2(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:TB(e?.body)}}function pve(e,t){if(t.valuen)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function xve(e,t){return{type:"Regex",body:C1(t?.body),flags:e}}function CB(e){return{type:"Subroutine",ref:e}}function em(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=n.unicodePropertyMap?.get(v4(e));if(!r){if(n.normalizeUnknownPropertyNames)r=_ve(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(hs`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function kve({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return gve("repeater");case"atomic":return il({atomic:!0});case"capturing":return SB(i,{name:n});case"group":return il({flags:e});case"lookahead":case"lookbehind":return gf({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function C1(e){if(e===void 0)e=[Ff()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function TB(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function YL(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function XL(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function Sve(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function _ve(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function v4(e){return e.replace(/[- _]+/g,"").toLowerCase()}function QL(e,t){const n=t;return Tg(e,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function JL(e){return Tg(e,"Unclosed group")}function Cp(e,t,n=null){function r(s,o){for(let a=0;aA-Za-z\-]|<[=!]|\(DEFINE\))`;function Tve(e,t){for(let n=0;n=t&&e[n]++}function Eve(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const Da=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function f9(e,t,n,r){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let o=0,a="";for(const l of e.matchAll(i)){const{0:c,groups:{$skip:u}}=l;if(!u&&(!r||r===Da.DEFAULT==!o)){n instanceof Function?a+=n(l,{context:o?Da.CHAR_CLASS:Da.DEFAULT,negated:s[s.length-1]}):a+=n;continue}c[0]==="["?(o++,s.push(c[1]==="^")):c==="]"&&o&&(o--,s.pop()),a+=c}return a}function EB(e,t,n,r){f9(e,t,n,r)}function Ive(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const i=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=n;let s=0,o;for(;o=i.exec(e);){const{0:a,groups:{$skip:l}}=o;if(!l&&(!r||r===Da.DEFAULT==!s))return o;a==="["?s++:a==="]"&&s&&s--,i.lastIndex==o.index&&i.lastIndex++}return null}function Fy(e,t,n){return!!Ive(e,t,0,n)}function Dve(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,s=1,o;for(;o=n.exec(e);){const[a]=o;if(a==="[")i++;else if(i)a==="]"&&i--;else if(a==="(")s++;else if(a===")"&&(s--,!s)){r=o.index;break}}return e.slice(t,r)}const eM=new RegExp(String.raw`(?${Cve})|(?\((?:\?<[^>]+>)?)|\\?.`,"gsu");function Ave(e,t){const n=t?.hiddenCaptures??[];let r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const i="(?>",s="(?:(?=(",o=[0],a=[];let l=0,c=0,u=NaN,d;do{d=!1;let f=0,m=0,g=!1,p;for(eM.lastIndex=Number.isNaN(u)?0:u+s.length;p=eM.exec(e);){const{0:y,index:v,groups:{capturingStart:b,noncapturingStart:w}}=p;if(y==="[")f++;else if(f)y==="]"&&f--;else if(y===i&&!g)u=v,g=!0;else if(g&&w)m++;else if(b)g?m++:(l++,o.push(l+c));else if(y===")"&&g){if(!m){c++;const x=l+c;if(e=`${e.slice(0,u)}${s}${e.slice(u+i.length,v)}))<$$${x}>)${e.slice(v+1)}`,d=!0,a.push(x),Tve(n,x),r.size){const k=new Map;r.forEach((_,E)=>{k.set(E>=x?E+1:E,_.map(C=>C>=x?C+1:C))}),r=k}break}m--}}}while(d);return n.push(...a),e=f9(e,String.raw`\\(?[1-9]\d*)|<\$\$(?\d+)>`,({0:f,groups:{backrefNum:m,wrappedBackrefNum:g}})=>{if(m){const p=+m;if(p>o.length-1)throw new Error(`Backref "${f}" greater than number of captures`);return`\\${o[p]}`}return`\\${g}`},Da.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const IB=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,B3=new RegExp(String.raw` \\(?: \d+ | c[A-Za-z] | [gk]<[^>]+> | [pPu]\{[^\}]+\} | u[A-Fa-f\d]{4} | x[A-Fa-f\d]{2} ) | \((?: \? (?: [:=!>] | <(?:[=!]|[^>]+>) | [A-Za-z\-]+: | \(DEFINE\) ))? | (?${IB})(?[?+]?)(?[?*+\{]?) | \\?. `.replace(/\s+/g,""),"gsu");function Lve(e){if(!new RegExp(`${IB}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",s=0,o;for(B3.lastIndex=0;o=B3.exec(e);){const{0:a,index:l,groups:{qBase:c,qMod:u,invalidQ:d}}=o;if(a==="[")s||(r=l),s++;else if(a==="]")s?s--:r=null;else if(!s)if(u==="+"&&i&&!i.startsWith("(")){if(d)throw new Error(`Invalid quantifier "${a}"`);let f=-1;if(/^\{\d+\}$/.test(c))e=Eve(e,l+c.length,u,"");else{if(i===")"||i==="]"){const m=i===")"?n:r;if(m===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,m)}(?>${e.slice(m,l)}${c})${e.slice(l+a.length)}`}else e=`${e.slice(0,l-i.length)}(?>${i}${c})${e.slice(l+a.length)}`;f+=4}B3.lastIndex+=f}else a[0]==="("?t.push(l):a===")"&&(n=t.length?t.pop():null);i=a}return{pattern:e}}const Ca=String.raw,Mve=Ca`\\g<(?[^>&]+)&R=(?[^>]+)>`,r7=Ca`\(\?R=(?[^\)]+)\)|${Mve}`,y4=Ca`\(\?<(?![=!])(?[^>]+)>`,DB=Ca`${y4}|(?\()(?!\?)`,qd=new RegExp(Ca`${y4}|${r7}|\(\?|\\?.`,"gsu"),q3="Cannot use multiple overlapping recursions";function $ve(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=t?.captureTransfers??new Map;if(!new RegExp(r7,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&Fy(e,Ca`\(\?\(DEFINE\)`,Da.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],o=Fy(e,Ca`\\[1-9]`,Da.DEFAULT),a=new Map,l=[];let c=!1,u=0,d=0,f;for(qd.lastIndex=0;f=qd.exec(e);){const{0:m,groups:{captureName:g,rDepth:p,gRNameOrNum:y,gRDepth:v}}=f;if(m==="[")u++;else if(u)m==="]"&&u--;else if(p){if(tM(p),c)throw new Error(q3);if(o)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const b=e.slice(0,f.index),w=e.slice(qd.lastIndex);if(Fy(w,r7,Da.DEFAULT))throw new Error(q3);const x=+p-1;e=nM(b,w,x,!1,n,s,d),i=iM(i,b,x,s.length,0,d);break}else if(y){tM(v);let b=!1;for(const F of l)if(F.name===y||F.num===+y){if(b=!0,F.hasRecursedWithin)throw new Error(q3);break}if(!b)throw new Error(Ca`Recursive \g cannot be used outside the referenced group "${r==="external"?y:Ca`\g<${y}&R=${v}>`}"`);const w=a.get(y),x=Dve(e,w);if(o&&Fy(x,Ca`${y4}|\((?!\?)`,Da.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const k=e.slice(w,f.index),_=x.slice(k.length+m.length),E=s.length,C=+v-1,L=nM(k,_,C,!0,n,s,d);i=iM(i,k,C,s.length-E,E,d);const O=e.slice(0,w),V=e.slice(w+x.length);e=`${O}${L}${V}`,qd.lastIndex+=L.length-m.length-k.length-_.length,l.forEach(F=>F.hasRecursedWithin=!0),c=!0}else if(g)d++,a.set(String(d),qd.lastIndex),a.set(g,qd.lastIndex),l.push({num:d,name:g});else if(m[0]==="("){const b=m==="(";b&&(d++,a.set(String(d),qd.lastIndex)),l.push(b?{num:d}:{})}else m===")"&&l.pop()}return n.push(...s),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function tM(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function nM(e,t,n,r,i,s,o){const a=new Set;r&&EB(e+t,y4,({groups:{captureName:c}})=>{a.add(c)},Da.DEFAULT);const l=[n,r?a:null,i,s,o];return`${e}${rM(`(?:${e}`,"forward",...l)}(?:)${rM(`${t})`,"backward",...l)}${t}`}function rM(e,t,n,r,i,s,o){const l=u=>t==="forward"?u+2:n-u+2-1;let c="";for(let u=0;u[^>]+)>`,({0:f,groups:{captureName:m,unnamed:g,backref:p}})=>{if(p&&r&&!r.has(p))return f;const y=`_$${d}`;if(g||m){const v=o+s.length+1;return s.push(v),Pve(i,v),g?f:`(?<${m}${y}>`}return Ca`\k<${p}${y}>`},Da.DEFAULT)}return c}function Pve(e,t){for(let n=0;n=t&&e[n]++}function iM(e,t,n,r,i,s){if(e.size&&r){let o=0;EB(t,DB,()=>o++,Da.DEFAULT);const a=s-o+i,l=new Map;return e.forEach((c,u)=>{const d=(r-o*n)/n,f=o*n,m=u>a+o?u+r:u,g=[];for(const p of c)if(p<=a)g.push(p);else if(p>a+o+d)g.push(p+r);else if(p<=a+o)for(let y=0;y<=n;y++)g.push(p+o*y);else for(let y=0;y<=n;y++)g.push(p+f+d*y);l.set(m,g)}),l}return e}var Wi=String.fromCodePoint,Fn=String.raw,cl={},b4=globalThis.RegExp;cl.flagGroups=(()=>{try{new b4("(?i:)")}catch{return!1}return!0})();cl.unicodeSets=(()=>{try{new b4("[[]]","v")}catch{return!1}return!0})();cl.bugFlagVLiteralHyphenIsRange=cl.unicodeSets?(()=>{try{new b4(Fn`[\d\-a]`,"v")}catch{return!0}return!1})():!1;cl.bugNestedClassIgnoresNegation=cl.unicodeSets&&new b4("[[^a]]","v").test("a");function yw(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function ov(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function i7(e,t){return sM[e]>=sM[t]}function Ove(e,t){if(e==null)throw new Error(t??"Value expected");return e}var sM={ES2025:2025,ES2024:2024,ES2018:2018},Rve={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function AB(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Rve[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=cl.flagGroups?"ES2025":cl.unicodeSets?"ES2024":"ES2018"),t}var Fve="[ -\r ]",Nve=new Set([Wi(304),Wi(305)]),pc=Fn`[\p{L}\p{M}\p{N}\p{Pc}]`;function LB(e){if(Nve.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=Hve.get(n),s=Vve.get(n),o=zve.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),s&&t.add(s),[...t]}var h9=new Map(`C Other Cc Control cntrl Cf Format Cn Unassigned Co Private_Use Cs Surrogate L Letter LC Cased_Letter Ll Lowercase_Letter Lm Modifier_Letter Lo Other_Letter Lt Titlecase_Letter Lu Uppercase_Letter M Mark Combining_Mark Mc Spacing_Mark Me Enclosing_Mark Mn Nonspacing_Mark N Number Nd Decimal_Number digit Nl Letter_Number No Other_Number P Punctuation punct Pc Connector_Punctuation Pd Dash_Punctuation Pe Close_Punctuation Pf Final_Punctuation Pi Initial_Punctuation Po Other_Punctuation Ps Open_Punctuation S Symbol Sc Currency_Symbol Sk Modifier_Symbol Sm Math_Symbol So Other_Symbol Z Separator Zl Line_Separator Zp Paragraph_Separator Zs Space_Separator ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component EComp Emoji_Modifier EMod Emoji_Modifier_Base EBase Emoji_Presentation EPres Extended_Pictographic ExtPict Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS`.split(/\s/).map(e=>[v4(e),e])),Vve=new Map([["s",Wi(383)],[Wi(383),"s"]]),zve=new Map([[Wi(223),Wi(7838)],[Wi(107),Wi(8490)],[Wi(229),Wi(8491)],[Wi(969),Wi(8486)]]),Hve=new Map([Iu(453),Iu(456),Iu(459),Iu(498),...U3(8072,8079),...U3(8088,8095),...U3(8104,8111),Iu(8124),Iu(8140),Iu(8188)]),jve=new Map([["alnum",Fn`[\p{Alpha}\p{Nd}]`],["alpha",Fn`\p{Alpha}`],["ascii",Fn`\p{ASCII}`],["blank",Fn`[\p{Zs}\t]`],["cntrl",Fn`\p{Cc}`],["digit",Fn`\p{Nd}`],["graph",Fn`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Fn`\p{Lower}`],["print",Fn`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Fn`[\p{P}\p{S}]`],["space",Fn`\p{space}`],["upper",Fn`\p{Upper}`],["word",Fn`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Fn`\p{AHex}`]]);function Bve(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Iu(e){const t=Wi(e);return[t.toLowerCase(),t]}function U3(e,t){return Bve(e,t).map(n=>Iu(n))}var MB=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function qve(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};$B(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:i7(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Cp(e,Uve,r);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Cp(e,Wve,s);const o={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Cp(e,Kve,o),e._originMap=s.groupOriginByCopy,e._strategy=r.strategy,e}var Uve={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const s=il();s.body[0].body.push(gf({negate:!0,body:r}),em("Any"));const o=il();o.body[0].body.push(_B("greedy",0,1/0,s)),n(xi(o,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const i=e.body.filter(s=>s.kind==="flags");for(let s=n+1;s\r\n|${i?Fn`\p{RGI_Emoji}`:f}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(l==="hex")n(Du(em("AHex",{negate:c}),t));else if(l==="newline")n(xi(vc(c?`[^ ]`:`(?>\r ?|[ \v\f…\u2028\u2029])`),t));else if(l==="posix")if(!i&&(u==="graph"||u==="print")){if(r==="strict")throw new Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[u];c&&(d=`\0-${Wi(d.codePointAt(0)-1)}${Wi(d.codePointAt(2)+1)}-􏿿`),n(xi(vc(`[${d}]`),t))}else n(xi(G3(vc(jve.get(u)),c),t));else if(l==="property")h9.has(v4(u))||(e.key="sc");else if(l==="space")n(Du(em("space",{negate:c}),t));else if(l==="word")n(xi(G3(vc(pc),c),t));else throw new Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:s,removeAllNextSiblings:o}){const{kind:a,flags:l}=e;if(a==="flags")if(!l.enable&&!l.disable)r();else{const c=il({flags:l});c.body[0].body=o(),i(xi(c,t),{traverse:!0})}else if(a==="keep"){const c=n.body[0],d=n.body.length===1&&xB(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:n;if(t.parent!==d||d.body.length>1)throw new Error(Fn`Uses "\K" in a way that's unsupported`);const f=gf({behind:!0});f.body[0].body=s(),i(xi(f,t))}else throw new Error(`Unexpected directive kind "${a}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(xi(gf({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=il();t.body[0].body.push(e.body),e.body=xi(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const o=FB(s.body);o?(r=!0,Array.isArray(o)?n.push(...o):n.push(o)):i=!0}r&&!i&&n.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(Fn`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!K3(n)&&(n=W3(n,t),e.ref=n)}},Wve={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:s,multiplexCapturesToLeftByRef:o,openRefs:a,reffedNodesByReferencer:l}){const c=i.get(e);if(c&&a.has(e.number)){const d=Du(oM(e.number),t);l.set(d,a.get(e.number)),n(d);return}a.set(e.number,e),o.set(e.number,[]),e.name&&ov(o,e.name,[]);const u=o.get(e.name??e.number);for(let d=0;df.type==="Group"&&!!f.flags)),d=u?yw(r.globalFlags,u):r.globalFlags;Gve(d,r.currentFlags)||(c=il({flags:Xve(d)}),c.body[0].body.push(l))}n(xi(c,t),{traverse:!a})}},Kve={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const s=r.reffedNodesByReferencer.get(e).filter(o=>Zve(o,e));if(!s.length)n(xi(gf({negate:!0}),t));else if(s.length>1){const o=il({atomic:!0,body:s.reverse().map(a=>Ff({body:[t7(a.number)]}))});n(xi(o,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r{t.forEach(i=>{r.enable?.[i]&&(delete n.disable[i],n.enable[i]=!0),r.disable?.[i]&&(n.disable[i]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Xve({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function RB(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function FB(e){const t=e.find(n=>n.kind==="search_start"||e1e(n,{negate:!1})||!Qve(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const i=FB(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function NB(e,t){const n=RB(e)??[];for(const r of n)if(r===t||NB(r,t))return!0;return!1}function Qve({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function Jve(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function e1e(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&xB(e.body[0],{type:"Assertion",kind:"search_start"})}function K3(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function vc(e,t){const r=kB(e,{...t,unicodePropertyMap:h9}).body;return r.length>1||r[0].body.length>1?il({body:r}):r[0].body[0]}function G3(e,t){return e.negate=t,e}function Du(e,t){return e.parent=t,e}function xi(e,t){return $B(e),e.parent=t,e}function t1e(e,t){const n=AB(t),r=i7(n.target,"ES2024"),i=i7(n.target,"ES2025"),s=n.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let o=null,a=null;if(!i){const m=[e.flags.ignoreCase];Cp(e,n1e,{getCurrentModI:()=>m.at(-1),popModI(){m.pop()},pushModI(g){m.push(g)},setHasCasedChar(){m.at(-1)?o=!0:a=!0}})}const l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!a)};let c=e;const u={accuracy:n.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!i&&o&&a),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(m){return u.lastNode=c,c=m,Ove(r1e[m.type],`Unexpected node type "${m.type}"`)(m,u,d)}const f={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((m,g)=>{m.hidden&&f._hiddenCaptures.push(g),m.transferTo&&ov(f._captureTransfers,m.transferTo,[]).push(g)}),f}var n1e={"*":{enter({node:e},t){if(lM(e)){const n=t.getCurrentModI();t.pushModI(e.flags?yw({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){lM(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){m9(Wi(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),VB(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&MB.has(e.value)&&t.setHasCasedChar()}},r1e={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Fn`\B`:Fn`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:i,number:s}=e,o={ignoreCase:t.currentFlags.ignoreCase},a=t.originMap.get(e);return a&&(o.hidden=!0,s>a.number&&(o.transferTo=a.number)),t.captureMap.set(s,o),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=Wi(e),r=$h(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&m9(n)){const i=LB(n);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:i,parent:s}=e;let{body:o}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");cl.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(cM)&&(o=[p4(45),...o.filter(c=>!cM(c))]);const a=()=>`[${i?"^":""}${o.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||cl.bugNestedClassIgnoresNegation)&&!i){const u=o.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(u.length){const d=il(),f=d.body[0];return d.parent=s,f.parent=d,o=o.filter(m=>!u.includes(m)),e.body=o,o.length?(e.parent=f,f.body.push(e)):d.body.pop(),u.forEach(m=>{const g=Ff({body:[m]});m.parent=g,g.parent=d,d.body.push(g)}),n(d)}}t.inCharClass=!0;const c=a();return t.inCharClass=!1,c}const l=o[0];if(r==="union"&&!i&&l&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(cl.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&o.length===1&&l.type!=="CharacterClassRange"))return o.map(n).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return a()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=$h(n,i),o=$h(r,i),a=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const l=VB(e);l1e(l).forEach(u=>{a.add(Array.isArray(u)?`${$h(u[0],i)}-${$h(u[1],i)}`:$h(u,i))})}return`${s}-${o}${[...a].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":Fn`[^\n]`;if(e==="digit")return t?Fn`\D`:Fn`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&MB.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Fn`\P`:Fn`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?Fn`\W`:Fn`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},i,s){const o=i.currentFlags;n&&(i.currentFlags=yw(o,n));const a=t.map(s).join("|"),l=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?a:`(?${c1e(e,n,i.useFlagMods)}${a})`;return i.currentFlags=o,l},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,n){return n(e.body)+u1e(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:Fn`\g<${t}&R=${r}>`}},i1e=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),s1e=new Set(["-","\\","]","^","["]),o1e=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),aM=new Map([[9,Fn`\t`],[10,Fn`\n`],[11,Fn`\v`],[12,Fn`\f`],[13,Fn`\r`],[8232,Fn`\u2028`],[8233,Fn`\u2029`],[65279,Fn`\uFEFF`]]),a1e=/^\p{Cased}$/u;function m9(e){return a1e.test(e)}function VB(e,t){const n=!!t?.firstOnly,r=e.min.value,i=e.max.value,s=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return s;for(let o=r;o<=i;o++){const a=Wi(o);if(!m9(a))continue;const l=LB(a).filter(c=>{const u=c.codePointAt(0);return ui});if(l.length&&(s.push(...l),n))break}return s}function $h(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(aM.has(e))return aM.get(e);if(e<32||e>126&&e<160||e>262143||t&&d1e(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?o1e:s1e:i1e,s=Wi(e);return(i.has(s)?"\\":"")+s}function l1e(e){const t=e.map(i=>i.codePointAt(0)).sort((i,s)=>i-s),n=[];let r=null;for(let i=0;i";let r="";if(t&&n){const{enable:i,disable:s}=t;r=(i?.ignoreCase?"i":"")+(i?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${r}:`}function u1e({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function lM({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function d1e(e){return e>47&&e<58}function cM({type:e,value:t}){return e==="Character"&&t===45}var f1e=class s7 extends RegExp{#t=new Map;#e=null;#n;#i=null;#r=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(t,n,r){const i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");const s=t;super(s,n),this.#n=s.source,s instanceof s7&&(this.#t=s.#t,this.#i=s.#i,this.#r=s.#r,this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?"":t,n),this.#n=t,this.#t=m1e(s.hiddenCaptures,s.transfers),this.#r=s.strategy,this.rawOptions=r??{}}i||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:i,...s}=this.rawOptions;this.#e=new s7(this.#n,this.flags,s)}const n=this.global||this.sticky,r=this.lastIndex;if(this.#r==="clip_search"&&n&&r){this.lastIndex=0;const i=this.#s(t.slice(r));return i&&(h1e(i,r,t,this.hasIndices),this.lastIndex+=r),i}return this.#s(t)}#s(t){this.#e.lastIndex=this.lastIndex;const n=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;const r=[...n];n.length=1;let i;this.hasIndices&&(i=[...n.indices],n.indices.length=1);const s=[0];for(let o=1;o{const a=s[o];a&&(s[o]=[a[0]+t,a[1]+t])})}}function m1e(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const s of i)ov(n,s,{}).transferTo=r;return n}function g1e(e){const t=/(?\((?:\?<(?![=!])(?[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,s;for(;s=t.exec(e);){const{0:o,groups:{capture:a,name:l}}=s;o==="["?r++:r?o==="]"&&r--:a&&(i++,l&&n.set(i,l))}return n}function p1e(e,t){const n=v1e(e,t);return n.options?new f1e(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function v1e(e,t){const n=AB(t),r=kB(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:h9}),i=qve(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),s=t1e(i,n),o=$ve(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),a=Lve(o.pattern),l=Ave(a.pattern,{captureTransfers:o.captureTransfers,hiddenCaptures:o.hiddenCaptures}),c={pattern:l.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const u=l.hiddenCaptures.sort((g,p)=>g-p),d=Array.from(l.captureTransfers),f=i._strategy,m=c.pattern.length>=n.lazyCompileLength;(u.length||d.length||f||m)&&(c.options={...u.length&&{hiddenCaptures:u},...d.length&&{transfers:d},...f&&{strategy:f},...m&&{lazyCompile:m}})}return c}function zB(e,t){return p1e(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function HB(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||=n=>zB(n,{target:t.target}),{createScanner(n){return new Ppe(n,t)},createString(n){return{content:n}}}}yj(XC({bundledLanguages:()=>ud,bundledLanguagesAlias:()=>JC,bundledLanguagesBase:()=>QC,bundledLanguagesInfo:()=>k1,bundledThemes:()=>t9,bundledThemesInfo:()=>e9,codeToHast:()=>uB,codeToHtml:()=>cB,codeToTokens:()=>dB,codeToTokensBase:()=>fB,codeToTokensWithThemes:()=>hB,createHighlighter:()=>g4,createJavaScriptRegexEngine:()=>HB,createOnigurumaEngine:()=>i9,defaultJavaScriptRegexConstructor:()=>zB,getLastGrammarState:()=>gB,getSingletonHighlighter:()=>mB,loadWasm:()=>r9}),$pe);const y1e={tokenizer:{inlineText(e){const t=/^(`+(?=~)|~+(?=`))/.exec(e);return t?{type:"text",raw:t[0],text:t[0],escaped:this.lexer.state.inRawBlock}:!1}}},bw="diffs-container";(()=>{try{return!1}catch{return!1}})();const b1e=/(?=^From [a-f0-9]+ .+$)/m,jB=/(?=^diff --git)/gm,w1e=/(?<=\n)/,x1e=/^(---|\+\+\+)\s+([^\t\r\n]+)/,k1e=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,S1e=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,_1e=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,g9="header-prefix",p9="header-metadata",v9="header-custom",Ii={dark:"pierre-dark",light:"pierre-light"},av="data-theme-css",lv="data-unsafe-css",C1e="data-diffs-scrollbar-measure",BB="--diffs-scrollbar-gutter-measured",Po=1,cv=1e5,w4={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...w4});const T1e=Object.freeze({fromStart:0,fromEnd:0}),ww={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},qB={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};let d2=new Set,o7=null;function Ka(e){d2.add(e),o7??=requestAnimationFrame(UB)}function UB(e){const t=new Set(d2);d2.clear();for(const n of t)try{n(e)}catch(r){console.error(r)}d2.size>0?o7=requestAnimationFrame(UB):o7=null}function xw(e,t,n){if(e===t||e==null||t==null)return e===t;const r=new Set(n),i=Object.keys(e),s=new Set(Object.keys(t));for(const o of i)if(s.delete(o),!r.has(o)&&(!(o in t)||e[o]!==t[o]))return!1;for(const o of Array.from(s))if(!r.has(o))return!1;return!0}function Eg(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function y9(e,t){const n=e?.theme??Ii,r=t?.theme??Ii,i=uM(e),s=uM(t);return Eg(n,r)&&xw(e,t,["theme","parseDiffOptions"])&&xw(i,s)}function uM(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function dM(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function fM({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:r=!1,fitPerfectlyOverscroll:i=0,overscrollSize:s}){const o=n+s*2,a=r?n+i*2:o;if(t=Math.max(t,a),o>=t||r){const u=Math.max(e-i,0),d=Math.min(e+a,t);return{top:u,bottom:Math.max(d,u)}}let l=e+n/2-o/2,c=l+o;return l<0&&(l=0),c>t&&(c=t),l=Math.floor(Math.max(l,0)),{top:l,bottom:Math.ceil(Math.max(Math.min(c,t),l))}}function Wl(e){return{type:"text",value:e}}function Hn({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function kw({name:e,width:t=16,height:n=16,properties:r}){return Hn({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...r},children:[Hn({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function E1e(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function gm(e){return Hn({tagName:"div",properties:{"data-gutter":""},children:e})}function WB(e,t,n,r={}){return Hn({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t!=null?[Hn({tagName:"span",properties:{"data-line-number-content":""},children:[Wl(`${t}`)]})]:void 0})}function Sa(e,t,n){return Hn({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function I1e(){return Hn({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[kw({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function D1e(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var KB=class{hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const n=!(e===this.selectedRange||dM(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:s}=this.options;t==null&&n==null&&r==null&&s==null&&i==null||this.options.onGutterUtilityClick!=null&&Vy(e.composedPath())||(yc(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:s,enableGutterUtility:o=!1}=this.options;t==="disabled"&&!o&&n==null&&r==null&&i==null&&s==null||(yc(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(yc(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){yc(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:n}=this.options,r=t.composedPath();yc(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:r});const i=this.resolvePointerTarget(r);yc(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",i);const{onLineClick:s,onLineNumberClick:o,onLineEnter:a,onLineLeave:l,onTokenClick:c,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:m}=this.options;switch(e){case"move":{const g=Z3(i)&&this.hoveredLine?.lineElement===i.lineElement;f2(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),f2(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),g||(this.hoveredLine!=null&&(l?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Z3(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),a?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(i==null)break;if(M1e(i)&&m!=null){m(i);break}if(L1e(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?"both":i.direction,i.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!Z3(i))break;f2(i)&&c!=null&&c(this.toTokenEventBaseProps(i),t);const g=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...g,event:t}):s?.({...g,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:r,onLineNumberClick:i,onLineEnter:s,onLineLeave:o,onTokenClick:a,onTokenEnter:l,onTokenLeave:c,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:m=!1,onGutterUtilityClick:g}=this.options,p=g!=null,y=n!=="disabled"||r!=null||i!=null||s!=null||o!=null||a!=null||l!=null||c!=null||u!=null||d!=null||f||m||p;y&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,yc(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const w=[];return(t==="both"||t==="click")&&(r!=null&&w.push("onLineClick"),i!=null&&w.push("onLineNumberClick"),u!=null&&w.push("expandable hunk separators"),d!=null&&w.push("merge conflict actions")),w})()),yc(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),yc(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!y&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const v=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",b=this.pointerSession.mode==="gutterSelecting";(!m&&v||!p&&b)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const t=e.composedPath();Vy(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:r}=this;if(r==null)return;e.preventDefault();const{lineNumber:i,eventSide:s,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){const a=this.getIndexesFromSelection(this.selectedRange,r.getAttribute("data-diff-type")==="split");if(a==null)return;const l=a.start<=a.end?o>=a.start:o<=a.end;this.selectionAnchor={lineNumber:l?this.selectedRange.start:this.selectedRange.end,side:l?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){const a={lineNumber:i,side:s};this.selectionAnchor=a,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:a,pending:a},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:s},this.updateSelection(i,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;const r=this.currentSelectionEnds(),i=r?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),s=r?.top??i;i==null||s==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:s,current:i},t&&(this.selectionAnchor={lineNumber:s.lineNumber,side:s.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;this.updateSelection(n.lineNumber,n.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;const r={lineNumber:n.lineNumber,side:n.eventSide};if(D1e(this.pointerSession.pending,r))return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const r=this.resolveSelectionPoint(e,{source:"coordinates-first"});r!=null&&(this.pointerSession.current=r,t&&this.updateSelection(r.lineNumber,r.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=Ul(I1e());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);U0(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(!(r==null||i==null))return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const i of r){if(!(i instanceof HTMLElement))continue;const s=this.resolvePointerTarget(Ny(i));if(U0(s)&&!(this.mode==="diff"&&e.side!=null&&s.side!==e.side))return s}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const n=this.resolvePointerTarget(e);if(U0(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(U0(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const r=this.pathFromCoordinates(e,n);return r!==void 0?r??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&Vy(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=Ny(e);if(t&&Vy(n))return;const r=P1e(e);return r!=null?Ny(r):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=R1e(O1e(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?Ny(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=mM(t)?t:mM(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const r=this.getCurrentSelectionRange();let i;if(e==null)i=null;else{const s=this.selectionAnchor?.side??t,o=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(o,e,s,t)}dM(r??void 0,i??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const a of e)a.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const n=this.pre.getAttribute("data-diff-type")==="split",r=this.getIndexesFromSelection(this.selectedRange,n);if(r==null)throw console.error({rowRange:r,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const i=r.start===r.end,s=Math.min(r.start,r.end),o=Math.max(r.start,r.end);for(const a of t){const[l,c]=a.children,u=c.children.length;if(u!==l.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let d=0;do)break;if(g==null||gNumber.parseInt(r,10)).filter(r=>!Number.isNaN(r));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Sw({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:s,onLineLeave:o,onLineNumberClick:a,onTokenClick:l,onTokenEnter:c,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:m,controlledSelection:g,onLineSelected:p,onLineSelectionStart:y,onLineSelectionChange:v,onLineSelectionEnd:b},w,x,k){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:A1e({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:w,onMergeConflictActionClick:k,onLineClick:i,onLineEnter:s,onLineLeave:o,onLineNumberClick:a,onTokenClick:l,onTokenEnter:c,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:m,controlledSelection:g,onLineSelected:p,onLineSelectionStart:y,onLineSelectionChange:v,onLineSelectionEnd:b,getLineIndex:x}}function A1e({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function U0(e){return e!=null&&"kind"in e&&e.kind==="line"}function f2(e){return e!=null&&"kind"in e&&e.kind==="token"}function Z3(e){return U0(e)||f2(e)}function L1e(e){return"type"in e&&e.type==="line-info"}function M1e(e){return"kind"in e&&e.kind==="merge-conflict-action"}function $1e(e){return e==="current"||e==="incoming"||e==="both"}function hM(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Ny(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function P1e(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute("data-line")||r.hasAttribute("data-column-number"))?r:void 0}function O1e(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function R1e(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(Number.isFinite(n))return{lineNumber:n,side:t[1]}}function mM(e){return e!=null&&typeof e.elementFromPoint=="function"}function gM(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function pM(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function Vy(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function yc(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var GB=class _c{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=_c.resizeObserver??new ResizeObserver(_c.handleSharedResizeEntries);return _c.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const r of t){const i=_c.managersByElement.get(r.target);if(i==null)continue;const s=n.get(i);s==null?n.set(i,[r]):s.push(r)}for(const[r,i]of n)r.handleResizeEntries(i)}observedNodes=new Map;setup(t,n){const r=new Set;let i=0;const s=new Map(this.observedNodes);this.observedNodes.clear();for(const o of t.children){if(i===2)break;const a=(()=>{if(o instanceof HTMLElement&&o.tagName==="CODE")return o})();if(a==null)continue;i++;let l=s.get(a);if(l!=null&&l.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let c=a.firstElementChild;c instanceof HTMLElement||(c=null),l!=null?(this.observedNodes.set(a,l),s.delete(a),l.numberElement!==c?(l.numberElement!=null&&(this.unobserve(l.numberElement),s.delete(l.numberElement)),c!=null&&(this.observe(c),s.delete(c),this.observedNodes.set(c,l)),l.numberElement=c,l.numberWidth=0):l.numberElement!=null?(s.delete(l.numberElement),this.observedNodes.set(l.numberElement,l)):l.numberWidth=0):(l={type:"code",codeElement:a,numberElement:c,codeWidth:"auto",numberWidth:0},this.observedNodes.set(a,l),this.observe(a),c!=null&&(this.observedNodes.set(c,l),this.observe(c)))}if(i>1&&!n){const o=t.querySelectorAll('[data-line-annotation*=","]'),a=new Map;for(const l of o){if(!(l instanceof HTMLElement))continue;const c=l.getAttribute("data-line-annotation")??"";if(!/^\d+,\d+$/.test(c)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:c,element:l});continue}let u=a.get(c);u==null&&(u=[],a.set(c,u)),u.push(l)}for(const[l,c]of a){if(c.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",l,c);continue}const[u,d]=c,f=u.firstElementChild,m=d.firstElementChild;if(!(u instanceof HTMLElement)||!(d instanceof HTMLElement)||!(f instanceof HTMLElement)||!(m instanceof HTMLElement))continue;let g=s.get(f);if(g!=null){this.observedNodes.set(f,g),this.observedNodes.set(m,g),s.delete(f),s.delete(m);continue}const p=f.getBoundingClientRect().height,y=m.getBoundingClientRect().height;g={type:"annotations",column1:{container:u,child:f,childHeight:p},column2:{container:d,child:m,childHeight:y},currentHeight:"auto"},r.add({child1:f,child2:m,item:g,newHeight:Math.max(p,y)})}for(const l of r)this.applyNewHeight(l.item,l.newHeight),this.observedNodes.set(l.child1,l.item),this.observedNodes.set(l.child2,l.item),this.observe(l.child1),this.observe(l.child2);r.clear()}for(const[o,a]of s)this.unobserve(o),a.type==="code"?V1e(a):z1e(a);s.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=_c,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),_c.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:r}=_c,i=n.get(t);if(i!=null){if(i!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),_c.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,r=new Set;for(const i of t){const{target:s,borderBoxSize:o,contentBoxSize:a}=i;if(!(s instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",i);continue}const l=this.observedNodes.get(s);if(l==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",i);continue}if(l.type==="annotations"){const c=(()=>{if(s===l.column1.child)return l.column1;if(s===l.column2.child)return l.column2})();if(c==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:l,target:s});continue}c.childHeight=o[0].blockSize,r.add(l)}else if(l.type==="code"){const c=n.get(l)??{},u=a[0].inlineSize;s===l.codeElement?c.codeInlineSize=u:s===l.numberElement&&(c.numberInlineSize=u),n.set(l,c)}}this.applyAnnotationUpdates(r),r.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,r]of t){const i=r.codeInlineSize!=null?F1e(r.codeInlineSize):n.codeWidth,s=r.numberInlineSize!=null?N1e(r.numberInlineSize):n.numberWidth,o=i!==n.codeWidth,a=s!==n.numberWidth;if(!(!o&&!a)&&(n.codeWidth=i,n.numberWidth=s,o&&n.codeElement.style.setProperty("--diffs-column-width",`${typeof i=="number"?`${i}px`:"auto"}`),a&&n.codeElement.style.setProperty("--diffs-column-number-width",`${s===0?"auto":`${s}px`}`),o||a&&i!=="auto")){const l=typeof i=="number"?Math.max(i-s,0):0;n.codeElement.style.setProperty("--diffs-column-content-width",`${l>0?`${l}px`:"auto"}`)}}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function F1e(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function N1e(e){return Math.max(Math.ceil(e),0)}function V1e(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function z1e(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}const Nf=new Map,Y3=new Map,H1e=new Map,a7=new Set;function _w(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!a7.has(t))return!1;return!0}function vM(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(a7.has(n.name))continue;let r=Nf.get(n.name);r==null&&(r=n,Nf.set(n.name,r)),a7.add(r.name),t.loadLanguageSync(r.data)}}function ZB(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function YB(e){if(ZB())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=Y3.get(e);if(t!=null)return t;try{let n=H1e.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(ud,e)&&(n=ud[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const r=n().then(({default:i})=>{const s={name:e,data:i};return Nf.has(e)||Nf.set(e,s),s});return Y3.set(e,r),await r}finally{Y3.delete(e)}}function XB(e){return Nf.get(e)??YB(e)}const l7=new Set;function uv(e){const t=[],n=new Set;for(const d of j1e(e.themes)){const f=QB(d)?d.getThemes():[d];for(const m of f){if(n.has(m.name))throw new Error(`Theme collection already contains theme "${m.name}"`);n.add(m.name),t.push(m)}}const r=Object.freeze([...t]),i=Object.freeze(r.filter(d=>d.colorScheme==="light")),s=Object.freeze(r.filter(d=>d.colorScheme==="dark")),o=new Map(r.map(d=>[d.name,d])),a=Object.freeze(r.map(d=>d.name)),l=Object.freeze(i.map(d=>d.name)),c=Object.freeze(s.map(d=>d.name));function u(d){if(d==null)return r;const{colorScheme:f,collection:m}=d;return m==null?f==="light"?i:f==="dark"?s:r:r.filter(g=>g.collection!==m?!1:f==null||g.colorScheme===f)}return{getTheme(d){return o.get(d)},getThemes(d){return u(d)},getThemeNames(d){return d?.collection==null?d?.colorScheme==="light"?l:d?.colorScheme==="dark"?c:a:u(d).map(f=>f.name)},hasTheme(d){return o.has(d)},orderBy(d){return uv({themes:r.map((f,m)=>({descriptor:f,index:m})).sort((f,m)=>{const g=d(f.descriptor,m.descriptor);return g!==0?g:f.index-m.index}).map(f=>f.descriptor)})},pick(d){const f=[],m=new Set;for(const g of d){if(m.has(g))throw new Error(`Theme collection pick already includes theme "${g}"`);m.add(g);const p=o.get(g);if(p==null)throw new Error(`Theme collection does not contain theme "${g}"`);f.push(p)}return uv({themes:f})},registerInto(d){for(const f of r)d.registerThemeIfAbsent(f.name,f.load)}}}function j1e(e){return B1e(e)?[e]:e}function B1e(e){return QB(e)||q1e(e)}function q1e(e){return typeof e.name=="string"&&typeof e.load=="function"}function QB(e){return typeof e.getThemes=="function"}function JB(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var eq=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},U1e=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},W1e=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function K1e(){const e=new Map,t=new Map,n=new Map;let r=0;function i(v,b){if(e.has(v))throw new eq(v);e.set(v,b)}function s(v,b){return e.has(v)?!1:(e.set(v,b),!0)}function o(v){return e.has(v)}function a(v){const b=t.get(v);if(b!==void 0)return Promise.resolve(b);const w=n.get(v);if(w!==void 0)return w;const x=e.get(v);if(x===void 0)return Promise.reject(new U1e(v));const k=r,_=x().then(E=>{const C=JB(E);return k===r&&t.set(v,C),n.get(v)===_&&n.delete(v),C}).catch(E=>{throw n.get(v)===_&&n.delete(v),E});return n.set(v,_),_}function l(v){return Promise.all(v.map(b=>a(b)))}function c(v,b){t.set(v,b)}function u(v){for(const[b,w]of v)c(b,w)}function d(v){return t.get(v)}function f(v){const b=[];for(const w of v){const x=t.get(w);if(x===void 0)throw new W1e(w);b.push(x)}return b}function m(v){return t.has(v)}function g(v){for(const b of v)if(!t.has(b))return!1;return!0}function p(v){const b=t.get(v);return b!==void 0?b:a(v)}function y(){r++,t.clear(),n.clear()}return{clearResolvedThemes:y,getResolvedOrResolveTheme:p,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:m,hasResolvedThemes:g,registerTheme:i,registerThemeIfAbsent:s,resolveTheme:a,resolveThemes:l,seedResolvedTheme:c,seedResolvedThemes:u}}const Oa=K1e();function c7(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let r;if(typeof n=="string"){if(r=Oa.getResolvedTheme(n),r==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else r=n,n=n.name,Oa.getResolvedTheme(n)==null&&Oa.seedResolvedTheme(n,r);l7.has(n)||(l7.add(n),t.loadThemeSync(r))}}function b9({name:e,load:t,colorScheme:n,collection:r,displayName:i}){return{name:e,colorScheme:n,collection:r,displayName:i,load:G1e(t)}}function G1e(e){return async()=>f4(JB(await e()))}const Z1e="pierre",tq=["pierre-light","pierre-light-soft"],Y1e=["pierre-dark","pierre-dark-soft"],X1e=[...tq,...Y1e],Q1e=new Set(tq);function J1e(e){return Q1e.has(e)?"light":"dark"}const eye={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant"},tye={"pierre-dark":()=>B(()=>import("./pierre-dark-Dy3oF52j.js"),[]),"pierre-dark-soft":()=>B(()=>import("./pierre-dark-soft-K7D5SChL.js"),[]),"pierre-dark-vibrant":()=>B(()=>import("./pierre-dark-vibrant-KQ6p6T2R.js"),[]),"pierre-light":()=>B(()=>import("./pierre-light-DhMpYZcV.js"),[]),"pierre-light-soft":()=>B(()=>import("./pierre-light-soft-cPlVRKcQ.js"),[]),"pierre-light-vibrant":()=>B(()=>import("./pierre-light-vibrant-0cUW3kII.js"),[])};function nye(e){return async()=>({...(await tye[e]()).default,name:e})}function rye(e){return b9({name:e,collection:Z1e,colorScheme:J1e(e),displayName:eye[e],load:nye(e)})}const nq=uv({themes:X1e.map(e=>rye(e))}),iye="shiki",rq=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],sye=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],oye=new Set(rq);function aye(e){return oye.has(e)?"light":"dark"}const lye={andromeeda:()=>B(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>B(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>B(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>B(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>B(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>B(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]),"catppuccin-latte":()=>B(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]),"catppuccin-macchiato":()=>B(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]),"catppuccin-mocha":()=>B(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]),"dark-plus":()=>B(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>B(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>B(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>B(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>B(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>B(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>B(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>B(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>B(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>B(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>B(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>B(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>B(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>B(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>B(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>B(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>B(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>B(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>B(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>B(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>B(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>B(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]),"kanagawa-lotus":()=>B(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]),"kanagawa-wave":()=>B(()=>import("./kanagawa-wave-DWedfzmr.js"),[]),laserwave:()=>B(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>B(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>B(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>B(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>B(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>B(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>B(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>B(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>B(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>B(()=>import("./monokai-D4h5O-jR.js"),[]),"night-owl":()=>B(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>B(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>B(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>B(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]),"one-light":()=>B(()=>import("./one-light-C3Wv6jpd.js"),[]),plastic:()=>B(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>B(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>B(()=>import("./red-bN70gL4F.js"),[]),"rose-pine":()=>B(()=>import("./rose-pine-qdsjHGoJ.js"),[]),"rose-pine-dawn":()=>B(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]),"rose-pine-moon":()=>B(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]),"slack-dark":()=>B(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>B(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>B(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>B(()=>import("./solarized-dark-DXbdFlpD.js"),[]),"solarized-light":()=>B(()=>import("./solarized-light-L9t79GZl.js"),[]),"synthwave-84":()=>B(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>B(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>B(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>B(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>B(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>B(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function yM(e){return b9({name:e,collection:iye,colorScheme:aye(e),load:lye[e]})}const cye=Object.freeze([...rq.map(e=>yM(e)),...sye.map(e=>yM(e))]),iq=uv({themes:cye});uv({themes:[nq,iq]});function sq(e){if(ZB())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(Oa.hasRegisteredTheme(e))return;const t=iq.getTheme(e);if(t!=null){Oa.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function oq(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function uye(e){sq(e);const t=await Oa.resolveTheme(e);return oq(e,t),t}function dye(e){return Oa.getResolvedTheme(e)??uye(e)}let Nl;async function Ym({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){Nl??=g4({themes:[],langs:["text"],engine:n==="shiki-wasm"?i9(B(()=>import("./wasm-CG6Dc4jp.js"),[])):HB()});const r=fye(Nl)?await Nl:Nl;Nl=r;const i=[];for(const o of t){if(o==="text"||o==="ansi")continue;const a=XB(o);"then"in a?i.push(a):vM(a,r)}const s=[];for(const o of e){const a=dye(o);"then"in a?s.push(a):c7(a,Nl)}return(i.length>0||s.length>0)&&await Promise.all([Promise.all(i).then(o=>{vM(o,r)}),Promise.all(s).then(o=>{c7(o,r)})]),r}function aq(){if(Nl!=null&&!("then"in Nl))return Nl}function fye(e=Nl){return e!=null&&"then"in e}for(const e of nq.getThemes())Oa.registerThemeIfAbsent(e.name,e.load);function dv(e=Ii){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Tp(e){for(const t of dv(e))if(!l7.has(t))return!1;return!0}function u7(e){return Oa.hasResolvedThemes(e)}function zu(e,t){return Eg(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function Bl(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function x4(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function lq(e){return Hn({tagName:"div",children:[Hn({tagName:"div",children:e.annotations?.map(t=>Hn({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function hye(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function cq({fileOrDiff:e,mode:t,stickyHeader:n}){const r="type"in e?e:void 0,i={"data-diffs-header":t,"data-change-type":r?.type,"data-sticky":n?"":void 0};return Hn({tagName:"div",children:[t==="custom"?Hn({tagName:"slot",properties:{name:v9}}):mye({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:r?.type??"file"}),...t==="custom"?[]:[gye(r)]],properties:i})}function mye({name:e,prevName:t,iconType:n}){const r=[Hn({tagName:"slot",properties:{name:g9}}),kw({name:hye(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(Hn({tagName:"div",children:[Hn({tagName:"bdi",children:[Wl(t)]})],properties:{"data-prev-name":""}})),r.push(kw({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),r.push(Hn({tagName:"div",children:[Hn({tagName:"bdi",children:[Wl(e)]})],properties:{"data-title":""}})),Hn({tagName:"div",children:r,properties:{"data-header-content":""}})}function gye(e){const t=[];if(e!=null){let n=0,r=0;for(const i of e.hunks)n+=i.additionLines,r+=i.deletionLines;(r>0||n===0)&&t.push(Hn({tagName:"span",children:[Wl(`-${r}`)],properties:{"data-deletions-count":""}})),(n>0||r===0)&&t.push(Hn({tagName:"span",children:[Wl(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(Hn({tagName:"slot",properties:{name:p9}})),Hn({tagName:"div",children:t,properties:{"data-metadata":""}})}function uq(e){return Hn({tagName:"pre",properties:pye(e)})}function pye({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,totalLines:s,type:o,customProperties:a}){return{...a,"data-diff":o==="diff"?"":void 0,"data-file":o==="file"?"":void 0,"data-diff-type":o==="diff"?i?"split":"single":void 0,"data-overflow":r,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${s}`.length}ch;`}}const nf=new Map;let vye=0;const d0={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function ao(e){if(nf.has(e))return nf.get(e)??"text";if(d0[e]!=null)return d0[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(nf.has(t[1]))return nf.get(t[1])??"text";if(d0[t[1]]!=null)return d0[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return nf.has(n)?nf.get(n)??"text":d0[n]??"text"}function yye(){return vye}function bye(){return Object.fromEntries(nf)}function dq(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:dv(t),preferredHighlighter:n}}function Vf(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function zf(e){return e.replace(/\n$|\r\n$/,"")}function wye(e,t,n){const r=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(r==null){const i=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(i,{node:e,line:t,state:n}),new Error(i)}return e.tagName="div",e.properties["data-line"]=r.lineNumber,e.properties["data-alt-line"]=r.altLineNumber,e.properties["data-line-type"]=r.type,e.properties["data-line-index"]=r.lineIndex,e.children.length===0&&e.children.push(Wl(` `)),e}const zy=Symbol("no-token"),X3=Symbol("multiple-tokens");function fq(e){const t=xye(e);if(t!=null)return t;let n=zy;const r=[];let i=[],s;const o=()=>{if(i.length===0||s==null){i=[],s=void 0;return}if(i.length===1){const l=i[0];if(l?.type==="element"){kye(l,s);for(const c of l.children)h2(c)}else h2(l);r.push(l),i=[],s=void 0;return}for(const l of i)h2(l);r.push(Hn({tagName:"span",properties:{"data-char":s},children:i})),i=[],s=void 0},a=l=>{if(l!==zy){if(l===X3){n=X3;return}if(n===zy){n=l;return}n!==l&&(n=X3)}};for(const l of e.children){const c=l.type==="element"?fq(l):zy;if(a(c),typeof c!="number"){o(),r.push(l);continue}s!=null&&s!==c&&o(),s??=c,i.push(l)}return o(),e.children=r,n}function xye(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function h2(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)h2(t)}}function kye(e,t){e.properties["data-char"]=t}function Sye(e={}){const{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:r=a=>a}=e,i=new Map;function s(a){return Object.entries(a).map(([l,c])=>`${l}:${c}`).join(";")}function o(a){const l=typeof a=="string"?a:s(a);let c=t+_ye(l)+n;return c=r(c),i.has(c)||i.set(c,typeof a=="string"?a:{...a}),c}return{name:"@shikijs/transformers:style-to-class",pre(a){if(!a.properties.style)return;const l=o(a.properties.style);delete a.properties.style,this.addClassToHast(a,l)},tokens(a){for(const l of a)for(const c of l){if(!c.htmlStyle)continue;const u=o(c.htmlStyle);c.htmlStyle={},c.htmlAttrs||={},c.htmlAttrs.class?c.htmlAttrs.class+=` ${u}`:c.htmlAttrs.class=u}},getClassRegistry(){return i},getCSS(){let a="";for(const[l,c]of i.entries())a+=`.${l}{${typeof c=="string"?c:s(c)}}`;return a},clearRegistry(){i.clear()}}}function _ye(e,t=0){let n=3735928559^t,r=1103547991^t;for(let i=0,s;i>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function hq(e=!1,t=!1){const n={lineInfo:[]},r=[{line(i){return delete i.properties.class,i},pre(i){const s=E1e(i),o=[];if(s!=null){let a=1;for(const l of s.children)l.type==="element"&&(e&&fq(l),o.push(wye(l,a,n)),a++);s.children=o}return i},...e?{tokens(i){for(const s of i){let o=0;for(const a of s){const l=a;l.__lineChar??=o,o+=a.content.length}}},preprocess(i,s){s.mergeWhitespaces="never"},span(i,s,o,a,l){if(l?.offset!=null&&l.content!=null){const c=l.__lineChar;return c!=null&&(i.properties["data-char"]=c),i}return i}}:null}];return t&&r.push(Cye,bM),{state:n,transformers:r,toClass:bM}}const bM=Sye({classPrefix:"hl-"}),Cye={name:"token-style-normalizer",tokens(e){for(const t of e)for(const n of t){if(n.htmlStyle!=null)continue;const r={};n.color!=null&&(r.color=n.color),n.bgColor!=null&&(r["background-color"]=n.bgColor),n.fontStyle!=null&&n.fontStyle!==0&&((n.fontStyle&1)!==0&&(r["font-style"]="italic"),(n.fontStyle&2)!==0&&(r["font-weight"]="bold"),(n.fontStyle&4)!==0&&(r["text-decoration"]="underline")),Object.keys(r).length>0&&(n.htmlStyle=r)}}};function Oo(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const Tye=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,Eye=/^0(?:\.0+)?%?$/;function Iye(e){const t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;const n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;const r=e.slice(t+1,-1).trim();if(r.length===0)return;const i=r.lastIndexOf("/");if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){const s=r.split(",");if(s.length===4)return s[3]?.trim()}}function Dye(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;const n=t[1];let r,i=1;return n.length===3?r=n.split("").map(s=>s+s).join(""):n.length===6?r=n:(r=n.slice(0,6),i=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),i]}function Q3(e){if(e==null)return null;const t=Dye(e);if(t==null)return null;const n=t[0]/255,r=t[1]/255,i=t[2]/255,s=o=>o<=.03928?o/12.92:((o+.055)/1.055)**2.4;return .2126*s(n)+.7152*s(r)+.0722*s(i)}function wM(e){if(e==null)return!1;const t=e.trim().toLowerCase();if(t==="transparent"||Tye.test(t))return!0;const n=Iye(t);return n!=null&&Eye.test(n)}function Aye(e,t,n){if(t==null||n==null)return!1;const r=Q3(e),i=Q3(t),s=Q3(n);return r==null||i==null||s==null?!1:Math.abs(r-s){const o=e.at(-1);return o===""||o===` `||o===`\r `||o==="\r"?Math.max(0,e.length-2):e.length-1})();for(let o=t;o0||a<1/0,{state:u,transformers:d}=hq(i),f=s?"text":e.lang??ao(e.name),m=typeof n=="string"?t.getTheme(n).type:void 0,g=mq({theme:n,highlighter:t});u.lineInfo=b=>({type:"context",lineIndex:b-1+o,lineNumber:b+o});const p=typeof n=="string"?{lang:f,theme:n,transformers:d,defaultColor:!1,cssVariablePrefix:Oo("token"),tokenizeMaxLineLength:r}:{lang:f,themes:n,transformers:d,defaultColor:!1,cssVariablePrefix:Oo("token"),tokenizeMaxLineLength:r},y=d7(t.codeToHast(c?$ye(l??f7(e.contents),o,a):zf(e.contents),p)),v=c?new Array(o):y;return c&&v.push(...y),{code:v,themeStyles:g,baseThemeType:m}}function $ye(e,t,n){let r="";return Cw({lines:e,startingLine:t,totalLines:n,callback({content:i}){r+=i}}),r}function pq(e,t){return Hn({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function fv(e){return(e.lang??ao(e.name))==="text"}function vq(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}let Pye=-1;var Oye=class{__id=`file-renderer:${++Pye}`;highlighter;renderCache;computedLang="text";lineAnnotations={};lineCache;constructor(e={theme:Ii},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=Tp(e.theme??Ii)?aq():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setLineAnnotations(e){this.lineAnnotations={};for(const t of e){const n=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=n,n.push(t)}}cleanUp(){this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.clearRenderCache(),this.highlighter=void 0,this.workerManager?.cleanUpTasks(this),this.lineCache=void 0}clearRenderCache(){this.renderCache=void 0}hydrate(e){const{options:t}=this.getRenderOptions(e),n=n5(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());let r=this.workerManager?.getFileResultCache(e);r!=null&&!zu(t,r.options)&&(r=void 0),this.renderCache??={file:e,options:t,highlighted:!n&&!fv(e),result:n?void 0:r?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightFileAST(this,e):this.highlighter==null&&(this.computedLang=e.lang??ao(e.name),this.initializeHighlighter())}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getFileRenderOptions();const{theme:r=Ii,tokenizeMaxLineLength:i=1e3}=this.options;return{theme:r,useTokenTransformer:vq(this.options),tokenizeMaxLineLength:i}})(),{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!Bl(e,n.file)||!zu(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getOrCreateLineCache(e){if(e.cacheKey==null)return this.lineCache=void 0,f7(e.contents);let{lineCache:t}=this;return(t==null||t.cacheKey!==e.cacheKey)&&(t={cacheKey:e.cacheKey,lines:f7(e.contents)}),this.lineCache=t,t.lines}renderFile(e=this.renderCache?.file,t=ww){if(e==null)return;let{options:n,forceHighlight:r}=this.getRenderOptions(e);const i=this.getMatchingWorkerResultCache(e,n);i!=null&&!this.hasHighlightedRenderCache(e,n)&&(this.renderCache={file:e,highlighted:!0,renderRange:void 0,...i},r=!1),this.renderCache??={file:e,highlighted:!1,options:n,result:void 0,renderRange:void 0};const s=this.getOrCreateLineCache(e),o=e.contents.length>0,a=!o||fv(e)||n5(s.length,this.getTokenizeMaxLength()),l=!Bl(e,this.renderCache.file),c=!x4(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(a||this.renderCache.result==null||!this.renderCache.highlighted&&(l||c))&&(this.renderCache.file=e,this.renderCache.options=n,this.renderCache.highlighted=!1,(this.renderCache.result==null||l||c||r)&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,t.startingLine,t.totalLines,s)),this.renderCache.renderRange=t),!a&&o&&(!this.renderCache.highlighted||r)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??ao(e.name);const u=this.highlighter!=null&&Tp(n.theme),d=this.highlighter!=null&&_w(this.computedLang),f=!a&&d;if(this.highlighter!=null&&u&&(r||a||!this.renderCache.highlighted&&f||this.renderCache.result==null)){const{result:m,options:g}=this.renderFileWithHighlighter(e,this.highlighter,a||!d);this.renderCache={file:e,options:g,highlighted:f,result:m,renderRange:void 0}}(!u||!a&&!d)&&this.asyncHighlight(e).then(({result:m,options:g})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,m,g,!a)})}return this.renderCache.result!=null?this.processFileResult(this.renderCache.file,t,this.renderCache.result):void 0}async asyncRender(e,t=ww){const{result:n}=await this.asyncHighlight(e);return this.processFileResult(e,t,n)}async asyncHighlight(e){const t=n5(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??ao(e.name);const n=this.highlighter!=null&&u7(dv(this.options.theme)),r=t||this.highlighter!=null&&_w(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter,t)}renderFileWithHighlighter(e,t,n=!1){const{options:r}=this.getRenderOptions(e);return{result:gq(e,t,r,{forcePlainText:n}),options:r}}processFileResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){const{disableFileHeader:s=!1}=this.options,o=[],a=gm(),l=this.getOrCreateLineCache(e);let c=0;return Cw({lines:l,startingLine:t.startingLine,totalLines:t.totalLines,callback:({lineIndex:u,lineNumber:d})=>{const f=n[u];if(f==null){const m="FileRenderer.processFileResult: Line doesnt exist";throw console.error(m,{name:e.name,lineIndex:u,lineNumber:d,lines:l}),new Error(m)}if(f!=null){a.children.push(WB("context",d,`${u}`)),o.push(f),c++;const m=this.lineAnnotations[d];m!=null&&(a.children.push(Sa("context","annotation",1)),o.push(lq({hunkIndex:0,lineIndex:d,annotations:m.map(g=>Vf(g))})),c++)}}}),a.properties.style=`grid-row: span ${c}`,{gutterAST:a.children??[],contentAST:o,preAST:this.createPreElement(l.length),headerAST:s?void 0:this.renderHeader(e),totalLines:l.length,rowCount:c,themeStyles:r,baseThemeType:i,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderHeader(e){const{headerRenderMode:t="default",stickyHeader:n=!1}=this.options;return cq({fileOrDiff:e,mode:t,stickyHeader:n})}renderFullHTML(e){return Ul(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(Hn({tagName:"code",children:this.renderCodeAST(e),properties:{"data-code":""}})),{...e.preAST,children:t}}renderCodeAST(e){const t=gm();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,pq(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return Ul(t?Hn({tagName:"code",children:e,properties:{"data-code":""}}):e)}async initializeHighlighter(){return this.highlighter=await Ym(dq(this.computedLang,this.options)),this.highlighter}onHighlightSuccess(e,t,n,r=!0){if(this.renderCache==null)return;const i=!Bl(e,this.renderCache.file)||!this.renderCache.highlighted||!zu(n,this.renderCache.options);this.renderCache={file:e,options:n,highlighted:r,result:t,renderRange:void 0},i&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const n=this.workerManager?.getFileResultCache(e);if(!(n==null||!zu(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&Bl(e,n.file)&&zu(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??cv}createPreElement(e){const{disableLineNumbers:t=!1,overflow:n="scroll"}=this.options;return uq({type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:t,overflow:n,split:!1,totalLines:e})}};function n5(e,t){return e>t}const yq=``;function Rye(e,t){return e.lineNumber===t.lineNumber&&e.metadata===t.metadata}function bq(e,t){return e==null||t==null?e===t:Fye(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}const kM={};function Fye(e=kM,t=kM){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(e[i]!==t[i])return!1;return!0}function wq(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function xq(){const e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e.style.touchAction="none",e}function kq(){const e=document.createElement("style");return e.setAttribute(lv,""),e}var Nye='@layer base,theme,rendered,unsafe;@layer base{:host{--diffs-font-fallback:"SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono", "Courier New", monospace;--diffs-header-font-fallback:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;--diffs-mixer:light-dark(#000,#fff);--diffs-gap-fallback:8px;--diffs-scrollbar-gutter-fallback:6px;--diffs-scrollbar-gutter:var(--diffs-scrollbar-gutter-override,var(--diffs-scrollbar-gutter-measured,var(--diffs-scrollbar-gutter-fallback)));--diffs-added-light:#0dbe4e;--diffs-added-dark:#5ecc71;--diffs-modified-light:#009fff;--diffs-modified-dark:#69b1ff;--diffs-deleted-light:#ff2e3f;--diffs-deleted-dark:#ff6762;color-scheme:light dark;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);font-feature-settings:var(--diffs-font-features);--diffs-bg:light-dark(var(--diffs-light-bg,#fff),var(--diffs-dark-bg,#000));--diffs-bg-buffer:var(--diffs-bg-buffer-override,light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));--diffs-bg-context:var(--diffs-bg-context-override,light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));--diffs-bg-context-gutter:var(--diffs-bg-context-gutter-override,light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)),color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));--diffs-bg-separator:var(--diffs-bg-separator-override,light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));--diffs-fg:light-dark(var(--diffs-light,#000),var(--diffs-dark,#fff));--diffs-fg-number:var(--diffs-fg-number-override,light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)),color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));--diffs-fg-conflict-marker:var(--diffs-fg-conflict-marker-override,var(--diffs-fg-number));--diffs-deletion-base:var(--diffs-deletion-color-override,light-dark(var(--diffs-light-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-light))),var(--diffs-dark-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-dark)))));--diffs-addition-base:var(--diffs-addition-color-override,light-dark(var(--diffs-light-addition-color,var(--diffs-addition-color,var(--diffs-added-light))),var(--diffs-dark-addition-color,var(--diffs-addition-color,var(--diffs-added-dark)))));--diffs-modified-base:var(--diffs-modified-color-override,light-dark(var(--diffs-light-modified-color,var(--diffs-modified-color,var(--diffs-modified-light))),var(--diffs-dark-modified-color,var(--diffs-modified-color,var(--diffs-modified-dark)))));--diffs-bg-deletion:var(--diffs-bg-deletion-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));--diffs-bg-deletion-emphasis:var(--diffs-bg-deletion-emphasis-override,light-dark(rgb(from var(--diffs-deletion-base) r g b / .15),rgb(from var(--diffs-deletion-base) r g b / .2)));--diffs-bg-addition:var(--diffs-bg-addition-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));--diffs-bg-addition-emphasis:var(--diffs-bg-addition-emphasis-override,light-dark(rgb(from var(--diffs-addition-base) r g b / .15),rgb(from var(--diffs-addition-base) r g b / .2)));--diffs-selection-base:var(--diffs-modified-base);--diffs-selection-number-fg:light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));background-color:var(--diffs-bg);color:var(--diffs-fg);display:block}pre,code,[data-error-wrapper]{isolation:isolate;font-family:var(--diffs-font-family,var(--diffs-font-fallback));outline:none;margin:0;padding:0;display:block}pre,code{background-color:var(--diffs-bg)}code{contain:content}*,:before,:after{box-sizing:border-box}[data-icon-sprite]{display:none}[data-diffs-header],[data-separator]{font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback))}[data-diffs-header][data-sticky]{z-index:1;background-color:var(--diffs-bg);position:sticky;top:0}[data-file-info]{color:var(--fg);background-color:color-mix(in lab, var(--bg) 98%, var(--fg));border-block:1px solid color-mix(in lab, var(--bg) 95%, var(--fg));padding:10px;font-weight:700}[data-diff],[data-file]{--diffs-grid-number-column-width:minmax(min-content, max-content);--diffs-code-grid:var(--diffs-grid-number-column-width) 1fr}[data-dehydrated]:is([data-diff],[data-file]){--diffs-code-grid:var(--diffs-grid-number-column-width) minmax(0, 1fr)}:is([data-diff],[data-file]):hover [data-code]::-webkit-scrollbar-thumb{background-color:var(--diffs-bg-context)}@supports (-webkit-touch-callout:none){:host{--diffs-scrollbar-gutter-fallback:0px}}[data-line] span{color:light-dark(var(--diffs-token-light,var(--diffs-light)),var(--diffs-token-dark,var(--diffs-dark)));background-color:light-dark(var(--diffs-token-light-bg,inherit),var(--diffs-token-dark-bg,inherit));font-weight:light-dark(var(--diffs-token-light-font-weight,inherit),var(--diffs-token-dark-font-weight,inherit));font-style:light-dark(var(--diffs-token-light-font-style,inherit),var(--diffs-token-dark-font-style,inherit));-webkit-text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit));text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit))}[data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);color:var(--diffs-fg);background-color:var(--diffs-line-bg,var(--diffs-bg))}@media (pointer:fine){:is([data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]):where([data-hovered]){--diffs-computed-hovered-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-selected-line-bg) 97%, var(--diffs-bg-hover-override,var(--diffs-mixer))),color-mix(in lab, var(--diffs-computed-selected-line-bg) 91%, var(--diffs-bg-hover-override,var(--diffs-mixer))));--diffs-line-bg:var(--diffs-computed-hovered-line-bg,inherit)}}[data-decoration-bg]:is([data-line],[data-no-newline]){--mix-deco-light:92%;--mix-deco-dark:85%}[data-decoration-bg][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]){--mix-deco-light:88%;--mix-deco-dark:80%}[data-decoration-bg][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]){--mix-deco-light:85%;--mix-deco-dark:78%}@media (pointer:fine){[data-decoration-bg][data-hovered]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:85%;--mix-deco-dark:85%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:83%;--mix-deco-dark:83%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:81%;--mix-deco-dark:81%}}[data-decoration-bg]:is([data-line],[data-no-newline]){--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) var(--mix-deco-light), var(--diffs-decoration-bg)),color-mix(in lab, var(--diffs-bg) var(--mix-deco-dark), var(--diffs-decoration-bg)));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-line-annotation],[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context);--diffs-computed-decoration-bg:var(--diffs-annotation-bg);--diffs-computed-diff-line-bg:var(--diffs-annotation-bg);--diffs-computed-selected-line-bg:var(--diffs-annotation-bg);--diffs-line-bg:var(--diffs-annotation-bg)}[data-merge-conflict-actions],[data-gutter-buffer=merge-conflict-action],[data-gutter-buffer=merge-conflict-marker-base],[data-gutter-buffer=merge-conflict-marker-separator],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator]{--diffs-computed-decoration-bg:var(--diffs-bg-context);--diffs-computed-diff-line-bg:var(--diffs-bg-context);--diffs-computed-selected-line-bg:var(--diffs-bg-context);--diffs-line-bg:var(--diffs-bg-context)}[data-gutter-buffer=merge-conflict-marker-start],[data-merge-conflict=marker-start]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-gutter-buffer=merge-conflict-marker-end],[data-merge-conflict=marker-end]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-has-merge-conflict] [data-line-annotation],[data-has-merge-conflict] [data-gutter-buffer=annotation]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);--diffs-line-bg:var(--diffs-bg)}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number]{--mix-light:91%;--mix-dark:85%}:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--mix-light:88%;--mix-dark:80%}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--diffs-diff-line-mix-target:var(--diffs-bg)}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-deletion-override,var(--diffs-deletion-base))}@media (pointer:fine){[data-line-type=change-deletion][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:75%}}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-deletion-override,var(--diffs-deletion-base));--diffs-diff-line-mix-target:var(--diffs-bg-deletion-number-override,var(--diffs-deletion-base))}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-addition-override,var(--diffs-addition-base))}@media (pointer:fine){[data-line-type=change-addition][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--diffs-bg-addition-number-override,var(--diffs-addition-base))}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-current-override,var(--diffs-addition-base))}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--conflict-bg-current-number-override,var(--diffs-addition-base))}@media (pointer:fine){[data-merge-conflict=current][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-incoming-override,var(--diffs-modified-base))}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-modified-base);--diffs-diff-line-mix-target:var(--conflict-bg-incoming-number-override,var(--diffs-modified-base))}@media (pointer:fine){[data-merge-conflict=incoming][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]{--diffs-selection-mix-target:var(--diffs-bg-selection-override,var(--diffs-selection-base))}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--mix-selection-light:82%;--mix-selection-dark:75%}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:75%;--mix-selection-dark:70%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]){--mix-selection-light:75%;--mix-selection-dark:60%;--diffs-selection-mix-target:var(--diffs-bg-selection-number-override,var(--diffs-selection-base))}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:70%;--mix-selection-dark:55%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--diffs-computed-selected-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-light), var(--diffs-selection-mix-target)),color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-dark), var(--diffs-selection-mix-target)));--diffs-line-bg:var(--diffs-computed-selected-line-bg,inherit)}[data-selected-line]:is([data-gutter-buffer],[data-column-number]){color:var(--diffs-selection-number-fg)}[data-no-newline]{-webkit-user-select:none;user-select:none}[data-no-newline] span{opacity:.6}[data-diff-type=split][data-overflow=scroll]{grid-template-columns:1fr 1fr;display:grid}[data-diff-type=split][data-overflow=scroll] [data-additions]{border-left:1px solid var(--diffs-bg)}[data-diff-type=split][data-overflow=scroll] [data-deletions]{border-right:1px solid var(--diffs-bg)}[data-code]{grid-auto-flow:dense;grid-template-columns:var(--diffs-code-grid);overflow:var(--diffs-overflow-override,scroll) clip;overscroll-behavior-x:none;tab-size:var(--diffs-tab-size,2);padding-top:var(--diffs-gap-block,var(--diffs-gap-fallback));padding-bottom:max(0px, calc(var(--diffs-gap-block,var(--diffs-gap-fallback)) - var(--diffs-scrollbar-gutter)));scrollbar-gutter:stable;align-self:flex-start;display:grid}[data-diffs-scrollbar-measure]{opacity:0;pointer-events:none;scrollbar-gutter:auto;grid-template-columns:none;width:100px;height:100px;padding:0;position:absolute;top:-200px;left:-200px}[data-container-size]{container-type:inline-size}[data-code]::-webkit-scrollbar{width:0;height:var(--diffs-scrollbar-gutter)}[data-code]::-webkit-scrollbar-track{background:0 0}[data-code]::-webkit-scrollbar-thumb{background-color:#0000;background-clip:content-box;border:1px solid #0000;border-radius:3px}[data-code]::-webkit-scrollbar-corner{background-color:#0000}@supports ((-moz-appearance:none)){[data-code]{scrollbar-width:thin;scrollbar-color:var(--diffs-bg-context) transparent;padding-bottom:var(--diffs-gap-block,var(--diffs-gap-fallback))}}:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]) [data-code],[data-overflow=wrap]:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]){padding-top:0}[data-gutter]{grid-template-rows:subgrid;grid-template-columns:subgrid;z-index:3;background-color:var(--diffs-bg);grid-column:1;display:grid;position:relative}[data-gutter] [data-gutter-buffer],[data-gutter] [data-column-number]{border-right:var(--diffs-gap-style,2px solid var(--diffs-bg))}[data-content]{grid-template-rows:subgrid;grid-template-columns:subgrid;background-color:var(--diffs-bg);grid-column:2;min-width:0;display:grid}[data-diff-type=split][data-overflow=wrap]{grid-auto-flow:dense;grid-template-columns:repeat(2, var(--diffs-code-grid));padding-block:var(--diffs-gap-block,var(--diffs-gap-fallback));display:grid}[data-diff-type=split][data-overflow=wrap] [data-deletions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-gutter]{grid-column:1}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-content]{border-right:1px solid var(--diffs-bg);grid-column:2}[data-diff-type=split][data-overflow=wrap] [data-additions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-gutter]{border-left:1px solid var(--diffs-bg);grid-column:3}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-content]{grid-column:4}[data-overflow=scroll] [data-gutter]{position:sticky;left:0}[data-interactive-lines] [data-line]{cursor:pointer}[data-interactive-line-numbers] [data-column-number]{cursor:pointer;touch-action:none}[data-content-buffer],[data-gutter-buffer]{-webkit-user-select:none;user-select:none;min-height:1lh;position:relative}[data-gutter-buffer]{padding-left:2ch;padding-right:1ch}[data-gutter-buffer]:before{content:"";min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));display:block}[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context-gutter);min-height:0}[data-gutter-buffer=buffer]{--diffs-line-bg:var(--diffs-bg-context-gutter)}[data-content-buffer]{background-position:5px 0;background-size:8px 8px;background-origin:border-box;background-image:repeating-linear-gradient(-45deg, transparent, transparent 4.242px, var(--diffs-bg-buffer) 4.242px, var(--diffs-bg-buffer) 5.656px);grid-column:1}[data-separator]{box-sizing:content-box;background-color:var(--diffs-bg)}[data-separator=simple]{min-height:4px}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata],[data-separator=simple]{background-color:var(--diffs-bg-separator)}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata]{height:32px;position:relative}[data-separator-wrapper]{-webkit-user-select:none;user-select:none;fill:currentColor;background-color:var(--diffs-bg);align-items:center;height:100%;display:flex;position:absolute;inset-inline:0}[data-content] [data-separator-wrapper]{display:none}[data-separator=metadata] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;color:var(--diffs-fg-number);white-space:nowrap;text-overflow:ellipsis;min-width:min-content;padding-inline:1ch;inset-inline:100% auto;overflow:hidden}[data-separator=line-info]{margin-block:var(--diffs-gap-block,var(--diffs-gap-fallback))}[data-separator=line-info] [data-separator-wrapper]{min-width:16px}[data-separator=line-info-basic],[data-separator=metadata]{margin-block:0}[data-separator=line-info][data-separator-first]{margin-top:0}[data-separator=line-info][data-separator-last]{margin-bottom:0}[data-expand-index] [data-separator-wrapper]{grid-template-columns:32px auto;display:grid}[data-expand-index] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:32px 32px auto}[data-expand-button],[data-separator-content]{background-color:var(--diffs-bg-separator);flex:none;align-items:center;display:flex}[data-expand-index] [data-separator-content]:hover{cursor:pointer;text-decoration:underline}[data-expand-button]{cursor:pointer;min-width:32px;color:var(--diffs-fg-number);border-right:2px solid var(--diffs-bg);flex-shrink:0;justify-content:center;align-self:stretch}[data-expand-button]:hover{color:var(--diffs-fg)}[data-expand-button][data-expand-all-button]{display:none}[data-expand-down] [data-icon]{transform:scaleY(-1)}[data-separator-content]{height:100%;color:var(--diffs-fg-number);flex:auto;justify-content:flex-start;padding:0 1ch;overflow:hidden}:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-content]{-webkit-user-select:none;user-select:none;height:100%;overflow:clip}[data-unmodified-lines]{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;display:block;overflow:hidden}@supports (width:1cqi){[data-unified] [data-separator=line-info] [data-separator-wrapper]{padding-inline:var(--diffs-gap-inline,var(--diffs-gap-fallback));width:100cqi}:is([data-unified] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content]{border-radius:6px}[data-unified] [data-separator=line-info][data-expand-index] [data-separator-wrapper] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-gutter] [data-separator=line-info] [data-separator-wrapper]{padding-left:var(--diffs-gap-inline,var(--diffs-gap-fallback))}[data-gutter] [data-separator=line-info] [data-separator-content]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-gutter] [data-separator=line-info][data-expand-index] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-additions] [data-content] [data-separator=line-info]{background-color:var(--diffs-bg)}:is([data-additions] [data-content] [data-separator=line-info]) [data-separator-wrapper]{display:none}[data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);border-top-right-radius:6px;border-bottom-right-radius:6px;height:100%;display:block}:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}[data-overflow=scroll] [data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{width:calc(100cqi - var(--diffs-gap-inline,var(--diffs-gap-fallback)))}[data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;margin-right:var(--diffs-gap-inline,var(--diffs-gap-fallback));border-top-right-radius:6px;border-bottom-right-radius:6px;display:block}:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}@media (pointer:fine){[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:unset}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:6px;border-top-left-radius:unset}}}@media (pointer:coarse){[data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px 34px auto}:is([data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]) [data-separator-content]{grid-column:unset;grid-row:unset}@supports (width:1cqi){:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up],[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:unset;border-top-left-radius:unset}}}@media (pointer:fine){[data-separator-wrapper][data-separator-multi-button]{grid-template-rows:50% 50%;display:grid}[data-separator-wrapper][data-separator-multi-button] [data-separator-content]{grid-area:1/2/-1;min-width:min-content}[data-separator-wrapper][data-separator-multi-button] [data-expand-button]{grid-column:1}[data-separator=line-info] [data-separator-wrapper],[data-separator=line-info] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px auto}[data-separator=line-info-basic][data-expand-index] [data-separator-wrapper]{grid-template-columns:100% auto}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-up]{border-bottom:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-down]{border-top:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}}[data-additions] [data-gutter] [data-separator-wrapper],[data-additions] [data-separator=line-info-basic] [data-separator-wrapper],[data-content] [data-separator-wrapper]{display:none}[data-line-annotation]{min-height:var(--diffs-annotation-min-height,0);z-index:2}[data-merge-conflict-actions]{z-index:2}[data-separator=custom]{grid-template-columns:subgrid;display:grid}[data-line],[data-column-number],[data-no-newline]{padding-inline:1ch;position:relative}[data-indicators=classic] [data-line]{padding-inline-start:2ch}:is([data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion]),[data-line]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion])):before{-webkit-user-select:none;user-select:none;width:1ch;height:1lh;display:inline-block;position:absolute;top:0;left:0}:is([data-line]:is([data-indicators=classic] [data-line-type=change-addition]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition])):before{content:"+";color:var(--diffs-addition-base)}:is([data-line]:is([data-indicators=classic] [data-line-type=change-deletion]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-deletion])):before{content:"-";color:var(--diffs-deletion-base)}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion],[data-indicators=bars] [data-line-type=change-addition]):before{content:"";-webkit-user-select:none;user-select:none;contain:strict;width:4px;height:100%;display:block;position:absolute;top:0;left:0}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion]):before{background-image:linear-gradient(0deg, var(--diffs-bg-deletion) 50%, var(--diffs-deletion-base) 50%);background-repeat:repeat;background-size:2px 2px;background-size:calc(1lh/round(1lh / 2px)) calc(1lh/round(1lh / 2px))}[data-column-number]:is([data-indicators=bars] [data-line-type=change-addition]):before{background-color:var(--diffs-addition-base)}[data-overflow=wrap] [data-line],[data-overflow=wrap] [data-annotation-content]{white-space:pre-wrap;word-break:break-word}[data-overflow=scroll] [data-line]{white-space:pre;min-height:1lh}[data-column-number]{box-sizing:content-box;text-align:right;-webkit-user-select:none;user-select:none;color:var(--diffs-fg-number);padding-left:2ch}[data-line-number-content]{min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));z-index:1;display:inline-block;position:relative}[data-disable-line-numbers] [data-gutter-buffer],[data-disable-line-numbers] [data-column-number]{min-width:4px;padding:0}:is([data-disable-line-numbers] [data-gutter-buffer],[data-disable-line-numbers] [data-column-number]):before{min-width:0}[data-disable-line-numbers] [data-line-number-content]{display:none}[data-disable-line-numbers] [data-gutter-utility-slot]{right:unset;justify-content:flex-start;left:0}[data-disable-line-numbers][data-indicators=bars] [data-gutter-utility-slot]{left:6px}[data-file][data-disable-line-numbers] [data-gutter-buffer],[data-file][data-disable-line-numbers] [data-column-number]{border-right:0;min-width:0}[data-diff-span]{-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:3px}[data-line-type=change-addition] [data-diff-span]{background-color:var(--diffs-bg-addition-emphasis)}[data-line-type=change-deletion] [data-diff-span]{background-color:var(--diffs-bg-deletion-emphasis)}[data-merge-conflict=marker-start],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator],[data-merge-conflict=marker-end]{color:var(--diffs-fg);padding-left:1ch}[data-merge-conflict=marker-start],[data-merge-conflict=marker-end]{align-items:center;display:flex}:is([data-merge-conflict=marker-start],[data-merge-conflict=marker-end]):after{color:var(--diffs-fg-conflict-marker);font-size:.75rem;font-style:normal;line-height:1.25rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));padding-left:1ch}[data-merge-conflict=marker-start]:after{content:"(Current Change)"}[data-merge-conflict=marker-end]:after{content:"(Incoming Change)"}[data-merge-conflict-actions-content]{min-height:1.75rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));color:var(--diffs-fg);align-items:center;gap:.25rem;padding-inline:.5rem;font-size:.75rem;line-height:1.2;display:flex}[data-merge-conflict-action]{appearance:none;color:var(--diffs-fg-number);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-style:normal}[data-merge-conflict-action]:hover{color:var(--diffs-fg)}[data-merge-conflict-action=current]:hover{color:var(--diffs-addition-base)}[data-merge-conflict-action=incoming]:hover{color:var(--diffs-modified-base)}[data-merge-conflict-action-separator]{color:var(--diffs-fg-number);opacity:.6;-webkit-user-select:none;user-select:none}[data-diffs-header=default]{background-color:var(--diffs-bg);justify-content:space-between;align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));min-height:calc(1lh + var(--diffs-gap-block,var(--diffs-gap-fallback))*3);z-index:2;flex-direction:row;padding-inline:16px;display:flex;position:relative;top:0}[data-header-content]{align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));white-space:nowrap;flex-direction:row;min-width:0;display:flex}[data-header-content] [data-prev-name],[data-header-content] [data-title]{text-overflow:ellipsis;white-space:nowrap;direction:rtl;min-width:0;overflow:hidden}[data-prev-name]{opacity:.7}[data-rename-icon]{fill:currentColor;flex-grow:0;flex-shrink:0}[data-diffs-header=default] [data-metadata]{white-space:nowrap;align-items:center;gap:1ch;display:flex}[data-diffs-header=default] [data-additions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-addition-base)}[data-diffs-header=default] [data-deletions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-deletion-base)}[data-change-icon]{fill:currentColor;flex-shrink:0}[data-change-icon=change],[data-change-icon=rename-pure],[data-change-icon=rename-changed]{color:var(--diffs-modified-base)}[data-change-icon=new]{color:var(--diffs-addition-base)}[data-change-icon=deleted]{color:var(--diffs-deletion-base)}[data-change-icon=file]{opacity:.6}[data-annotation-content]{z-index:2;isolation:isolate;align-self:flex-start;min-width:0;display:flow-root;position:relative}[data-overflow=scroll] [data-annotation-content],[data-overflow=scroll] [data-merge-conflict-actions-content]{width:var(--diffs-column-content-width,auto);left:var(--diffs-column-number-width,0);position:sticky}[data-annotation-slot]{text-wrap-mode:wrap;word-break:normal;white-space-collapse:collapse}[data-gutter-utility-slot]{touch-action:none;justify-content:flex-end;display:flex;position:absolute;top:0;bottom:0;right:0}[data-utility-button]{appearance:none;cursor:pointer;width:1lh;height:1lh;font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);background-color:var(--diffs-modified-base);color:var(--diffs-bg);fill:currentColor;z-index:4;touch-action:none;border:none;border-radius:4px;justify-content:center;align-items:center;margin-right:calc(1ch - 1lh);padding:0;display:flex;position:relative}[data-utility-button]:before{content:"";display:block;position:absolute;inset:0 0 0 -4px}[data-decoration-bar-stack]{pointer-events:none;isolation:isolate;z-index:1;background-color:var(--diffs-decoration-bar-color,transparent);box-sizing:content-box;border-left:2px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg);width:6px;position:absolute;top:0;bottom:0;right:-2px}[data-decoration-bar-depth="1"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 20%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="2"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 45%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="3"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 65%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-start] [data-decoration-bar-stack]{border-top-left-radius:5px;border-top-right-radius:5px}[data-decoration-bar-end] [data-decoration-bar-stack]{z-index:3;border-bottom-right-radius:5px;border-bottom-left-radius:5px}[data-placeholder]{contain:strict}[data-error-wrapper]{padding:var(--diffs-gap-block,var(--diffs-gap-fallback)) var(--diffs-gap-inline,var(--diffs-gap-fallback));scrollbar-width:none;max-height:400px;overflow:auto}[data-error-wrapper] [data-error-message]{color:var(--diffs-deletion-base);font-size:18px;font-weight:700}[data-error-wrapper] [data-error-stack]{color:var(--diffs-fg-number)}}@layer theme,rendered,unsafe;';let Hy;function hv(e){if(Hy!=null)return Hy;const t=e.host;if(typeof HTMLElement<"u"&&t instanceof HTMLElement&&!t.isConnected)return;const n=document.createElement("div");n.setAttribute("data-code",""),n.setAttribute(C1e,"true");const r=document.createElement("div");return r.style.position="relative",r.style.width="200%",r.style.height="200%",n.appendChild(r),e.appendChild(n),Hy=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),Hy}function Sq(e){return`${BB}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}const _q="@layer base, theme, rendered, unsafe;",Vye=new RegExp(`${zye(BB)}\\s*:\\s*[^;]+;`);function Cq(e){return`${_q} @layer unsafe { ${e} }`}function Tq(e,t="system",n){return`${_q} @layer rendered { :host {${t==="system"?"":` color-scheme: ${t};`} ${Sq(n)} ${e} } }`}function Eq(e,t){const n=Sq(t);return e.replace(Vye,n)}function zye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m2({code:e,pre:t,columnType:n,rowSpan:r,containerSize:i=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),n!=null&&e.setAttribute(`data-${n}`,""),t?.appendChild(e)),r!=null?e.style.setProperty("grid-row",`span ${r}`):e.style.removeProperty("grid-row"),i?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function Iq(e,t){if(t==null)return;const n=e.shadowRoot??e.attachShadow({mode:"open"});n.innerHTML===""&&(n.innerHTML=t)}function Dq(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:s,split:o,totalLines:a,customProperties:l}){if(l!=null)for(const c in l){const u=l[c];u!=null&&e.setAttribute(c,`${u}`)}switch(t==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),n){case"bars":case"classic":e.setAttribute("data-indicators",n);break;case"none":e.removeAttribute("data-indicators");break}return i?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),r?e.removeAttribute("data-background"):e.setAttribute("data-background",""),t==="diff"?e.setAttribute("data-diff-type",o?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",s),e.tabIndex=0,e.style.setProperty("--diffs-min-number-column-width-default",`${`${a}`.length}ch`),e}function Tw(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const t=e.tagName??e.nodeName;return typeof t=="string"&&t.toLowerCase()==="style"}function SM(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,themeType:e?.themeType,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,unsafeCSS:e?.unsafeCSS,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}function Aq({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===""){t?.remove();return}return t??=Hye(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function Hye(){const e=document.createElement("style");return e.setAttribute(av,""),e}if(typeof HTMLElement<"u"&&customElements.get(bw)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const r=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(Nye)),r.adoptedStyleSheets=[e]}connectedCallback(){hv(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(bw,t)}const Lq=!0,jye=[];let Bye=-1;var Mq=class{static LoadedCustomComponent=Lq;__id=`file:${++Bye}`;type="file";fileContainer;spriteSVG;pre;code;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;errorWrapper;placeHolder;lastRenderedHeaderHTML;cachedHeaderHTML;appliedPreAttributes;lastRowCount;mounted=!1;headerElement;headerCustom;headerPrefix;headerMetadata;fileRenderer;resizeManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;file;renderRange;enabled=!0;constructor(t={theme:Ii},n,r=!1){this.options=t,this.workerManager=n,this.isContainerManaged=r,this.fileRenderer=new Oye(t,this.handleHighlightRender,this.workerManager),this.resizeManager=new GB,this.interactionManager=new KB("file",Sw(t)),this.workerManager?.subscribeToThemeChanges(this)}handleHighlightRender=()=>{this.rerender()};rerender(){!this.enabled||this.file==null||this.render({file:this.file,forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.fileRenderer.clearRenderCache(),this.rerender()}setOptions(t){t!=null&&(this.options=t,this.cachedHeaderHTML=void 0,this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(Sw(this.options))}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){(this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),this.applyCachedThemeState(t))}applyCachedThemeState(t){if(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)return!1;const n=this.appliedThemeCSS.baseThemeType??t;return this.appliedThemeCSS.themeType===n?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Eg(this.appliedThemeCSS.theme,this.options.theme??Ii)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}setSelectedLines(t,n){this.interactionManager.setSelection(t,n)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{overflow:t="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,t==="wrap"),this.managersDirty=!1}cleanUp(t=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,this.lineAnnotations=[],this.annotationCache.clear(),this.pre=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,t||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.placeHolder=void 0,this.unsafeCSSStyle=void 0,t?this.fileRenderer.recycle():(this.fileRenderer.cleanUp(),this.workerManager=void 0,this.file=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(t){const{fileContainer:n,prerenderedHTML:r,preventEmit:i=!1,file:s,lineAnnotations:o}=t;this.hydrateElements(n,r),qye(this.pre,s,this.options.collapsed)||Uye(this.headerElement,s,this.options.disableFileHeader)?this.render({...t,preventEmit:!0}):this.hydrationSetup({file:s,lineAnnotations:o}),i||this.emitPostRender()}hydrateElements(t,n){this.fileContainer!==t&&this.emitPostRender(!0),Iq(t,n);for(const r of Array.from(t.shadowRoot?.children??[])){if(r instanceof SVGElement){this.spriteSVG=r;continue}if(r instanceof HTMLElement){if(r instanceof HTMLPreElement){this.pre=r,this.appliedPreAttributes=void 0;continue}if(r instanceof HTMLStyleElement&&r.hasAttribute(av)){this.themeCSSStyle=r;continue}if(r instanceof HTMLStyleElement&&r.hasAttribute(lv)){this.unsafeCSSStyle=r,this.appliedUnsafeCSS=r.textContent;continue}if("diffsHeader"in r.dataset){this.headerElement=r,this.lastRenderedHeaderHTML=void 0;continue}}}this.pre!=null&&(this.syncCodeNodeFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t,this.hydrateMeasuredScrollbar()}hydrationSetup({file:t,lineAnnotations:n}){this.lineAnnotations=n??this.lineAnnotations,this.file=t,this.fileRenderer.setOptions(SM(this.options)),this.syncInteractionOptions(),this.pre!=null&&(this.fileRenderer.hydrate(t),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}getOrCreateLineCache(t=this.file){return t!=null?this.fileRenderer.getOrCreateLineCache(t):jye}render({file:t,fileContainer:n,forceRender:r=!1,preventEmit:i=!1,containerWrapper:s,deferManagers:o=!1,lineAnnotations:a,renderRange:l}){const{collapsed:c=!1,themeType:u="system"}=this.options;if(!this.enabled)throw new Error("File.render: attempting to call render after cleaned up");const d=c?void 0:l,f=this.renderRange,m=this.hasThemeChanged(),g=a!=null&&(a.length>0||this.lineAnnotations.length>0)?a!==this.lineAnnotations:!1,p=!Bl(this.file,t);if(!c&&!r&&x4(d,this.renderRange)&&!p&&!g&&!m)return this.applyCachedThemeState(u);this.renderRange=d,p&&(this.cachedHeaderHTML=void 0),this.file=t,this.fileRenderer.setOptions(SM(this.options)),this.syncInteractionOptions(),a!=null&&this.setLineAnnotations(a),this.fileRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:y=!1,disableFileHeader:v=!1}=this.options;if(v&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),n=this.getOrCreateFileContainerNode(n,s),this.applyCachedThemeState(u),c){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const b=this.fileRenderer.renderFile(t,qB);b!=null&&this.applyThemeState(n,b.themeStyles,u,b.baseThemeType),b?.headerAST!=null&&this.applyHeaderToDOM(b.headerAST,n),this.injectUnsafeCSS()}catch(b){if(y)throw b;console.error(b),b instanceof Error&&this.applyErrorToDOM(b,n)}return i||this.emitPostRender(),!0}try{const b=this.getOrCreatePreNode(n);if(!this.canPartiallyRender(r,g,p||m)||!this.applyPartialRender(f,d)){const w=this.fileRenderer.renderFile(t,d);if(w==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(n,w.themeStyles,u,w.baseThemeType),w.headerAST!=null&&this.applyHeaderToDOM(w.headerAST,n),this.applyFullRender(w,b)}this.applyBuffers(b,d),this.injectUnsafeCSS(),this.managersDirty=!0,o||this.flushManagers(),this.renderAnnotations(),this.renderGutterUtility()}catch(b){if(y)throw b;console.error(b),b instanceof Error&&this.applyErrorToDOM(b,n)}return i||this.emitPostRender(),!0}emitPostRender(t=!1){const{fileContainer:n,options:{onPostRender:r}}=this;if(t){if(!this.mounted||(this.mounted=!1,n==null))return;r?.(n,this,"unmount");return}if(n==null)return;const i=this.mounted?"update":"mount";this.mounted=!0,r?.(n,this,i)}removeRenderedCode(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.code?.remove(),this.code=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:t}of this.annotationCache.values())t.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}canPartiallyRender(t,n,r){return!(t||n||r)}renderPlaceholder(t){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const n=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",n.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${t}px`),!0}primeHighlightCache(){const{file:t,workerManager:n}=this;t==null||t.cacheKey==null||n==null||fv(t)||this.fileRenderer.getOrCreateLineCache(t).length>(this.options.tokenizeMaxLength??cv)||n.primeFileHighlightCache(t)}cleanChildNodes(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.code?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.gutterUtilityContent?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.code=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.gutterUtilityContent=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:r}of this.annotationCache.values())r.remove();this.annotationCache.clear();return}const t=new Map(this.annotationCache),{renderAnnotation:n}=this.options;if(n!=null&&this.lineAnnotations.length>0)for(const[r,i]of this.lineAnnotations.entries()){const s=`${r}-${Vf(i)}`;let o=this.annotationCache.get(s);if(o==null||!Rye(i,o.annotation)){o?.element.remove();const a=n(i);if(a==null)continue;o={element:wq(Vf(i)),annotation:i},o.element.appendChild(a),this.fileContainer.appendChild(o.element),this.annotationCache.set(s,o)}t.delete(s)}for(const[r,{element:i}]of t.entries())this.annotationCache.delete(r),i.remove()}renderGutterUtility(){const{renderGutterUtility:t}=this.options;if(this.fileContainer==null||t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const n=t(this.interactionManager.getHoveredLine);if(n!=null&&this.gutterUtilityContent!=null)return;if(n==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const r=xq();r.appendChild(n),this.fileContainer.appendChild(r),this.gutterUtilityContent=r}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,n=this.fileContainer?.shadowRoot;if(n!=null){if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===n&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=kq(),this.unsafeCSSStyle.parentNode!==n&&n.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=Cq(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,n,r,i){const s=t.shadowRoot??t.attachShadow({mode:"open"}),o=i??r,a=this.options.theme??Ii,l=typeof a=="string"?a:{...a},c=hv(s);if(this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===n&&this.appliedThemeCSS.themeType===o&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=l;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===s){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:l,themeStyles:n,themeType:o,baseThemeType:i,scrollbarGutter:c};return}this.themeCSSStyle=Aq({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:Tq(n,o,c)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:l,themeStyles:n,themeType:o,baseThemeType:i,scrollbarGutter:c}:void 0}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;t==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=Eq(this.themeCSSStyle.textContent??"",hv(t)))}applyFullRender(t,n){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(n,t),this.code=m2({code:this.code}),this.code.innerHTML=this.fileRenderer.renderPartialHTML(this.fileRenderer.renderCodeAST(t)),n.replaceChildren(this.code),this.lastRowCount=t.rowCount}applyPartialRender(t,n){if(t==null||n==null)return!1;const{file:r,code:i}=this,s=i!=null?this.getColumns(i):void 0;if(r==null||i==null||s==null)return!1;const o=t.startingLine,a=n.startingLine,l=t.totalLines===1/0?Number.POSITIVE_INFINITY:o+t.totalLines,c=n.totalLines===1/0?Number.POSITIVE_INFINITY:a+n.totalLines,u=Math.max(o,a),d=Math.min(l,c);if(d<=u||!this.trimDOMToOverlap(s.gutter,u,d)||!this.trimDOMToOverlap(s.content,u,d))return!1;let{length:f}=s.content.children;const m=(v,b)=>{if(!(b<=0))return this.fileRenderer.renderFile(r,{startingLine:v,totalLines:b,bufferBefore:0,bufferAfter:0})},g=ad?m(d,p):void 0;return y===void 0&&c>d?!1:(this.cleanupErrorWrapper(),g!=null&&(s.gutter.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(g.gutterAST)),s.content.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(g.contentAST)),f+=g.rowCount),y!=null&&(s.gutter.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(y.gutterAST)),s.content.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(y.contentAST)),f+=y.rowCount),this.lastRowCount!==f&&(s.gutter.style.setProperty("grid-row",`span ${f}`),s.content.style.setProperty("grid-row",`span ${f}`),this.lastRowCount=f),!0)}getColumns(t){const n=t.children[0],r=t.children[1];if(!(!(n instanceof HTMLElement)||!(r instanceof HTMLElement)||n.dataset.gutter==null||r.dataset.content==null))return{gutter:n,content:r}}trimDOMToOverlap(t,n,r){const i=this.getDOMBoundaryIndices(t,[n,r]),s=i.get(n)??t.children.length,o=i.get(r)??t.children.length;if(s>o)return!1;for(let a=t.children.length-1;a>=o;a-=1)t.children[a]?.remove();for(let a=s-1;a>=0;a-=1)t.children[a]?.remove();return!0}getDOMBoundaryIndices(t,n){const r=[...new Set(n)].sort((l,c)=>l-c),i=new Map;if(r.length===0)return i;let s=0,o=r[s];const{children:a}=t;for(let l=0;l=o;)i.set(o,l),s+=1,o=r[s];if(s>=r.length)break}}for(const l of r)i.has(l)||i.set(l,a.length);return i}getLineIndexFromDOMNode(t){const n=t.dataset.lineIndex;if(n==null)return;const r=Number(n);return Number.isNaN(r)?void 0:r}applyBuffers(t,n){if(n==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}n.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",t.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${n.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),n.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",t.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${n.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyHeaderToDOM(t,n){const{file:r}=this;if(r==null)return;this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const i=this.cachedHeaderHTML??Ul(t);if(this.cachedHeaderHTML=i,i!==this.lastRenderedHeaderHTML){const l=document.createElement("div");l.innerHTML=i;const c=l.firstElementChild;if(!(c instanceof HTMLElement))return;this.headerElement!=null?n.shadowRoot?.replaceChild(c,this.headerElement):n.shadowRoot?.prepend(c),this.headerElement=c,this.lastRenderedHeaderHTML=i}if(this.isContainerManaged)return;const{renderHeaderPrefix:s,renderCustomHeader:o,renderHeaderMetadata:a}=this.options;if(o!=null){const l=o(r)??void 0;this.headerCustom=this.upsertHeaderSlotElement(n,this.headerCustom,v9,l),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0}else{const l=s?.(r)??void 0,c=a?.(r)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(n,this.headerPrefix,g9,l),this.headerMetadata=this.upsertHeaderSlotElement(n,this.headerMetadata,p9,c),this.headerCustom?.remove(),this.headerCustom=void 0}}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(t,n,r,i){if(i==null){n?.remove();return}const s=n??this.createHeaderSlotElement(r);return n==null&&t.appendChild(s),this.replaceHeaderSlotContent(s,i),s}replaceHeaderSlotContent(t,n){t.replaceChildren(),n instanceof Element?t.appendChild(n):t.innerText=`${n}`}createHeaderSlotElement(t){const n=document.createElement("div");return n.slot=t,n}getOrCreateFileContainerNode(t,n){const{fileContainer:r}=this,i=t??r??document.createElement(bw),s=r!==i;return s&&this.emitPostRender(!0),this.fileContainer=i,r!=null&&s&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),n!=null&&this.fileContainer.parentNode!==n&&n.appendChild(this.fileContainer),s&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(t){const{shadowRoot:n}=t;if(n!=null)for(const r of n.children)r instanceof SVGElement?this.spriteSVG??=r:Tw(r)&&r.hasAttribute(av)?(this.themeCSSStyle??=r,this.hasAdoptedThemeCSS=!0):Tw(r)&&r.hasAttribute(lv)&&(this.unsafeCSSStyle??=r,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});if(this.spriteSVG==null){const r=document.createElement("div");r.innerHTML=yq;const i=r.firstChild;i instanceof SVGElement&&(this.spriteSVG=i)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==n&&n.appendChild(this.spriteSVG)}getOrCreatePreNode(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.code=void 0,n.appendChild(this.pre)):this.pre.parentNode!==n&&(t.shadowRoot?.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodeFromPre(t){this.code=void 0;for(const n of Array.from(t.children))if(n instanceof HTMLElement&&n.hasAttribute("data-code")){this.code=n;return}}applyPreNodeAttributes(t,{totalLines:n}){const{overflow:r="scroll",disableLineNumbers:i=!1}=this.options,s={type:"file",split:!1,overflow:r,disableLineNumbers:i,diffIndicators:"none",disableBackground:!0,totalLines:n};bq(s,this.appliedPreAttributes)||(Dq(t,s),this.appliedPreAttributes=s)}applyErrorToDOM(t,n){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const r=n.shadowRoot??n.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",r.appendChild(this.errorWrapper);const i=document.createElement("div");i.dataset.errorMessage="",i.innerText=t.message,this.errorWrapper.appendChild(i);const s=document.createElement("pre");s.dataset.errorStack="",s.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(s)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function qye(e,t,n=!1){return!n&&e==null&&t!=null}function Uye(e,t,n=!1){return e==null&&t!=null&&!n}function r5(e){return{...w4,...e}}function zl(e,t){const n=Wye(e,t);return t?n:e.diffHeaderHeight+n}function Wye(e,t){return e.paddingTop??(t?e.spacing:0)}function Ew(e){return e.paddingBottom??e.spacing}function Kye(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}const Gye=5e3;let Zye=-1;function Yye(e,t){return(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||e.unsafeCSS!==t.unsafeCSS}var Xye=class extends Mq{__id=`virtualized-file:${++Zye}`;top;height=0;cache={heights:new Map,checkpoints:[]};isVisible=!1;isSetup=!1;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n=w4,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=n}setMetrics(e,t=!1){!t&&xw(this.metrics,e)||(this.metrics=e,this.resetLayoutCache())}getLineHeight(e,t=!1){const n=this.cache.heights.get(e);if(n!=null)return n;const r=t?2:1;return this.metrics.lineHeight*r}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,n=!y9(t,e),r=Yye(t,e);super.setOptions(e),r&&this.resetLayoutCache(!0),n&&(this.forceRenderOverride=!0),n&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache(e=!1){this.layoutDirty=!0,this.cache.heights.size>0&&this.cache.heights.clear(),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.renderRange!=null&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;if(this.fileContainer==null||this.file==null)return this.height!==0&&(e=!0),this.height=0,e;const{overflow:t="scroll"}=this.options;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled()||this.code==null)return e;const n=this.code.children[1];if(!(n instanceof HTMLElement))return e;for(const r of n.children){if(!(r instanceof HTMLElement))continue;const i=r.dataset.lineIndex;if(i==null)continue;const s=Number(i);let o=r.getBoundingClientRect().height,a=!1;r.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in r.nextElementSibling.dataset||"noNewline"in r.nextElementSibling.dataset)&&("noNewline"in r.nextElementSibling.dataset&&(a=!0),o+=r.nextElementSibling.getBoundingClientRect().height);const l=this.getLineHeight(s,a);o!==l&&(e=!0,o===this.metrics.lineHeight*(a?2:1)?this.cache.heights.delete(s):this.cache.heights.set(s,o))}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null||this.file==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render({file:this.file}));prepareCodeViewItem(e,t,n){let r=n?.resetFileLayoutCache===!0;n?.metrics!=null&&(this.metrics=n.metrics,r=!0);const{collapsed:i=!1}=this.options;return this.currentCollapsed!==i&&(this.currentCollapsed=i,r=!0),r&&this.resetLayoutCache(),this.file!==e&&(this.layoutDirty=!0),this.file=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e){if(this.file==null)return;const{disableFileHeader:t=!1,collapsed:n=!1}=this.options,r=_M(this.getOrCreateLineCache(this.file));let i=zl(this.metrics,t);if(n||r<0)return{top:i,height:0};const s=Math.min(Math.max(e-1,0),r),{overflow:o="scroll"}=this.options,{lineHeight:a}=this.metrics;if(o==="scroll"&&this.lineAnnotations.length===0)return{top:i+s*a,height:a};const l=this.getLayoutCheckpointBeforeLineIndex(s);i=l?.top??i;for(let c=l?.lineIndex??0;ca?void 0:{lineNumber:d+1,top:s+d*c}}let l=s+this.renderRange.bufferBefore;for(let c=o;c<=a;c++){if(l>=e)return{lineNumber:c+1,top:l};l+=this.getLineHeight(c)}}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.file==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.file,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:n,bufferAfter:r,totalLines:i}=t;let s=0;if(i===0){const o=e??this.virtualizer.getWindowSpecs();this.top{this.addLayoutCheckpoint(u,this.height),this.height+=this.getLineHeight(u,!1)}}),a.length>0&&(this.height+=c),this.fileContainer!=null&&t&&!n){const u=this.fileContainer.getBoundingClientRect();u.height!==this.height?console.log("VirtualizedFile.computeApproximateSize: computed height doesnt match",{name:this.file.name,elementHeight:u.height,computedHeight:this.height}):console.log("VirtualizedFile.computeApproximateSize: computed height IS CORRECT")}this.layoutDirty=!1}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.file==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}render({fileContainer:e,file:t,forceRender:n=!1,...r}){const{forceRenderOverride:i,isSetup:s}=this;if(this.forceRenderOverride=void 0,this.file??=t,e=this.getOrCreateFileContainerNode(e),this.file==null)return console.error("VirtualizedFile.render: attempting to virtually render when we dont have file"),!1;if(s)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();const c=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(c==null)throw new Error("VirtualizedFile.render: simple virtualizer is not available");c.connect(e,this),this.isVisible=c.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);const o=this.virtualizer.getWindowSpecs(),a=this.top??0,l=this.computeRenderRangeFromWindow(this.file,a,o);return super.render({file:this.file,fileContainer:e,renderRange:l,forceRender:i??n,...r})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}addLayoutCheckpoint(e,t){e%Gye===0&&this.cache.checkpoints.push({lineIndex:e,top:t})}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){const i=t+n>>1,s=this.cache.checkpoints[i];if(s==null)throw new Error("VirtualizedFile: invalid checkpoint index");s.lineIndex<=e?(r=s,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){const s=n+r>>1,o=this.cache.checkpoints[s];if(o==null)throw new Error("VirtualizedFile: invalid checkpoint index");o.top<=e?(i=s,n=s+1):r=s-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let s=i;s>=0;s--){const o=this.cache.checkpoints[s];if(o==null)throw new Error("VirtualizedFile: invalid checkpoint index");if(o.lineIndex%t===0)return o}}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){const{disableFileHeader:i=!1,overflow:s="scroll"}=this.options,{hunkLineCount:o,lineHeight:a}=this.metrics,l=this.getOrCreateLineCache(e),c=l.length,u=this.height,d=zl(this.metrics,i),f=c>0?Ew(this.metrics):0;if(tr)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:u-d-f};if(c<=o)return{startingLine:0,totalLines:o,bufferBefore:0,bufferAfter:0};const m=Math.ceil(Math.max(r-n,0)/a),g=Math.ceil(m/o)*o+o*2,p=g/o,y=(n+r)/2;if(s==="scroll"&&this.lineAnnotations.length===0){const P=Math.floor((y-(t+d))/a),A=Math.floor(P/o)-Math.floor(p/2),N=Math.ceil(c/o),K=Math.max(0,Math.min(A,N))*o,q=A<0?g+A*o:g,X=K*a,re=Math.min(q,c-K);return{startingLine:K,totalLines:q,bufferBefore:X,bufferAfter:Math.max(0,(c-K-re)*a)}}const v=p,b=[],w=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-g*a*2),o);let x=t+(w?.top??d),k=w?.lineIndex??0,_,E,C;if(Cw({lines:l,startingLine:w?.lineIndex??0,callback:({lineIndex:P})=>{const A=k%o===0,N=Math.floor(k/o);if(A&&(b[N]=x-(t+d),C!=null)){if(C<=0)return!0;C--}const K=this.getLineHeight(P,!1);return x>n-K&&xy&&(E??=N),C==null&&x>=r&&A&&(C=v),k++,x+=K,!1}}),_==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:u-d-f};E??=_;const L=Math.round(E-p/2),O=Math.max(0,Math.ceil(c/o)-p),V=Math.max(0,Math.min(L,O)),F=V*o,D=L<0?g+L*o:g,T=b[V]??0,M=V+D/o;return{startingLine:F,totalLines:D,bufferBefore:T,bufferAfter:M0&&(m[m.length-1]===` `||m[m.length-1]==="\r"||m[m.length-1]===`\r `||m[m.length-1]==="");)m.pop();const{additionStart:x,deletionStart:k}=p;u=c?u:k-1,d=c?d:x-1;const _={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:x,additionLines:y,deletionCount:p.deletionCount,deletionStart:k,deletionLines:v,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:IM(p.hunkContext),hunkSpecs:Bi(g),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let E=0,C=0;for(let L=1;L=_.additionCount&&C>=_.deletionCount&&!O.startsWith("\\")){if(s&&cbe(O)&&!ube(O))throw Error("parsePatchContent: hunk has more lines than expected");break}const V=O[0];if(V!=="+"&&V!=="-"&&V!==" "&&V!=="\\"){if(s)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${V}", full line: "${O}"`),console.error("processFile: invalid rawLine:",O);continue}const F=hbe(V);if(F==="addition"){if(s&&E>=_.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const D=i5(O);(b==null||b.type!=="change")&&(b=s5("change",u,d),_.hunkContent.push(b)),d++,E++,c&&l.additionLines.push(D),b.additions++,y++,w="addition"}else if(F==="deletion"){if(s&&C>=_.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const D=i5(O);(b==null||b.type!=="change")&&(b=s5("change",u,d),_.hunkContent.push(b)),u++,C++,c&&l.deletionLines.push(D),b.deletions++,v++,w="deletion"}else if(F==="context"){if(s&&(C>=_.deletionCount||E>=_.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const D=i5(O);(b==null||b.type!=="context")&&(b=s5("context",u,d),_.hunkContent.push(b)),d++,u++,E++,C++,c&&(l.deletionLines.push(D),l.additionLines.push(D)),b.lines++,w="context"}else if(F==="metadata"&&b!=null){if(b.type==="context"?(_.noEOFCRAdditions=!0,_.noEOFCRDeletions=!0):w==="deletion"?_.noEOFCRDeletions=!0:w==="addition"&&(_.noEOFCRAdditions=!0),c&&(w==="addition"||w==="context")){const D=l.additionLines.length-1;D>=0&&(l.additionLines[D]=zf(l.additionLines[D]))}if(c&&(w==="deletion"||w==="context")){const D=l.deletionLines.length-1;D>=0&&(l.deletionLines[D]=zf(l.deletionLines[D]))}}}if(s&&(E!==_.additionCount||C!==_.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");_.additionLines=y,_.deletionLines=v,_.collapsedBefore=Math.max(_.additionStart-1-o,0),l.hunks.push(_),o=_.additionStart+_.additionCount-1;for(const L of _.hunkContent)L.type==="context"?(_.splitLineCount+=L.lines,_.unifiedLineCount+=L.lines):(_.splitLineCount+=Math.max(L.additions,L.deletions),_.unifiedLineCount+=L.deletions+L.additions);_.splitLineStart=l.splitLineCount+_.collapsedBefore,_.unifiedLineStart=l.unifiedLineCount+_.collapsedBefore,l.splitLineCount+=_.collapsedBefore+_.splitLineCount,l.unifiedLineCount+=_.collapsedBefore+_.unifiedLineCount}if(l!=null){if(s&&c&&!n&&l.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(l.hunks.length>0&&!c&&l.additionLines.length>0&&l.deletionLines.length>0){const f=l.hunks[l.hunks.length-1],m=f.additionStart+f.additionCount-1,g=l.additionLines.length,p=Math.max(g-m,0);l.splitLineCount+=p,l.unifiedLineCount+=p}return n||(l.prevName!=null&&l.name!==l.prevName?l.hunks.length>0?l.type="rename-changed":l.type="rename-pure":(r==null||r.contents==="")&&i!=null&&i.contents!==""?l.type="new":r!=null&&r.contents!==""&&(i==null||i.contents==="")&&(l.type="deleted")),l.type!=="rename-pure"&&l.type!=="rename-changed"&&(l.prevName=void 0),l}}function ibe(e,t,n=!1){const r=[],i=sbe(e)?e.split(b1e):[e];for(const s of i)try{r.push(tbe(s,t!=null?`${t}-${r.length}`:void 0,n))}catch(o){if(n)throw o;console.error(o)}return r}function sbe(e){return e.startsWith("From ")||e.includes(` From `)}function CM(e){const t=Oq(e);for(let n=0;nn&&t.push(e.slice(n,r)),n=r,o=!0,r=m7(e,a);continue}if(o&&e.startsWith("@@ -",r)){const c=Fq(e.slice(r,a));c!=null&&(i=c.deletionCount,s=c.additionCount)}r=a;continue}const l=e[r];if(l==="\\"){r=a;continue}l===" "?(i=Math.max(i-1,0),s=Math.max(s-1,0)):l==="-"?i=Math.max(i-1,0):l==="+"&&(s=Math.max(s-1,0)),r=a}return t.push(e.slice(n)),t}function lbe(e){return Rq(e,0)}function Rq(e,t){const n=m7(e,t);return TM(e,t,"---")&&TM(e,n,"+++")}function TM(e,t,n){if(!e.startsWith(n,t))return!1;const r=e[t+n.length];if(r!==" "&&r!==" ")return!1;for(let i=t+n.length+1;i9)break;r=r*10+i}if(n!==t)return{value:r,endIndex:n}}function dbe(e){return e.endsWith(`\r `)?e.slice(0,-2):e.endsWith(` `)?e.slice(0,-1):e}function fbe(e){return e.startsWith("diff --git")||e.includes(` diff --git`)}function Nq(e,t){if(e.length===0)return[""];const n=` ${t}`,r=e.startsWith(t)?0:EM(e,n,0);if(r===-1)return[e];const i=[];r>0&&i.push(e.slice(0,r));let s=r;for(;;){const o=EM(e,n,s+1);if(o===-1)break;i.push(e.slice(s,o)),s=o}return i.push(e.slice(s)),i}function EM(e,t,n){const r=e.indexOf(t,n);return r===-1?-1:r+1}function IM(e){return e==null?e:Bi(e)}function hbe(e){return e===" "?"context":e==="\\"?"metadata":e==="+"?"addition":"deletion"}function i5(e){const t=e.slice(1);return Bi(t===""?` `:t)}function s5(e,t,n){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:n,deletionLineIndex:t}}let w9=class{diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);const s=this.castInput(t,r),o=this.castInput(n,r),a=this.removeEmpty(this.tokenize(s,r)),l=this.removeEmpty(this.tokenize(o,r));return this.diffWithOptionsObj(a,l,r,i)}diffWithOptionsObj(t,n,r,i){var s;const o=b=>{if(b=this.postProcess(b,r),i){setTimeout(function(){i(b)},0);return}else return b},a=n.length,l=t.length;let c=1,u=a+l;r.maxEditLength!=null&&(u=Math.min(u,r.maxEditLength));const d=(s=r.timeout)!==null&&s!==void 0?s:1/0,f=Date.now()+d,m=[{oldPos:-1,lastComponent:void 0}];let g=this.extractCommon(m[0],n,t,0,r);if(m[0].oldPos+1>=l&&g+1>=a)return o(this.buildValues(m[0].lastComponent,n,t));let p=-1/0,y=1/0;const v=()=>{for(let b=Math.max(p,-c);b<=Math.min(y,c);b+=2){let w;const x=m[b-1],k=m[b+1];x&&(m[b-1]=void 0);let _=!1;if(k){const C=k.oldPos-b;_=k&&0<=C&&C=l&&g+1>=a)return o(this.buildValues(w.lastComponent,n,t))||!0;m[b]=w,w.oldPos+1>=l&&(y=Math.min(y,b-1)),g+1>=a&&(p=Math.max(p,b+1))}c++};if(i)(function b(){setTimeout(function(){if(c>u||Date.now()>f)return i(void 0);v()||b()},0)})();else for(;c<=u&&Date.now()<=f;){const b=v();if(b)return b}}addToPath(t,n,r,i,s){const o=t.lastComponent;return o&&!s.oneChangePerToken&&o.added===n&&o.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:o.count+1,added:n,removed:r,previousComponent:o.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:o}}}extractCommon(t,n,r,i,s){const o=n.length,a=r.length;let l=t.oldPos,c=l-i,u=0;for(;c+1f.length?g:f}),u.value=this.join(d)}else u.value=this.join(n.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}return i}};class mbe extends w9{}const gbe=new mbe;function pbe(e,t,n){return gbe.diff(e,t,n)}const DM="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class vbe extends w9{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${DM}]+|[^\\S\\n\\r]+|[^${DM}]`,"ug");return t.match(n)||[]}}const ybe=new vbe;function bbe(e,t,n){return ybe.diff(e,t,n)}class wbe extends w9{constructor(){super(...arguments),this.tokenize=kbe}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(` `))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(` `))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(` `)&&(t=t.slice(0,-1)),n.endsWith(` `)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const xbe=new wbe;function AM(e,t,n){return xbe.diff(e,t,n)}function kbe(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,` `));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let i=0;i"u"&&(a.context=4);const l=a.context;if(a.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(a.callback){const{callback:u}=a;AM(n,r,Object.assign(Object.assign({},a),{callback:d=>{const f=c(d);u(f)}}))}else return c(AM(n,r,a));function c(u){if(!u)return;u.push({value:"",lines:[]});function d(b){return b.map(function(w){return" "+w})}const f=[];let m=0,g=0,p=[],y=1,v=1;for(let b=0;b0?d(k.lines.slice(-l)):[],m-=p.length,g-=p.length)}for(const k of x)p.push((w.added?"+":"-")+k);w.added?v+=x.length:y+=x.length}else{if(m)if(x.length<=l*2&&b1&&!t.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(r=>g7(r,t)).join(` `)}const n=[];t.includeIndex&&e.oldFileName==e.newFileName&&n.push("Index: "+e.oldFileName),t.includeUnderline&&n.push("==================================================================="),t.includeFileHeaders&&(n.push("--- "+e.oldFileName+(typeof e.oldHeader>"u"?"":" "+e.oldHeader)),n.push("+++ "+e.newFileName+(typeof e.newHeader>"u"?"":" "+e.newHeader)));for(let r=0;r{a(l?g7(l,o.headerOptions):void 0)}}))}else{const a=LM(e,t,n,r,i,s,o);return a?g7(a,o?.headerOptions):void 0}}function Cbe(e){const t=e.endsWith(` `),n=e.split(` `).map(r=>r+` `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function mv(e,t,n,r=!1){const i=rbe(_be(e.name,t.name,e.contents,t.contents,e.header,t.header,n),{cacheKey:(()=>{if(e.cacheKey!=null&&t.cacheKey!=null)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:r});if(i==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return t.lang!=null&&(i.lang=t.lang),i}var Tbe=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(e,t,n){if(t==null||n==null)for(const r of e.children??[])r instanceof HTMLElement&&("deletions"in r.dataset?t=r:"additions"in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener("scroll",this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function Ac(e,t){return Eg(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function By(e){return Hn({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function qy(e){return Hn({tagName:"div",children:[Hn({tagName:"span",children:[Wl("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function o5(e){return Hn({tagName:"div",children:[kw({name:e==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{role:"button","data-expand-button":"","data-expand-both":e==="both"?"":void 0,"data-expand-up":e==="up"?"":void 0,"data-expand-down":e==="down"?"":void 0}})}function Ph({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:s,isLastHunk:o}){let a=0;const l=[];if(e==="metadata"&&t!=null&&l.push(Hn({tagName:"div",children:[Wl(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const c=[];n!=null&&(r?(s||(c.push(o5("up")),a++),o||(c.push(o5("down")),a++)):(c.push(o5(!s&&!o?"both":s?"down":"up")),a++)),c.push(Hn({tagName:"div",children:[Hn({tagName:"span",children:[Wl(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),r&&n!=null&&c.push(Hn({tagName:"div",children:[Wl("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),l.push(Hn({tagName:"div",children:c,properties:{"data-separator-wrapper":"","data-separator-multi-button":a>1?"":void 0}}))}return e==="custom"&&i!=null&&l.push(Hn({tagName:"slot",properties:{name:i}})),Hn({tagName:"div",children:l,properties:{"data-separator":l.length===0?"simple":e,"data-expand-index":n,"data-separator-first":s?"":void 0,"data-separator-last":o?"":void 0}})}function Ebe(e,t){return`hunk-separator-${e}-${t}`}function Ibe(e){const t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function Dbe(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}function MM({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":""},alwaysWrap:!0}}function Uy({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){const s=t[t.length-1];if(s==null||i||!n){t.push([r?0:1,e.value]);return}const o=s[0]===0;if(r===o||r&&e.value.length===1&&!o){s[1]+=e.value;return}t.push([r?0:1,e.value])}function gv({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:i}){const s=Math.max(t,0);if(s===0||e)return{fromStart:0,fromEnd:0,rangeSize:s,collapsedLines:s,renderAll:!1};if(n===!0||s<=i)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const o=n?.get(r),a=Math.min(Math.max(o?.fromStart??0,0),s),l=Math.min(Math.max(o?.fromEnd??0,0),s),c=a+l,u=c>=s;return{fromStart:u?s:a,fromEnd:u?0:l,rangeSize:s,collapsedLines:Math.max(s-c,0),renderAll:u}}function Vq({fileDiff:e,errorPrefix:t}){const n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const r=e.additionLines.length-(n.additionLineIndex+n.additionCount),i=e.deletionLines.length-(n.deletionLineIndex+n.deletionCount);if(r<=0&&i<=0)return 0;if(r!==i)throw new Error(`${t}: trailing context mismatch (additions=${r}, deletions=${i}) for ${e.name}`);return Math.min(r,i)}function pv({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:i}){if(t!==e.hunks.length-1)return;const s=Vq({fileDiff:e,errorPrefix:i});if(s<=0)return;if(n===!0||s<=r)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const o=n?.get(e.hunks.length),a=Math.min(Math.max(o?.fromStart??0,0),s);return{fromStart:a,fromEnd:0,rangeSize:s,collapsedLines:s-a,renderAll:a>=s}}function zq({type:e,metrics:t}){return t.hunkSeparatorHeight??Kye(e)}function Hq({type:e,metrics:t}){return e==="simple"||e==="metadata"||e==="line-info-basic"?0:t.spacing}function Abe({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case"simple":return t>0;case"metadata":return n!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function Lbe(e){return e!=="simple"&&e!=="metadata"}function W0({type:e,metrics:t,hunkIndex:n,hunkSpecs:r}){if(!Abe({type:e,hunkIndex:n,hunkSpecs:r}))return;const i=zq({type:e,metrics:t}),s=Hq({type:e,metrics:t}),o=n>0?s:0,a=s;return{height:i,gapBefore:o,gapAfter:a,totalHeight:o+i+a}}function K0({type:e,metrics:t}){if(!Lbe(e))return;const n=zq({type:e,metrics:t}),r=Hq({type:e,metrics:t});return{height:n,gapBefore:r,gapAfter:0,totalHeight:r+n}}function Ep({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:s=Po,callback:o}){const a=Mbe({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:s}),l={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:a.splitCount,unifiedCount:a.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!l.isWindowedHighlight)return!1;const c=l.unifiedCount>=n+r,u=l.splitCount>=n+r;return t==="unified"?c:(t==="split"||c)&&u},shouldSkip(c,u){if(!l.isWindowedHighlight)return!1;const d=l.unifiedCount+c=n-c&&l.unifiedCount=n-c&&l.splitCount0?0:t==="unified"?C===u.unifiedLineStart+u.unifiedLineCount-1?f.collapsedLines:0:L===u.splitLineStart+u.splitLineCount-1?f.collapsedLines:0},y=function(){return p?0:(p=!0,d.collapsedLines)};const u=e.hunks[c];if(u==null)throw new Error("iterateOverDiff: invalid hunk index");if(l.shouldBreak())break;const d=gv({isPartial:e.isPartial,rangeSize:u.collapsedBefore,expandedHunks:i,hunkIndex:c,collapsedContextThreshold:s}),f=c===l.finalHunkIndex?pv({fileDiff:e,hunkIndex:c,expandedHunks:i,collapsedContextThreshold:s,errorPrefix:"iterateOverDiff"}):void 0,m=d.fromStart+d.fromEnd;let p=d.collapsedLines===0;if(l.shouldSkip(m,m))l.incrementCounts(m,m),y();else{let C=u.unifiedLineStart-d.rangeSize,L=u.splitLineStart-d.rangeSize,O=u.deletionLineIndex-d.rangeSize,V=u.additionLineIndex-d.rangeSize,F=u.deletionStart-d.rangeSize,D=u.additionStart-d.rangeSize;if(Wy(l,d.fromStart,t,T=>l.emit({hunkIndex:c,hunk:u,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:F+T,lineIndex:O+T,noEOFCR:!1,unifiedLineIndex:C+T,splitLineIndex:L+T},additionLine:{unifiedLineIndex:C+T,splitLineIndex:L+T,lineIndex:V+T,lineNumber:D+T,noEOFCR:!1}}))||(C=u.unifiedLineStart-d.fromEnd,L=u.splitLineStart-d.fromEnd,O=u.deletionLineIndex-d.fromEnd,V=u.additionLineIndex-d.fromEnd,F=u.deletionStart-d.fromEnd,D=u.additionStart-d.fromEnd,Wy(l,d.fromEnd,t,T=>l.emit({hunkIndex:c,hunk:u,collapsedBefore:y(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:F+T,lineIndex:O+T,noEOFCR:!1,unifiedLineIndex:C+T,splitLineIndex:L+T},additionLine:{unifiedLineIndex:C+T,splitLineIndex:L+T,lineIndex:V+T,lineNumber:D+T,noEOFCR:!1}}),()=>{y()})))break e}let v=u.unifiedLineStart,b=u.splitLineStart,w=u.deletionLineIndex,x=u.additionLineIndex,k=u.deletionStart,_=u.additionStart;const E=u.hunkContent.at(-1);for(const C of u.hunkContent){if(l.shouldBreak())break e;const L=C===E;if(C.type==="context"){if(l.shouldSkip(C.lines,C.lines))l.incrementCounts(C.lines,C.lines),y();else if(Wy(l,C.lines,t,O=>{const V=L&&O===C.lines-1,F=v+O,D=b+O;return l.emit({hunkIndex:c,hunk:u,collapsedBefore:y(),collapsedAfter:g(F,D),type:"context",deletionLine:{lineNumber:k+O,lineIndex:w+O,noEOFCR:V&&u.noEOFCRDeletions,unifiedLineIndex:F,splitLineIndex:D},additionLine:{unifiedLineIndex:F,splitLineIndex:D,lineIndex:x+O,lineNumber:_+O,noEOFCR:V&&u.noEOFCRAdditions}})},()=>{y()}))break e;v+=C.lines,b+=C.lines,w+=C.lines,x+=C.lines,k+=C.lines,_+=C.lines}else{const O=Math.max(C.deletions,C.additions),V=C.deletions+C.additions;if(!l.shouldSkip(V,O)){const F=Obe(l,C,t);(F[0]?.[0]??0)>0&&y();for(const[D,T]of F)for(let M=D;M{const D=F===V-1;return l.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:D?C:0,type:"context-expanded",deletionLine:{lineNumber:k+F,lineIndex:w+F,noEOFCR:!1,unifiedLineIndex:v+F,splitLineIndex:b+F},additionLine:{unifiedLineIndex:v+F,splitLineIndex:b+F,lineIndex:x+F,lineNumber:_+F,noEOFCR:!1}})},void 0,()=>l.shouldBreak()))break e}}}function Mbe({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:i}){if(n<=0||t==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const s=$be({diff:e,expandedHunks:r,collapsedContextThreshold:i});let o=0,a=e.hunks.length-1,l=e.hunks.length;for(;o<=a;){const u=o+a>>1,d=s[u+1];if(d==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(t==="unified"?d.unifiedCount:d.splitCount)>n?(l=u,a=u-1):o=u+1}if(l>=e.hunks.length){const u=s[e.hunks.length];if(u==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:u.splitCount,unifiedCount:u.unifiedCount}}const c=s[l];if(c==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:l,splitCount:c.splitCount,unifiedCount:c.unifiedCount}}function $be({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,i=0;const s=e.hunks.length-1,o=[{splitCount:0,unifiedCount:0}];for(let a=0;al&&r.push([l,c])}if(n!=="split"&&i(e.unifiedCount),n!=="unified"&&i(e.splitCount),r.length===0)return[0,0];let s=r[0][0],o=r[0][1];for(let a=1;a0&&(e.incrementCounts(o,o),i?.());let l=o;for(;l=a){e.incrementCounts(t-l,t-l);break}if(e.isInWindow(0,0)){if(r(l)===!0)return!0}else e.incrementCounts(1,1);l++}return!1}function Obe(e,t,n){if(!e.isWindowedHighlight)return[[0,n==="unified"?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];const r=n!=="split",i=n!=="unified",s=n==="unified"?"unified":"split",o=[];function a(d,f){if(d+f<=e.viewportStart||d>=e.viewportEnd)return;const m=Math.max(0,e.viewportStart-d),g=Math.min(f,e.viewportEnd-d);return g>m?[m,g]:void 0}function l(d,f){return s==="split"?d:f==="additions"?[d[0]+t.deletions,d[1]+t.deletions]:d}function c(d,f){if(d==null)return;const[m,g]=l(d,f);g>m&&o.push([m,g])}if(r&&(c(a(e.unifiedCount,t.deletions),"deletions"),c(a(e.unifiedCount+t.deletions,t.additions),"additions")),i&&(c(a(e.splitCount,t.deletions),"deletions"),c(a(e.splitCount,t.additions),"additions")),o.length===0)return o;o.sort((d,f)=>d[0]-f[0]);const u=[o[0]];for(const[d,f]of o.slice(1)){const m=u[u.length-1];d<=m[1]?m[1]=Math.max(m[1],f):u.push([d,f])}return u}function Rbe({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:s,unifiedLineIndex:o,splitLineIndex:a,additionLineIndex:l,deletionLineIndex:c,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:m,unifiedCount:g,splitCount:p}){const y=s=f.deletions?o+s:void 0:s=f.deletions?l+(s-f.deletions):void 0:s=f.deletions?u+(s-f.deletions):void 0:s0||s<1/0,c=typeof n.theme=="string"?t.getTheme(n.theme).type:void 0,u=mq({theme:n.theme,highlighter:t}),d=r&&!l&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":n.lineDiffType,f={deletionLines:[],additionLines:[]},{maxLineDiffLength:m}=n,g=!r&&!e.isPartial,p=r?o:void 0,y=new Map;function v(w){const x=g?0:w,k=y.get(x)??Vbe();return y.set(x,k),k}function b(w,x,k,_){if(l){let E=k.at(-1);(E==null||E.targetIndex+E.count!==x)&&(E={targetIndex:x,originalOffset:_.length,count:0},k.push(E)),E.count++}_.push(w)}Ep({diff:e,diffStyle:"both",startingLine:i,totalLines:s,expandedHunks:l?p:!0,collapsedContextThreshold:a,callback:({hunkIndex:w,additionLine:x,deletionLine:k,type:_})=>{const E=v(w),C=x!=null?x.splitLineIndex:k.splitLineIndex;_==="change"&&x!=null&&k!=null&&Nbe({additionLine:e.additionLines[x.lineIndex],deletionLine:e.deletionLines[k.lineIndex],deletionLineIndex:E.deletionContent.length,additionLineIndex:E.additionContent.length,deletionDecorations:E.deletionDecorations,additionDecorations:E.additionDecorations,lineDiffType:d,maxLineDiffLength:m}),k!=null&&(b(e.deletionLines[k.lineIndex],k.lineIndex,E.deletionSegments,E.deletionContent),E.deletionInfo.push({type:_==="change"?"change-deletion":_,lineNumber:k.lineNumber,altLineNumber:_==="change"?void 0:x.lineNumber??void 0,lineIndex:`${k.unifiedLineIndex},${C}`})),x!=null&&(b(e.additionLines[x.lineIndex],x.lineIndex,E.additionSegments,E.additionContent),E.additionInfo.push({type:_==="change"?"change-addition":_,lineNumber:x.lineNumber,altLineNumber:_==="change"?void 0:k.lineNumber??void 0,lineIndex:`${x.unifiedLineIndex},${C}`}))}});for(const w of y.values()){if(w.deletionContent.length===0&&w.additionContent.length===0)continue;const x={name:e.prevName??e.name,contents:w.deletionContent.value},k={name:e.name,contents:w.additionContent.value},{deletionLines:_,additionLines:E}=zbe({deletionFile:x,deletionInfo:w.deletionInfo,deletionDecorations:w.deletionDecorations,additionFile:k,additionInfo:w.additionInfo,additionDecorations:w.additionDecorations,highlighter:t,options:n,languageOverride:r?"text":e.lang});if(g){f.deletionLines=_,f.additionLines=E;continue}if(w.deletionSegments.length>0)for(const C of w.deletionSegments)for(let L=0;L0)for(const C of w.additionSegments)for(let L=0;La||t.length>a))return;const l=o==="char"?pbe(e,t):bbe(e,t),c=[],u=[],d=o==="word-alt",f=l.at(-1);for(const g of l){const p=g===f;!g.added&&!g.removed?(Uy({item:g,arr:c,enableJoin:d,isNeutral:!0,isLastItem:p}),Uy({item:g,arr:u,enableJoin:d,isNeutral:!0,isLastItem:p})):g.removed?Uy({item:g,arr:c,enableJoin:d,isLastItem:p}):Uy({item:g,arr:u,enableJoin:d,isLastItem:p})}let m=0;for(const g of c)g[0]===1&&i.push(MM({line:n,spanStart:m,spanLength:g[1].length})),m+=g[1].length;m=0;for(const g of u)g[0]===1&&s.push(MM({line:r,spanStart:m,spanLength:g[1].length})),m+=g[1].length}function Vbe(){return{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function zbe({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:s,additionDecorations:o,languageOverride:a,options:{theme:l=Ii,...c}}){const u=a??ao(e.name),d=a??ao(t.name),{state:f,transformers:m}=hq(c.useTokenTransformer),g=typeof l=="string"?{...c,lang:"text",theme:l,transformers:m,decorations:void 0,defaultColor:!1,cssVariablePrefix:Oo("token")}:{...c,lang:"text",themes:l,transformers:m,decorations:void 0,defaultColor:!1,cssVariablePrefix:Oo("token")};return{deletionLines:e.contents===""?[]:(g.lang=u,f.lineInfo=n,g.decorations=s,d7(i.codeToHast(zf(e.contents),g))),additionLines:t.contents===""?[]:(g.lang=d,g.decorations=o,f.lineInfo=r,d7(i.codeToHast(zf(t.contents),g)))}}function vv(e){const t=e.lang??ao(e.name),n=e.lang??(e.prevName!=null?ao(e.prevName):"text");return t==="text"&&n==="text"}let Hbe=-1;var jbe=class{__id=`diff-hunks-renderer:${++Hbe}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:Ii},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=Tp(e.theme??Ii)?aq():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}clearRenderCache(){this.renderCache=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){const r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t==="up"||t==="both")&&(r.fromStart+=n),(t==="down"||t==="both")&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??T1e}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(const t of e){const n=(()=>{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),r=n[t.lineNumber]??[];n[t.lineNumber]=r,r.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return t!=="change"?{gutterLineType:t}:{gutterLineType:e==="deletions"?"change-deletion":"change-addition"}}createAnnotationElement(e){return lq(e)}getOptionsWithDefaults(){const{diffIndicators:e="bars",diffStyle:t="split",disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:s=!1,collapsed:o=!1,expandUnchanged:a=!1,collapsedContextThreshold:l=Po,expansionLineCount:c=100,hunkSeparators:u="line-info",lineDiffType:d="word-alt",maxLineDiffLength:f=1e3,overflow:m="scroll",stickyHeader:g=!1,theme:p=Ii,headerRenderMode:y="default",tokenizeMaxLineLength:v=1e3,tokenizeMaxLength:b=cv,useTokenTransformer:w=!1,useCSSClasses:x=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:s,collapsed:o,expandUnchanged:a,collapsedContextThreshold:l,expansionLineCount:c,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:m,stickyHeader:g,theme:this.workerManager?.getDiffRenderOptions().theme??p,headerRenderMode:y,tokenizeMaxLineLength:v,tokenizeMaxLength:b,useTokenTransformer:w,useCSSClasses:x}}async initializeHighlighter(){return this.highlighter=await Ym(dq(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e),n=l5(e,this.getTokenizeMaxLength());let r=this.workerManager?.getDiffResultCache(e);r!=null&&!Ac(t,r.options)&&(r=void 0),this.renderCache??={diff:e,highlighted:!n&&!vv(e),options:t,result:n?void 0:r?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter==null&&(this.computedLang=e.lang??ao(e.name),this.initializeHighlighter())}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:r,tokenizeMaxLineLength:i,lineDiffType:s,maxLineDiffLength:o}=this.getOptionsWithDefaults();return{theme:r,useTokenTransformer:vq(this.options),tokenizeMaxLineLength:i,lineDiffType:s,maxLineDiffLength:o}})();this.getOptionsWithDefaults();const{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!pm(e,n.diff)||!Ac(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=ww){if(e==null)return;const{expandUnchanged:n=!1,collapsedContextThreshold:r}=this.getOptionsWithDefaults();let{options:i,forceHighlight:s}=this.getRenderOptions(e);const o=this.getMatchingWorkerResultCache(e,i);o!=null&&!this.hasHighlightedRenderCache(e,i)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...o},s=!1),this.renderCache??={diff:e,highlighted:!1,options:i,result:void 0,renderRange:void 0};const a=e.additionLines.length>0||e.deletionLines.length>0,l=!a||vv(e)||l5(e,this.getTokenizeMaxLength()),c=!pm(e,this.renderCache.diff),u=!x4(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(l||this.renderCache.result==null||!this.renderCache.highlighted&&(c||u))&&(this.renderCache.diff=e,this.renderCache.options=i,this.renderCache.highlighted=!1,(this.renderCache.result==null||c||u||s)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,Dbe(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!l&&a&&(!this.renderCache.highlighted||s)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??ao(e.name);const d=this.highlighter!=null&&Tp(i.theme),f=this.highlighter!=null&&_w(this.computedLang),m=!l&&f;if(this.highlighter!=null&&d&&(s||l||!this.renderCache.highlighted&&m||this.renderCache.result==null)){const{result:g,options:p}=this.renderDiffWithHighlighter(e,this.highlighter,l||!f);this.renderCache={diff:e,options:p,highlighted:m,result:g,renderRange:void 0}}(!d||!l&&!f)&&this.asyncHighlight(e).then(({result:g,options:p})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,g,p,!l)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=ww){const{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){const{diffIndicators:r,disableBackground:i,disableLineNumbers:s,overflow:o}=this.getOptionsWithDefaults();return uq({type:"diff",diffIndicators:r,disableBackground:i,disableLineNumbers:s,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){const t=l5(e,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??ao(e.name);const n=this.highlighter!=null&&Tp(this.options.theme??Ii),r=t||this.highlighter!=null&&_w(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){const{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults();return{result:jq(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i}),options:r}}onHighlightSuccess(e,t,n,r=!0){if(this.renderCache==null)return;const i=!this.renderCache.highlighted||!Ac(this.renderCache.options,n)||!pm(this.renderCache.diff,e);this.renderCache={diff:e,options:n,highlighted:r,result:t,renderRange:void 0},i&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const n=this.workerManager?.getDiffResultCache(e);if(!(n==null||!Ac(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&pm(e,n.diff)&&Ac(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??cv}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){const{diffStyle:s,disableFileHeader:o,expandUnchanged:a,expansionLineCount:l,collapsedContextThreshold:c,hunkSeparators:u}=this.getOptionsWithDefaults();this.diff=e;const d=s==="unified";let f=[],m=[],g=[];const p=[],{additionLines:y,deletionLines:v}=n,b={rowCount:0,hunkSeparators:u,additionsContentAST:f,deletionsContentAST:m,unifiedContentAST:g,unifiedGutterAST:gm(),deletionsGutterAST:gm(),additionsGutterAST:gm(),expansionLineCount:l,hunkData:p,incrementRowCount(D=1){b.rowCount+=D},pushToGutter(D,T){switch(D){case"unified":b.unifiedGutterAST.children.push(T);break;case"deletions":b.deletionsGutterAST.children.push(T);break;case"additions":b.additionsGutterAST.children.push(T);break}}},w=Vq({fileDiff:e,errorPrefix:"DiffHunksRenderer.processDiffResult"}),x={size:0,side:void 0,increment(){this.size+=1},flush(){if(s!=="unified"){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side==="additions"?(b.pushToGutter("additions",Sa(void 0,"buffer",this.size)),f?.push(By(this.size))):(b.pushToGutter("deletions",Sa(void 0,"buffer",this.size)),m?.push(By(this.size))),this.size=0,this.side=void 0}}},k=(D,T,M,P,A)=>{b.pushToGutter(D,WB(T,M,P,A))};function _(D){x.flush(),s==="unified"?a5("unified",D,b):(a5("deletions",D,b),a5("additions",D,b))}Ep({diff:e,diffStyle:s,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:a?!0:this.expandedHunks,collapsedContextThreshold:c,callback:({hunkIndex:D,hunk:T,collapsedBefore:M,collapsedAfter:P,additionLine:A,deletionLine:N,type:K})=>{const q=N!=null?N.splitLineIndex:A.splitLineIndex,X=A!=null?A.unifiedLineIndex:N.unifiedLineIndex;s==="split"&&K!=="change"&&x.flush(),M>0&&_({hunkIndex:D,collapsedLines:M,rangeSize:Math.max(T?.collapsedBefore??0,0),hunkSpecs:T?.hunkSpecs,isFirstHunk:D===0,isLastHunk:!1,isExpandable:!e.isPartial});const re=s==="unified"?X:q,G={type:K,hunkIndex:D,lineIndex:re,unifiedLineIndex:X,splitLineIndex:q,deletionLine:N,additionLine:A};if(s==="unified"){const U=this.getUnifiedInjectedRowsForLine?.(G);U?.before!=null&&PM(U.before,b);let Y=N!=null?v[N.lineIndex]:void 0,W=A!=null?y[A.lineIndex]:void 0;if(Y==null&&W==null){const z="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(z,{file:e.name}),new Error(z)}const ie=K==="change"?A!=null?"change-addition":"change-deletion":K,ne=this.getUnifiedLineDecoration({type:K,lineType:ie,additionLineIndex:A?.lineIndex,deletionLineIndex:N?.lineIndex});k("unified",ne.gutterLineType,A!=null?A.lineNumber:N.lineNumber,`${X},${q}`,ne.gutterProperties),W!=null?W=Ky(W,ne.contentProperties):Y!=null&&(Y=Ky(Y,ne.contentProperties)),RM({diffStyle:"unified",type:K,deletionLine:Y,additionLine:W,unifiedSpan:this.getAnnotations("unified",N?.lineNumber,A?.lineNumber,D,re),createAnnotationElement:z=>this.createAnnotationElement(z),context:b}),U?.after!=null&&PM(U.after,b)}else{const U=this.getSplitInjectedRowsForLine?.(G);U?.before!=null&&OM(U.before,b,x);let Y=N!=null?v[N.lineIndex]:void 0,W=A!=null?y[A.lineIndex]:void 0;const ie=this.getSplitLineDecoration({side:"deletions",type:K,lineIndex:N?.lineIndex}),ne=this.getSplitLineDecoration({side:"additions",type:K,lineIndex:A?.lineIndex});if(Y==null&&W==null){const $e="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error($e,{file:e.name}),new Error($e)}const z=(()=>{if(K==="change"){if(W==null)return"additions";if(Y==null)return"deletions"}})();if(z!=null){if(x.side!=null&&x.side!==z)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");x.side=z,x.increment()}const Ce=this.getAnnotations("split",N?.lineNumber,A?.lineNumber,D,re);if(Ce!=null&&x.size>0&&x.flush(),N!=null){const $e=Ky(Y,ie.contentProperties);k("deletions",ie.gutterLineType,N.lineNumber,`${N.unifiedLineIndex},${q}`,ie.gutterProperties),$e!=null&&(Y=$e)}if(A!=null){const $e=Ky(W,ne.contentProperties);k("additions",ne.gutterLineType,A.lineNumber,`${A.unifiedLineIndex},${q}`,ne.gutterProperties),$e!=null&&(W=$e)}RM({diffStyle:"split",type:K,additionLine:W,deletionLine:Y,...Ce,createAnnotationElement:$e=>this.createAnnotationElement($e),context:b}),U?.after!=null&&OM(U.after,b,x)}const Z=s==="split"&&T!=null&&q===T.splitLineStart+T.splitLineCount-1,te=Z?T.noEOFCRDeletions:!1,me=Z?T.noEOFCRAdditions:!1,se=(N?.noEOFCR??!1)||te,ce=(A?.noEOFCR??!1)||me;if(ce||se){if(s==="split"&&x.flush(),se){const U=K==="context"||K==="context-expanded"?K:"change-deletion";s==="unified"?(b.unifiedContentAST.push(qy(U)),b.pushToGutter("unified",Sa(U,"metadata",1))):(b.deletionsContentAST.push(qy(U)),b.pushToGutter("deletions",Sa(U,"metadata",1)),ce||(b.pushToGutter("additions",Sa(void 0,"buffer",1)),b.additionsContentAST.push(By(1))))}if(ce){const U=K==="context"||K==="context-expanded"?K:"change-addition";s==="unified"?(b.unifiedContentAST.push(qy(U)),b.pushToGutter("unified",Sa(U,"metadata",1))):(b.additionsContentAST.push(qy(U)),b.pushToGutter("additions",Sa(U,"metadata",1)),se||(b.pushToGutter("deletions",Sa(void 0,"buffer",1)),b.deletionsContentAST.push(By(1))))}b.incrementRowCount(1)}P>0&&u!=="simple"&&_({hunkIndex:K==="context-expanded"?D:D+1,collapsedLines:P,rangeSize:w,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),b.incrementRowCount(1)}}),s==="split"&&x.flush();const E=Math.max(Ibe(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),C=t.bufferBefore>0||t.bufferAfter>0,L=!d&&e.type!=="deleted",O=!d&&e.type!=="new",V=b.rowCount>0||C;f=L&&V?f:void 0,m=O&&V?m:void 0,g=d&&V?g:void 0;const F=this.createPreElement(m!=null&&f!=null,E);return{unifiedGutterAST:d&&V?b.unifiedGutterAST.children:void 0,unifiedContentAST:g,deletionsGutterAST:O&&V?b.deletionsGutterAST.children:void 0,deletionsContentAST:m,additionsGutterAST:L&&V?b.additionsGutterAST.children:void 0,additionsContentAST:f,hunkData:p,preNode:F,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(this.diff),totalLines:E,rowCount:b.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderCodeAST(e,t){const n=e==="unified"?t.unifiedGutterAST:e==="deletions"?t.deletionsGutterAST:t.additionsGutterAST,r=e==="unified"?t.unifiedContentAST:e==="deletions"?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;const i=gm(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,pq(r,t.rowCount)]}renderFullAST(e,t=[]){const n=this.getOptionsWithDefaults().hunkSeparators==="line-info",r=this.renderCodeAST("unified",e);if(r!=null)return t.push(Hn({tagName:"code",children:r,properties:{"data-code":"","data-container-size":n?"":void 0,"data-unified":""}})),{...e.preNode,children:t};const i=this.renderCodeAST("deletions",e);i!=null&&t.push(Hn({tagName:"code",children:i,properties:{"data-code":"","data-container-size":n?"":void 0,"data-deletions":""}}));const s=this.renderCodeAST("additions",e);return s!=null&&t.push(Hn({tagName:"code",children:s,properties:{"data-code":"","data-container-size":n?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return Ul(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?Ul(e):Ul(Hn({tagName:"code",children:e,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${t}`]:""}}))}getAnnotations(e,t,n,r,i){const s={type:"annotation",hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(const a of this.deletionAnnotations[t]??[])s.annotations.push(Vf(a));const o={type:"annotation",hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(const a of this.additionAnnotations[n]??[])(e==="unified"?s:o).annotations.push(Vf(a));if(e==="unified")return s.annotations.length>0?s:void 0;if(!(o.annotations.length===0&&s.annotations.length===0))return{deletionSpan:s,additionSpan:o}}renderHeader(e){const{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return cq({fileOrDiff:e,mode:t,stickyHeader:n})}};function $M(e){return`${e} unmodified line${e>1?"s":""}`}function PM(e,t){for(const n of e)t.unifiedContentAST.push(n.content),t.pushToGutter("unified",n.gutter),t.incrementRowCount(1)}function OM(e,t,n){for(const{deletion:r,addition:i}of e){if(r==null&&i==null)continue;const s=r!=null&&i!=null?void 0:r==null?"deletions":"additions";(s==null||n.side!==s)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter("deletions",r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter("additions",i.gutter)),s!=null&&(n.side=s,n.increment()),t.incrementRowCount(1)}}function RM({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:s,additionSpan:o,createAnnotationElement:a,context:l}){let c=!1;if(e==="unified"){if(r!=null?l.unifiedContentAST.push(r):n!=null&&l.unifiedContentAST.push(n),i!=null){const u=t==="change"?n!=null?"change-deletion":"change-addition":t;l.unifiedContentAST.push(a(i)),l.pushToGutter("unified",Sa(u,"annotation",1)),c=!0}}else if(e==="split"){if(n!=null&&l.deletionsContentAST.push(n),r!=null&&l.additionsContentAST.push(r),s!=null){const u=t==="change"?n!=null?"change-deletion":"context":t;l.deletionsContentAST.push(a(s)),l.pushToGutter("deletions",Sa(u,"annotation",1)),c=!0}if(o!=null){const u=t==="change"?r!=null?"change-addition":"context":t;l.additionsContentAST.push(a(o)),l.pushToGutter("additions",Sa(u,"annotation",1)),c=!0}}c&&l.incrementRowCount(1)}function a5(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:s,isLastHunk:o,isExpandable:a},l){if(n<=0)return;const c=e==="unified"?l.unifiedContentAST:e==="deletions"?l.deletionsContentAST:l.additionsContentAST;if(l.hunkSeparators==="metadata"){i!=null&&(l.pushToGutter(e,Ph({type:"metadata",content:i,isFirstHunk:s,isLastHunk:o})),c.push(Ph({type:"metadata",content:i,isFirstHunk:s,isLastHunk:o})),e!=="additions"&&l.incrementRowCount(1));return}if(l.hunkSeparators==="simple"){t>0&&(l.pushToGutter(e,Ph({type:"simple",isFirstHunk:s,isLastHunk:!1})),c.push(Ph({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&l.incrementRowCount(1));return}const u=Ebe(e,t),d=r>l.expansionLineCount,f=a?t:void 0;l.pushToGutter(e,Ph({type:l.hunkSeparators,content:$M(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:s,isLastHunk:o})),c.push(Ph({type:l.hunkSeparators,content:$M(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:s,isLastHunk:o})),e!=="additions"&&l.incrementRowCount(1),l.hunkData.push({slotName:u,hunkIndex:t,lines:n,type:e,expandable:a?{up:!s,down:!o,chunked:d}:void 0})}function Ky(e,t){return e==null||e.type!=="element"||t==null?e:{...e,properties:{...e.properties,...t}}}function l5(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function Bbe(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function qbe(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function Ube(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators=="function"?"custom":e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}let Wbe=-1;var Bq=class{static LoadedCustomComponent=Lq;__id=`file-diff:${++Wbe}`;type="file-diff";fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;constructor(e={theme:Ii},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new GB,this.scrollSyncManager=new Tbe,this.interactionManager=new KB("diff",Sw(e,typeof e.hunkSeparators=="function"||(e.hunkSeparators??"line-info")==="line-info"||e.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(e){return Ube(e)}createHunksRenderer(e){return new jbe(this.getHunksRendererOptions(e),this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t="additions")=>{if(this.fileDiff==null)return;const n=this.fileDiff.hunks.at(-1);let r,i;e:for(const s of this.fileDiff.hunks){let o=t==="deletions"?s.deletionStart:s.additionStart;const a=t==="deletions"?s.deletionCount:s.additionCount;let l=s.splitLineStart,c=s.unifiedLineStart;if(e=o+a){if(s===n){const u=e-(o+a);r=c+s.unifiedLineCount+u,i=l+s.splitLineCount+u;break e}continue}for(const u of s.hunkContent)if(u.type==="context")if(ethis.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators=="function")}setSelectedLines(e,t){this.interactionManager.setSelection(e,t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{diffStyle:e="split",overflow:t="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,t==="wrap"),t==="scroll"&&e==="split"?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}cleanUp(e=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,this.lineAnnotations=[],this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,e||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(e){const{fileContainer:t,prerenderedHTML:n,preventEmit:r=!1,lineAnnotations:i,oldFile:s,newFile:o,fileDiff:a}=e;this.hydrateElements(t,n),Zbe(this.pre,Kbe({fileDiff:a,oldFile:s,newFile:o}),this.options.collapsed)||Ybe(this.headerElement,Gbe({fileDiff:a,oldFile:s,newFile:o}),this.options.disableFileHeader)?this.render({...e,preventEmit:!0}):this.hydrationSetup({fileDiff:a,oldFile:s,newFile:o,lineAnnotations:i}),r||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),Iq(e,t);for(const n of e.shadowRoot?.children??[]){if(n instanceof SVGElement){this.spriteSVG=n;continue}if(n instanceof HTMLElement){if(n instanceof HTMLPreElement){this.pre=n;for(const r of n.children)!(r instanceof HTMLElement)||r.tagName.toLowerCase()!=="code"||("deletions"in r.dataset&&(this.codeDeletions=r),"additions"in r.dataset&&(this.codeAdditions=r),"unified"in r.dataset&&(this.codeUnified=r));continue}if("diffsHeader"in n.dataset){this.headerElement=n;continue}if(n instanceof HTMLStyleElement&&n.hasAttribute(av)){this.themeCSSStyle=n;continue}if(n instanceof HTMLStyleElement&&n.hasAttribute(lv)){this.unsafeCSSStyle=n,this.appliedUnsafeCSS=n.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!=null&&n!=null?mv(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.rerender()};render({oldFile:e,newFile:t,fileDiff:n,deferManagers:r=!1,forceRender:i=!1,preventEmit:s=!1,lineAnnotations:o,fileContainer:a,containerWrapper:l,renderRange:c}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:u=!1,themeType:d="system"}=this.options,f=u?void 0:c,m=this.hasThemeChanged(),g=e!=null&&t!=null&&(!Bl(e,this.deletionFile)||!Bl(t,this.additionFile));let p=n!=null&&n!==this.fileDiff;const y=o!=null&&(o.length>0||this.lineAnnotations.length>0)?o!==this.lineAnnotations:!1;if(!u&&x4(f,this.renderRange)&&!i&&!y&&!m&&(n!=null&&n===this.fileDiff||n==null&&!g))return this.applyCachedThemeState(d);const{renderRange:v}=this;if(this.renderRange=f,this.deletionFile=e,this.additionFile=t,n!=null?this.fileDiff=n:e!=null&&t!=null&&g&&(p=!0,this.fileDiff=mv(e,t,this.options.parseDiffOptions)),p&&(this.cachedHeaderHTML=void 0),o!=null&&this.setLineAnnotations(o),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:b=!1,disableFileHeader:w=!1}=this.options;if(w&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),a=this.getOrCreateFileContainer(a,l),this.applyCachedThemeState(d),u){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const x=this.hunksRenderer.renderDiff(this.fileDiff,qB);x!=null&&this.applyThemeState(a,x.themeStyles,d,x.baseThemeType),x?.headerElement!=null&&this.applyHeaderToDOM(x.headerElement,a),this.renderSeparators([]),this.injectUnsafeCSS()}catch(x){if(b)throw x;console.error(x),x instanceof Error&&this.applyErrorToDOM(x,a)}return s||this.emitPostRender(),!0}try{const x=this.getOrCreatePreNode(a);if(!(this.canPartiallyRender(i,y,g||p||m)&&this.applyPartialRender({previousRenderRange:v,renderRange:f}))){const k=this.hunksRenderer.renderDiff(this.fileDiff,f);if(k==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(a,k.themeStyles,d,k.baseThemeType),k.headerElement!=null&&this.applyHeaderToDOM(k.headerElement,a),k.additionsContentAST!=null||k.deletionsContentAST!=null||k.unifiedContentAST!=null?this.applyHunksToDOM(x,k):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(k.hunkData)}this.applyBuffers(x,f),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,r||this.flushManagers()}catch(x){if(b)throw x;console.error(x),x instanceof Error&&this.applyErrorToDOM(x,a)}return s||this.emitPostRender(),!0}emitPostRender(e=!1){const{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,"unmount");return}if(t==null)return;const r=this.mounted?"update":"mount";this.mounted=!0,n?.(t,this,r)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(const{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const t=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",t.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${e}px`),!0}primeHighlightCache(){const{fileDiff:e,workerManager:t}=this;if(e==null||t==null||vv(e))return;const n=this.options.tokenizeMaxLength??cv;Math.max(e.additionLines.length,e.deletionLines.length)>n||t.primeDiffHighlightCache(e)}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){const{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!="function"){for(const{element:r}of this.separatorCache.values())r.remove();this.separatorCache.clear();return}const n=new Map(this.separatorCache);for(const r of e){const i=r.slotName;let s=this.separatorCache.get(i);if(s==null||!qbe(r,s.hunkData)){s?.element.remove();const o=document.createElement("div");o.style.display="contents",o.slot=r.slotName;const a=t(r,this);a!=null&&o.appendChild(a),this.fileContainer.appendChild(o),s={element:o,hunkData:r},this.separatorCache.set(i,s)}n.delete(i)}for(const[r,{element:i}]of n.entries())this.separatorCache.delete(r),i.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:n}of this.annotationCache.values())n.remove();this.annotationCache.clear();return}const e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(const[n,r]of this.lineAnnotations.entries()){const i=`${n}-${Vf(r)}`;let s=this.annotationCache.get(i);if(s==null||!Bbe(r,s.annotation)){s?.element.remove();const o=t(r);if(o==null)continue;s={element:wq(Vf(r)),annotation:r},s.element.appendChild(o),this.fileContainer.appendChild(s.element),this.annotationCache.set(i,s)}e.delete(i)}for(const[n,{element:r}]of e.entries())this.annotationCache.delete(n),r.remove()}renderGutterUtility(){const{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const n=xq();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){const{fileContainer:n}=this,r=e??n??document.createElement(bw),i=n!==r;return i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){const{shadowRoot:t}=e;if(t!=null)for(const n of t.children)n instanceof SVGElement?this.spriteSVG??=n:Tw(n)&&n.hasAttribute(av)?(this.themeCSSStyle??=n,this.hasAdoptedThemeCSS=!0):Tw(n)&&n.hasAttribute(lv)&&(this.unsafeCSSStyle??=n,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){const t=e.shadowRoot??e.attachShadow({mode:"open"});if(this.spriteSVG==null){const n=document.createElement("div");n.innerHTML=yq;const r=n.firstChild;r instanceof SVGElement&&(this.spriteSVG=r)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){const t=e.shadowRoot??e.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute("data-unified")?this.codeUnified=t:t.hasAttribute("data-deletions")?this.codeDeletions=t:t.hasAttribute("data-additions")&&(this.codeAdditions=t))}applyHeaderToDOM(e,t){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:n}=this,r=this.cachedHeaderHTML??Ul(e);if(this.cachedHeaderHTML=r,r!==this.lastRenderedHeaderHTML){const c=document.createElement("div");c.innerHTML=r;const u=c.firstElementChild;if(!(u instanceof HTMLElement))return;this.headerElement!=null?t.shadowRoot?.replaceChild(u,this.headerElement):t.shadowRoot?.prepend(u),this.headerElement=u,this.lastRenderedHeaderHTML=r}if(this.isContainerManaged||n==null)return;const{renderCustomHeader:i,renderHeaderPrefix:s,renderHeaderMetadata:o}=this.options;if(i!=null){const c=i(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,v9,c),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}const a=s?.(n)??void 0,l=o?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,g9,a),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,p9,l),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}const i=t??this.createHeaderSlotElement(n);return t==null&&e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){const t=document.createElement("div");return t.slot=e,t}injectUnsafeCSS(){const{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===t&&this.appliedUnsafeCSS===e||(this.unsafeCSSStyle??=kq(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=Cq(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){const i=e.shadowRoot??e.attachShadow({mode:"open"}),s=r??n,o=this.options.theme??Ii,a=typeof o=="string"?o:{...o},l=hv(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===s&&this.appliedThemeCSS.scrollbarGutter===l){this.appliedThemeCSS.theme=a;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:a,themeStyles:t,themeType:s,baseThemeType:r,scrollbarGutter:l};return}this.themeCSSStyle=Aq({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:Tq(t,s,l)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:a,themeStyles:t,themeType:s,baseThemeType:r,scrollbarGutter:l}:void 0}hydrateMeasuredScrollbar(){const e=this.fileContainer?.shadowRoot;e==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=Eq(this.themeCSSStyle.textContent??"",hv(e)))}applyHunksToDOM(e,t){const{overflow:n="scroll"}=this.options,r=(this.options.hunkSeparators??"line-info")==="line-info",i=n==="wrap"?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let s=!1;const o=[],a=this.hunksRenderer.renderCodeAST("unified",t),l=this.hunksRenderer.renderCodeAST("deletions",t),c=this.hunksRenderer.renderCodeAST("additions",t);a!=null?(s=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=m2({code:this.codeUnified,columnType:"unified",rowSpan:i,containerSize:r}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(a),o.push(this.codeUnified)):l!=null||c!=null?(l!=null?(s=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=m2({code:this.codeDeletions,columnType:"deletions",rowSpan:i,containerSize:r}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(l),o.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),c!=null?(s=s||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=m2({code:this.codeAdditions,columnType:"additions",rowSpan:i,containerSize:r}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(c),o.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),o.length===0?e.textContent="":s&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({previousRenderRange:e,renderRange:t}){const{pre:n,codeUnified:r,codeAdditions:i,codeDeletions:s,options:{diffStyle:o="split"}}=this;if(n==null||e==null||t==null||!Number.isFinite(e.totalLines)||!Number.isFinite(t.totalLines)||this.lastRowCount==null)return!1;const a=this.getCodeColumns(o,r,s,i);if(a==null)return!1;const l=e.startingLine,c=t.startingLine,u=l+e.totalLines,d=c+t.totalLines,f=Math.max(l,c),m=Math.min(u,d);if(m<=f)return!1;const g=Math.max(0,f-l),p=Math.max(0,u-m),y=this.trimColumns({columns:a,trimStart:g,trimEnd:p,previousStart:l,overlapStart:f,overlapEnd:m,diffStyle:o});if(y<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount{if(!(E<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:_,totalLines:E,bufferBefore:0,bufferAfter:0})},w=b(c,Math.max(f-c,0));if(w==null&&cm)return!1;const k=(_,E)=>{if(_!=null){if(o==="unified"&&!Array.isArray(a))this.insertPartialHTML(o,a,_,E);else if(o==="split"&&Array.isArray(a))this.insertPartialHTML(o,a,_,E);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");v+=_.rowCount}};return this.cleanupErrorWrapper(),k(w,"afterbegin"),k(x,"beforeend"),this.lastRowCount!==v&&(this.applyRowSpan(o,a,v),this.lastRowCount=v),!0}insertPartialHTML(e,t,n,r){if(e==="unified"&&!Array.isArray(t)){const i=this.hunksRenderer.renderCodeAST("unified",n);this.renderPartialColumn(t,i,r)}else if(e==="split"&&Array.isArray(t)){const i=this.hunksRenderer.renderCodeAST("deletions",n),s=this.hunksRenderer.renderCodeAST("additions",n);this.renderPartialColumn(t[0],i,r),this.renderPartialColumn(t[1],s,r)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}renderPartialColumn(e,t,n){if(e==null||t==null)return;const r=FM(t[0]),i=FM(t[1]);if(r==null||i==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const s=i.at(0);n==="beforeend"&&s?.type==="element"&&typeof s.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(s.properties["data-buffer-size"],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);const o=i.at(-1);n==="afterbegin"&&o?.type==="element"&&typeof o.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(o.properties["data-buffer-size"],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,s){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;const o=this.getBufferSize(t.dataset);o!=null&&(s?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){const r=i=>{i!=null&&(i.gutter.style.setProperty("grid-row",`span ${n}`),i.content.style.setProperty("grid-row",`span ${n}`))};if(e==="unified"&&!Array.isArray(t))r(t);else if(e==="split"&&Array.isArray(t))r(t[0]),r(t[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(e,t,n){let r=0,i=0,s=0,o=!1;const a=n>=0;if(e==null)return 0;const l=Array.from(e.content.children),c=Array.from(e.gutter.children);if(l.length!==c.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;s0||a&&r>=n)&&(u.remove(),d.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if("separator"in u.dataset&&"separator"in d.dataset){(t>0||a&&r>=n)&&(u.remove(),d.remove(),i++);continue}if(u.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in d.dataset){(t>0||a&&r>=n)&&(u.remove(),d.remove(),i++);continue}if(u.dataset.gutterBuffer==="metadata"&&"noNewline"in d.dataset){(t>0||a&&r>=n)&&(u.remove(),d.remove(),i++);continue}if(u.dataset.gutterBuffer==="buffer"&&"contentBuffer"in d.dataset){const f=this.getBufferSize(d.dataset);if(f==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(t>0){const m=Math.min(t,f),g=f-m;g>0?(this.updateBufferSize(u,g),this.updateBufferSize(d,g),i+=m):(u.remove(),d.remove(),i+=f),t-=m,t===0&&g===0&&(o=!0)}else if(a){const m=r,g=r+f-1;if(n<=m)u.remove(),d.remove(),i+=f;else if(n<=g){const p=g-n+1,y=f-p;this.updateBufferSize(u,y),this.updateBufferSize(d,y),i+=p}}r+=f;continue}throw console.error({gutterElement:u,contentElement:d}),new Error("FileDiff.trimColumnRows: unknown row elements")}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:s,trimStart:o}){const a=Math.max(0,r-i),l=n-i;if(l<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const c=o>0,u=s>0;if(!c&&!u)return 0;const d=c?a:0,f=u?l:-1;if(t==="unified"&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t==="split"&&Array.isArray(e)){const m=this.trimColumnRows(e[0],d,f),g=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&m!==g)throw new Error("FileDiff.trimColumns: split columns out of sync");return e[0]!=null?m:g}else throw console.error({diffStyle:t,columns:e}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(e){const t=Number.parseInt(e?.bufferSize??"",10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty("grid-row",`span ${t}`),e.style.setProperty("min-height",`calc(${t} * 1lh)`)}getCodeColumns(e,t,n,r){function i(s){if(s==null)return;const o=s.children[0],a=s.children[1];if(!(!(o instanceof HTMLElement)||!(a instanceof HTMLElement)||o.dataset.gutter==null||a.dataset.content==null))return{gutter:o,content:a}}if(e==="unified")return i(t);{const s=i(n),o=i(r);return s!=null||o!=null?[s,o]:void 0}}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",e.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${t.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",e.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${t.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){const{diffIndicators:s="bars",disableBackground:o=!1,disableLineNumbers:a=!1,overflow:l="scroll",diffStyle:c="split"}=this.options,u={type:"diff",diffIndicators:s,disableBackground:o,disableLineNumbers:a,overflow:l,split:c==="unified"?!1:t!=null&&n!=null,totalLines:r,customProperties:i};bq(u,this.appliedPreAttributes)||(Dq(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const n=t.shadowRoot??t.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",n.appendChild(this.errorWrapper);const r=document.createElement("div");r.dataset.errorMessage="",r.innerText=e.message,this.errorWrapper.appendChild(r);const i=document.createElement("pre");i.dataset.errorStack="",i.innerText=e.stack??"No Error Stack",this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function Kbe({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function Gbe({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function Zbe(e,t,n=!1){return!n&&e==null&&t}function Ybe(e,t,n=!1){return e==null&&t&&!n}function FM(e){if(!(e==null||e.type!=="element"))return e.children??[]}function Xbe({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:r,expandUnchanged:i,expandedHunks:s,collapsedContextThreshold:o}){let a=zl(t,n),l=a;const c=i?!0:s,u=e.hunks.length-1;for(let d=0;d0){const v=W0({type:r,metrics:t,hunkIndex:d,hunkSpecs:f.hunkSpecs})?.totalHeight??0;a+=v,l+=v}a+=f.splitLineCount*t.lineHeight,l+=f.unifiedLineCount*t.lineHeight;const p=Qbe(f);a+=p.split*t.lineHeight,l+=p.unified*t.lineHeight;const y=d===u?pv({fileDiff:e,hunkIndex:d,expandedHunks:c,collapsedContextThreshold:o,errorPrefix:"computeEstimatedDiffHeights"}):void 0;if(y!=null){const v=(y.fromStart+y.fromEnd)*t.lineHeight;if(a+=v,l+=v,y.collapsedLines>0){const b=K0({type:r,metrics:t})?.totalHeight??0;a+=b,l+=b}}}if(e.hunks.length>0){const d=Ew(t);a+=d,l+=d}return{splitHeight:a,unifiedHeight:l}}function Qbe(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};const t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type==="context"){const n=t.lines>0?1:0;return{split:n,unified:n}}return Jbe(e,t)}function Jbe(e,t){const n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),r=t.deletions>0&&e.noEOFCRDeletions,i=t.additions>0&&e.noEOFCRAdditions;return{split:r||i?1:0,unified:n}}const p7=5e3;let e2e=-1;var t2e=class extends Bq{__id=`little-virtualized-file-diff:${++e2e}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=r5(n)}setMetrics(e,t=!1){const n=r5(e);!t&&xw(this.metrics,n)||(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){const t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,n=!y9(t,e),r=n&&o2e(t,e);super.setOptions(e),r&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:a2e(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1}={}){this.layoutDirty=!0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal!==0&&(this.cache.measuredHeightDeltaTotal=0),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),t&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;const{overflow:t="scroll"}=this.options;if(this.fileContainer==null||this.fileDiff==null)return this.height!==0&&(e=!0),this.height=0,e;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled())return e;const n=this.getDiffStyle(),r=n==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];for(const i of r){if(i==null)continue;const s=i.children[1];if(s instanceof HTMLElement)for(const o of s.children){if(!(o instanceof HTMLElement))continue;const a=o.dataset.lineIndex;if(a==null)continue;const l=c2e(a,n);let c=o.getBoundingClientRect().height,u=!1;o.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in o.nextElementSibling.dataset||"noNewline"in o.nextElementSibling.dataset)&&("noNewline"in o.nextElementSibling.dataset&&(u=!0),c+=o.nextElementSibling.getBoundingClientRect().height);const d=this.getEstimatedLineHeight(u),f=this.cache.heightDeltas.get(l)??0,m=c-d;m!==f&&(e=!0,this.cache.measuredHeightDeltaTotal+=m-f,m===0?this.cache.heightDeltas.delete(l):this.cache.heightDeltas.set(l,m))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render());prepareCodeViewItem(e,t,n){const r=!pm(this.fileDiff,e);let i=n?.resetDiffLayoutCache===!0||r,s=r||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights;n?.metrics!=null&&(this.metrics=r5(n.metrics),i=!0,s=!0);const{collapsed:o=!1}=this.options;return this.currentCollapsed!==o&&(this.currentCollapsed=o,i=!0),i&&this.resetLayoutCache({includeEstimatedHeights:s}),this.fileDiff=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e,t="additions"){if(this.fileDiff==null)return;const n=this.getLineIndex(e,t);if(n==null)return;const{disableFileHeader:r=!1,expandUnchanged:i=!1,collapsed:s=!1,collapsedContextThreshold:o=Po}=this.options,a=this.getDiffStyle(),l=this.getHunkSeparatorType(),c=a==="split"?n[1]:n[0];this.approximateLayoutCheckpoints();const u=this.getLayoutCheckpointBeforeLineIndex(c);let d=u?.top??zl(this.metrics,r);if(s)return{top:d,height:0};let f;return Ep({diff:this.fileDiff,diffStyle:a,startingLine:u?.renderedLineIndex??0,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:m,hunk:g,collapsedBefore:p,collapsedAfter:y,deletionLine:v,additionLine:b})=>{const w=a==="split"?b?.splitLineIndex??v?.splitLineIndex:b?.unifiedLineIndex??v?.unifiedLineIndex;if(w==null)throw new Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(p>0){const k=W0({type:l,metrics:this.metrics,hunkIndex:m,hunkSpecs:g?.hunkSpecs});if(k!=null){if(d+=k.gapBefore,c>=w-p&&c0){const k=K0({type:l,metrics:this.metrics});if(k!=null){if(c>w&&c<=w+y)return f={top:d+k.gapBefore,height:k.height},!0;d+=k.totalHeight}}return!1}}),f}getNumericScrollAnchor(e){if(this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsed:r=!1,collapsedContextThreshold:i=Po}=this.options;if(r)return;const s=this.getDiffStyle(),o=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();const a=this.getLayoutCheckpointBeforeTop(e);let l=a?.top??zl(this.metrics,t),c;return Ep({diff:this.fileDiff,diffStyle:s,startingLine:a?.renderedLineIndex??0,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({hunkIndex:u,hunk:d,collapsedBefore:f,collapsedAfter:m,deletionLine:g,additionLine:p})=>{const y=s==="split"?p?.splitLineIndex??g?.splitLineIndex:p?.unifiedLineIndex??g?.unifiedLineIndex;if(y==null)throw new Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(f>0){const b=W0({type:o,metrics:this.metrics,hunkIndex:u,hunkSpecs:d?.hunkSpecs});b!=null&&(l+=b.totalHeight)}if(l>=e&&(g!=null?c={lineNumber:g.lineNumber,side:"deletions",top:l}:p!=null&&(c={lineNumber:p.lineNumber,side:"additions",top:l}),c!=null))return!0;const v=this.getLineHeight(y,(p?.noEOFCR??!1)||(g?.noEOFCR??!1));if(l+=v,m>0){const b=K0({type:o,metrics:this.metrics});b!=null&&(l+=b.totalHeight)}return!1}}),c}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.fileDiff==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.fileDiff,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:n,bufferAfter:r,totalLines:i}=t;let s=0;if(i===0){const o=e??this.virtualizer.getWindowSpecs();this.top{this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSimpleMode()&&this.computeApproximateSize(),this.virtualizer.instanceChanged(this,!0)};setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}computeApproximateSize(e=!1){const t=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!t)return;const n=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,this.fileDiff==null){this.layoutDirty=!1;return}const{disableFileHeader:r=!1,collapsed:i=!1}=this.options,s=zl(this.metrics,r);if(this.height+=s,i){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight()+this.cache.measuredHeightDeltaTotal,t&&!n&&this.validateComputedHeight(),this.layoutDirty=!1}getActiveEstimatedHeight(){this.ensureEstimatedDiffHeights();const e=this.getDiffStyle()==="split"?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(e==null)throw new Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return e}ensureEstimatedDiffHeights(){if(this.fileDiff==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=Po}=this.options,{splitHeight:r,unifiedHeight:i}=Xbe({fileDiff:this.fileDiff,metrics:this.metrics,disableFileHeader:e,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:t,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:n});this.cache.estimatedSplitHeight=r,this.cache.estimatedUnifiedHeight=i}validateComputedHeight(){if(this.fileContainer==null||this.fileDiff==null)return;const e=this.fileContainer.getBoundingClientRect();e.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:e.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render({fileContainer:e,oldFile:t,newFile:n,fileDiff:r,forceRender:i=!1,...s}={}){const{forceRenderOverride:o,isSetup:a}=this;if(this.forceRenderOverride=void 0,this.fileDiff??=r??(t!=null&&n!=null?mv(t,n,this.options.parseDiffOptions):void 0),e=this.getOrCreateFileContainer(e),this.fileDiff==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(a)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();const d=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(d==null)throw new Error("VirtualizedFileDiff.render: simple virtualizer is not available");d.connect(e,this),this.isVisible=d.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);const l=this.virtualizer.getWindowSpecs(),c=this.top??0,u=this.computeRenderRangeFromWindow(this.fileDiff,c,l);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:u,oldFile:t,newFile:n,forceRender:o??i,...s})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){return l2e(this.options.hunkSeparators)}approximateLayoutCheckpoints(){if(this.cache.checkpoints.length>0||this.fileDiff==null||this.fileDiff.hunks.length===0||this.options.collapsed===!0)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=Po}=this.options,r=this.fileDiff.hunks.length-1,i=this.getDiffStyle(),s=this.getHunkSeparatorType(),o=t?!0:this.hunksRenderer.getExpandedHunksMap(),a=n2e(this.cache.heightDeltas);let l=zl(this.metrics,e),c=0;const u=({rowCount:d,startLineIndex:f,preSeparatorHeight:m=0,postSeparatorHeight:g=0,metadataOffsets:p=[]})=>{if(d<=0)return;const y=c,v=c+d;let b=r2e(y);for(;b0?m:0)+w*this.metrics.lineHeight+i2e(p,w)*this.metrics.lineHeight+NM(a,f,f+w);this.cache.checkpoints.push({renderedLineIndex:b,lineIndex:f+w,top:x}),b+=p7}l+=m+d*this.metrics.lineHeight+p.length*this.metrics.lineHeight+NM(a,f,f+d)+g,c=v};for(let d=0;d0?W0({type:s,metrics:this.metrics,hunkIndex:d,hunkSpecs:f.hunkSpecs})?.totalHeight??0:0;u({rowCount:m.fromStart,startLineIndex:(i==="split"?f.splitLineStart:f.unifiedLineStart)-m.rangeSize});let p=g;u({rowCount:m.fromEnd,startLineIndex:(i==="split"?f.splitLineStart:f.unifiedLineStart)-m.fromEnd,preSeparatorHeight:p}),m.fromEnd>0&&(p=0);const y=d===r?pv({fileDiff:this.fileDiff,hunkIndex:d,expandedHunks:o,collapsedContextThreshold:n,errorPrefix:"VirtualizedFileDiff"}):void 0,v=y!=null&&y.collapsedLines>0?K0({type:s,metrics:this.metrics})?.totalHeight??0:0,b=y!=null?y.fromStart+y.fromEnd:0,w=i==="split"?f.splitLineCount:f.unifiedLineCount,x=i==="split"?f.splitLineStart:f.unifiedLineStart;u({rowCount:w,startLineIndex:x,preSeparatorHeight:p,postSeparatorHeight:b===0?v:0,metadataOffsets:s2e({diffStyle:i,hunk:f,rowCount:w})}),y!=null&&b>0&&u({rowCount:b,startLineIndex:x+w,postSeparatorHeight:v})}this.cache.totalLines=c}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){const i=t+n>>1,s=this.cache.checkpoints[i];if(s==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");s.lineIndex<=e?(r=s,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){const s=n+r>>1,o=this.cache.checkpoints[s];if(o==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");o.top<=e?(i=s,n=s+1):r=s-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let s=i;s>=0;s--){const o=this.cache.checkpoints[s];if(o==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");if(o.renderedLineIndex%t===0)return o}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(const a of e.hunks)n+=t==="split"?a.splitLineCount:a.unifiedLineCount;return n}const{expandUnchanged:r=!1,collapsedContextThreshold:i=Po}=this.options,s=r?!0:this.hunksRenderer.getExpandedHunksMap();for(const[a,l]of e.hunks.entries()){const c=t==="split"?l.splitLineCount:l.unifiedLineCount;n+=c;const u=Math.max(l.collapsedBefore,0),{fromStart:d,fromEnd:f,renderAll:m}=gv({isPartial:e.isPartial,rangeSize:u,expandedHunks:s,hunkIndex:a,collapsedContextThreshold:i});u>0&&(n+=m?u:d+f)}const o=pv({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:s,collapsedContextThreshold:i,errorPrefix:"VirtualizedFileDiff"});return o!=null&&(n+=o.fromStart+o.fromEnd),n}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){const{disableFileHeader:i=!1,expandUnchanged:s=!1,collapsedContextThreshold:o=Po}=this.options,{hunkLineCount:a,lineHeight:l}=this.metrics,c=this.getDiffStyle(),u=this.getHunkSeparatorType(),d=this.height;let f=this.cache.totalLines>0?this.cache.totalLines:this.getExpandedLineCount(e,c);const m=zl(this.metrics,i),g=e.hunks.length>0?Ew(this.metrics):0;if(tr)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:d-m-g};if(f<=a||e.hunks.length===0)return{startingLine:0,totalLines:a,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(),f=this.cache.totalLines>0?this.cache.totalLines:f;const p=Math.ceil(Math.max(r-n,0)/l),y=Math.ceil(p/a)*a+a,v=y/a,b=v,w=[],x=(n+r)/2,k=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-y*l*2),a);let _=t+(k?.top??m),E=k?.renderedLineIndex??0,C,L,O;if(Ep({diff:e,diffStyle:c,startingLine:k?.renderedLineIndex??0,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:N,hunk:K,collapsedBefore:q,collapsedAfter:X,deletionLine:re,additionLine:G})=>{const Z=G!=null?G.splitLineIndex:re.splitLineIndex,te=G!=null?G.unifiedLineIndex:re.unifiedLineIndex,me=(G?.noEOFCR??!1)||(re?.noEOFCR??!1),se=(q>0?W0({type:u,metrics:this.metrics,hunkIndex:N,hunkSpecs:K?.hunkSpecs}):void 0)?.totalHeight??0;_+=se;const ce=E%a===0,U=Math.floor(E/a);if(ce&&(w[U]=_-(t+m+se),O!=null)){if(O<=0)return!0;O--}const Y=this.getLineHeight(c==="split"?Z:te,me);return _>n-Y&&_x&&(L=U),O==null&&_>=r&&ce&&(O=b),E++,_+=Y,X>0&&(_+=K0({type:u,metrics:this.metrics})?.totalHeight??0),!1}}),C==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:d-m-g};L??=C;const V=Math.round(L-v/2),F=Math.max(0,Math.ceil(f/a)-v),D=Math.max(0,Math.min(V,F)),T=D*a,M=V<0?y+V*a:y,P=w[D]??0,A=D+M/a;return{startingLine:T,totalLines:M,bufferBefore:P,bufferAfter:As[0]-o[0]),n=[],r=[0];let i=0;for(const[s,o]of t)n.push(s),i+=o,r.push(i);return{lineIndexes:n,prefixTotals:r}}function NM({lineIndexes:e,prefixTotals:t},n,r){if(n>=r||e.length===0)return 0;const i=VM(e,n);return(t[VM(e,r)]??0)-(t[i]??0)}function VM(e,t){let n=0,r=e.length;for(;n>1,s=e[i];if(s==null)throw new Error("VirtualizedFileDiff: invalid prefix index");s0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];const o=[],a=n-s;return r.deletions>0&&t.noEOFCRDeletions&&o.push(a+r.deletions-1),r.additions>0&&t.noEOFCRAdditions&&o.push(n-1),o}function o2e(e,t){return(e.diffStyle??"split")!==(t.diffStyle??"split")||(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??"bars")!==(t.diffIndicators??"bars")||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??Po)!==(t.collapsedContextThreshold??Po)||e.unsafeCSS!==t.unsafeCSS}function a2e(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??Po)!==(t.collapsedContextThreshold??Po)}function l2e(e){return typeof e=="function"?"custom":e??"line-info"}function c2e(e,t){const[n,r]=e.split(",").map(Number);return t==="split"?r:n}function u2e(e,t){return e==null||t==null?e===t:e.top===t.top&&e.bottom===t.bottom}const qq=1e3,d2e=qq*4,f2e=[0,1e-6,.99999,1],h2e={overscrollSize:qq,intersectionObserverMargin:d2e,resizeDebugging:!1};let Gy=0,m2e=-1;var Uq=class $l{static __STOP=!1;static __lastScrollPosition=0;__id=`virtualizer-${++m2e}`;config;type="simple";intersectionObserver;scrollTop=0;height=0;scrollHeight=0;windowSpecs={top:0,bottom:0};root;contentContainer;resizeObserver;observers=new Map;visibleInstances=new Map;visibleInstancesDirty=!1;instancesChanged=new Set;scrollDirty=!0;heightDirty=!0;scrollHeightDirty=!0;renderedObservers=0;connectQueue=new Map;constructor(t){this.config={...h2e,...t}}setup(t,n){if(this.root==null){this.root=t,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:f2e,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),t instanceof Document?this.setupWindow():this.setupElement(n),window.__INSTANCE=this,window.__TOGGLE=()=>{$l.__STOP?($l.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:$l.__lastScrollPosition}),Ka(this.computeRenderRangeAndEmit)):($l.__lastScrollPosition=this.getScrollTop(),$l.__STOP=!0)};for(const[r,i]of this.connectQueue.entries())this.connect(r,i);this.connectQueue.clear(),this.markDOMDirty(),Ka(this.computeRenderRangeAndEmit)}}instanceChanged(t,n){this.instancesChanged.add(t),n&&this.markDOMDirty(),Ka(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=fM({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}isInstanceVisible(t,n){const r=this.getScrollTop(),i=this.getHeight(),s=this.config.intersectionObserverMargin,o=r-s,a=r+i+s;return!(ta)}handleContainerResize=t=>{if(this.root==null)return;let n=!1;for(const r of t){const i=r.borderBoxSize[0].blockSize;this.root instanceof Document?i!==this.scrollHeight&&(this.scrollHeightDirty=!0,n=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:i-Gy,newSize:i}),Gy=i)):r.target===this.root?i!==this.height&&(this.heightDirty=!0,n=!0):r.target===this.contentContainer&&(this.scrollHeightDirty=!0,n=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:i-Gy,newSize:i}),Gy=i))}n&&Ka(this.computeRenderRangeAndEmit)};setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(t){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),t??=this.root.firstElementChild??void 0,t instanceof HTMLElement&&(this.contentContainer=t,this.resizeObserver?.observe(t))}cleanUp(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0}getOffsetInScrollContainer(t){return this.getScrollTop()+f0(t,this.getScrollContainerElement())}connect(t,n){if(this.observers.has(t))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(t,n):(this.intersectionObserver.observe(t),this.observers.set(t,n),this.instancesChanged.add(n),this.markDOMDirty(),Ka(this.computeRenderRangeAndEmit)),()=>this.disconnect(t)}disconnect(t){const n=this.observers.get(t);this.connectQueue.delete(t),n!=null&&(this.intersectionObserver?.unobserve(t),this.observers.delete(t),this.visibleInstances.delete(t)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),Ka(this.computeRenderRangeAndEmit))}handleWindowResize=()=>{$l.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,Ka(this.computeRenderRangeAndEmit))};handleWindowScroll=()=>{$l.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,Ka(this.computeRenderRangeAndEmit))};handleElementScroll=()=>{$l.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,Ka(this.computeRenderRangeAndEmit))};computeRenderRangeAndEmit=()=>{if($l.__STOP)return;const t=this.heightDirty||this.scrollHeightDirty;if(!this.scrollDirty&&!this.scrollHeightDirty&&!this.heightDirty&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.instancesChanged.size===0)return;let n=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const s=fM({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!t&&u2e(this.windowSpecs,s)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty)return;this.windowSpecs=s}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const r=this.getScrollAnchor(this.height),i=new Set;for(const s of t?this.observers.values():this.visibleInstances.values())s.onRender(t)&&i.add(s);for(const s of this.instancesChanged)i.has(s)||s.onRender(t)&&i.add(s);this.scrollFix(r);for(const s of i)s.reconcileHeights();n||=this.instancesChanged.size>0,n&&this.markDOMDirty(),(n||t)&&Ka(this.computeRenderRangeAndEmit),i.clear(),this.instancesChanged.clear()};scrollFix(t){if(t==null)return;const n=this.getScrollContainerElement(),{lineIndex:r,lineOffset:i,fileElement:s,fileOffset:o,fileTypeOffset:a}=t;if(r!=null&&i!=null){const c=s.shadowRoot?.querySelector(`[data-line][data-line-index="${r}"]`);if(c instanceof HTMLElement){const u=f0(c,n);if(u!==i){const d=u-i;this.applyScrollFix(d)}return}}const l=f0(s,n);if(a==="top")l!==o&&this.applyScrollFix(l-o);else{const c=l+s.getBoundingClientRect().height;c!==o&&this.applyScrollFix(c-o)}}applyScrollFix(t){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+t,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+t,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(t){const n=this.getScrollContainerElement();let r;for(const[i]of this.visibleInstances.entries()){const s=f0(i,n),o=s+i.offsetHeight;let a,l;o<=0?(a=o,l="bottom"):(a=s,l="top");let c,u;if(o>0&&s=0&&(r.fileOffset<0||ar.fileOffset))&&(d=!0),d&&(r={fileElement:i,fileTypeOffset:l,fileOffset:a,lineIndex:c,lineOffset:u})}return r}handleIntersectionChange=t=>{this.scrollDirty=!0;for(const{target:n,isIntersecting:r}of t){if(!(n instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const i=this.observers.get(n);i!=null&&(r&&!this.visibleInstances.has(n)?(i.setVisibility(!0),this.visibleInstances.set(n,i),this.visibleInstancesDirty=!0):!r&&this.visibleInstances.has(n)&&(i.setVisibility(!1),this.visibleInstances.delete(n),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&Ka(this.computeRenderRangeAndEmit)};getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let t=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return t=Math.max(0,Math.min(t,this.getScrollHeight()-this.getHeight())),this.scrollTop=t,t}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}};function f0(e,t){const n=e.getBoundingClientRect(),r=t?.getBoundingClientRect().top??0;return n.top-r}function zM(e){const t=[];for(const n of e){const r=Nf.get(n);if(r==null)throw new Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(r)}return t}function HM(e){for(const t of Array.isArray(e)?e:[e])if(!Nf.has(t))return!1;return!0}async function jM(e){const t=[],n=[];for(const r of e){if(r==="text"||r==="ansi")continue;const i=XB(r)??YB(r);"then"in i?n.push(i):t.push(i)}return n.length>0&&await Promise.all(n).then(r=>{for(const i of r){if(i==null)throw new Error("resolvedLanguages: unable to resolve language");t.push(i)}}),t}function BM(e){return Oa.getResolvedThemes(e)}function g2e(e,t){try{const n=b9({name:e,load:t});Oa.registerTheme(n.name,n.load)}catch(n){if(n instanceof eq){console.error("SharedHighlight.registerCustomTheme: theme name already registered",e);return}throw n}}async function qM(e){for(const n of e)sq(n);const t=await Oa.resolveThemes(e);for(let n=0;nPromise.resolve(Wq));function p2e(e){let t=e;const n=/\$\$([\s\S]*?)\$\$/g;t=t.replace(n,(i,s)=>{try{return VS.renderToString(s,{displayMode:!0,throwOnError:!1})}catch{return`$$${s}$$`}});const r=/\\\(((?:\\.|[^\\\n])*?)\\\)/g;return t=t.replace(r,(i,s)=>{try{return VS.renderToString(s,{displayMode:!1,throwOnError:!1})}catch{return`\\(${s}\\)`}}),t}const v2e=/^\\\(((?:\\.|[^\\\n])*?)\\\)/,y2e=/^\$\$\n([\s\S]+?)\n\$\$(?:\n|$)/,b2e={extensions:[{name:"inlineKatex",level:"inline",start(e){const t=e.indexOf("\\(");if(t!==-1)return t},tokenizer(e){const t=e.match(v2e);if(t)return{type:"inlineKatex",raw:t[0],text:t[1].trim(),displayMode:!1}},renderer:UM},{name:"blockKatex",level:"block",tokenizer(e){const t=e.match(y2e);if(t)return{type:"blockKatex",raw:t[0],text:t[1].trim(),displayMode:!0}},renderer:UM}]};function UM(e){return VS.renderToString(typeof e.text=="string"?e.text:"",{displayMode:e.displayMode===!0,throwOnError:!1})}function w2e(e){const t=/(<(?:pre|code|kbd)[^>]*>[\s\S]*?<\/(?:pre|code|kbd)>)/gi;return e.split(t).map((r,i)=>i%2===1?r:p2e(r)).join("")}async function x2e(e){const t=/

    ([\s\S]*?)<\/code><\/pre>/g,n=[...e.matchAll(t)];if(n.length===0)return e;const r=await Ym({themes:["OpenCode"],langs:[],preferredHighlighter:"shiki-wasm"});let i=e;for(const s of n){const[o,a,l]=s,c=l.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'");let u=a||"text";u in ud||(u="text"),r.getLoadedLanguages().includes(u)||await r.loadLanguage(u);const d=r.codeToHtml(c,{lang:u,theme:"OpenCode",tabindex:!1});i=i.replace(o,()=>d)}return i}const{use:Kq,provider:k2e}=Xr({name:"Marked",init:e=>{const t=Sr.use(y1e,{renderer:{link({href:n,title:r,text:i}){const s=r?` title="${r}"`:"";return`${i}`}}},b2e,ffe({async highlight(n,r){const i=await Ym({themes:["OpenCode"],langs:[],preferredHighlighter:"shiki-wasm"});return r in ud||(r="text"),i.getLoadedLanguages().includes(r)||await i.loadLanguage(r),i.codeToHtml(n,{lang:r||"text",theme:"OpenCode",tabindex:!1})}}));if(e.nativeParser){const n=e.nativeParser;return{async parse(r){const i=await n(r),s=w2e(i);return x2e(s)}}}return t}});function xn(e){const t=new TextEncoder().encode(e),n=Array.from(t,r=>String.fromCharCode(r)).join("");return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function S2e(e){const t=atob(e.replace(/-/g,"+").replace(/_/g,"/")),n=Uint8Array.from(t,r=>r.charCodeAt(0));return new TextDecoder().decode(n)}function lo(e){if(!e)return;let t=2166136261;for(let n=0;n>>0).toString(36)}function Iw(e,t=5e5){if(!e)return;if(e.length<=t)return lo(e);const n=4096,i=[0,Math.floor(e.length*.25),Math.floor(e.length*.5),Math.floor(e.length*.75),e.length-n].map(s=>{const o=Math.max(0,Math.min(e.length-n,s-Math.floor(n/2)));return lo(e.slice(o,o+n))??""}).join(":");return`${e.length}:${i}`}const Gq=`
    [data-annotation-slot] {
      padding: 12px;
      box-sizing: border-box;
    }
    
    [data-component="line-comment"] {
      position: absolute;
      right: 24px;
      z-index: var(--line-comment-z, 30);
    }
    
    [data-component="line-comment"][data-inline] {
      position: relative;
      right: auto;
      display: flex;
      width: 100%;
      min-width: 0;
      align-items: flex-start;
    }
    
    [data-component="line-comment"][data-open] {
      z-index: var(--line-comment-open-z, 100);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-button"] {
      width: 20px;
      height: 20px;
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--icon-interactive-base);
      box-shadow: var(--shadow-xs);
      cursor: default;
      border: none;
    }
    
    [data-component="line-comment"][data-variant="add"] [data-slot="line-comment-button"] {
      background: var(--syntax-diff-add);
    }
    
    [data-component="line-comment"] [data-component="icon"] {
      color: var(--white);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-icon"] {
      width: 12px;
      height: 12px;
      color: var(--white);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-button"]:focus {
      outline: none;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-button"]:focus-visible {
      box-shadow: var(--shadow-xs-border-focus);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-popover"] {
      position: absolute;
      top: calc(100% + 4px);
      right: -8px;
      z-index: var(--line-comment-popover-z, 40);
      min-width: 200px;
      max-width: none;
      box-sizing: border-box;
      border-radius: 8px;
      background: var(--surface-raised-stronger-non-alpha);
      box-shadow: var(--shadow-xxs-border);
      padding: 12px;
    }
    
    [data-component="line-comment"][data-inline] [data-slot="line-comment-popover"] {
      position: relative;
      top: auto;
      right: auto;
      margin-left: 8px;
      flex: 1 1 0%;
      width: auto;
      max-width: 100%;
      min-width: 0;
    }
    
    [data-component="line-comment"][data-inline] [data-slot="line-comment-popover"][data-inline-body] {
      margin-left: 0;
    }
    
    [data-component="line-comment"][data-inline][data-variant="default"] [data-slot="line-comment-popover"][data-inline-body] {
      cursor: pointer;
    }
    
    [data-component="line-comment"][data-variant="editor"] [data-slot="line-comment-popover"] {
      width: 380px;
      max-width: none;
      padding: 8px;
      border-radius: 14px;
    }
    
    [data-component="line-comment"][data-inline][data-variant="editor"] [data-slot="line-comment-popover"] {
      width: 100%;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-content"] {
      display: flex;
      flex-direction: column;
      gap: 6px;
      width: 100%;
      min-width: 0;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-head"] {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      min-width: 0;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-text"] {
      flex: 1;
      min-width: 0;
      font-family: var(--font-family-sans);
      font-size: var(--font-size-base);
      font-weight: var(--font-weight-regular);
      line-height: var(--line-height-x-large);
      letter-spacing: var(--letter-spacing-normal);
      color: var(--text-strong);
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-tools"] {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      min-width: 0;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-label"],
    [data-component="line-comment"] [data-slot="line-comment-editor-label"] {
      font-family: var(--font-family-sans);
      font-size: var(--font-size-small);
      font-weight: var(--font-weight-medium);
      line-height: var(--line-height-large);
      letter-spacing: var(--letter-spacing-normal);
      color: var(--text-weak);
      min-width: 0;
      white-space: normal;
      overflow-wrap: anywhere;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-editor"] {
      display: flex;
      flex-direction: column;
      gap: 8px;
      width: 100%;
      min-width: 0;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-textarea"] {
      width: 100%;
      box-sizing: border-box;
      resize: vertical;
      padding: 8px;
      border-radius: var(--radius-md);
      background: var(--surface-base);
      border: 1px solid var(--border-base);
      color: var(--text-strong);
      font-family: var(--font-family-sans);
      font-size: var(--font-size-small);
      line-height: var(--line-height-large);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-textarea"]:focus {
      outline: none;
      box-shadow: var(--shadow-xs-border-select);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-mention-list"] {
      display: flex;
      flex-direction: column;
      gap: 4px;
      max-height: 180px;
      overflow: auto;
      padding: 4px;
      border: 1px solid var(--border-base);
      border-radius: var(--radius-md);
      background: var(--surface-base);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-mention-item"] {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      min-width: 0;
      padding: 6px 8px;
      border: 0;
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--text-strong);
      text-align: left;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-mention-item"][data-active] {
      background: var(--surface-raised-base-hover);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-mention-path"] {
      display: flex;
      align-items: center;
      min-width: 0;
      font-family: var(--font-family-sans);
      font-size: var(--font-size-small);
      line-height: var(--line-height-large);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-mention-dir"] {
      min-width: 0;
      color: var(--text-weak);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-mention-file"] {
      color: var(--text-strong);
      white-space: nowrap;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-actions"] {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      padding-left: 8px;
      min-width: 0;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-editor-label"] {
      flex: 1 1 220px;
      margin-right: auto;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-action"] {
      border: 1px solid var(--border-base);
      background: var(--surface-base);
      color: var(--text-strong);
      border-radius: var(--radius-md);
      height: 28px;
      padding: 0 10px;
      font-family: var(--font-family-sans);
      font-size: var(--font-size-small);
      font-weight: var(--font-weight-medium);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-action"][data-variant="ghost"] {
      background: transparent;
    }
    
    [data-component="line-comment"] [data-slot="line-comment-action"][data-variant="primary"] {
      background: var(--text-strong);
      border-color: var(--text-strong);
      color: var(--background-base);
    }
    
    [data-component="line-comment"] [data-slot="line-comment-action"]:disabled {
      opacity: 0.5;
      pointer-events: none;
    }
    `;let c5=!1;function _2e(){if(c5||typeof document>"u")return;const e="opencode-line-comment-styles";if(document.getElementById(e)){c5=!0;return}const t=document.createElement("style");t.id=e,t.textContent=Gq,document.head.appendChild(t),c5=!0}const C2e=`
    :host {
      --diffs-bg: var(--opencode-diffs-bg, var(--color-background-stronger));
    }
    
    [data-diff],
    [data-file] {
      /* Pierre 1.2 mixes these override targets at 12% in light mode and 20% in dark mode. */
      --diffs-bg-deletion-override: light-dark(
        color-mix(in lab, var(--diffs-bg) 33.333%, var(--diffs-deletion-base)),
        color-mix(in lab, var(--diffs-bg) 60%, var(--diffs-deletion-base))
      );
      --diffs-bg-addition-override: light-dark(
        color-mix(in lab, var(--diffs-bg) 33.333%, var(--diffs-addition-base)),
        color-mix(in lab, var(--diffs-bg) 60%, var(--diffs-addition-base))
      );
      --diffs-selection-base: var(--surface-warning-strong);
      --diffs-selection-border: var(--border-warning-base);
      --diffs-selection-number-fg: #1c1917;
      /* Use explicit alpha instead of color-mix(..., transparent) to avoid Safari's non-premultiplied interpolation bugs. */
      --diffs-bg-selection: var(--diffs-bg-selection-override, rgb(from var(--surface-warning-base) r g b / 0.65));
      --diffs-bg-selection-number: var(
        --diffs-bg-selection-number-override,
        rgb(from var(--surface-warning-base) r g b / 0.85)
      );
      --diffs-bg-selection-text: rgb(from var(--surface-warning-strong) r g b / 0.2);
    }
    
    :host([data-color-scheme='dark']) [data-diff],
    :host([data-color-scheme='dark']) [data-file] {
      --diffs-selection-number-fg: #fdfbfb;
      --diffs-bg-selection: var(--diffs-bg-selection-override, rgb(from var(--solaris-dark-6) r g b / 0.65));
      --diffs-bg-selection-number: var(
        --diffs-bg-selection-number-override,
        rgb(from var(--solaris-dark-6) r g b / 0.85)
      );
    }
    
    [data-diff] ::selection,
    [data-file] ::selection {
      background-color: var(--diffs-bg-selection-text);
    }
    
    ::highlight(opencode-find) {
      background-color: rgb(from var(--surface-warning-base) r g b / 0.35);
    }
    
    ::highlight(opencode-find-current) {
      background-color: rgb(from var(--surface-warning-strong) r g b / 0.55);
    }
    
    [data-diff] [data-line][data-comment-selected]:not([data-selected-line]) {
      box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection);
    }
    
    [data-file] [data-line][data-comment-selected]:not([data-selected-line]) {
      box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection);
    }
    
    [data-diff] [data-column-number][data-comment-selected]:not([data-selected-line]) {
      box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection-number);
      color: var(--diffs-selection-number-fg);
    }
    
    [data-file] [data-column-number][data-comment-selected]:not([data-selected-line]) {
      box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection-number);
      color: var(--diffs-selection-number-fg);
    }
    
    [data-diff] [data-line-annotation][data-comment-selected]:not([data-selected-line]) [data-annotation-content] {
      box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection);
    }
    
    [data-file] [data-line-annotation][data-comment-selected]:not([data-selected-line]) [data-annotation-content] {
      box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection);
    }
    
    [data-diff] [data-line][data-selected-line] {
      background-color: var(--diffs-bg-selection);
      box-shadow: inset 2px 0 0 var(--diffs-selection-border);
    }
    
    [data-file] [data-line][data-selected-line] {
      background-color: var(--diffs-bg-selection);
      box-shadow: inset 2px 0 0 var(--diffs-selection-border);
    }
    
    [data-diff] [data-column-number][data-selected-line] {
      background-color: var(--diffs-bg-selection-number);
      color: var(--diffs-selection-number-fg);
    }
    
    [data-file] [data-column-number][data-selected-line] {
      background-color: var(--diffs-bg-selection-number);
      color: var(--diffs-selection-number-fg);
    }
    
    [data-diff] [data-column-number][data-line-type='context'][data-selected-line],
    [data-diff] [data-column-number][data-line-type='context-expanded'][data-selected-line],
    [data-diff] [data-column-number][data-line-type='change-addition'][data-selected-line],
    [data-diff] [data-column-number][data-line-type='change-deletion'][data-selected-line] {
      color: var(--diffs-selection-number-fg);
    }
    
    /* The deletion word-diff emphasis is stronger than additions; soften it while selected so the selection highlight reads consistently. */
    [data-diff] [data-line][data-line-type='change-deletion'][data-selected-line] {
      --diffs-bg-deletion-emphasis: light-dark(
        rgb(from var(--diffs-deletion-base) r g b / 0.07),
        rgb(from var(--diffs-deletion-base) r g b / 0.1)
      );
    }
    
    [data-diff-header],
    [data-diff],
    [data-file] {
      [data-separator] {
        height: 24px;
      }
      [data-column-number] {
        background-color: var(--diffs-bg);
        cursor: default !important;
      }
    
      &[data-interactive-line-numbers] [data-column-number] {
        cursor: default !important;
      }
    
      &[data-interactive-lines] [data-line] {
        cursor: auto !important;
      }
      [data-code] {
        overflow-x: auto !important;
        overflow-y: clip !important;
      }
    }
    
    ${Gq}
    
    `;function Zq(e){return{theme:"OpenCode",themeType:"system",disableLineNumbers:!1,overflow:"wrap",diffStyle:e??"unified",diffIndicators:"bars",lineHoverHighlight:"both",disableBackground:!1,expansionLineCount:20,hunkSeparators:"line-info-basic",lineDiffType:e==="split"?"word-alt":"none",maxLineDiffLength:1e3,maxLineLengthForHighlighting:1e3,disableFileHeader:!0,unsafeCSS:C2e}}const T2e={"--diffs-font-family":"var(--font-family-mono)","--diffs-font-size":"var(--font-size-small)","--diffs-line-height":"24px","--diffs-tab-size":2,"--diffs-font-features":"var(--font-family-mono--font-feature-settings)","--diffs-header-font-family":"var(--font-family-sans)","--diffs-gap-block":0,"--diffs-min-number-column-width":"4ch"};function Yq(e){const t=e.closest("[data-line], [data-alt-line]");if(t instanceof HTMLElement){const r=t.dataset.lineType;if(r==="change-deletion")return"deletions";if(r==="change-addition"||r==="change-additions")return"additions"}const n=e.closest("[data-code]");return n instanceof HTMLElement&&n.hasAttribute("data-deletions")?"deletions":"additions"}function v7(e,t){const n=t.dataset.lineIndex;if(!n)return;const r=n.split(",").map(i=>parseInt(i,10)).filter(i=>!Number.isNaN(i));if(r.length!==0)return e&&r.length===2?r[1]:r[0]}function Dw(e,t,n,r){const i=Array.from(e.querySelectorAll(`[data-line="${n}"], [data-alt-line="${n}"]`)).filter(o=>o instanceof HTMLElement);if(i.length===0)return;const s=r??"additions";for(const o of i)if(Yq(o)===s||parseInt(o.dataset.altLine??"",10)===n)return v7(t,o)}function WM(e,t){if(!t)return t;if(!e)return;const n=e.querySelector("[data-diff]");if(!(n instanceof HTMLElement))return;const r=n.dataset.diffType==="split",i=Dw(e,r,t.start,t.side),s=Dw(e,r,t.end,t.endSide??t.side);if(i===void 0||s===void 0)return e.querySelector("[data-line], [data-alt-line]")==null?void 0:null;if(i<=s)return t;const o=t.endSide??t.side,a={start:t.end,end:t.start};return o&&(a.side=o),t.endSide&&t.side&&(a.endSide=t.side),a}function Xq(e){const t=e.dataset.lineAnnotation?.split(",")[1];if(!t)return;const n=parseInt(t,10);if(!Number.isNaN(n))return n}function Qq(e){const t=Array.from(e.querySelectorAll("[data-comment-selected]"));for(const n of t)n instanceof HTMLElement&&n.removeAttribute("data-comment-selected")}function E2e(e,t){Qq(e);const n=e.querySelector("[data-diff]");if(!(n instanceof HTMLElement))return;const r=n.dataset.diffType==="split",i=Array.from(n.querySelectorAll("[data-line-index]")).filter(o=>o instanceof HTMLElement);if(i.length===0)return;const s=Array.from(n.querySelectorAll("[data-line-annotation]")).filter(o=>o instanceof HTMLElement);for(const o of t){const a=Dw(e,r,o.start,o.side);if(a===void 0)continue;const l=o.end===o.start&&(o.endSide==null||o.endSide===o.side)?a:Dw(e,r,o.end,o.endSide??o.side);if(l===void 0)continue;const c=Math.min(a,l),u=Math.max(a,l);for(const d of i){const f=v7(r,d);f===void 0||fu||d.setAttribute("data-comment-selected","")}for(const d of s){const f=Xq(d);f===void 0||fu||d.setAttribute("data-comment-selected","")}}}function I2e(e,t){Qq(e);const n=Array.from(e.querySelectorAll("[data-line-annotation]")).filter(r=>r instanceof HTMLElement);for(const r of t){const i=Math.max(1,Math.min(r.start,r.end)),s=Math.max(r.start,r.end);for(let o=i;o<=s;o++){const a=Array.from(e.querySelectorAll(`[data-line="${o}"], [data-column-number="${o}"]`));for(const l of a)l instanceof HTMLElement&&l.setAttribute("data-comment-selected","")}for(const o of n){const a=Xq(o);a===void 0||as||o.setAttribute("data-comment-selected","")}}}function D2e(e,t){const n=new ResizeObserver(e);return _e(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function k4(e,t,n){const r=new WeakMap,{observe:i,unobserve:s}=D2e(o=>{for(const a of o){const{contentRect:l,target:c}=a,u=Math.round(l.width),d=Math.round(l.height),f=r.get(c);(!f||f.width!==u||f.height!==d)&&(t(l,c,a),r.set(c,{width:u,height:d}))}},n);ae(o=>{const a=Nz(J2(Be(e)));return Vz(a,o,i,s),a},[])}const Aw=Symbol("store-raw"),Im=Symbol("store-node"),Dc=Symbol("store-has"),Jq=Symbol("store-self");function eU(e){let t=e[gl];if(!t&&(Object.defineProperty(e,gl,{value:t=new Proxy(e,M2e)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let i=0,s=n.length;ie[gl][t]),n}function tU(e){tS()&&yv(Lw(e,Im),Jq)()}function L2e(e){return tU(e),Reflect.ownKeys(e)}const M2e={get(e,t,n){if(t===Aw)return e;if(t===gl)return n;if(t===Wp)return tU(e),n;const r=Lw(e,Im),i=r[t];let s=i?i():e[t];if(t===Im||t===Dc||t==="__proto__")return s;if(!i){const o=Object.getOwnPropertyDescriptor(e,t);tS()&&(typeof s!="function"||e.hasOwnProperty(t))&&!(o&&o.get)&&(s=yv(r,t,s)())}return Xl(s)?eU(s):s},has(e,t){return t===Aw||t===gl||t===Wp||t===Im||t===Dc||t==="__proto__"?!0:(tS()&&yv(Lw(e,Dc),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:L2e,getOwnPropertyDescriptor:A2e};function xo(e,t,n,r=!1){if(!r&&e[t]===n)return;const i=e[t],s=e.length;n===void 0?(delete e[t],e[Dc]&&e[Dc][t]&&i!==void 0&&e[Dc][t].$()):(e[t]=n,e[Dc]&&e[Dc][t]&&i===void 0&&e[Dc][t].$());let o=Lw(e,Im),a;if((a=yv(o,t,i))&&a.$(()=>n),Array.isArray(e)&&e.length!==s){for(let l=e.length;l1){r=t.shift();const o=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let l=0;l1){G0(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let s=t[0];typeof s=="function"&&(s=s(i,n),s===i)||r===void 0&&s==null||(s=Vo(s),r===void 0||Xl(i)&&Xl(s)&&!Array.isArray(s)?nU(i,s):xo(e,r,s))}function Ke(...[e,t]){const n=Vo(e||{}),r=Array.isArray(n),i=eU(n);function s(...o){Ut(()=>{r&&o.length===1?$2e(n,o[0]):G0(n,o)})}return[i,s]}const y7=Symbol("store-root");function tm(e,t,n,r,i){const s=t[n];if(e===s)return;const o=Array.isArray(e);if(n!==y7&&(!Xl(e)||!Xl(s)||o!==Array.isArray(s)||i&&e[i]!==s[i])){xo(t,n,e);return}if(o){if(e.length&&s.length&&(!r||i&&e[0]&&e[0][i]!=null)){let c,u,d,f,m,g,p,y;for(d=0,f=Math.min(s.length,e.length);d=d&&m>=d&&(s[f]===e[m]||i&&s[f]&&e[m]&&s[f][i]&&s[f][i]===e[m][i]);f--,m--)v[m]=s[f];if(d>m||d>f){for(u=d;u<=m;u++)xo(s,u,e[u]);for(;ue.length&&xo(s,"length",e.length);return}for(p=new Array(m+1),u=m;u>=d;u--)g=e[u],y=i&&g?g[i]:g,c=b.get(y),p[u]=c===void 0?-1:c,b.set(y,u);for(c=d;c<=f;c++)g=s[c],y=i&&g?g[i]:g,u=b.get(y),u!==void 0&&u!==-1&&(v[u]=s[c],u=p[u],b.set(y,u));for(u=d;ue.length&&xo(s,"length",e.length);return}const a=Object.keys(e);for(let c=0,u=a.length;c{if(!Xl(s)||!Xl(i))return i;const o=tm(i,{[y7]:s},y7,n,r);return o===void 0?s:o}}const Mw=new WeakMap,rU={get(e,t){if(t===Aw)return e;const n=e[t];let r;return Xl(n)?Mw.get(n)||(Mw.set(n,r=new Proxy(n,rU)),r):n},set(e,t,n){return xo(e,t,Vo(n)),!0},deleteProperty(e,t){return xo(e,t,void 0,!0),!0}};function kt(e){return t=>{if(Xl(t)){let n;(n=Mw.get(t))||Mw.set(t,n=new Proxy(t,rU)),e(n)}return t}}const $w=new Set;let Au,xa,KM=!1;function P2e(e){return e instanceof HTMLElement?e.closest("[data-prevent-autofocus]")||e.isContentEditable?!0:/^(INPUT|TEXTAREA|SELECT|BUTTON)$/.test(e.tagName):!1}function GM(e){if(e instanceof Node)for(const t of $w){const n=t.element();if(n&&n.isConnected&&n.contains(e))return t}}function O2e(){KM||typeof window>"u"||(KM=!0,window.addEventListener("keydown",e=>{if(e.defaultPrevented||P2e(e.target)||!(e.metaKey||e.ctrlKey))return;const n=e.key.toLowerCase();if(n==="g"){const s=xa;if(!s||!s.isOpen())return;e.preventDefault(),e.stopPropagation(),s.next(e.shiftKey?-1:1);return}if(n!=="f")return;const r=xa;if(r&&r.isOpen()){e.preventDefault(),e.stopPropagation(),r.open();return}const i=GM(document.activeElement)??GM(e.target)??Au??Array.from($w)[0];i&&(e.preventDefault(),e.stopPropagation(),i.open())},{capture:!0}))}function Oh(){const e=globalThis.CSS?.highlights;e&&(e.delete("opencode-find"),e.delete("opencode-find-current"))}function ZM(){const e=globalThis;return typeof e.Highlight=="function"&&e.CSS?.highlights!=null}function YM(e){let t=e.parentElement;for(;t;){const n=getComputedStyle(t);if(n.overflowY==="auto"||n.overflowY==="scroll")return t;t=t.parentElement}}function R2e(e){let t,n,r="overlay",i=[];const[s,o]=De([]),[a,l]=Ke({open:!1,query:"",index:0,count:0,pos:{top:8,right:8}}),c=()=>a.open,u=()=>a.query,d=()=>a.index,f=()=>a.count,m=()=>a.pos,g=()=>{o([])},p=()=>{const D=e.overlay();D&&(n!==void 0&&(cancelAnimationFrame(n),n=void 0),D.innerHTML="")},y=()=>{if(r!=="overlay"){p();return}const D=e.wrapper(),T=e.overlay();if(!D||!T||(p(),i.length===0))return;const M=D.getBoundingClientRect(),P=d(),A=document.createDocumentFragment();for(let N=0;N{n=void 0,y()}))}const b=()=>{if(r!=="overlay")return;const D=e.getRoot(),T=D?Array.from(D.querySelectorAll("[data-code]")).filter(P=>P instanceof HTMLElement):[],M=s();T.length===M.length&&T.every((P,A)=>P===M[A])||(g(),o(T))},w=()=>{Oh(),p(),g(),i=[],l("count",0),l("index",0)},x=()=>{if(typeof window>"u")return;const D=e.wrapper();if(!D)return;const T=YM(D)??D,M=T.getBoundingClientRect(),P=parseFloat(getComputedStyle(T).getPropertyValue("--session-title-height")),A=Number.isNaN(P)?0:P;l("pos",{top:Math.round(M.top)+A-4,right:Math.round(window.innerWidth-M.right)+8})},k=(D,T)=>{const M=T.toLowerCase(),P=[],A=Array.from(D.querySelectorAll("[data-content] [data-line], [data-column-content]")).filter(N=>N instanceof HTMLElement);for(const N of A){const K=N.textContent;if(!K)continue;const q=K.toLowerCase();let X=q.indexOf(M);if(X===-1)continue;const re=[],G=[],Z=document.createTreeWalker(N,NodeFilter.SHOW_TEXT);let te=Z.nextNode(),me=0;for(;te;)te instanceof Text&&(me+=te.data.length,re.push(te),G.push(me)),te=Z.nextNode();if(re.length===0)continue;const se=ce=>{let U=0,Y=G.length-1;for(;U>1;G[ie]>=ce?Y=ie:U=ie+1}const W=U===0?0:G[U-1];return{node:re[U],offset:ce-W}};for(;X!==-1;){const ce=se(X),U=se(X+T.length),Y=document.createRange();Y.setStart(ce.node,ce.offset),Y.setEnd(U.node,U.offset),P.push(Y),X=q.indexOf(M,X+T.length)}}return P},_=D=>{const T=D.startContainer;(T instanceof Element?T:T.parentElement)?.scrollIntoView({block:"center",inline:"center"})},E=(D,T)=>{const M=globalThis.CSS?.highlights,P=globalThis.Highlight;if(!M||typeof P!="function")return!1;M.delete("opencode-find"),M.delete("opencode-find-current");const A=D[T];A&&M.set("opencode-find-current",new P(A));const N=D.filter((K,q)=>q!==T);return N.length>0&&M.set("opencode-find",new P(...N)),!0},C=D=>{if(!c())return;const T=u().trim();if(!T){w();return}const M=e.getRoot();if(!M)return;r=ZM()?"highlights":"overlay";const P=k(M,T),A=P.length,N=D?.reset?0:d(),K=A?Math.min(N,A-1):0;i=P,l("count",A),l("index",K);const q=P[K];if(r==="highlights"){p(),g(),E(P,K)||(r="overlay",Oh(),b(),v()),D?.scroll&&q&&_(q);return}Oh(),b(),D?.scroll&&q&&_(q),v()},L=()=>{l("open",!1),l("query",""),w(),xa===F&&(xa=void 0)},O=()=>{xa&&xa!==F&&xa.close(),xa=F,Au=F,c()||l("open",!0),requestAnimationFrame(()=>{C({scroll:!0}),t?.focus(),t?.select()})},V=D=>{if(!c())return;const T=f();if(T<=0)return;const M=(d()+D+T)%T;l("index",M);const P=i[M];if(P){if(r==="highlights"){if(!E(i,M)){r="overlay",C({reset:!0,scroll:!0});return}_(P);return}Oh(),b(),_(P),v()}},F={element:e.wrapper,isOpen:()=>c(),next:V,open:O,close:L};return ae(()=>{for(const D of s())on(D,"scroll",v,{passive:!0})}),sn(()=>{r=ZM()?"highlights":"overlay",O2e(),$w.add(F),Au||(Au=F),_e(()=>{$w.delete(F),xa===F&&(xa=void 0,Oh()),Au===F&&(Au=void 0)})}),ae(()=>{if(!c())return;const D=()=>x();requestAnimationFrame(D),on(window,"resize",D,{passive:!0});const T=e.wrapper();if(!T)return;const M=YM(T)??T;k4(M,D)}),_e(()=>{g(),p(),xa===F&&(xa=void 0,Oh())}),{open:c,query:u,count:f,index:d,pos:m,setInput:D=>{t=D},setQuery:D=>{l("query",D),l("index",0),C({reset:!0,scroll:!0})},focus:O,close:L,next:V,refresh:D=>C(D),onPointerDown:()=>{Au=F,e.wrapper()?.focus({preventScroll:!0})},onFocus:()=>{Au=F},onInputKeyDown:D=>{if(D.key==="Escape"){D.preventDefault(),L();return}D.key==="Enter"&&(D.preventDefault(),V(D.shiftKey?-1:1))}}}function F2e(){return{token:0}}function Ip(e){e.observer?.disconnect(),e.observer=void 0}function iU(e){if(!e)return;const t=e.querySelector("diffs-container");if(t instanceof HTMLElement)return t}function N2e(e){return iU(e)?.shadowRoot??void 0}function b7(e){if(!e||typeof document>"u")return;const t=document.documentElement.dataset.colorScheme;if(t==="dark"||t==="light"){e.dataset.colorScheme=t;return}e.removeAttribute("data-color-scheme")}function V2e(e){if(typeof document>"u")return()=>{};if(b7(e()),typeof MutationObserver>"u")return()=>{};const t=document.documentElement,n=new MutationObserver(()=>b7(e()));return n.observe(t,{attributes:!0,attributeFilter:["data-color-scheme"]}),()=>n.disconnect()}function z2e(e){Ip(e.state),e.state.token+=1;const t=e.state.token,n=Math.max(0,e.settleFrames??0),r=()=>{const o=a=>{if(t===e.state.token){if(a<=0){e.onReady();return}requestAnimationFrame(()=>o(a-1))}};requestAnimationFrame(()=>o(n))},i=o=>{if(e.isReady(o)){r();return}typeof MutationObserver>"u"||(Ip(e.state),e.state.observer=new MutationObserver(()=>{t===e.state.token&&e.isReady(o)&&(Ip(e.state),r())}),e.state.observer.observe(o,{childList:!0,subtree:!0}))},s=e.getRoot();if(!s){if(typeof MutationObserver>"u")return;e.state.observer=new MutationObserver(()=>{if(t!==e.state.token)return;const o=e.getRoot();o&&i(o)}),e.state.observer.observe(e.container,{childList:!0,subtree:!0});return}i(s)}function Dm(e,t){const n=Math.min(e.start,e.end),r=Math.max(e.start,e.end);return n===r?t("ui.sessionReview.selection.line",{line:n}):t("ui.sessionReview.selection.lines",{start:n,end:r})}function Ig(e,t){const n=Math.max(1,Math.min(t.start,t.end)),r=Math.max(t.start,t.end),i=e.split(`
    `).slice(n-1,r);if(i.length!==0)return i.slice(0,2).join(`
    `)}function Ql(e){const t={start:e.start,end:e.end};return e.side&&(t.side=e.side),e.endSide&&(t.endSide=e.endSide),t}function H2e(e,t,n){if(!e)return!1;const r=Math.min(e.start,e.end),i=Math.max(e.start,e.end);if(ti)return!1;if(!n)return!0;const s=e.side,o=e.endSide??s;return!s&&!o?!0:!s||!o?(s??o)===n:s===o||t===r?s===n:t===i?o===n:!0}function j2e(e){return e?e.start===e.end&&(e.endSide==null||e.endSide===e.side):!1}function B2e(e){if(e instanceof Range)return e;const t=new Range;return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),t}function sU(e,t){!e||!t||requestAnimationFrame(()=>{const n=e.getSelection?.()??window.getSelection();if(n)try{n.removeAllRanges(),n.addRange(t)}catch{}})}function q2e(){let e="none",t,n=!1,r=!1;const i=()=>{e="none",t=void 0,n=!1};return{begin(s,o){if(!s){e="text";return}e="numbers",t=o,n=!1},track(s,o){return e!=="numbers"?!1:(s&1)===0?(i(),!0):(o!==void 0&&t!==void 0&&o!==t&&(n=!0),!0)},finish(){const s=e;return r=s==="numbers"&&n,i(),s},consume(s){const o=r&&!j2e(s);return r=!1,o},reset(){r=!1,i()}}}function S4(e){if(e)return e instanceof HTMLElement?e:e.parentElement??void 0}function U2e(e){const t=S4(e);if(!t)return;const n=t.closest("[data-line]");if(!(n instanceof HTMLElement))return;const r=parseInt(n.dataset.line??"",10);if(!Number.isNaN(r))return r}function XM(e){const t=S4(e);if(!t)return;const n=t.closest("[data-line], [data-alt-line]");if(!(n instanceof HTMLElement))return;const r=parseInt(n.dataset.line??"",10);if(!Number.isNaN(r))return r;const i=parseInt(n.dataset.altLine??"",10);if(!Number.isNaN(i))return i}function W2e(e){const t=S4(e);if(!t)return;const n=t.closest("[data-code]");if(n instanceof HTMLElement)return n.hasAttribute("data-deletions")?"deletions":"additions"}function oU(e){const t=e.root.getSelection?.()??window.getSelection();if(!t||t.isCollapsed)return;const n=t.getComposedRanges?.({shadowRoots:[e.root]})?.[0]??(t.rangeCount>0?t.getRangeAt(0):void 0),r=n?.startContainer??t.anchorNode,i=n?.endContainer??t.focusNode;if(!r||!i||!e.root.contains(r)||!e.root.contains(i))return;const s=e.lineForNode(r),o=e.lineForNode(i);if(s===void 0||o===void 0)return;const a=e.sideForNode?.(r),l=e.sideForNode?.(i),c=a??l,u={start:s,end:o};return c&&(u.side=c),l&&c&&l!==c&&(u.endSide=l),{range:u,text:e.preserveTextSelection&&n?B2e(n).cloneRange():void 0}}const Zy=new WeakMap,K2e={lineHeight:24,hunkSeparatorHeight:24,spacing:0};function G2e(e){return e==="auto"||e==="scroll"||e==="overlay"}function QM(e){let t=e.parentElement;for(;t;){const n=getComputedStyle(t);if(G2e(n.overflowY))return t;t=t.parentElement}}function Z2e(e){if(typeof document>"u")return;const t=e.closest("[data-component='session-review']");if(t instanceof HTMLElement){const r=QM(e)??t,i=t.querySelector("[data-slot='session-review-container']");return{key:t,root:r,content:i instanceof HTMLElement?i:void 0}}const n=QM(e);if(n){const r=n.querySelector("[role='log']");return{key:n,root:n,content:r instanceof HTMLElement?r:void 0}}return{key:document,root:document,content:void 0}}function Y2e(e){const t=Z2e(e);if(!t)return;let n=Zy.get(t.key);if(!n){const i=new Uq;i.setup(t.root,t.content),n={virtualizer:i,refs:0},Zy.set(t.key,n)}n.refs+=1;let r=!1;return{virtualizer:n.virtualizer,release(){if(r)return;r=!0;const i=Zy.get(t.key);i&&(i.refs-=1,!(i.refs>0)&&(i.virtualizer.cleanUp(),Zy.delete(t.key)))}}}function aU(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Z0={exports:{}},X2e=Z0.exports,JM;function Q2e(){return JM||(JM=1,(function(e,t){(function(n,r){r(t)})(X2e,function(n){const r=Symbol("newer"),i=Symbol("older");class s{constructor(d,f){typeof d!="number"&&(f=d,d=0),this.size=0,this.limit=d,this.oldest=this.newest=void 0,this._keymap=new Map,f&&(this.assign(f),d<1&&(this.limit=this.size))}_markEntryAsUsed(d){d!==this.newest&&(d[r]&&(d===this.oldest&&(this.oldest=d[r]),d[r][i]=d[i]),d[i]&&(d[i][r]=d[r]),d[r]=void 0,d[i]=this.newest,this.newest&&(this.newest[r]=d),this.newest=d)}assign(d){let f,m=this.limit||Number.MAX_VALUE;this._keymap.clear();let g=d[Symbol.iterator]();for(let p=g.next();!p.done;p=g.next()){let y=new o(p.value[0],p.value[1]);if(this._keymap.set(y.key,y),f?(f[r]=y,y[i]=f):this.oldest=y,f=y,m--==0)throw new Error("overflow")}this.newest=f,this.size=this._keymap.size}get(d){var f=this._keymap.get(d);return f?(this._markEntryAsUsed(f),f.value):void 0}set(d,f){var m=this._keymap.get(d);return m?(m.value=f,this._markEntryAsUsed(m),this):(this._keymap.set(d,m=new o(d,f)),this.newest?(this.newest[r]=m,m[i]=this.newest):this.oldest=m,this.newest=m,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var d=this.oldest;if(d)return this.oldest[r]?(this.oldest=this.oldest[r],this.oldest[i]=void 0):(this.oldest=void 0,this.newest=void 0),d[r]=d[i]=void 0,this._keymap.delete(d.key),--this.size,[d.key,d.value]}find(d){let f=this._keymap.get(d);return f?f.value:void 0}has(d){return this._keymap.has(d)}delete(d){var f=this._keymap.get(d);return f?(this._keymap.delete(f.key),f[r]&&f[i]?(f[i][r]=f[r],f[r][i]=f[i]):f[r]?(f[r][i]=void 0,this.oldest=f[r]):f[i]?(f[i][r]=void 0,this.newest=f[i]):this.oldest=this.newest=void 0,this.size--,f.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new l(this.oldest)}values(){return new c(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(d,f){typeof f!="object"&&(f=this);let m=this.oldest;for(;m;)d.call(f,m.value,m.key,this),m=m[r]}toJSON(){for(var d=new Array(this.size),f=0,m=this.oldest;m;)d[f++]={key:m.key,value:m.value},m=m[r];return d}toString(){for(var d="",f=this.oldest;f;)d+=String(f.key)+":"+f.value,f=f[r],f&&(d+=" < ");return d}}n.LRUMap=s;function o(u,d){this.key=u,this.value=d,this[r]=void 0,this[i]=void 0}function a(u){this.entry=u}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let u=this.entry;return u?(this.entry=u[r],{done:!1,value:[u.key,u.value]}):{done:!0,value:void 0}};function l(u){this.entry=u}l.prototype[Symbol.iterator]=function(){return this},l.prototype.next=function(){let u=this.entry;return u?(this.entry=u[r],{done:!1,value:u.key}):{done:!0,value:void 0}};function c(u){this.entry=u}c.prototype[Symbol.iterator]=function(){return this},c.prototype.next=function(){let u=this.entry;return u?(this.entry=u[r],{done:!1,value:u.value}):{done:!0,value:void 0}}})})(Z0,Z0.exports)),Z0.exports}var J2e=Q2e();const e$=aU(J2e),Yy=Symbol("IGNORE_RESPONSE");var u5=class extends Error{constructor(){super("WorkerPoolManager: operation canceled because the pool terminated")}},ewe=class{highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:n=Ii,useTokenTransformer:r=!1,lineDiffType:i="word-alt",maxLineDiffLength:s=1e3,tokenizeMaxLineLength:o=1e3,preferredHighlighter:a="shiki-js"}){this.options=e,this.preferredHighlighter=a,this.renderOptions={theme:n,useTokenTransformer:r,lineDiffType:i,maxLineDiffLength:s,tokenizeMaxLineLength:o},this.fileCache=new e$.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new e$.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey!=null?this.fileCache.get(e.cacheKey):void 0}getDiffResultCache(e){return e.cacheKey!=null?this.diffCache.get(e.cacheKey):void 0}inspectCaches(){const{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??Ii,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:n=this.renderOptions.lineDiffType??"word-alt",maxLineDiffLength:r=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:i=this.renderOptions.tokenizeMaxLineLength??1e3}){const{lifecycleGeneration:s}=this,o=++this.renderOptionsRequestVersion,a=()=>this.isCurrentLifecycle(s)&&this.renderOptionsRequestVersion===o;try{const l={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:r,tokenizeMaxLineLength:i};if(this.isInitialized()||await this.initialize(),!a()||Ac(l,this.renderOptions))return;const c=dv(e);let u=[];if(Eg(l.theme,this.renderOptions.theme)||(u7(c)?u=BM(c):u=await qM(c)),!a())return;if(this.highlighter!=null)c7(u,this.highlighter);else{const f=await Ym({themes:c,langs:["text"],preferredHighlighter:this.preferredHighlighter});if(!a())return;this.highlighter=f}const d=this.setRenderOptionsOnWorkers(l,u);this.renderOptions=l,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(const f of this.themeSubscribers)f.onThemeChange();await d}catch(l){if(l instanceof u5||!a())return;throw l}}getFileRenderOptions(){const{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:n}=this.renderOptions;return{theme:t,useTokenTransformer:n,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();const n=[];for(const r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),new Error("setRenderOptionsOnWorkers: Somehow we have an uninitialized worker");n.push(new Promise((i,s)=>{const o=this.generateRequestId(),a={type:"set-render-options",id:o,request:{type:"set-render-options",id:o,renderOptions:e,resolvedThemes:t},resolve:i,reject:s,requestStart:Date.now()};this.activeTaskById.set(o,a),r.pendingSetupRequestId=o,r.worker.postMessage(a.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast==null&&(this._queuedBroadcast=requestAnimationFrame(this._broadcastStateChanges))}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);const e=this.getStats();for(const t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);const t=this.activeRequestByInstance.get(e);if(t!=null){const n=this.activeTaskById.get(t);Ud(n)?(this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeActiveTask(n)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0)if(this.initialized===!1){const{lifecycleGeneration:t}=this;this.initialized=new Promise((n,r)=>{(async()=>{try{const i=dv(this.renderOptions.theme);let s=[];if(u7(i)?s=BM(i):s=await qM(i),!this.isCurrentLifecycle(t)){n();return}let o=[];if(HM(e)?o=zM(e):o=await jM(e),!this.isCurrentLifecycle(t)){n();return}const[a]=await Promise.all([Ym({themes:i,langs:["text",...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(s,o)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),n();return}this.highlighter=a,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),n()}catch(i){if(i instanceof u5||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0,this.queueBroadcastStateChanges(),r(i)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}async initializeWorkers(e,t){this.workersFailed=!1;const n=[],r=void 0;this.workers.length>0&&this.terminateWorkers();for(let i=0;i<(this.options.poolSize??8);i++){const s=this.options.workerFactory(),o={worker:s,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set(["text",...t.map(({name:a})=>a)]),customExtensionsVersion:0};s.addEventListener("message",a=>{this.handleWorkerMessage(o,a.data)}),s.addEventListener("error",a=>console.error("Worker error:",a,o)),this.workers.push(o),n.push(new Promise((a,l)=>{const c=this.generateRequestId(),u={type:"initialize",id:c,request:{type:"initialize",id:c,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:void 0,customExtensionMap:r},resolve(){o.initialized=!0,a()},reject:l,requestStart:Date.now()};this.activeTaskById.set(c,u),this.executeTask(o,u)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,!(this.initialized!==!0||this.queuedTasks.length===0)){for(let e=0;e "${e.name}".`);return}const t=this.getDiffResultCache(e),n=this.getDiffHighlightKey(e);if(n==null||vv(e)||t!=null&&Ac(t.options,this.getDiffRenderOptions()))return;const r=this.getTaskByHighlightKey(n);r!=null?r.primeCache=!0:this.submitCacheTask({type:"diff",diff:e},n)}getPlainDiffAST(e,t,n,r,i){return this.highlighter!=null?jq(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:r,collapsedContextThreshold:i}):void 0}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers(),this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(t=>{console.error(t)})}cancelActiveWorkerTasks(){const e=new u5;for(const t of this.activeTaskById.values())"reject"in t&&t.reject(e)}terminateWorkers(){for(const e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?"waiting":this.initialized!==!0?"initializing":"initialized",totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();const n=this.getHighlightKeyForRequest(t),r=n!=null?this.getTaskByHighlightKey(n):void 0;if(r!=null){this.detachInstanceFromQueuedTasks(e,r),this.addInstanceToTask(r,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);const i=this.generateRequestId(),s=Date.now(),{renderOptionsVersion:o}=this,a=(()=>{switch(t.type){case"file":return{type:"file",id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,renderOptionsVersion:o,requestStart:s};case"diff":return{type:"diff",id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,renderOptionsVersion:o,requestStart:s}}})();this.enqueueRenderTask(a,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();const n=this.generateRequestId(),r=Date.now(),{renderOptionsVersion:i}=this,s=(()=>{switch(e.type){case"file":return{type:"file",id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,renderOptionsVersion:i,requestStart:r};case"diff":return{type:"diff",id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,renderOptionsVersion:i,requestStart:r}}})();this.enqueueRenderTask(s)}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{const r=n.filter(i=>!e.langs.has(i));if(r.length>0&&(HM(r)?t.request.resolvedLanguages=zM(r):t.request.resolvedLanguages=await jM(r)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch{this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){const n=this.activeTaskById.get(t.id);try{if(n==null)throw Yy;if(t.type==="error"){const r=new Error(t.error);if(t.stack&&(r.stack=t.stack),"reject"in n)n.reject(r);else if(Ud(n))this.notifyHighlightError(n,r);else throw new Error("handleWorkerMessage: unknown task type");throw r}else switch(t.requestType){case"initialize":if(n.type!=="initialize")throw new Error("handleWorkerMessage: task/response dont match");this.syncCustomExtensionVersion(e,n.request),n.resolve();break;case"set-render-options":if(n.type!=="set-render-options")throw new Error("handleWorkerMessage: task/response dont match");n.resolve();break;case"file":{if(n.type!=="file")throw new Error("handleWorkerMessage: task/response dont match");const{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!zu(i,this.getFileRenderOptions()))throw Yy;const{request:s}=n;this.syncCustomExtensionVersion(e,s),s.file.cacheKey!=null&&this.fileCache.set(s.file.cacheKey,{result:r,options:i}),this.notifyFileInstances(n,r,i);break}case"diff":{if(n.type!=="diff")throw new Error("handleWorkerMessage: task/response dont match");const{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!Ac(i,this.getDiffRenderOptions()))throw Yy;const{request:s}=n;this.syncCustomExtensionVersion(e,s),s.diff.cacheKey!=null&&this.diffCache.set(s.diff.cacheKey,{result:r,options:i}),this.notifyDiffInstances(n,r,i);break}}}catch(r){r!==Yy&&console.error(r,n,t)}this.cleanWorkerAndTask(e,n,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain==null&&(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,Ud(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,n=t?.id){e.requestId===n&&(e.requestId=void 0),e.pendingSetupRequestId===n&&(e.pendingSetupRequestId=void 0),t!=null&&(Ud(t)&&(this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){twe(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(const n of t$(t))e.langs.add(n);try{e.worker.postMessage(t.request)}catch(n){console.error("Failed to post message to worker:",n),Ud(t)?this.notifyHighlightError(t,n):"reject"in t&&t.reject(n),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;const n=yye();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=bye())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(const n of this.workers){if(n.requestId!=null||n.pendingSetupRequestId!=null||!n.initialized)continue;if(t=n,e.length===0)break;let r=!0;for(const i of e)if(!n.langs.has(i)){r=!1;break}if(r)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case"file":return this.getFileHighlightKey(e.file);case"diff":return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(const t of h0(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){const n=this.queuedTaskByInstance.get(e);n==null||n===t||(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeQueuedTask(n))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){const t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){const t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(const e of Array.from(this.activeTaskById.values()))Ud(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(const t of h0(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(const t of h0(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(const t of h0(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,n){for(const r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.file,t,n)}notifyDiffInstances(e,t,n){for(const r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.diff,t,n)}notifyHighlightError(e,t){for(const n of h0(e))this.activeRequestByInstance.get(n)===e.id&&n.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(const n of this.iterateRenderTasks())if(n.type==="file"&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Bl(t,n.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(const n of this.iterateRenderTasks())if(n.type==="diff"&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&pm(n.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){const t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(const e of this.queuedTasks)yield e;for(const e of this.activeTaskById.values())Ud(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function twe(e){return e.type==="initialize"||e.type==="file"||e.type==="diff"}function t$(e){const t=new Set;if(e.type==="initialize"||e.type==="set-render-options")return[];switch(e.type){case"file":t.add(e.request.file.lang??ao(e.request.file.name));break;case"diff":t.add(e.request.diff.lang??ao(e.request.diff.name)),t.add(e.request.diff.lang??ao(e.request.diff.prevName??"-"));break}return t.delete("text"),Array.from(t)}function Ud(e){return e?.type==="file"||e?.type==="diff"}function h0(e){return e.instances}const nwe="/assets/worker-CU6mbanM.js";function rwe(){return new Worker(nwe,{type:"module"})}function n$(e){const t=new ewe({workerFactory:rwe,poolSize:2},{theme:"OpenCode",lineDiffType:e,preferredHighlighter:"shiki-wasm"});return t.initialize(),t}let d5,f5;function Pw(e){if(!(typeof window>"u"))return e==="split"?(f5||(f5=n$("word-alt")),f5):(d5||(d5=n$("none")),d5)}const iwe=new Set(["png","jpg","jpeg","gif","webp","avif","bmp","ico","tif","tiff","heic"]),swe=new Set(["mp3","wav","ogg","m4a","aac","flac","opus"]);function _4(e){if(!(!e||typeof e!="object"))return e}function x9(e){if(!e)return;const t=e.split(";",1)[0]?.trim().toLowerCase();if(t)return t==="audio/x-aac"?"audio/aac":t==="audio/x-m4a"?"audio/mp4":t}function owe(e){if(!e)return"";const t=e.lastIndexOf(".");return t===-1?"":e.slice(t+1).toLowerCase()}function k9(e){const t=owe(e);if(t==="svg")return"svg";if(iwe.has(t))return"image";if(swe.has(t))return"audio"}function awe(e){return _4(e)?.type==="binary"}function lwe(e,t){if(t==="svg")return e.startsWith("data:image/svg+xml")?e:void 0;if(t==="image")return e.startsWith("data:image/")?e:void 0;if(e.startsWith("data:audio/x-aac;"))return e.replace("data:audio/x-aac;","data:audio/aac;");if(e.startsWith("data:audio/x-m4a;"))return e.replace("data:audio/x-m4a;","data:audio/mp4;");if(e.startsWith("data:audio/"))return e}function h5(e,t){if(!e)return;if(typeof e=="string")return lwe(e,t);const n=_4(e);if(!n||typeof n.content!="string")return;const r=x9(typeof n.mimeType=="string"?n.mimeType:void 0);if(r){if(t==="svg")return r!=="image/svg+xml"?void 0:n.encoding==="base64"?`data:image/svg+xml;base64,${n.content}`:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n.content)}`;if(!(t==="image"&&!r.startsWith("image/"))&&!(t==="audio"&&!r.startsWith("audio/"))&&n.encoding==="base64")return`data:${r};base64,${n.content}`}}function cwe(e){if(typeof atob=="function")try{const t=atob(e),n=Uint8Array.from(t,r=>r.charCodeAt(0));return typeof TextDecoder=="function"?new TextDecoder().decode(n):t}catch{}}function uwe(e){const t=_4(e);if(!(!t||typeof t.content!="string"||x9(typeof t.mimeType=="string"?t.mimeType:void 0)!=="image/svg+xml"))return t.encoding==="base64"?cwe(t.content):t.content}function m5(e){if(typeof e=="string")return e.length>0;const t=_4(e);return t?typeof t.content=="string"&&t.content.length>0:!1}var dwe=$('
    '),Xy=$('
    '),fwe=$('
    '),hwe=$('